0
\$\begingroup\$

I'm using a STM Nucleo as a bridge to flash a BLE EM9304 module and another ST-LINK from another STM Nucleo to flash a STM32. Both MCU are in a third board. So, I'm integrating the sequence of programming in one "software". The question is: When I read the active COM ports, both ST-LINK ports appear with the same title. Is there any way to know which COM port is being used in the process by Python?

OBS.: The nucleo boards are differents (One is with STM32L037Z and the other is STM32F411).

How to know the COM Port is associated to each board?

asked Feb 16, 2021 at 20:07
\$\endgroup\$
3
  • \$\begingroup\$ Most likely not possible. Are you using pyserial or something else? \$\endgroup\$ Commented Feb 16, 2021 at 20:14
  • \$\begingroup\$ Are you really flashing via a serial connection? Usually, the SWD protocol is used for flashing. If so, it's not related to the virtual COM ports. \$\endgroup\$ Commented Feb 16, 2021 at 21:06
  • 1
    \$\begingroup\$ If the devices being programmed are different, maybe you can just guess which com port to use. Then connect to the target device and check if it is the right one. If not, try the other one. If identical target devices are found on both com ports then I guess it is more tricky. \$\endgroup\$ Commented Feb 16, 2021 at 22:26

1 Answer 1

1
\$\begingroup\$

If it's a PC maybe you can set a fixed COM number for each in device manager->Ports->Properties->Port Settings->Advanced->Com port number. There are hardware IDs and more for the computer to keep them straight.

answered Feb 16, 2021 at 20:31
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.