<?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 into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127048/writing-into-uicr-otp-of-app-core-with-nrfprog-fails-on-nrf5340</link><description>I try to write data into the OTP section of the APP core with the following command line: 
 nrfjprog.exe -f nrf53 --program &amp;#39;OTP.ihex&amp;#39; 
 ouput: 
 [error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 736. [error] [SeggerBackend] - JLinkARM</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Feb 2026 11:51:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127048/writing-into-uicr-otp-of-app-core-with-nrfprog-fails-on-nrf5340" /><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561582?ContentTypeID=1</link><pubDate>Thu, 19 Feb 2026 11:51:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfe7e495-3d34-45f7-ba47-a940aa735942</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="BoRob"]&lt;p&gt;&lt;span title="Face palm"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I try the same using &amp;quot;nrfutil&amp;quot; the problem still exists: after power cycle the memory section seems to be empty again. I haven&amp;#39;t found a way to get a permanently written OTP section with nrfutil.&lt;/p&gt;[/quote]
&lt;p&gt;The devices are not empty, they are readback protected. This happens when the firmware running on your device does not open up the access port.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you flash your device with a firmware first, then write to UICR; this should not happen.&lt;/p&gt;
&lt;p&gt;However, if your &amp;quot;OTP.hex&amp;quot; overwrites/overlaps with the firmware already loaded onto the nRF, this will cause similar behaviour, and it will need to be recovered.&lt;/p&gt;
[quote user="BoRob"]connecting the device with ozone has shown that the OTP seems empty again after power cycle.[/quote]
&lt;p&gt;Ozone and other JLink software, will detect that your device is protected and provide a pop-up asking if you would like to recover the device by issuing an erase operation.&lt;/p&gt;
&lt;p&gt;This will then erase UICR again, similar to nrfjprog --recover and nrfutil device recover.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561512?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2026 15:13:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ed9cab-da84-4adf-b500-bf571ed19417</guid><dc:creator>Robert</dc:creator><description>&lt;p&gt;I just recognized that I used the command &amp;quot;nrfprog&amp;quot; by accident to write the hex file ...&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f926.svg" title="Face palm"&gt;&amp;#x1f926;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I try the same using &amp;quot;nrfutil&amp;quot; the problem still exists: after power cycle the memory section seems to be empty again. I haven&amp;#39;t found a way to get a permanently written OTP section with nrfutil.&lt;/p&gt;
&lt;p&gt;Currently the solution with nrfprog is good enough for me, but for completeness I would like to mention my observation using nrfutil.&lt;/p&gt;
&lt;p&gt;here is what I have done:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;build\app&amp;gt; nrfutil.exe device program --traits jlink --firmware &amp;#39;OTP.hex&amp;#39; --options verify=VERIFY_READ
[00:00:00] ###### 100% [3/3 504401838] Programmed

build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100                                                                             
504401838
0x00FF8100: DA7A7E75                              |u~z.|

----- power cycle --------

build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100
Error: One or more read memory tasks failed:
 * 504401838: Failed to attach to target: The Application core access port is protected (All) (NotAvailableBecauseProtection)


The operation was unavailable for some of the devices because they had readback protection enabled. These devices might be possible to unlock using the `recover` subcommand. See `nrfutil device recover --help` for more information.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;connecting the device with ozone has shown that the OTP seems empty again after power cycle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561486?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2026 13:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc6bae49-fc42-49a3-bcff-8258b9dbcd8f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="BoRob"]I am a little bit confused that it seems possible to delete an OTP (One Time Programmable) memory section ...[/quote]
&lt;p&gt;I agree, the naming convention here is confusing from our side, as&amp;nbsp;OTP refers to a&amp;nbsp;physical memory technology.&lt;/p&gt;
&lt;p&gt;On other devices, the field was called &amp;quot;CUSTOMER&amp;quot;, as here with the nRF52840:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52840/page/uicr.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52840/page/uicr.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With nRF53 and newer, keys can be stored in this area, and from the &amp;quot;internal point-of-view&amp;quot;, ie. code running on the&amp;nbsp;MCU&amp;nbsp;cannot erase UICR, so it is a sort of &amp;quot;emulated OTP&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My apologies for the inconvenience.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561473?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2026 12:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94b5d6c3-8499-4fe8-94ae-3f798b472f9c</guid><dc:creator>Robert</dc:creator><description>&lt;p&gt;Finaly this seems to work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;build\app&amp;gt; nrfjprog.exe -f nrf53 --program &amp;#39;OTP.hex&amp;#39;
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 736.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 629.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 911.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3087.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3112.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3349.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3160.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3176.
[error] [ Worker] - Can&amp;#39;t read memory descriptors, ap-protection is enabled.
[error] [ Client] - Encountered error -90: Command read_memory_descriptors executed for 15 milliseconds with result -90
[error] [ Client] - Encountered error -90: Command program_file executed for 1941 milliseconds with result -90
[error] [  nRF53] - Failed while performing &amp;#39;Write&amp;#39; operation on target address 0x00FF8100. 
-90: Access protection is enabled, can&amp;#39;t access memory.
[error] [  nRF53] - Failed while reading device information.
[error] [ Worker] - Access protection is enabled, can&amp;#39;t access memory.
ERROR: The operation attempted is unavailable due to readback protection in
ERROR: your device. Please use --recover to unlock the device.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

