ST-LINK/V2 Pinout, Datasheet, Schematic [Ultimate Guide]

In this guide, you’ll find the ST-LINK V2 pinout diagram (the genuine ST probe’s 20-pin JTAG/SWD and SWIM connectors, and the ST-LINK V2 clone USB dongle’s 10-pin header), its datasheet and schematic information, and every interface explained with its wiring and extra tips. Without further ado, let’s get right into it!

The ST-LINK/V2 is STMicroelectronics’ in-circuit debugger and programmer for STM32 (JTAG, SWD and SWV trace) and STM8 (SWIM) microcontrollers. It plugs into your PC over USB, and inside there’s an STM32F103 running ST’s firmware. Next to it on every bench sits the cheap aluminium “ST-LINK V2” USB stick, a clone with a different pinout and some traps of its own.


Here is a detailed ST-LINK/V2 Pinout Diagram with colored labels and legends to help you easily identify the functionalities that each pin can perform. It shows the genuine debugger’s CN3 20-pin JTAG/SWD connector and the 4-pin STM8 SWIM connector, drawn the same way as on the debugger.

ST-LINK/V2 pinout diagram with the 20-pin JTAG/SWD connector (VAPP, SWDIO, SWCLK, SWO, NRST) and the STM8 SWIM connector
Genuine ST-LINK/V2: CN3 20-pin JTAG/SWD and 4-pin SWIM connectors

Each row shows the ST-LINK signal name (as printed in UM1075), its SWD and JTAG role, and the pin it goes to on a typical STM32 target. On CN3, pin 1 sits on the row with the key notch, and the odd pins (1, 3, 5 … 19) run along that row, while the even pins (2 … 20) are the outer row. The ribbon cable is straight-through, so pin n on the probe is pin n on your target’s 20-pin header.

And here is the ST-LINK V2 clone pinout diagram for the aluminium USB-stick dongle. It shows the 10-pin header, the connector face view of both printed label variants sold today, and a genuine vs clone summary.

ST-LINK V2 clone USB dongle pinout diagram with the 10-pin header (RST, SWDIO, SWCLK, SWIM, 3.3v, 5v) and both label variants
ST-LINK V2 clone USB dongle: 10-pin header and both label variants

Clone photo: Phil Pemberton (philpem.me.uk), licensed under CC BY-NC-SA 4.0.

On the clone, pin 1 is under the small ▲ on the box header, and the odd pins are the row under the printed label. The labels differ between batches, so always wire from the print on your dongle (more on that in the clone section below).

Buy an ST-LINK/V2: You can get the genuine ST probe from Amazon or AliExpress, or the low-cost clone dongle from Amazon or AliExpress. The genuine probe gives you JTAG, SWO trace and target voltage sensing; the clone is fine for basic SWD flashing and debugging.

Download ST-LINK/V2 Pinout Diagrams (Full Resolution)

Both ST-LINK/V2 pinout diagrams (the genuine probe’s CN3 + SWIM connectors, and the clone dongle’s 10-pin header) in full resolution (5120 px WebP), in one ZIP file. Print them, zoom in, or keep them next to your bench. Please consider supporting my work if it helped you.


ST doesn’t publish a classic “datasheet” for the ST-LINK/V2. Its specifications live in the DB1275 data brief, and the pinout, cables and LED states are in the UM1075 user manual. Here are the official documents you’ll need, all from st.com:

DocumentIDRevisionWhat You’ll Use It ForLink
ST-LINK/V2 data brief (the “datasheet”)DB1275Rev 6 (Nov 2020)Features, interfaces, voltage ranges, order codesPDF
ST-LINK/V2 user manualUM1075Rev 10 (Apr 2024)CN3 and SWIM pinouts (Tables 2 and 4), cables, LED states, driverPDF
Overview of ST-LINK derivativesTN1235Rev 7 (Jan 2025)V2 vs V2-1 vs V2-A/B vs V3, firmware update and USB modesPDF
SWD multidrop for STM32 with ST-LINKAN6382Rev 1 (Nov 2025)Debugging several STM32s on one SWD busPDF

Which document do I need? UM1075 for the pinout and wiring (everything in this article’s tables comes from it), DB1275 for the specs, and TN1235 when you’re comparing ST-LINK versions or updating firmware. All four are listed on ST’s ST-LINK/V2 product page, where the ST-LINK/V2 is still marked ACTIVE (checked November 2026). There are no ST documents for the clone dongles.


