2025-04-09 2:17 AM - edited 2025-04-09 2:31 AM
Hi,
I created custom board using STM32C071CBT6 MCU and using USB port in device only mode. I have connected VBuS sensing through potential divider circuit to GPIO PA10 of my controller. My device is self powered. I read some USB related articles from STMicro for other controllers and noticed that for self powered devices VBus sensing is mandatory and should be connected to PA9 as this pin has internal functionality of VBus sensing.
In my configuration I have disabled VBus sensing. However, my device is getting detected by host.
Do I have to enable VBus sensing as my device is self powered? If yes, then how it will impact functionality?
Should it be connected to PA9 for STM32C0xx also? Can I use PA10 with some code modifications, as my hardware is already developed?
I checked datasheet and reference manual of this MCU and could not find any reference of VBuS sensing through PA9.
Thanks,
Pradeep
2025-04-09 12:08 PM - edited 2025-04-09 12:12 PM
Hi @PPate.1
According to C071 nucleo schematics, PC0 is used for vbus sensing.
This post should be helpful Details of using USB without VBUS sensing - STMicroelectronics Community
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-04-11 8:18 AM
Hi @FBL,
C071 Nucleo has STM31C071RBT6 chip which is a 64 pin chip. This has PC0 pin. I am using STM32C071CBT6 chip which is 48 pin chip and it does not have PC0 pin.
Thanks,
Pradeep
2025-04-11 9:06 AM
My bad @PPate.1 Indeed PC0 is not available on STM32C071CBT6.
So as long you configure PA10 properly as Input and implement USB sensing logic in your firmware, also configure SYSCFG_CFGR1 register properly because pins PA9 and PA10 can be remapped in place of pins PA11 and PA12
it should work!
> about your question : How will it impact USB functionality if VBUS sensing is not enabled?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.