build\app&amp;gt; nrfutil.exe device recover
v Recovered 504401838

build\app&amp;gt; nrfjprog.exe -f nrf53 --program &amp;#39;OTP.hex&amp;#39;
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 736.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 629.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 911.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3087.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3112.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3349.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3160.
[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3176.
[ #################### ]   0.080s | Program file - Done programming
WARNING: A programming operation has been performed without --verify.
WARNING: Programming can fail without error.
build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100
504401838
0x00FF8100: DA7A7E75                              |u~z.|

----- power cycle ---------

build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100
504401838
0x00FF8100: DA7A7E75                              |u~z.|

&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I am a little bit confused that it seems possible to delete an OTP (One Time Programmable) memory section ...&lt;br /&gt;&lt;br /&gt;But nevertheless many thanks for your support, that helped me a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561466?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2026 11:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d12b13a9-b236-4fa3-8402-f6da2894745b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you perform a recover operation, ie &amp;quot;nrfutil device recover&amp;quot; or &amp;quot;nrfjprog --recover&amp;quot;; UICR will be deleted:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/ctrl-ap.html#ariaid-title3"&gt;https://docs.nordicsemi.com/bundle/ps_nrf5340/page/ctrl-ap.html#ariaid-title3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you perform these steps (ie. omit &amp;quot;recover&amp;quot;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil.exe device program --traits jlink --firmware &amp;#39;OTP.ihex&amp;#39;
--- power cycle of the device ---
nrfutil.exe device read --address 0x00ff8100&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You should read back the written data to that address.&lt;/p&gt;
&lt;p&gt;Let me know if this is not working as intended.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561379?ContentTypeID=1</link><pubDate>Tue, 17 Feb 2026 15:26:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fecacef-c3c3-4ec1-bf83-36e1cf537acd</guid><dc:creator>Robert</dc:creator><description>&lt;p&gt;I was searching the Nordic Q&amp;amp;A and nrfprog was used in most of the comments and so did I.&lt;/p&gt;
&lt;p&gt;Now I tried nrfutil with the following results:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This seems to work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS D:\app\build\app&amp;gt;  nrfutil.exe device write --address 0x00FF8100 --value 0xDA7A7E75
v Data written to 504401838

PS D:\app\build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100
504401838
0x00FF8100: DA7A7E75                              |u~z.|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;----- power cycle of the device -------&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS D:\app\build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100 
504401838
0x00FF8100: DA7A7E75                              |u~z.|&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Trying programming using a hex file as input seems not to work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS D:\app\build\app&amp;gt; nrfutil device recover
v Recovered 504401838

PS D:\app\build\app&amp;gt; nrfutil.exe device program --traits jlink --firmware &amp;#39;OTP.ihex&amp;#39;
[00:00:00] ###### 100% [2/2 504401838] Programmed

PS D:\app\build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100
504401838
0x00FF8100: DA7A7E75                              |u~z.|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;----- power cycle of the device -------&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS D:\app\build\app&amp;gt; nrfutil device recover
v Recovered 504401838

PS D:\app\build\app&amp;gt; nrfutil.exe device read --address 0x00FF8100
504401838
0x00FF8100: FFFFFFFF                              |....|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is this by intention or am I doing anything wrong? It would be great if programming using a hex file would work out of the box instead of creating a script with a sequence of single write operations.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: writing into UICR OTP of APP core with nrfprog fails on nrf5340</title><link>https://devzone.nordicsemi.com/thread/561368?ContentTypeID=1</link><pubDate>Tue, 17 Feb 2026 14:19:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09c09184-0da8-4fc6-8c8f-3256b5881f97</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""][error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 736.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 629.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 911.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3139.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3087.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3112.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3349.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3160.&lt;br /&gt;[error] [SeggerBackend] - JLinkARM.dll reported error -256 at line 3176.[/quote]
&lt;p&gt;These errors are indicating a problem with nrfjprog and the jlink version.&lt;/p&gt;
&lt;p&gt;If you want to use nrfjprog, and not the newer &amp;quot;nrfutil device&amp;quot;, I would recommend that you use the recommended jlink version that is bundled here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools/Download?lang=en#infotabs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also tried to use the following command for tests: nrfjprog -f nrf53 --memwr 0x00FF8100 --val 0x7E75&lt;/p&gt;
&lt;p&gt;the same problem here: cells are empty after power cycle.&lt;/p&gt;[/quote]
&lt;p&gt;After installing the recommended jlink version, could you try to re-try this sequence?&lt;/p&gt;
&lt;p&gt;You can use &amp;quot;nrfjprog --memrd 0x00FF8100&amp;quot; to readback after a reset/power cycle.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>