ST doesn’t publish a schematic for the ST-LINK/V2 probe. The “Schematics” section of UM1075 (section 6) only shows the two SWIM cables (the ERNI cable and the low-cost 4-pin cable), and Figures 9 and 10 show how the 20-pin JTAG/SWD ribbon connects to the target. Here’s what UM1075 does tell you about the hardware:

  • Target interface: the 20-pin CN3 connector is the standard ARM JTAG 20-pin layout (2.54mm pitch). SWD uses pins 7 (SWDIO) and 9 (SWCLK), with pin 13 as SWO, and pin 15 is NRST.
  • Voltage sensing: pins 1 and 2 (VAPP) are connected to your board’s supply “to ensure signal compatibility”. The probe senses this voltage; it doesn’t supply it.
  • Output level: the probe talks to targets below 3.3v, but it drives its outputs at 3.3v. STM32 targets tolerate this. For sensitive parts on the target board, ST points to the ST-LINK/V2-ISOL, STLINK-V3MINIE, or STLINK-V3SET with the B-STLINK-VOLT adapter.
  • SWIM cables: the ERNI cable (target connector 284697 or 214017 vertical, 214012 horizontal) and the low-cost cable with a 2.54mm 4-pin female connector.

If you want to see a real ST-LINK circuit, the closest official one is the ST-LINK/V2-1 that ST puts on its Nucleo boards. It’s drawn on a page of every Nucleo-64 schematic pack, for example in the NUCLEO-F446RE CAD resources (and walked through in our Nucleo-F446RE pinout guide). It’s the same STM32F103 idea plus a virtual COM port, but it’s not the ST-LINK/V2 probe itself. The schematics you’ll find online for the USB clone dongles are community-traced, and they differ between PCB versions.


The ST-LINK/V2 is a stand-alone USB probe in a white plastic case. Here are its specifications from DB1275 and UM1075, including the details that matter when you wire it to a board.

ST-LINK/V2 in-circuit debugger/programmer for STM32 and STM8

Get an ST-LINK/V2: The genuine ST probe is the one I recommend for real debugging; grab it from Amazon or AliExpress. On a tight budget, the clone dongle from Amazon or AliExpress does SWD flashing.

ItemST-LINK/V2 (Genuine)
Order codesST-LINK/V2, ST-LINK/V2-ISOL (isolated version)
Probe MCUSTM32F103C8 (Arm Cortex-M3), running ST’s ST-LINK firmware
Host interfaceUSB 2.0 Full-Speed, Mini-B connector, 5v bus powered (USB-A to Mini-B cable included)
STM32 interfacesJTAG up to 9MHz (default 1.125MHz), SWD up to 4MHz (default 1.8MHz), SWV trace up to 2MHz
STM8 interfaceSWIM low-speed and high-speed: 9.7KB/s and 12.8KB/s programming rates
Target voltageJTAG/SWD: 1.65v to 3.6v with 5v-tolerant inputs; SWIM: 1.65v to 5.5v
Output levelsDriven at 3.3v, even for lower-voltage targets (UM1075)
Powers the targetNo: VAPP (pins 1, 2) only senses the target voltage
ConnectorsCN3: 2×10, 2.54mm box header (ARM JTAG 20-pin); SWIM: 4-pin
Cables included20-pin JTAG/SWD flat ribbon, SWIM ERNI cable, SWIM low-cost 4-pin cable
Status LEDCOM LED, red/green (orange on a failed target connection)
Firmware updateYes, over USB (DFU): STSW-LINK007 or STM32CubeProgrammer
Operating temperature0°C to 50°C
NoVirtual COM port, USB mass storage (drag-and-drop), target power output
  • The ST-LINK/V2 debugs and programs STM32 over JTAG or SWD and STM8 over SWIM.
  • SWD runs at up to 4MHz (1.8MHz by default) and JTAG at up to 9MHz (1.125MHz by default).
  • The minimal SWD wiring is pin 1 (VAPP), pin 7 (SWDIO), pin 9 (SWCLK) and a GND pin, plus pin 15 (NRST) for connect under reset.
  • SWO trace (printf over SWV) is on pin 13, up to 2MHz, for Cortex-M3/M4/M7/M33 targets.
  • The genuine ST-LINK/V2 does not power the target: VAPP is a sense input, and pin 19 (3.3v) is not connected on the target side.
  • It works with 1.65v to 3.6v STM32 targets (5v-tolerant inputs), and its outputs are driven at 3.3v.
  • The STM8 SWIM connector is separate: 1 VDD, 2 DATA, 3 GND, 4 RESET, for 1.65v to 5.5v targets.
  • It connects over USB 2.0 Full-Speed (Mini-B) and has no virtual COM port.
  • The clone dongle has a 10-pin header with SWDIO, SWCLK, SWIM, RST, 2x GND, 2x 3.3v and 2x 5v, and no SWO and no JTAG.
  • On most clones, RST is the STM8 SWIM reset, not an STM32 NRST.

