UART/IrDA Modes of Operation
12-85
UART Devices
12.8.2.2
Asynchronous Transparency
Before transmitting a byte, the UART IrDA controller examines each byte in the
payload and the CRC field (between BOF and EOF). For each byte equal to
0xC0 (BOF), 0xC1 (EOF), 0x7D (control escape), the controller does the
following.
-
In transmission:
1) Inserts a control escape (CE) byte preceding the byte.
2) Complements bit 5 of the byte (that is, exclusive ORs the byte with 0x20).
The byte sent for the CRC computation is the initial byte written in the TX FIFO
(before the XOR with 0x20).
-
In reception:
For the A, C, I, CRC fields:
1) Compares the byte with CE byte; if not equal, sends it to the CRC detector
and stores it in the RX FIFO.
2) If equal to CE, discards the CE byte.
3) Complements the bit 5 of the byte following the CE.
4) Send the complemented byte to the CRC detector and stores it in the RX
FIFO.
12.8.2.3
Abort Sequence
The transmitter may decide to prematurely close a frame. The transmitting
station aborts by sending the sequence 0x7dc1. The abort pattern closes the
frame without a CRC field or an ending flag.
It is possible to abort a transmission frame by programming ACREG [1].
When this bit is set to 1, 7Dh and C1h are transmitted and the frame is not
terminated with CRC or stop flags.
The receiver treats a frame as an aborted frame when a 7Dh character
followed immediately by a C1h character has been received without
transparency.
-
When UART3 receives an abort sequence (0x7DC1), the abort bit
(LSR[3]) is set to 1.
-
When the UART3 FIFO is empty or the SFSLR register is read, the abort
bit is cleared to 0 (If SFSLR register is read, abort actually reflects the
status of the next frame).