Content originally posted in LPCWare by kalfalfa on Tue Dec 04 11:33:10 MST 2012
Hi,
On our design VCC is USB VBUS (+5V) - and we do have a resistor. This part of the circuit just got missed when going to the gold board.
I'm interested in your advise about not having to use USB_VBUS when the board is bus-powered. Our board are bus-powered, and I have tried leaving PIO0_3 configured as GPIO, but in this case USB never connects, so I don't think it provides VDD to the detection circuitry internally.
However, I have noticed that if I enable the USB_VBUS function, and also enable the pin pullup - PIO0_3 = 0xD1 - then it will behave as if it detect USB voltage even if the pin is not connected. Before, I was not using the pull-up, but I noticed that the ROM USB driver configures this pin with a pullup, and that USB stack was working properly - it's just my stack which was not working.
Do you think it's safe to rely on the internal pin pullup for VBUS detection, or could this fail sometimes?
-Patrick