Not sure which ST-LINK/V2 pins to connect? Here are the connections I’d use for each job, and why.

Use CaseST-LINK/V2 PinsWhy
Flash and debug any STM32 (minimum)CN3-1 VAPP, CN3-7 SWDIO, CN3-9 SWCLK, CN3-20 GNDSWD needs 2 signals; VAPP tells the probe the target voltage
Connect under resetAdd CN3-15 NRSTNeeded when your code reuses PA13/PA14 or sleeps
printf over SWOAdd CN3-13 TDO_SWO → PB3Serial Wire Viewer trace on Cortex-M3/M4/M7/M33
Full JTAGCN3-3, 5, 7, 9, 13, 15 + VAPP + GNDBoundary scan or JTAG-only tools
STM8 programmingSWIM connector: 1 VDD, 2 DATA, 3 GND, 4 RESETSWIM is on its own 4-pin connector
Clone dongle on a Blue Pill / Black PillSWDIO, SWCLK, GND (+ 3.3V only if the board has no other supply)The clone can power a small board; the genuine probe can’t
PinReasonWhat to Do
CN3-19 VDD (3.3v)The probe’s own 3.3v; UM1075 leaves it unconnected on the targetNever use it to power your board
CN3-1, CN3-2 VAPPSense input, not a supply outputConnect to the target’s VDD; power the target separately
CN3-3 TRST, CN3-5 TDIJTAG-only; UM1075 ties them to GND in SWD mode for noiseLeave them unconnected or grounded on an SWD-only board
CN3-13 TDO_SWOSWO exists only on Cortex-M3/M4/M7/M33 targetsLeave it unconnected on Cortex-M0/M0+ parts (F0, G0, L0, C0)
CN3-15 NRSTWithout it, connect under reset and hardware reset failWire it whenever your firmware remaps PA13/PA14 or uses low-power modes
Clone RSTUsually the STM8 SWIM reset, not an STM32 NRSTUse a software reset, or hold the target’s reset button while connecting
Clone 3.3V, 5.0VOutputs from the dongle (LDO and USB VBUS)Never connect them to a board that has its own supply

The 20 pins of the ST-LINK/V2 CN3 connector and its 4-pin SWIM connector are divided into the following groups based on the interface they’re used for. Some pins do two jobs: pin 7 is JTAG TMS and SWD SWDIO, pin 9 is TCK and SWCLK, and pin 13 is TDO and SWO.

We’ll discuss each pin group in the following sections one by one in more detail.


The ST-LINK/V2 JTAG interface uses 5 signals on CN3: TRST (pin 3), TDI (pin 5), TMS (pin 7), TCK (pin 9) and TDO (pin 13), plus NRST on pin 15. It runs at up to 9MHz (1.125MHz by default).

CN3 PinCN3 NameST-LINK FunctionTarget JTAG PinTypical STM32 Pin
3TRSTJTAG TRST (out)NJTRSTPB4
5TDIJTAG TDO (probe out)JTDIPA15
7TMS_SWDIOJTAG TMSJTMSPA13
9TCK_SWCLKJTAG TCKJTCKPA14
13TDO_SWOJTAG TDI (probe in)JTDOPB3
15NRSTNRSTNRSTNRST

Note: The CN3 names are the target’s view, while UM1075’s function column is the probe’s view. So pin 5 is named “TDI” because it goes to the target’s TDI, but it carries the probe’s TDO output. Don’t cross TDI and TDO: wire CN3-5 to JTDI and CN3-13 to JTDO.

The “typical STM32 pin” column holds for most STM32 families with JTAG (F1, F2, F3, F4, F7, L1, L4, G4, H7 …). Cortex-M0/M0+ families (F0, G0, L0, C0) are SWD-only, so use the SWD pins below. Most people never need JTAG on an STM32: SWD does everything with 2 wires and frees PA15, PB3 and PB4.


