cancel
Showing results for 
Search instead for 
Did you mean: 

> 4 virtual COM Ports on STM32H7 using USB

caas05
Associate

I am trying to start 6 virtual com ports over usb. I could start 4 using a USB composite pack made by a developer. From what I have read and tried, there are not enough endpoints for 6 com ports and only maximum for 4 (9 bidrectional EPs, 1 reserved for EP0; 2 IN EPs and 1 OUT EP per com port). Is it possible to start 6 com ports at all by reusing or bypassing an IN EP?

4 REPLIES 4
Gyessine
ST Employee

hello @caas05 
For USB CDC class,1 IN endpoint and 1 endpoint are enough to create a virtual comport function of course alongside the control endpoint 
and since the STM32H7 USB controller supports 8 In endpoints and 8 OUT endpoints, actually you can create up to 8 VCP's.
you can refer to this article for more information about endpoints
Hope that helps.
Gyessine

 

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.

gbm
Principal

From my experience:

Standard USB CDC VCP uses 3 endpoints. The interrupt IN endpoint may be idle - it may not transmit anything, but Windows 11 requires the endpoint to be included in device descriptor and its number must be unique for every VCP instance. Few years ago Windows could deal with multiple VCPs sharing single, non-operational status IN endpoint, so it was possible to implement 6 VCPs with STM32F103. This is no longer the case. Also, few years ago Linux could not deal with such shared status IN. I don't know the current status under Linux.

To implement VCP without status IN, you need to install custom driver in your OS. The standard one will not work.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

hi @Gyessine,

i could start 6 vcps (i can see them in my device manager) but the communication fails (echo test). due to the lack of unique control endpoints, the data transmission over the vcp to pc fails

gbm
Principal

There is no "control endpoint" in CDC ACM VCP. It's notification, interrupt IN endpoint.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice