2025-12-19 8:42 AM
Here is a more professional and technically concise rephrasing of your post, optimized for a developer forum or technical support ticket:
Subject: Clarification on VBUS Sensing and Internal Pull-up Management for STM32WB55
Hello,
Based on the STM32 USB Training MOOC, it is highly recommended to implement VBUS sensing to distinguish between a "Suspended" state (no bus activity) and a "Disconnected" state (physical cable removal). This prevents back-powering the host via the internal D+ pull-up resistor when the device is self-powered.
However, I’ve noticed a few discrepancies regarding the STM32WB55 implementation:
Tooling: In STM32CubeIDE (Device Configuration Tool), there is no dedicated "VBUS Sensing" pin option available for the USB peripheral on this specific MCU series.
Reference Hardware: Looking at the P-NUCLEO-WB55 schematics, there is no voltage divider or direct trace connecting VBUS to a GPIO for sensing purposes.
Could someone please clarify the following for a self-powered design:
Hardware: Should VBUS sensing be implemented using a standard GPIO (via a voltage divider) since a dedicated VBUS pin is absent?
Software: Is the logic to toggle the internal pull-up (USB_BCDR_DPPU) based on VBUS presence intended to be handled entirely in user code (as opposed to generated code)?
Nucleo Board Design: Considering the Nucleo can be powered via the ST-LINK USB port while the User USB port is disconnected, should this board have included a VBUS sensing circuit?
Thanks in advance for the support!