<?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>NRF53 programming by using nrfjprog-Q</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123252/nrf53-programming-by-using-nrfjprog-q</link><description>Here is my script for programming. Does the sequence is OK? or any advice to improve? 
 
 nrfjprog --eraseall 
 nrfjprog --recover --family NRF53 --coprocessor CP_APPLICATION nrfjprog --recover --family NRF53 --coprocessor CP_NETWORK nrfjprog --qspieraseall</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Jul 2025 11:30:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123252/nrf53-programming-by-using-nrfjprog-q" /><item><title>RE: NRF53 programming by using nrfjprog-Q</title><link>https://devzone.nordicsemi.com/thread/544063?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 11:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b89d771-69f0-419d-80ec-733093a88ce0</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Steven,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is not a problem with your command syntax, but rather with the device state or debug interface readiness.&amp;nbsp;&lt;/span&gt;&lt;span&gt;The error from the log&amp;nbsp;&lt;/span&gt;indicates that the tool was unable to communicate properly with the target device. This is commonly caused when the device is in a blank or protected state or when access protection or readback protection is enabled.&amp;nbsp;&lt;span&gt;Sometimes, the J-Link or the target device may not be ready, especially right after a reset or power cycle. This might also be the reason.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As you have noticed, simply retrying the recover command works.&amp;nbsp;Ensure your J-Link or debugger is properly connected and recognized by your system. Also,&amp;nbsp;always recover the Network core first, then the Application core. Recovering the Application core first can lead to issues, as the Network core recovery erases both cores.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Swathy&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF53 programming by using nrfjprog-Q</title><link>https://devzone.nordicsemi.com/thread/544011?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 04:10:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89bc904b-8cf2-4b72-900c-350b6bccd9ec</guid><dc:creator>Steven Wen</dc:creator><description>&lt;p&gt;Hi Swathy,&lt;/p&gt;
&lt;p&gt;Here is our logging file for the error after sending command (&lt;span&gt;recover --family NRF53 --coprocessor CP_NETWORK&lt;/span&gt; ). but it could be OK after retry. Does it related to command? it happen very often when IC is blank. what does the error message mean? do we have any way to avoid the error occurring?&lt;/p&gt;
&lt;p&gt;C:\grmn\prj\mfg\ITMXP&amp;gt;.\JLink\ECOS_box\Garmin\nrfjprog.exe --recover --family NRF53 --coprocessor CP_APPLICATION&amp;nbsp; &lt;br /&gt;02:51:53 251 , Recovering device. This operation might take 30s.&lt;br /&gt;02:51:54 421 , Writing image to disable ap protect.&lt;br /&gt;02:51:54 485 , Erasing user code and UICR flash areas.&lt;br /&gt;02:51:54 579 , C:\grmn\prj\mfg\ITMXP&amp;gt;.\JLink\ECOS_box\Garmin\nrfjprog.exe --recover --family NRF53 --coprocessor CP_NETWORK&amp;nbsp; &lt;br /&gt;02:51:54 902 , Recovering device. This operation might take 30s.&lt;br /&gt;02:52:06 385 , ERROR: Recover failed. Please make sure that the correct device family is given&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF53 programming by using nrfjprog-Q</title><link>https://devzone.nordicsemi.com/thread/543816?ContentTypeID=1</link><pubDate>Mon, 28 Jul 2025 17:44:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a234f828-5992-49e0-a475-fc9e8c3cecca</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Steven,&lt;/p&gt;
&lt;p&gt;I have added some pointers for you to consider.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--recover&lt;/code&gt;&lt;span&gt;&amp;nbsp;command already performs a full erase (including UICR) and disables access protection. Running&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--eraseall&lt;/code&gt;&lt;span&gt;&amp;nbsp;and multiple&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;--recover&lt;/code&gt;&lt;span&gt;&amp;nbsp;commands is unnecessary. See here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/109614/differences-eraseall-and-recover"&gt;(+) Differences eraseall and recover - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrfjprog --qspieraseall is only needed if you have external QSPI flash. If not, you can skip this step.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is recommended to use&amp;nbsp;&lt;code dir="ltr"&gt;--program ... --recover&lt;/code&gt;&amp;nbsp;in a single command&lt;br /&gt;This ensures the device is recovered, erased, programmed, and verified in one atomic operation, avoiding issues with leftover firmware from the recovery step. This has been discussed in the Devzone ticket:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/107045/nrfjprog---verify-fails-when-programming-just-after-a-recover-nrf5340"&gt;nrfjprog --verify fails when programming just after a recover (nrf5340)&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;When programming both cores separately, always program the network core first, then the application core.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; nrfjprog --pinreset&amp;nbsp;is required only if your application specifically requires a hardware reset after programming. You can avoid this step if you don&amp;#39;t require hardware reset..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A simplified sequence is as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Recover and program network core:&lt;br /&gt;&lt;em&gt;nrfjprog --program B1_net.hex --family NRF53 --coprocessor CP_NETWORK --recover --verify&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Recover and program application core:&lt;br /&gt;&lt;em&gt;nrfjprog --program B2_app.hex --family NRF53 --coprocessor CP_APPLICATION --recover --verify&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Optionally, reset the device:&lt;br /&gt;&lt;em&gt;nrfjprog --pinreset --family NRF53&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>