<?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>uicr config issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16130/uicr-config-issue</link><description>Hi, 
 i have been struggling with UICR Config in nrf52. The code: 
 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);
 
 seems to crash program execution. The chip is not freezing,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Sep 2016 13:24:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16130/uicr-config-issue" /><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61525?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 13:24:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c84cd73-e7e1-4f66-ad7e-82ada82b10f8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;unfotunately pstorage also uses sd_flash_write under the hood, so you cannot use it to write to UICR. You can however use pstorage to write to application allocated flash page.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61524?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 13:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6192dcb-589b-4383-b454-7e2222438b47</guid><dc:creator>OskarM</dc:creator><description>&lt;p&gt;I have been trying to debug it for last hour :D This sucks basically, but what can I do... I&amp;#39;ll have to move to pstorage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61523?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 13:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84c01cc6-b088-43cb-a815-31e56a52bfd2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I also forgot to mention that you cannot use this API to write to UICR, since UICR has different address space, softdevice does not allow it at the moment. This feature might be allowed in future releases.
So for now if you want to write to UICR, then you have to disable softdevice and then proceed the way you were doing, by directly accessing NVMC registers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61522?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 12:52:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8736ad8-91dc-4fef-bed7-a00cd5fddc2e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you cannot erase UICR without erasing the whole chip. To erase any other page in the flash look into &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v0.9.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga9c93dd94a138ad8b5ed3693ea38ffb3e"&gt;sd_flash_page_erase&lt;/a&gt; API. This is asynchronous function, so the function will return immediately. You will get &amp;#39;NRF_EVT_FLASH_OPERATION_SUCCESS&amp;#39;  system event when the flash page erase has completed or you will get NRF_EVT_FLASH_OPERATION_ERROR when the erase failed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61521?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 11:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9935d50b-5e3b-4ac5-95d1-1b8247cbb53d</guid><dc:creator>OskarM</dc:creator><description>&lt;p&gt;Yes, I am using softdevice. I recently moved from SD1.0.3 to the newest and most probably something changed in this area, because this worked previously.
Could you point me to some snippet on how to work with UICRs using this API? I am intereseted especially in erasing the UICR. Where is the sd_flash_write &amp;quot;response&amp;quot; received?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61520?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 11:07:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f853cb5-696c-4494-8f20-a03d8f9eb0ea</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If you are using softdevice, then NVMC is protected module. Accessing it will cause hardfault.
You have to use sd_flash_xxx() API in nrf_soc.h
If you are not using softdevice, then you have explain more about the fault exception generated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: uicr config issue</title><link>https://devzone.nordicsemi.com/thread/61519?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 11:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21929c98-1ef9-4c34-809e-7a5315cca96e</guid><dc:creator>OskarM</dc:creator><description>&lt;p&gt;Actually I noticed, that write enable also does the same thing:&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);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Any clues?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>