<?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>A question about ota</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5835/a-question-about-ota</link><description>Hi, all!
I am rencently studying ota,and that is what I have done: 
 
 Program softdevice 6.0 into my nrf51822 chip. 
 Program bootloader(version in SDK5.2) into my nrf51822 chip. 
 Use Nrf_TooBox app to upload an application into my nrf51822 chip</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Mar 2015 13:19:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5835/a-question-about-ota" /><item><title>RE: A question about ota</title><link>https://devzone.nordicsemi.com/thread/20384?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2015 13:19:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81fa3833-8d62-4f07-bd7c-4e64fdf8a488</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Looks about right. It is very similar to what I do to enter the bootloader by host command.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A question about ota</title><link>https://devzone.nordicsemi.com/thread/20383?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2015 07:26:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d15dff6-e2a0-4701-9ca7-15985aee2f57</guid><dc:creator>kk</dc:creator><description>&lt;p&gt;I think I got the right answer after reading the similar question in forum.
And my solution is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;about application code,just set the NRF_POWER-&amp;gt;GPREGRET=1 and on power reset the chip is enough:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   sd_softdevice_disable();	 
   NRF_POWER-&amp;gt;GPREGRET = 1;
   NVIC_SystemReset();
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;or just use&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;       sd_power_gpregret_set(1);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;if you don&amp;#39;t  disable the softdevice;&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;about bootloader, set the NRF_POWER-&amp;gt;GPREGRET=0 is enough:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;replace the code like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    uint32_t a;
    sd_power_gpregret_get(&amp;amp;a);
    if (bootloader_is_pushed || (!bootloader_app_is_valid(DFU_BANK_0_REGION_START)) || (a == 1))
    {
         nrf_gpio_pin_set(LED_2);

         sd_power_gpregret_set(0);

        // Initiate an update of the firmware.
        err_code = bootloader_dfu_start();
        APP_ERROR_CHECK(err_code);

        nrf_gpio_pin_clear(LED_2);
     }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If something is wrong or missing, please point it out.
Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>