2020-11-24 05:40 AM
Hi,
I am trying to recieve unknown number of bytes using DMA in circular mode. My buffer size is 2048.
After reaching this size, CNDTR becomes 0 and never reinitialized again. It stays 0 always.
The bytes coming after are getting lost.
Has anyone faced similar issue?
Thanks,
Ankush
2020-11-24 05:44 AM
Well, then it's not set in circular mode. Read out and check/post CCR of this DMA channel.
JW
2020-11-24 06:13 AM
My mistake. For some reason Rx was initialized 2 times. once with circular and 2nd time with normal mode. I removed the normal mode initialization and it worked :) Thank you
2020-11-24 07:20 AM
Hi @ANaga.2 ,
see example repository for unknown RX data len: https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx
BrTM