cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement 2 virtual com ports on 1 USB interface

gatadivijay
Associate II
Posted on December 28, 2016 at 14:39

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*/
 } ;�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

#usb-cdc
1 REPLY 1
Imen.D
ST Employee
Posted on December 30, 2016 at 16:32

Dear

G.Vijay

‌,

You may refer to this

http://www.st.com/content/ccc/resource/technical/document/user_manual/1c/6b/06/e6/19/6c/46/bf/CD00289pdf/files/CD00289pdf/jcr:content/translations/en.CD00289pdf

and

presentationwhich can help you on USB VCP device topic.

Happy New Year

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen