UART/IrDA/CIR Basic Programming Model
(a) Save the current UARTi.UART_LCR register value.
(b) Set the UARTi.UART_LCR register value to 0x00BF.
2. Enable register submode XOFF to access the UARTi.UART_XOFF1 and UARTi.UART_XOFF2
registers:
(a) Save the UARTi.UART_EFR[4] ENHANCED_EN value.
(b) Set the UARTi.UART_EFR[4] ENHANCED_EN bit to 0.
3. Load the new software flow control characters:
Set the following bits to the desired values:
•
UARTi.UART_XON1_ADDR1[7:0] XON_WORD1
•
UARTi.UART_XON2_ADDR2[7:0] XON_WORD2
•
UARTi.UART_XOFF1[7:0] XOFF_WORD1
•
UARTi.UART_XOFF2[7:0] XOFF_WORD2
4. Enable access to the UARTi.UART_MCR[7:5] bit field and enable register submode TCR_TLR to
access the UARTi.UART_TCR register (part 1 of 2):
Set the UARTi.UART_EFR[4] ENHANCED_EN bit to 1.
5. Switch to register configuration mode A to access the UARTi.UART_MCR register:
Set the UARTi.UART_LCR register value to 0x0080.
6. Enable register submode TCR_TLR to access the UARTi.UART_TCR register (part 2 of 2) and enable
or disable XON any function:
(a) Save the UARTi.UART_MCR[6] TCR_TLR value.
(b) Set the UARTi.UART_MCR[6] TCR_TLR bit to 1.
(c) Set the UARTi.UART_MCR[5] XON_EN bit to the desired value (0: Disable; 1: Enable).
7. Switch to register configuration mode B to access the UARTi.UART_EFR register:
Set the UARTi.UART_LCR register value to 0x00BF.
8. Load the new start and halt trigger values for software flow control:
Set the following bits to the desired values:
•
UARTi.UART_TCR[7:4] AUTO_RTS_START
•
UARTi.UART_TCR[3:0] AUTO_RTS_HALT
9. Enable or disable special character function and load the new software flow control mode and restore
the UARTi.UART_EFR[4] ENHANCED_EN value saved in Step 2a:
Set the following bits to the desired values:
•
UARTi.UART_EFR[5] SPEC_CHAR (0: Disable; 1: Enable)
•
UARTi.UART_EFR[3:0] SW_FLOW_CONTROL
Restore the UARTi.UART_EFR[4] ENHANCED_EN bit to the saved value.
10. Switch to register configuration mode A to access the UARTi.UART_MCR register:
Set the UARTi.UART_LCR register value to 0x0080.
11. Restore the UARTi.UART_MCR[6] TCR_TLR bit value saved in Step 6a.
12. Restore the UARTi.UART_LCR value saved in Step 1a.
See
, Software Flow Control, to choose the following values:
•
UARTi.UART_EFR[5] SPEC_CHAR
•
UARTi.UART_EFR[3:0] SW_FLOW_CONTROL
•
UARTi.UART_TCR[7:4] AUTO_RTS_START
•
UARTi.UART_TCR[3:0] AUTO_RTS_HALT
•
UARTi.UART_XON1_ADDR1[7:0] XON_WORD1
•
UARTi.UART_XON2_ADDR2[7:0] XON_WORD2
•
UARTi.UART_XOFF1[7:0] XOFF_WORD1
3500
Universal Asynchronous Receiver/Transmitter (UART)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated