I have a PCB that will have very little clearance on both sides so that putting a normal Cortex SWD .50 spacing connecter is too big. However, I'd still like to have the option of connecting via SWD to the target if the need arises for debugging. Since we're talking debugging and not just programming, holding pogo pins against the target is not feasible and I don't want to build custom jigs for every little board I make.

I know that Tag-Connect exists but there's no way I'm going to spend that kind of money on cables.

Are there any easy to implement solutions that allow a temporary but hands-free connection to a board for debugging? Preferrably with just a footprint and no actual components on the board.

  • \$\begingroup\$ Maybe plated through holes along the board edge and some hook clips ? \$\endgroup\$ – Nicolas Repiquet Aug 18 at 16:10
  • \$\begingroup\$ Pogo pins can work for extend debug sessions if you put them in a press. Or for units that see heavy debug/development use you could just solder 30 gauge silicone insulated wire to the pads. \$\endgroup\$ – Chris Stratton Aug 18 at 16:22
  • \$\begingroup\$ Roll your own "Tag-Connect" cable. Before I found out about Tag-Connect I made a board with pogo pins that indexes to the target board's mounting holes. It works a treat. It's for a hobby project -- if I'd been paid a typical US engineering rate to design, source and assemble one board I could have bought half a dozen Tag-Connect cables -- but you can save money however you see fit. \$\endgroup\$ – TimWescott Aug 18 at 16:29
  • \$\begingroup\$ you could use plastic rivets to hold the pogo pin block in place ... they are easy to atach and easy to remove \$\endgroup\$ – jsotola Aug 18 at 16:39
  • \$\begingroup\$ By temporary, do you mean you intend to return board to service after debugging? Using vias or smd and soldering little tag wires to a a connector I do all the time for JTAG and other purposes , I guess it qualifies as a custom jig, but really you just tear apart a ribbon cable route wires carefully and the thing is robust, even field deployable for testing . On the other hand my test units never need to be recomissioned and sold. \$\endgroup\$ – crasic Aug 18 at 17:06

enter image description here

Is your design price constrained? For SWD we need only two wires and a ground connection, so this could be possible solution. This doens't need any soldering.


For production version, this can be dropped totally.

Second suggestion

Zero soldering and zero investment for production. I am sure I have also seen fine pitch edge connectors too.

enter image description here

  • 1
    \$\begingroup\$ One should bring out reset, too, as it can be key to recovering from a part in a bad state. And a serial UART is often also desired, yes, there are ways to tunnel through SWD but they are less suitable for operational use, less compatible with power save modes, etc. \$\endgroup\$ – Chris Stratton Aug 18 at 19:20
  • \$\begingroup\$ For programming and debugging SWD is fairly enough. It is a rare use case whee ei have stumbled upon a need to have RESET line. I do POR instead :) \$\endgroup\$ – Umar Aug 18 at 19:24
  • \$\begingroup\$ If you haven't run into the situations where you need an actual reset line, you still have rather limited experience. Two obvious ones are where either an intentional or corrupted firmware remaps the SWD lines for another purpose, or where a firmware spends 99.9% of the time asleep in a way that disables the SWD. Sometimes these situations have other workarounds, but bringing out the hardware reset is pretty basic wisdom. \$\endgroup\$ – Chris Stratton Aug 18 at 19:26
  • \$\begingroup\$ @Umar I like this solution with card edge connection. The debug lines can be router to the edge of the board, if the controller isn't situated near the edge of the board. \$\endgroup\$ – Nick Alexeev Aug 18 at 22:16
  • \$\begingroup\$ @ChrisStratton seconded, but I would clarify that is system reset and not tRESET . The ieee jtag reset line is only used (AFAIK) for true boundary scan and not useful for SWD so can be omitted without issue \$\endgroup\$ – crasic Aug 19 at 2:08

An idea I've read somewhere long ago (on a Hungarian site I think):

Use a linear plastic connector with protuding metal pins (male), and design the PCB to be slightly out of line. That way you can push your connector into the holes, and the elasticity of the plastic keeps your pins connected. The original description was about a 6x1 connector with 0.1" spacing to be used for Atmel ISP.

  • \$\begingroup\$ This is what I think I'm going to try. I've put a Cortex debugging connector footprint (50 mil 2x5 header) but I've slightly increased the row spacing so that the header will stay in by itself and make contact. \$\endgroup\$ – Emil Eriksson Aug 19 at 5:13

There is no reason at all that you have to follow the official header. I never use them, certainly not the .50 inch versions.

I have used .50inch or 1mm 'smd fingers' at an edge of a board which allows me to solder a .5 or 1 mm SIL connector on it which then goes to my adapter cable.

  • \$\begingroup\$ The thing is that I don't want to solder anything since then I'd have to unsolder it. \$\endgroup\$ – Emil Eriksson Aug 18 at 18:53
  • \$\begingroup\$ @Emil Leave the header on the board after you're done debugging. What's the harm of having an unused header there? \$\endgroup\$ – Nick Alexeev Aug 18 at 19:09
  • \$\begingroup\$ @Nick Alexeev It will not fit in the case with the header on it. There's very little clearance. \$\endgroup\$ – Emil Eriksson Aug 19 at 5:10

Design the schematic and board with a header for debugging. It's a solder-on header, and it will provide you with a hands-free connection for debugging when you need it. At the same time, don't populate the connector in production. That saves you the cost of the connector.

When you need to debug a unit, solder the header to those pads. It will give you the hands-free connection for the debugger/ You will be debugging only a small fraction of the units: failed units from the field, pre-production units. You will not be debugging every single production unit.

You can use the pads of this connector for programming with a bed of nails fixture in production. Or, you can have separate programming pads for the bed of nails.

You can use the same type of header and pinout as the in-circuit debugger. Or, choose a different header and create your own pinout. Your choice of header may be smaller or cheaper than the debugger's. [See also @Oldfart's answer.]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.