Atmega 128 firmware corrupt

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make sure that you are enabling the BOD and also FULL SWING oscillator mode.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply John.
I am aware that Atmega's are prone to EEPROM corruption without BOD. Is the same true of flash?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not too sure about the flash being corrupted without the BOD, I just never take the chance. :)

But not using full swing mode (CKOPT) for the oscillator at from 8MHz and up is likley to cause phanthom problems according to a few people.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK BODEN enabled (it wasn't for some reason!!)
CKOPT was enabled.
Will put it back in the field and see what happens.

Thanks.