uart_interrupt#
Overview#
The uart_functioncal_interrupt example shows how to use uart driver functional API to receive data with interrupt method:
In this example, one uart instance connect to PC through uart, the board will send back all characters that PC send to the board.
Supported Boards#
FRDM-K22F
Hardware requirements
Mini/Micro USB cable
FRDM-K22F board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the OpenSDA terminal like:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
FRDM-K32L2B
Hardware requirements
Mini USB cable
FRDM-K32L2B board
Personal Computer
USB to Com Converter
Board settings
Connect pin:
RX of USB2COM to J1_6
TX of USB2COM to J2-4
GND of USB2COM to J2-14
Prepare the Demo
Connect USB to Com Converter between the PC host and the port on the board.
Open a serial terminal on PC for serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the UART Terminal port which connected to the USB2COM like:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
FRDM-KE02Z40M
Hardware requirements
Mini USB cable
FRDM-KE02Z board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the OpenSDA terminal like:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
When you input every character, system will echo it by UART and them would be seen on the OpenSDA terminal.
FRDM-KE17Z512
Hardware requirements
Micro USB cable
FRDM-KE17Z512 board
Personal Computer
USB to Com converter
Board settings
J4-10 connect to TxD of the USB to Com converter. J4-12 connect to RxD of the USB to Com converter. J3-14 connect to GND of the USB to Com converter
Prepare the Demo
Connect a USB cable between the host PC and the MCU-LINK USB port 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 example runs successfully, the following message is displayed in the terminal:
Uart functional API interrupt example
Board receives characters then sends them out
Now please input:
FRDM-MCXC242
Hardware requirements
Mini USB cable
USB to TTL converter
FRDM-MCXC242 board
Personal Computer
Board settings
Connect the USB to TTL converter to FRDM-MCXC242 board. FRDM-MCXC242 UART pins:
TX of USB2COM to J1-5
RX of USB2COM to J1-7
GND of USB2COM to J2-14
Prepare the Demo
Connect a mini USB cable between the PC host and the OpenSDA USB port on the board.
Connect the USB to TTL converter to PC host.
Open a serial terminal on PC for the USB to TTL converter with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the UART Terminal port which connected to the USB2COM like:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
FRDM-MCXC444
Hardware requirements
Type-C USB cable
FRDM-MCXC444 board
Personal Computer
USB to Com Converter
Board settings
Connect pin:
RX of USB2COM to J1_6
TX of USB2COM to J2-4
GND of USB2COM to J2-14
Prepare the Demo
Connect USB to Com Converter between the PC host and the port on the board.
Open a serial terminal on PC for serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the log would be seen on the UART Terminal port which connected to the USB2COM like:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
TWR-KM34Z50MV3
Hardware requirements
Mini USB cable
TWR-KM34Z50MV3 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port 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.
Reset the SoC and run the project.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
TWR-KM34Z75M
Hardware requirements
Mini USB cable
TWR-KM34Z75M board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port 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.
Reset the SoC and run the project.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Uart functional interrupt example
Board receives characters then sends them out
Now please input:
TWR-KM35Z75M
Hardware requirements
Micro USB cable
TWR-KM35Z75M board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port 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.
Reset the SoC and run the project.
Running the demo
When the example runs successfully, the following message is displayed in the terminal:
Uart functional interrupt example
Board receives characters then sends them out
Now please input: