01.08.2013 Views

Chapter 19 Universal Asynchronous Receiver-Transmitter (UART).pdf

Chapter 19 Universal Asynchronous Receiver-Transmitter (UART).pdf

Chapter 19 Universal Asynchronous Receiver-Transmitter (UART).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Functional Description www.ti.com<br />

Figure <strong>19</strong>-<strong>19</strong>. SIR Free Format Mode<br />

M * 8 bits<br />

Free Format<br />

FIFO DATA<br />

In this mode, the entire FIFO data packet is to be constructed (encoded and decoded) by the LH software.<br />

The SIR free format mode is selected by setting the module in <strong>UART</strong> mode (MDR1[2:0] = 000) and the<br />

MDR2[3] register bit to one to allow the pulse shaping. As the bit format is to remain the same, some<br />

<strong>UART</strong> mode configuration registers need to be set at specific value:<br />

• LCR[1:0] = “11” (8 data bits)<br />

• LCR[2] = 0 (1 stop bit)<br />

• LCR[3] = 0 (no parity)<br />

• ACREG[7] = 0 (3/16 of baud-rate pulse width)<br />

The features defined through MDR2[6] and ACREG[5] are also supported.<br />

Note: - All other configuration registers need to be at the reset value. The <strong>UART</strong> mode interrupts are used<br />

for the SIR free format mode, but many of them are not relevant (e.g., XOFF, RTS, CTS, Modem status<br />

register).<br />

<strong>19</strong>.3.8.2.2 MIR Mode<br />

In medium infrared (MIR) mode, data transfers take place between LH and peripheral devices at 0.576 or<br />

1.152 Mbits/s speed. A MIR transmit frame starts with start flags (at least two), followed by a frame data,<br />

CRC-16, and ends with a stop flag.<br />

Figure <strong>19</strong>-20. MIR Transmit Frame Format<br />

Start Flags Frame Data CRC - 16 Stop Flag<br />

On transmit, the MIR state machine attaches start flags, CRC-16, and stop flags. It also looks for five<br />

consecutive values of 1 in the frame data and automatically inserts a zero after five consecutive values of<br />

one (this is called bit stuffing).<br />

On receive, the MIR receive state machine recovers the receive clock, removes the start flags, de-stuffs<br />

the incoming data, and determines frame boundary with reception of the stop flag. It also checks for<br />

errors, such as frame abort, CRC error, or frame-length error. At the end of a frame reception, the LH<br />

reads the line status register (LSR) to find possible errors of received frame.<br />

Data can be transferred both ways by the module but when the device is transmitting, the IR RX circuitry<br />

is automatically disabled by hardware. See bit 5 in Section <strong>19</strong>.5.1.26, Auxiliary Control Register, for a<br />

description of the logical operation. Note: This applies to all three modes SIR, MIR and FIR.<br />

<strong>19</strong>.3.8.2.2.1 MIR Encoder/Decoder<br />

In order to meet MIR baud-rate tolerance of +/-0.1% with a 48-MHz clock input, a 42-41-42<br />

encoding/decoding adjustment is performed. The reference start point is the first start flag and the 42-41-<br />

42 cyclic pattern is repeated until the stop flag is sent or detected. The jitter created this way is within MIR<br />

tolerances. The pulse width is not exactly 1/4 but within tolerances defined by the IrDA specifications.<br />

3662 <strong>Universal</strong> <strong>Asynchronous</strong> <strong>Receiver</strong>/<strong>Transmitter</strong> (<strong>UART</strong>) SPRUH73E–October 2011–Revised May 2012<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!