2023-08-07 10:18 PM
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.
But in the .IOC file, the USB_OTG_HS_DP and USB_OTG_HS_DM pins are active.
But, when I use NUCLEO-F746ZG, the USB_DP_Pin and USB_DM_Pin pins, are initialized fine and work.
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
2023-08-08 06:01 AM - edited 2023-08-08 06:18 AM
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.