用code loader生成的寄存器值,按照datasheet所说的一下步骤写了但是掉电还是会丢失,请教如果正确写到eeprom里面?用的是5th pages
10.5.5 Write EEPROM
The on-chip EEPROM is a non-volatile memory array used to permanently store register data for one or more
device start-up configuration settings (pages), which can be selected to initialize registers upon power-up or
POR. There are a total of 6 independent EEPROM pages of which each page is selected by the 3-level
GPIO[3:2] pins, and each page is comprised of bits shown in the EEPROM Map. The transfer must first happen
to the corresponding SRAM page and then to the EEPROM page. During “EEPROM write”, R137.2 is a 1 and
the EEPROM contents cannot be accessed. The following details the programming sequence to transfer the
entire contents of SRAM to EEPROM:
1. Make sure the Write SRAM procedure (Write SRAM) was done to commit the register settings to the SRAM
page(s) with start-up configurations intended for programming to the EEPROM array.
2. Write 0xEA to R144. This provides basic protection from inadvertent programming of EEPROM.
3. Write a 1 to R137.0. This programs the entire SRAM contents to EEPROM. Once completed, the contents in
R136 will increment by 1. R136 contains the total number of EEPROM programming cycles that are
successfully completed.
4. Write 0x00 to R144 to protect against inadvertent programming of EEPROM.
5. If an EEPROM write is unsuccessful, a readback of R137.5 results in a 1. In this case, the device will not
function correctly and will be locked up. To unlock the device for correct operation, a new EEPROM write
sequence should be initiated and successfully completed.