421
8331B–AVR–03/12
Atmel AVR XMEGA AU
instruction is shifted into the JTAG instruction register, the JTAG interface can be used to
access the PDI for external programming and on-chip debugging.
32.4.2
Disabling
The JTAG interface can be disabled by unprogramming the JTAGEN fuse or by setting the
JTAG disable bit in the MCU control register from the application code.
32.4.3
JTAG Instruction Set
The Atmel XMEGA specific JTAG instruction set consist of eight instructions related to boundary
scan and PDI access for programming. For more details on JTAG and the general JTAG instruc-
tion set, refer to
”JTAG Instructions” on page 410
.
32.4.3.1
The PDICOM Instruction
When the PDICOM instruction is shifted into the JTAG instruction register, the 9-bit PDI commu-
nication register is selected as the data register. Commands are shifted into the register as
results from previous commands are shifted out from the register. The active TAP controller
states are (see
”TAP - Test Access Port” on page 408
):
• Capture DR: Parallel data from the PDI controller is sampled into the PDI communication
register
• Shift DR: The PDI communication register is shifted by the TCK input
• Update DR: Commands or operands are parallel-latched into registers in the PDI controller
32.4.4
Frame Format and Characters
The JTAG physical layer supports a fixed frame format. A serial frame is defined to be one char-
acter of eight data bits followed by one parity bit.
Figure 32-10.
JTAG serial frame format
Three special data characters are used. Common among these is that the parity bit is inverted in
order to force a parity error upon reception. The BREAK character (0xBB+P1) is used by the
external programmer to force the PDI to abort any ongoing operation and bring the PDI control-
ler into a known state. The DELAY character (0xDB+P1) is used by the PDI to tell the
programmer that it has no data ready. The EMPTY character (0xEB+P1) is used by the PDI to
tell the programmer that it has no transmission pending (i.e., the PDI is in RX-mode).
(0-7)
Data/command bits, least-significant bit sent first (0 to 7)
P
Parity bit, even parity used
0
1
2
3
4
5
6
7
P
FRAME