UART/IrDA Modes of Operation
12-84
SIR transparency is carried out if the outgoing data (between the start and stop
flags) contains C0h, C1h, or 7Dh. If one of these is about to be transmitted,
then the SIR state machine sends an escape character [7Dh] first, then inverts
the fifth bit of the real data to be sent, and sends this data immediately after
the 7Dh character.
The SIR receive state machine recovers the receive clock, removes the start
flags, removes any transparency from the incoming data, and determines
frame boundary with reception of the stop flag. It also checks for errors such
as frame aborts (7Dh character followed immediately by a C1h stop flag, with-
out transparency), CRC errors, and frame-length errors. At the end of a frame
reception, the host (MPU or DSP) reads the line status register (LSR) to find
out the errors, if any, of the received frame.
Data can be transferred both ways simultaneously by the module, but transmit
and receive must not take place at the same time according to the standard.
The infrared output in SIR mode can either be 1.6-
µ
s or 3/16 encoding,
selected by ACREG[7]. In 1.6-
µ
s encoding the infrared pulse width is 1.6-
µ
s,
and in 3/16 encoding the infrared pulse width is 3/16 of a bit duration (1/baud-
rate).
The transmitting device must send at least two start flags at the start of each
frame for back-to-back frames.
Note:
Reception supports variable-length stop bits.
12.8.2.1
CRC Generation
Figure 12–14 shows the IrDA frame format.
Figure 12–14. IrDA Frame Format
XBOF
BOF
A
C
I
CRC
EOF
M*8 Bits
N*8 Bits
2*8 Bits
8 Bits
8 Bits
8 Bits
8 Bits
The CRC is applied on the address (A), control (C), and information (I) bytes.
Note:
The two words of CRC are written in the FIFO in reception.