cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with USB CDC-ACM on STM32U5G9ZJT6Q - Device Not Recognized in Device Manager

saikumar
Associate III

Hello ST Community,

I am working with the STM32U5G9ZJT6Q MCU, and I have generated the code using CubeMX for USB CDC-ACM (Communication Device Class - Abstract Control Model). The code seems to be running fine as it is entering the main loop without any errors. However, the USB CDC device is not being recognized in the Device Manager on my PC when I connect it.

Configuration Details:
MCU: STM32U5G9ZJT6Q
USB Mode: USB_OTG_HS configured in device-only mode.
Middleware: USB CDC-ACM (with SOF enabled).
System Clock: 128 MHz & HSE: 16 MHZ
Operating System: Bare-metal (no RTOS).
USB Cables: Using two separate USB cables:
One for ST-LINK (for debugging and power supply).
One for the application USB (for CDC communication).


Issue:
The application appears to run without issues (I can see it looping in main()), but the USB CDC device does not show up in the Device Manager on my PC. It seems that the USB is not getting enumerated correctly.

Additionally, in Wireshark USB packet capture, only the descriptors for the ST-LINK USB interface are visible, and there are no descriptors detected for the application USB cable.

The OTG_HS_IRQHandler() interrupt is not being triggered, indicating that the USB interrupt is not being generated or handled properly.

Steps Taken:
Verified that the code enters the MX_USBX_Device_Init() function without errors.
Checked USB connections and ensured proper power supply to the USB device.
Verified that MX_USB_OTG_HS_PCD_Init() is called and initialized correctly.
Ensured that the HAL_PCD_Start() function is executed.
I have attached the .ioc file for reference.


Potential Issues and Questions:
Clock Configuration: Could there be an issue with the USB clock settings (HS PHY, PLL, or HSE settings)?
USB Descriptors: Could incorrect USB descriptors (e.g., VID/PID or endpoint configurations) prevent proper enumeration?
Driver Issues: Do I need to install specific drivers for the CDC device to be recognized on Windows?
Initialization Issues: Are there any additional initialization steps required for STM32U5 series USB OTG HS that might not be automatically configured by CubeMX?
Hardware Setup: Is there a need for an external crystal or specific resistor configurations on the USB lines for proper operation?
I would appreciate any insights or suggestions on what might be causing this issue or how to resolve it.

I am attaching my .ioc file for further details.

Thank you in advance for your help!

0 REPLIES 0