Go Down

Topic: Watchdog timer reseting arduino before I can upload another sketch (Read 2297 times) previous topic - next topic

fenmattcf

Hello, I uploaded a sketch with wtd and this put my arduino mega 2560 in a fast reset loop. :(
So, I can't upload another sketch.

Is there any way to erase memory of Arduino MEGA 2560?
Or a way to upload another sketch?
Or disable wdt hardware...

Thanks

fs007

Which bootloader have you installed ?
the bootloader shipped with the arduino IDE for the MEGA 2560 is not watchdog compatible. If you want to use the wdt you have to install an alternate bootloader with a programmer


CrossRoads

Press & Hold Reset while you start the sketch download.
Release it when you see the "Compiled xxx of 128000" bytes message.
May have to try a few times to get the right time.

If you can't make that work, re-loading bootloader using an ISP programmer will be needed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

fs007

Quote
re-loading bootloader

when he "reloads" the same bootloader, he will probably have he same problem with wdt.

fenmattcf

Wow dude, that`s work... I held the button and released when I saw that message. Thank you very much.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

kkcwolf

I found a morge aggressive way to bypass the WDT interrupted SLEEP_MODE_PWR_DOWN. Since my pro mini only wakes up for a few ┬Ás, the time was to short, to exactly release the reset button while the programmer was trying to upload the sketch.
I ended witch "scratching with a cable" over the entire lower right site of the atmega328p pins. This way I've done some short circuits betweend pin 3(GND) and 4(VCC), pin 4(VCC) and 5(GND), and pin 5(GND) and 6(GND). The Atmega have to do a full reboot (and mybe some other stuff), wich seems to take longer than "just" doing the reset.

This is not a goot Solution, but it worked for me.


      /  \
    /      \
  /          \
/              \
\              /
  \          /
    \      /   <- over the entire side
      \o/

Go Up