<?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>regarding DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21377/regarding-dfu</link><description>Hi. I&amp;#39;m using nRF52832, SDK13, S132V4.0.2.
I&amp;#39;m trying to test DFU.
I have 2 questions. 
 Q1. How can I make image for merged files?
I can see it works very well when I make zip files as below. 
 BOOT : nrfutil pkg generate --hw-version 52 --sd-req</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Apr 2017 06:02:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21377/regarding-dfu" /><item><title>RE: regarding DFU</title><link>https://devzone.nordicsemi.com/thread/83760?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 06:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa029673-ca60-47f6-aa04-8aecec7c9578</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;No problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: regarding DFU</title><link>https://devzone.nordicsemi.com/thread/83759?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 05:57:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fe6265c-85e3-406a-b68b-1c69c3c9ef5f</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help :) I would appreciate if you could mark the answer as correct/accepted by clicking the checkmark in the circle to the left of the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: regarding DFU</title><link>https://devzone.nordicsemi.com/thread/83758?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 05:10:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e38c7d38-f405-465b-8c45-0da4f5ac9abb</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thank you very much for your help. It&amp;#39;s so great!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: regarding DFU</title><link>https://devzone.nordicsemi.com/thread/83757?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 08:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff6522a-b0b6-4680-9dad-17201b12733e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Roger,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1:&lt;/strong&gt; You can create combined images, e.g. SoftDevice+Bootloader, by combining the &lt;code&gt;--application&lt;/code&gt;, &lt;code&gt;--softdevice&lt;/code&gt; and &lt;code&gt;--bootloader&lt;/code&gt; options. The allowed combinations are shown in the table below and is also displayed in nrfutil&amp;#39;s documentation found &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/image_5F00_combinations.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;So if you want to create a  SoftDevice+Bootloader firmware image you use the following command&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52
--sd-req 0x98 --bootloader-version 0x11 --bootloader boot.hex
--softdevice s132_nrf52_4.0.2_softdevice.hex
--key-file priv_0407.pem sd_boot_dfu_package.zip&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2:&lt;/strong&gt; The secure bootloader (SDK v12.x.x and later) will perform a dual bank updates if there is enough space, otherwise it will perform a single bank update, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/lib_bootloader_dfu_banks.html?cp=4_0_1_3_5_1_2"&gt;this&lt;/a&gt; Infocenter page.   You can configure the bootloader to only perform dual bank update, i.e. you will get an error at the start of the DFU process if the image is to large.&lt;/p&gt;
&lt;p&gt;In your specific case, the S132 v4.0.2 requires 0x0001F000 bytes (124kB) and the bootloader requires 0x5000 bytes (20kB), this leaves you with 368 kB (512kB - 124kB - 20kB). This means that you can perform a dual bank update of your application if its 368kB/2 = 184 kB. The combined SD+BL image is only 144kB, so you will be able to update the SoftDevice and bootloader without the application being erased as long as the application is not larger than 368-144kB = 224kB. However, I expect that the SoftDevice size will increase as we release newer versions so it is always wise to leave some space to account for this.&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: regarding DFU</title><link>https://devzone.nordicsemi.com/thread/83756?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2017 07:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39848be2-0e7a-4d9d-b6a0-254956216be7</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;Thank you so much for your help.&lt;/p&gt;
&lt;p&gt;For Q1, How can I make image files(*.zip file)? I want to know about NRFUTIL&amp;#39;s Option after [nrfutil pkg generate].&lt;/p&gt;
&lt;p&gt;For Q2, I&amp;#39;m using DFU example code. I think it&amp;#39;s supporting dual bank mode. Right? And there should be memory area to save old files. Could you tell me the size and the area of memory for saving old files?
I actually want to know how big size files can be downloaded through OTA.&lt;/p&gt;
&lt;p&gt;I need your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: regarding DFU</title><link>https://devzone.nordicsemi.com/thread/83755?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2017 15:29:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47c37d90-89cb-4109-a4dc-8524e56020c1</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;For Q1, you can use the mergehex utility that Nordic provides as part of its nRF5 toolset installation.&lt;/p&gt;
&lt;p&gt;For Q2, the answer is a bit more nebulous. If you have the memory, you can use the DFU in its dual bank mode in which case the new application is downloaded before the old application is erased so a failure usually results in the old application remaining available. If you don&amp;#39;t have the memory, you have to use single bank mode and the old application is erased before the new application is transferred to your device. Note, soft device DFU erases the application IIRC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>