USB Host Enumeration problem

OP (Company: Coinel Technology Solutions) #1784242
Rate this post
• ▲ useful
▼ not useful
Hello,

I've never done a USB Host interface before, now I am trying to 
enumerate USB Host using NXP's USBHostLite example using LPC1768 
controller.

It stuck at  "while (!HOST_RhscIntr);"

I got a short serial output followed by flashing

----------------------------
Initializing Host Stack
Host Initialized
Connect a Mass Storage device
-----------------------------

Can anybody tell me why

"LPC_USB->OTGStCtrl = 0x3;" statement is using. And if I use 
"LPC_USB->OTGStCtrl = 0x203;" this statement then serial output is 
followed as

------------------------------------
Initializing Host Stack
Host Initialized
Connect a Mass Storage device
ERROR: In Host_EnumDev at Line 358 - rc = -1
---------------------------------------------

The line (Line 358 in usbhost_lpc17xx.c) is this block of code:

rc = HOST_GET_DESCRIPTOR(USB_DESCRIPTOR_TYPE_DEVICE, 0, TDBuffer, 8);
if (rc != OK) {
PRINT_Err(rc);
return (rc);
}

Could it be an issue with my USB drive or hardware?

The schematic for usb host I have attached.

Many thanks in advance,

-Prakash
9886545216
Attached files:
OP (Company: Coinel Technology Solutions) #1788479
Rate this post
• ▲ useful
▼ not useful
I have ensured that PORT_FUNC in OTGStCtrl register is 0x3, PWRD, PPWR, 
POVRCR, USB-D+ and USB-D-  are set correctly for USB host in PINSELx.

Observations are as follow,

1. It stuck at "while (!HOST_RhscIntr) ;" and If I not initialize UART, 
then get rc = -1 at
------------ --------- --------- --------- --------- --------- --------- 
---
    rc = HOST_GET_DESCRIPTOR (USB_DESCRIPTOR_ TYPE_DEVICE, 0, TDBuffer, 
8);
    if (rc != OK) {
        PRINT_Err(rc) ;
        return (rc);
    }
------------ --------- --------- --------- --------- ----

because HOST_TDControlStatu s = 5.

2. Before setting of  global power bit in OHCI RHStatus,
HcRhStatus = OR_RH_STATUS_ LPSC; /* Set Global Power */
voltage at PWRD pin is 4.68v and after setting of  global power
PWRD = 0.8V
is it correct?

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.