cancel
Showing results for 
Search instead for 
Did you mean: 

USB Composite device: how to make two virtual serial ports independent?

YJ
Associate II

We have an embedded device (STM32) that connects to the PC via one unique USB. The USB connection offers two virtual serial ports. Device description is:

0xEF, /*bDeviceClass*/

0x02, /*bDeviceSubClass*/

0x01, /*bDeviceProtocol*/

and interfaces description are

0x02, /* bFunctionClass: CDC */

0x02, /* bFunctionSubClass */

0x01, /* bFunctionProtocol */

Tested on Windows, we can send and receive data over the two virtual serial ports. However the constraint is that both virtual serial port must be opened for data transmission working. It means that we need one session of Docklight (or Putty) per virtual serial port for data to flow from the embedded device to the PC.

Once one of the sessions of Docklight (or Putty) is closed, no more data is flowing on the other session. The code is still running, but nothing goes out of the embedded device.

In that case, on very low level, CTR of USB interrupt status register (USB_ISTR) is always 0, so the code to send data from the embedded device is not executed.

Does anyone know how to make those two virtual serial port independent ?

Thanks

1 REPLY 1

Hello @YJ​ ,

Can you please give us more details about the package used, the IOC file and the initialization, etc. ?

Thanks in advance.

BeST Regards,

Walid