Datasheet
221
ATmega48/88/168 Automotive [DATASHEET]
7530K–AVR–07/14
22. debugWIRE On-chip Debug System
22.1 Features
● Complete program flow control
● Emulates all on-chip functions, both digital and analog, except RESET pin
● Real-time operation
● Symbolic debugging support (both at C and assembler source Level, or for other HLLs)
● Unlimited number of program break points (using software break points)
● Non-intrusive operation
● Electrical characteristics identical to real device
● Automatic configuration system
● High-speed operation
● Programming of non-volatile memories
22.2 Overview
The debugWIRE on-chip debug system uses a one-wire, bi-directional interface to control the program flow, execute AVR
®
instructions in the CPU and to program the different non-volatile memories.
22.3 Physical Interface
When the debugWIRE enable (DWEN) fuse is programmed and lock bits are unprogrammed, the debugWIRE system within
the target device is activated. The RESET port pin is configured as a wire-AND (open-drain) bi-directional I/O pin with pull-up
enabled and becomes the communication gateway between target and emulator.
Figure 22-1. The debugWIRE Setup
Figure 22-1 shows the schematic of a target MCU, with debugWIRE enabled, and the emulator connector. The system clock
is not affected by debugWIRE and will always be the clock source selected by the CKSEL fuses.
When designing a system where debugWIRE will be used, the following observations must be made for correct operation:
● Pull-up resistors on the dW/(RESET) line must not be smaller than 10kΩ. The pull-up resistor is not required for
debugWIRE functionality.
● Connecting the RESET pin directly to V
CC
will not work.
● Capacitors connected to the RESET pin must be disconnected when using debugWire.
● All external reset sources must be disconnected.
GND
2.7 - 5.5V
dw
VCC
dw(RESET)