cancel
Showing results for 
Search instead for 
Did you mean: 

DMA in circular mode CNDTR issue

ANaga.2
Associate II

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

3 REPLIES 3

Well, then it's not set in circular mode. Read out and check/post CCR of this DMA channel.

JW

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

Tilen MAJERLE
ST Employee

Hi @ANaga.2​ ,

see example repository for unknown RX data len: https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx

BrTM