Datasheet
370
XMEGA B [DATASHEET]
8291B–AVR–01/2013
The external programmer will loose control of the PDI_DATA line at the point where the PDI changes from RX to TX
mode. The guard time relaxes this critical phase of the communication. When the programmer changes from RX mode to
TX mode, a single IDLE bit, at minimum, should be inserted before the start bit is transmitted.
29.3.8 Drive Contention and Collision Detection
In order to reduce the effect of drive contention (the PDI and the programmer driving the PDI_DATA line at the same
time), a mechanism for collision detection is used. The mechanism is based on the way the PDI drives data out on the
PDI_DATA line. As shown in Figure 29-8 on page 370, the PDI output driver is active only when the output value
changes (from 0-1 or 1-0). Hence, if two or more successive bit values are the same, the value is actively driven only on
the first clock cycle. After this point, the PDI output driver is automatically tri-stated, and the PDI_DATA pin has a bus
keeper responsible for keeping the pin value unchanged until the output driver is re-enabled due to a change in the bit
value.
Figure 29-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 Figure 29-9 on page 370. 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 29-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. However, the two stop bits should always be transmitted
as ones within a single frame, enabling collision detection at least once per frame.
10110
Output enable
PDI_CLK
PDI Output
0
1
PDI_DATA
PDI_CLK
PDI Output
PDI_DATA
11X01
Programmer
output
1X
Collision detect
= Collision