Skip to main content
craig.sacco
Associate
July 1, 2019
Question

STM32F407 - Unable to load SystemInit() address into R0

  • July 1, 2019
  • 0 replies
  • 765 views

I have a weird problem with one of the boards that I am trying to flash with a custom boot loader.

Consider the following snippet:

Reset_Handler
 LDR R0, =SystemInit
 BLX R0

Most people will recognises it as being the first two instructions (in most applications) after loading SP and PC from the vector table.

On one board, the address for R0 is loaded with the address pointing to SystemInit() before it branches indirectly to it:

0690X000009YDeXQAW.png

On another board, R0 stays at 0x00000000, and will eventually hard-fault:

0690X000009YDecQAG.png

I checked the option bytes and micro controller and the two appear to be similar in revision and option byte setting.

Has anyone ever experienced this issue before; and if so, any hints on remedying it?

This topic has been closed for replies.