Skip to main content
Associate
May 14, 2025
Solved

STM32F407 USB Device Not Recognized as Virtual COM Port (VCP)

  • May 14, 2025
  • 7 replies
  • 1233 views

Hello everyone,

I’m working on a project where I am using STM32F407 and I’m trying to establish USB communication between my STM32F407 Discovery board and a PC. I have configured the board for USB_OTG_FS in STM32CubeMX, and I’m trying to use it as a Virtual COM Port (VCP). However, when I connect the board to the PC using the USB_FS port, it’s not being recognized as a COM port or any device at all in the Device Manager.

I want to read the output of the ADC channels using the hercules software 

I would really appreciate any suggestions or guidance on:

  1. Getting the board to show up as a VCP in the Device Manager.
  2. Troubleshooting USB enumeration issues.
This topic has been closed for replies.
Best answer by FBL

Hi @Sanyam_07 

Weird, it seems a recurring issue on F407 Disco USB.

I think the issue must be linked to the hardware ! Check your solder bridges, resistors, jumpers and connector CN5! Refer to UM1472 precisely section 6.1.3 ST-LINK/V2-A VCP configuration, if you would like to use STlink to echo, you may need flying wires. 

Could you specify your laptop's OS.
Maybe as suggested @Pavel A. try this example code.

7 replies

ST Technical Moderator
May 15, 2025

Hi @Sanyam_07 

I didn't catch your thread from here.

Ensure you're using a USB cable that supports data transfer, not just charging. Some cables only provide power without data capabilities.

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
Sanyam_07Author
Associate
May 18, 2025

No, I am using a data cable and I have tried using it with another board and it is working with it and USB communication is happening

ST Technical Moderator
May 19, 2025

Hi @Sanyam_07 

Which board revision are you using ? I'm using MB997 D-01 without issues. 

FBL_0-1747644457037.png

Otherwise, attach your full software setup.

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
Pavel A.
May 18, 2025

Hi,

Please start from one of ready USB device mode examples suitable for your STM32F407 Discovery board.

The ST package does not have such examples for this exact board so look in other similar boards.

 

waclawek.jan
Super User
May 19, 2025

When in bootloader mode (e.g. through BOOT0/BOOT1 pins), does it show up in PC as DFU device?

JW

FBLBest answer
ST Technical Moderator
May 19, 2025

Hi @Sanyam_07 

Weird, it seems a recurring issue on F407 Disco USB.

I think the issue must be linked to the hardware ! Check your solder bridges, resistors, jumpers and connector CN5! Refer to UM1472 precisely section 6.1.3 ST-LINK/V2-A VCP configuration, if you would like to use STlink to echo, you may need flying wires. 

Could you specify your laptop's OS.
Maybe as suggested @Pavel A. try this example code.

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