What is host mode USB_PWRD input for?

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

What is host mode USB_PWRD input for?

1,003 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdupre on Mon Jul 15 14:02:58 MST 2013
I don't understand the use of USB_PWRD.  The 17xx/18xx  User manual says:


Quote:
USB_PWRD2 — Power Status for USB port 2. When using the chip in USB host mode, the USB_PWRD input must be enabled. The USB host controller will only detect a device connect event when the port power bit is set in the OHCI and the USB_PWRD bit is asserted for the corresponding port.



I have the Embedded Artists LPC1788 development board.  USB2 is configured for use as a host.  In this case, J17 typically connects P1.30 to VCC on the host port (which is turned on and off via USB_PPWR2).

I also have USB OHCI code.  In this code, P1.30 is configured as USB_VBUS, not USB_PWRD2.  The thing that puzzles me is that the USB host code detects a device being plugged in and/or removed EVEN IF P1.30 IS NOT CONNECTED. (That is, I have removed the J17 jumper so P1.30/USB_PWRD2/USB_VBUS is now floating).

So, what exactly is USB_PWRD for?  USB Host functionality seems to work whether it's connected or not.

Labels (1)
0 Kudos
Reply
1 Reply

923 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Tue Jul 16 04:12:20 MST 2013
The logic state of USB_PWRD pin appears at the PPS bit of HcRhPortStatus register on OHCI, when this register is read by firmware. When firmware writes to PPS bit, its state is put to /USB_PPWR pin.


Quote:
USB Host functionality seems to work whether it's connected or not.



OHCI spec doesn't tell that hardware should see PPS bit status, to allow device connection. It's firmware's responsibility. If your firmware wouldn't see PPS bit, it could connect without USB_PWRD signaling.

Tsuneo
0 Kudos
Reply