dev_composite_cdc_msc
Overview
The Composite CDC_MSC project is a simple demonstration program based on the MCUXpresso SDK.
It is enumerated as a COM port and a RAM disk, which can be opened using terminal tools, such as TeraTerm.
The demo echoes back any character it receives. The RAM disk can be formatted.
The purpose of this demo is to show how to build a composite USB device and to provide a simple example for further development.
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
Software requirements
The project files are in:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_device_composite_cdc_msc/ / .
For a lite version, the project files are in:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_device_composite_cdc_msc_lite/ / .
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.
Connect the target board to the external power source (the example is self-powered).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Connect a USB cable between the PC host and the USB device port on the board.
For detailed instructions, see the appropriate board User’s Guide.
Run the example in Windows OS
A COM port and a USB Mass Storage Device is enumerated in the Device Manager. If it prompts for CDC driver installation, see the next section to install the CDC driver.
Open the COM port in a terminal tool, such as the Tera Term.
Type some characters, which are echoed back from the COM port.
The Windows OS prompts to format the U disk.
When the format is completed, the computer displays the capacity of 4 KB removable disk.
note
Because there is no dynamic detection between the host and the device, the COM port must be closed from the terminal tool prior to unplugging the CDC device. Otherwise, the CDC device won’t get recognized next time that it is plugged in with the COM port still opened.
If no hardware FLOW CONTROL is needed, set the variable start_transactions to TRUE.
The RAM disk and SD disk function can’t be enabled at the same time.
The Mac OS system default creates the .fseventsd , a trash folder, and some other files if the disk is formatted on Mac OS. The total files size is about 8 K. If the USB mass storage example is running on Mac OS, increase the RAM size to 32 K. Change the MACRO
TOTAL_LOGICAL_ADDRESS_BLOCKS_NORMAL
in disk.h from 48 to 64.
Installing the CDC driver for virtual_com and msd_cdc composite example
Below are the steps to install the CDC driver on Windows 7 OS. Similar process applies to Windows XP OS.
Step 1. Click “Update Driver Software…”
Step 2. Choose “Browse…”
Step 3. Select “Let me pick…”
Step 4. Navigate to your CDC driver location.
<install_dir>\boards\
or
<install_dir>\boards\
Step 5. Press “Next”.
Step 6. Ignore the warning and press “Yes”.
Step 7. Now the CDC driver should be installed successfully.
If the driver signature issue occurs on Windows 8 OS, see the link,\n Disabling Driver Signature on Windows 8
To enable driver signing on Windows OS, see the link,
*/
Supported Boards
MIMXRT1170-EVKB
FRDM-K22F
LPCXpresso55S69
EVK-MIMXRT1064
MIMXRT685-AUD-EVK
FRDM-MCXA276
LPCXpresso51U68
LPCXpresso54S018
LPCXpresso54S018M
MIMXRT1060-EVKB
EVK-MIMXRT1010
MIMXRT1040-EVK
FRDM-MCXN947
MIMXRT1024-EVK
LPCXpresso55S28
LPCXpresso54628
LPCXpresso55S36
MCX-N5XX-EVK
MIMXRT1060-EVKC
MIMXRT1160-EVK
MIMXRT1180-EVK
EVK-MIMXRT1020
MIMXRT700-EVK
FRDM-MCXA156
EVK-MIMXRT595
EVK-MIMXRT685
MCX-N9XX-EVK
EVKB-IMXRT1050
RD-RW612-BGA
FRDM-K32L3A6
EVK-MIMXRT1015
FRDM-MCXN236
FRDM-RW612