Content originally posted in LPCWare by Tsuneo on Tue Jul 16 03:09:52 MST 2013
Quote:
User Manual indicates that USB_VBUS is internally pulled high when pin is not assigned to that function. Does this just mean that the USB device system will always think that the device is connected?
Yes.
It's fine for bus-powered devices, because the running firmware means that the bus power is supplied. There is no need to detect VBUS voltage explicitly at the USB connector.
For self-powered devices, however, VBUS detection is necessary. Just while VBUS voltage presents, D+ pull-up resistor (ie. USB_CONNECT) is enabled, as the requirement of USB2.0 spec (*1). Also VBUS detection is required to suppress spurious USB interrupts by floating D+/D- lines.
(*1) 7.1.5.1 Low-/Full-speed Device Speed Identification (on usb_20.pdf)
The voltage source on the pull-up resistor must be derived from or controlled by the power supplied on the USB cable such that when VBUS is removed, the pull-up resistor does not supply current on the data line to which it is attached.
Tsuneo