The ST-LINK/V2 SWD (serial wire debug) pins are CN3-7 (SWDIO) and CN3-9 (SWCLK), which go to PA13 and PA14 on the STM32. SWD runs at up to 4MHz (1.8MHz by default), and it’s what STM32CubeIDE and STM32CubeProgrammer use by default.

ST-LINK/V2 Minimal SWD Wiring: pin 1 (VAPP) → target VDD, pin 7 (SWDIO) → PA13, pin 9 (SWCLK) → PA14, any even pin (GND) → GND, and pin 15 (NRST) → NRST for connect under reset.

CN3 PinSignalConnect To (STM32)Needed?
1 (or 2)VAPPTarget VDD (3.3v)Yes: the probe reads the target voltage here
7SWDIOPA13 (SWDIO)Yes
9SWCLKPA14 (SWCLK)Yes
20 (any even pin 4–20)GNDGNDYes (UM1075 recommends all of them on the ribbon)
15NRSTNRSTRecommended (connect under reset)
13SWOPB3 (TRACESWO)Optional (printf trace)

Keep the SWD wires short (under about 20cm with jumper wires). If the connection drops, lower the SWD frequency in your IDE’s debug settings; that fixes most flaky jumper-wire setups.

Tip: On your own PCB, put the 6 SWD signals (VDD, SWDIO, SWCLK, NRST, SWO, GND) on a small header in the same order as your favourite cable, or fit the full 2×10 2.54mm header so the ST-LINK/V2 ribbon plugs straight in.

Learn more in our STM32 SWD Debugging Tutorial.


The ST-LINK/V2 SWO trace input is CN3-13 (TDO_SWO), wired to PB3 (TRACESWO) on the STM32. It carries the Serial Wire Viewer (SWV) trace at up to 2MHz, which lets you printf() to the IDE without a UART.

SWO works on Cortex-M3, M4, M7 and M33 targets, which have the ITM trace unit. Cortex-M0/M0+ parts (STM32F0, G0, L0, C0) have no SWO, and the clone dongles don’t bring the pin out at all. Here’s the short C code that sends printf() to SWO on an STM32 (CubeIDE project, HAL):

In STM32CubeIDE, set SYS → Debug to “Trace Asynchronous Sw” in CubeMX, then open the debug configuration, enable Serial Wire Viewer (SWV) and set the core clock to your real SystemCoreClock. Start debugging, open the SWV ITM Data Console, enable port 0, and press “Start Trace”. The text shows up there.

Note: If the SWV console stays empty, the core clock in the debug configuration doesn’t match the MCU’s real clock (the SWO baud rate is derived from it), or PB3 is used for something else in your code.


The ST-LINK/V2 programs STM8 microcontrollers over SWIM (single wire interface module), on its own 4-pin connector next to CN3: 1 VDD, 2 DATA, 3 GND, 4 RESET. SWIM supports 1.65v to 5.5v targets.

SWIM PinNameFunctionConnect To (STM8)
1VDDTarget VCC (input, voltage reference)MCU VDD
2DATASWIMSWIM pin (PD1 on STM8S, PA0 on STM8L)
3GNDGroundGND
4RESETResetNRST

With the “STM8” label above the connector, as in ST’s photo, pin 1 is the right-hand pin (the bottom pin in our rotated diagram, nearer the COM LED). The connector has a latch wall at the pin 4 end. Use the ERNI cable for boards with an ERNI connector, or the low-cost 4-pin cable for a 2.54mm header.

Like VAPP on CN3, SWIM pin 1 is an input: the ST-LINK/V2 reads the STM8’s supply voltage there, it doesn’t power the STM8. Program STM8 parts with ST Visual Programmer (STVP-STM8), ST Visual Develop, or a third-party IDE.


The ST-LINK/V2 reset output is CN3-15 (NRST), wired to the STM32’s NRST pin. The SWIM connector has its own reset, pin 4 (RESET), for STM8 targets.

NRST is what makes “Connect under reset” work: the probe holds the MCU in reset, connects to the debug port, and only then lets your code run. That’s your way back in when the firmware has locked SWD out, for example:

  • Your code configures PA13/PA14 as GPIO (or another alternate function), so SWD stops working right after reset.
  • The MCU goes into Stop, Standby or Shutdown mode, and the debug port turns off with it.
  • The firmware disables the debug pins with HAL_GPIO_DeInit() or by turning off the SWJ port.

