Can I exit bootloader mode even with option bits set to always start in bootloader mode?
I'm working on making a custom PCB using an STM32L5xx board field-updatable. To that end, I've configured the option bits according to pattern 12 from AN2606:
TZEN = 0, nBoot0(bit) = 0, nSWBoot0(bit) = 0, NSBOOTADD1[24:0] = 0x017F200.
With this setup, the microcontroller will always start and reset to bootloader mode, which I do think is a good thing for now. It should help protect against the a problem in application mode bricking the microcontroller and needing to use a debugger to fix it.
I've been using the NUCLEO-144 L552ZET6Q to test/debug this method. When the uC is in bootloader mode, the red and blue user LEDs turn on, and switching back to application mode will turn them off.
To switch to application mode, I've tried to use CubeProgammer CLI to start the application mode, which it does seem to do, only for it to be forced back into bootloader mode.
If I try to run this via USB DFU, it looks like it has the same effect, with the difference of there being an error in the DFU (likely the uC changing from DFU to CDC). When I run this command on both SWD and USB DFU, the red and blue LEDs turn off for a moment, then quickly turn back on.
Also, I've tried running the same command at a the address for main() and a few others to experiment, but that throws this error:
I don't have a lot of experience with switching between application and bootloader modes, so any advice is appreciated.
