cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7S78-DK: USBX standalone (CDC ACM + PIMA) works in FS; fails in HS

polEscudero
Associate II

 in HS, HAL_PCD_Init fails with timeout in USB_CoreReset

 

Hello everyone,

I am working with an STM32H7S78-DK and I’m trying to use USBX in standalone mode for a composite USB device (CDC ACM + PIMA) over USB_HS at 480 Mbit/s.

At the moment, I have only implemented the CDC ACM class. PIMA will be added later.

Situation:

  • If I configure USB as Full Speed, the peripheral initializes correctly.
  • If I switch to High Speed, initialization fails at:
    MX_USBX_Init() -> MX_USBX_Device_Init() -> MX_USB_OTG_HS_PCD_Init() -> HAL_PCD_Init(&hpcd_USB_OTG_HS)

The error occurs at:

if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK) { ... }

Because inside USB_CoreInit, in USB_CoreReset, a HAL_TIMEOUT is returned while waiting for the CSRST bit in GRSTCTL to clear:

  • Core Soft Reset (CSRST) is written
  • The bit never clears and eventually times out

Technical summary:

  • FS works, HS does not
  • The timeout occurs right after PHY selection and USB core reset
  • The issue seems related to clock/PHY/HS configuration
  • I have also tried configuring the HS peripheral but forcing Full Speed operation (12 Mbit/s), and it still does not work

Has anyone successfully configured USB_HS with USBX standalone on this family and can confirm which settings are required to avoid this timeout?

In particular:

  • Is an external ULPI PHY mandatory to reach 480 Mbit/s on this board? From what I understand based on the microcontroller datasheet, it should not be strictly necessary, but I would appreciate confirmation.
  • Which exact clocks must be enabled for the HS core to complete CSRST?
  • Are there any critical settings in CubeMX (PHY selection, VBUS sensing, power/clock domains) that commonly cause CSRST to get stuck?
  • Does CDC ACM + PIMA in standalone mode require any special HS initialization sequence?

I’ve attached a ZIP file with the full project for reference.

Thanks in advance!

 
1 ACCEPTED SOLUTION

Accepted Solutions
polEscudero
Associate II

I apologize in advance because this same question has already been answered in another post. I am attaching the link below:

https://community.st.com/t5/stm32-mcus-embedded-software/usb-hs-on-the-stm32h7s3l8/m-p/740800#M56769

In summary, in case you don’t want to read the whole post: to use USB-HS with this microcontroller, it is necessary to enable the USB_HS_REG. This can be done in CubeMX under the Power and Thermal category.

polEscudero_0-1776324739757.png

 

View solution in original post

1 REPLY 1
polEscudero
Associate II

I apologize in advance because this same question has already been answered in another post. I am attaching the link below:

https://community.st.com/t5/stm32-mcus-embedded-software/usb-hs-on-the-stm32h7s3l8/m-p/740800#M56769

In summary, in case you don’t want to read the whole post: to use USB-HS with this microcontroller, it is necessary to enable the USB_HS_REG. This can be done in CubeMX under the Power and Thermal category.

polEscudero_0-1776324739757.png