Skip to main content
Graduate II
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.

    This topic has been closed for replies.
    Best answer by FBL

    Hi @NiM 

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

    4 replies

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

    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.

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

    Technical Moderator
    April 24, 2025

    Hi @TDK 

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

    FBL_1-1745508160733.png

     

     

    NiMAuthor
    Graduate II
    May 29, 2025

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

    FBLAnswer
    Technical Moderator
    May 29, 2025

    Hi @NiM 

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