Skip to main content
Associate III
July 28, 2025
Solved

USB CDC using USBX on F411

  • July 28, 2025
  • 1 reply
  • 232 views

I am just a bit confused about how the CDC examples using USBX work. In the sample I've seen it seems that the code sets up some sort of UART to USB bridge. I think I don't need the UART and wanted to send and process data like the classic library used to do. However, when I remove the UART code, the device enumerates but USBD_CDC_ACM_Activate is now never called. Is the UART essential to using USBX or did I miss something in refactoring the program?

Best answer by FBL

Hi @mahirmahota 

  • The UART in the USBX CDC example is just for bridging USB to a physical UART; it’s not required for USB CDC functionality.
  • If USBD_CDC_ACM_Activate is not called after removing UART code, it usually means the USB CDC interface is not fully or correctly initialized.
  • Check that your USB descriptors, endpoints, and USBX CDC class initialization remain correct and complete after removing UART. Make sure also, the CDC interface and endpoints (interrupt IN, bulk IN/OUT) are properly configured and enabled.

1 reply

FBLBest answer
Technical Moderator
August 11, 2025

Hi @mahirmahota 

  • The UART in the USBX CDC example is just for bridging USB to a physical UART; it’s not required for USB CDC functionality.
  • If USBD_CDC_ACM_Activate is not called after removing UART code, it usually means the USB CDC interface is not fully or correctly initialized.
  • Check that your USB descriptors, endpoints, and USBX CDC class initialization remain correct and complete after removing UART. Make sure also, the CDC interface and endpoints (interrupt IN, bulk IN/OUT) are properly configured and enabled.
To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL