cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple USB virtual com port

FMass.1
Associate III

Hi, I would like to make a serial to usb converter. The problem is that I need to make a usb-to-32 serial port converter.
I've seen that there is nothing like this on the market and not even chips that do this.

What I came up with, is to use STM32s to create UART-to-USB converters (maybe using 3 or 4 chips to get to 32 uarts). I tried to search on the internet, and I saw that you can create a USB virtual com port with a STM32, but I have some questions:

1 - Is it possible to create a "multiple USB virtual com port" with an STM32, then create a USB device that a PC sees as 3 or 4 COM port?

2 - Is it possible to use the DMA to directly connect a UART interface to a USB virtual com port, in order not to use the processor to move data.

3 - If the first two questions have a positive answer, can I connect 3 or 4 MCU STM32 to a USB hub, can I have problems?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

1. Yes, the number of composite devices will be limited to the number of endpoints available. Typically 8 or maybe 16, but check the reference manual of the chip you select.

2. No, but UART isn't very fast. The CPU should have no problems keeping up with any number of UART ports.

3. If your code works, this should work. There is a max 255 (maybe 127?) usb devices per computer, but you're under this.

There are examples for composite USB devices on STM32, but it's not a common use case. You will likely have some work to do to make it work, especially if you are new to STM32, USB, and/or programming.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

1. Yes, the number of composite devices will be limited to the number of endpoints available. Typically 8 or maybe 16, but check the reference manual of the chip you select.

2. No, but UART isn't very fast. The CPU should have no problems keeping up with any number of UART ports.

3. If your code works, this should work. There is a max 255 (maybe 127?) usb devices per computer, but you're under this.

There are examples for composite USB devices on STM32, but it's not a common use case. You will likely have some work to do to make it work, especially if you are new to STM32, USB, and/or programming.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

USB device with internal hub is called "compound". 

Once upon a time there were "multiport serial adapters" which had single optimized host interface for all ports (indicator of the port index for incoming data...). Unfortunately the USB org has not developed interface standard for such class (or has it? I've never heard) and Windows does not have in-box driver for this. But you can borrow design from some of last such devices on market and provide a custom driver (not impossible). Then the number of endpoints is not the limit. Or just buy and use these old PCIe cards.