<?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>Dual Bank DFU with external qspi flash over Thread</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71469/dual-bank-dfu-with-external-qspi-flash-over-thread</link><description>Hello Everyone, 
 We are using nRF52840 IC for our products which has 1 MB of flash. 
 Thread Secure DFU Example provided with Nordic SDK supports only Dual Bank DFU. This limits the application size. 
 Our Application size is increasing and therefore</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 May 2021 17:56:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71469/dual-bank-dfu-with-external-qspi-flash-over-thread" /><item><title>RE: Dual Bank DFU with external qspi flash over Thread</title><link>https://devzone.nordicsemi.com/thread/308615?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 17:56:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21d8cf8f-f775-4342-b5c0-8b83085b2591</guid><dc:creator>AS_Kalpa</dc:creator><description>&lt;p&gt;Hi ashish!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m facing the same issue, but I can&amp;#39;t achieve this:&lt;/p&gt;
[quote userid="85239" url="~/f/nordic-q-a/71469/dual-bank-dfu-with-external-qspi-flash-over-thread"]We have successfully directed incoming DFU packets to external QSPI flash by modifying nrf_dfu_flash_erase to qspi_earse in on_data_obj_create_request() and nrf_dfu_flash_store to QSPI store in on_data_obj_write_request().[/quote]
&lt;p&gt;I did the same updates:&lt;/p&gt;
&lt;p&gt;in&amp;nbsp;&lt;strong&gt;on_data_obj_write_request():&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620323671569v1.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;in&amp;nbsp;&lt;strong&gt;on_data_obj_create_request():&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620323715434v2.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;but I have my code stucked after the first write operation:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620323780766v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;Can you give me any tips about your solution?&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: Dual Bank DFU with external qspi flash over Thread</title><link>https://devzone.nordicsemi.com/thread/294169?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 13:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1d92838-4ed4-48f6-b25b-fa1a61ad432f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m a bit confused by the log. It looks like it is copying the new firmware, is this not the case?&lt;/p&gt;
&lt;p&gt;There seems to be some glitching or missing logs around line 41-42, so it is a bit hard to see exactly what happens. Disabling logging in the application should help you get all logs from bootloader. You may also configure the RTT to ble blocking if buffer is full, to make sure you get all logs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dual Bank DFU with external qspi flash over Thread</title><link>https://devzone.nordicsemi.com/thread/293995?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 13:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4646b6fc-9c22-4421-aeac-893be955fe77</guid><dc:creator>ashish_shukla</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your detailed explanation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using nRF5 SDK for Thread and Zigbee v4.0.0 which uses SDK 16.0&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I doubt that there is something wrong with the way I&amp;#39;m debugging the boot loader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In a working case - where DFU completes successfully and a new image boots. After successful completion of DFU image transfer, DFU client node is reset. After Node reset&amp;nbsp; - I don&amp;#39;t see any boot loader logs. I&amp;#39;ve to exit from JlinkExe process and reconnect with the device to get logs again. Now if I wait for sufficient amount of time - around 30 seconds, I get logs from new image.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I don&amp;#39;t wait for 30 seconds and immediately exit from&amp;nbsp;&lt;span&gt;JlinkExe process and connect with the device - I get boot loader logs but device firmware is not updated. I&amp;#39;m attaching&amp;nbsp;logs for this case. By looking at logs - can you make sense of what&amp;#39;s going wrong ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6708.logs.txt"&gt;devzone.nordicsemi.com/.../6708.logs.txt&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Exiting immediately and reconnecting with the device is the only way to get boot loader logs.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dual Bank DFU with external qspi flash over Thread</title><link>https://devzone.nordicsemi.com/thread/293621?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 17:03:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0acceeaa-7360-4446-bdb2-d18db960da97</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which SDK version are you using?&lt;/p&gt;
&lt;p&gt;If you are using the latest version, the Thread DFU Client application is not allowed to modify the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrf__dfu__settings__t.html#a2832fdf8b799f6e62f87bbdfe732be53"&gt;bank_0&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrf__dfu__settings__t.html#ad030e8eba740a096340b3ea8d012257e"&gt;bank_1&lt;/a&gt;&amp;nbsp;members in&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrf__dfu__settings__t.html"&gt;nrf_dfu_settings_t&lt;/a&gt;. These members will be copied from the Bootloader settings backup page by the following function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void settings_forbidden_parts_copy_from_backup(uint8_t * p_dst_addr)
{
#if NRF_DFU_IN_APP || NRF_BL_DFU_ALLOW_UPDATE_FROM_APP
    REGION_COPY_BY_MEMBER(settings_version, bank_current, p_dst_addr);
    REGION_COPY_BY_MEMBER(bank_0, write_offset, p_dst_addr);
    REGION_COPY_BY_MEMBER(sd_size, progress, p_dst_addr);
    REGION_COPY_BY_MEMBER(boot_validation_crc, peer_data, p_dst_addr);
#else
    REGION_COPY_BY_MEMBER(settings_version, enter_buttonless_dfu, p_dst_addr);
    REGION_COPY_BY_MEMBER(init_command, peer_data, p_dst_addr);
#endif
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In order for the Thread DFU client to notify to the bootloader that there is a new firmware available, it writes the bank_current member (this happens in&amp;nbsp;postvalidate() function in client):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (!is_trusted)
{
    if (ret_val == NRF_DFU_RES_CODE_SUCCESS)
    {
        s_dfu_settings.bank_current = NRF_DFU_CURRENT_BANK_1;
    }
    else
    {
        nrf_dfu_settings_progress_reset();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the settings page is not valid (invalid CRC), the backup page will be restored. Are you able to debug the bootloader and see where it runs inside nrf_dfu_settings_reinit()?&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></channel></rss>