Good evening, my project is to create a desktop application. This application will allow me to communicate from the PC to an stm32 microcontroller via the USB port. in order to send and receive messages , I was told to configure the microcontoller's USB as a USB virtual com port. but I really don't know what the purpose behind this configuration. my questions are: 1-what's the difference between USB, USB virtual com port and USB serial port? 2-why is it useful to use VCP and what are the advantages and disadvantages of USB virtual com port comparing with USB.
Asked
Active
Viewed 513 times
-1
-
Please follow the below post. http://stackoverflow.com/a/27942559/1263525 – Shaibal Apr 25 '17 at 19:40
-
i'm not looking for the theoretical concept, but the practical utility of using a virtual COM port for the communication between the stm and the pc. – oumaima Apr 25 '17 at 21:35
1 Answers
1
There is no "serial port" in USB as you think. USB stack have different classes like mass storage class(MSC), audio, communication etc for different purposes. You cant use USB stack directly without configuring based on your use case. For serial communication enumeration you have to configure your USB device in communication class and use as VCP. See this for list of all classes. You can also configure your device as HID for indication of some events (as in keyboard or mouse).

Nithin P
- 513
- 3
- 16