Choosing a JTAG or SWD Cable: Pitch, Pinout, Voltage Reference and Orientation
A debug cable that fits physically can still connect the wrong signals. Ten contacts may describe an Arm debug header, an AVR programming connector or a completely custom interface. Even within Arm systems, several connector sizes and pinouts are used.
The JTAG breakout and cable collection helps make small debug connectors accessible. Choose the cable by comparing the probe and target documentation together, then verify the complete connection before powering the target.
Begin with the interface, not the ribbon cable
JTAG and Serial Wire Debug are related debugging options on many Arm targets, but they use different signalling arrangements. The processor, probe and debugger software must support the chosen interface. A passive cable or adapter cannot add a missing debug capability.
Write down the target device, probe model and required mode. Then list both connectors, including contact count, row count, pitch and pinout. A cable described as SWD is not sufficient documentation for a custom board's header.
Arm's CoreSight guide for Keil tools shows the common 10-pin Cortex Debug connector alongside larger debug and trace arrangements. Use its drawing only when both endpoints are documented as following that arrangement.
Check pitch and mechanical keying
The 150 mm 10-pin 1.27 mm IDC cable pack has a 2 × 5 socket arrangement according to its listing. The 1.27 mm pitch is half the familiar 2.54 mm header spacing. These connectors are not interchangeable, even when both have ten contacts.
Check whether the header is shrouded, whether the socket is keyed and whether a missing pin is used as an orientation feature. Allow space around the connector for its body and cable exit. A correctly pitched plug may still be obstructed by a neighbouring component or enclosure wall.
The store listing specifically distinguishes these cables from AVR programming cables. Treat that as a reminder to compare electrical pinouts as well as dimensions. An adapter that changes pitch must also route the correct signals.
Use the pinout as a connection contract
For the standard 10-pin Cortex Debug arrangement, the main signals are shown below. This is a reference for checking documentation, not permission to assume that an unlabelled header follows it.
| Contact | Signal |
|---|---|
| 1 | VTref |
| 2 | SWDIO / TMS |
| 3 and 5 | Ground |
| 4 | SWDCLK / TCK |
| 6 | SWO / TDO |
| 7 | Key position |
| 8 | NC / TDI, depending on interface |
| 9 | Ground detect |
| 10 | nRESET |
Check the drawing's viewing direction before numbering contacts. The mating face and PCB wiring view are mirrored. Identify pin one on the target, probe adapter and both cable ends. A ribbon stripe is a useful assembly convention, but continuity is the evidence that the intended contacts are connected.
Understand voltage reference before adding power
VTref normally tells the probe about the target's debug-logic voltage. Arm's DSTREAM interface-signal documentation describes that sensing role. It should not be treated automatically as a power output.
Some probes offer target power through a separately documented arrangement. Others expect an externally powered target. Establish which situation applies, including any required jumper setting, before connecting rails. Do not join two power sources because both happen to be nominally 3.3 V.
Also verify the probe's supported target-voltage range. A passive adapter does not translate logic levels. If the target's debug rail falls outside the probe's supported range, changing the cable cannot solve that mismatch.
Verify an adapter with power disconnected
Make a table showing probe signal, adapter input contact, adapter output contact and target signal. Use a continuity meter to confirm each intended connection through the complete cable-and-adapter assembly. Check for unintended connections to adjacent contacts and power rails.
As an example, a probe with a larger connector may need an adapter to the small Cortex header. Do not map the first ten contacts straight across by number. Map SWDIO to SWDIO, clock to clock, ground to the required grounds and reference to reference according to both manufacturers' drawings.
Inspect whether reset and optional trace signals are actually carried. A cable can support basic programming while omitting a signal needed by a particular recovery or tracing workflow. Record omissions so they are not mistaken for software faults later.
Keep the debug path short and stable
Long flying leads and repeated adapters can make a fast debug connection less reliable. Use the shortest practical documented arrangement and preserve ground connections. Support the cable so its weight does not strain a small target header.
If communication is intermittent, try a lower supported debug clock after checking wiring and power. A speed reduction can be a useful diagnostic, but it should not conceal an unreliable connector. Gently moving the cable should not make the target appear and disappear.
Keep the debug cable away from switching-power and motor wiring where practical. Test with the target's real loads operating, since an interface that works on an idle board may reveal power or noise problems once the application runs.
Include recovery access in the mechanical design
Leave access to the debug header and reset signal after the board is installed. A connector hidden under a glued battery or inaccessible lid turns a simple firmware recovery into a mechanical repair.
Before closing the project, test identification, programming, verification and a normal power cycle. Confirm the application starts without the probe attached. Label the target header with pin one and the intended interface, and store the adapter map with the firmware project.
A good debug connection is deliberately unremarkable: it mates correctly, carries the documented signals and behaves consistently. Checking those details once saves repeated sessions of blaming firmware for what is really a cable mismatch.