I've read some post of people whose Arduinos suddenly fails (not being able to upload the sketches). I have had the same problem with two Arduino Mini. Without any reason (same software, same USB interface, same PC, almost same moment,...), suddenly, I can not upload the program. (I got the message "avrdude: verification error, first mismatch at byte 0x00xx" and that staff).
I've programmed the Arduino before hundred of times, so I think it's not my fault. I've tried to use avrdude to solve the problem, but no way; I am able to read the flash content, but I am not able to read the state of the lock bits or upload any skecth to the flash (well, I´m not an expert with avrdude, and perhaps there is something I'm missing, but I don´t think so).
I only find two possible explanations for this:
First one; Perhaps I've programed the flash too many times (Atmel guarantees 10000 cycles). Well, I´ve tried to figure out how many times I´ve programmed that arduino, probably 1000-3000 times, but I´m sure I´ve not reached even 5000 cycles. Could be a defective part, but it had happened to me with two parts (and the other one was only programmed a few times).
Second; for any strange reason, the flash has been locked (although not corrupted), and I'm not able to reprogram it. As I said, I can not read the lock bits with avrdude. (Any clue to see if the flash is locked?) With avrdude in terminal mode I only read 0's when I try to read the lock bits or extended registers (but also when I try to read the flash or the eeprom). In command line mode I can correctly dump the contents of the flash and the eeprom to a file (and they mantain the last uploaded sketch), but again I obtain 0's if I read the lock bits or extended registers (I don't know if this is the normal behaviour of avrdude).
Any idea or help? Due to this problem, I had to unmount a really complex piece of hardware with the Arduino Mini deeply embedded inside, and change it by a new Arduino (and, of course, the day before the demo... a nightmare, you know). I´m really worried about this, because now I don´t feel like using a platform that could be not reliable, unless I can understand what was the reason for this failure.
(sorry, this is a re-post of a reply I sent to the thread "Need help, FAST (please)", but I got no comments)