2020-03-24 12:04 PM - last edited on 2025-03-13 11:27 AM by Andrew Neil
EEPROM Question: Why does EEPROM erase when resetting from BOR?
STM32L051 EEPROM unlocks, reads, erases, writes and locks successfully.
EEPROM contents are maintained through normal operating voltage and down to BOR threshold of 2.3 volts.
A reset caused by BOR causes all but six words of EEPROM to erase to 0x00000000. A software reset with "NVIC_SystemReset();" is OK. EEPROM contents are retained, as expected.
2020-03-26 3:20 PM
I found the problem. There was a subtle timing issue with the "losing power" firmware and the startup firmware following a reset. (The product has a super-cap to allow the microcomputer to generate audio and visual "loss of AC power" alarms.)