HI,our product use the s08dz eerpom to store the can id. And before the product leaves the factory,we test the prodcut ,and the eeprom work normal.After a few months,some product CAN id is modified ,We sure our code didn't write and modify the id data in the eeprom.
Can you help me What causes the EEPROM to be modified?
Sounds like a wrong FCDIV setting. Even if you calculate divider properly, FCDIV is write once register. See in the docs:
This means that FCDIV has to be written all bits simultaneously. 2nd write is ignored. For example
FCDIV.PRDIV8 = 1;
FCDIV.DIV = 7; // ignored
will lock FCDIV.PRDIV8 == 1, FCDIV.DIV == 0 (power on default). And
FCDIV.DIV = 5;
FCDIV.PRDIV8 = 1; // ignored
will lock DIV==5, PRDIV8 = 0
HI, Karpicz
the FCDIV was written all bits simultaneously.And i sure that the data was written to the EEPROM correctly(because Most of the times the data is read correctly),but sometimes i read the data was wrong after the power-reseet, what could cause a read failure after a power-on reset?(Undervoltage?or other reasons)
OK, then what‘s your bus clock and FCDIV setting? Are you sure bus clock is as expected while you program your settings? Isn‘t it that FCDIV is for PLL engaged, which is actually not engaged, or opposite, FCDIV for PLL off but actual fbus=fpll?
Also, are you sure the problem is in EEPROM and not some unexpected variable overwrite?
I‘ve no problems using S08DZ EEPROM.
Edward
OK, then what‘s your bus clock and FCDIV setting? Are you sure bus clock is as expected while you program your settings? Isn‘t it that FCDIV is for PLL engaged, which is actually not engaged, or opposite, FCDIV for PLL off but actual fbus=fpll?
Also, are you sure the problem is in EEPROM and not some unexpected variable overwrite?
I‘ve no problems using S08DZ EEPROM.
Edward