Skip to main content
Associate III
April 23, 2025
Solved

STM32H743XGH6 USB VBUS

  • April 23, 2025
  • 4 replies
  • 944 views

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.

Best answer by FBL

Hi @NiM 

If your application is self powered, VBDEN is mandatory to enable vbus sensing.

4 replies

TDK
April 23, 2025

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.

TDK_0-1745412146545.png

Probably from the VBDEN bit:

TDK_1-1745412406581.png

 

Kind of like the PH0/PH1 pins--they have HSE functionality regardless of the GPIO configuration when HSE is enabled.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Technical Moderator
April 24, 2025

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 "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
TDK
April 24, 2025

@FBL 

> 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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Technical Moderator
April 24, 2025

Hi @TDK 

I think It is not explicitly mentioned in all datasheets. See page 224

FBL_1-1745508160733.png

 

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
NiMAuthor
Associate III
May 29, 2025

Am I correct in understanding that I should set it to input mode and set VBDEN = 1?

FBLBest answer
Technical Moderator
May 29, 2025

Hi @NiM 

If your application is self powered, VBDEN is mandatory to enable vbus sensing.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL