Prevention of Data Corruption in ST6 On-Chip EEPROM
The ST6 Microcontroller has been designed to avoid any potential corruption of data
programmed into its on-chip EEPROM (when available). Data integrity can be ensured as long
as the application designer follows the guidelines provided in this note.
In general, EEPROM data corruption occurs whenever the reset signal is not controlled when
the power supply goes up or down.
This is particularly true with a slow ramp-up and/or slow fall time of the power supply, since the
device may be in a supply voltage area where the device functionality is not guaranteed for a
If no special care is taken during the power up sequence regarding the reset signal then the
microcontroller core may start writing into the EEPROM. The same behaviour may occur upon
a power down.
Two complementary solutions are possible to prevent from these unwanted actions, a
software solution and a hardware solution.
1 SOFTWARE SOLUTION
This solution only applies to the power down sequence which represents the majority of data
The solution consists in disabling the enable bit of the EEPROM control register after writing
into the EEPROM and before switching ”off” the application; this avoids any spurious writing
as described above.
Note that this bit is automatically reset upon power on, thus the reason why most cases of
data corruption can occur at power down, as the enable bit may have been modified by the
AN671 / 02,94