Skip to main content
Explorer II
September 22, 2025
Question

An example where HS USB is used as FS USB at STM32H743

  • September 22, 2025
  • 4 replies
  • 458 views

Hi Sir,

We managed to use HS USB port as FS USB on our PCB(there is no external PHY), but our partner  comments that there is no driver available for that purpose. Indeed I only see USB examples for HS USB or FS USB at STM32H7 source tar ball.

 

I believe that there must be such usage. Where can I get the example ?

 

Thanks.

 

Sincerely,

Jimmy 

    This topic has been closed for replies.

    4 replies

    ST Employee
    September 22, 2025

    Hello @Jimmy_Ma 

    You can find USB examples on GitHub at the following link: STM32CubeH7/Projects/STM32H743I-EVAL/Applications at master · STMicroelectronics/STM32CubeH7 · GitHub.

    In the Application section, there are specific examples tailored for the STM32H743 board, including USB Host and USB Device applications. 

    br 

    Jimmy_MaAuthor
    Explorer II
    September 22, 2025

    Hi @MOBEJ 

    Thanks for your prompt reply.

     

    However, I did check the STM32H7 repository & tried some application like CDC_standalone:

    Jimmy_Ma_0-1758529135970.png

    #define USB1_OTG_HS ((USB_OTG_GlobalTypeDef *) USB1_OTG_HS_PERIPH_BASE)

    #define USB2_OTG_FS ((USB_OTG_GlobalTypeDef *) USB2_OTG_FS_PERIPH_BASE)

    In other words, I am looking for some example with 

    #define USB1_OTG_FS ((USB_OTG_GlobalTypeDef *) USB1_OTG_FS_PERIPH_BASE)

     

    Please advise. Thanks.

     

    Sincerely,

    Jimmy

     

     

    Super User
    September 22, 2025

    > In other words, I am looking for some example with 

    > #define USB1_OTG_FS ((USB_OTG_GlobalTypeDef *) USB1_OTG_FS_PERIPH_BASE)

    There are no such examples, because ST have changed the naming convention. USB controllers now are named USB1, USB2 and so on instead of "FS" and "HS". Some of USB controllers are capable of both modes. The actual mode is set somewhere in the initialization code.

     

    Jimmy_MaAuthor
    Explorer II
    September 23, 2025

    Hi @Pavel A. @MOBEJ ,

    Thanks for the reply.

     

    So, I change PHY select for HS USB as below:

    Jimmy_Ma_1-1758595030734.png

    But the device seems to fail(timeout) when resetting PHY here:

    Jimmy_Ma_2-1758595145000.png

     

     

    Did we miss any thing else to modify for internal PHY select ?

     

    Please advise. Thanks.

     

    Jimmy

    Super User
    September 23, 2025

    Yes it looks like this. Also watch for other #ifdefs that affect the HS vs FS endpoint size limits  and so on.

     

     

    Technical Moderator
    September 23, 2025

    Hi @Jimmy_Ma 

    When building your project, you can choose which USB instance to be used and in which mode 

    FBL_0-1758621666361.png

    If you would like to use instance USB1_OTG_HS in full speed, you can simply reconfigure here the project to work in FS, make sure to  initialize the interface as follows

    hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
    
    hpcd.Init.speed = PCD_SPEED_FULL;

    CN18 should be used for USB Full Speed opereations