Adapter board for a 2x5 0.1" (2.54mm) header to arm cortex 10-pin connector.
This is useful when connecting ST-Link v2 clones to a standard ARM 2x5 1.27mm pitch header.
I know of 2 variants of the ST-Link v2 clones, with different pinouts on the 2x5 0.1" (2.54mm) header. Different adapter boards provided for each variant.
One way to distinguish the variants; when unplugged, check for continuity on pins 3+4 or 5+6.
Older model I bought in ~2016.
From the pin 1 marker on the header on the ST-Link, pinout is as follows:
| Funtion | Pin | Pin | Function |
|---|---|---|---|
| RST* | 1 | 2 | SWDIO |
| GND* | 3 | 4 | GND |
| SWIM | 5 | 6 | SWCLK |
| 3.3V | 7 | 8 | 3.3V |
| 5.0V | 9 | 10 | 5.0V |
*Note that the labeling is incorrect for some pins on the etching on the case / on the silkscreen on the board. My device had the pinout for Variant-2 on the etching and just incorrect on the silkscreen markings 🤷.
Newer model I bought in 2020.
From the pin 1 marker on the header on the ST-Link, pinout is as follows:
| Funtion | Pin | Pin | Function |
|---|---|---|---|
| RST | 1 | 2 | SWCLK |
| SWIW | 3 | 4 | SWDIO |
| GND | 5 | 6 | GND |
| 3.3V | 7 | 8 | 3.3V |
| 5.0V | 9 | 10 | 5.0V |
Labeling appears to be correct on these devices.
UNTESTED DESIGN
Support both pinouts with a 3x4 0.1" header to select between them.
Alternative approaches:





Quick note about using the stlink v2 clones with pyocd; I had the best luck using the device after updating the firmware using the official ST updater:
❯ java -jar stsw-link007/AllPlatforms/STLinkUpgrade.jar -jtag_swim -force_prog
Firmware version detected: V2J29S7
................Upgrade is successful.
Version read: 2.37.7
After upating the version should report V2J37S7 if you run the updater again.
There's a ton of information out there on the stlink devices themselves (I found this helpful).
On ubuntu there's an available package stlink-tools (source) which contains some utilities and udev rules for the st-link devices. I didn't end up using the tools themselves but it could come in handy.
Content type
Image
Digest
Size
229.2 MB
Last updated
over 5 years ago
docker pull noahpendleton/stlink-clone-adapter