Skip to main content
bobert
Associate II
March 2, 2019
Solved

STM32F730Z8 USB failure with generated code

  • March 2, 2019
  • 3 replies
  • 1000 views

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?

This topic has been closed for replies.
Best answer by bobert

@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.

3 replies

Khouloud ZEMMELI
ST Employee
March 4, 2019

​Hello @bobert​ 

Thank you for the feedback.

Can you please share your ioc file ?

Regards,

Khouloud.

bobert
bobertAuthorBest answer
Associate II
March 4, 2019

@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.

bobert
bobertAuthor
Associate II
March 4, 2019

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.