2014-03-26 02:07 AM
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
2014-03-26 12:29 PM
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.