Skip to main content
jensfichtner9
Visitor II
February 5, 2015
Question

STM32F07xx: Behaviour if internal flash is corrupted

  • February 5, 2015
  • 1 reply
  • 512 views
Posted on February 05, 2015 at 14:05

Hi all,

how does the STM32 behaves during a power-on start-up if the flash is corrupted?

Does it enters the boot mode again to try the USB DFU again, do I have to reanimate with a debugger, ... ?

This condition may be caused e.g. by a loss of power during an update process via USB DFU.

Any help is highly appreciated.

/cu Jens
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    February 5, 2015
    Posted on February 05, 2015 at 14:41

    It's going to enter code based on the state of the BOOTx pins.

    If the flash is corrupt, it's going to crash sooner or later. The processor reads junk, and ends up in a Fault Handler location.

    If you've flashed in a linear fashion, what you'd want to do is place tight code VERY close to the vector table, and have the ResetHandler placed and coded so it can validate your entire flash image before continuing. A checksum/crc failure could result in you jumping to the System Loader.

    The System Loader does not check your code. Nothing runs before your code starts.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..