| Electronic Components Datasheet Search |
|
AN3117 Datasheet(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3117 Datasheet(HTML) 16 Page - STMicroelectronics |
|
16 / 28 page ![]() Programming the DMA using the standard peripheral library AN3117 16/28 Doc ID 16846 Rev 4 3.1.3 Enabling the DMA transfers After configuring the DMA channels, the user should do the following: 1. Enable the corresponding DMA channel transfer (using the DMA_Cmd() function). DMA_Cmd(DMA_Channelx, ENABLE); 2. Enable the global DMA channel transfers (using the DMA_GmobalCmd() function). DMA_GlobalCmd(ENABLE); Once the DMA request is enabled, the DMA transfer starts. 3.1.4 Configuring the arbitration delay Arbitration between the DMA and CPU is performed inside the STM8 core. The DMA controller can inform the STM8 core that the current access should have priority over the CPU. The DMA waits until the configured timeout (using the DMA_SetTimeOut() function) has elapsed before requesting from the core a high priority access to the system bus. One timeout duration is equal to one CPU cycle. When the timeout delay is programmed to 0, it means there is no timeout. Once a request is served, the DMA immediately asks the CPU for a high priority access to the system bus. 3.2 Supervising the DMA transfer 3.2.1 Method 1: Current data counter A DMA transfer consists of a single read/write operation from/to a data block. It cannot be interrupted. A DMA transaction consists of a complete DMA read and write operation of a given number of data blocks. They can be divided into single transfers. A data block consists of either 8-bits or 16-bits of data depending on the size of the block that has been programmed. The number of transfers is indicated by the DMA_BufferSize parameter that the user chooses during DMA channel initialization (using the DMA_Init() function). The DMA driver provides a function which returns the current data counter. By reading the current data counter, using the DMA_GetCurrDataCounter() function, the user learns the number of remaining transfers. |
|
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 |