4

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

  • Concurrent stream: Can two streams transmit data at the same time? Since one byte transfer is allowed. If the bus width is 32bit, 4 concurrent transmission is possible. Btw, what is the width of the AHB bus for STM32?

  • FIFO mode: If concurrent transmission is not possible, I guess FIFO could be used here. FIFO would help to wait data ready from low speed peripherals to DMA without occupying the AHB bus. When a certain amount of data are ready, the chunk of data will be sent to memory together. Is my understanding correct?

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?

  • Burst mode: What does actually burst mode do? It says in datasheet that 65535 data can be transmitted. What is the relation between 65535 with the burst mode?

  • Double buffer mode:

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?

1 Answer 1

11

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.
1
  • Note: Double buffer in both transfer mem0 and mem1 AHB will being occupied, no matter you use single or doble buffer the AHB will occupy, on each transfer. double buffer just alternate two memory space to occupy mem0 mem1, am I right? Also question about burst: Only during burst the AHB will occupy? without burst, I mean with single burst, again bus will be occupied, what the advantage? Oct 18, 2022 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.