<?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>Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28404/unable-to-recover-pca10040-after-writing-0xffffff00-to-approtect-register</link><description>Hello!
After writing 0xFFFFFF00 to APPROTECT register can&amp;#39;t &amp;quot;recover&amp;quot; board: 
 C:\Program Files (x86)\Nordic Semiconductor\nrf5x\bin&amp;gt;nrfjprog.exe --recover --log
Recovering device. This operation might take 30s.
ERROR: JLinkARM DLL reported an error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Dec 2017 11:17:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28404/unable-to-recover-pca10040-after-writing-0xffffff00-to-approtect-register" /><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112092?ContentTypeID=1</link><pubDate>Fri, 29 Dec 2017 11:17:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a65e0463-7ff1-4d53-a18d-aa4be56f4321</guid><dc:creator>sreehari410</dc:creator><description>&lt;p&gt;@Vladimir did you find a solution to the above problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112084?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2016 08:31:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22f1ec4d-5b15-409a-b0b9-fd8365f79300</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;The issue is fixed in &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832#Downloads"&gt;Command-Line-Tools V9.0.0&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112097?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2016 08:30:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17923437-03f5-4413-a97f-6e0594c6fa3f</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;The issue is fixed in &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52832#Downloads"&gt;Command-Line-Tools V9.0.0&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112096?ContentTypeID=1</link><pubDate>Sat, 11 Jun 2016 11:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c27f009e-3dc2-4b83-8d66-32a0c83d4184</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;At least command parameter to new nrfjprog doesn&amp;#39;t change - it still --recover. I hope that in release notes for new version they will post some additional info.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112095?ContentTypeID=1</link><pubDate>Sat, 11 Jun 2016 00:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6464fa19-4514-4578-82d8-852002553924</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That&amp;#39;s rather worrying - since all nrfjprog does it send a sequence out of the JLink, what extra above what&amp;#39;s documented is now required to get the chip out of protected mode. I just checked that Rigado uses the same sequence I pasted in their unlocker, would be helpful to know what&amp;#39;s changed and is needed now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112094?ContentTypeID=1</link><pubDate>Fri, 10 Jun 2016 12:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a85064-1050-46f6-94b6-2a49b2018d22</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;My PCA10040 works again.
Person from nordic&amp;#39;s support gave me preliminary verstion of nrfjprog, which helped with this problem.&lt;/p&gt;
&lt;p&gt;So if anyone have same problem - do not hesitate to open a support request on &lt;a href="https://www.nordicsemi.com/eng/Support-Community"&gt;mypage&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112091?ContentTypeID=1</link><pubDate>Fri, 10 Jun 2016 09:11:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bd8d5a2-7645-401b-974a-300b61da5359</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;Just opened the case on mypage. If we will find any solution I&amp;#39;ll post it here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112090?ContentTypeID=1</link><pubDate>Fri, 10 Jun 2016 08:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b541b4-a7c0-425c-99a6-65ed1ddc0481</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi. If you are still struggling with this, can you please open a support request on &lt;a href="https://www.nordicsemi.com/eng/Support-Community"&gt;mypage&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112089?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 13:15:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c756b3eb-ee20-4186-84d2-3e2eddb4a655</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;Without -if swd and -device lines and with SWD commands above - the same result. I too think, that it is hardware issue.
Thanks anyway, RK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112093?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 13:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19bc8a94-29fe-4fff-8e35-f9652fc370a4</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I&amp;#39;ve looked at the register sequence again - they still look correct - so perhaps you have an actual hardware issue on the chip or on the JLink. I have this in a repository, let me just cut and paste it instead of typing it in, although I think it&amp;#39;s exactly the same&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SWDSelect 
SWDWriteDP 1 0x50000000
SWDWriteDP 2 0x01000000
SWDWriteAP 1 0x00000001
sleep 500
SWDReadAP 3
SWDReadAP 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ok that&amp;#39;s pasted right out of the git repo I used, it looks the same to me. If that doesn&amp;#39;t work, I have no more ideas left. You probably don&amp;#39;t even need the -if swd and -device lines on the JLink command, but since it&amp;#39;s not actually connecting yet .. shouldn&amp;#39;t make a difference. But try without them.&lt;/p&gt;
&lt;p&gt;Then I really AM out of ideas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112088?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 12:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a84d110-b41a-4a4f-a784-836cbbde77cb</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;J-Link&amp;gt;SWDSelect&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    Select SWD by sending SWD switching sequence.
    Found SWD-DP with ID 0x2BA01477
    J-Link&amp;gt;SWDWriteDP 1, 0x50000000
    Write DP register 1 = 0x50000000
    J-Link&amp;gt;SWDWriteDP 2, 0x01000000
    Write DP register 2 = 0x01000000
    J-Link&amp;gt;SWDWriteAP 1, 0x00000001
    Write AP register 1 = 0x00000001
    J-Link&amp;gt;SWDReadAP 2
    Read AP register 2 = 0x00000000
    J-Link&amp;gt;SWDReadAP 3
    Read AP register 3 = 0x00000001
    J-Link&amp;gt;SWDReadAP 3
    Read AP register 3 = 0x00000000
    J-Link&amp;gt;SWDReadAP 3
    Read AP register 3 = 0x00000000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that, readback is still on. More then this - firmware in the board is still working - I can see my ble services.&lt;/p&gt;
