STM32MP15 DMA

来自百问网嵌入式Linux wiki


Article purpose

The purpose of this article is to explain STM32MP15 DMA topology and the associated configurations recommended by ST.

STM32MP15 DMA topology

STM32MP15 owns 3 DMA instances:

  • 1 MDMA internal peripheral dedicated to transfers between some internal peripherals and external memories (DDR) and between internal and external memories.
  • 2 DMA internal peripheral (DMA1/DMA2) dedicated to transfers between internal peripherals and internal SRAM. These two DMA instances are coupled with a DMAMUX internal peripheral in charge of routing internal peripheral requests to DMA channels.
Info.png Transfers between internal peripherals and DDR, via DMA1/DMA2, are possible but not recommended for high-bandwith or latency-critical transfers

The following figures show the different DMA configuration available on STM32MP1 and the associated request and data connections. <securetransclude src="ProtectedTemplate:ReviewsComments" params="-- Gerald Baeza (talk) 14:53, 11 February 2020 (CET)<br />Figures to be inserted"></securetransclude>{{#set:Has reviews comments=true}} For more information about the DMA controllers above and to know the DMA configuration that should be used with each internal peripheral, please refer to STM32MP15 reference manuals.

ST Recommandations

For Cortex-M4 execution context

Cortex-M4 access by default internal SRAM for code and data.
In this context, DMA transfers will operate only between peripheral and internal SRAM.
That's why ST recommends to dedicate one DMA internal peripheral to Cortex-M4.

For Cortex-A7 secure execution context

Cortex-A7 secure firmware is located in SYSRAM (both code and data). As the internal peripherals and the SYSRAM associated to the Cortex-A7 secure context are also secure, the MDMA must be used to support transfers between them because it is secure aware.

Cortex-A7 non-secure execution context

Cortex-A7 non-secure firmware is mainly located in external memory (DDR). In consequence, DMA transfers will operate between peripherals and DDR. But as the different internal peripherals don't have the same requirements in term of bandwidth, real time and flow control, customer will have to use one of the three DMA configuration described in STM32MP15 DMA topology. To ease the selection, the following table sums up possible choices for each peripheral and highlight the recommended configuration. Note that this configuration is set by default in STM32MP15 device tree (dtsi). <securetransclude src="ProtectedTemplate:ReviewsComments" params="-- Gerald Baeza (talk) 14:51, 11 February 2020 (CET)<br />Table to be added"></securetransclude>{{#set:Has reviews comments=true}}

ST reference boards default configuration