<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Exiting SWD mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4243/exiting-swd-mode</link><description>I have code that uses two GPIOs to program an NRF51822 via SWD mode. This code all works fine and suceeds in programming the device. 
 What I would like to do is get the NRF51822 to exit SWD mode, returning the pins to their previous function (eg. RESET</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Oct 2014 21:19:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4243/exiting-swd-mode" /><item><title>RE: Exiting SWD mode</title><link>https://devzone.nordicsemi.com/thread/15159?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 21:19:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed268c67-6e6d-4078-bf39-2d241ffb0d75</guid><dc:creator>Charles Manning</dc:creator><description>&lt;p&gt;I found the answer in the ref manual&lt;/p&gt;
&lt;p&gt;Normal mode can always be resumed by performing a &amp;quot;hard-reset&amp;quot; through the SWD interface:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enter debug interface mode.&lt;/li&gt;
&lt;li&gt;Enable reset through the RESET register in the POWER peripheral.&lt;/li&gt;
&lt;li&gt;Hold the SWDCLK and SWDIO/nRESET line low for a minimum of 100 μs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I had misread this to mean that doing any of the above would do it.&lt;/p&gt;
&lt;p&gt;You need to do all of these steps in the sequence shown above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>