AnsweredAssumed Answered

EEprom writes unreliably - 9S08PT32

Question asked by LARRY MITSCHKE on Apr 26, 2014
Latest reply on Jul 25, 2014 by LARRY MITSCHKE



I am getting some bytes that do not write correctly in eeprom (some left blank at FF and some 00) when setting default values on first powerup.  I suspected the eeprom clock running too fast, but the FCLKDIV register is set per the data sheet:


Crystal  4Mhz

Bus Clk 2Mhz

NVM_FCLKDIV = 0X01   // for fclk of 1Mhz


Because it acts as if the clk is too fast, I set the FCLKDIV to 0X02 to slow it down.  Now it programs the eeprom all correctly, but I don't see this as a solution because I am worried about overstressing the eeprom over time.  Am I missing something that I have overlooked? 


I am using the Cosmic compiler and their library routines, and they have verified that the routines work correctly on their test setup.