Skip to main content
Microman
Associate III
December 5, 2019
Question

STM32H7 - start a RAM image

  • December 5, 2019
  • 1 reply
  • 612 views

Hi all,

I would like to boot a RAM image. A simple bootloader in flash reads in a linear binary from external spi flash. The RAM image works fine if I load it directly to (AXI)RAM (with JTAG).

But when loaded by the boot loader, it does not work (loops somewhere in assembly codes). No execption btw. I also check with CRC that the image is identical to the bin file.

When the image is loaded, I jump into ot with this code:

CPSID i

LDR    SP, [#0x24000000, #0x0]

LDR    R0, [#0x24000000, #0x4]

BX     R0

The code in the image relocates irq table to AXI RAM and enables IRQs later again.

Is there some example how to properly prepare the MCU before jumping into this code?

This topic has been closed for replies.

1 reply

Microman
MicromanAuthor
Associate III
December 9, 2019

Finally, I found out how to perform a simple reboot into AXI RAM code:

 HAL_SYSCFG_CM7BootAddConfig(SYSCFG_BOOT_ADDR0, 0x24000000);

 NVIC_SystemReset(); 

The external BOOT pin mus be tied to ground in this case as we change boot address "0".