AnsweredAssumed Answered

How to implement 2 virtual com ports on 1 USB interface

Question asked by g.vijay on Dec 28, 2016
Latest reply on Dec 30, 2016 by Imen D


I am using CubeMx in order to generate startup code for the USB virtual com port device. It works fine. But I need to implement 2 virtual com ports on 1 USB interface. I cant seem to find any source of information how to do it. I would appreciate all 


Please any one explain were I need to modify.

I modified USB Standard Device Descriptor file IADClasscode Document but still is not working.

device class  to-0xEF, /*bDeviceClass*/
Device sub class to- 0x02, /*bDeviceSubClass*/
Device Protocol- 0x01, /*bDeviceProtocol*/


#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
/* USB Standard Device Descriptor */
0x12, /*bLength */
USB_DESC_TYPE_DEVICE, /*bDescriptorType*/
0x01, /*bcdUSB */ /* changed to USB version 2.01
in order to support LPM L1 suspend
resume test of USBCV3.0*/

0x00, /* bcdUSB */
0xEF, /*bDeviceClass*/
0x02, /*bDeviceSubClass*/
0x01, /*bDeviceProtocol*/
USB_MAX_EP0_SIZE, /*bMaxPacketSize*/
LOBYTE(USBD_VID), /*idVendor*/
HIBYTE(USBD_VID), /*idVendor*/
LOBYTE(USBD_PID_FS), /*idVendor*/
HIBYTE(USBD_PID_FS), /*idVendor*/
0x00, /*bcdDevice rel. 2.00*/
USBD_IDX_MFC_STR, /*Index of manufacturer string*/
USBD_IDX_PRODUCT_STR, /*Index of product string*/
USBD_IDX_SERIAL_STR, /*Index of serial number string*/
} ;