You need to make sure that the write will complete before power goes out of spec. You also need to make sure that the address you're writing to is correct, and that the data is correct. Generally, when not actively using the EE, I leave the EEAR pointing at 0x00, so that a wild write for whatever reason, should overwrite this address, which I dont use. When I set up a program to specifically investigate this in the 8515, I never caught a single instance of EE corruption, when the code followed the rules above. Maybe one other complication could be the low power crystal oscillator, that has the magic ability to hose up anything.. Never use the low power crystal oscillator!
Message
Re: [AVR-Chat] prevent attiny2313 flash corruption
2009-11-04 by David VanHorn