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) CoreSTM32Cube_FW_H7_V1.8.0\Projects\STM32H747I-DISCO\Applications\USB_Device\HID_Standalone\readme.txt
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.
Don’t forget to enable USB global interrupt in NVIC Settings tab.
And now, let’s take look on pins of USB.
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 🙂 .