The EEPROM array is non-volatile memory mapped directly from the SRAM array.
After the register settings have been written to the SRAM (by either Method #1 or #2), the EEPROM can be programmed through the following sequence:
- Write 0xEA to R164 (NVMUNLK). This unlocks the EEPROM to allow programming.
- Write 0x03 to R157 (NVM_ERASE_PROG bits). This programs the EEPROM from the entire contents of the SRAM. The total erase/program cycle takes approximately 230ms.
- NOTE: Steps 1 and 2 must be atomic writes without any other register
transactions or I2C interruptions in between. Writing to
another I2C device in between these steps cause the
EEPROM write sequence to fail.
- Poll R157[2] (NVMBUSY bit) or provide an open-loop delay. When this bit is cleared, the EEPROM programming is complete.
- Write 0x00 to R164. This locks the EEPROM to protect against inadvertent programming.
On the next power up or hard-reset, the device can
self-start in EEPROM mode from the newly programmed configuration. Also, the NVMCNT
register value is incremented by 1 after power up or hard-reset to reflect total
number of EEPROM programming cycles completed successfully.