felias-fogg / dw-link

An Arduino-based debugWIRE hardware-debugger
https://www.codeproject.com/Articles/5321801/Debugging-an-Arduino-project-with-GDB-on-Classic-A
GNU General Public License v3.0
55 stars 11 forks source link

debugWIRE mode entered, but MCU does not respond after break #11

Open felias-fogg opened 1 year ago

felias-fogg commented 1 year ago

It can happen that the MCU is moved into debugWIRE mode, but does not respond after a power-cycle and break with the 'U' on the dW line. Even after switching everything off and then reconnecting, the MCU neither responds to ISP commands nor to a break on the dW line. Using HV programming, one can unprogramm the DWEN fuse, and then everything works again. And sometimes, one can recover the chip with a different adapter.

I cannot reliably reproduce the condition under which that happens, nor was I able to come up with a reliable recovery procedure different from HV programming.