cancel
Showing results for 
Search instead for 
Did you mean: 

MemManage_Handler fault with external loader

ssebikes
Visitor

I have spent several weeks trying to add an external loader for a TouchGFX application that is starting to get quite large (>2MB). We have a custom board with STM32H7A3 and are using OCTOSPI interface (in quad mode) to a W25Q128. I found a custom loader project Here that I've slightly modified to work with the MCU.

 

The resulting .stldr loader file works with STM32CubeProgrammer to read write and mass/sector erase the external memory at 0x90000000. Flashing the test project doesn't seem to work (based on UART debug output)

A simple demo project in CubeIDE branches to MemManage_Handler fault immediately when trying to memcmp() or memcpy() from 0x90000000 after calling HAL_OSPI_MemoryMapped().

Breakpoint in STM32CubeIDE shows that after the HAL_OSPI_MemoryMapped function is called, the data in external flash can be viewed in the Memory Monitor tab. Everything looks good.

It seems that the loader is good and the MemoryMapped function is working, so I'm not quite sure what to do at this point. I have attached my project just in case.

0 REPLIES 0