Skip to content

USB-12 Self-powered USB device without VBUS detection

Severity Status Implementation
warning planned hard, depends on NET-8, NET-12

Looks at. Power states (NET-8), D+ pull-up source, VBUS sense pin.

What it catches. A device that can be powered while VBUS is absent (battery, its own supply, another port) and whose D+ (or D−) pull-up does not depend on VBUS: no VBUS sense input to the USB controller, or one tied high.

Why it matters. The spec forbids a device to power its pull-up unless VBUS is there, and requires it removed within 10 s when VBUS goes. A self-powered device that keeps its pull-up on drives current into an unpowered host's D+ (back-powering its PHY), confuses hubs about attach and detach, and never sees a disconnect, so it does not re-enumerate when plugged back in.

Example. B153A's hub U301 has VBUS_DET tied high through R307, so it "always thinks the upstream is attached". But the board runs from either side's VBUS through a diode-OR: a device under test that feeds its own VBUS powers the board through D802, and once configured the hub can pull D+ up on the receptacle with no host VBUS present.

How to check. For each USB device port, in every power state where the device is on and the port's VBUS is not: is the pull-up (internal to the PHY or external) still powered? The controller's VBUS-sense pin must be connected to VBUS (through a divider, USB-13), not to a rail.

Fix. Wire VBUS through a divider to the VBUS-sense pin (STM32: PA9 or a GPIO, AN4879's 33 kΩ/82 kΩ for 5 V) and let firmware or the PHY connect the pull-up only with VBUS present; for hubs, VBUS_DET from upstream VBUS through a 2:1 divider.

References. USB 2.0 §7.2.1 (no pull-up power unless VBUS is present, remove within 10 s), §7.1.5.1 (pull-up voltage derived from or controlled by VBUS); AN4879 §2.6 (VBUS sensing mandatory for self-powered devices), §3.1.1; USB251xB §3.3 (pin descriptions: VBUS_DET).