This question already has an answer here:

When using the SWD interface, is the reset pin is necessary?

In JTAG, there are 5 pins TCK, TMS, TDO, TDI and RST but usually SWD is a 2 wire interface. So I am confused about this.


marked as duplicate by MCG, Chris Stratton, RoyC, Finbarr, dim May 7 at 10:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ In addition to being a duplicate, this is perhaps chip specific. Reset is generally a good idea for recovery, but unnecessary on STM32's, and not even a distinct pin on some Nordic parts. Other makes might require it, often it's hard to know if it is being precautiinarily hooked up or needed. The use of connectors that don't have it on some ST products made its non-necessity there clear. \$\endgroup\$ – Chris Stratton Apr 18 at 13:55

Yes, eventhough the name is Single Wire Debug, you will usually need 4 connections:

  1. SWDIO (to transmit data from the programmer to the target)
  2. SWDCLK (to clock the data that is being transmited)
  3. RST (to perform a reset of the target)
  4. GND (for the signals to be referenced to something)

The reset is kind of optionnal if you are willing to press a reset button manually if the target get stuck/freezes.

  • 2
    \$\begingroup\$ This post is incorrect. Reset is unecessary in many cases. It's a good idea to hook up, but for many chips only needed to make sure that you can get the processor out of a situation where SWD might be disabled. Some common entry level or compact adapters can't even drive it. \$\endgroup\$ – Chris Stratton Apr 18 at 13:52
  • \$\begingroup\$ You are right, my post was maybe not clear enough in explaining why having the reset could be usefull only in certain specific situations, situations where the MCU is not able to use its SWD interface (for any reasons that might be) \$\endgroup\$ – benguru Apr 23 at 8:47

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