cancel
Showing results for 
Search instead for 
Did you mean: 

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

Rlakos
Associate II

Hello everyone,

I’m working on an STM32F7 project where I’m trying to establish USB communication between my STM32F746 Discovery board and a PC. I am really new at this really first time. 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.

The only time I see a COM port is when I connect the ST-Link USB, which shows up as a Virtual COM Port. I have already:

  1. Enabled the USB_DEVICE in STM32CubeMX and selected the CDC class.
  2. Generated the code and set up the USB_DEVICE middleware.
  3. Tried with different USB cables to rule out a cable issue.
  4. Checked the board configuration, and the USB pins are correctly assigned.

Additionally, I configured the board to flash an LED to confirm it’s functioning, which works fine. My goal is to transfer files between the app I am currently developing and the STM32 board through USB.

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.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Rlakos 

You can start with this example for F756 eval board

STM32CubeF7/Projects/STM32756G_EVAL/Applications/USB_Device/CDC_Standalone at master · STMicroelectronics/STM32CubeF7 (github.com)

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'm out of offce with limited access to my emails.
Happy New Year!

View solution in original post

6 REPLIES 6
Pavel A.
Evangelist III

Start from some ready example in the ST Cube package. Do not trust CubeMX to generate a working project automatically.

Thanks, but so far, I could not find any ready example using USB_DEVICE as a VCP, which is the one I need since the board is going to be communicating and receiving files from the app. Do you know of any examples?

Hi @Rlakos 

You can start with this example for F756 eval board

STM32CubeF7/Projects/STM32756G_EVAL/Applications/USB_Device/CDC_Standalone at master · STMicroelectronics/STM32CubeF7 (github.com)

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'm out of offce with limited access to my emails.
Happy New Year!
Rlakos
Associate II

Hi, thank you for sending me the examples. They are pretty good, but I still get the same issue when I run the example. The St-Link is the only cable being recognized when I plug it into the computer, but the USB_FS when I plug the cable is not shown in the device manager either as a COM port or any other port. Do you know of any other issues that I can fix it. The idea is to be able to download firmware onto the board from an external application exe that I am developing into the board using the USB CDC protocol. Thanks for the help.

Hi @Rlakos 

Check your HW setup, there should be something missing. The example provided should be working. Check USB cable you are using supports data transfer. Reed carefully section 4.9 USB OTG FS 

 

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'm out of offce with limited access to my emails.
Happy New Year!

What's the primary clock source?

If internal bootloader is run (using BOOT0 pin), does the board connect as DFU?

JW