cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L452 USB virtual com port connect

Yoon1983
Associate II

Hello
I have a question. Using the STM32L series, the current USB virtual com port is recognized in the device manager of the PC.
Here, I am curious about the maximum number of Com ports that can be connected to the PC.
I know that the basic Com port is connected up to 255.
However, the maximum of 60 is not connected to the PC or laptop, and the device is not recognized with an exclamation mark in the device manager.
I want to know why the number does not increase and the exclamation mark appears.
I want to know which specifications of the PC or laptop can tell me how many Com ports can be connected at the maximum.
---------------------------------------------------------------------------------------------------
I am using the CPU below.
CPU: STM32L452RET

Below are the laptop specifications. Processor: AMD Ryzen 7 5700U with Radeon Graphics 1.80 GHz
Installed RAM: 16.0 GB (15.4 GB usable)
System Type: 64-bit operating system, x64-based processor
Edition: Windows 11 Pro
Version 24H2
Installation Date ‎2024-‎12-‎05
OS Build 26100.3476
Experience Windows Feature Experience Pack 1000.26100.54.0

8 REPLIES 8
TDK
Guru

> However, the maximum of 60 is not connected to the PC or laptop, and the device is not recognized with an exclamation mark in the device manager.

So you're not connecting something, and then nothing happens, and you want to know why? I suspect typos in your question. Unclear what's happening.

Max devices is 127, including hubs, and there is a maximum hub chain length.

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

Generally, without any connection to STM32, Windows can support very large number of serial interfaces. Their names no longer have to be "COMn". A Windows machine can have several USB host controllers, each of them can connect up to 127 USB physical devices (including hubs), each device can have up to 255 composite functions. So you have a plenty of room to play ))

device is not recognized with an exclamation mark in the device manager.

Please read what the Windows Device Manager says about the device. What is the "problem number" and so on. If you are not sure, ask AI and it will explain.

 

Is it possible to connect up to 127 devices (including hub devices) made with STM32L?

However, the number of Com ports recognized varies depending on the PC or laptop, and even if connected using a hub, it does not exceed 60.

I would like to know if the cause is the influence of the main board of the PC or laptop.

Thank you for your answer.

Is it possible to connect up to 127 devices (including hub devices) made with STM32L?

However, the number of Com ports recognized varies depending on the PC or laptop, and even if connected using a hub, it does not exceed 60.

I would like to know if the cause is the influence of the main board of the PC or laptop.

Hi,

If the question is, whether your problem with a standard CDC device is caused by the Windows side - it is not. Stay focused on debugging the STM32 side, either electric layer or firmware.

The number of USB "COM port" functions that a STM32 can expose to host is limited by the number of USB endpoints. It is quite small. See the docum for your specific STM32 model.

But, if you can afford a custom host-side driver (for Windows, Linux...) you can make STM32 firmware that exposes a non-standard device to the host, and there you can expose huge number of channels (127 easily) with just one or two USB endpoints, and without any hubs.

Unfortunately, the USB org does not have a standard class for multi-port CDC device. (or does it already? I haven't heard of such).

 

Well, the STM32L4 is not a hub. But it could be a device.

Do you have 60+ USB devices hooked up to the PC? How many layers of hubs does that entail? Might be exceeding things there.

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

Yoon1983_0-1741928374428.png

As shown in the figure above, I made a device using the STM32L4 CPU.
I connected these devices to a hub commonly sold on PC and laptop, and connected about 60 STM32L4 devices.
An exclamation mark appears in the device manager and it is no longer recognized as a Com port.
I want to know why the number of Com ports connected in the device manager is different for each PC.

Yoon1983_1-1741928536951.png

Thank you for your answer.

As shown in the figure above, I made a device using the STM32L4 CPU.
I connected these devices to a hub commonly sold on PC and laptop, and connected about 60 STM32L4 devices.
An exclamation mark appears in the device manager and it is no longer recognized as a Com port.
I want to know why the number of Com ports connected in the device manager is different for each PC.