Hello I found the documentation about the halfway done interrupt and circular DMA a bit lacking. Could someone please verify my understanding of the operation ?
Say I have an array of 12 elements. This is being filled by the DMA in circular mode. When I enable the halfway done interrupt, I will then have the data in element [0-5] and the DMA is filling element [6-11] if the halfway done flag is enabled?
Yes. But when DMA done with elements [6-11] it will be "Transfer complete" interrupt instead of "Half-complete". So if you have HC fired - you can work with [0-5], when you have TC - you can work with [6-11] elements.
"without CPU intervention. Is there a way to set up the upper address so as soon as the upper address is reached, the address pointer would be reloaded with the lower address?"
Which hardware can do it? It can't.
As the orthodox way, generate End-Of-Process interrupt using Repeat Counter.
My application requires that the data received in the USART1 is to be transmitted to USART2. USART1 operates at 115200,8,n,1 and USART2 operates at 9600,8,n,1.I m tying to do FIFO emulation using DMA with USART1 and USART2 in circular mode. The target that i m using is STM32F103VBT6. My application requires that the data received in the USART1 is to be transmitted to USART2. USART1 operates at 115200,8,n,1 and USART2 operates at 9600,8,n,1. Initially i tried using the interrupt routines. But due to the transimission of data from the higher baud rate to lower rate there was hug data loss. The data that i tried is transfer is around 1KB.
Hi, this is a part from my working DMA code, where the A/D data are continuously written into a circular buffer and the DMA half done and DMA full done interrupts are set up.
Note1: the code was written for an STM32VLDiscovery, so the peripheries may not be compatible with the CircleOS. Note2: this is a code snippet only, but shows the way how to start...