<?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>nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90696/nrf52840-readout-protection-problem</link><description>Hi, 
 I have a custom pcb with NRF52840-QIAA-F-R (rev3) on it. And when I tried to program it first time, nrfjprog shown the folowing error: 
 ERROR: The operation attempted is unavailable due to readback protection in ERROR: your device. Please use </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Aug 2022 11:13:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90696/nrf52840-readout-protection-problem" /><item><title>RE: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380346?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 11:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0932c582-2d4b-42f8-8ad8-6148947f3270</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please check if the UICR.&lt;span&gt;&lt;a title="APPROTECT" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uicr.html?cp=4_0_0_3_4_0_4#register.APPROTECT"&gt;APPROTECT&lt;/a&gt;&lt;/span&gt; register remains set to HwDisabled/0x5A after you have programmed the Bluetooth FW.&lt;/p&gt;
[quote user="nevi"]The error is not consistent. Sometimes the memrd run successfully after programming. Sometimes nrfjpog say this:[/quote]
&lt;p&gt;Have you noticed if the error starts occurring after a pin reset or power on reset? A regular soft reset will not be enough to re-activate the readback protection after a &amp;#39;--recover&amp;#39;.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&lt;span&gt;Note:&lt;/span&gt; Register &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/dif.html?cp=4_0_0_3_7_2#register.DISABLE"&gt;APPROTECT.DISABLE&lt;/a&gt; is reset after pin reset, power or brownout reset, watchdog reset, or wake from System OFF as mentioned above. (&lt;span&gt;&lt;a title="Access port protection" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/dif.html?cp=4_0_0_3_7_1#concept_udr_mns_1s"&gt;Access port protection&lt;/a&gt;&lt;/span&gt;)&lt;br /&gt;&lt;/em&gt;&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: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380177?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 14:23:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a3904b0-69d2-4f58-8fed-40712fae04be</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;It&amp;#39;s very strange. The error is not consistent. Sometimes the memrd run successfully after programming. Sometimes nrfjpog say this:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;ERROR: The operation attempted is unavailable due to readback protection in&lt;br /&gt;ERROR: your device. Please use --recover to unlock the device.&lt;br /&gt;NOTE: For additional output, try running again with logging enabled (--log).&lt;br /&gt;NOTE: Any generated log error messages will be displayed.&lt;/p&gt;
&lt;p&gt;Usually if I try to reprogram with --sectorerase it is ok (and then the memrd is also ok), but after I try with --chiperase I get the above error.&lt;br /&gt;&lt;br /&gt;The protection problem usually appears when a program that uses the BT stack (SD) is started.&lt;br /&gt;If the program does not start because only the SD has been written, then the error occurs less frequently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380144?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 13:16:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:974e3a79-88ca-4685-ac27-3f07bd975250</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You should not have to update the MDK when using SDK 17.1.0.&lt;/p&gt;
[quote user=""]If I program the SD and the app at the same time and then reset, it works. But then I can&amp;#39;t debug.[/quote]
&lt;p&gt;What happens when you try to debug, do you get an error message? Also, does nrfjprog claim that readback protection is enabled if you try to access the memory (e.g nrfjprog --memrd 0x0)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380134?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 13:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94712d36-9a3c-4a12-9aea-e3a9c160a469</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;I have this:&lt;/p&gt;
&lt;p&gt;nrfjprog version: 10.17.0 external&lt;br /&gt;JLinkARM.dll version: 7.66a&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really understand this MDK stuff in&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/in_141_v1.1.pdf?cp=4_0_2_6"&gt; IN141 Informational Notice v1.1&lt;/a&gt;,. Shoud I replace mdk in the nRF5 SDK? Or there is a newer version of the SDK (with this new MDK) . I use the&amp;nbsp;nRF5_SDK_17.1.0_ddde560 and can&amp;#39;t find newer.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380130?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 12:57:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:455e932d-8179-4065-b47b-6e4d62d412db</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;OK, this should have worked. Please make sure you use an up to date version of nrfjprog as the older versions this not include support for this improved approtect mechanism.&lt;/p&gt;
&lt;p&gt;nrfjprog downloads:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs&lt;/a&gt; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380128?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 12:55:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15c96622-8362-42af-ba61-48bf0dad3e9d</guid><dc:creator>nevi</dc:creator><description>&lt;p&gt;I use this:&lt;/p&gt;
&lt;p&gt;nrfjprog -f NRF52 --recover&lt;br /&gt;nrfjprog -f NRF52 --program &amp;quot;s140_nrf52_7.2.0_softdevice.hex&amp;quot; --chiperase --verify&lt;br /&gt;nrfjprog -f NRF52 --program &amp;quot;nrf52840_xxaa.hex&amp;quot; --verify --reset&lt;/p&gt;
&lt;p&gt;What does this set the APPROTECT register to, hwDisabled or disabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 readout protection problem</title><link>https://devzone.nordicsemi.com/thread/380127?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2022 12:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db2ffc35-3cbc-496e-be0f-d2872b3c6e4d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is the expected behavior. Please refer to this notice for more details: &lt;span&gt;&lt;a title="IN141 Informational Notice v1.1" href="https://infocenter.nordicsemi.com/pdf/in_141_v1.1.pdf?cp=4_0_2_6"&gt;IN141 Informational Notice v1.1&lt;/a&gt;. Basically you need to update the startup files in your existing FW if you want to keep approtect disabled across resets.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;Or maybe the HwDisabled value in &lt;span class="item"&gt;&lt;a class="" title="APPROTECT" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uicr.html?cp=4_0_0_3_4_0_4#register.APPROTECT"&gt;APPROTECT&lt;/a&gt;&lt;/span&gt; is being cleared when you program your FW?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>