host_cdc
Overview
The host CDC project is a simple demonstration program based on the MCUXpresso SDK. It enumerates a COM port and echoes back the data from the UART as follows:
The host CDC receives data from the UART, which is plugged in the PC. Type characters in the terminal tool, such as Tera Term, and the characters are sent to the host example.
After the host example receives data from the UART, it sends the data to the device virtual COM.
After the data has been sent to the device virtual COM successfully, it receives the same data from the device virtual COM.
If the host has received the data, it sends data to the UART using the UART driver API. The UART echoes back data to the PC.
System Requirement
Hardware requirements
Mini/micro USB cable
USB A to micro AB cable
Hardware (Tower module/base board, and so on) for a specific device
Personal Computer(PC)
Software requirements
The project path is:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_host_cdc/ / .
The
is Bare Metal or FreeRTOS OS.
Getting Started
Hardware Settings
Set the hardware jumpers (Tower system/base module) to default settings.
Prepare the example
Download the program to the target board.
Power off the target board and power on again.
Connect devices to the board.
For detailed instructions, see the appropriate board User’s Guide.
Run the example
Run the host_cdc_serial example. The printed guide is displayed. Follow the guide to modify the demo.
Make sure to use a USB HUB or an adapter with OTG functionality firstly. Plug in the CDC device. The attached information is printed out.
Type a string and the string is sent to the CDC device if the string length is greater than
USB_HOST_SEND_RECV_PER_TIME. If the length is shorter than the USB_HOST_SEND_RECV_PER_TIME, the string is echoed back later. After that, the CDC host reads back the string and puts it to stdout.
*/
Supported Boards
MIMXRT1170-EVKB
EVK-MIMXRT1064
MIMXRT685-AUD-EVK
MIMXRT1060-EVKB
EVK-MIMXRT1010
MIMXRT1040-EVK
FRDM-MCXN947
MIMXRT1024-EVK
LPCXpresso55S36
MIMXRT1060-EVKC
MIMXRT1160-EVK
MIMXRT1180-EVK
EVK-MIMXRT1020
MIMXRT700-EVK
EVK-MIMXRT595
EVK-MIMXRT685
EVKB-IMXRT1050
RD-RW612-BGA
EVK-MIMXRT1015
FRDM-MCXN236
FRDM-RW612