Brick a mega board with RESET issue

sterretje:
Post the code that caused the issue. It does not help to tell people not to do what you did without knowing exactly what you did :wink:

You might also have a chance that somebody can point out a possible error in your code.

User code should not affect the upload capabilities of the board; I'm surprised about that.

I had a very wierd problem with a MEGA2560 board. I put a 128x64 VFD display and a DS3234 RTC on it. Works fine.

Then I wrote a small C program to send the correct time to the RTC chip from my Linux pc.

The RTC code in the Arduino grabs the time data, then sets the RTC. Then it sets the watchdog timer to 500 msec and waits in a while(1); loop to reboot the board.

At this point the board locks up and RESET DOES NOT WORK!!!.. I put the scope on the reset line and verified that the pin does indeed go low when I press reset.

The ONLY way out is to power cycle the board!

If I change the reset code to clear the proper registers and then jump to 0x0000 it resets and works fine.

How can ANY type of crash physically disable the reset pin?

Older MEGA bootloaders don't disable the watchdog. Hardware RESET also does not disable the WDT.
So if you allow the WDT to reset the chip, it'll be left with the WDT running with a ~16ms timeout (value set on reset), which is much shorter than the bootloader waits for commands. Thus the board continues to reset itself (via WDT) every 16ms or so, instead of running the sketch.

The fix is to upgrade the bootloader.

@krupski

TOPIC SPLIT
DO NOT HIJACK / NECRO POST !

With so many posts I would expect better.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.