Public Version
www.ti.com
UART/IrDA/CIR Basic Programming Model
UART3.
[2:0] MODE_SELECT = 0x1
5. Disable access to
and
and switch to register operational mode
UART3.
= 0x00.
6. Optional: Enable RHR interrupt
UART3.
[0] RHR_IT = 0x1
19.5.2.1.2 Transmit
The following programming model explains how to program the module to transmit IrDA 6 bytes frame
with no parity, baud rate = 112.5Kbs, FIFOs disable, 3/16 encoding, 2 stop bits, 7 bits word length
1. Disable UART before accessing UARTi.
and UARTi.
Set
[2:0] MODE_SELECT = 0x7).
2. Grant access to
UART3.
= 0xBF
3. Enable the enhanced features (
[4] ENAHNCED_EN = 0x1)
UART3.
= 0x10.
4. Grant access to
and
(
[7] DIV_EN = 0x1)
UART3.
= 0x80 (Note: Data format is unaffected by the use and settings of the
UART3.
register in IrDA mode).
5. Load the new baud rate (115.2Kbs)
UART3.
= 0x1A
UART3.
= 0x00
6. Set SIR Mode (
[2:0] MODE_SELECT = 0x1)
UART3.
= 0x01.
7. Disable access to
and
and switch to register operational mode
UART3.
UART3.
= 0x00.
8. Force DTR output to active
UART3.
[0] DTR = 0x1
9. Optional: Enable THR interrupt
UART3.
[1] THR_IT = 0x1
10. Set transmit frame length to 6 bytes
UART3.
= 0x06
11. Set 7 starts of frame transmission
UART3.
= 0x08
12. Optional: Set SIR pulse width to be 1.6µs
UART3.
[7] PULSE_TYPE = 0x1
13. Load
with the desired data to be transmitted
19.5.2.2 MIR Mode
19.5.2.2.1 Receive
The following programming model explains how to program the module to receive IrDA frame with no
parity, baud rate = 1.152Mbs, FIFOs disable
1. Disable UART before accessing UARTi.
and UARTi.
Set UARTi.
[2:0] MODE_SELECT to 0x7.
2. Grant access to
and
(
[7] DIV_EN = 0x1)
UART3.
= 0x80 (Note: Data format is unaffected by the use and settings of the
UART3.
register in IrDA mode).
3. Load the new baud rate (1.152 Mbs)
UART3.
= 0x01
UART3.
= 0x00.
4. Set MIR Mode
UART3.
[2:0] MODE_SELECT = 0x4
2925
SWPU177N – December 2009 – Revised November 2010
UART/IrDA/CIR
Copyright © 2009–2010, Texas Instruments Incorporated