2019-04-02 05:42 AM
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?
2019-04-02 06:01 AM
Never mind, it must be the DMA_SxFCR register (I don't seem to be able to delete this thread).
2019-04-02 12:58 PM
Yes, but' it's granularity is words, so that's not sufficient to exactly determine the number of bytes in it.
JW