Beware DebugWire When Reset Doesn’t

This is just a note to all, and to remind myself:

Are you having difficulty getting your ATmega to reset properly using the external Reset pin? Do all the other resets (watchdog, brown-out detect, and power up) work just fine, but the processor always locks up immediately after a negative pulse on the Reset pin? Have you been using debugWire to flash the processor or to debug?

This might be the answer you seek: Note that if debugWire is enabled, the external reset will not function properly: so check to make sure you have disabled debugWire before attempting to reset the processor using the Reset pin. Needless hours can be wasted searching for the cause of a malfunctioning Reset pin – I know that for a fact – so don’t overlook this potential cause for the problem.

Here are the pertinent paragraphs from the ATmega data sheet:

25.5  Limitations of debugWIRE

The debugWIRE communication pin (dW) is physically located on the same pin as External Reset (RESET). An External Reset source is therefore not supported when the debugWIRE is enabled.

Leave a Reply