cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F07xx: Behaviour if internal flash is corrupted

jensfichtner9
Associate
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
1 REPLY 1
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 Venmo
Up vote any posts that you find helpful, it shows what's working..