Note: No NRST wire (for example on a clone dongle)? Hold the target’s reset button, set the mode to “Under reset” in STM32CubeProgrammer, click Connect, and release the button right after. If that fails too, set BOOT0 = 1 and reset, so the MCU starts the system bootloader instead of your code, then erase the flash.

Learn more in our STM32 Boot Modes Tutorial.


The genuine ST-LINK/V2 does not power your target board. It runs from your PC’s USB 5v, and its VAPP pins (CN3-1 and CN3-2) are inputs that sense the target voltage (1.65v to 3.6v). Pin 19 (VDD, 3.3v) is the probe’s own supply, and UM1075 leaves it unconnected on the target side.

CN3 PinNameDirectionWhat It Does
1, 2VAPPInputTarget VDD sense: the probe matches its signal levels and reports the target voltage
19VDD(output inside the probe)The probe’s 3.3v; not connected to the target
4, 6, 8, 10, 12, 14, 16, 18, 20GND–Ground; connect at least one, ideally all (UM1075)
11, 17NC–Not connected (pin 11 is RTCK on the ARM standard)

That’s why the most common first error with a genuine probe is “Target voltage 0v” or “No STM32 target found”: VAPP isn’t wired to the target’s 3.3v, or the target simply has no power. Power your board from its own supply or USB, wire VAPP to its VDD, and the probe reads the right voltage.

Note: The ST-LINK/V2 drives its outputs at 3.3v even when the target runs at 1.8v (UM1075). STM32 parts tolerate it, but if other chips on your 1.8v board don’t, use the ST-LINK/V2-ISOL, an STLINK-V3MINIE, or an STLINK-V3SET with the B-STLINK-VOLT adapter.


The ST-LINK V2 clone is the aluminium USB-stick dongle with a 10-pin box header: RST, SWDIO, SWCLK, SWIM, 2x GND, 2x 3.3V and 2x 5.0V. It does SWD for STM32 and SWIM for STM8, but it has no JTAG and no SWO pin. Inside is an STM32F101C8/F103C8 (or a copy such as CKS32, APM32 or GD32) running a copy of ST’s firmware.

There are two label variants on sale. Both put pin 1 under the ▲ on the box header, but the signals sit on different pins, so read the label printed on your own dongle before you wire it:

PinVariant B (gold/red/blue/silver shells with the ST logo)Variant A (e.g. blue “STLNK V2” shells)
1RSTRST
2SWDIOSWCLK
3GNDSWIM
4GNDSWDIO
5SWIMGND
6SWCLKGND
73.3V3.3V
83.3V3.3V
95.0V5.0V
105.0V5.0V

How to read your clone’s label: the print on the shell shows a small 1–10 pin map with a signal name on each side: the names on the left are the odd pins (1, 3 … 9), and the names on the right are the even pins (2 … 10). If your print doesn’t match either variant above, trust your print. And if in doubt, check continuity: the 3.3V pins read about 3.3v and the 5.0V pins about 5v to GND with the dongle plugged in.

On most ST-LINK V2 clone dongles, RST is the STM8 SWIM reset, not an STM32 NRST. So wiring RST to your STM32’s NRST usually does nothing, and “Connect under reset” and hardware reset fail (users report it on the ST Community and in ST’s own clone article). Use a software reset, or hold the target’s reset button while connecting, as in the NRST section above.

Unlike the genuine probe, the clone’s 3.3V pins are outputs from the dongle’s small LDO (shared with its own MCU), and the 5.0V pins are the USB VBUS, unregulated. That’s handy for a bare Blue Pill or Black Pill, but there’s no target voltage sensing: STM32CubeProgrammer and OpenOCD show the dongle’s own ~3.2–3.3v, even when your board is off (ST Community thread).

Note: Never connect the clone’s 3.3V or 5.0V pins to a board that has its own supply (USB, a regulator, a battery). The two supplies fight each other and back-feed, and users report dead clones and boards after doing it. Connect GND, SWDIO and SWCLK only, and leave the power pins unconnected.

No SWO: the clone’s header has no SWO pin, so printf() over SWV doesn’t work out of the box. Community hacks add it with a bodge wire from the dongle MCU’s trace-capable pin (PA10 on many units; it varies with the PCB) to a header pin (EEVblog forum). If you need trace, a genuine probe or a Nucleo board’s ST-LINK is the easier path.

