<?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>nRF52832 locks after programming</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62435/nrf52832-locks-after-programming</link><description>Dear Nordic Team, 
 I have developed a custom board using a nRF52832 QFAAB0 chip. 
 I am using SDK 15.3 and the ble_template example as starting point of developing my code and the Segger Embedded Studio as IDE. 
 Once my code is compiled (no errors and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jun 2020 12:32:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62435/nrf52832-locks-after-programming" /><item><title>RE: nRF52832 locks after programming</title><link>https://devzone.nordicsemi.com/thread/254726?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 12:32:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9bada43-ad8f-433a-b1be-7faabb941c34</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Caelus,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for lettings us know.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By the way, if you want the reset pin to act as a GPIO only that should not be a problem, but then you must not configure it as a reset pin in the UICR (it is a normal GPIO by default). If that is not something you did deliberately, then perhaps you have CONFIG_GPIO_AS_PINRESET defines for your project, which will make the hex file include data in the UICR region for PSELRESET. This is the default for most SDK examples and will enable pin reset on the first reset after programming.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Einar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 locks after programming</title><link>https://devzone.nordicsemi.com/thread/254615?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 07:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7331567-b398-492f-be9f-1480757e2b8b</guid><dc:creator>Caelus</dc:creator><description>&lt;p&gt;Hello Einar,&lt;/p&gt;
&lt;p&gt;Yes, indeed. The problem is solved.&lt;/p&gt;
&lt;p&gt;I modified the custom board by placing a pull-up resistor of 4K7 in the reset line and it works.&lt;/p&gt;
&lt;p&gt;Now I can debug my code and work on my HW.&lt;/p&gt;
&lt;p&gt;Now you may close this ticket. Thanks a lot for you support.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Caelus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 locks after programming</title><link>https://devzone.nordicsemi.com/thread/254561?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 16:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:849ae2b9-ab84-45bb-8a74-5a246ef0a2fc</guid><dc:creator>Caelus</dc:creator><description>&lt;p&gt;Hello Einar,&lt;/p&gt;
&lt;p&gt;Thank you very much for your quick response.&lt;/p&gt;
&lt;p&gt;The hex file is the same for my custom HW and for the Thingy and NRF2DK. In fact, I am able to debug with the Thingy and NRF52DK without any problem. So, I think that we would be agree that the root cause is not the APPROTECT. (but thanks for the suggestion)&lt;/p&gt;
&lt;p&gt;In my custom board, the&amp;nbsp; SWD pins are just for programming and are not share. However, the reset pin is connected to a LED. On the other hand, I have not modifed the contents of the registers PSELRESET[x], so as they contains the default configuration (0xFFFFFFFF)&lt;/p&gt;
&lt;p&gt;According to the NRF52832 PS document, that means that the content of field A is 21 and field B is &amp;quot;disconnected&amp;quot;. I understand from this that the reset is disabled in the GPIO21 and then, this pin acts as GPIO. Is it right?&lt;/p&gt;
&lt;p&gt;I will try later the nrjprog.exe --recover to recover the chip. I will keep you posted with the results.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 locks after programming</title><link>https://devzone.nordicsemi.com/thread/254484?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 12:21:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f2b322a-fec8-4584-ad06-cf28c228e357</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You write that the same code only has this effect on the custom board. Does that mean that the very same .hex file is tested on the Thingy or DK, or are there small variations? I ask because it could be that a hex file includes the APPROTECT register, and if so, the debug interface would be disabled after programming and resetting. But then this would be the same for all boards.&lt;/p&gt;
&lt;p&gt;Alternatively, could it be that the SWD pins or reset pin is connected to a GPIO in your custom HW, and that your firmware configures the GPIO and that causes problems?&lt;/p&gt;
[quote user=""]Do you know any way to unlock the microcontroller? Am I missing something?[/quote]
&lt;p&gt;In most cases you can use &amp;quot;nrfjprog.exe --recover&amp;quot;, but if the SWD lines are &amp;quot;tampered with&amp;quot;, as suggested above, then you will need to modify the HW in order to recover.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>