Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are some addresses of the EEPROM corrupted (usually address zero)?

0
Posted

Why are some addresses of the EEPROM corrupted (usually address zero)?

0

The two most common reason for EEPROM corruption is either writing to the EEPROM beyond the datasheet endurance specification, or resetting the AVR while an EEPROM write is in progress. EEPROM writes can take up to tens of milliseconds to complete. So that the CPU is not tied up for that long of time, an internal state-machine handles EEPROM write requests. The EEPROM state-machine expects to have all of the EEPROM registers setup, then an EEPROM write request to start the process. Once the EEPROM state-machine has started, changing EEPROM related registers during an EEPROM write is guaranteed to corrupt the EEPROM write process. The datasheet always shows the proper way to tell when a write is in progress, so that the registers are not changed by the user’s program. The EEPROM state-machine will always complete the write in progress unless power is removed from the device. As with all EEPROM technology, if power fails during an EEPROM write the state of the byte being written is undef

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123