Skip to main content
TypeKazt
Associate II
September 28, 2020
Solved

DMA issues with dual-core STM32H745

  • September 28, 2020
  • 3 replies
  • 1298 views

I'm currently using the dual-core STM32H745, and am trying to utilize DMA's on both cores to R/W to/from shared memory. DMA's are only successful on the M4 cores, and always yield a DMA Transfer Error. I haven't done anything to modify the initialization of the DMA peripherals between cores (Cube by default initializes all the DMA's selected on both cores).

This topic has been closed for replies.
Best answer by Bowman32

Hi @TypeKazt​ 

DMA can't access to DTCM SRAM. It is the product architecture, only MDMA have access to DTCM RAM.

By default in CubeMx the RW data are located in DTCM RAM. if you declare a buffer, and give its address as a parameter to DMA, the transfer will fails.

D2SRAM, D3SRAM or AXISRAM can be used for DMA transfers.

For more details about memory and bus architecture you can refer to section 2 of RM0399 Rev 3

3 replies

Bowman32
Bowman32Best answer
ST Employee
September 30, 2020

Hi @TypeKazt​ 

DMA can't access to DTCM SRAM. It is the product architecture, only MDMA have access to DTCM RAM.

By default in CubeMx the RW data are located in DTCM RAM. if you declare a buffer, and give its address as a parameter to DMA, the transfer will fails.

D2SRAM, D3SRAM or AXISRAM can be used for DMA transfers.

For more details about memory and bus architecture you can refer to section 2 of RM0399 Rev 3

TypeKazt
TypeKaztAuthor
Associate II
September 30, 2020

I did allocate space in D2SRAM in the linker and assign a buffer the memory attribute, but it was still failing. Could there be some conflict caused between the two cores both initializing the same DMA? Alternatively, I haven't tried using the MDMA peripheral for MEMTOMEM transfers, so I suppose I can try that as well.

TypeKazt
TypeKaztAuthor
Associate II
October 1, 2020

Thanks @Bouraoui Chemli​ , the MDMA works fine on the M7.

A related question would be whether the performance of the MDMA and DMA for MEMTOMEM writes is identical. The assumption being that if two DMA's access the same buffer it will prevent a race condition/memory corruption from ever occurring since they have the same peripheral clock. It's difficult to infer this from the reference manual based on the different architecture of the peripherals.