Skip to main content
Explorer II
September 26, 2023
Solved

STM32L4 Series: Using DMA to copy from Flash to SRAM

  • September 26, 2023
  • 2 replies
  • 2078 views

Hi there,

Looking into the TRM for the STM32L412xx board, I was wondering if I could use a DMA to copy constant data from the Flash to SRAM. The system architecture block diagram connects the DMAs to Flash through the DCode path:

raz3l_0-1695754021625.png

However, while reading the document it is explicit mentioned this for the DMA bus:

This bus connects the AHB master interface of the DMA to the BusMatrix.The targets of this bus are the SRAM1 and SRAM2, the AHB1 peripherals including the APB1 and APB2 peripherals, the AHB2 peripherals and the external memories through the QUADSPI.

This got me confused. Can someone explain these details? Is it possible or not to read from Flash using the DMAs, and if not, why is the DMA seems to be connected to the embedded Flash through the DCode path?

    This topic has been closed for replies.

    2 replies

    TDKAnswer
    Super User
    September 26, 2023
    raz3lAuthor
    Explorer II
    September 27, 2023

    Thanks for the clarification!

    Graduate II
    September 26, 2023

    Hello @raz3l 

    DMA can be use to send data to the SRAM to the flash. You can find here an exemple for the STM32L412kb-Nucleo.

    Best regards.

    II