Electronic – Minimum voltage to avoid EEPROM corruption for ATMega328P

atmegabrownouteeprom

I have a battery powered contraption with an ATMega328P with Arduino code that sleeps most of the time. Occasionally it needs to write some values to EEPROM. It's battery powered so I have tried to minimize the consumption by disabling the BOD, so now I'm curious around what voltage range the EEPROM might become damaged. Has anybody tried to see how low one can lower the voltage and still have it safe?

In the datasheet I see there are options for BOD at 1V8. Does that mean that it would be safe to write EEPROM at 2V?

Best Answer

I've been reading up on AVRs myself; I'm not the most knowledgeable, but this is what I've picked up in my research.

First, I realize you are disabling your BOD to save power, but this is listed as a preventative method to avoid EEPROM corruption in the ATmega328P. From section 8.4.2:

Keep the AVR RESET active (low) during periods of insufficient power supply voltage. This can be done by enabling the internal Brown-out Detector (BOD).

If you are really keen on disabling the BOD, it is possible to have it disabled when in sleep mode. To accomplish this, you can set the BODS bit in the MCUCR register.

Like you, I have become frustrated with the ambiguity in the voltage which at which the AVR's EEPROM will become corrupted. I see nothing in the datasheet. However quoting Atmel's EEPROM Corruption article on their website:

a regular write sequence to the EEPROM requires a minimum voltage to operate correctly

Minimum voltage? This is a generic article, so I'd guess this refers to the lowest voltage at which the ATmega328P operates at, which is 1.8V.

Hope I've helped.