usart_hardware_flow_control#
Overview#
The usart_hardware_flow_control example project demonstrates the usage of the hardware flow control function. This example sends data to itself(loopback), and hardware flow control is enabled in the example. The CTS(clear-to-send) pin is for transmiter to check if receiver is ready, if the CTS pin is asserted, transmiter starts to send data. The RTS(request-to-send) pin is for receiver to inform the transmiter if receiver is ready to receive data. So, please connect RTS to CTS pin directly.
Supported Boards#
FRDM-MCXW23
Hardware requirements
Type-C USB cable
FRDM-MCXW23 Board
Personal Computer
Board settings
USART hardware flow control on one board. The USART sends data to itself(loopback), and hardware flow control function is enabled on this example. So please make sure the correct connection for example.
Pin Name Board Location connect to Pin Name Board Location
USART_TX J5-5 ---------- USART_RX J5-6
USART_CTS J2-9 ---------- USART_RTS J1-5
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the demo runs successfully, the log would be seen on the terminal like:
This is USART hardware flow control example on one board.
This example will send data to itself and will use hardware flow control to avoid the overflow.
Please make sure you make the correct line connection. Basically, the connection is:
USART_TX -- USART_RX
USART_RTS -- USART_CTS
Data matched! Transfer successfully.
LPCXpresso54628
Hardware requirements
Micro USB cable
LPCXpresso54628 board
Personal Computer
Board settings
USART hardware flow control on one board. The USART sends data to itself(loopback), and hardware flow control function is enabled on this example. So please make sure the correct connection for example.
Pin Name Board Location connect to Pin Name Board Location
USART_TX J13 Pin 13 ---------- USART_RX J13 pin 15
USART_CTS J13 Pin 16 ---------- USART_RTS J13 Pin 14
Prepare the Demo
Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the demo runs successfully, the log would be seen on the terminal like:
This is USART hardware flow control example on one board.
This example will send data to itself and will use hardware flow control to avoid the overflow.
Please make sure you make the correct line connection. Basically, the connection is:
USART_TX -- USART_RX
USART_RTS -- USART_CTS
Data matched! Transfer successfully.
RD-RW612-BGA
Hardware requirements
Micro USB cable
RD-RW612-BGA board
Personal Computer
Board settings
USART hardware flow control on one board. The USART sends data to itself(loopback), and hardware flow control function is enabled on this example. So please make sure the correct connection for example.
Pin Name Board Location connect to Pin Name Board Location
USART_TX HD2 Pin 4 ---------- USART_RX HD2 pin 3
USART_CTS HD11 Pin 14 ---------- USART_RTS HD11 Pin 8
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J7) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the demo.
Running the demo
When the demo runs successfully, the log would be seen on the terminal like:
This is USART hardware flow control example on one board.
This example will send data to itself and will use hardware flow control to avoid the overflow.
Please make sure you make the correct line connection. Basically, the connection is:
USART_TX -- USART_RX
USART_RTS -- USART_CTS
Data matched! Transfer successfully.
MCXW23-EVK
Hardware requirements
Mini/micro USB cable
MCXW23-EVK Board
Personal Computer
Board settings
USART hardware flow control on one board. The USART sends data to itself(loopback), and hardware flow control function is enabled on this example. So please make sure the correct connection for example.
Pin Name Board Location connect to Pin Name Board Location
USART_TX J17-4 ---------- USART_RX J17-3
USART_CTS J24-3 ---------- USART_RTS J18-3
Prepare the Demo
Connect a USB cable between the host PC and the EVK board J33.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the demo runs successfully, the log would be seen on the terminal like:
This is USART hardware flow control example on one board.
This example will send data to itself and will use hardware flow control to avoid the overflow.
Please make sure you make the correct line connection. Basically, the connection is:
USART_TX -- USART_RX
USART_RTS -- USART_CTS
Data matched! Transfer successfully.
MIMXRT685-EVK
Hardware requirements
Micro USB cable
EVK-MIMXRT685 board
Personal Computer
Board settings
USART hardware flow control on one board. The USART sends data to itself(loopback), and hardware flow control function is enabled on this example. So please make sure the correct connection for example.
Pin Name Board Location connect to Pin Name Board Location
USART_TX J28 pin 5 ---------- USART_RX J28 pin 4
USART_CTS J28 pin 3 ---------- USART_RTS J28 pin 2
Remove jumper JP30.
Prepare the Demo
Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Launch the debugger in your IDE to begin running the demo.
Running the demo
When the demo runs successfully, the log would be seen on the terminal like:
This is USART hardware flow control example on one board.
This example will send data to itself and will use hardware flow control to avoid the overflow.
Please make sure you make the correct line connection. Basically, the connection is:
USART_TX -- USART_RX
USART_RTS -- USART_CTS
Data matched! Transfer successfully.