<?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>nrfjprog program every second time didn&amp;#39;t start the application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90983/nrfjprog-program-every-second-time-didn-t-start-the-application</link><description>Hi 
 When I use the nrfjprog with the command line: 
 
 
 
 The application is starting and the code running. 
 If I do the same again (with the same hex or a newer one) the nrf remains in the bootloader. 
 The only solution is to do it again, every second</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Aug 2022 09:44:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90983/nrfjprog-program-every-second-time-didn-t-start-the-application" /><item><title>RE: nrfjprog program every second time didn't start the application</title><link>https://devzone.nordicsemi.com/thread/381522?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2022 09:44:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06a3eb5a-e209-4186-bf4b-718789c201c2</guid><dc:creator>Dominik Eugster</dc:creator><description>&lt;p&gt;this code works now:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;@ECHO off

REM nrfjprog --log

set &amp;quot;HEX_FILE=testfile.hex&amp;quot;

echo **********************************************************************
echo &amp;quot;Recover and disable the read back protection&amp;quot;
echo ********************************************************************** 
nrfjprog --recover 

echo ********************************************************************** 
echo &amp;quot;%HEX_FILE%&amp;quot;
echo ********************************************************************** 

echo **********************************************************************
echo &amp;quot;Program and reset the Device
echo ********************************************************************** 
nrfjprog --reset --program %HEX_FILE%

echo **********************************************************************
echo &amp;quot;Verify the device
echo ********************************************************************** 
nrfjprog --verify --fast %HEX_FILE%

echo **********************************************************************
echo &amp;quot;enable the readback protection&amp;quot;
echo ********************************************************************** 
nrfjprog --rbp ALL

pause&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>