Skip to content
AESTECHNO
AESTECHNO
Contact
Pinout

JTAG and SWD pinout: Arm debug headers

JTAG uses four mandatory signals (TCK, TMS, TDI, TDO) and SWD, Arm’s two-wire equivalent, uses only two (SWCLK, SWDIO), on the same pins. Three headers dominate: the 20-pin Arm JTAG at 2.54 mm pitch, the 10-pin Cortex Debug at 1.27 mm pitch and its 20-pin version with ETM trace.

By Hugues Orgitello · Updated ·

Arm Cortex Debug connector, 10-pin SWD/JTAG, 1.27 mm pitch

The most common header on recent Cortex-M boards. SWD name first, then JTAG, when a pin carries both. Pin 7 is removed to act as a key.

JTAG and SWD · Arm Cortex Debug connector, 10-pin SWD/JTAG, 1.27 mm pitch. Male header seen from above the PCB, pin 1 square at bottom left.
Male header seen from above the PCB, pin 1 square at bottom left
Pin Signal Dir. Description
1 VTref Target reference voltage, read by the probe to set its logic levels (Power)
2 SWDIO / TMS I/O Bidirectional SWD data, or JTAG mode select (Signal)
3 GND Ground (Ground)
4 SWCLK / TCK In Debug clock, driven by the probe (Signal)
5 GND Ground (Ground)
6 SWO / TDO Out SWO trace output, or JTAG data out (Signal)
7 KEY No pin (key) (Not connected)
8 NC / TDI In JTAG data in, unused in SWD (Signal)
9 GNDDetect Ground, lets the target detect the probe (Ground)
10 nRESET I/O Target reset, active low (Signal)

Cortex Debug + ETM, 20 pins, 1.27 mm pitch

Pins 1 to 10 repeat the 10-pin header; pins 11 to 20 add 4-bit parallel ETM trace.

JTAG and SWD · Cortex Debug + ETM, 20 pins, 1.27 mm pitch. Male header seen from above the PCB, pin 1 square at bottom left.
Male header seen from above the PCB, pin 1 square at bottom left
Pin Signal Dir. Description
1 VTref Target reference voltage, read by the probe to set its logic levels (Power)
2 SWDIO / TMS I/O SWD data or TMS (Signal)
3 GND Ground (Ground)
4 SWCLK / TCK In Debug clock (Signal)
5 GND Ground (Ground)
6 SWO / TDO Out SWO trace or TDO (Signal)
7 KEY No pin (key) (Not connected)
8 NC / TDI In TDI in JTAG (Signal)
9 GNDDetect Probe-detect ground (Ground)
10 nRESET I/O Target reset, active low (Signal)
11 GND / TgtPwr+Cap Ground, or target power from the probe (Ground)
12 TRACECLK Out ETM trace clock (Signal)
13 GND / TgtPwr+Cap Ground, or target power from the probe (Ground)
14 TRACEDATA0 Out Trace data, bit 0 (Signal)
15 GND Ground (Ground)
16 TRACEDATA1 Out Trace data, bit 1 (Signal)
17 GND Ground (Ground)
18 TRACEDATA2 Out Trace data, bit 2 (Signal)
19 GND Ground (Ground)
20 TRACEDATA3 Out Trace data, bit 3 (Signal)

Arm JTAG 20 pins, 2.54 mm pitch

The legacy header of J-Link and ULINK probes and many evaluation boards. Every even pin from 4 to 20 is ground on the target side. Careful: SEGGER states that pins 14 to 20 on a J-Link are reserved and not necessarily grounded inside the probe.

JTAG and SWD · Arm JTAG 20 pins, 2.54 mm pitch. Male header seen from above the PCB, pin 1 square at bottom left.
Male header seen from above the PCB, pin 1 square at bottom left
Pin Signal Dir. Description
1 VTref Target reference voltage, read by the probe to set its logic levels (Power)
2 Vsupply Optional supply per Arm; not connected in most probes (Power)
3 nTRST In JTAG logic reset, active low, optional (Signal)
4 GND Ground (Ground)
5 TDI In JTAG data in (Signal)
6 GND Ground (Ground)
7 TMS / SWDIO I/O JTAG mode select, or SWD data (Signal)
8 GND Ground (Ground)
9 TCK / SWCLK In Debug clock (Signal)
10 GND Ground (Ground)
11 RTCK Out Return clock, for adaptive clocking (Signal)
12 GND Ground (Ground)
13 TDO / SWO Out JTAG data out, or SWO trace (Signal)
14 GND Ground (Ground)
15 nRESET I/O Target system reset, active low (also called nSRST) (Signal)
16 GND Ground (Ground)
17 NC Not connected (formerly DBGRQ) (Not connected)
18 GND Ground (Ground)
19 NC Not connected (formerly DBGACK; some probes supply 5 V here) (Not connected)
20 GND Ground (Ground)

Tag-Connect TC2030 (SWD), 6 pads

Connector-less footprint: the spring-pin cable presses onto six PCB pads. Assignment of the TC2030-CTX cable for the 10-pin Cortex header.

JTAG and SWD · Tag-Connect TC2030 (SWD), 6 pads. Footprint seen from above the PCB (top layer); the cable’s alignment holes set the orientation.
Footprint seen from above the PCB (top layer); the cable’s alignment holes set the orientation
Pin Signal Dir. Description
1 VTref Target reference voltage, read by the probe to set its logic levels (Power)
2 SWDIO I/O SWD data (Signal)
3 nRESET I/O Target reset, active low (Signal)
4 SWCLK In SWD clock (Signal)
5 GND Ground (Ground)
6 SWO Out SWO trace (Signal)

Tag-Connect TC2050 (JTAG and SWD), 10 pads

