LPC4337 USB CDC VCOM not enumerating

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

LPC4337 USB CDC VCOM not enumerating

Jump to solution
1,390 Views
rishitborad
Contributor II

Hi,

I am working on LPC4337 USB CDC VCOM on a customize board. It uses external crystal for clocking of 10MHz. For the software I am referring to LPCOpen usbd_rom_cdc_vcom project. Unfortunately my board doesn't support debugger yet and I am using UART printing to determine whats going on. 

So far, USBD_API->hw->init() and vcom_init() returns LPC_OK. USB interrupts are being generated and program enters EP0_patch; I am also reading USBSTS register in side usb0_IRQhandler() and 'event' parameter in EP0_patch. My serial terminal outputs something like this after USBD_API->hw->Connect(g_hUsb, 1) function call :

1) USBSTS:                0x180         (SOF | SUSPENDED)

2) USBSTS:                0xC0          (SOF | RESET)

3) USBSTS:                0x84           (SOF | PORTCHANGE)

4) USBSTS:                0x81           (SOF | USBERROR)

5) EP0_patch event:   USB_EVT_SETUP

6) USBSTS:                0x10001     (SOF | NAK_INT)

7) EP0_patch event:   USB_EVT_OUT_NAK

8) USBSTS:                0x1             (USBERROR)

9) EP0_patch event:   USB_EVT_OUT

10) USBSTS:              0x81           (SOF | USBERROR)

11) EP0_patch event:  USB_EVT_SETUP

12) USBSTS:              0x1             (USBERROR)

13) USBSTS:              0x81           (SOF | USBERROR)

14) EP0_patch event: USB_EVT_SETUP

14) EP0_patch event: USB_EVT_OUT_NAK

16) USBSTS:              0x1             (USBERROR)

14) EP0_patch event: USB_EVT_OUT 

15) Stops printing on serial terminal and windows reports, after a delay of 45-50 seconds, Unknown USB Device (Device Descriptor Request Failed) Code 43.

I am also setting the M-divider value to 0x071A7FAA (corrosponding to 10 MHz) in usbPLLSetup. My code is same as LPCOpen CDC_VCOM software except I had to port it to C++. 

 

I am stuck here and hoping to get an idea of what is happening inside, the cause or resolution of the problem. 

Thanks in advance,

Rishit

Labels (2)
1 Solution
987 Views
rishitborad
Contributor II

Resolved this problem. Turns out too many print statements caused problem. 

Now i am stuck at a problem identicle to this https://community.nxp.com/thread/419944 .

Can you help?

Regards,

Rishit

View solution in original post

0 Kudos
3 Replies
987 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Rishit Borad

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
I'd highly recommend you to use the UsbTreeView to grab enumeration information and the tool will exemplify the issue visually, so please check the attachment.

Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

988 Views
rishitborad
Contributor II

Resolved this problem. Turns out too many print statements caused problem. 

Now i am stuck at a problem identicle to this https://community.nxp.com/thread/419944 .

Can you help?

Regards,

Rishit

0 Kudos
987 Views
rishitborad
Contributor II

Small correction, its USB INT not USBERR. 

0 Kudos