cancel
Showing results for 
Search instead for 
Did you mean: 

Jump to application failed with STM32F429IG

Junde
Senior II

Hi guys:

I had a project with a bootloader and an application, let me call them "BT1" and "APP1".

I want to rewrite the "APP1" and already done, let me call the new app "APP2".

Now the "BT1" can jump to "APP1", but can't jump to "APP2", I am sure the app address is the same.

So I rewrote the "BT1" also, called "BT2". Amazing, the "BT2" jumps to "APP2" normally.

I don't know actually why "BT1" to "APP1" and "BT2" to "APP2" is OK, but "BT1" to "APP2" or "BT2" to "APP1" failed.

I check the bin file of "APP1" and "APP2" as below:

(We can see both the APP start addresses are 0x08010000, and I also checked the Reset_Handler start address with the map file)

Junde_0-1697425836649.png

Now, I want some help with why it happened, what should I try next, or how to debug this issue.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Junde
Senior II

This issue is over:

The reason is easy: because the clock config in the project "BT1" is different from the project "APP2"!

But I am a little curious, we already reinitialized the clock in "APP2" which is generated by stm32CubeMx, why should the clock config remain the same between the bootloader and application?

View solution in original post

5 REPLIES 5
Junde
Senior II

Sorry for forgetting the important info:

MCU: STM32F429IGH6

IDE and compiler: MDK-ARM

Junde
Senior II

Now I try to debug the solution "BT2" to "APP1", and the jump is OK, but after some function call, the process is stopped at the hardfault_handler()...

Junde
Senior II

finally, I traced to here:

(the error happened at function HAL_RCC_OscConfig() in stm32f4xx_hal_rcc.c )

Junde_0-1697435837471.png

 

Junde
Senior II

In following 3 "if" will return HAL_ERROR:

Junde_0-1697448865249.png

 

Junde
Senior II

This issue is over:

The reason is easy: because the clock config in the project "BT1" is different from the project "APP2"!

But I am a little curious, we already reinitialized the clock in "APP2" which is generated by stm32CubeMx, why should the clock config remain the same between the bootloader and application?