2024-04-12 07:24 AM
Dear all.
I've implemented a M3 and M4 program ( drive a iLi display and 485 port) now I'm porting it to the H5 (H562RGTX).
One of the latest issue I'm facing is the jump from bootloader to application. In M3/M4 i used only LL, and the jump has no problem, simply work.
On H5 I must use HAL because of the flash (I must read&write: HAL is a must). But if the application use the HAL it crash (somewere). If I use LowLevel it work. (example with a simple led blinking).
Bootloader use HAL too, and I call HAL_DeInit() before jump (and disable all interrutp, device etc).
Why HAL don't work in application?
Thanks.
Solved! Go to Solution.
2024-04-12 07:47 AM - edited 2024-04-12 07:47 AM
Hello @TheRaprus , @
Is the vector table aligned with the bootloader address?
Do you set properly the SCB->VTOR?
Please have a look at this tutorial, this will help you on how to perform the jump directly from application code:
How to jump to system bootloader from application ... - STMicroelectronics Community
2024-04-12 07:47 AM - edited 2024-04-12 07:47 AM
Hello @TheRaprus , @
Is the vector table aligned with the bootloader address?
Do you set properly the SCB->VTOR?
Please have a look at this tutorial, this will help you on how to perform the jump directly from application code:
How to jump to system bootloader from application ... - STMicroelectronics Community
2024-04-12 09:07 AM
Hi Imen.D
I investigated in interrrupt vector table, because also any other interrupt (e.g. USART) crash it.
Re-type the "#define VECT_TAB_OFFSET 0x08020000UL" and now it work!
Probably some typo create the mistake.
Thanks for the help.
2024-04-12 09:11 AM
ST *really* needs to learn how to use symbols to assign the vector table address, that way one change in the linker script does the work, and doesn't require #defines in other files to be kept in sync and remembered.