2023-06-11 12:39 AM
Can anyone confirm whether my understanding of the following behaviour is correct (and whether there's any way round it):
When the built in bootloader has been entered by jumping to it from firmware (i.e. the BOOT0 pin is NOT pulled high), and the bootloader is then used to turn off memory read protection, the bootloader turns off protection (which forces a mass erase), and then does a reset.
If BOOT0 was pulled high, the bootloader would be re-entered, but since BOOT0 isn't pulled high, the MCU attempts to execute the (now blank) normal flash, so it crashes.
2023-06-11 01:57 AM
Some STM32s always jump to the built-in bootloader when the flash is erased, even if BOOT0 is low.
Which STM32 do you have?
2023-06-12 12:25 AM
Thanks for your reply.
I'm using 32F105 and 32F407.