Skip to main content
Visitor
September 28, 2026
Question

STM32C55 USB virtual com port issue.

  • September 28, 2026
  • 1 reply
  • 20 views

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. 

1 reply

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.