cancel
Showing results for 
Search instead for 
Did you mean: 

Please Help me how to use the FIFO in stm32 MCU usart

Sprak.11
Associate II

here in cubemx there is a option called FIFO , please help me how to use the option in your code. If there is any tutorial or study (or) reference materials please kindly share that also.

0693W000004IVCoQAO.png

3 REPLIES 3

In general it is pretty transparent.

Where things are subtly different is being aware it has depth greater than One, so you'd use while(TXE==1) rather than if (TXE == 1) type constructs.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Not applicable

1.1.9 DMA FIFO mode

Each stream has an independent 4-word (4 * 32 bits) FIFO and the threshold level is software-configurable between 1/4, 1/2, 3/4 or full.

The FIFO is used to temporarily store data coming from the source before transmitting them to the destination.

DMA FIFO can be enabled or disabled by software; when disabled, the Direct mode is used.

If DMA FIFO is enabled, data packing/unpacking and/or Burst mode can be used.

The configured DMA FIFO threshold defines the DMA memory port request time.

The DMA FIFOs implemented on STM32F2/F4/F7 devices help to:

• reduce SRAM access and so give more time for the other masters to access the bus matrix without additional concurrency,

• allow software to do burst transactions which optimize the transfer bandwidth,

• allow packing/unpacking data to adapt source and destination data width with no extra DMA access.

Source: AN4031 Application note Using the STM32F2, STM32F4 and STM32F7 Series DMA controller 

https://www.st.com/resource/en/application_note/dm00046011-using-the-stm32f2-stm32f4-and-stm32f7-series-dma-controller-stmicroelectronics.pdf