Firmware updates: ST’s firmware upgrade tool (in STM32CubeProgrammer and STM32CubeIDE) can refuse or brick clones, especially the ones built on non-ST MCUs. After updates from STM32CubeIDE 1.10.1 onwards, users reported clones that stopped detecting targets (ST Community). ST says it doesn’t support clones. If yours gets bricked, it can be reflashed over the 4 SWD pads inside the shell with a second probe (stlink-org issue). My advice: if your clone works, don’t update it.


Here are the two hookups most readers need: the ST-LINK V2 clone with a Blue Pill or Black Pill, and the genuine ST-LINK/V2 with your own custom board.

Both boards have a 4-pin SWD header at the end: 3.3v, DIO (PA13), CLK (PA14), GND (the clock label reads DCLK or CLK on Blue Pills, and SCK on the Black Pill). With a variant B clone:

Clone Pin (Variant B)Blue Pill / Black Pill SWD HeaderNote
2 SWDIODIO (PA13)
6 SWCLKCLK / SCK (PA14)
3 or 4 GNDGND
7 or 8 3.3V3.3 / 3V3Only if the board has no USB or other supply connected

Then select “ST-LINK” and “SWD” in your IDE (STM32CubeIDE, Arduino IDE with STM32duino, PlatformIO) and flash. If your Blue Pill or Black Pill is also plugged into USB, leave the 3.3V wire off. Our Black Pill F401CE pinout guide has the full SWD header and boot-pin details, and the STM32 Blue Pill Arduino IDE guide walks through the first upload.

On your own board, fit a 2×10 2.54mm box header with the ARM JTAG 20-pin layout and the ST-LINK/V2 ribbon plugs straight in. For an SWD-only design, wire only these header pins and leave the rest unconnected or grounded as UM1075 shows:

20-Pin Header PinBoard NetNote
1 (and 2)VDD (3.3v)Sense input for the probe; your board supplies it
7PA13 (SWDIO)
9PA14 (SWCLK)
13PB3 (SWO)Optional, for SWV printf
15NRSTRecommended, for connect under reset
3, 5GNDUM1075’s SWD target wiring (noise reduction)
4–20 evenGNDAll of them
19–Leave unconnected

Power the board from its own supply first, then plug in the ST-LINK/V2. STM32CubeProgrammer should then show the target voltage read on VAPP (about 3.3v) and connect.


The genuine ST-LINK/V2 has two connectors, a USB port and one status LED. The COM LED tells you what the probe is doing (UM1075 section 4.3):

COM LEDMeaning
Blinking redFirst USB enumeration with the PC in progress
RedCommunication between the PC and the ST-LINK/V2 established
Blinking green / redData exchanged between the target and the PC
GreenThe last communication was successful
OrangeCommunication with the target failed
PartWhat It Is
CN3 (STM32)2×10 2.54mm box header with a key notch, for the 20-pin JTAG/SWD ribbon
SWIM (STM8)4-pin connector for the SWIM cables
USBMini-B, USB 2.0 Full-Speed, powers the probe
COM LEDRed/green status LED (table above)
ButtonsNone

The clone dongles have no COM LED on the outside on most units (some have one inside the shell), so you only know a connection works when the software says so.


Getting the ST-LINK/V2 running takes three things: the USB driver, up-to-date probe firmware, and a tool that talks to it. Here’s the order I’d do it in:

  1. Install the driver: on Windows, install STSW-LINK009 (STM32CubeIDE and STM32CubeProgrammer install it for you). Linux and macOS need no driver.
  2. Update the firmware (genuine probe): use the “Firmware upgrade” button in STM32CubeProgrammer, or the stand-alone STSW-LINK007 upgrade tool. TN1235 notes that the ST-LINK/V2 starts in update (DFU) mode and the tools switch it to debug mode, so unplug and replug it before the next upgrade.
  3. Wire the target with the minimal SWD hookup above, and power the target.
  4. Connect: in STM32CubeProgrammer pick “ST-LINK”, port “SWD”, and click Connect. It reads the target voltage, the chip ID and the flash. In STM32CubeIDE, the debug configuration uses the ST-LINK GDB server by default.
  5. Other tools: OpenOCD ( -f interface/stlink.cfg), the open-source stlink tools ( st-flash, st-info --probe), Keil MDK, IAR EWARM, PlatformIO and the Arduino STM32 core all support the ST-LINK/V2.

For the full debugging workflow (breakpoints, live variables, the SWV trace), follow our STM32 SWD Debugging with ST-LINK/V2 tutorial.


