Skip to main content
Graduate
November 11, 2024
Solved

STM32U5G9J-DK2 USB CDC-ACM Stuck in USB Core Reset

  • November 11, 2024
  • 1 reply
  • 1064 views

Issue: I am working with the STM32U5G9J-DK2 board using USB CDC-ACM in device mode, generated using CubeMX. However, I am encountering an issue where the application USB port is not recognized in the Device Manager. Only the ST-LINK Virtual COM Port appears, and there is no additional COM port for the USB CDC device.

What I Have Tried:

I generated the project using CubeMX and made sure to configure USB_OTG_HS in CDC-ACM mode.
After generating the code, I followed the standard procedure and used the example code from the following link:  https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5G9J-DK2  
When I run the code, it gets stuck in the USB core reset function (USB_CoreReset();).
I am providing power through the application USB port, but it still does not appear in the Device Manager.
Questions:

Do I need to short any specific pin or connection on the STM32U5G9J-DK2 board to enable the application USB port for detection?
Could this issue be related to the hardware configuration or the initialization sequence in the CubeMX-generated code?
Is there any additional modification needed in the usb files to resolve this issue?
Additional Information:

I have already enabled the crystal/ceramic resonator for RCC in CubeMX.
Any help or guidance would be greatly appreciated!

 

    This topic has been closed for replies.
    Best answer by waclawek.jan

    I don't use the 'U5 nor CubeMX, but "stuck in core reset" usually means, that given peripheral does not have clock. In the high-end 'U5 and OTG_HS, setting up clocks is a nontrivial process.

    waclawekjan_1-1731332791157.png

     

    In the 'U5 there are additional obstacles to getting USB going in form of separate power supply pins and their isolation switches.

    waclawekjan_0-1731332587572.png

    JW

    1 reply

    Super User
    November 11, 2024

    I don't use the 'U5 nor CubeMX, but "stuck in core reset" usually means, that given peripheral does not have clock. In the high-end 'U5 and OTG_HS, setting up clocks is a nontrivial process.

    waclawekjan_1-1731332791157.png

     

    In the 'U5 there are additional obstacles to getting USB going in form of separate power supply pins and their isolation switches.

    waclawekjan_0-1731332587572.png

    JW

    saikumarAuthor
    Graduate
    November 14, 2024

    Thanks for your advice, it was helpful, and I was able to solve one of my issues.

    By adding a function __HAL_RCC_SYSCFG_CLK_ENABLE() ; in the System Clock Configuration function SystemClock_Config() ; , I was able to exit from the

    static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx); function successfully.

    However, I'm still facing an issue where the USB device is not being recognized by the host (not visible in Device Manager). I've attached my project .zip file, including the .ioc configuration file. I would appreciate any guidance on resolving this USB recognition issue. Specifically, I am not sure if there might be a problem with the USB initialization or descriptor configuration. Any insights or suggestions would be helpful.

    Thanks in advance!