Memory overrun blows Arduino chip?

I see at least 3 scenarios that could create the "I bricked my AVR from a sketch" situation.

  1. WDT issues
  2. Sketch spewing output on serial port
  3. Arduino hardware issue on some boards that allows ringing on reset line to trigger HVP erase cycle

Of these #3 is the only true "brick" scenario which can be caused by an interaction
of the auto-reset circuit and certain loading on the reset line that was seen to happen
with certain shields. If this happens, the AVR must be reprogrammed including fuses.

#1 and #2 are/were software issues that have since both been resolved.

Unfortunately, because things were never fully tracked down,
it wasn't known what the original issue was. Given that we are not seeing widespread
reports of this still happening, I'm guessing that some of it was user error, and some of
it was contributed to the above 3 issues, which are no longer an issue on the newer
hardware and sofware.

So the good news is that today, with updated hardware, bootloaders, firmware, and IDE
these 3 issues should no longer be a problem.


As far as WDT goes:
While the WDT issue was known among some technical folks, I doubt it was known among many non technical users.
(Even some technical folks were unaware about it when I posted about it a few years back)
And while the sketch may not intentionally enable WDT all it takes is writing a 0x8 to location 0x60.
(Enabling WDT is not a protected operation). So run away code could potentially accidentally turn on WDT
and by default it would enable WDT RESET and use the shortest possible timer.

I believe that many of the users of the IDE are fairly naive with such technical details
and would not think of holding down the reset
button until the just the right time. And even then, actually doing this is actually not that easy depending
on which bootloader you have.
There is a short timing window to get this to work. Compounding things is that there were/are several
different bootloaders floating around that worked slightly differently with respect to reset and boot-loader
to application (sketch) timing, particularly when taking into consideration the clones out there.
Also recall that on the older IDE's EVERTHING was built every single time.
So trying to time when to release the reset button
to get the board up and going at just the right time is difficult, especially if IDE diagnostic messages are not enabled.
My assumption is that many of the users would simply say that the sketch "bricked my AVR",
when in fact all that happened was that the AVR was crashing in a way that made the IDE-Autoreset mechanism
not work in the normal usage case.

And if you look at it from their point of view. If you power cycle it, and try to do a normal sketch upload
it doesn't work. If you push the reset button and then try to do a normal sketch upload it doesn't work.
But if you re-write the bootloader it works every time.

It only works, if push and hold down the reset until just the right time.

--- bill