EEPROM corruption

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am running a program on the tiny15 that continually reads a value from the eeprom address. After a while the data in this address for some reason is reset to FF. I am not writing to this EEPROM address in my program. Only this one address seems to be getting corrupted. Is this a common problem, or could it just be a bad IC?

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you reading address 0, this can get trashed at power up.

Patrick

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, it was address 0, should I not use that address for storage?

-Darren

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
Adress 0 should not be used. I heard about this in a other Forum. I can´t remember why but I know that this byte shouldn´t be used.
Regards

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using address 0 of the EEPROM is indeed not too good an idea. The reason for this is the following (taken from the 2313's errata sheet, but this goes for most if not all AVRs):

Reset During EEPROM Write:
If reset is activated during EEPROM write the result is not what should be expected. The EEPROM write cycle completes as normal, but the address registers are reset to 0. The result is that both the address written and address 0 in the EEPROM can be corrupted.

Problem Fix/Workaround:
Avoid using address 0 for storage, unless you can guarantee that you will not get a reset during EEPROM write.

Cheers,
Jan Martin Wagenaar

admin's test signature