26.4.2.4 Preventing Flash Corruption
During periods of low VDD, a Flash write or erase can cause memory corruption if the supply voltage is too low for the CPU and the Flash to operate properly. These issues are similar to those encountered in board-level systems using Flash. The internal or external Brown-out Detector (BOD) is recommended to ensure that the operating voltage is high enough.
Two circumstances may cause Flash corruption when the voltage is too low:
- A regular write sequence to the Flash, which requires a minimum voltage to operate correctly.
- The CPU can execute instructions incorrectly when the supply voltage is too low.
Attention: Taking the following
measures may avoid Flash corruption:
- Keep the device in Reset during periods of insufficient power supply voltage. Do this by enabling the internal BOD.
- The Voltage Level Monitor (VLM) in the BOD can be used to prevent starting a write to the Flash close to the BOD level.
- If the detection levels of the internal BOD do not match the required detection level, an external VDD Reset protection circuit can be used. If a Reset occurs while a write operation is ongoing, the write operation will be aborted.
