STM32U5G9J-DK2 USB CDC not working on USBX CDC_ACM example
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:
- Which exact USB Type-C connector should be used for the USB CDC device example versus the STLINK VCP path?
- Whether the USB_PD-controlled start/stop behavior in the example is required for normal CDC enumeration on this board?
- What JP4 setting is expected for a standard PC connection when using the board as a USB device on the USB Type-C port?
