2026-02-25 3:17 AM - edited 2026-02-25 5:04 AM
Hello STM32 friends!
I've previously used USB on an STM32G474RET6, and it was initialized with the function:
MX_USB_Device_Init()The goal is to use it as a USB serial port to communicate with my device, and that worked.
Now I'm using the STM32U5G7VJT6, and this time, the USB is initialized with the function:
MX_USB_OTG_HS_PCD_Init()But this function hangs.
I've enabled USB interrupts in the STM32CubeMX, but that doesn't help.
I haven't been able to isolate the problem yet, but it's probably something very simple.
Is this another new USB library?
As requested, I attached my IOC file.
What could be the problem?
Sincerely, Jack
2026-02-25 3:55 AM
Hi @Jack3
Would you attach your IOC file?
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-25 5:05 AM - edited 2026-02-25 5:05 AM
2026-02-25 5:38 AM
Hi @Jack3
To narrow down the issue, try to reproduce it using a minimal configuration, enabling only the peripherals directly related to the problem and removing the configuration of any unrelated peripherals.
Do you reproduce using a reference board? If not, you should provide better details about your hardware.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-25 10:19 PM - edited 2026-02-25 10:53 PM
Unfortunately, that's not very helpful.
It's a custom-built board, but that shouldn't have anything to do with the issue here.
Only USB DP and USB DM are used for USB.
Below, I added the USB part of the schematic, it's straight forward:
https://www.we-online.com/components/products/datasheet/82400102.pdf
The other configured peripherals are necessary for the project and hopefully have nothing to do with USB.
So I can safely assume the new HAL library for USB is defective, right?
2026-02-26 4:27 AM - edited 2026-02-26 4:41 AM
Hi @Jack3
OK, in my understanding, you might have usb core soft reset stuck due to incorrect configuration or initialization.
I suggest you to narrow down the issue and test this template project under this path STM32Cube_FW_U5_V1.8.0\Projects\STM32U5x9J-DK\Templates
You can find this article also useful.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-27 12:11 AM
Hi FBL, thank you very much!
My configs are all the same (Clocks, USB), and no luck on this side.
So I guess it's the HAL libraries itself (STM32Cube FW_U5 V1.8.0).