Why does my genuine ST-LINK/V2 say “Target voltage 0v” or “No STM32 target found”? VAPP (pin 1) isn’t connected to the target’s VDD, or the target has no power. The genuine probe never powers the target. Power the board and wire VAPP (ST Community).

Can I power my board from pin 19 of the ST-LINK/V2? No. Pin 19 is the probe’s own 3.3v, and UM1075 marks it “not connected” on the target side. Power the target from its own supply.

Why does my clone show 3.2v target voltage when my board is off? The clone measures its own 3.3v rail, not your board. Its reading tells you nothing about the target.

Why doesn’t RST on my clone reset my STM32? On most clones RST is the STM8 SWIM reset. Use a software reset, or hold the target’s reset button while connecting.

Which pin is SWDIO? My clone doesn’t match the picture. Clone labels vary between batches (variants A and B above). Wire from the print on your own dongle.

Why can’t I connect anymore after flashing my code? Your code probably reuses PA13/PA14 or enters a low-power mode. Use “Connect under reset” with NRST wired, or boot with BOOT0 = 1 and erase the flash.

Why did my clone stop working after a firmware update? ST’s upgrade tool doesn’t support clones and can brick them. Reflash it over its internal SWD pads with a second probe, or replace it.

Why does the connection keep dropping with jumper wires? Long or loose wires, or the pull-ups some clones put on SWDIO/SWCLK. Shorten the wires, add a solid GND, and lower the SWD frequency.

Why is the COM LED orange? The probe couldn’t talk to the target: check the wiring, the target power, VAPP, and whether the firmware has locked out the debug pins.


The genuine ST-LINK/V2 and the USB clone both flash STM32 chips over SWD, but they’re different hardware with different pinouts. Here’s how they compare:

FeatureGenuine ST-LINK/V2Clone USB Dongle
ShapeWhite plastic case, USB Mini-B portUSB-stick, aluminium shell, USB-A plug
Debug connector20-pin ARM JTAG (CN3) + 4-pin SWIM10-pin header, labels vary
JTAGYesNo
SWO / SWV traceYes (pin 13)No pin
STM32 NRSTYes (pin 15)Usually not (RST = SWIM reset)
Target voltageSensed on VAPP, 1.65v–3.6vNot sensed, fixed 3.3v logic
Powers the targetNo3.3v and 5v pins
Firmware updatesSupported by STMay fail, be refused or brick
ST supportYesNone (the ST logo on a clone is fake)

How to spot a genuine ST-LINK/V2: ST’s probe comes only in the white plastic case with a Mini-B USB port, the 20-pin and SWIM connectors, and the cables in the box. Any USB-stick or metal-shell “ST-LINK V2” is a clone, whatever logo is printed on it. Buy the genuine probe from ST or an authorized distributor. ST’s genuine vs cloned ST-LINK/V2 article has more detail.


ST has made several ST-LINK versions since the ST-LINK/V2. The ST-LINK/V2-1 is the one built into Nucleo and many Discovery boards, and the STLINK-V3 family is the current stand-alone probe (TN1235).

FeatureST-LINK/V2ST-LINK/V2-1 (on Nucleo/Discovery)STLINK-V3 (V3SET, V3MINIE)
FormStand-alone probeBuilt into the boardStand-alone probe
Debug connector20-pin JTAG + 4-pin SWIM6-pin SWD header (CN4 on Nucleo-64)STDC14 (1.27mm) + adapters
InterfacesJTAG, SWD, SWV, SWIMSWD, SWVJTAG, SWD, SWV (+ SWIM on V3SET)
Virtual COM portNoYesYes
USB mass storage (drag-and-drop)NoYesYes (off by default on V3MINIE)
Max SWD clock4MHz4MHz24MHz
USBFull-Speed, Mini-BFull-SpeedHigh-Speed

Pick the ST-LINK/V2 when you need JTAG or STM8 SWIM on a budget, or already own one. A Nucleo board’s ST-LINK/V2-1 can debug an external STM32 too: remove the two CN2 jumpers and wire its CN4 SWD header (1 VDD_TARGET, 2 SWCLK, 3 GND, 4 SWDIO, 5 NRST, 6 SWO). For a new probe, the STLINK-V3 is faster and adds a virtual COM port; our STLINK-V3 pinout guide covers its STDC14 connector and adapter headers.


Here is every ST-LINK/V2 connector pin in physical order, with its function on the probe, its target connection in JTAG and SWD modes, and a short description. On CN3, pin 1 is on the key-notch row and the odd pins run along that row.

