cancel
Showing results for 
Search instead for 
Did you mean: 

USB initialization for NUCLEO-H723ZG board

Monk Eastman
Associate

Hi,

I have a problem when I try to use the USB-HS, in FS mode without ULPI, on the NUCLEO-H723ZG board. 

In HAL_PCD_MspInit() function for H7,  the pins are not initialized. And the USB doesn't work.

MonkEastman_0-1691469871934.png

But in the .IOC file, the USB_OTG_HS_DP and USB_OTG_HS_DM pins are active.

MonkEastman_1-1691469988386.png

But, when I use NUCLEO-F746ZG, the USB_DP_Pin and USB_DM_Pin pins, are initialized fine and work.

MonkEastman_2-1691470140430.png

Did I do something wrong? 

I can made a new define for HAL_PCD_MspInit() function, in other file, USBD-Conf.c for example. Like a wiki page said . But when I regenerate my code STM32CUBEMX writes again HAL_PCD_MspInit() function in stm32h7xx_hal_msp.c file.

Thanks

 

1 REPLY 1
TDK
Guru

Pretty sure they're initialized somewhere in a different file somewhere. I'm looking, but having a heck of a time finding it... Will check back when I do.

My HAL_PCD_Init looks like yours and the interface works.

Edit: I can't find it, but they're initialized using a different register which overrides the GPIO settings. Note that in the data sheet there is not an alternate function defined for USB.

On the STM32F7, there IS an alternate function for USB, so they're defined differently.

If you feel a post has answered your question, please click "Accept as Solution".