<?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>Program and secure in one step</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115446/program-and-secure-in-one-step</link><description>Is it possible to use the nrfjprog utility to program and secure (from read over the SWD) the nRF52840 in one step? I tried: 
 nrfjprog -f NRF52 --program abc.hex --chiperase --verify --memwr 0x10001208 --val 0xFFFFFF0 ERROR: Two arguments were provided</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Oct 2024 11:54:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115446/program-and-secure-in-one-step" /><item><title>RE: Program and secure in one step</title><link>https://devzone.nordicsemi.com/thread/506095?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2024 11:54:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:807d5e30-deb1-40d5-be41-0317c3415f28</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Simon,&amp;nbsp;&lt;br /&gt;You can do it in one go by preparing&amp;nbsp; your hex file with the address 0x10001208 already written.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What you can do is to flash with 2 steps as above.&amp;nbsp;But don&amp;#39;t reset the chip, so that you still have access to the chip. Then save the UICR to a file by using:&amp;nbsp;&lt;br /&gt;nrfjprog --readuicr uicr.hex&lt;/p&gt;
&lt;p&gt;You then can merge the uicr.hex with your application.hex do:&amp;nbsp;&lt;br /&gt;mergehex.exe -m abc.hex uicr.hex -o merged_uicr.hex&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With that you only need to flash merged_uicr.hex to have the address 0x10001208 written when you flash the application.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>