cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find out when DMA FIFO is empty on STM32F446?

arnold_w
Senior II

I'm working with the STM32F446 microcontroller and I'm using UART with DMA. The size of my UART packets is contained in the 3rd and the 4th packet bytes and I would like to use FIFO on the receive stream to increase the likelihood for successfully reception. While receiving a packet, I get several IDLE interrupts from the UART and DMAx_StreamY->NDTR tells me how much I have received so far. My problem is that with FIFO enabled, the correct amount of bytes that have been transferred to my RAM buffer is 2-3 less than reported by DMAx_StreamY->NDTR. Is there a way to find out when the FIFO has been emptied?

2 REPLIES 2
arnold_w
Senior II

Never mind, it must be the DMA_SxFCR register (I don't seem to be able to delete this thread).

Yes, but' it's granularity is words, so that's not sufficient to exactly determine the number of bytes in it.

JW