<?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>OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73401/ota-thread-dfu-merge-sdk-example-with-custom-application</link><description>Hi all! 
 I&amp;#39;m able to fully test the SDK example https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v3.2.0%2Fthread_example_dfu.html and it works pretty well. 
 Now, the next step is the integration of this OTA DFU over Thread example in my custom</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Jun 2021 14:16:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73401/ota-thread-dfu-merge-sdk-example-with-custom-application" /><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/314252?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 14:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb32694f-b177-4f3a-aaa8-3af345abae73</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;What happens inside&amp;nbsp;app_start()? Does the bootloader run until&amp;nbsp;jump_to_addr()?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the value of the&amp;nbsp;vector_table_addr parameter?&lt;/p&gt;
&lt;p&gt;Can you share the full project? Is it reproducable on a nRF52840 DK (i.e., are you using the default QSPI flash chip)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/311174?ContentTypeID=1</link><pubDate>Sat, 22 May 2021 17:42:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:642cbded-b7a8-44c4-b3d1-1ef25775cff7</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I managed all the error in the bootloader.&lt;/p&gt;
&lt;p&gt;Now, I can load from QSPI the fw in the flash and I can pass all hash&amp;amp;crc checks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The bootloader can run smootlhy until the last step ( app_start(vector_table_addr); )&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I attach a screenshot from debugger:&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the bank0 information are correct&amp;nbsp;&lt;/li&gt;
&lt;li&gt;the FW at 0x27000 (just after SD) is correct&lt;/li&gt;
&lt;li&gt;the bootloader can run until last step&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1621705067630v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Now, I&amp;#39;d like to know why the hell the board DOESN&amp;#39;T START THE APP.&lt;/p&gt;
&lt;p&gt;The board just stucks in the BL!!&lt;/p&gt;
&lt;p&gt;Can someone support me please?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/310087?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 10:02:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7896d843-f1ee-488c-9d74-750c13834574</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;I have some problems debugging the bootloader.&lt;/p&gt;
&lt;p&gt;I know that I have to use &amp;quot;target&amp;quot; -&amp;gt; &amp;quot;attach &lt;span&gt;debugger&lt;/span&gt;&amp;quot; to debug the bootloader when the new application has to be validated and activated.&lt;/p&gt;
&lt;p&gt;After flashing components (BL + SD + APP), the app is running and if I attach the debugger from bootloader project I have this behaviour:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1621331911132v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1621331931964v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Obviusly, the app stops running and I can&amp;#39;t debug the bootloader project.&lt;/p&gt;
&lt;p&gt;How am I supposed to use &amp;quot;attach debugger&amp;quot; feature?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/309961?ContentTypeID=1</link><pubDate>Mon, 17 May 2021 11:00:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b8f65b1-93e2-43c0-891b-18eb32e5c68f</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m facing the bootloader modifications.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t get if I have to update bootloader to let him use SD or not.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1621249015763v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1621249057510v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In the application side, I updated the code to work with the SD (because my native application had already SD feature) but with the bootloader I have a lot of problems.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;examples\thread\dfu\bootloader\pca10056\blank\ses&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Does the bootloader have to exploit SD to read/write flash (fstorage)?&lt;/p&gt;
&lt;p&gt;I want to read settings from my main flash and DFU chunks from my external QSPI flash memory&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;AS&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/309671?ContentTypeID=1</link><pubDate>Thu, 13 May 2021 16:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:463196c4-997a-48e4-9385-3d6e7d37bbcb</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;##### UPDATE&amp;nbsp;&lt;span&gt;#####&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;finally &lt;strong&gt;I completed the merge of the DFU client in my custom application&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I added the feature of data storage&amp;nbsp;(new FW package) in the external flash memory that is present in the Adafruit nrf52840 board (gd25q16).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1620922519151v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Now, I have to deal with the bootloader part.&lt;/p&gt;
&lt;p&gt;As I got so far, once the FW download ends and the board is rebooted, the bootloader is in charge to copy the new FW data from bank1 to bank0 and start the new FW (Am I right?).&lt;/p&gt;
&lt;p&gt;Any suggestions on this? Where do I start to complete this task?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/308588?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 14:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27fa0487-9fa4-4ecf-ae8e-956143afdfa6</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi all!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to develop the dual bank approach exploiting external QSPI flash memory (GD25Q16, the one that is in the Adafruit nrf52840 board).&lt;/p&gt;
&lt;p&gt;I merged the QSPI drivers with the DFU application but it is not working as usual.&lt;/p&gt;
&lt;p&gt;First, I modified the&amp;nbsp;&lt;strong&gt;nrf_dfu_cache_prepare()&amp;nbsp;&lt;/strong&gt;function setting the bank1 address as 0x00 (I want to start store the FW image at the beginning of the QSPI flash memory)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620312045296v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Then, I modified the &lt;strong&gt;nrf_dfu_flash_init(),&amp;nbsp;nrf_dfu_flash_store()&amp;nbsp;&lt;/strong&gt;and&amp;nbsp;&lt;strong&gt;nrf_dfu_flash_erase() &lt;/strong&gt;functions&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;to exploit QSPI drivers instead of fstorage ones.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620312230349v3.png" /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620312253015v4.png" /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620312271242v5.png" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I start a DFU process, there are several problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;even if the cache address is 0x00, the write address still remains 0xC5000 (the end of the current FW)&lt;/li&gt;
&lt;li&gt;during erase/write procedures the &amp;quot;queue usage&amp;quot; parameter increases. That&amp;#39;s because I don&amp;#39;t know how to use this callback function (QSPI drivers don&amp;#39;t request a callback function, fstorage ones do)&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620312502895v6.png" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I highlighted the issues explained above in the debug log I can see from my application.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620311827808v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The process stucks with the error&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Validate trigger: DFU already in progress (s:DFU_DOWNLOAD_FIRMWARE)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;after the first write operation.&lt;/p&gt;
&lt;p&gt;Can anyone&amp;nbsp;help me please?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;May I have to edit also the bootloader? I thought that only application works in this first DFU part (FW download) and that the BL comes in only after the postvalidation (at the end of the FW downloading part).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can I have a clarification about that?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307418?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 10:18:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:452e69f0-d3a3-4392-9e8e-119a78b24fa7</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Yes, I adapted the bootloader for the dongle editing the makefile&lt;/p&gt;
&lt;pre&gt;PROJECT_NAME     := thread_secure_dfu_bootloader_secure_dfu_blank_pca10059
CFLAGS += -DBOARD_PCA10059
ASMFLAGS += -DBOARD_PCA10059&lt;/pre&gt;
&lt;p&gt;and I usually do an erase operation before flashing SD, BL and APP (I have a dongle with the jlink connector soldered)&lt;/p&gt;
&lt;pre&gt;nrfjprog -f nrf52 --eraseall&lt;/pre&gt;
&lt;p&gt;I can&amp;#39;t get if the problem&lt;/p&gt;
[quote userid="102652" url="~/f/nordic-q-a/73401/ota-thread-dfu-merge-sdk-example-with-custom-application/307325#307325"]&lt;ul&gt;&lt;li&gt;If I generate the DFU package with&amp;nbsp;-&lt;strong&gt;-sd-req 0x00&amp;nbsp;&lt;/strong&gt;the DFU image is downloaded and restarted correctly.&lt;/li&gt;
&lt;li&gt;If I generate the DFU package with&amp;nbsp;&lt;strong&gt;--sd-req 0xCA&amp;nbsp;&lt;/strong&gt;the DFU image is downloaded correctly by application but then it is not restarted (by bootloader I guess).&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;comes from the bootloader that is not compatible with SD or from my DFU image that is a dummy blinky example (that does not include/use SD)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307332?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 19:55:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96745f3a-4ac5-486f-be2c-f4271c3d44c9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you mean: &amp;quot;examples/thread/dfu/bootloader/&lt;strong&gt;pca10056&lt;/strong&gt;/blank/armgcc&amp;quot;?&lt;/p&gt;
&lt;p&gt;Or have you created your own Thread DFU bootloader project with support for the nRF52840 Dongle? Have you connected a J-Link debugger to the dongle and erased the bootloader that comes with it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307331?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 19:44:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e957310-9a1a-45ce-bfe4-19096397d1b5</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
[quote userid="102652" url="~/f/nordic-q-a/73401/ota-thread-dfu-merge-sdk-example-with-custom-application/307325#307325"]&lt;p&gt;I had to set the macro &amp;quot;&lt;strong&gt;BLE_STACK_SUPPORT_REQD&lt;/strong&gt;&amp;quot; because it is the only way I found to initialize the&amp;nbsp;nrf_fstorage_init() with&amp;nbsp;&lt;strong&gt;nrf_fstorage_sd&lt;/strong&gt;. Otherwise, the standard configuration exploits&amp;nbsp; &lt;strong&gt;nrf_fstorage_nvmc&amp;nbsp;&lt;/strong&gt;that is incompatible with the SD (as I understood).&lt;/p&gt;
&lt;p&gt;Now, I have the two versions working the same (the switched one needs&amp;nbsp;&amp;nbsp;&lt;strong&gt;nrf_fstorage_nvmc,&lt;/strong&gt;&amp;nbsp;the multiprotocol one needs&amp;nbsp;&lt;strong&gt;&amp;nbsp;nrf_fstorage_sd&lt;/strong&gt;).&lt;/p&gt;[/quote]
&lt;p&gt;As I said before, your suggestion is exactly what I did in my application &lt;span&gt;preprocessor symbols&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;What about the bootloader?&lt;/p&gt;
[quote userid="102652" url="~/f/nordic-q-a/73401/ota-thread-dfu-merge-sdk-example-with-custom-application/307325#307325"]&lt;p&gt;So, I think that, if I put&amp;nbsp;&lt;strong&gt;--sd-req 0xCA&lt;/strong&gt;, the DFU image is placed correctly at 0x27000 (end of SD) but the bootloader (I&amp;#39;m using the one in the DFU example, that probably is not supposed to work with a SD) looks for new FW at 0x1000 (end of MBR, start of the FW if you DON&amp;#39;T use SD). Obviously, it can&amp;#39;t find the FW and so it can&amp;#39;t restart the application.&lt;/p&gt;
&lt;p&gt;On the contrary, if I put&amp;nbsp;&lt;strong&gt;--sd-req 0x00&lt;/strong&gt;, the DFU image is placed at 0x1000 (that is wrong because it overwrites my SD) and the bootloader (that is supposed to work without SD and looks for the new FW at 0x1000) is able to find the new application and it can restart it.&lt;/p&gt;[/quote]
&lt;p&gt;May this issue be related to wrong bootloader settings?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;examples/thread/dfu/bootloader/pca10059/blank/armgcc&lt;/pre&gt;
&lt;p&gt;Can this bootloader be used with SD or should I modify something?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307327?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 19:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d5eb00a-ff30-4552-a9ea-b70172126ffd</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If the softdevice is enabled, you need to use the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_fstorage.html#lib_fstorage_sd"&gt;softdevice backend&lt;/a&gt; for Fstorage. The softdevice &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;restricts access to the NVMC peripheral&lt;/a&gt; and you need to access it through the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga9c93dd94a138ad8b5ed3693ea38ffb3e"&gt;softdevice flash API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Try setting&amp;nbsp;BLE_STACK_SUPPORT_REQD in your project preprocessor symbols. This should switch to the softdevice backend. There may be other issues caused by this symbol not being set as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307325?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 19:14:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10539b5-e0a2-422e-9aa0-c62129e20af1</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;################ EDIT&amp;nbsp;&lt;span&gt;################&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Finally I have the multiprotocol version working.&lt;/p&gt;
&lt;p&gt;I had to set the macro &amp;quot;&lt;strong&gt;BLE_STACK_SUPPORT_REQD&lt;/strong&gt;&amp;quot; because it is the only way I found to initialize the&amp;nbsp;nrf_fstorage_init() with&amp;nbsp;&lt;strong&gt;nrf_fstorage_sd&lt;/strong&gt;. Otherwise, the standard configuration exploits&amp;nbsp; &lt;strong&gt;nrf_fstorage_nvmc&amp;nbsp;&lt;/strong&gt;that is incompatible with the SD (as I understood).&lt;/p&gt;
&lt;p&gt;Now, I have the two versions working the same (the switched one needs&amp;nbsp;&amp;nbsp;&lt;strong&gt;nrf_fstorage_nvmc,&lt;/strong&gt;&amp;nbsp;the multiprotocol one needs&amp;nbsp;&lt;strong&gt;&amp;nbsp;nrf_fstorage_sd&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;As I got so far, the thread DFU process is split between application and bootloader:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Application downloads the new DFU image in bank1&lt;/li&gt;
&lt;li&gt;When the download is over, bootloader switch data in bank1 with data in bank0 and restarts the application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Let me know please if I miss something.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So, at the moments it seems that the DFU part related to application (packets download) works well.&amp;nbsp;I think that I have issues with the DFU part related to bootloader.&lt;/p&gt;
&lt;p&gt;I keep finding the same problem that I saw with the switched version.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If I generate the DFU package with&amp;nbsp;-&lt;strong&gt;-sd-req 0x00&amp;nbsp;&lt;/strong&gt;the DFU image is downloaded and restarted correctly.&lt;/li&gt;
&lt;li&gt;If I generate the DFU package with&amp;nbsp;&lt;strong&gt;--sd-req 0xCA&amp;nbsp;&lt;/strong&gt;the DFU image is downloaded correctly by application but then it is not restarted (by bootloader I guess).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I know that my scenario should work with&amp;nbsp;&lt;strong&gt;--sd-req 0xCA&lt;/strong&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;(that is the ID of my SD).&lt;/p&gt;
&lt;p&gt;So, I think that, if I put&amp;nbsp;&lt;strong&gt;--sd-req 0xCA&lt;/strong&gt;, the DFU image is placed correctly at 0x27000 (end of SD) but the bootloader (I&amp;#39;m using the one in the DFU example, that probably is not supposed to work with a SD) looks for new FW at 0x1000 (end of MBR, start of the FW if you DON&amp;#39;T use SD). Obviously, it can&amp;#39;t find the FW and so it can&amp;#39;t restart the application.&lt;/p&gt;
&lt;p&gt;On the contrary, if I put&amp;nbsp;&lt;strong&gt;--sd-req 0x00&lt;/strong&gt;, the DFU image is placed at 0x1000 (that is wrong because it overwrites my SD) and the bootloader (that is supposed to work without SD and looks for the new FW at 0x1000) is able to find the new application and it can restart it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Does it make sense to you? Should I edit something in the provided bootloader to adapt it to work with a SD? In this case, can someone provide the necessary editings?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307306?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 15:46:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d657002a-bfcf-4b69-bbcc-9ecf256722e1</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;I had a debug session to get more in details the difference between my 2 applications.&lt;/p&gt;
&lt;p&gt;I found that my switched application and my multiprotocol one have different behaviours here:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619624678123v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Both applications erase the settings page, the switched one go trought this function without any problems and then starts the DFU, the multiprotocol one doesn&amp;#39;t arrive at the breakpoint and crash before.&lt;/p&gt;
&lt;p&gt;Any ideas? May I need to do any updates in the bootloader? I&amp;#39;m using exactly the one used in the Thread DFU example. Or maybe I need to change this function in DFU files:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619631203641v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;because nrf_fstorage_erase() implements&amp;nbsp;nrf_nvmc_page_erase() that maybe goes in conflict with the SD?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/307200?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 10:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ea72277-eb96-4455-915d-1a3832281e2b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I believe that &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/70592/single-bank-dfu-over-thread/289761#289761"&gt;this post&lt;/a&gt; sums up your questions and options regarding single bank DFU.&lt;/p&gt;
&lt;p&gt;Do you support updates over BLE in the bootloader in any of the versions, or only over Thread? The sd_req option may not be needed it this is not supported, see&amp;nbsp;&lt;a title="Updates without a SoftDevice" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_bootloader_dfu_validation.html?cp=7_5_0_3_5_1_1_2_1_0#sd_independent_update"&gt;Updates without a SoftDevice&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I think the issue in the second application is that the &amp;quot;Bank 0 size&amp;quot; field is set to 0. This indicates that there is no code in bank 0, and the new application is placed directly after the softdevice (which has a size of 0x27000). You mention before tha the Bootloader settings page (0xFF000) was erased, can you try to read out this page to see if&amp;nbsp;it is blank or has incorrect size field for bank 0?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt;nrfjprog --memrd 0xFF000 --w 32 --n 0x1000
0x000FF000: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x000FF010: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
0x000FF020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the settings-page is valid, you may need to debug your application to see where the fields are cleared in&amp;nbsp;s_dfu_settings.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/306880?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 19:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76a6700a-b668-4bef-a824-29abfdf65f0b</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;UPDATE&lt;/p&gt;
&lt;p&gt;I want to summarize the main issues I&amp;#39;m facing at the moment so people can help with a clear vision of my scenario&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More theoretical issue: can I implement single-bank approach exploiting Thread DFU example? I don&amp;#39;t have enough space in my flash to store both old FW and new DFU image so dual-bank approach is unfeasible. Any workaround to this?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Let&amp;#39;s pretend that I can implement a dual bank approach (I&amp;#39;m using a dummy DFU image so it can fit in my flash and I can isolate the issue explained above). I had some tries with two version of my application: an older one that exploits BLE and Thread protocol in a &amp;quot;switched mode&amp;quot; and a more recent version where I implemented the multiprotocol approach (BLE and Thread together). &lt;br /&gt;The DFU starts correctly with the first version (the older one). It works (reset and run the new application) only if I put&amp;nbsp;--sd-req 0x00 when I generate the package, if I put&amp;nbsp;--sd-req 0xCA (that is the SD I&amp;#39;m using in my application) the DFU starts and ends, but the new application is not run.&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619465161729v2.png" /&gt;&lt;br /&gt;&lt;br /&gt;Instead, the DFU doesn&amp;#39;t start at all with the second version (the more recent one with the multiprotocol implementation)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619464573059v1.png" /&gt;&lt;br /&gt;&lt;br /&gt;The main difference between the two versions is how I exploit the SD, so I&amp;#39;m pretty confident that my issue is someway related to SD.&lt;br /&gt;Moreover, as you can see from debug logs, the cache_adress changes between the two versions: in the switched case it is 0xC2000 (that is the first free flash page after my current flashed fw), in the multiprotocol case it is 0x27000 (that is the start of my current flashed fw). I think &lt;span&gt;0xC2000 should be the&lt;/span&gt; correct adress in a dual-bank scenario (let me know if I&amp;#39;m wrong), but I can&amp;#39;t get why in the multiprotocol version the starting adress is 0x27000 (I think the solution crashes because the application tries to overwrite itself someway).&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/306734?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 09:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d26e25a-d2ec-414e-935d-a32bf80bb7a7</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/73401/ota-thread-dfu-merge-sdk-example-with-custom-application/306593#306593"]&lt;p&gt;Thread secure DFU only supports dual-bank DFU. In order to support single-bank DFU, the transport layer (Thread protocol in this case) must be supported in the bootloader, if not you risk &amp;quot;bricking&amp;quot; the device if the DFU process fails. The OpenThread libraries are too large to fit in the bootloader, and are not a separate module (like for instace our BLE softdevice, which is stored in a separate location in flash, fully detached from the application. So for Thread DFU, the application is not stopped until the entire new application is received. When the application is received, the application will reset and bootloader will handle swapping of application images.&lt;/p&gt;
&lt;div class="quote-header"&gt;&lt;/div&gt;&lt;blockquote class="quote"&gt;&lt;div class="quote-user"&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;So are you saying that I can&amp;#39;t perform a single bank DFU with Thread protocol?&lt;/p&gt;
&lt;p&gt;How can I manage the issue that in the flash I can&amp;#39;t storage the current FW and the DFU image (lack of memory space)?&lt;/p&gt;
&lt;p&gt;I can attach some debug log about my error&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619433744892v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;I tried with a DFU image that fits my memory space with the&amp;nbsp;NRF_DFU_FORCE_DUAL_BANK_APP_UPDATES macro set and I have the crash problem anyway. So probably I&amp;#39;m facing at the moment a different problem than the lack of memory space.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/306593?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 15:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01244023-2171-44ba-8561-0ee8bb5e7c87</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="AS_Kalpa"]unfortunatly at the moment I can&amp;#39;t share the project with third parties, I need to check the policy with my company.[/quote]
&lt;p&gt;Ok, it would help a lot if your could be allowed to share the project. Everything is treated confidentially by Nordic, and other users will not have access to the content of this ticket if I convert it to private.&lt;/p&gt;
[quote user="AS_Kalpa"]Do you think this could have an impact?[/quote]
&lt;p&gt;It could be related, check out the suggestions in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71115/thread-sdk-ota-bug/298929#298929"&gt;this post&lt;/a&gt;.&lt;/p&gt;
[quote user="AS_Kalpa"]Another question, I thought that the DFU process (at least the single bank approach) was carried out by bootloader (so the application is stopped). So what&amp;#39;s the meaning of this macro?&amp;nbsp;[/quote]
&lt;p&gt;The DFU libraries contains code for both Bootloader and application parts of the process. This config is used to determine if the build is an application or the bootloader.&lt;/p&gt;
[quote user="AS_Kalpa"]And why it is called &amp;quot;background&amp;quot; DFU if the application is stopped anyway?[/quote]
&lt;p&gt;Thread secure DFU only supports dual-bank DFU. In order to support single-bank DFU, the transport layer (Thread protocol in this case) must be supported in the bootloader, if not you risk &amp;quot;bricking&amp;quot; the device if the DFU process fails. The OpenThread libraries are too large to fit in the bootloader, and are not a separate module (like for instace our BLE softdevice, which is stored in a separate location in flash, fully detached from the application. So for Thread DFU, the application is not stopped until the entire new application is received. When the application is received, the application will reset and bootloader will handle swapping of application images.&lt;/p&gt;
[quote user="AS_Kalpa"]If the application is carrying out the DFU process is pretty easy to understand that I can&amp;#39;t use the single bank approach (since che app can&amp;#39;t erase itself if it is running). I need some clarifications about this.[/quote]
&lt;p&gt;Yes, the application is responsible for receiving the DFU image. Bootloader is responsible for swapping images.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/306590?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 15:30:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36a19a51-38b3-4860-a1bf-c1d92cf8af92</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;unfortunatly at the moment I can&amp;#39;t share the project with third parties, I need to check the policy with my company.&lt;/p&gt;
&lt;p&gt;I compared the&amp;nbsp;&lt;span&gt;Thread DFU client&amp;nbsp;&lt;/span&gt;sdk_config (that I copied-pasted in my project) with the one of my project. I found these main differences (other small differences are about LOG but I think they are useless)&lt;/p&gt;
&lt;p&gt;This is what I have in the&amp;nbsp;&lt;span&gt;Thread DFU client&amp;nbsp;&lt;/span&gt;&lt;span&gt;sdk_config:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;e&amp;gt; MEM_MANAGER_ENABLED - mem_manager - Dynamic memory allocator
//==========================================================
#ifndef MEM_MANAGER_ENABLED
#define MEM_MANAGER_ENABLED 1
#endif
// &amp;lt;o&amp;gt; MEMORY_MANAGER_SMALL_BLOCK_COUNT - Size of each memory blocks identified as &amp;#39;small&amp;#39; block.  &amp;lt;0-255&amp;gt; 

#ifndef MEMORY_MANAGER_SMALL_BLOCK_COUNT
#define MEMORY_MANAGER_SMALL_BLOCK_COUNT 8
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_SMALL_BLOCK_SIZE -  Size of each memory blocks identified as &amp;#39;small&amp;#39; block. 
// &amp;lt;i&amp;gt;  Size of each memory blocks identified as &amp;#39;small&amp;#39; block. Memory block are recommended to be word-sized.

#ifndef MEMORY_MANAGER_SMALL_BLOCK_SIZE
#define MEMORY_MANAGER_SMALL_BLOCK_SIZE 128
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_MEDIUM_BLOCK_COUNT - Size of each memory blocks identified as &amp;#39;medium&amp;#39; block.  &amp;lt;0-255&amp;gt; 

#ifndef MEMORY_MANAGER_MEDIUM_BLOCK_COUNT
#define MEMORY_MANAGER_MEDIUM_BLOCK_COUNT 4
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_MEDIUM_BLOCK_SIZE -  Size of each memory blocks identified as &amp;#39;medium&amp;#39; block. 
// &amp;lt;i&amp;gt;  Size of each memory blocks identified as &amp;#39;medium&amp;#39; block. Memory block are recommended to be word-sized.

#ifndef MEMORY_MANAGER_MEDIUM_BLOCK_SIZE
#define MEMORY_MANAGER_MEDIUM_BLOCK_SIZE 256
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_LARGE_BLOCK_COUNT - Size of each memory blocks identified as &amp;#39;large&amp;#39; block.  &amp;lt;0-255&amp;gt; 

#ifndef MEMORY_MANAGER_LARGE_BLOCK_COUNT
#define MEMORY_MANAGER_LARGE_BLOCK_COUNT 2
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_LARGE_BLOCK_SIZE -  Size of each memory blocks identified as &amp;#39;large&amp;#39; block. 
// &amp;lt;i&amp;gt;  Size of each memory blocks identified as &amp;#39;large&amp;#39; block. Memory block are recommended to be word-sized.

#ifndef MEMORY_MANAGER_LARGE_BLOCK_SIZE
#define MEMORY_MANAGER_LARGE_BLOCK_SIZE 1024
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is what I have in my application:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;e&amp;gt; MEM_MANAGER_ENABLED - mem_manager - Dynamic memory allocator
//==========================================================
#ifndef MEM_MANAGER_ENABLED
#define MEM_MANAGER_ENABLED 1
#endif
// &amp;lt;o&amp;gt; MEMORY_MANAGER_SMALL_BLOCK_COUNT - Size of each memory blocks identified as &amp;#39;small&amp;#39; block.  &amp;lt;0-255&amp;gt; 


#ifndef MEMORY_MANAGER_SMALL_BLOCK_COUNT
#define MEMORY_MANAGER_SMALL_BLOCK_COUNT 64
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_SMALL_BLOCK_SIZE -  Size of each memory blocks identified as &amp;#39;small&amp;#39; block. 
// &amp;lt;i&amp;gt;  Size of each memory blocks identified as &amp;#39;small&amp;#39; block. Memory block are recommended to be word-sized.

#ifndef MEMORY_MANAGER_SMALL_BLOCK_SIZE
#define MEMORY_MANAGER_SMALL_BLOCK_SIZE 64
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_MEDIUM_BLOCK_COUNT - Size of each memory blocks identified as &amp;#39;medium&amp;#39; block.  &amp;lt;0-255&amp;gt; 


#ifndef MEMORY_MANAGER_MEDIUM_BLOCK_COUNT
#define MEMORY_MANAGER_MEDIUM_BLOCK_COUNT 16
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_MEDIUM_BLOCK_SIZE -  Size of each memory blocks identified as &amp;#39;medium&amp;#39; block. 
// &amp;lt;i&amp;gt;  Size of each memory blocks identified as &amp;#39;medium&amp;#39; block. Memory block are recommended to be word-sized.

#ifndef MEMORY_MANAGER_MEDIUM_BLOCK_SIZE
#define MEMORY_MANAGER_MEDIUM_BLOCK_SIZE 256
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_LARGE_BLOCK_COUNT - Size of each memory blocks identified as &amp;#39;large&amp;#39; block.  &amp;lt;0-255&amp;gt; 


#ifndef MEMORY_MANAGER_LARGE_BLOCK_COUNT
#define MEMORY_MANAGER_LARGE_BLOCK_COUNT 4
#endif

// &amp;lt;o&amp;gt; MEMORY_MANAGER_LARGE_BLOCK_SIZE -  Size of each memory blocks identified as &amp;#39;large&amp;#39; block. 
// &amp;lt;i&amp;gt;  Size of each memory blocks identified as &amp;#39;large&amp;#39; block. Memory block are recommended to be word-sized.

#ifndef MEMORY_MANAGER_LARGE_BLOCK_SIZE
#define MEMORY_MANAGER_LARGE_BLOCK_SIZE 512
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Do you think this could have an impact?&lt;/p&gt;
&lt;p&gt;Another question, I thought that the DFU process (at least the single bank approach) was carried out by bootloader (so the application is stopped). So what&amp;#39;s the meaning of this macro?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;q&amp;gt; NRF_DFU_IN_APP  - Specifies that this code is in the app, not the bootloader, so some settings are off-limits.
 

// &amp;lt;i&amp;gt; Enable this to disable writing to areas of the settings that are protected
// &amp;lt;i&amp;gt; by the bootlader. If this is not enabled in the app, certain settings write
// &amp;lt;i&amp;gt; operations will cause HardFaults or will be ignored. Enabling this option
// &amp;lt;i&amp;gt; also causes postvalidation to be disabled since this is meant to be done
// &amp;lt;i&amp;gt; in the bootloader. NRF_BL_DFU_ALLOW_UPDATE_FROM_APP must be enabled in the bootloader.

#ifndef NRF_DFU_IN_APP
#define NRF_DFU_IN_APP 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And why it is called &amp;quot;background&amp;quot; DFU if the application is stopped anyway?&lt;/p&gt;
&lt;p&gt;If the application is carrying out the DFU process is pretty easy to understand that I can&amp;#39;t use the single bank approach (since che app can&amp;#39;t erase itself if it is running). I need some clarifications about this.&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/306265?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 09:30:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d0b14aa-1384-4abc-9be2-9590148f50ad</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you using the same sdk_config.h configurations in your application as the Thread DFU client example? If you could post your full project, it would be easier to debug the application and help you find the root cause of the issue. If you do not want to share in public, I can convert the case to a private one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305812?ContentTypeID=1</link><pubDate>Tue, 20 Apr 2021 11:08:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:968b998a-73fc-4b14-81ae-3f925f319263</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;UPDATE&lt;/p&gt;
&lt;p&gt;Also if I use the NOSD version of my application I have the crash.&lt;/p&gt;
&lt;p&gt;The DFU process stucks at 33%&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618916709934v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;and my client starts rebooting continuosly.&lt;/p&gt;
&lt;p&gt;This is the log of the client&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618916753131v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As with the SD version, it tries to erase and write at &lt;strong&gt;0xFF000&amp;nbsp;&lt;/strong&gt;where there is the bootloader_setting_page and the FW crashes.&lt;/p&gt;
&lt;p&gt;I think the new data written in 0XFF000 are wrong in some way and then the process can&amp;#39;t go ahead.&lt;/p&gt;
&lt;p&gt;Anyone has a tip for this? I&amp;#39;m out of ideas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305590?ContentTypeID=1</link><pubDate>Mon, 19 Apr 2021 14:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6438840e-5844-4f8d-b0a0-1e46409d6e02</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;UPDATE&lt;/p&gt;
&lt;p&gt;I think I found the bug finally.&lt;/p&gt;
&lt;p&gt;My problem is that when the board starts the update, it starts erasing flash memory where there is the Softdevice so It crashes.&lt;/p&gt;
&lt;p&gt;I had a try with a version of my application that doesn&amp;#39;t exploit the SD and the DFU starts normally.&lt;/p&gt;
&lt;p&gt;I think something must be changed in the DFU example code to adapt it with a custom application that includes the softdevice.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t wanna update also the SD, but just the application.&lt;/p&gt;
&lt;p&gt;Do you have any ideas which are the required steps?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can attach the debug during the crash&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618847038563v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Seems like there is a problem with &lt;strong&gt;0x000FF000&amp;nbsp;&lt;/strong&gt;memory slot, where there is the bootloader_settings_page&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618846964249v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;IIs it normal that the DFU application tries to erase settings memory space?&lt;/p&gt;
&lt;p&gt;Moreover I don&amp;#39;t know if it is normal this data when I generate the settings with&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ nrfutil settings generate --family NRF52840 --application SAMBA_Node.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618856833661v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;I think i&amp;#39;m using a bootloader compiled without the Softdevice options set...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305497?ContentTypeID=1</link><pubDate>Mon, 19 Apr 2021 11:17:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:266b2fe6-5624-4648-a577-299a7e912db6</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;UPDATE&lt;/p&gt;
&lt;p&gt;I found that I didn&amp;#39;t have this macro on my custom app&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618830885394v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;while It is present in the DFU example.&lt;/p&gt;
&lt;p&gt;I added it and now the FW crashes when I start the DFU process.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618830997395v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The blue mark indicates where the crash happens.&lt;/p&gt;
&lt;p&gt;I think that macro should be in my app, so the problem is that the app crashes.&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Alessio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305314?ContentTypeID=1</link><pubDate>Fri, 16 Apr 2021 13:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04949bc2-8a53-470a-a821-aa3f4acbebd9</guid><dc:creator>AS_Kalpa</dc:creator><description>[deleted]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305161?ContentTypeID=1</link><pubDate>Thu, 15 Apr 2021 16:05:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73241bef-a8d9-46e7-a2d9-92174eff944b</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;&lt;span&gt;EDIT: Finally, with an hardcoded debug session, I found where my code failed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618505767010v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I solve &amp;quot;Signature failed&amp;quot; error?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I had the attention to use the same public key to compile bootloader and code, and the private key (from which I generated the public key) to create the app_dfu_package.zip&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305050?ContentTypeID=1</link><pubDate>Thu, 15 Apr 2021 10:36:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da0a3f45-3778-4a02-82bb-f368be04e6f5</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Ah ok, I thought that the public key was used also to generate the bootloader hex file.&lt;/p&gt;
&lt;p&gt;I had a try generating a new&amp;nbsp;&amp;nbsp;nrf52840_xxaa_mbr.hex (bootloader) file copying my new public key in &lt;span&gt;examples\dfu\dfu_public_key.c&amp;nbsp;&lt;/span&gt;but I keep having the &amp;quot;prevalidation failed&amp;quot; error.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m pretty sure this error has something to do with keys.&lt;/p&gt;
&lt;p&gt;EDIT: I put a debug message to get which is the error cause&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1618485027337v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;From&amp;nbsp;nrf_dfu_req_handler.h I can see:&lt;/p&gt;
&lt;p&gt;NRF_DFU_RES_CODE_INVALID_OBJECT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 0x05,&amp;nbsp; &amp;nbsp; //!&amp;lt; Data object does not match the firmware and hardware requirements, the signature is wrong, or parsing the command failed.&lt;/p&gt;
&lt;p&gt;So I think that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Or it is a problem of keys and so I need some help to understand what is wrong in my approach&lt;/li&gt;
&lt;li&gt;Or it is a problem of&amp;nbsp;--sd-req 0xCA (I put&amp;nbsp;&lt;span&gt;0xCA cause my app exploits&amp;nbsp;s140_nrf52_7.0.1_softdevice.hex but I don&amp;#39;t know if it is the right approach since DFU example used&amp;nbsp;--sd-req 0x00)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;AS&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA Thread DFU: Merge SDK example with custom application</title><link>https://devzone.nordicsemi.com/thread/305038?ContentTypeID=1</link><pubDate>Thu, 15 Apr 2021 10:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32795fb5-0a5f-4de6-88d2-21c92525539b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;By default, the DFU client example uses our public debug-key, found in&amp;nbsp;examples\dfu\dfu_public_key.c. This key only works with the test-images for BLE/serial DFU, found in&amp;nbsp;examples\dfu\secure_dfu_test_images. If you did not include the file containing the debug-key in your project, it should work fine to drag in the generated public key like you describe. Including both or none of the files should give compile errors, so I guess that should not be the issue here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>