D

DIY Electronics

— Building circuits, programming microcontrollers, and making things blink
49 members Created Jun 2026

SWD vs JTAG for ARM Debugging

Both protocols give you real-time debugging capabilities on Cortex-M processors. Here's when each matters.

SWD (Serial Wire Debug) uses only two signals (SWDIO, SWDCLK) plus power and ground. This is the reason most small MCU boards expose SWD — it's fine for debugging a single target and takes minimal PCB space. JTAG uses four signals (TDI, TDO, TCK, TMS) plus optional TRST and SRST. The advantage of JTAG is boundary scan and daisy-chain: you can address multiple devices on a single chain.

For solo MCU debugging, SWD is fine. If you're doing board-level testing or have multiple programmable devices on one board, JTAG's chain scan capability is worth the extra pins. Probe-rs supports both; OpenOCD supports both. The J-Link can switch between them dynamically.

-10

Report thread

Why are you reporting this thread?

Restore the redacted content?

This will make it visible to everyone again. The clear action is logged in the mod log.