2025-05-14 8:14 AM
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:
Solved! Go to Solution.
2025-05-19 7:21 AM
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.
2025-05-15 3:58 AM
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.
2025-05-17 9:17 PM
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
2025-05-18 2:52 AM
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.
2025-05-19 2:17 AM
Hi @Sanyam_07
Which board revision are you using ? I'm using MB997 D-01 without issues.
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.
2025-05-19 4:08 AM
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.
2025-05-19 4:51 AM - edited 2025-05-19 4:53 AM
When in bootloader mode (e.g. through BOOT0/BOOT1 pins), does it show up in PC as DFU device?
JW
2025-05-19 7:21 AM
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.