cancel
Showing results for 
Search instead for 
Did you mean: 

Get DMA status

MehranMsba
Associate II
Posted on March 26, 2014 at 10:07

I use DMA on USART2 rx.(STM32f107)

I can buffer my incoming data with DMA on circular mode and have no problem. My array size is 1024 byte and I don't want to wait for 1024 incoming byte and get interrupt of DMA TC.I check this buffer every 2mS. I need to know number of available byte in this buffer. I can't find any counter in DMA and this function:

DMA_GetCurrDataCounter();

is not work. Its changed to zero in complete operation and has no down or up counting. How can I get status?what is better solution? Additional info: BuadRate is dynamic and changed on different status.TX DMA is also enabled. Thanks. #dma-count-status
1 REPLY 1
MehranMsba
Associate II
Posted on March 26, 2014 at 20:29

I changed other access to ram and this function

DMA_GetCurrDataCounter();

worked! I forget this: many access to memory from CPU has been caused some problems(such as:lesser speed) to DMA routine. sorry for my mistake.