cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F730Z8 USB failure with generated code

bobert
Associate III

I just designed a board with the new STM32F730Z8 value line with embedded USB high speed PHY. I'm using a 16MHz external crystal and I am using the default code generated with CubeMX. It fails in the USBD_Init function. Following it through at first glance I found that in usbd_conf.c there is this line:

hpcd_USB_OTG_HS.Init.phy_itface = USB_OTG_ULPI_PHY;

I changed the interface to USB_OTG_HS_EMBEDDED_PHY but it still fails. I imagine there could be some other settings that may be wrong as well. Any guidance on this?

1 ACCEPTED SOLUTION

Accepted Solutions

@Khouloud ZEMMELI​ 

I confirmed there is a problem. I created a new project for the STM32F723ZE and it ran on the F730.

Diffing the files shows two places it is different, the first was the USB_OTG_HS_EMBEDDED_PHY as listed above, and it also included:

__HAL_RCC_OTGPHYC_CLK_ENABLE();

in the HAL_PCD_MspInit function. Making those two changes allows the MX_USB_Init function to succeed. I can see the device connect to my computer but it has an error message. I think this particular problem is solved.

View solution in original post

3 REPLIES 3
Khouloud ZEMMELI
ST Employee

​Hello @bobert​ 

Thank you for the feedback.

Can you please share your ioc file ?

Regards,

Khouloud.

bobert
Associate III

I have included the ioc file.

Since switching the interface to USB_OTG_HS_EMBEDDED_PHY it fails due to a timeout waiting for the internal LDO to be enabled.

@Khouloud ZEMMELI​ 

I confirmed there is a problem. I created a new project for the STM32F723ZE and it ran on the F730.

Diffing the files shows two places it is different, the first was the USB_OTG_HS_EMBEDDED_PHY as listed above, and it also included:

__HAL_RCC_OTGPHYC_CLK_ENABLE();

in the HAL_PCD_MspInit function. Making those two changes allows the MX_USB_Init function to succeed. I can see the device connect to my computer but it has an error message. I think this particular problem is solved.