STM32H747I-DISC1 – USB HS Tutorial

By | January 10, 2021

STM32H747 supports external USB High-Speed PHY. One is integrated also on STM32H747I-DISC1 board, I had bit struggle to get it working, so here are some of my notes.

First very important rule. Read example’s readme.txt. In this readme, we can find very important statement:

To select the appropriate USB Core to work with, user must add the following macro defines within the compiler preprocessor (already done in the preconfigured projects provided with this application):

– “USE_USB_HS” when using USB High Speed (HS) Core


So, let’s go specify it. Go to your project settings.

Then go to C/C++ General > Paths and Symbols > Symbols Path > GNU C and click Add. Into the Name, specify our USE_USB_HS and press OK.

Next important rule is to read your schematic and have properly configured pins. Firstly, let’s check out our MCU peripherals configuration.

USB_OTG_HS configuration

Don’t forget to enable USB global interrupt in NVIC Settings tab.

USB_DEVICE_M7 configuration

And now, let’s take look on pins of USB.

STM32H747I-DISC1 Schematic

When I started comparing, I noticed that ULPI_NXT pin is on PC3, but it should be on PH7. So now just move it to PH7. (Hold CTRL, click down to PC3 and move it to PH4).

Now just build and flash it, and it should work like a charm 🙂 .