2019-12-05 03:48 PM
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?
2019-12-09 08:37 AM
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".