UART/IrDA/CIR Basic Programming Model
19.4.1.2 Hardware and Software Flow Control Configuration
This section describes the programming steps to enable and configure hardware and software flow
control. Hardware and software flow control cannot be used at the same time.
NOTE:
Each programming model can be executed starting from any UART register access mode
(register modes, submodes, and other register dependencies). However, if the UART register
access mode is known before executing the programming model, some steps that enable or
restore register access are optional. For more information, see
, Register
Access Modes.
19.4.1.2.1 Hardware Flow Control Configuration
To enable and configure hardware flow control, perform the following steps:
1. Switch to register configuration mode A to access the UARTi.UART_MCR register:
(a) Save the current UARTi.UART_LCR register value.
(b) Set the UARTi.UART_LCR register value to 0x0080.
2. Enable register submode TCR_TLR to access the UARTi.UART_TCR register (part 1 of 2):
(a) Save the UARTi.UART_MCR[6] TCR_TLR value.
(b) Set the UARTi.UART_MCR[6] TCR_TLR bit to 1.
3. Switch to register configuration mode B to access the UARTi.UART_EFR register:
Set the UARTi.UART_LCR register value to 0x00BF.
4. Enable register submode TCR_TLR to access the UARTi.UART_TCR register (part 2 of 2):
(a) Save the UARTi.UART_EFR[4] ENHANCED_EN value.
(b) Set the UARTi.UART_EFR[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:
•
UARTi.UART_TCR[7:4] AUTO_RTS_START
•
UARTi.UART_TCR[3:0] AUTO_RTS_HALT
6. Enable or disable receive and transmit hardware flow control mode and restore the
UARTi.UART_EFR[4] ENHANCED_EN value saved in Step 4a.
Set the following bits to the desired values:
•
UARTi.UART_EFR[7] AUTO_CTS_EN (0: Disable; 1: Enable)
•
UARTi.UART_EFR[6] AUTO_RTS_EN (0: Disable; 1: Enable)
Restore the UARTi.UART_EFR[4] ENHANCED_EN bit to the saved value.
7. Switch to register configuration mode A to access the UARTi.UART_MCR register:
Set the UARTi.UART_LCR register value to 0x0080.
8. Restore the UARTi.UART_MCR[6] TCR_TLR value saved in Step 2a.
9. Restore the UARTi.UART_LCR value saved in Step 1a.
See
, Hardware Flow Control, to choose the following values:
•
UARTi.UART_EFR[7] AUTO_CTS_EN
•
UARTi.UART_EFR[6] AUTO_RTS_EN
•
UARTi.UART_TCR[7:4] AUTO_RTS_START
•
UARTi.UART_TCR[3:0] AUTO_RTS_HALT
19.4.1.2.2 Software Flow Control Configuration
To enable and configure software flow control, perform the following steps:
1. Switch to register configuration mode B to access the UARTi.UART_EFR register.
3499
SPRUH73H – October 2011 – Revised April 2013
Universal Asynchronous Receiver/Transmitter (UART)
Copyright © 2011–2013, Texas Instruments Incorporated