2025-11-04 12:26 AM
Hello all,
I’m hitting a USB edge case on an STM32H573 in the 68-pin package (no VBUS sense pin, no VDDUSB domain).
My setup (works fine in application):
The product is self-powered (3V3 is always on). Because the package has no VBUS_SNS, I detect bus presence with a VBUS → resistor divider → buffer → GPIO (interrupt). My firmware only enables the USB device and D+ pull-up when this GPIO says VBUS is present, so we don’t “attach” or back-power a sleeping PC. That part is solid.
The problem (ROM bootloader only):
When I enter the System Memory bootloader and select USB DFU, the ROM seems to bring up the USB device and assert the D+ pull-up even if VBUS is absent (e.g., cable plugged into a powered-off PC or an unpowered hub). That effectively signals attach and can source current toward the host through D+/ESD paths—i.e., not USB-compliant for a self-powered device.
Easy repro:
H573 68-pin board, self-powered 3V3.
Ensure no VBUS (PC off / hub unpowered).
Boot to System Memory → USB DFU.
D+ goes high anyway.
What I’m looking for:
Is this expected behavior for this device/package (no VBUS sense available to ROM)?
Is there any option-byte setting or ROM bootloader revision that defers the pull-up until VBUS is actually present (possibly via a GPIO)?
If not, what’s ST’s recommended workaround for self-powered designs on this package?
Thanks!
Nir
2025-11-04 4:44 AM
> Is this expected behavior for this device/package (no VBUS sense available to ROM)?
Yes. According to AN2606, there is no provision for reading VBUS before trying to connect with the USB DFU bootloader. Only the DM/DP pins are used.
> Is there any option-byte setting or ROM bootloader revision that defers the pull-up until VBUS is actually present (possibly via a GPIO)?
No.
> If not, what’s ST’s recommended workaround for self-powered designs on this package?
Don't use the system bootloader, or implement a hardware solution to prevent those lines being energized without VBUS.