2021-05-06 08:18 AM
Hi everyone
I was wondering if it would be possible to implement a DMA setup without interrupts that maintains two circular buffers for the same USART? I would like to save both the SR and DR register values in two separate circular buffers every time data is transfered to the MCU. The one I'm using is a STM32F205RG. I've read some about double buffer mode which looks promising but im honestly unsure at this point and hopefully you guys can help me.
Thanks in advance, Malte
Solved! Go to Solution.
2021-05-07 12:47 PM
Dual buffer DMA in STM32 means, that if one buffer is full, it will automatically switch to the other. This is not what you want.
Unfortunately, there's no way to do what you want. The USART_Rx-triggered DMA can't do anything else just read USART_DR.
JW
2021-05-06 09:24 AM
The RXNE interrupt DMA trigger can only do one thing.
Why do you want to save USARTx->SR? Note that reading SR DR has consequences such as clearing the RXNE flag, which have the potential to cause issues/misinformation for you in such a scheme.
2021-05-07 12:59 AM
Im using a communication standard that uses frame errors to start communication. Capturing the SR register along with the DR is very crucial for our communication standard to work.
2021-05-07 12:47 PM
Dual buffer DMA in STM32 means, that if one buffer is full, it will automatically switch to the other. This is not what you want.
Unfortunately, there's no way to do what you want. The USART_Rx-triggered DMA can't do anything else just read USART_DR.
JW
2021-05-12 02:37 AM
Thought that might have been the case. Thanks for the help 🙂