It is not possible to use the debugWIRE interface if the lockbits on the target AVR device are
programmed. Always be sure that the lockbits are cleared before programming the DWEN fuse and never
set the lockbits while the DWEN fuse is programmed. If both the debugWIRE enable fuse (DWEN) and
lockbits are set, one can use High Voltage Programming to do a chip erase, and thus clear the lockbits.
When the lockbits are cleared the debugWIRE interface will be re-enabled. The SPI Interface is only
capable of reading fuses, reading signature and performing a chip erase when the DWEN fuse is un-
programmed.
Table 3-5. Atmel-ICE debugWIRE Pin Mapping
Atmel-ICE AVR port pin Target pins Mini-squid pin
Pin 1 (TCK) 1
Pin 2 (GND) GND 2
Pin 3 (TDO) 3
Pin 4 (VTG) VTG 4
Pin 5 (TMS) 5
Pin 6 (nSRST) RESET 6
Pin 7 (Not connected) 7
Pin 8 (nTRST) 8
Pin 9 (TDI) 9
Pin 10 (GND) 0
3.7. Connecting to an SPI Target
The recommended pinout for the 6-pin SPI connector is shown in Figure 4-10.
Connection to a 6-pin 100-mil SPI header
Use the 6-pin 100-mil tap on the flat cable (included in some kits) to connect to a standard 100-mil SPI
header.
Connection to a 6-pin 50-mil SPI header
Use the adapter board (included in some kits) to connect to a standard 50-mil SPI header.
Connection to a custom 100-mil header
The 10-pin mini-squid cable should be used to connect between the Atmel-ICE AVR connector port and
the target board. Six connections are required, as described in the table below.
Important:
The SPI interface is effectively disabled when the debugWIRE enable fuse (DWEN) is
programmed, even if SPIEN fuse is also programmed. To re-enable the SPI interface, the
'disable debugWIRE' command must be issued while in a debugWIRE debugging session.
Disabling debugWIRE in this manner requires that the SPIEN fuse is already programmed. If
Atmel Studio fails to disable debugWIRE, it is probable because the SPIEN fuse is NOT
programmed. If this is the case, it is necessary to use a high-voltage programming interface to
program the SPIEN fuse.
Atmel Atmel-ICE [USER GUIDE]
Atmel-42330C-Atmel-ICE_User Guide-10/2016
20