<?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>How to Write values to UICR register ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28816/how-to-write-values-to-uicr-register</link><description>I am using nrf52832_xxaa with SDK v11.0.
I have a requirement to write into UICR register APPROTECT to set its value to 0x00.
Is it possible?If yes, please provide a sample code.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Dec 2017 23:15:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28816/how-to-write-values-to-uicr-register" /><item><title>RE: How to Write values to UICR register ?</title><link>https://devzone.nordicsemi.com/thread/114128?ContentTypeID=1</link><pubDate>Wed, 27 Dec 2017 23:15:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:584a8e3b-6462-4743-85c9-75c05440beb2</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;(also note that UICR registers are loaded at the start-up so to make it effective you need to reset the chip at least once, whatever method you use...)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Write values to UICR register ?</title><link>https://devzone.nordicsemi.com/thread/114127?ContentTypeID=1</link><pubDate>Wed, 27 Dec 2017 09:38:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97953b60-215f-40fe-b42f-946c509df630</guid><dc:creator>Ole Saether</dc:creator><description>&lt;p&gt;Yes, it&amp;#39;s possible. Try this code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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) {}
NRF_UICR-&amp;gt;APPROTECT = 0xFFFFFF00;
while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy) {}
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;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or with nrfjprog:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfjprog --memwr 0x10001208 --val 0xffffff00
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>