cancel
Showing results for 
Search instead for 
Did you mean: 

Crash when using bootloader to turn off protection

s_
Associate III

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.

2 REPLIES 2
Pavel A.
Evangelist III

Some STM32s always jump to the built-in bootloader when the flash is erased, even if BOOT0 is low.

Which STM32 do you have?

s_
Associate III

Thanks for your reply.

I'm using 32F105 and 32F407.