2025-04-22 9:15 PM
I want to use port PA9 of STM32H743XGH6 as “FS_VBUS”.
In this case, which number should I put in the target register for the alternate function?
I understand that if I use CubeMX, it will set it automatically.
2025-04-23 5:47 AM
It does not correspond to an AF. It is an "additional function" which will be active when it's configured within the USB registers. It hijacks the pin.
Probably from the VBDEN bit:
Kind of like the PH0/PH1 pins--they have HSE functionality regardless of the GPIO configuration when HSE is enabled.
2025-04-24 6:31 AM - edited 2025-04-28 7:13 AM
Hi @NiM
Since VBUS sensing is defined as additional function, it should be left at its default state (analog mode). So, you should configure PA9 as an input with no pull-up or pull-down resistors, and ensure it is in analog mode.
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-24 6:53 AM
> Since VBUS sensing is defined as additional function, it should be left at its default state (analog floating input).
Is this documented anywhere? Where? I've looked, maybe I've missed it.
2025-04-24 8:24 AM
2025-04-24 9:10 AM
Thanks. It should probably be changed to say
... default state (analog), not as alternate....
Since input mode is different than analog mode and saying "floating input" to mean "analog" is misleading.
2025-04-28 7:18 AM
Apologies for the confusion @TDK. I forgot about this. For STM32H743, as per RM0433, the VBUS sense pin should remain in its default analog mode. In contrast, for STM32F411, the default state is input mode. The pin should be left unconfigured to allow sensing, as additional functions are directly managed through peripheral registers and should remain at their reset values.
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.