
286
8210C–AVR–09/11
Atmel AVR XMEGA D
Figure 23-8.
Driving data out on the PDI_DATA using a bus keeper.
If the programmer and the PDI both drive the PDI_DATA line at the same time, drive contention
will occur, as illustrated in
. Every time a bit value is kept for two or more
clock cycles, the PDI is able to verify that the correct bit value is driven on the PDI_DATA line. If
the programmer is driving the PDI_DATA line to the opposite bit value to what the PDI expects,
a collision is detected.
Figure 23-9.
Drive contention and collision detection on the PDI_DATA line.
As long as the PDI transmits alternating ones and zeros, collisions cannot be detected, because
the PDI output driver will be active all the time, preventing polling of the PDI_DATA line. How-
ever, the two stop bits should always be transmitted as ones within a single frame, enabling
collision detection at least once per frame.
23.4
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),
1
0
1
1
0
Output enable
PDI_CLK
PDI Output
0
1
PDI_DATA
PDI_CLK
PDI Output
PDI_DATA
1
1
X
0
1
Programmer
output
1
X
Collision detect
= Collision