<?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>Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7163/can-i-write-to-the-uicr-registers-with-a-segger-and-jlink</link><description>I want to write a device ID to the UICR registers at the same time as I flash the app code. I don&amp;#39;t use Keil or that nrfproj.exe thing, I&amp;#39;m on a Mac. I have these targets in my Makefile: 
 # Write the device ID to the start of the UICR registers. Replace</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jul 2015 08:55:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7163/can-i-write-to-the-uicr-registers-with-a-segger-and-jlink" /><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25318?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 08:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c0f9a55-8306-47f1-951c-4fda558a1ba3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yes Eliot, you can write to a clean register but you cannot update an already written value without erasing it, UICR are speicial registers with same NVMC properties. That is once written to an address, you cannot update already written UICR register without erasing the whole chip. This decision was taken to remove the loopholes of security settings that lies in UICR (like CLENR0, RBPCONF), if something is set in these registers, it means that there is protection on code, and you cannot just write to this register, remove the security and read/modify the protected code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25317?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 07:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcd9a96c-6648-4a80-b227-7813f584ebbd</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I haven&amp;#39;t had a complete answer yet. Are you saying I need to read the whole page (1 KB) around the UICR registers, alter the bits I want to write to, then write the whole page back? How do I do that with a set of JLink commands?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25312?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 07:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45b5582a-1d5b-491b-821b-8faef5d61828</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Can you please update/accept this thread Eliot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25316?ContentTypeID=1</link><pubDate>Tue, 26 May 2015 10:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a0e25ed-bbcb-488c-81f6-2c30b57c6ea9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you cannot erase part of UICR registers, the only way is to erase the whole chip,
&lt;a href="https://devzone.nordicsemi.com/question/31176/can-i-erase-uicr-by-ble-app/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;in another words, you cannot update UICR register without erase the whole chip&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25315?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 17:33:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2b8cb8c-f3f5-4984-b140-e2c27fbcac24</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;OK, let me restate the question: how do I clear the UICR registers before I write to them? See my edit above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25314?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 16:15:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d4db4c2-add8-4668-9b56-e64b63225b80</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;ah, i thought 123 in your log was decimal. Read it again in decimal and see if it makes sense :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25313?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 13:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:194680ed-e76a-4812-a56f-308bd0c39b8c</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Very confused here. 0x0123 is not 01111011, it&amp;#39;s 0000 0001 0010 0011.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I write to the UICR registers with a Segger and JLink?</title><link>https://devzone.nordicsemi.com/thread/25311?ContentTypeID=1</link><pubDate>Wed, 20 May 2015 19:31:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aae011ad-0167-42ce-a343-05d0692c6da7</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You cannot write to already written UICR register without erasing it. And to erase a register you need to erase everything if there is a softdevice.
&lt;a href="https://devzone.nordicsemi.com/question/5749/can-i-write-an-available-uicr-register-directly-with-nrfjprogexe/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; if your old value is         0234(11101010&amp;#39;b), 
then writing                  0123(01111011&amp;#39;b)            to this value will make it 
                                  ------------------------------------------------------
                              0106(01101010&amp;#39;b)  -&amp;gt; could just toggle &amp;#39;1&amp;#39;s to 0&amp;#39;s
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That is why your write was completed  but verification failed. because you wanted to write 0123 but it actually wrote and read 0106 in our example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>