2016-07-10 02:21 AM
I use stm32f427 to do a work,
recently, I hope to use dma to get uart rx data,but I found there a strange situation that sometimes the dma will broke and I cannot find whyany other functions keep working, but only the uart rx dma just do nothing,I use ''DMA_GetCmdStatus()'' and it's in ENABLE status,the buffer will not get new uart rx data and the counter keep the same value.The most strange, it will not broke when I setting the address and counter value, just like I set the dma size 20, every situation dma broke, it will recieve 1data, and then broke, the counter value keep 19, and never change againI not sure why, and don't have any idea, can anyone give me some hint, thank you a lot #stm32 #dma #uart2016-07-10 05:56 AM
Does the USART get a framing, parity or overrun error that needs clearing? Is the DMA configured in a circular mode, or do you reconfigure it frequently?
Provide a complete and concise example illustrating the issue.2016-07-11 03:33 AM
Thank you for giving me some hint. That I found it's the ''OverRun'' problem, I check this from getting flag information.
I use normal dma mode. I would like to use like circular buffer, so I set dma address and count when the DMA ISR occur. In overrun situation, I think I may lose some data. But if the dma cannot keep working, it's really a trouble, how can I do and make dma keep going, even some data will losethank you