Skip to main content
Associate
August 20, 2026
Question

STM32U5G9J-DK2 USB CDC not working on USBX CDC_ACM example

  • August 20, 2026
  • 4 replies
  • 55 views

I am working with the STM32U5G9J-DK2 Discovery kit and trying to use the USBX CDC_ACM device example. The available project description says this example demonstrates an Azure RTOS USBX USB device communication class (CDC_ACM) application that emulates a USB-to-UART bridge and provides the required device and class descriptors for a compliant USB CDC_ACM device.

According to the example description, the application creates three threads: one to initialize the USB OTG HAL PCD driver and start the device, one to read data from the virtual COM port, and one to send received data over UART. The same description also says that the USB device start/stop is controlled through messages coming from the USB_PD interface when the board is plugged into or unplugged from the host PC.

I would like to confirm the correct hardware connection and board configuration for this use case, because the kit also includes an STLINK-V3EC with its own USB Virtual COM port bridge. The documentation states that the board features a high-speed USB Type-C connector (CN1) with USB 2.0 high-speed-compatible interface and 5 V / 500 mA power capability, while the STLINK-V3EC provides a separate VCP function to communicate with the PC.

I also found that the STM32U5x9J-DKx supports a USB HS 2.0 interface on USB Type-C connector CN4, compatible with USB Type-C rev. 1.3. By default, the board behaves as a self-powered USB device when JP4 is set to STLK, and the same connector can also power the board as a sink device if JP4 is set to USBC and the USB Type-C current/voltage conditions are respected.

Could someone please clarify:

  1. Which exact USB Type-C connector should be used for the USB CDC device example versus the STLINK VCP path?
  2. Whether the USB_PD-controlled start/stop behavior in the example is required for normal CDC enumeration on this board?
  3. What JP4 setting is expected for a standard PC connection when using the board as a USB device on the USB Type-C port?

4 replies

Mike_ST
ST Technical Moderator
August 20, 2026

Hello,

I’m not sure to understand on what board you’re actually working: DK1 (MB1829 with round display) or DK2 (MB1918 with rectangular display), because your last question mentions JP4 that is on DK1, when at the beginning you wrote you’re working on DK2.

For question 1:

DK1 (MB1829): CN4

DK2 (MB1918): CN2

For question 2:

I don’t have the answer, I can’t look at the example atm.

For question 3:

As you’re talking about JP4, it is for DK1 and the setting should be on “USBC”, pins 5-6, when the board is powered from CN4.

For DK2, JP1 should be on “USB” position, pins 5-6, when the board is powered from CN2

 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
Associate
August 20, 2026

Hi ​@Mike_ST 

 

I am using DK2 board. My questions may not have been accurate. Let me start over. I am trying to see COM port under device manager by connecting USBC to the application usb port. Purpose is to establish USB CDC communication with DK2. But I cannot get COM port on the host. I am using USB CDC ACM example. 
 

Do you by chance have a working code/example of this functionality for STM32U5G9 series? 

Mike_ST
ST Technical Moderator
August 24, 2026

Hello,

Please get the firmware library here:

https://www.st.com/en/embedded-software/stm32cubeu5.html#

Compile and flash the STM32Cube_FW_U5_V1.9.0\Projects\STM32U5G9J-DK2\Applications\USBX\Ux_Device_CDC_ACM

example.

If it doesn’t workin the readme.html, please follow the “Threadx usage hints”, you might need to change the linker files.

After you plug a cable in CN2, another device should appear in the manager: “USB Serial Device”.

 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
Visitor II
August 24, 2026

This is a very informative discussion about STM32U5G9J-DK2 USB CDC and USBX CDC_ACM troubleshooting. Developers can learn a lot from the shared solutions and debugging approaches. For educational updates and testing service information, Latest Exam Results 2026 Pakistan India: https://eduresults24.com/pts-pakistan-testing-service/ is also a helpful resource.