<?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>Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62252/writing-to-uicr-software-reset</link><description>Hello, 
 
 I have a simple question. So, I&amp;#39;m trying to write some manufacturing information into the UICR but once I write to these addresses I can&amp;#39;t see the device via bluetooth unless I do a hard reset. I tried using: NVIC_SystemReset(); but I was unsuccessful</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jun 2020 20:56:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62252/writing-to-uicr-software-reset" /><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/254806?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 20:56:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8892337f-540f-4369-96e4-1a36527ba253</guid><dc:creator>Nicholas_Nuti</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Ultimately, I think this is what I wanted to know. Thank you so much for the helpful information!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/254387?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 08:12:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7a1854b-37f3-448f-8a8a-c0aa128b6aa3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
[quote user="Nicholas_Nuti"]Thanks for the information! Im hoping that the registers that I&amp;#39;m using wont require a reset; do you know which do need a soft reset?[/quote]
&lt;p&gt;All the UICR registers that configure HW, which are those with an offset of 0x200 or higher require a reset to take effect since it is only read during startup.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/254322?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 17:21:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cfed5a8-7ad5-4733-a88e-2b71e65b6f35</guid><dc:creator>Nicholas_Nuti</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/62252/writing-to-uicr-software-reset/253923"]Some of the registers in the UICR are only read after reset, so a change in those need a reset for it to take effect.[/quote]
&lt;p&gt;Thanks for the information! Im hoping that the registers that I&amp;#39;m using wont require a reset; do you know which do need a soft reset? &lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/62252/writing-to-uicr-software-reset/253923"]If you just write your own user data to available registers (typically serial number or similar), then there is no need to reset, and you can read the data back immediately after as you could any other flash region.[/quote]
&lt;p&gt;That&amp;#39;s great to hear.&lt;/p&gt;
&lt;p&gt;Thank you for the info,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/253923?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2020 06:26:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:154718a1-027a-4483-a6e3-eefab6b51f1c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;I see. Thank you for letting us know.&lt;/p&gt;
[quote user="Nicholas_Nuti"]Does the UICR not need a soft reset after writing to it? Typically when I write to it using the command line tools, I need to initiate a reset so that the device will operate normally. I want to clarify this with you, the UICR can be changed and the device can operate normally after a soft reset? There is no hard reset required for this?[/quote]
&lt;p&gt;Some of the registers in the UICR are only read after reset, so a change in those need a reset for it to take effect. That applies to changes in REG0 configuration, reset pin enable/disable, etc. But in those cases, a soft reset is enough. If you just write your own user data to available registers (typically serial number or similar), then there is no need to reset, and you can read the data back immediately after as you could any other flash region.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/253891?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 20:19:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53fa78ab-8b48-4beb-82f1-19c5b356fdce</guid><dc:creator>Nicholas_Nuti</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thank you for that reference in boards.c it is helpful!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think I found the problem, at least, in this case. It seems as though, I can&amp;#39;t see the device after programming it with a hex file via command line tools unless I invoke the following:&lt;/p&gt;
&lt;p&gt;nrfjprog -f nrf52 --reset (which is technically a hard reset)&lt;/p&gt;
&lt;p&gt;So technically it wasn&amp;#39;t the UICR causing me to not be able to see the device... it was that I needed to hard reset the device after programming it with a hex file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is odd to me. Does the UICR not need a soft reset after writing to it? Typically when I write to it using the command line tools, I need to initiate a reset so that the device will operate normally. I want to clarify this with you, the UICR can be changed and the device can operate normally after a soft reset? There is no hard reset required for this?&lt;/p&gt;
&lt;p&gt;Will I run into a problem like this with DFU (I.E. if I&amp;#39;m programming the device with DFU will it require a hard reset after changing the firmware)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/253887?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 19:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d5928a2-2227-41dd-895a-6efb578132af</guid><dc:creator>Nicholas_Nuti</dc:creator><description>&lt;p&gt;Thank you for that information! It is helpful to know that the MAC address can be defined in two different ways. Although this could be important, I&amp;#39;m fairly sure that my MAC address is being stored in the FICR. Maybe I should try writing my UICR data to a different area. I will see what I can do. Thank you hmolesworth for your response!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/253713?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 08:50:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82aa90c3-a353-424a-8612-ef3f3640afb0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Nick,&lt;/p&gt;
&lt;p&gt;In general, there is no problem writing to UICR and performing a soft reset. You can see an example of that in&amp;nbsp;gpio_output_voltage_setup() in &amp;lt;SDK16&amp;gt;\components\boards\boards.c, so I suspect &lt;a href="https://devzone.nordicsemi.com/members/hmolesworth"&gt;hmolesworth&lt;/a&gt;&amp;nbsp;is onto something. Which UICR address(es) do you write to, and what is these address(es) used for?&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing to UICR + software reset</title><link>https://devzone.nordicsemi.com/thread/253641?ContentTypeID=1</link><pubDate>Sat, 06 Jun 2020 17:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:744667ba-d372-47e9-aa3e-8106c053f7eb</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;This might not answer your question directly, but it is information worth knowing when writing to the UICR; the reason is that the BLE MAC address for some BLE modules is contained in the UICR instead of being generated from the 64-bit unique ID (as in the Nordic examples). I made these notes:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@note
 * Rigado has defined a MAC address stored within NRF_UICR, which matches the
 * address inscribed on the module. The Nordic examples (eg uart and most others)
 * use the Device Id in NRF_FICR to form a MAC address, which is different and fixed
 * The 6-byte BLE Radio MAC address is stored in the nRF52832 UICR at
 * NRF_UICR_BASE+0x80 LSB first. Modules with factory firmware AA and AB are provided
 * with full memory protection enabled, not allowing the UICR to be read via the SWD interface. If
 * performing a full-erase, the MAC can then only be recovered from the 2D barcode and human-readable text.
 * Modules with factory firmware code AC and later no longer enable read-back
 * protection from the factory, allowing the MAC address to be read with an SWD programmer.
 * UICR Register (94:54:93:XX:YY:ZZ) see BMD-350 Data Sheet v2.0:
 * NRF_UICR + 0x80 (0x10001080): MAC_Addr [0] (0xZZ)
 * NRF_UICR + 0x81 (0x10001081): MAC_Addr [1] (0xYY)
 * NRF_UICR + 0x82 (0x10001082): MAC_Addr [2] (0xXX)
 * NRF_UICR + 0x83 (0x10001083): MAC_Addr [3] (0x93)
 * NRF_UICR + 0x84 (0x10001084): MAC_Addr [4] (0x54)
 * NRF_UICR + 0x85 (0x10001085): MAC_Addr [5] (0x94)
 *
 * Nordiv MAC Address - from 64-bit unique id in NRF_FICR-&amp;gt;DEVICEADDR
 * ==================
 * DA:88:19:2D:84:27 from DE5FDA88192D8427
 *
 * Last 2 bits in 48-bit stream - top 2 bits in last byte of Device Address
 * 00 Public
 * 01 Static
 * 10 Resolvable
 * 11 Non-Resolvable
 *
 * Note that even though the address is &amp;quot;Random&amp;quot;, it is invariant and never changes
 * for a specific Nordic device as the NRF_FICR-&amp;gt;DEVICEADDR registers are Read-Only
 */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is possible the code was using the UICR MAC address which disappears when overwritten and reset, maybe causes loss of communication on that MAC. If the host isn&amp;#39;t&amp;nbsp;expecting that specific MAC address the this of course does not apply,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>