3
\$\begingroup\$

I recently started studying STM32 microcontrollers (BluePill STM32F103 dev board + ST-link V2 clone). I was wondering if it is possible to add serial communication to ST-Link clone?

From what I understood, those clones are copied form ST-link schematic of official Nucleo boards. The ST-link on Nucleo boards is build with STM32F103CBT6 and pins 12 and 13 (PA_2 and PA_3) are used as TX and RX for serial communication with target microcontroller (and connects to PA_2 and PA_3 pins of targer). See page 65 of official Nucleo documentation

Meanwhile, on ST-link clones those pins are floating and not connected to anything

St-Link clone which I have

If I solder 2 wires to pins 12 and 13 of STM32 microcontroller on ST-link clone, would I be able to use those for serial communication with target microcontroller on BluePill board (PA_10 and PA_9 or PA_2 and PA_3)?

UPDATE:

Looks like specifically this ST-link clone is made based on schematics of ST-link on old Discovery boards like this: ST-Link on Discovery boards In this "configuration" in can't be converted into ST-Link with Serial port feature, since this feature (as Virtual Com port) was added in ST-Link V2.1 on Nucleo boards and has another schematic: enter image description here

FINAL UPDATE

The topic is not relevant anymore. Recently STMicroelectronics released STLink V3 Mini with very affordable price and same functionality (SWD + VCP) which I bought. Now it can be bought at about $10

\$\endgroup\$
16
  • 2
    \$\begingroup\$ @YehorPererva I know what ST-Link is. But I don't think the serial TX/RX are playing any role in programming. \$\endgroup\$
    – Eugene Sh.
    Commented Feb 27, 2019 at 20:22
  • 1
    \$\begingroup\$ electronics.stackexchange.com/a/321455/64158 says no, ST Link v2 doesn't have a USB-UART port \$\endgroup\$ Commented Feb 27, 2019 at 20:23
  • 1
    \$\begingroup\$ If the VCP device isn't showing up on the host computer already (or at least in the descriptors), soldering wires won't do any good because the firmware you have in there does not support this. \$\endgroup\$ Commented Feb 27, 2019 at 20:51
  • 1
    \$\begingroup\$ @duskwuff - looks like it is not a case with my clone. And, I think other problem is that my clone is made with STM32F101, meanwhile ST-Link from Nucleo is made with STM32F103 \$\endgroup\$ Commented Feb 27, 2019 at 21:12
  • 1
    \$\begingroup\$ @YehorPererva Using a STM32F101 instead of a '103 is a common "hack" in cheap ST-Link devices. The silicon in the two parts is identical, and the USB transceiver usually works. \$\endgroup\$
    – user39382
    Commented Feb 27, 2019 at 21:13

2 Answers 2

1
\$\begingroup\$

You can download the binary code from the STLINK V2-1 STM32F103CB with ST Link Utility.

You will need a 128K version (103CBT6) of part so normal 64K Blue pill is not big enough. I believe the mARM drop-folder transfer utility probably bloats the V2-1 code to requiring 128K.

I have also heard the firmware USB update will not work because of the USB bootloader having flash protection turned on for the V2-1.

You can get the STLINK V2 with SWO function on a 64K BluePill with the ST Link Utility firmware code download from a STLINK firmware updated Chinese clone.

You can also just cut the 5v runner and take over the connector 5v pins for SWO from uC pin 31 on a Chinese clone. Need to have a fine tip soldering iron and a steady hand to solder the pin 31 connection wire without shorting to adjacent pins.

With the cost of a Nucleo64 ST32F103 with the STLINK V2-1 at less then $11 (Mouser) you have to think about whether it is worth the work.

\$\endgroup\$
1
\$\begingroup\$

If you already have either a Blue Pill or one of the ST-Link 2 clones, I would just turn either one into a Black Magic Probe.

It integrates a GDB server so no other software is required.

There is a serial link available that will turn it into USB serial connection. This link is not connected to the debug portion, so it can be used stand alone if you wish.

And it's open source.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.