<?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 erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115778/how-to-erase-uicr-on-nrf52832-from-the-code-not-from-nrfjprog</link><description>I want to update some data stored in UICR CUSTOMER area on an nrf52832. 
 Code to do this works fine, as long as the areas are already erased (0xFFFFFFFF). 
 However, if they have already had a value written, and I want to update it, I understand I need</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Feb 2025 09:41:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115778/how-to-erase-uicr-on-nrf52832-from-the-code-not-from-nrfjprog" /><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/523206?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 09:41:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1b5f808-21b7-4bf4-a21c-c85b35a6eefd</guid><dc:creator>BrianW</dc:creator><description>&lt;p&gt;Ok, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/523189?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 08:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5759271f-b267-4620-8abf-0d3c9caa9381</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yes, disable the softdevice temporarily and write to the UICR register and then enable the softdevice later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/522916?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 15:26:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14fcaa54-8380-46e2-8177-7e52bb0c4f86</guid><dc:creator>BrianW</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/115778/how-to-erase-uicr-on-nrf52832-from-the-code-not-from-nrfjprog/522633"]UICR is a protected peripheral when softdevice is enabled.[/quote]
&lt;p&gt;Does this mean there is no way to write to UICR when softdevice is enabled? (no sd_uicr_write or similar?)&lt;/p&gt;
&lt;p&gt;In a related topic, does doing the Nordic DFU operation delete or modify the UICR? (specifically the CUSTOMER[] words)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/522633?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 11:58:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43645a3c-455e-4840-bbcd-78c7cc303fdb</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You cannot touch UICR registers directly when using the softdevice that is when softdevice is enabled. You need to use softdevice enabled functions like&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;sd_flash_page_erase&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;sd_flash_write&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;UICR is a protected peripheral when softdevice is enabled.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/522628?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 11:50:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c415ad3e-d2e2-4c8e-a450-c244740475c3</guid><dc:creator>BrianW</dc:creator><description>&lt;p&gt;I can confirm the issue is with the SoftDevice ble stack : as this takes offense and reboots if it can&amp;#39;t schedule as it needs, this can happen during the UICR erase (as the code has to wait for this to finish), and so can get randomly rebooted....&lt;/p&gt;
&lt;p&gt;My workaround is to only update the UICR ina mode without SD running....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/521773?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 15:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c0eaa04-ffc6-41da-9636-ede0fb13a58c</guid><dc:creator>BrianW</dc:creator><description>&lt;p&gt;Came back to retry to fix this with the debugger, but the problem has gone...it now correctly manages to erase the UICR customer registers, while (as far as I can see) preserving the others.&lt;/p&gt;
&lt;p&gt;Maybe an interaction with the SoftDevice bluetooth stack running while my code was running...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/508288?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 07:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aba3211-916d-4502-b5c4-cf60277a1169</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Have you started the debugger and let it run and paused it to see the context?&amp;nbsp;Understanding the context is important like I wrote to have a proper debugging direction.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/507776?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 13:50:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a388811f-324c-4be6-9d4f-d7d99e55edde</guid><dc:creator>BrianW</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/115778/how-to-erase-uicr-on-nrf52832-from-the-code-not-from-nrfjprog/507718"]You are enabling approtect, enabling read mode and then writing the rest of the registers?&amp;nbsp; Why write after enabling read mode?&amp;nbsp;[/quote]
&lt;p&gt;No, I read out the registers in UICR that will be lost when I do ERASEUICR, then set them back to the saved values afterwards. I just want to preserve them over ERASEUICR!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase UICR on nrf52832 from the code (not from nrfjprog)</title><link>https://devzone.nordicsemi.com/thread/507718?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 11:14:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bd96f6-8af4-41d9-bb46-6a69ae345276</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You are enabling approtect, enabling read mode and then writing the rest of the registers?&amp;nbsp; Why write after enabling read mode?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you to start debugger and let this code run and then pause the debugger to see where it is &amp;quot;hung&amp;quot;, to understand the context. I am guessing it is looping in fault handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>