richieqianle
richieqianle

Reputation: 632

STM32 DMA(concurrent stream, FIFO, burst mode,double buffer)

The DMA for stm32F4 series has some advanced functions, could I ask for clarification here?

Four-word depth 32 first-in, first-out memory buffers (FIFOs) per stream

What does that mean? How many data can be stored in the FIFO? 4 or 4*32?

Double-buffer type transactions: double buffer transfers using two
memory pointers for the memory (while the DMA is reading/writing
from/to a buffer, the application can write/read to/from the other
buffer). -----From reference manual of STM32F4

My question is: During the DMA transmission, the AHB bus is not available for Cortex M4, how could the application read from the other buffer?

Upvotes: 4

Views: 11423

Answers (1)

richieqianle
richieqianle

Reputation: 632

After doing some research, here is what I found, in case someone may need it.

  • concurrent stream: Not possible within one DMA. Possible to have DMA1, DMA2 running concurrently. E.g: F427 can do simultaneously:

    • CPU access to Flash (reading code)
    • DMA1 access to SRAM (to transfer some buffer)
    • DMA2 access to SDRAM (another buffer)
  • FIFO is used to store data temporarily from Low speed device. When a certain amount of data have been accumulated, a burst could be sent, to save resource of AHB. Since when AHB is used by DMAC, it cannot be used by processor. FIFO has 4*32 bit size. It can be configured as 16*8 bit (16*0ne byte).

  • Burst mode: A chunk of data are sent continuously from, say FIFO to, say memory. The AHB will only be occupied when burst is being sent. Burst mode is used to save resource of AHB. IT IS NOT RELATED WITH THE 65535 DATA SIZE LIMITATION.
  • Double buffer: As is said before, AHB is only occupied when data is being transferred. Therefore, processor can still fetch data from memory when DMA is not occupying the AHB.

Upvotes: 11

Related Questions