7.5.2.1.2 EEPROM Programming Procedure
The EEPROM is organized in 16 pages of eight bytes each. The EEPROM memory cells are programmed by writing to the 8-byte EEPROM cache. The contents of the cache is transferred to the EEPROM memory cells determined by the EEPROM memory page in the following way:
- Write the 4-bit EEPROM page to the ADDR[3:0] bits in the EEPROM_PAGE_ADDRESS register to select the EEPROM page to write to.
- Load the 8-byte EEPROM cache by writing to the EEPROM_CACHE register space using one of two methods:
- The OWI EEPROM cache burst-write command to write the complete EEPROM cache in a single OWI frame.
- Eight individual OWI write operations to addresses 0x80 to 0x87 in the control and status register page 5. All eight bytes must be loaded into the EEPROM_CACHE register.
- Read back the EEPROM cache as an optional sanity check to verify that the EEPROM cache is written correctly by reading the EEPROM_CACHE register space using one of two methods:
- The OWI EEPROM cache burst-read command to read the complete EEPROM cache in a single OWI frame.
- Eight individual OWI read operations from addresses 0x80 to 0x87 in the control and status register page 5.
- Set the ERASE_AND_PROGRAM bit in the EEPROM_CTRL register. Setting this bit automatically erases the selected EEPROM memory page and programs the page with the contents of the EEPROM_CACHE register. Alternatively, the contents of the EEPROM memory page can be erased by writing 1 to the ERASE bit in the EEPROM_CTRL register, followed by writing 1 to the PROGAM bit in the EEPROM_CTRL register when the erase operation is complete. The status of the erase and program operations can be monitored through the EEPROM_STATUS register.