Skip to main content
arnold_w
Senior II
April 2, 2019
Question

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

  • April 2, 2019
  • 2 replies
  • 583 views

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?

This topic has been closed for replies.

2 replies

arnold_w
arnold_wAuthor
Senior II
April 2, 2019

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

waclawek.jan
Super User
April 2, 2019

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

JW