2025-09-21 7:53 PM
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
2025-09-22 12:44 AM
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
2025-09-22 1:22 AM
Hi @MOBEJ
Thanks for your prompt reply.
However, I did check the STM32H7 repository & tried some application like CDC_standalone:
#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
2025-09-22 10:28 AM - edited 2025-09-22 10:29 AM
> 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.
2025-09-22 7:40 PM
2025-09-23 12:55 AM - edited 2025-09-23 12:57 AM
Yes it looks like this. Also watch for other #ifdefs that affect the HS vs FS endpoint size limits and so on.
2025-09-23 3:17 AM
Hi @Jimmy_Ma
When building your project, you can choose which USB instance to be used and in which mode
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
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.