<?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>nRF52 Reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9882/nrf52-reset</link><description>Hi, I have been trying to figure out how to get the IF BOOT/RESET button on the nRF52 micro-controller working. I have defined &amp;quot;CONFIG_GPIO_AS_PINRESET&amp;quot; under C/C++ in the target options as suggested here: infocenter.nordicsemi.com/index.jsp , I am running</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 May 2016 11:15:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9882/nrf52-reset" /><item><title>RE: nRF52 Reset</title><link>https://devzone.nordicsemi.com/thread/36639?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 11:15:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47da6cd0-b83b-4657-8a8f-e62833dfac40</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Are you sure that only pin 21 is allowed as reset pin? I couldn&amp;#39;t find a clear statement about that. The SDK itself configures the pin 21 as reset with CONFIG_GPIO_AS_PINRESET, but the description of PSELRESET doesn&amp;#39;t limit the reset function to this pin. Where in documentation is written that the reset is limited to pin 21?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Reset</title><link>https://devzone.nordicsemi.com/thread/36638?ContentTypeID=1</link><pubDate>Fri, 15 Apr 2016 09:36:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5edbe80-55e9-4839-b01d-a83d676c57c6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Excellent answer, but I have a short comment. Even though the &lt;code&gt;PSELRESET[0]&lt;/code&gt; and &lt;code&gt;PSELRESET[1]&lt;/code&gt; register has a PIN field, the &lt;em&gt;only&lt;/em&gt; legal value of this field is 21. This means that P0.21 is the only pin that can be used as a reset pin, and the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.0/uicr.html?cp=1_2_0_12_0_59#register.PSELRESET-0"&gt;PSELRESET registers&lt;/a&gt; can only be used to enable or disable reset on that pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Reset</title><link>https://devzone.nordicsemi.com/thread/36637?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2015 18:13:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f67fd28-ae7d-4f7e-b3b5-94c3fa8c70c4</guid><dc:creator>yycpants</dc:creator><description>&lt;p&gt;For what it&amp;#39;s worth, I found your question while looking for a solution to this problem. Simply adding the &lt;code&gt;CONFIG_GPIO_AS_PINRESET&lt;/code&gt; to define in C/C++ section of the project settings did not enable the reset. I realize you may have solved your problem, but perhaps this will help others.&lt;/p&gt;
&lt;p&gt;First thing to check is whether the &lt;code&gt;PSELRESET[0]&lt;/code&gt; and &lt;code&gt;PSELRESET[1]&lt;/code&gt; registers hold the correct values. Mine held &lt;code&gt;0xFFFF FFFF&lt;/code&gt;, which was most definitely not going to work. You can check these registers by running your code in Debug mode and opening up the register viewer for UICR. The two registers are at the bottom of the list. Expand the register in viewer and you will see two items: pin id and connect/disconnect status. You will want the pin id to be 21 (0x15), or whatever else you desire, and the connect/disconnect bit to be 0 (active low). So for pin 21 to be reset, &lt;strong&gt;both&lt;/strong&gt; registers must read 0x00000015. If this is already set, then your reset should be working.&lt;/p&gt;
&lt;p&gt;Please note that the documentation will show the pin value as 21 by default, but the register viewer in Keil says 0x1F which is &lt;strong&gt;not&lt;/strong&gt; 21. So simply clearing the MSB will not work (pin 31 will be reset).&lt;/p&gt;
&lt;p&gt;If these are not set correctly even with the pre-processor option added, you will need to change it manually. If you are using the DK, you can open up nRFgo Studio and do it through there. There is a button for doing this there:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/resetpin.PNG" alt="Reset pin enable in nRFgo" /&gt;&lt;/p&gt;
&lt;p&gt;If you are not using the DK, or you do not see the button, then you will have to do it manually through nrfjprog.exe (this is part of nRFgo Tools). I would suggest doing an Erase All in nRFgo and reflashing the softdevice back onto the chip (if you are using a SD).&lt;/p&gt;
&lt;p&gt;For nrfjprog.exe commands, you will want the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; nrfjprog.exe --memwr 0x10001200 --val 0x00000015
 nrfjprog.exe --memwr 0x10001204 --val 0x00000015
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can do a readback to verify that the write was successful:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfjprog.exe --memrd 0x10001200
nrfjprog.exe --memrd 0x10001204
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, if you want a pin other than 21 to be the reset, use a proper value instead of &lt;code&gt;0x00000015&lt;/code&gt;. Lastly, UICR maintains values between reprogramming and reset cycles, but not if you do an erase all (it.. erases all?).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Reset</title><link>https://devzone.nordicsemi.com/thread/36636?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2015 10:20:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fb8525c-d952-4bca-8bf3-e934bcf2190c</guid><dc:creator>atune</dc:creator><description>&lt;p&gt;A [system] reset is &lt;em&gt;basically&lt;/em&gt; just switching the power off and on again. You&amp;#39;d need to erase the chip with a tool or boot into some sorta bootloader mode and erase the chip in a program to do what you figured the reset button would do.&lt;/p&gt;
&lt;p&gt;See &lt;em&gt;POWER — Power management&lt;/em&gt; in the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52.v1.0.0%2Fchips%2Fnrf52832_ps.html"&gt;Product Specification&lt;/a&gt; for more information about Pin reset.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/reset_5F00_behavior.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>