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#
FRDM-K22F
Getting Started
Hardware Settings
The Jumper settings:\n J22 1-2.
LPCXpresso55S69
Getting Started
Hardware Settings
The Jumper settings:\n J6 1-2 and J7 open for high speed mode, J6 2-3 and J7 shunt for full speed mode.
The external +5V power only port shoud be connected with a power USB cable to provide USB VBUS.
LPCXpresso54S018
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2 high speed mode,2-3 full speed mode; J10 open high speed, shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.
LPCXpresso55S16
Getting Started
Hardware Settings
The Jumper settings:\n JP20 1-2, JP21 1-2 and JP22 1-2 for chip power. JP2 1-2 and JS2 shunt for full speed mode, JP2 2-3 and JS2 open for high speed mode.
The external +5V power only port shoud be connected with a power USB cable to provide USB VBUS.
LPCXpresso54S018M
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2 high speed mode,2-3 full speed mode; J10 open high speed, shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.
LPCXpresso55S28
Getting Started
Hardware Settings
The Jumper settings:\n J6 1-2 and J7 open for high speed mode, J6 2-3 and J7 shunt for full speed mode.
The external +5V power only port shoud be connected with a power USB cable to provide USB VBUS.
LPCXpresso54628
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2 high speed mode,2-3 full speed mode; J10 open high speed, shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.
MCX-N5XX-EVK
Getting Started
Hardware Settings
The Jumper settings:\n J21 1-2.
FRDM-K32L2A4S
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2, J16 1-2.
MCX-N9XX-EVK
Getting Started
Hardware Settings
The Jumper settings:\n J21 1-2.