- Power cycle (toggle PD#).
- Write to the active registers with the desired configuration and confirm the output clocks behave as expected.
- Commit active registers to SRAM by setting R171[6] (REGCOMMIT) to 1.
- Note: REGCOMMIT is auto-cleared to 0 when the transfer is completed.
- Enable EEPROM overlay by setting R20[7] (ROM_PLUS_EE) to 1.
- Unlock EEPROM by setting to R180 (NVMUNLK) to 234.
- In one transaction:
- Erase the contents of the EEPROM by setting R171[1] (NVMERASE) to 1.
- Initiate EEPROM programming to transfer the SRAM contents to EEPROM by setting R171[0] (NVMPROG) to 1.
- Note: Step 5 & 6 must be atomic (back-to-back) writes without any other register transactions in-between. Serial communication interruptions (such as access to other devices on the same bus) is also not allowed for successful EEPROM programming.
- Wait for EEPROM programming to finish by polling R171[2] (NVMBUSY) until cleared or wait about 500ms.
- Note: Do not power down, PD# toggle, or
continue to the next step until NVMBUSY is cleared
to have a successful EEPROM programming.
- Lock the EEPROM by setting NVMUNLK to 0.
- At the
next POR, if the EEPROM programming is successful,
the EEPROM program count, R16 (NVMCNT), increments
by 1. Also, if the EEPROM overlay bit is set, the
active registers are loaded from EEPROM.
Hex instruction list:
R171 0x00AB40 # Set REGCOMMIT
R20 0x001480 # Enable EEPROM OVERLAY
R180 0x00B4EA # UNLOCK EEPROM
R171 0x00AB03 # ERASE and PROGRAM SRAM contents to EEPROM
while(READ_REG(NVMBUSY) != 0) # NVMBUSY is located in 0xAB, bit 2
R180 0x00B400 # LOCK EEPROM