Skip to main content
Graduate
November 6, 2024
Question

Struggling with USB CDC-ACM Communication on STM32U5G9J-DK2

  • November 6, 2024
  • 1 reply
  • 1609 views

I'm currently working with the STM32U5G9J-DK2 board, and as a newcomer to this board, I’m finding the USB CDC-ACM setup challenging. I’m using CubeMX 6.6.1 to generate the initial code, intending to send data over USB. However, I'm facing a few issues:

Dual USB Ports (ST-Link & Application USB): This board has two USB ports – one for ST-Link (for debugging and programming) and another for application USB. My PC detects the ST-Link port in Device Manager (showing as both a COM port and ST-Link Debug), but the application USB port is not recognized. I assume this port is where the USB CDC communication should be set up, but I’m unsure how to get it detected.

Lack of CDC Transmit Function: On other STM32 boards like the H7 series, there’s a CDC_Transmit_HS function that makes sending data relatively straightforward. However, I couldn’t find a similar function in the USB middleware for the STM32U5. I’m unclear on the exact steps for data transmission over CDC-ACM with this board.

Data Transmission Flow: Without the familiar functions from previous MCU series, I'm unsure about the correct flow or setup needed for USB data transmission here. Is there an equivalent function or a specific method for this board that I might be missing?

Any guidance from those who have worked with the STM32U5 series or similar setups would be greatly appreciated, especially on how to:

Enable the application USB port in Device Manager.
Properly configure and initiate data transmission using CDC-ACM.
Thanks in advance for any advice or resources!

    This topic has been closed for replies.

    1 reply

    Graduate
    November 6, 2024

    You may find some tutorials on USB CDC in Knowledge Base section of this website. I would also suggest to update your software (CubeIDE, CubeMX) to the current version.

    saikumarAuthor
    Graduate
    November 8, 2024

    Hi, I reviewed the code, but as I am not using RTOS or threads, I'm facing an issue with USB CDC-ACM on the STM32U5G9-DK2 board. I don't have a direct sending function, and during the core initialization, the code seems to be getting stuck in the usb_coreReset() function. Additionally, when I try to execute the code, only the ST-Link cable gets recognized in the device manager, and not the application USB cable.

    Could someone provide a simple example code that sends a small buffer over USB CDC-ACM without using RTOS or threads? It would help me understand the flow and get a clearer starting point for my implementation.

    Thanks!

    Graduate
    November 8, 2024

    Look at the Knowledge base again. Your no-RTOS case is described there. Just read and follow.