-1

I'm a beginner in the USB stack on STM32F4.

How do I create a project using STM32CubeMX (STM32F4 Discovery) for USB CDC to have 2 virtual COM ports in Device Manager?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
HASSAN
  • 41
  • 1
  • 5

1 Answers1

0

Try reading the Stack Overflow post STM32CubeMX USB CDC VCP?. I think that it will solve your problem

In this post there is a guide about the procedure you can make. Remember to write your code in the user code section, otherwise it will be excluded.

And after you created the project, select Project Settings in the Code Generator tab and make sure that besides the default configuration, select the Generate peripheral initialization as pair of '.c/.h' files per IP, to generate the proper project .c files.

Community
  • 1
  • 1
Pedro Vieira
  • 2,266
  • 1
  • 20
  • 35
  • Thank you. I did all what's said but i have only one Virtual COM Port. I need two Virtual COM Ports. Have you ever tried to make two VCPs with only one USB device ? – HASSAN May 17 '16 at 12:39
  • Actually no, I only used a serial port/usb converted device and used one com port. I can ask my professor tomorrow and see if he can help. If I find something I'll comment here. – Pedro Vieira May 17 '16 at 12:59