AnsweredAssumed Answered

Problem on using USART with DMA

Question asked by son.youngbin on Jan 1, 2013
Latest reply on Jan 2, 2013 by Clive One
Hello,
I am implementing a UART driver using circular queue scheme, and found a minor problem with it.
When I put a new character after DMA channel 5 finishes its transfer - i.e. put a new character when DMA_CNDTR5=0 - the DMA(not just ch5, including channel 4, which runs for UART TX) stops working.
It can be solved by disabling DMA channel quickly after its finish, before any new request arrives.
However, due to many problems, such as latency due to interrupt priority, I think some error may occur using this method, so I changed channel 5 to use circular mode, which makes CNDTR never turn to 0.
It doesn't make such problems, but it overwrites unread data.
Is there any method that can disable a dma channel after its transfer completion automatically?

Outcomes