2025-11-26 8:26 AM
I have noticed that in my Application project there is no SystemClock_Config() generated by CubeIDE so my guess is that these settings should be inherited from Boot stage. If that is the case, should I also not initialize XSPI interfaces, memories and memory mapped modes if they are also initialized in Boot stage?
Solved! Go to Solution.
2025-11-26 1:31 PM - edited 2025-11-29 9:46 AM
Yes. Everything initialized by the bootloader will be in the same state when you jump to the application. You should generally only initialize things once, in this case the bootloader.
Alternatively, you can de-initialize everything before making the jump and re-initialize it in the application.
Edit: Also want to note that anything relying on interrupts will need to be disabled as the vector table will surely change between bootloader and application and location of variables is not the same between the two. This includes SysTick.
2025-11-26 1:31 PM - edited 2025-11-29 9:46 AM
Yes. Everything initialized by the bootloader will be in the same state when you jump to the application. You should generally only initialize things once, in this case the bootloader.
Alternatively, you can de-initialize everything before making the jump and re-initialize it in the application.
Edit: Also want to note that anything relying on interrupts will need to be disabled as the vector table will surely change between bootloader and application and location of variables is not the same between the two. This includes SysTick.
2025-11-27 7:48 AM
So I will delete even HAL_Init() which CubeIDE automaticaly put there, leave there only initialization of periherals which weren't initialized at Boot stage and handle the transition as normal function call, right?
2025-11-27 10:06 AM
Wrong, the application's HAL must be stared properly. Jump to the application before anything is initialized in the bootloader, as discussed multiple times during past 2 weeks on this forum. Got through reset, use some flag in RTC/backup registers.