Problem with USB device example usbd_lib_cdc

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

Problem with USB device example usbd_lib_cdc

1,173 Views
simonepuschmann
Contributor II

I'm running a LPC1769 board with the embedded artists base board and have problems with the usbd_lib_cdc example. I'm using the LPCOpen library LPCXpresso_8.1.4_606 on a Win7 machine.
 
If I start/reset the example the HTerm founds the corresponding VCOM, but I can not open this connection. I got an error message from HTerm: "Error in OpenPort: Internal error when initializing COMxx"
Only if I cut and reconnect the USB cable after start/reset the example I'm able to open the port. Sending strings from HTerm and sending them back from LPC1769 does work then, but I never get the first string "Hello World!" of the example. 

 

What must I do to reconnect USB without cut the usb cable?
Has anyone else similar problems and found a solution?

I have already requested the nxp support, but now 6 weeks have passed and no solution is found.

Labels (3)
0 Kudos
Reply
1 Reply

822 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Simon,

The problem is that the host detects a device the moment you plug the USB cable from the computer to the baseboard and starts the enumeration process, if the MCU does not have any USB program loaded it will be enumerated as an Unknown device and if the MCU already had a USB program loaded it will work correctly.

On your case, I believe that the MCU already had the CDC example loaded and it was already enumerated by the host but when you reflashed the MCU and launched the debug session without disconnecting the USB cable there was not a proper re-enumeration for the device, that is why you need to connect and reconnect the cable. You can confirm this loading the cdc example to the MCU and making sure it is enumerated by the host, then you launch a debug session and you will see that even if the program is paused you will still see the VCom port enumerated in your computer, when you run the example you will see that it will not work correctly because of this.

Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos
Reply