Skip to main content
Visitor II
September 28, 2026
Question

STM32C55 USB virtual com port issue.

Hello everyone. 

Hi everyone.
Please forgive any inaccuracies in this post—it’s my first one.

For my new project, I used the STM32C552KET6 microcontroller.
The chip is mounted on a custom PCB I designed.
One of the board's functions is to communicate with a PC via a virtual COM port (over USB).
I’ve successfully used this type of communication in other projects before on G4, L4 microcotrolers, but this time I can't get it working and have no idea where I might be making a mistake.
The electrical connections are definitely correct; I can connect to the microcontroller using STM32CubeProgrammer and read/write to Flash memory via USB.
I used the STM32CubeMX2 tool (version 1.1.1) for configuration.
The clock configuration is default, and the USB clock frequency is 48 MHz.
In the Connectivity section, I selected: USB_DRD_FS – DEVICE (device mode); all advanced features are disabled; the USB_DP and USB_DM pins are assigned to PA12 and PA11, respectively.
Global interrupts and IRQ handling are enabled.
I activated the USBX middleware and enabled the CDC ACM class with default settings.
In the Interfaces → Logical interface section, I enabled the device controller.
In the HW resources allocation section, I selected the USB_DRD_FS.DEVICE instance. 
I increased the system stack size from 512 to 8192.
After creating the project and programming the microcontroller, the computer does not detect any new device.

I searched online and found information indicating that the `app_usbx_init()` function should be used and that `app_usbx_process()` should be called within the main loop.
After implementing these functions in the project, the computer began detecting the device but reports an error: "USB device returned an invalid device descriptor – error code 43".
I use PC with system Windows 11 Pro.

I can't fix it. 
Can you help me. 

4 replies

Pavel A.
September 28, 2026

Unfortunately the CubeMX* generator does not always produce a 100% working project, and manual fixes are error prone.

The fastest self-help is to start from a ready example like this: 

 https://github.com/STMicroelectronics/STM32CubeC5/tree/main/examples/middleware/usbx/device_cdc_acm_uart_freertos

Adapt it to your board pinout. Then carefully compare how the USB setup differs from code generated by Cube.

The next option is to get a helping hand.

 

Andrew Neil
Super User
September 29, 2026

The fastest self-help is to start from a ready example like this: 

 https://github.com/STMicroelectronics/STM32CubeC5/tree/main/examples/middleware/usbx/device_cdc_acm_uart_freertos

Adapt it to your board pinout.

 

Absolutely - especially as a first project!

 

​@Paweł_k - avoid the “Adapt it to your board pinout” step by first getting it working on Nucleo board.

That will give you a known-good reference, against which you can compare & contrast your custom board.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
T_Hamdi
ST Employee
September 30, 2026

hello ​@Paweł_k 

Welcome to the ST Community Platform.

Please refer to this application for help identifying your mistake.

STM32CubeC5/examples/middleware/usbx/device_cdc_acm_uart_freertos at main · STMicroelectronics/STM32CubeC5 · GitHub .

If you still encounter any problem, please provide more details about your application.

Also, you may find the following document helpful for using USBX: USBX user guide - USBX 2.1.0 documentation

with regards,

Hamdi

 

"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.Hamdi Teyeb"
Uwe Bonnes
Chief
October 2, 2026

For a hardware test, boot to the system bootloader and look if your board enumarates as DFU