<?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>start app after dfu uploading nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19663/start-app-after-dfu-uploading-nrf52</link><description>Hi, 
 I&amp;#39;m using &amp;quot;bootloader secure&amp;quot; example from sdk 12.2 and I modify it for instead of use button to enter in DFU, use a value written in a memory position. 
 As in other bootloaders I used, for example, bootloader of sdk 6.1, when the zip upload</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Feb 2017 10:06:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19663/start-app-after-dfu-uploading-nrf52" /><item><title>RE: start app after dfu uploading nrf52</title><link>https://devzone.nordicsemi.com/thread/76499?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2017 10:06:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f25e814-3e4e-4cb1-ba4d-fb5004689d45</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Abosh,&lt;/p&gt;
&lt;p&gt;the secure bootloader in SDK v12.x behaves the same way, i.e. it will start the application automatically after the update is completed, and you should not have to do any modifications to the bootloader. However, it is important that you clear the byte stored in flash to indicate that the device should enter bootloader mode immediately after entering the bootloader.&lt;/p&gt;
&lt;p&gt;The secure bootloader will not wait for a specific event in the &lt;code&gt;wait_for_event()&lt;/code&gt; function in &lt;code&gt;nrf_dfu_init()&lt;/code&gt; (nrf_dfu.c), but perform a SoftReset when the application update is complete and then re-enter &lt;code&gt;nrf_dfu_init()&lt;/code&gt;, go past the if-statement that starts the bootloader&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; if(enter_bootloader_mode != 0 || !nrf_dfu_app_is_valid())
    {
         ....
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and enter the following if-statement&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (nrf_dfu_app_is_valid())
    {
        NRF_LOG_INFO(&amp;quot;Jumping to: 0x%08x\r\n&amp;quot;, MAIN_APPLICATION_START_ADDR);
        nrf_bootloader_app_start(MAIN_APPLICATION_START_ADDR);
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and start the application.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>