Atmega328p-PU losing its programming

MarkT: You should program at 5V supply rather than 3.3V if you can. If I'm flashing a bootloader I do it twice in a row to burn it in more solidly (I don't know if it makes any difference, but it shouldn't hurt).

We're being superstitious here. Nothing wrong with a 3.3V supply for programming. I have long ago stopped using 5V and all my arduinos run at 3.3V with zero problems, one at 24Mhz, although I do so at my own risk.

Also the bootloader is checked during programming, re-burning wont do anything but erode the internal flash cells. Thats similar to suggesting to delete contents on a flash drive and copy them twice just to make sure they get there. If a mismatch is found the software will return an error, unless verification is disabled, which is not default.

The issue is the datasheet mentions there is a minimum voltage for programming, but fails to say what it is... There seems to be an implication that the supply must be held constant during programming (several ms), and I haven't found what the supply current is during EEPROM or Flash programming either, it might impose extra load on the regulator for instance.

MarkT: The issue is the datasheet mentions there is a minimum voltage for programming, but fails to say what it is...

What!? :fearful:

Serial programming section = +1.8 to +5.5V

Power consumption: Section 27 - There's a nice graph showing programming current versus temperature.

Very good, but I doubt the chip has "lost" its program.