I am currently developing a battery powered device that makes use of the Atmega128 EEPROM to store configuration settings and checksums on data. Recenttly, a modification was made to the PCB that permanently connected the battery (through a voltage divide circuit) to one of the ADC pins to measure battery level..
Since this modification, I've noticed that the checksums and other information in the EEPROM are becoming corrupted. I tried implementing reduncancy on the checksums by using a majority vote and re-writing any checksums that were "out-of-synch". This did not work however as all 3 of the EEPROM locations I was storing the checksums became corrupted. So i think something else is up...
Since the battery is constantly connected to the Atmega's ADC I/O pin, there is a small voltage (about 0.5 to 0.6 volts) between Vcc /AVCC and GND all the time. This worries me... Could this small voltage being applied to the pin, over time, corrupt the contents of the EEPROM? how likely is this and how long would it take to change the contents of the EEPROM?
I am using an Atmega128 (3.3v version) with ADC set to use internal ref voltage (2.56v). I am not setting the BOD fuse on the device. (bad, I know!) Checksums were spread out over a 64 byte range in the EEPROM.
Please give me some advice on this problem.