Products > Embedded Computing

ST-Link V2 Virtual COM Port Not Working

<< < (4/5) > >>

Cerebus:
On ST-LINK/V2-B and later the virtual com port shows up on the host as a standard USB serial port (using the CDC USB profile). You shouldn't need a driver on any platform that supports the CDC serial port USB profile. And yes, the VCP is just a connection to a real pukka serial port on the MCU made via Tx and RX lines from the ST-LINK's own MCU.

Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).

A useful document may be ST's Technical Note "TN1235 Overview of ST-LINK derivatives" to get to grips with which variant you are using.

Also, ST provide the "STM32CubeProgrammer", a standalone application available for Linux, Mac, Win32 and Win64. What's useful here is that it will confirm that you can talk to the ST-LINK properly, find out what version you've got, and if necessary update the software on the ST-LINK.

STM32 Cube Programmer here: https://www.st.com/en/development-tools/stm32cubeprog.html

AndyC_772:

--- Quote from: Cerebus on October 04, 2021, 11:27:22 pm ---Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).
--- End quote ---

I thought that feature relied on a bootloader being installed in the target MCU? I've seen it on one or two Nucleo boards, but IIRC it stops working if the device is erased.

langwadt:

--- Quote from: AndyC_772 on October 05, 2021, 06:03:49 am ---
--- Quote from: Cerebus on October 04, 2021, 11:27:22 pm ---Also the ST-LINK/V2 shows up as a USB mass storage device on both ST-LINK/V2-A and ST-LINK/V2-B, you can program the part just by copying a file to the drive (again, no drivers needed).
--- End quote ---

I thought that feature relied on a bootloader being installed in the target MCU? I've seen it on one or two Nucleo boards, but IIRC it stops working if the device is erased.

--- End quote ---

nope, dump a bin file on the drive and it programs the flash on the target via swd

T3sl4co1l:
The trick is, the dev boards have two chips, one for LINK, one for target.  So, if everything fits (and, it seems it doesn't sometimes, hence needing the 128k chip), the programmer can enumerate as a composite device with LINK, VCP and MSD functions.  Pretty neat, almost feels too easy to reprogram that way honestly.

And obviously, it takes some code to initialize and enumerate USB that way, and to implement the flashing function (which for the programmer, is SWD/JTAG/serial), so yeah, you need a bootloader to handle that with a single chip, but that is indeed a possible configuration.

And it sounds like that's maybe the sort of configuration the above mentioned Maple device can use, so I can see the similarity.

Tim

PKTKS:
Yes it does hold true..

And you can get rid of that for Chips with such problem..

The STMduino installation also provides a Github bootloader image repository.

By following those steps you can install your own bootloader and never ever again will fail

Paul

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version