Public Version
www.ti.com
UART/IrDA/CIR Basic Programming Model
19.5.1.2.1 Hardware Flow Control Configuration
To enable and configure hardware flow control, perform the following procedure:
1. Switch to register configuration mode A to access the UARTi.
register:
(a) Save the current UARTi.
(b) Set UARTi.
to 0x0080.
2. Enable register submode TCR_TLR to access UARTi.
(part 1 of 2):
(a) Save the UARTi.
[6] TCR_TLR value.
(b) Set UARTi.
[6] TCR_TLR = 1.
3. Switch to register configuration mode B to access the UARTi.
register:
Set UARTi.
to 0x00BF.
4. Enable register submode TCR_TLR to access the UARTi.
register (part 2 of 2):
(a) Save the UARTi.
[4] ENHANCED_EN value.
(b) Set the UARTi.
[4] ENHANCED_EN bit to 1.
5. Load the new start and halt trigger values for hardware flow control:
Set the following bits to the desired values:
•
[7:4] AUTO_RTS_START
•
[3:0] AUTO_RTS_HALT
6. Enable or disable receive and transmit hardware flow control mode and restore the
UARTi.
[4] ENHANCED_EN value saved in Step 4a.
Set the following bits to the desired values:
•
[7] AUTO_CTS_EN (0: Disable/1: Enable)
•
[6] AUTO_RTS_EN (0: Disable/1: Enable)
Restore UARTi.
[4] ENHANCED_EN to the saved value.
7. Switch to register configuration mode A to access UARTi.
Set UARTi.
to 0x0080.
8. Restore the UARTi.
[6] TCR_TLR value saved in Step 2a.
9. Restore the UARTi.
value saved in Step 1a.
See
, Hardware Flow Control, to choose the following values:
•
UARTi.
[7] AUTO_CTS_EN
•
UARTi.
[6] AUTO_RTS_EN
•
UARTi.
[7:4] AUTO_RTS_START
•
UARTi.
[3:0] AUTO_RTS_HALT
19.5.1.2.2 Software Flow Control Configuration
To enable and configure software flow control, perform the following procedure:
1. Switch to register configuration mode B to access the UARTi.
register.
(a) Save the current UARTi.
(b) Set UARTi.
to 0x00BF.
2. Enable register submode XOFF to access the UARTi.
and UARTi.
registers:
(a) Save the UARTi.
[4] ENHANCED_EN value.
(b) Set the UARTi.
[4] ENHANCED_EN bit to 0.
3. Load the new software flow control characters:
Set the following bits to the desired values:
•
[7:0] XON_WORD1
•
[7:0] XON_WORD2
•
[7:0] XOFF_WORD1
•
[7:0] XOFF_WORD2
4. Enable access to UARTi.
[7:5] and enable register submode TCR_TLR to access
UARTi.
(part 1 of 2):
2923
SWPU177N – December 2009 – Revised November 2010
UART/IrDA/CIR
Copyright © 2009–2010, Texas Instruments Incorporated