Question about the S08DZ EEPROM

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about the S08DZ EEPROM

207 Views
Contributor II

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?

0 Kudos
4 Replies

Senior Contributor IV

Sounds like a wrong FCDIV setting. Even if you calculate divider properly, FCDIV is write once register. See in the docs:

  •   "Bit 7 of this register is a read-only flag. Bits 6:0 may be read at any time but can be written only one time."

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

0 Kudos

Contributor II

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)

0 Kudos

Senior Contributor IV

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

0 Kudos

Senior Contributor IV

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

0 Kudos