I have a Blue Pill and I'd like to program it using TinyGo but the Blue Pill had no (obvious) means for hardware programming. So, I bought an STLINK-V3MINI hoping to use JTAG/SWD to program it. I'm uncertain how to connect the two and am seeking guidance before I naively connect the two and zap something.
Here's the STLINK-V3MINI:
Here's the STDC14 connector:
Page 19 of the STLINK's user guide has a pinout for the STDC14 but I can't correlate this to the TinyGo's documentation that suggests needing SWIO
, SWCLK
,3v and GND
.
The ribbon cable is attached to the STDC14 connector and the pinout is described in chapter 9.1.3.
The relevant pins are:
The STLINK V3 cannot supply power to the Blue Pill (see note at the end of chapter 1). So the easiest solution is to supply power by connecting it to a USB port.
I'm not entirely sure how the ribbon cable is connected. Most likely, the red wire corresponds to pin 1 and the other pins follow in order. On the connector itself (looking at it the same way as on the picture), pin 1 would be bottom right (right side because of red wire, bottom side because it is closer to the notch). Better check it out with the continuity tester of a multi-meterr.
On the Blue Pill, the relevant pins are on the short side: