2024-12-09 09:46 AM
I need to update ST based peripherals, due to constraint of wiring and flash size, I may not be able to connect BOOT pin or make a custom bootloader on the peripherals. I am planning to implement ST's boot protocol on host side, and add a command to tell the peripheral to reboot into sys BL (0x1f000000). I did a quick try but it fall into a hard fault after set_MSP and jump. So is it even possible to jump to system BL without asserting BOOT pin and RESET?
2024-12-09 09:52 AM
It is generally possible, not always successful if there are other dependencies / expectations.
I've shown how to do this on STM32F407 type devices.
The vector table is not executable code, it's a table pointing to code and initial stack pointer. You can't have interrupts disabled, and you can't have watchdogs enabled into code that's not kicking it, for example.
You can remap the SYSTEM ROM, typically via SYSCFG, then SP, PC will be at zero, and you can use that to transfer control
2024-12-09 11:02 AM
Not possible with F042, possible with most of other MCUs. There were few threads on this topic in the forum and in Knowledge base section - just look at them, there is no point in repeating the obvious things. AN2606 is the obligatory reading for a start.