Click to expand the full pin table (20 pins)
PinCN3 NameST-LINK FunctionTarget (JTAG)Target (SWD)Typical STM32 PinDescription
1VAPPTarget VCC (input)MCU VDDMCU VDDVDDSenses the target voltage so the probe matches its signal levels; it doesn’t power the target.
2VAPPTarget VCC (input)MCU VDDMCU VDDVDDSame net as pin 1.
3TRSTJTAG TRSTNJTRSTGND (noise)PB4JTAG test reset; tied to GND on the target cable in SWD mode.
4GNDGNDGNDGND–Ground.
5TDIJTAG TDO (probe out)JTDIGND (noise)PA15Named after the target’s TDI; carries the probe’s TDO output.
6GNDGNDGNDGND–Ground.
7TMS_SWDIOJTAG TMS, SW IOJTMSSWDIOPA13SWD data line (JTAG TMS in JTAG mode).
8GNDGNDGNDGND–Ground.
9TCK_SWCLKJTAG TCK, SW CLKJTCKSWCLKPA14SWD clock (JTAG TCK in JTAG mode).
10GNDGNDGNDGND–Ground.
11NCNot connectedNCNC–Not connected (RTCK on the ARM 20-pin standard).
12GNDGNDGNDGND–Ground.
13TDO_SWOJTAG TDI (probe in), SWOJTDOTRACESWO (optional)PB3JTAG TDO from the target, or the SWO trace for SWV printf.
14GNDGNDGNDGND–Ground.
15NRSTNRSTNRSTNRSTNRSTTarget reset; needed for connect under reset.
16GNDGNDGNDGND–Ground.
17NCNot connectedNCNC–Not connected.
18GNDGNDGNDGND–Ground.
19VDDVDD (3.3v)Not connectedNot connected–The probe’s own 3.3v; leave it unconnected on the target.
20GNDGNDGNDGND–Ground.
PinNameFunctionTargetDescription
1VDDTarget VCC (input)MCU VDDVoltage reference input (1.65v to 5.5v); pin 1 is the right-hand pin with the STM8 label up.
2DATASWIMSWIM pinSingle-wire debug/programming line (PD1 on STM8S, PA0 on STM8L).
3GNDGroundGNDGround.
4RESETResetNRSTSTM8 reset; at the latch end of the connector.
Click to expand the full pin table (10 pins)
PinVariant B LabelVariant A LabelDescription (Variant B)
1RSTRSTSTM8 SWIM reset on most clones (not an STM32 NRST).
2SWDIOSWCLKSWD data, to PA13 on the STM32.
3GNDSWIMGround.
4GNDSWDIOGround.
5SWIMGNDSTM8 SWIM data.
6SWCLKGNDSWD clock, to PA14 on the STM32.
73.3V3.3V3.3v output from the dongle’s LDO (shared with its MCU).
83.3V3.3V3.3v output.
95.0V5.0V5v output straight from USB VBUS.
105.0V5.0V5v output.

Wrap Up

To conclude this guide article, the ST-LINK/V2 is a very solid debugger and programmer for STM32 and STM8. It gives you JTAG, SWD, SWO trace, and SWIM in one probe. The clone dongle covers basic SWD flashing for a few dollars. Just remember the gotchas: VAPP only senses the target voltage, pin 19 isn’t for the target, the clone’s RST is a SWIM reset, and its 3.3v/5v pins must never meet another supply.

I hope you’ve found this guide helpful to wire your ST-LINK/V2 to your next project. For more boards, check out the Pinouts, Datasheets & Schematic Diagrams Library. Follow this STM32 Series of Tutorials to learn more about programming STM32 microcontrollers.

If you’re just getting started with STM32, you need to check out the STM32 Getting Started Ultimate Guide below.

Getting Started With STM32 ARM Cortex MCUs

The complete beginner’s guide to STM32 microcontrollers: the toolchain, your first project, and the STM32 tutorials series step by step.

Share This Page With Your Network!
Join Our +25,000 Newsletter Subscribers!

Stay Updated With All New Content Releases. You Also Get Occasional FREE Coupon Codes For Courses & Other Stuff!

Photo of author
Author
Embedded systems engineer with several years of experience in embedded software and hardware design. I work as an embedded SW engineer in the Automotive & e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI/ML, and other fields I'm passionate about.
I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?

Leave a Comment