Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

In Arduino Mega (ATMEGA2560), when I enabled the interrupts, the watchdog got overflown, so the chip restarted each time the program counter achieved the interrupt enabling line.

So I tried to disable the watchdog, setting WDTCSR_WDCE to 1 and WDTCSR_WDE to 1, and after setting all WDTCSR to 0.

But when I did this, I realized that my reset pin does not work anymore. Now when I click on it, simply does not happen anything, and I cannot load a new .hex to the chip.

I burnt the bootloader again using ICSP, but the problem still happens.

Thus, how can I fix it?

share|improve this question

2 Answers 2

My experience is there was 2560 bootloader provided on Arduinos (at least 2-3 years ago). Watchdog is not disabled in bootloader and because watchdog timer is not reset on non power-cycle reboot then watchdog reboot causes forever rebooting in bootloader because of timeout waiting for potential upload. You can prove it that main program starts after power cycle but not when watchdog forces reboot.

Fix was uploading non bugged bootloader.

share|improve this answer

One Arduino Mega there are 2 MCUs. Which one's fuses did you change? Which one did you program with ICSP?

Try reverting things back to defaults; flash the small MCU (USB side) and program its fuses correctly. Check the fuses of AtMega2560 and revert them to defaults as well. Be careful as programming fuses wrongly can brick an MCU and then you need high voltage programming to revive them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.