用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.
Kailyn Chen:
在配置EEPROM之前,首先要把data写到SRAM中,按照datasheet 10.5.4.中的步骤。The following details the programming sequence to transfer the device registers into the appropriate SRAM page.1. Program the device registers to match a desired setting.2. Write R145[3:0] with a valid SRAM page (0 to 5) to commit the current register data.3. Write a 1 to R137.6. This ensures that the device registers are copied to the desired SRAM page.4. If another device setting is desired to be written to a different SRAM page, repeat steps 1-3 and select an unused SRAM page.另外,按照10.5.5 Write EEPROM步骤完成之后,有没有回读下R136和R137.5.回读的结果是R136加1,R137.5=0. 您的结果是这样的吗?
user4086787:
回复 Kailyn Chen:
您好,我们读出来的R136=1没有加1,R137.5=0,请问一下,这个是什么原因啊??多谢,请指导一下。很急
user4086787:
回复 Harold Zou:
请问一下,这个datasheet P111 "EEPROM map"该怎么操作,具体注意哪些呢??
''The on-chip SRAM is a volatile, shadow memory array used to temporarily store register data, and is intendedonly for programming the non Volatile EEPROM array with one or more device start-up configuration settings(pages). The SRAM has the identical data format as the EEPROM map. The register configuration data can betransferred to the SRAM array through special memory access registers in the register map''
这个是不是说明,配置寄存器写入SRAM时格式可以内部自己转化为format as the EEPROM map.。配置文件已经生成了。我们还需要关注这个吗??
user4086787:
回复 Harold Zou:
我硬件上是GPIO[3:2]=HH,就是page 5吧