USB CDC Device Failed to Enumerate on USB Host

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB CDC Device Failed to Enumerate on USB Host

4,896 Views
huishao2
Contributor IV

Hi-

Has anyone managed connecting a USB CDC device to a USB host successfully? My device/host custom boards are like

USB CDC device (virtual com), receiving power from host

k20d50m

MQX 4.1.1

USB host

k20d72m

MQX 4.0

Windows is able to enumerate the CDC device as a COM port and talk to it through terminal when a type 'A' plug is inserted into PC.

However, for the connection between two custom boards, I need a regular 'A' to mini 'A' cable with its ID pin tied to ground. What I noticed is that host seems to enumerate the device successfully and starts to send data to device while the device doesn't think the enumeration is done successfully as the callback function USB_App_Callback() never gets called.

Any comments or insights are welcomed.

Thanks!

Hui

Labels (1)
0 Kudos
2 Replies

761 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Hui:

Please check the following link

[MQX 4.1.0] Patch for USB Host CDC demo


Have a great day,
Daniel

761 Views
huishao2
Contributor IV

Hi Daniel

Thanks for your advice. I had found that thread and followed instructions to make the enumeration and communication work. I still have some questions here:

1. After changing to hardcoded Hardware Flow Control, it stops working with a commercial USB CDC device that used to work. How do I know if the CDC device is hardware flow control or not and how I can make change on the go?

2. On our host, the host USB stack is initialized with OTG_USB_Host_Init()  when CDC device is plugged in and a quick reading operation is done successfully. Subsequently, the host stops power to device after that reading operation for a while and power on CDC device again for next reading. However, the CDC device stops responding to host's get_descriptor request since then. I doubt that since the stack is already running on host and device takes some time to power on, there may be some timing mismatching issues between host and device (host requests during device powers on). How can I suspend the host stack for a while before device is fully powered up? Is there such API existing?

Have a nice day

Hui

0 Kudos