cancel
Showing results for 
Search instead for 
Did you mean: 

DMA from SRAM to SRAM hanging in the M4 core

ATringali
Associate II

Hi everybody,

I have generated an STM32 project via the STM32CubeIDE and modified the large example buffer (the firmware logic analyzer part), trying to substitute to the timer generated DMA transfer a second stream from SRAM to SRAM.

In the next future I would like to attach a memory to the FMC bus (M4 side) and use DMA to transfer from that memory into the SRAM, and from the SRAM into the DDR. In the meantime I would like to simulate that using an SRAM to SRAM transfer.

I try to run the attached code (main.c), but the first DMA transfer from SRAM to SRAM when I start the request in function StateMachine() through an 'S' command (HAL_DMA_Start_IT()) seems to hang. I see the "before" log at line 302, but not the "after" at line 315.

I cannot manage to attach to the M4 core when running using the integrated debugger, and the STM32CubeProgrammer says that reading registers is not supported yet for STM32MP1. I had some years ago experience with another STM32 microcontroller, so I guess I am doing something unconventional for this new (for me) architecture.

Could someone of you please point me to the right direction?

Thank you in advance,

Antonio

This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
ATringali
Associate II

I answer to myself.

From section 18.3.17 (Summary of the possible configurations) it would seem that DMA memory-to-memory transfers require a source AHB peripheral port and a destination AHB memory port. So it is not possible to transfer from SRAM to SRAM, just from an external memory.

The transfer immediately generated a bus fault, so it was stuck in the while(1) { } NMI handler, with MMFAR/BFAR registers assuming values equal to the end of FIFO values to transfer.