423
8331B–AVR–03/12
Atmel AVR XMEGA AU
If the PDI is in TX- mode (as a response to an LD instruction), but no transmission request from
the PDI controller is pending when the TAP controller enters the capture DR state, a DELAY
byte (0xDB) will be loaded into the shift register, and the parity bit will be set (forcing a parity
error) when data is shifted out in the shift DR state. This situation occurs during data transmis-
sion if the data to be transmitted is not yet available.
shows an uninterrupted flow of data frames from the PDI as a
response to the repeated indirect LD instruction. In this example, the device is not able to return
data bytes faster than one valid byte per two transmitted frames. Thus, intermediate DELAY
characters are inserted.
Figure 32-13.
Data not ready marking.
If a DELAY data frame is transmitted as a response to an LD instruction, the programmer should
interpret this as if the JTAG interface had no data ready for transmission in the previous capture
DR state. The programmer must initiate repeated transfers until a valid data byte is received.
The LD instruction is defined to return a specified number of valid frames, not just a number of
frames. Hence, if the programmer detects a DELAY character after transmitting an LD instruc-
tion, the LD instruction should not be retransmitted, because the first LD response would still be
pending.
32.4.7
Serial Reception
During reception, the PDI collects the eight data bits and the parity bit from TDI and shifts them
into the shift register. Every time a valid frame is received, the data is latched in to the update
DR state.
The parity checker calculates the parity (even mode) of the data bits in incoming frames and
compares the result with the parity bit from the serial frame. In case of a parity error, the PDI
controller is signaled.
The parity checker is active in both TX and RXmodes. If a parity error is detected, the received
data byte is evaluated and compared with the BREAK character (which will always generate a
parity error). In case the BREAK character is recognized, the PDI controller is signaled.
32.5
PDI Controller
The PDI controller performs data transmission/reception on a byte level, command decoding,
high-level direction control, control and status register access, exception handling, and clock
switching (PDI_CLK or TCK). The interaction between an external programmer and the PDI con-
troller is based on a scheme where the programmer transmits various types of requests to the
PDI controller, which in turn responds according to the specific request. A programmer request
comes in the form of an instruction, which may be followed by one or more byte operands. The
PDI controller response may be silent (e.g., a data byte is stored to a location within the device),
or it may involve data being returned to the programmer (e.g., a data byte is read from a location
within the device).
REP
CNT
LD *(ptr)
External
Programmer
Device
0xDB 1
D0
P 0xDB 1
D1
P
FRAME 0
FRAME 1
FRAME 2
FRAME 3
FRAME 0
FRAME 1
FRAME 2
Commands/data