LPC4337 USB CDC VCOM not enumerating

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC4337 USB CDC VCOM not enumerating

跳至解决方案
1,518 次查看
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

标签 (2)
1 解答
1,115 次查看
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 项奖励
回复
3 回复数
1,115 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

1,116 次查看
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 项奖励
回复
1,115 次查看
rishitborad
Contributor II

Small correction, its USB INT not USBERR. 

0 项奖励
回复