| Electronic Components Datasheet Search |
|
AN3117 Datasheet(PDF) 12 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3117 Datasheet(HTML) 12 Page - STMicroelectronics |
|
12 / 28 page ![]() Programming the DMA using the standard peripheral library AN3117 12/28 Doc ID 16846 Rev 4 3 Programming the DMA using the standard peripheral library The STM8L05x/STM8L15x/STM8L16x/STM8AL31x/STM8AL3Lx standard peripheral library is an easy-to-use complete firmware package consisting of device drivers for all the standard device peripherals. It is available for download, together with this application note, from the STMicroelectronics website: http://www.st.com/mcu/familiesdocs-120.html. Each device driver includes a set of functions covering full peripheral functionality. The DMA driver provides the user with an easy way to configure and supervise the DMA peripheral. 3.1 Configuring the DMA peripheral to transfer data To configure the DMA peripheral to transfer data, three mandatory steps (steps 1, 2, and 4) and one optional step (step 3) are required. These steps are described in Figure 2. The user can adapt these steps to suit his application. Figure 2. Configuring the DMA peripheral to transfer data ai17417 Step 1: Clock configuration - Enable the DMA clock (CLK_PeripheralClockConfig(CLK_DMA1, ENABLE)) - Enable the PPP clock (CLK_PeripheralClockConfig(CLK_PPP, ENABLE)) Step 2: DMA configuration - Configure the DMA channel (DMA_Init function) - Enable the DMA channel (DMA_Cmd function) - Enable the DMA interrupts (DMA_ITConfig function) (optional) - Configure the timeout function (DMA_SetTimeOut function) (optional) - Enable the global DMA function (DMA_GlobalCmd function) Step 3: DMA channel assignment - Change the PPP assignment to the DMA channel (SYSCFG_REMAPDMAChannelConfig function) Note: this step is optional. It can be used only for the ADC and TIM4 Step 4: PPP configuration - Configure the PPP peripheral (PPP_Init and/or PPP_Config ...) - Enable the DMA transfers and select the DMA request source (PPP_DMACmd function) - Enable the PPP peripheral (PPP_Cmd function) |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |