7.3.16.1.2 EEPROM Programming Procedure
For programming the EEPROM, the EEPROM is organized in 16 pages of eight bytes each. Write to the 8-byte EEPROM cache to program the EEPROM memory cells. Select the EEPROM memory page to transfer the contents of the EEPROM cache.
- Write the upper four bits of the 7-bit EEPROM address to the EEPROM_PAGE_ADDRESS register to select the EEPROM page.
- Write to the EEPROM_CACHE register to load the 8-byte EEPROM cache. Note that all eight bytes must be loaded into the EEPROM_CACHE register.
- Set the ERASE_AND_PROGRAM bit in the EEPROM_CTRL register. Setting this bit automatically erases the selected EEPROM memory page and programs it with the contents of the EEPROM_CACHE register. Alternatively, the user can write 1 to the ERASE bit in the EEPROM_CTRL register to erase the selected EEPROM memory page, and then write 1 to the PROGAM bit in the EEPROM_CTRL register once the erase is complete. The status of the erase and program operations can be monitored through the EEPROM_STATUS register.