I have a Digistump with an Atmel ATtiny85 MCU. I can flash the MCU's EEPROM with an ISP programmer no problem. The chip works fine, the bootloader runs and the user program executes correctly.
Occasionally on power cycling a 200W Meanwell PSU the ATtiny will stop working. I dumped the EEPROM and compared it to the original Intel hex file. I noticed that the first handful of bytes are erased. See below. This doesn't happen all the time, just occasionally. I can reflash the chip but eventually this happens again.
If you think this is a defective chip, know that I have 30 of them from different suppliers and many of them exhibit this behavior.
Also, the Digistump is directly powered by the PSU. There are no USB data connections.
Question: Why does this happen?
Could a ripple from the PSU being shut off initiate a partial erasure?
Solved:
The ATtiny85 has a Brown-Out Detect (BOD) circuit but it is disabled by default. There is a fuse calculator for AVR chips here. By setting the high fuse to 0xDD
it activates the BOD threshold to 2.7V. With this enabled, EEPROM integrity seems to survive repeated power-cycling.