This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32L4: Bootloader Jump to App fails depending of optimization level

Hello,

I am trying to write a bootloader for STM32L496(ZGT) and I am pretty new to ARM and RTX.
The Bootloader works over USB HID and uses RTX5 (RTOS 2).
I use µVision V5.36 with compilter V6.16 (With AC5 like warnings).

I encounter a strange behavior.
If I use optimization level o0 my Jump function "failes". I jump but get stuck in the main app. As far as I know at some point where some IRQ should be disabled.
If I use level o1 it jumps.

My Jump funcion:

Maybe anyone has an idea why it get stucks?

Thanks Stefan

0