<?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>Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7020/erase-uicr-customer-registers</link><description>Hello, 
 I&amp;#39;m a little consufed about the page I need to erase before I can write again on the UICR CUSTOMER registers. Is there a way to erase only the UICR CUSTOMER registers? 
 Thank you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Mar 2024 10:13:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7020/erase-uicr-customer-registers" /><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/472895?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2024 10:13:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8837fb2c-6610-4dd1-8aa2-85b8c026f2af</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If you have a preprogrammed factor code on your nRF51, it might work as mentioned &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28482/erasing-uicr-register-in-application-code"&gt;here&lt;/a&gt;, else it can work with nRF52 series.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/472823?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 18:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dfcceb6-d0ca-4703-aa1a-f2b5c665527b</guid><dc:creator>colinbroderick</dc:creator><description>&lt;p&gt;&amp;gt; you cannot erase them without erasing everything on chip.&lt;/p&gt;
&lt;p&gt;This is &lt;strong&gt;definitely &lt;/strong&gt;not true and this should not be the accepted answer. I know because I erase and rewrite the UICR all the time and the application is perfectly intact at runtime and after reset. This application has been stable for several years and does this all the time.&lt;/p&gt;
&lt;p&gt;I now realize this isn&amp;#39;t the intended use of the UICR - but it is DEFINITELY NOT CORRECT that you must erase the whole chip to erase the UICR.&lt;/p&gt;
&lt;p&gt;This is the function we use and it definitely works perfectly well on both the 52832 and 52833.&lt;/p&gt;
&lt;p&gt;=========&lt;/p&gt;
&lt;p&gt;void APP__write_customer_register(uint32_t data, int reg)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Een;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_NVMC-&amp;gt;ERASEUICR = NVMC_ERASEUICR_ERASEUICR_Erase;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAP__nvmc_wait_until_ready();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_UICR-&amp;gt;CUSTOMER[reg] = data;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAP__nvmc_wait_until_ready();&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAP__nvmc_wait_until_ready();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;=================&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/472822?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 18:53:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6203801-2ab5-4901-b82c-9756493e587a</guid><dc:creator>colinbroderick</dc:creator><description>&lt;p&gt;This is absolutely and definitely not true. I am 110% certain. I know because I do it all the time.&lt;/p&gt;
&lt;p&gt;We have an application which stores calibration and serial number data in the UICR. The application can change these values at runtime and immediately use the new values. The new values and the application itself are also intact after a reset. Again, this is 100% certainly a definite fact. Our application works, is stable, and does this all the time.&lt;/p&gt;
&lt;p&gt;I realize now this isn&amp;#39;t necessarily the intended use of the UICR, but the fact is it does work. Definitely. I haven&amp;#39;t read what you linked, but if what you say is accurate, then the guy who works for Nordic is simply incorrect.&lt;/p&gt;
&lt;p&gt;What &lt;em&gt;does&lt;/em&gt; seem to be true, is that you need to erase the entire UICR to rewrite it. But not the entire chip. I haven&amp;#39;t found a way to do a partial erase of the UICR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/199923?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 06:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f17c814e-6b9b-422e-a4fa-65f49e81220c</guid><dc:creator>swna3708</dc:creator><description>&lt;p&gt;it&amp;#39;s very helpful i&amp;#39;ve been found&amp;nbsp;it for five hours.&amp;nbsp;wonderful!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/150665?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 11:08:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6bd8d4e-0853-469a-af4a-9b7068ede280</guid><dc:creator>ChrisB</dc:creator><description>&lt;p&gt;I know it has been 3 years since this answer, but&amp;nbsp;for&amp;nbsp;anyone who might want to use UICR for such purpose it can now be erased independently via&amp;nbsp;NRF_NVMC-&amp;gt;ERASEUICR .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24778?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 13:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78efca01-89eb-42f7-89a1-a068562eaa22</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;CODEPAGESIZE is in bytes. Great that you have it figured out.
can you please accept the answer and we can close this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24777?ContentTypeID=1</link><pubDate>Wed, 13 May 2015 13:37:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25cec40d-e2b6-4b98-b9b7-309c80f08605</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Is the NRF_FICR-&amp;gt;CODEPAGESIZE; in bytes or words? I&amp;#39;m asking that because on the example you have &amp;quot;i += 4;&amp;quot; after a word writer.&lt;/p&gt;
&lt;p&gt;BTW I have it worked :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24776?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 18:39:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd72c3c2-b622-4319-a956-c798502b874a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;pstorage is heavier weight library designed to work in between radio activity. It cooperates with softdevice to negotiate the time for softdevice to become idle so that it gets time to write to the flash.
The last method is direct writing to flash without softdevice coming into picture, this way the app takes responsibility that it does not make flash writes while the radio is accessing flash,else there will be a memory bus error
currently pstorage cannot work without softdevice, but we are planning  to make work without it in the future releases.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24775?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 16:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9845802-890a-4fb1-ae2c-13f305f1d30c</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll only need to store 100bytes so I can keep an array with the data. Can you just tell me the diference between this last method and pstorage without soft-device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24774?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 16:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b7898e3-4bd1-49d6-9c40-9bad2d08b8cc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;i did not knew that you did not have a softdevice, in that case you can use last flash page for your application specific data, hopefully your app is not big that it consumes even the last page of avaialble flash (easy to remember its address in your app) and to read and write you can use ble_Flash module.
in SDK 8.x you will find it at nRF51_SDK_8.0.0_5fc2c3a\components\drivers_nrf\ble_flash\ble_flash.h&lt;/p&gt;
&lt;p&gt;The downside of this is that you still cannot update a word without erasing the whole page, this is unfortunately the known limitation of this type of memory. You can workaround that if you make your own algorithm to update a word, you need to reserve two flash pages for that.&lt;/p&gt;
&lt;p&gt;it might go like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1)reserve one flash page for your app and one for swap data
2) when you want to update one word in the app page, you copy full app page to swap page
3) erase app page
4) copy everything from swap page to app page until your word which need to be modified
5) write the new data to the word address in your app page, and copy the rest of swap page  to app page.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I know, all this to update a word? updating memory in flash is not cheap.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24773?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:57:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e2f4601-24b9-481d-b2b2-b7dfcc4a14ad</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Just saw there is an option for no softdevice. Do you have an example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24772?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:56:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f746596b-1dfd-48ef-81bd-d758ae21f1f6</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;I saw it need a softdevice but I&amp;#39;m not using that, is it still possible to use it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24771?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6013794e-029f-4a24-a602-1ec9d9f92c84</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Can you point me some info on how to use that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24770?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29fb336c-34b5-4b14-a540-4243c2d944f2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;UICR customer registers are meant to be stored with values that are supposed to stay there during the life time of the softdevice. you cannot erase them without erasing everything on chip.&lt;/p&gt;
&lt;p&gt;if you want persistant storage that you need to modify now and then, use pstorage module which will give you one page (1024 bytes) and you can write/read/modify single or multiple words in that page . There is really good documentation for it in SDK and many have used it and tested to be working OK. This module is designed to work well even with ongoing radio activity.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24769?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:581b7d50-ccf7-4eac-8d41-bff2cdc7c09d</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I obtained my information here: &lt;a href="https://devzone.nordicsemi.com/question/31155/can-i-erase-uicr-in-ble-app/"&gt;UICR answer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I figured the guy who worked at Nordic probably knew the correct answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24768?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:395885e8-e39e-47d8-9156-3fd84156640c</guid><dc:creator>Jose Xavier</dc:creator><description>&lt;p&gt;Are you sure? I read you can erase only some pages. So can&amp;#39;t I use the CUSTOMER registers for user applciation to store some data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Erase UICR CUSTOMER registers</title><link>https://devzone.nordicsemi.com/thread/24767?ContentTypeID=1</link><pubDate>Tue, 12 May 2015 14:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5131115-fde0-43b3-b1bf-de6342c42a18</guid><dc:creator>John</dc:creator><description>&lt;p&gt;If you do a search here in the Devzone on UICR erase, you will find that the UICR can only be erased when the entire chips flash is erased.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>