cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC multiply VCP

mlegierski
Associate II
Posted on July 11, 2016 at 14:55

Hello!

I use 

the USB CDC class implementation provided by STM32CubeMX 4.10.1 (firmware library v1.3.0) with stm32l0x3 and I try to get a composite device with multiply VCP ports. I'm rather not interested in changes in descriptors, because they are described everywhere. Much more interesting are changes in all objects and structures which are in this inmplementation and all places which are necessary to handle transmission with 2 or 3 VCP. Can anyone help me with this?

Regards,

Micha?

#stm32-usb-cdc-vcp
2 REPLIES 2
gatadivijay
Associate II
Posted on December 28, 2016 at 14:45

Hi

Michał,

For STM32F072xx controller even if I

changes in descriptors but still it is not detecting as 2 virtual com port.

Please can you help were exactlyI need to modify.

Currently inDescriptor I modified

0xEF, /*bDeviceClass*/
0x02, /*bDeviceSubClass*/
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*/
 } ;�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

Imen.D
ST Employee
Posted on December 30, 2016 at 16:20

Dear 

,

You may refer to this manual which can help you on USB VCP device 

 

You should use the latest version of CubeMx v4.18.0 and firmware package (STM32CubeL0 v1.8.0) which contains fix defects and enhancements implementation.

Happy New Year

Imen

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