EEprom corruption on Arduino UNO

Hey guys,

Here on the forum there are several cases of eeprom memory corruption, mainly in the Arduino Uno (atmega328p).

In some cases, random values ​​or ff are displayed in some eeprom addresses.

I would like a comprehensive discussion of these cases.

First of all, has anyone ever had this problem and how did they solve it?

And what causes this problem? Is it in the power supply, electrical noise?

And what can be done at the software and hardware level to avoid this problem?

And the BOD should be disabled or enabled at what voltage level to reduce this problem?

Please provide links to reports of this problem on the forum

Most reported problems with EEPROM turn out to be misunderstandings of how many bytes each data type takes to store and/or use of the wrong function to store data longer than a single byte

1 Like

https://forum.arduino.cc/t/eeprom-strange-error/1131883

It was a shame that the full sketch was not posted in that case and there was very little detail of the electrical environment so all bets are off

Hi, @aless81
Your reference is to a Mega, different animal to a UNO.

Why do you want to discuss it?
Do you have a project in mind?

Is it do to with this thread?

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

I can only tell you about the software side

  1. Store a CRC32 in last 4 bytes of EEPROM; calculate it over length() - 4 bytes. Verify each time that you want to read a variable.
  2. Store data 3 times and use best-of-three; if at least 2 variables of the 3 match, use that one.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.