<?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>Enable APP Protection Fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52308/enable-app-protection-fails</link><description>Hi, 
 
 I&amp;#39;m working on enabling APP Protection while successfully executing below code: 
 if (!nrf_sdh_is_enabled()) { if (VERSION_BUILD &amp;lt;= MAX_RELEASE_BUILD) { NRF_UICR-&amp;gt;APPROTECT = 0xFFFFFF00; } } 
 
 Please advise why I&amp;#39;m still able to read out the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Sep 2019 19:29:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52308/enable-app-protection-fails" /><item><title>RE: Enable APP Protection Fails</title><link>https://devzone.nordicsemi.com/thread/210536?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 19:29:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5690ea7-3461-43f7-914f-11ba1eb47888</guid><dc:creator>Ronny L</dc:creator><description>&lt;p&gt;Thanks, this helped and works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable APP Protection Fails</title><link>https://devzone.nordicsemi.com/thread/210526?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2019 18:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6a1c8eb-4d29-49ff-9386-272cf1bc2da9</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;Are you sure the NRF_UICR-&amp;gt;APPROTECT register is being written to with&amp;nbsp;your above code? I think you need to set the NVMC controller in write mode before you can write anything to the UICR registers.&lt;/p&gt;
&lt;p&gt;Maybe try the following:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Turn on flash write enable and wait until the NVMC is ready: */
NRF_NVMC-&amp;gt;CONFIG = (NVMC_CONFIG_WEN_Wen &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos);
while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}


/* write to the register */
NRF_UICR-&amp;gt;APPROTECT = 0xFFFFFF00;
while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
    
/* Turn off flash write enable and wait until the NVMC is ready: */
NRF_NVMC-&amp;gt;CONFIG = (NVMC_CONFIG_WEN_Ren &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos);
while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>