ESP32 Bit Pirate home
  • JTAG/SWD
  • Advanced
  • 5 min
  • Serial CLI

Recipe · Advanced · JTAG/SWD

How to scan for SWD pins

When a board has unlabelled test pads, SWD pin scanning can help identify SWDIO and SWCLK candidates. Use this only on your own board or a board you are authorized to test.

SWD debug pins with scan lines.
Configure the candidate pins first, then run the SWD scan.

Wiring View

BP PadsBP GPIOsGNDBP GNDVREFcheck only
Generated from the wiring summary: to BP.
Step 1

Commands

Run the commands below after selecting the right Bit Pirate mode and confirming the wiring.

Result

What success looks like

A detected pair gives you pins to verify with OpenOCD or a normal debugger. A failure does not prove SWD is absent; reset, power state and locks can matter.

Troubleshooting

  • Target not powered or held in reset.
  • No common ground.
  • Wrong candidate pin set.
  • Target debug interface disabled or locked.

Next steps

  • Verify the detected pair with a real debug session.
  • Use openocd adapter mode only after pinout is confirmed.
  • Document pad order and voltage before repeating the test.

SWD pinout scan FAQ

What does SWD scan look for?

It tries candidate GPIO pairs to find SWDIO and SWCLK on a target that exposes an ARM-style Serial Wire Debug interface.

Why should SWD usually be tried before JTAG on ARM boards?

Many modern ARM microcontrollers expose SWD with only two signal pins, so a targeted SWD scan can be faster than a full four-signal JTAG search.

What does an SWD scan result give me next?

A scan result gives candidate SWDIO, SWCLK and reset-related wiring to test with a debugger workflow. It is a mapping aid, not a guarantee that the target will allow debug access.

Go deeper