Skip to main content
Visitor II
June 11, 2023
Question

Crash when using bootloader to turn off protection

  • June 11, 2023
  • 2 replies
  • 855 views

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.

    This topic has been closed for replies.

    2 replies

    Super User
    June 11, 2023

    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_Author
    Visitor II
    June 12, 2023

    Thanks for your reply.

    I'm using 32F105 and 32F407.