2025-05-03 6:05 AM
I want to use the STM32G0B1CET6N and communicate to this device using USB Full Speed (FS).
I chose this model, because it has the internal "HSI48 RC" Oscillator, which can direclty supply a 48 MHz clock to the USB device.
Thats the configuration:
The STM32 will act as a "Communication Device Class (Virtual Port Com)"
I want to supply my whole PCB using the Power from the USB Port from my Laptop (5V/500mA). So I read about the "USB_VBUS"-Feature, which I think would make sense for my application.
I found this in the Datasheet:
I was not able to find the "USB_VBUS" activate Box in the CubeMX configurator!
So thats why I think, that this model maybe does not support this option....however the Datasheet says otherwise.
I am confused! Maybe it is always active, as soon as you enable USB connectivity? Please help me.
2025-05-03 7:23 AM - edited 2025-05-03 7:33 AM
When USB is enabled, it uses PA11. Since USB_VBUS is on pin PA9, which is shared with PA11, you can't use both at the same time.
You can bring VBUS to any GPIO and monitor it manually if desired.
If your device is always bus-powered, there is no need to monitor VBUS, you can assume it's always enabled.