lpcware

nxpUSBLIB: OTG socket not powered in host mode

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dima2611 on Fri Feb 24 06:11:22 MST 2012
Hi there,

I try the example of MassStorageHost with LPC4350 (board LPC-4350-DB1). I use a "A-Socket to mini-B-plug" cable. I connected pins #4 and #5 to make it look like "mini-A". So, USB0_ID is connected to GND.

I miss the point where in the software the VBUS is switched on. Currently, I have no power there, so an attached device cannot be detected.

No VBUS power => no call of USB0_IRQHandler()  => no checking for EHC_USBSTS_PortChangeDetect.. etc.

There are a couple of calls which can be thought of as if they could manage VBUS:
(located in Drivers/USB/Core/LPC/Host_LPC.c)

- USB_Host_VBUS_Manual_Off
- USB_OTGPAD_On
- USB_Host_VBUS_Auto_Enable
- USB_Host_VBUS_Auto_On

But... 1st: they are empty (see macros in ..../Host_LPC.h) 2nd: they are intended to be called in
Host_LPC.c: USB_Host_ProcessNextHostState: HOST_State_Powered which is set through
HcdIrqHandler => PortStatusChangeIsr => USB_Host_Enumerate

But as I said HcdIrqHandler does nothing because unpowered USB OTG socket sees no change.

I hope it is only a configuration problem. Please help! :)

/Dima

Outcomes