cancel
Showing results for 
Search instead for 
Did you mean: 

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

Sanyam_07
Associate II

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.
1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.


View solution in original post

7 REPLIES 7
FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.


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

Pavel A.
Super User

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.

 

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 Accept as Solution on the reply which solved your issue or answered your question.


I checked my board and the revision is MB997 E-01

I am still facing the issue where the USB device is not recognized (or gives a malfunctioned error) when I connect it to my PC using the USB OTG FS port.
Here’s what I have tried so far:

  • Used a data-capable USB cable and confirmed connection to the correct port.

  • Selected the CDC class in the USB_DEVICE middleware.

  • Installed the latest STM32 VCP drivers on my PC.

  • Tried on different USB ports and cables.

waclawek.jan
Super User

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

JW

FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.