410
8331B–AVR–03/12
Atmel AVR XMEGA AU
TDO pin. The JTAG instruction selects a particular data register as the path between TDI and
TDO and controls the circuitry surrounding the selected data register
• Apply the TMS sequence 1, 1, 0 to reenter the run test/idle state. The instruction is latched
onto the parallel output from the shift register path in the update IR state. The exit IR, pause
IR, and exit2 IR states are used only for navigating the state machine
• At the TMS input, apply the sequence 1, 0, 0 at the rising edges of TCK to enter the shift data
register, or shift DR, state. While in this state, upload the selected data register (selected by
the present JTAG instruction in the JTAG instruction register) from the TDI input at the rising
edge of TCK. In order to remain in the shift DR state, the TMS input must be held low during
the input of all bits except the msb. The msb of the data is shifted in when this state is left by
setting TMS high. While the data register is shifted in from the TDI pin, the parallel inputs to
the data register captured in the capture DR state are shifted out on the TDO pin
• Apply the TMS sequence 1, 1, 0 to reenter the run test/idle state. If the selected data register
has a latched parallel output, the latching takes place in the update DR state. The exit DR,
pause DR, and exit2 DR states are used only for navigating the state machine.
As shown in the state diagram, the run test/idle state need not be entered between selecting
JTAG instructions and using data registers.
Note: Independently of the initial state of the TAP controller, the test logic reset state can always
be entered by holding TMS high for five TCK clock periods.
31.4
JTAG Instructions
The instruction register is four bits wide. Listed below are the JTAG instructions for boundary
scan operation and the PDICOM instruction used for accessing the PDI in JTAG mode.
The lsb is shifted in and out first for all shift registers.
The opcode for each instruction is shown beside the instruction name in hex format. The text
describes which data register is selected as the path between TDI and TDO for each instruction.
31.4.1
EXTEST; 0x1
EXTEST is the instruction for selecting the boundary scan chain as the data register for testing
circuitry external to the AVR XMEGA device package. The instruction is used for sampling exter-
nal pins and loading output pins with data. For the I/O port pins, both output control (DIR) and
output data (OUT) are controllable via the scan chain, while the output control and actual pin
value are observable. The contents of the latched outputs of the boundary scan chain are driven
out as soon as the JTAG instruction register is loaded with the EXTEST instruction.
The active states are:
• Capture DR: Data on the external pins are sampled into the boundary scan chain
• Shift DR: Data in the Boundary-scan Chain are shifted by the TCK input
• Update DR: Data from the scan chain are applied to output pins
31.4.2
IDCODE; 0x3
IDCODE is the instruction for selecting the 32-bit ID register as the data register. The ID register
consists of a version number, a device number, and the manufacturer code chosen by the Joint
Electron Devices Engineering Council (JEDEC). This is the default instruction after power up.