<?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/"><channel><title>Common FAQs on DFU</title><link>/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><description>If you are looking for a place to get started with DFU, please have a look at this presentation here and the tutorial here .
In this post, we cover some in depth Q&amp;amp;A topics regarding Device Firmware Update.
Questions:
A. What happens if som...</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Thu, 21 Jan 2021 19:05:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>RAS_ID</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Is there a blog to upgrade the application/bootloader (ncs v1.4.0) firmware from another MCU connected via SPI bus?&lt;/p&gt;&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Mon, 29 Apr 2019 03:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>shilpa</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span&gt;I have included usbd code to buttonless dfu. My device doesnt advertise after first OTA. I eant to figure out this issue.So i tried to debug.If I tried to debug the application when bootloader&amp;nbsp; is present, I am not able to debug it .So i erase the device,&amp;nbsp; then debug it.Then it get stuck at svci init function at main.And if I commented this and perform debug the application shows no issues or error at error handler function.How could I debug my application along with bootloader functions.&lt;/span&gt;&lt;/p&gt;&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Wed, 14 Nov 2018 10:38:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>kishor babu</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I am using nrf51 and sdk v10.0.0 I am getting &amp;quot;operation failed&amp;quot; message in nrf connect while updating via OTA, how to solve this?&lt;/p&gt;&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Sat, 09 Dec 2017 06:54:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Dhiraj</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks alot for such a wonderful blog.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;C. How do we do buttonless DFU ?
Buttonless DFU means we start the DFU mode from the application without the need of a physical button. The main technique is to set a flag, could be the retention register GPREGRET, or write to flash, etc. And then jump to bootloader either by a reset or directly branching.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this: &lt;strong&gt;or write to flash&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can you explain this ?
For triggering bootloader, if we write any data to bootloader location in the flash, it will switch to bootloader mode?&lt;/p&gt;
&lt;p&gt;I am trying to run the following code but device keep getting reset and not entering to bootloader.&lt;/p&gt;
&lt;pre&gt;#define BOOTLOADER_DFU_START 0xB1

    void loop()
    {


 if (particular condition is true)
{  
  write &amp;quot;1&amp;quot; to the customer[0] register 
}
.
.
.
.
.

int x = read data from the UICR register customer[0];

      if (customer[0] == &amp;quot;1&amp;quot;) {
        {
        sd_power_gpregret_set(BOOTLOADER_DFU_START);

        NVIC_SystemReset();   

       //OR set the register directly and then call NVIC_SystemReset(); 

        NRF_POWER-&amp;gt;GPREGRET = BOOTLOADER_DFU_START;

        NVIC_SystemReset();
      } 
    }
}
&lt;/pre&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Fri, 20 Oct 2017 05:15:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Stayhungry</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;nice blog.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Thu, 08 Dec 2016 14:31:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Karim19</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am tring to do a Bootloader update OTA using the bootlader DFU Dual Bank. Application update OTA is working fine while it is not the case for Bootloader update OTA.&lt;/p&gt;
&lt;p&gt;For Bootloader update, I have tried with a Zip file and .bin + .dat files on NRFConnect (Android). In both scenarios, I can see that the file was successfully transferred to the nrf52. However the old bootloader does not get replaced with the new one. I have a led on the boards that tells me which bootloader is active. The leds shows the old boatloader running even that the transfer of the files was successful&lt;/p&gt;
&lt;p&gt;SDK Version: 11
Chip: NRF52
softdevice: s132 2.0.0
The files were generated with nrfutil.exe&lt;/p&gt;
&lt;p&gt;Application OTA is working perfectly. I just need to replace the bootloader OTA to support the Watchdog.&lt;/p&gt;
&lt;p&gt;Any idea why the Bootlader update OTA is not working? and why i am not receiving any error message?&lt;/p&gt;
&lt;p&gt;Thank you,
Karim&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Thu, 18 Aug 2016 06:56:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>nospam2000</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There is an easy solution for the &amp;quot;&lt;em&gt;error: r7 cannot be used in asm here&lt;/em&gt;&amp;quot; which can be done directly in the sourcecode of the SDK and makes it much easier for gcc users because they don&amp;#39;t have to modify their project and it makes it possible to compile the rest of their application without optimization for easier debugging.&lt;/p&gt;
&lt;p&gt;The optimization options can be set by using &lt;em&gt;#pragma GCC optimize (&amp;quot;omit-frame-pointer&amp;quot;)&lt;/em&gt; directly in the sourcecode of bootloader_util.c:&lt;/p&gt;
&lt;pre&gt;#elif defined ( __GNUC__ )
// avoid the error &amp;#39;error: r7 cannot be used in asm here&amp;#39;
#pragma GCC push_options
#pragma GCC optimize (&amp;quot;omit-frame-pointer&amp;quot;)
static inline void bootloader_util_reset(uint32_t start_addr)
{
    [...]
}
#pragma GCC pop_options
#elif defined ( __ICCARM__ )
&lt;/pre&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Mon, 30 May 2016 13:34:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Hung Bui</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;@Globuloz: It is possible that DFU can fail when replacing the old image with the new one. In that case the application will not be marked as valid application. It&amp;#39;s only marked as valid after the bootloader finish DFU and check CRC. Next reset the bootloader will enter DFU mode.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Thu, 19 May 2016 13:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Globuloz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In dual_blank, is it possible that DFU fails when replacing old section with new data (last step copy) ?&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Wed, 10 Jun 2015 15:17:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Hung Bui</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;@Anshul: Thanks for the suggestion. The only thing you should be aware of is to make sure you matched the 32kHz oscillator configuration for the softdevice in the firmware matched with what you have on your board. We use 32kHz crystal on our board, it may not true on yours.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Mon, 08 Jun 2015 22:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Anshul</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Could you add some tips on how we should modify the existing boot loader example in the SDK 8.1.0 so that to works on a custom nRF51822 board. The only change I have made is I have mapped the LEDs and buttons as per the pin configuration of my board. I do not see the custom board advertising, however the same code works fine on the DK.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Mon, 08 Jun 2015 07:44:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Hung Bui</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;@testy: There is one more thought of updating bootloader with preprogrammed BOOTLOADER_SETTINGS.
If we update bootloader with softdevice, it&amp;#39;s better to leave the BOOTLOADER_SETTINGS be as default (INVALID BANK 0), and let the bootloader update the application and set bank 0 as valid and assign CRC after it finish updating the application.&lt;/p&gt;
&lt;p&gt;In case only bootloader is updating, there is also no need of overwriting the bootloader setting unless we are changing the bootloader_setting_t structre.&lt;/p&gt;
&lt;p&gt;So I think it&amp;#39;s better to follow your suggestion to not to use attribute pre-setting in hex when updating the bootloader.&lt;/p&gt;
&lt;p&gt;I will try to have  a look at the ANT bootloader, I actually doesn&amp;#39;t have much experience with that.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Tue, 02 Jun 2015 13:30:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>testy</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;OK, tested&amp;amp;works.&lt;/p&gt;
&lt;p&gt;Please add a few words about &lt;strong&gt;ANT&lt;/strong&gt; bootloader too, because of different &lt;strong&gt;bootloader_settings_t&lt;/strong&gt; structure.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Mon, 01 Jun 2015 12:52:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>Hung Bui</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;@testy:
You are correct. I forgot that. The bootloader will check for the size of the bootloader image. In this case, because we have modified the bootloader to have attribute at 0x3FC000 (bootloader setting) the size of the bootloader image will exceed 0x3C00:&lt;/p&gt;
&lt;p&gt;DFU_BL_IMAGE_MAX_SIZE = (BOOTLOADER_SETTINGS_ADDRESS - BOOTLOADER_REGION_START)&lt;/p&gt;
&lt;p&gt;The actual size will be 0x4000. If you modify the DFU_BL_IMAGE_MAX_SIZE = (BOOTLOADER_SETTINGS_ADDRESS + 0x400 - BOOTLOADER_REGION_START)&lt;/p&gt;
&lt;p&gt;0x400 = size of 1 flash page for the bootloader setting, you should be fine.&lt;/p&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Common FAQs on DFU</title><link>https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/common-faqs-on-dfu</link><pubDate>Fri, 29 May 2015 00:06:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02cc9c02-f5d3-45cb-896f-28d434772dcc</guid><dc:creator>testy</dc:creator><slash:comments>0</slash:comments><description>&lt;ul&gt;
&lt;li&gt;&amp;quot;When preparing binary file for DFU, this should be taken care of to remove the UICR writing in hex file&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#39;m familiar with nrf.exe, but it doesn&amp;#39;t strip the area at BOOTLOADER_SETTINGS_ADDRESS (not part of UICR) out and OTA DFU of BLE bootloader fails.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;use&lt;/strong&gt; attribute to run application &lt;strong&gt;without necessity of OTA DFU of application&lt;/strong&gt; first&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;do not use&lt;/strong&gt; attribute to be able to &lt;strong&gt;OTA DFU of BLE bootloader&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;img src="https://devzone.nordicsemi.com/aggbug?PostID=1115&amp;AppID=4&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>