Skip to main content
Visitor II
March 13, 2025
Question

STM32L452 USB virtual com port connect

  • March 13, 2025
  • 2 replies
  • 1729 views

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

    This topic has been closed for replies.

    2 replies

    Super User
    March 13, 2025

    > 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.

    Yoon1983Author
    Visitor II
    March 14, 2025

    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.

    Super User
    March 14, 2025

    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.

    Super User
    March 13, 2025

    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.

     

    Yoon1983Author
    Visitor II
    March 14, 2025

    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.

    Super User
    March 14, 2025

    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).