&lt;p&gt;After first call SWDReadAP 3 returns 1, after second and third - it returns 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112087?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 12:44:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e7995b8-56d5-490e-8239-1349a5209869</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;well that&amp;#39;s the reset sequence and I&amp;#39;ve had it work, you can if you like add onto the end&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SWDReadAP 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and repeat that until you get &amp;#39;0&amp;#39; which says it&amp;#39;s finished clearing  memory and at that point&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SWDReadAP 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;should return 1 (you have to do it twice) showing protection is disabled. The output above looks right to me, incluidng the SWD-DP id so you definitely found it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112086?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 12:38:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fe1f71d-f56b-4de1-8648-2c756f87c55d</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;C:\Program Files (x86)\SEGGER\JLink_V512f&amp;gt;Jlink -if swd -device nrf52
SEGGER J-Link Commander V5.12f (Compiled May 17 2016 16:04:09)
DLL version V5.12f, compiled May 17 2016 16:03:35&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
Hardware version: V1.00
S/N: &amp;lt;my serial number&amp;gt;
VTref = 3.300V


Type &amp;quot;connect&amp;quot; to establish a target connection, &amp;#39;?&amp;#39; for help
J-Link&amp;gt;SWDSelect
Select SWD by sending SWD switching sequence.
Found SWD-DP with ID 0x2BA01477
J-Link&amp;gt;SWDWriteDP 1, 0x50000000
Write DP register 1 = 0x50000000
J-Link&amp;gt;SWDWriteDP 2, 0x01000000
Write DP register 2 = 0x01000000
J-Link&amp;gt;SWDWriteAP 1, 0x00000001
Write AP register 1 = 0x00000001
J-Link&amp;gt;^C
C:\Program Files (x86)\SEGGER\JLink_V512f&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After that, device unfortunately is sill has readback protection and I can&amp;#39;t disable it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112085?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 12:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab01974b-4721-4318-9bb7-800595283c43</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;You could try doing it manually using JLink from the command line, connect with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;JLink -if swd -device nrf52
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or on OSX it&amp;#39;s JLinkExe. Then&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SWDSelect
SWDWriteDP 1, 0x50000000
SWDWriteDP 2, 0x01000000
SWDWriteAP 1, 0x00000001
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That should clear the app protection and entirely erase the chip and allow JLink to connect to the chip again. I have actually done this myself and it did work for me (on a module which came factory locked).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to recover PCA10040 after writing 0xFFFFFF00 to APPROTECT register.</title><link>https://devzone.nordicsemi.com/thread/112083?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 11:50:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2216c0b3-199a-4554-93ac-e4e69cb6adb8</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;Just found out - it is the same problem as here: &lt;a href="https://devzone.nordicsemi.com/question/82295/nrf52using-comand-line-rbp-lead-to-recover-fail/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
But with different version of nrfjprog.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>