369
XMEGA B [DATASHEET]
8291B–AVR–01/2013
29.3.4 Serial Transmission and Reception
The PDI physical layer is either in transmit (TX) or receive (RX) mode. By default, it is in RX mode, waiting for a start bit.
The programmer and the PDI operate synchronously on the PDI_CLK provided by the programmer. The dependency
between the clock edges and data sampling or data change is fixed. As illustrated in
, output
data (either from the programmer or the PDI) is always set up (changed) on the falling edge of PDI_CLK and sampled on
the rising edge of PDI_CLK.
Figure 29-6. Changing and sampling of data.
29.3.5 Serial Transmission
When a data transmission is initiated, by the PDI controller, the transmitter simply shifts out the start bit, data bits, parity
bit, and the two stop bits on the PDI_DATA line. The transmission speed is dictated by the PDI_CLK signal. While in
transmission mode, IDLE bits (high bits) are automatically transmitted to fill possible gaps between successive DATA
characters. If a collision is detected during transmission, the output driver is disabled, and the interface is put into RX
mode waiting for a BREAK character.
29.3.6 Serial Reception
When a start bit is detected, the receiver starts to collect the eight data bits. If the parity bit does not correspond to the
parity of the data bits, a parity error has occurred. If one or both of the stop bits are low, a frame error has occurred. If the
parity bit is correct, and no frame error is detected, the received data bits are available for the PDI controller.
When the PDI is in TX mode, a BREAK character signaled by the programmer will not be interpreted as a BREAK, but
will instead cause a generic data collision. When the PDI is in RX mode, a BREAK character will be recognized as a
BREAK. By transmitting two successive BREAK characters (which must be separated by one or more high bits), the last
BREAK character will always be recognized as a BREAK, regardless of whether the PDI was in TX or RX mode initially.
This is because in TX mode the first BREAK is seen as a collision. The PDI then shifts to RX mode and sees the second
BREAK as break.
29.3.7 Direction Change
In order to ensure correct timing for half-duplex operation, a guard time mechanism is used. When the PDI changes from
RX mode to TX mode, a configurable number of IDLE bits are inserted before the start bit is transmitted. The minimum
transition time between RX and TX mode is two IDLE cycles, and these are always inserted. The default guard time
value is 128 bits.
Figure 29-7. PDI direction change by inserting IDLE bits.
PDI_CLK
PDI_DATA
Sample
Sample
Sample
P
t
S
Sp1
1 DATA character
Sp2
IDLE bits
P
t
S
1 DATA character
Sp1 Sp2
Dir. change
PDI DATA Receive (RX)
PDI DATA Transmit (TX)
Data from
PDI interface
to Programmer
Data from
Programmer to
PDI interface
Guard time
# IDLE bits
inserted
Содержание XMEGA B
Страница 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Страница 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Страница 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Страница 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 414: ...414 XMEGA B DATASHEET 8291B AVR 01 2013...