Ten-pad version, wired pin for pin to the 10-pin Cortex header (TC2050-IDC-NL-050 cable): pad n carries the signal of header pin n. Note that the numbering runs around the footprint (1 to 5 along the bottom, 6 to 10 along the top from right to left), whereas the TC2030 alternates odd pads at the bottom and even pads at the top.

JTAG and SWD · Tag-Connect TC2050 (JTAG and SWD), 10 pads. Footprint seen from above the PCB (top layer): one alignment hole on the left, beside pads 1 and 10, two on the right.
Footprint seen from above the PCB (top layer): one alignment hole on the left, beside pads 1 and 10, two on the right
Pin Signal Dir. Description
1 VTref Target reference voltage, read by the probe to set its logic levels (Power)
2 SWDIO / TMS I/O SWD data, or JTAG mode select (Signal)
3 GND Ground (Ground)
4 SWCLK / TCK In Debug clock (Signal)
5 GND Ground. Not carried by the standard TC2050-IDC-NL-050 cable, carried by the -ALL version (Ground)
6 SWO / TDO Out SWO trace, or JTAG data out (Signal)
7 NC No connection: the key position on the Cortex header (Not connected)
8 NC / TDI In JTAG data in, unused in SWD (Signal)
9 GNDDetect Probe-detect ground. Not carried by the standard cable, carried by the -ALL version (Ground)
10 nRESET I/O Target reset, active low (Signal)
An interface to design?

A board to make debuggable and testable in production, then locked before shipping? We design the debug port, the programming bench and the protection strategy.

Our hardware design expertise · Get the checklist

JTAG or SWD?

On a Cortex-M, SWD does everything development needs (programming, breakpoints, memory reads) with two wires, plus SWO for printf-style trace. JTAG stays useful to chain several parts on one interface (FPGA, CPLD, processor) and for production boundary-scan testing (IEEE 1149.1).

Wiring a 20-pin JTAG to 10-pin Cortex Debug adapter. Pin 4 GND > 3, 6 GND > 5, 8 GND > 9, 1 VTref > 1, 7 TMS/SWDIO > 2, 9 TCK/SWCLK > 4, 13 TDO/SWO > 6, 5 TDI > 8, 15 nRESET > 10.
20-pin probe (2.54 mm pitch) to 10-pin Cortex Debug header (1.27 mm pitch): VTref, SWDIO/TMS, SWCLK/TCK, SWO/TDO, TDI, nRESET and three grounds. nTRST, RTCK and Vsupply do not exist on the 10-pin header.

The most common design mistakes

VTref left unconnected. The probe reads VTref to set its levels. Left floating, the probe does not detect the target, or drives its signals at the wrong voltage. VTref goes to the microcontroller’s I/O supply, not to the board input.

nRESET not wired. Without it, the probe cannot regain control of firmware that disables the SWD pins or goes into deep sleep at startup. Keep a pull-up (often 10 kΩ) and a modest capacitor.

Debug port left open in production. An accessible JTAG or SWD port lets anyone read out the firmware and keys. On a connected product, lock it (read-protection levels, debug fuses) before shipping: the Cyber Resilience Act expects it too.

Frequently asked questions

FAQ

How are the TC2050 pads numbered?
Around the footprint, like an IC package: seen from above, 1 to 5 left to right along the bottom row, then 6 to 10 right to left along the top row. The single alignment hole is on the left, beside pads 1 and 10. The TC2030 follows a different rule (odd pads at the bottom, even at the top): copying one onto the other swaps half the signals.
What is the difference between JTAG and SWD?
JTAG (IEEE 1149.1) is a multi-vendor 4 or 5-wire standard that can chain several parts. SWD is Arm’s 2-wire debug interface (SWCLK, SWDIO), which shares the TCK and TMS pins. On a Cortex-M, SWD is enough to program and debug.
How do you connect a 20-pin probe to a 10-pin header?
With a 20-pin 2.54 mm to 10-pin 1.27 mm adapter, sold by the probe makers. The wiring is not pin to pin: VTref, SWDIO, SWCLK, SWO and nRESET change numbers (1, 7, 9, 13 and 15 on the 20-pin side; 1, 2, 4, 6 and 10 on the 10-pin side).
What is the VTref pin for?
It gives the probe the target’s I/O voltage, so its buffers drive the signals at the right level (1.8 V, 3.3 V or 5 V). It does not power the board. Without it, most probes refuse to connect.
Should JTAG be disabled on a production product?
On a connected product, yes, or at least protect it. An open debug port lets someone extract the firmware and secrets. Microcontrollers offer read-protection levels or fuses that lock it, sometimes irreversibly.
Is the ST-LINK/V2 pinout the same as the Arm 20-pin JTAG?
Almost. TMS/SWDIO (7), TCK/SWCLK (9), TDO/SWO (13), nRESET (15), TDI (5), TRST (3) and the even ground pins sit at the same positions. The differences: the ST-LINK/V2 groups pins 1 and 2 into one VAPP input, does not use RTCK (11), and supplies 3.3 V on pin 19, which ST says not to connect on the target. A board built for the Arm JTAG header therefore works, unless it puts something other than VDD on pin 2.
What is the pinout of a USB-stick ST-Link V2 clone?
There is no single one. These 10-pin sticks are not ST products and their pinout changes between models and batches: we found two incompatible orders for SWDIO, SWCLK and GND. Go by the label printed on the shell, check ground and 3.3 V with a meter before plugging in, and never wire the stick’s 3.3 V or 5 V output to a board that is already powered.
Sources

Tables built from these documents and cross-checked against manufacturer datasheets. Always check the datasheet of the connector you actually use: some manufacturers number differently.

Further reading

Other pinouts