2025-07-22 12:47 AM
Hello everyone,
I’ve integrated USBX configured as a Mass Storage Class (MSC) device into my project, which uses the STM32H743BITx MCU. The project compiles successfully, and the system detects when a USB device is connected. However, enumeration fails.
I’m wondering if this issue could be related to the USB type or the clock configuration. I’ve read that many USB problems stem from clock accuracy.
I’m currently using the internal clock source, specifically the 48 MHz HSI48 oscillator for USB. Is this oscillator accurate enough for USB operations, or is it preferable to use a PLL-generated 48 MHz clock? Unfortunately, I don’t have an external crystal available.
When I try to configure the USB clock using a PLL (e.g., PLLQ) with HSI, I encounter the following error in CubeMX:
“PLL Mux should have HSE as input”
Also, I’m following the same layout as the schematic of the Discovery board. Has anyone experienced similar issues or found a reliable configuration without an external crystal?
Thanks in advance!
2025-07-22 2:13 AM
When using external HS PHY, clock is provided by that PHY through the dedicated OTG_HS_ULPI_CK pin.
The system clock primary source shouldn't matter, only the clock should be fast enough so AHB is able to feed the OTG ULPI interface:
To guarantee a correct operation for the USB OTG_HS peripheral, the AHB frequency should be higher than 30 MHz.
> When I try to configure the USB clock using a PLL (e.g., PLLQ) with HSI, I encounter the following error in CubeMX:
Nothing is perfect.
JW
2025-07-22 2:22 AM
Just to clarify, are you saying that the 48 MHz USB clock isn’t needed in this case, since the external PHY provides the clock through OTG_HS_ULPI_CK, and the only requirement is that the AHB clock is fast enough to drive the ULPI interface?
This clock is not needed?
2025-07-22 2:37 AM
hello @massimoperdigo
I really recommend using an external crystal clock for USB High Speed (HS) to ensure a clean, stable signal. Also, verify that ULPI pins are configured for very high speed and check the schematics to confirm the correct ULPI pin assignments.
2025-07-22 2:43 AM
To be honest, I'm not entirely sure. The documentation is far from being clear. I am not ST.
JW
2025-07-22 2:46 AM
xD
2025-07-22 2:49 AM
Are you saying that it won't work with the HSI48?
this is done, and everything is OK. I can read the vendor's ID and product ID.
However, it fails to enumerate. I can provide whatever you ask me to solve this issue.
Thanks,