<?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>Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47897/flash-hex-file-with-nrfjprog-command-not-able-to-access-uicr</link><description>I have issue to program nrf52832 with nrfjprog command line. 
 my program use nrf52formesh sdk. I developed with Segger Embedded Studio with GCC on the Linux PC. I modified my_nrf52832.ld file to use UICR and GPIO function on the NFC antenna pins my_nrf52832</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jul 2021 13:56:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47897/flash-hex-file-with-nrfjprog-command-not-able-to-access-uicr" /><item><title>RE: Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/thread/320296?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 13:56:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f8178ba-f596-4d91-933d-a0871f6f9043</guid><dc:creator>vinay_kumar</dc:creator><description>&lt;p&gt;Hey! I am also facing same issue. Is this issue solved?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/thread/190556?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 14:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8ab9471-1eba-4810-9153-0b7d2abb2be2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It shouldn&amp;#39;t be a problem to use nrfjprog&amp;nbsp;as you described. So I think you&amp;nbsp;have to debug the application to figure out why it&amp;#39;s not working. There is no HW protection of the UICR as I&amp;#39;ve mentioned earlier.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="min26"]If you have alternate method of modifying linked file, please teach me. I&amp;#39;d like to try it&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;I&amp;#39;m not aware of any other GCC alternatives for absolute placement of variables. But sounds like this part is working as intended, it&amp;#39;s just that the app is not working when you set the same registers via the programmer?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/thread/190334?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 17:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce93ff0f-617a-47ee-ae8f-7dc65af31aec</guid><dc:creator>min26</dc:creator><description>&lt;p&gt;Dear Berg,&lt;/p&gt;
&lt;p&gt;1. Of cause I do &amp;#39;nrfjprog -f nrf52 --eraseuicr&amp;#39; before write. without erase, nrfjprog doesn&amp;#39;t let me write to the UICR.&lt;/p&gt;
&lt;p&gt;2 &amp;amp; 3. When I download flash with the Segger Studio, I don&amp;#39;t see any problem.&amp;nbsp; In my case, the issues comes with &amp;#39;nrfjprog&amp;#39; command.&amp;nbsp; I really like to use command line type of programmer for my Graphic Interface tool( Desktop)&lt;/p&gt;
&lt;p&gt;If you have alternate method of modifying linked file, please teach me. I&amp;#39;d like to try it&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/thread/190212?ContentTypeID=1</link><pubDate>Fri, 31 May 2019 09:05:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e101a3c5-44c6-4b02-9fe5-b86ab77c3544</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="min26"]Yes you are right. but I try to flash with unique UICR value. so I overwrite the UICR value after flash the binary.[/quote]
&lt;p&gt;&amp;nbsp;Note that you need to erase UICR to update an existing value since it&amp;#39;s flash memory. E.g.,&lt;/p&gt;
&lt;p&gt;nrfjprog --eraseuicr&lt;/p&gt;
&lt;p&gt;nrfjprog --memwr 0x10001080 --val 0x12345678&lt;/p&gt;
&lt;p&gt;nrfjprog -r&lt;/p&gt;
[quote user="min26"]On the debug, I didn&amp;#39;t get any value.[/quote]
&lt;p&gt;This is a symptom of a different problem. There is nothing in HW that can prevent the app from reading the UICR. Do the app function normally apart from not being able to read out the value?&amp;nbsp;&lt;/p&gt;
[quote user="min26"](Is any other easy way to do instead of modify &amp;#39;ld&amp;#39; file?) Do you have any idea what is problem here?[/quote]
&lt;p&gt;&amp;nbsp;You can write to the UICR at runtime as we do when we enable the reset pin in nrf52_system.c, but the result should be the same. I think you need to do more debugging of the app to figure out why it fails to read the UICR.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/thread/189969?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 16:23:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c65d3677-b405-46d3-ad68-30e8f5500bf9</guid><dc:creator>min26</dc:creator><description>&lt;p&gt;Dear Berg,&lt;/p&gt;
&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;it shouldn&amp;#39;t be necessary to write in manually with nrfjprog?&lt;/p&gt;
&lt;p&gt;- Yes you are right. but I try to flash with unique UICR value. so I overwrite the UICR value after flash the binary.&lt;/p&gt;
&lt;p&gt;Can you debug the application to see what value is being read?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- On the debug, I didn&amp;#39;t get any value. by the way, I am able to read/write to &amp;#39;nrfjprog --memrd/memwr&amp;#39; command. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i suspect the modified linked file(my_nrf52832.ld)&lt;/p&gt;
&lt;p&gt;The example of the UICR does as below&lt;/p&gt;
&lt;p&gt;&lt;span class="keyword"&gt;const&lt;/span&gt; uint32_t UICR_ADDR_0x80 __attribute__((at(0x10001080))) __attribute__((used)) = 0x12345678;&lt;/p&gt;
&lt;p&gt;But GCC doesn&amp;#39;t support &amp;quot;at&amp;quot; and I have to use the code as below with modified &amp;#39;ld&amp;#39; file.&lt;/p&gt;
&lt;p&gt;volatile uint32_t uicr_data&amp;nbsp; __attribute__ ((section(&amp;quot;.uicr_customer&amp;quot;))) = 0x12345678;&lt;/p&gt;
&lt;p&gt;(Is any other easy way to do instead of modify &amp;#39;ld&amp;#39; file?) Do you have any idea what is problem here?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash hex file with nrfjprog command; not able to access UICR</title><link>https://devzone.nordicsemi.com/thread/189870?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 12:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b082ea3-02ea-4310-bebf-10dab7f7bca5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like you include the UICR data in the hex file, so it shouldn&amp;#39;t be necessary to write in manually with nrfjprog?&lt;/p&gt;
[quote user=""]After flash the hex files using &amp;quot;nrfjprog&amp;quot; command, my code not able to access the UICR value.[/quote]
&lt;p&gt;&amp;nbsp;Can you debug the application to see what value is being read?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>