Management of VBUS sensing for USB device design
From a USB specification, a USB device should use VBUS sensing detection: When a host connection is detected by the device, the device connects the pull-up resistor either to D+ or to the D- data signal. This allows the host to detect device presenc...