Jumping from app to own bootloader without reset - good idea? How/when?
Hello,
I have a STM32L0x2 (M0+ core) project where, so far, I used to jump from the MCU app to my custom bootloader for updating the app in flash with a new program binary image, by setting flags in the backup registers and doing a SysReset.
Now, that MCU is controlling something bigger, which actually sends the firmware to it.
While there is a design to be able to hold the power-enable of that bigger SOC when this SysReset (floating MCU pins) happens, there seems to be a design flaw making this somewhat glitchy.
I went this route of resetting because it seemed a no-brainer: everything is clean again.
Would it be feasible, though, to jump to the bootloader, from the app, without doing that, and de-init'ing *almost* everything - except that one GPIO pin that does the power-enable?
I faintly remember some text saying that you *have to* de-configure absolutely everything before doing things like changing VTOR, I can't find it again nor remember why.
But if there was a way to do this and be absolutely sure that the bootloader starts off with a clean system - except the configuration of that one GPIO which needs to remain an output and "HI" for the whole time, that would help with this.
(this was my first custom bootloader, so I'm a bit rusty on the details already again!)
