10.3.3 Preventing Flash/EEPROM Corruption
A Flash/EEPROM write or erase can cause memory corruption if the supply voltage is too low for the CPU and the Flash/EEPROM to operate correctly. These issues are the same on-board level systems using Flash/EEPROM, and it is recommended to use the internal or an external Brown-out Detector (BOD) to ensure that the device is not operating at too low voltage.
- A regular write sequence to the Flash, which requires a minimum voltage to operate correctly.
- The CPU itself can execute instructions incorrectly when the supply voltage is too low.
The chip erase does not clear fuses. If the BOD is enabled by fuses before starting the Chip Erase command, it is automatically enabled at its previous configured level during the chip erase.
Refer to the Electrical Characteristics section for Maximum Frequency vs. VDD.
- Keep the device in Reset during periods of an 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 EEPROM 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.