2025-06-29 4:50 AM
Hi ST team,
I'm working with the STM32U5-DK2 board and implementing USB Device MSC class using USBX and external flash (via OSPI) as storage. Everything works fine when VBUS sensing is disabled in STM32CubeIDE — the host detects the device correctly as a USB MSC device.
However, when I enable VBUS sensing in CubeIDE (i.e., "Device Only" mode), the USB device is not detected at all by the host (no enumeration).
Questions:
Why does enabling VBUS sensing prevent the device from being enumerated as a USB MSC device?
What are the minimum required CubeMX configurations to support VBUS-based detection (using PA9), but without using UCPD or USB PD features?
Is there any internal pull-up or alternate pin setting that needs to be done for PA9 in this context?
Is there any known erratum or additional hardware jumper/settings specific to the DK2 that could affect VBUS sensing?
Any guidance to make VBUS-based detection + USBX MSC work reliably (without relying on UCPD/PD) would be greatly appreciated.
Thanks!