I have a rather strange problem with an Atmega 128 controller that was returned after 3 months of doing it's job.
It seemed it was not running at the correct frequency or there was something wrong with the oscillator.
I tried to re-flash it but winavr just showed the upload as completed but the controller did not restart.
I tried changing the clock source down and up but no difference.
I changed the clock source to 8mhz internal, re-flashed it and changed it back to 16mhz ext.
The upload was successful this time.
It then came back and performed as expected.
It seems the on board firmware had been corrupted while running.
Any idea what could cause such an unlikely problem?