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

Hi,

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
#endif
/* USB Standard Device Descriptor */
__ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
{
0x12, /*bLength */
USB_DESC_TYPE_DEVICE, /*bDescriptorType*/
#if (USBD_LPM_ENABLED == 1)
0x01, /*bcdUSB */ /* changed to USB version 2.01
in order to support LPM L1 suspend
resume test of USBCV3.0*/

#else
0x00, /* bcdUSB */
#endif
0x02,
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*/
0x02,
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*/
USBD_MAX_NUM_CONFIGURATION /*bNumConfigurations*/
} ;

Outcomes