Skip to main content
Visitor II
July 19, 2025
Question

STM32 USB CDC not working for F0, F4 boards

  • July 19, 2025
  • 1 reply
  • 272 views

I have tried USB examples for Stm32F070, F401, F407 Black board and calling a single "CDC_Transmit_FS" function to print a string but none is working. The hcdc->TxState value is some garbage big value so it always stay busy and also not getting interrupts for USB receive as I have put break points in it too. The STM32 device show up as "composite" instead of VCP.

For configuration it is RCC->Bypass Clk, USB connectivity->Device Only, USB_Device->VCP, heap size->0x1000.

1 reply

Technical Moderator
October 23, 2025

Hi @Lakshay 

Would you point me directly to example firmware not working, and full hardware setup including board revision? 

If your device enumerates incorrectly or driver installation is stuck, changing the PID is a workaround to force the OS to reload the USB driver and re-enumerate the device properly.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL