| Electronic Components Datasheet Search |
|
AN3117 Datasheet(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3117 Datasheet(HTML) 21 Page - STMicroelectronics |
|
21 / 28 page ![]() AN3117 DMA programming examples Doc ID 16846 Rev 4 21/28 4.4 DMA transfer examples in low power mode 4.4.1 DMA transfer example in Wait for event (WFE) mode This example uses the DMA peripheral in circular mode to transfer data from the USARTx peripheral to the RAM memory. When the user sends a character using USARTx, it is transferred to a specific RAM buffer using the DMA. Figure 6. DMA transfer example in WFE mode The DMA event is provided by the USARTx_RX. After configuring USART DMA Channel RX to transfer 4 bytes of data from the USARTx data register to a RAM buffer, the MCU enters WFE mode. As long as no “DMA transfer complete” event has occurred, the MCU is in WFE mode. As soon as the “DMA transfer complete” event occurs, the MCU returns to Run mode and executes a specific action (activate/deactivate LEDs) depending on the data in the RAM buffer. The MCU is then returned to WFE mode by software. Since USART DMA Channel RX is configured in circular mode, the same procedure is repeated indefinitely. The code for this example is provided in the STM8L05x/STM8L15x/STM8L16x/STM8AL31x/ STM8AL3Lx standard peripheral library package. Note: USART DMA Channel RX can be DMA channel 2 or DMA channel 3 respectively for USART1 and USART2. GPIO STM8 core USARTx Channel RX DMA source System bus DMA1 bus ai17421c char 01 char 02 char 03 char 04 DMA destination USART DMA1 USARTx_DR RAM bus LEDs Peripheral bus |
|
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 |