<?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>DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48961/dfu-with-external-qspi-memory</link><description>Hi, 
 I am working on project, in which we using nordic nRF52840 chip. We need to flash the app+SD+BL image file in external QSPI memory. 
 After prevalidation, the DFU controller starts to send flash image package, we need to receive this and need to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jun 2024 20:35:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48961/dfu-with-external-qspi-memory" /><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/489824?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 20:35:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20d0f430-8275-45e2-80f1-6f2392123890</guid><dc:creator>Dominik Eugster</dc:creator><description>&lt;p&gt;Hi Tom&lt;/p&gt;
&lt;p&gt;Can you tell me how you implemented the callback of the SPI (I&amp;#39;m using QSPI but it will be smilar)&lt;/p&gt;
&lt;p&gt;In the function on_data_obj_write_request is the call for nrf_dfu_flash_store (file nrf_dfu_req_handler.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void on_data_obj_write_request(nrf_dfu_request_t * p_req, nrf_dfu_response_t * p_res)
{
    NRF_LOG_DEBUG(&amp;quot;Handle NRF_DFU_OP_OBJECT_WRITE (data)&amp;quot;);

    if (!nrf_dfu_validation_init_cmd_present())
    {
        /* Can&amp;#39;t accept data because DFU isn&amp;#39;t initialized by init command. */
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_OPERATION_NOT_PERMITTED;
        return;
    }

    uint32_t const data_object_offset = s_dfu_settings.progress.firmware_image_offset -
                                        s_dfu_settings.progress.firmware_image_offset_last;

    if ((p_req-&amp;gt;write.len + data_object_offset) &amp;gt; s_dfu_settings.progress.data_object_size)
    {
        /* Can&amp;#39;t accept data because too much data has been received. */
        NRF_LOG_ERROR(&amp;quot;Write request too long&amp;quot;);
        p_res-&amp;gt;result = NRF_DFU_RES_CODE_INVALID_PARAMETER;
        return;
    }

    uint32_t const write_addr = m_firmware_start_addr + s_dfu_settings.write_offset;
    /* CRC must be calculated before handing off the data to fstorage because the data is
     * freed on write completion.
     */
    uint32_t const next_crc =
        crc32_compute(p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, &amp;amp;s_dfu_settings.progress.firmware_image_crc);

    ASSERT(p_req-&amp;gt;callback.write);

    ret_code_t ret =
        nrf_dfu_flash_store(write_addr, p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, p_req-&amp;gt;callback.write);

    if (ret != NRF_SUCCESS)
    {
        /* When nrf_dfu_flash_store() fails because there is no space in the queue,
         * stop processing the request so that the peer can detect a CRC error
         * and retransmit this object. Remember to manually free the buffer !
         */
        p_req-&amp;gt;callback.write((void*)p_req-&amp;gt;write.p_data);
        return;
    }

    /* Update the CRC of the firmware image. */
    s_dfu_settings.write_offset                   += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_offset += p_req-&amp;gt;write.len;
    s_dfu_settings.progress.firmware_image_crc     = next_crc;

    /* This is only used when the PRN is triggered and the &amp;#39;write&amp;#39; message
     * is answered with a CRC message and these field are copied into the response.
     */
    p_res-&amp;gt;write.crc    = s_dfu_settings.progress.firmware_image_crc;
    p_res-&amp;gt;write.offset = s_dfu_settings.progress.firmware_image_offset;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;There is a callback which is needed:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t ret =
        nrf_dfu_flash_store(write_addr, p_req-&amp;gt;write.p_data, p_req-&amp;gt;write.len, p_req-&amp;gt;callback.write);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;inside this function I use the QSPI function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;hal_qspi_write(&amp;amp;p_src, len, (dest &amp;amp; EXTERNAL_FLASH_ADDRESS_LOWER_BYTES), (void*)callback))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which at the end is calling the nrfx function &lt;span style="background-color:rgba(255, 255, 0, 1);"&gt;nrfx_qspi_write.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here I should have a callback, but I don&amp;#39;t know what I should implement.&lt;/p&gt;
&lt;p&gt;The original callback in the &lt;span style="background-color:rgba(255, 255, 0, 1);"&gt;nrf_fstorage_write&lt;/span&gt; is implemented like this:&lt;br /&gt;&lt;span style="background-color:rgba(255, 255, 0, 1);"&gt;return (p_fs-&amp;gt;p_api)-&amp;gt;write(p_fs, dest, p_src, len, p_context);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret_code_t nrf_fstorage_write(nrf_fstorage_t const * p_fs,
                              uint32_t               dest,
                              void           const * p_src,
                              uint32_t               len,
                              void                 * p_context)
{
    NRF_FSTORAGE_PARAM_CHECK(p_fs,        NRF_ERROR_NULL);
    NRF_FSTORAGE_PARAM_CHECK(p_src,       NRF_ERROR_NULL);
    NRF_FSTORAGE_PARAM_CHECK(p_fs-&amp;gt;p_api, NRF_ERROR_INVALID_STATE);
    NRF_FSTORAGE_PARAM_CHECK(len,         NRF_ERROR_INVALID_LENGTH);

    /* Length must be a multiple of the program unit. */
    NRF_FSTORAGE_PARAM_CHECK(!(len % p_fs-&amp;gt;p_flash_info-&amp;gt;program_unit), NRF_ERROR_INVALID_LENGTH);

    /* Source and destination addresses must be word-aligned. */
    NRF_FSTORAGE_PARAM_CHECK(addr_is_aligned32(dest),                NRF_ERROR_INVALID_ADDR);
    NRF_FSTORAGE_PARAM_CHECK(addr_is_aligned32((uint32_t)p_src),     NRF_ERROR_INVALID_ADDR);
    NRF_FSTORAGE_PARAM_CHECK(addr_is_within_bounds(p_fs, dest, len), NRF_ERROR_INVALID_ADDR);

    return (p_fs-&amp;gt;p_api)-&amp;gt;write(p_fs, dest, p_src, len, p_context);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now the DFU is strating on bank1 but the App is generating an error because data is missing because of this callack I guess?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/481381?ContentTypeID=1</link><pubDate>Wed, 01 May 2024 14:25:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:304f9f83-1c51-4df8-89c9-d818da5b7d21</guid><dc:creator>Dominik Eugster</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is there somebody who can share the sample project which is running?&lt;br /&gt;Thank you so much for any feedback.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/310487?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 13:35:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff47dc2a-5ea8-4b73-a305-1ac4bc03cbb5</guid><dc:creator>Dipak</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Mohammad &amp;amp; TomWS,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am trying to implement the same thing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It would be very helpful for me if I could start with a sample project that demonstrates the principles of the DFU from external storage.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please guide us!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Dipak&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/310380?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 10:07:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc74dcb6-1c70-4b6d-8218-1b4bd5a2d7cd</guid><dc:creator>Vijay Prakash</dc:creator><description>&lt;p&gt;Hi Maik,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am trying to implement the same. Let me know if you got any luck on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/247485?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 09:06:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbaccaf5-d761-4eec-8972-8ec66f8dd0ff</guid><dc:creator>Hein</dc:creator><description>&lt;p&gt;Hello Mohammad,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m starting with exactly the same task on the nRF52840. I will retrieve the DFU files via a cellular path and would like to save the files in external flash. Then I would like to continue the DFU from the external flash.&lt;br /&gt;It would be very helpful for me if I could start with a sample project that demonstrates the principles of the DFU from external storage.&lt;br /&gt;So I would like to ask you if there is a way to share a demo project or similar helpful things to get you started faster.&lt;br /&gt;Thank you and best regards&lt;br /&gt;Maik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/219968?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2019 04:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fd4ca70-eec0-425b-866b-bddb44b4e61b</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi Hung Bui &amp;amp; TomWS,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Sorry for the late response. I am busy with some other task. I have&amp;nbsp;completed the Bootloader for QSPI external memory.&amp;nbsp;Its working fine.&lt;/p&gt;
&lt;p&gt;I have check the firmware update without SD and also did some modification in SD activation in order to receive new SD upgrade.&lt;/p&gt;
&lt;p&gt;I will write a brief note later on, how to modifiy the present bootloader to place the firmware image(APP + SD), it will help some other guys.&lt;/p&gt;
&lt;p&gt;I thank to Hung Bui and TomWS helping me in this issue.&lt;/p&gt;
&lt;p&gt;But there is a lack of support from nordic team, because Hung Bui has disappeared long back.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/217257?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2019 08:53:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b27bc2cb-df51-4467-b434-4f94a3b8d116</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;After the hash is verified successfully. Old setting are erased and new one written at 0x000FF000 and 0x000FE000. Then bootloader resets and check the backup settings which inturn throws &amp;quot;&amp;quot;Destination settings are identical to source, write not needed. Skipping&amp;quot;.&lt;/p&gt;
&lt;p&gt;After that it goes to NMI_Handler Exception.&lt;/p&gt;
&lt;p&gt;But when i disable the External QSPI storage and work with standard bootloader code everything works fine, there is no&amp;nbsp;&lt;span&gt;NMI_Handler Exception.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Pls help me to solve this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/217192?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2019 18:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b2daf5a-2e54-4ab8-8a8c-83459bbaa5aa</guid><dc:creator>TomWS</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure why you&amp;#39;re getting a hardware fault, examining the stack might give you a clue.&amp;nbsp; However, I also don&amp;#39;t know why you&amp;#39;re modifying the bank1 start address.&amp;nbsp; ISTM that using the beginning of the QSPI memory should be sufficient.&amp;nbsp; What you store in QSPI flash doesn&amp;#39;t have to have the same location as the firmware address.&amp;nbsp; Here is my dfu_bank1_start_addr():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t nrf_dfu_bank1_start_addr(void)
{
  if ((s_dfu_settings.bank_0.bank_code == NRF_DFU_BANK_VALID_APP) &amp;amp;&amp;amp; s_dfu_settings.bank_0.image_size) { // is there an app already loaded?
    return EXTERNAL_FLASH_ADDRESS;  // yes, use external flash for bank1
  }    
  // no, use bank 0 for downloading
  uint32_t bank0_addr = nrf_dfu_bank0_start_addr();
  return ALIGN_TO_PAGE(bank0_addr + s_dfu_settings.bank_0.image_size);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216968?ContentTypeID=1</link><pubDate>Sun, 27 Oct 2019 18:58:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ccbf23-a2e4-41e2-8fc2-2e8af465816d</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi TomWS,&lt;/p&gt;
&lt;p&gt;Thanks for rour response.&lt;br /&gt;&lt;br /&gt;I have made modification according to your instruction. But it throws hardware error after the hash verification succeed.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1572202669833v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;nrf_dfu_bank1_start_addr(void) will return&amp;nbsp;return ALIGN_TO_PAGE(0x0A00000 + bank0_addr + s_dfu_settings.bank_0.image_size);&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ASSERT((cache_address &amp;amp; 0x000FFFFF) &amp;lt;= DFU_REGION_END(bootloader_start_addr));
cache_too_small = required_size &amp;gt; (DFU_REGION_END(bootloader_start_addr) - (cache_address &amp;amp; 0x000FFFFF));
delete_more = cache_too_small || single_bank; // Delete app or SoftDevice only if we need more room, or if single bank is requested.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And&amp;nbsp;strip off the upper bits of the synthetic address before using in QSPI read &amp;amp; write functions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216953?ContentTypeID=1</link><pubDate>Sat, 26 Oct 2019 21:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82a03228-20e2-4bcc-8346-3f4e79af3c73</guid><dc:creator>TomWS</dc:creator><description>&lt;p&gt;[quote userid="73888" url="~/f/nordic-q-a/48961/dfu-with-external-qspi-memory/216938"] Hi TomWS, Thanks for your reply. Can you pls let me know where i need to use this, EXTERNAL_FLASH_ADDRESS=0x0A00000; [/quote]&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I would have expected you to know this by now.&amp;nbsp; However, to answer your question, there are two places where this is relevant.&amp;nbsp; On the start of download where the DFU code gets the Bank1 start address:&lt;/p&gt;
&lt;p&gt;File: nrf_dfu_utils.c, nrf_dfu_bank1_start_addr()&lt;/p&gt;
&lt;p&gt;You need to return the synthetic address used to distinguish your external flash.&lt;/p&gt;
&lt;p&gt;And in your QSPI read &amp;amp; write functions where you need to strip off the upper bits of the synthetic address before using it.&lt;/p&gt;
&lt;p&gt;Note, as mentioned in an earlier reply (about 2 months ago), once you use a &amp;#39;synthetic&amp;#39; address that is outside the range of the device flash, you need to modify the error checking in&amp;nbsp; nrf_dfu_cache_prepare() as in:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        //TWS: IGNORED! ASSERT(cache_address &amp;lt;= DFU_REGION_END(bootloader_start_addr));
        //TWS: REPLACED BELOW: cache_too_small = required_size &amp;gt; (DFU_REGION_END(bootloader_start_addr) - cache_address);
        cache_too_small = required_size &amp;gt; EXTERNAL_FLASH_SIZE;
        delete_more     = cache_too_small || single_bank; // Delete app or SoftDevice only if we need more room, or if single bank is requested.
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216938?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 22:12:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d288def5-8636-49a2-9f8f-17b70fe23370</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi TomWS,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;Can you pls let me know where i need to use this,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EXTERNAL_FLASH_ADDRESS=0x0A00000;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216936?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 21:24:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:965801b1-9f12-4312-89c4-84f8d4645696</guid><dc:creator>TomWS</dc:creator><description>&lt;p&gt;There are multiple phases in the firmware download.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the first phase (after checking that the image is valid and will fit), the image is downloaded in chunks, with each chunk either stored directly at the firmware final destination (if you are single buffering or if there isn&amp;#39;t a valid image in place already), or to the backup buffer.&amp;nbsp; The &amp;#39;settings&amp;#39; blocks record where the incoming image is stored and also it&amp;#39;s final destination.&lt;/p&gt;
&lt;p&gt;Once the image is completely downloaded and verified, the settings blocks are saved with the corresponding addresses and the next phase (where the image is copied, IF NECESSARY, from its buffer to its final destination) is begun.&lt;/p&gt;
&lt;p&gt;In the next phase the settings are checked and, if the final destination AND the stored address are exactly the same, the DFU code &amp;#39;knows&amp;#39; that the image is already in it&amp;#39;s intended location and therefore does not need to copy the image.&lt;/p&gt;
&lt;p&gt;In your case, since you are using the same address in QSPI memory as the final destination, hence the copy code thinks there is nothing to do.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The &amp;#39;trick&amp;#39; is to have the QSPI buffer address mapped outside of the normal range of program memory so the settings blocks can distinguish between buffered image and a properly loaded image.&amp;nbsp; You can still use &amp;#39;1000&amp;#39; as a starting address in QSPI memory, but the code sets and strips off the address field used to distinguish between internal vs external memory.&amp;nbsp; In my case, I used:&lt;/p&gt;
&lt;p&gt;EXTERNAL_FLASH_ADDRESS=0x0A00000;&lt;/p&gt;
&lt;p&gt;So address 0x1000 would map to 0x0A01000 in the code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216875?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 13:43:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b2cde7e-6965-484e-a45f-4d3684b3a3b5</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi TomWS,&lt;/p&gt;
&lt;p&gt;Thanks for your response.&lt;br /&gt;&lt;br /&gt;Hash test is passed. But still the blinky_pca10056_mbr.hex is not written into flash memory because the image_copy throws,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;debug&amp;gt; app: No copy needed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I dont understand why the&amp;nbsp;(src_addr == dst_addr) are identical.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;waiting for reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;=========================================================================&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Whole firmware image received. Postvalidating.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Convert to hash to big-endian format for use in nrf_crypto&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x1000, size: 0x6AC&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_validation: Source address = 0x1000 and destination address = 0x16AC&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_validation: Reading buffer at address = 0x1000 with size = 0x6AC&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_qspi: nrf_qspistorage_read(addr=0x1000, src=0x200084F8, len=1708 bytes), queue usage: 1&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_validation: Hash verification Passed!!!!!!&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Expected FW hash:&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 84 5F 42 4A E0 E9 54 C9|._BJ..T.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 7C 95 6F CE E7 C1 D9 7B||.o....{&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 08 6A D9 E9 4A 44 C6 46|.j..JD.F&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: F7 E8 9F A1 A5 BE 18 46|.......F&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Actual FW hash:&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 84 5F 42 4A E0 E9 54 C9|._BJ..T.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 7C 95 6F CE E7 C1 D9 7B||.o....{&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 08 6A D9 E9 4A 44 C6 46|.j..JD.F&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: F7 E8 9F A1 A5 BE 18 46|.......F&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Invalidating old application in bank 0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial: Sending Response: [0x4, 0x1]&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FF000&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20009504, len=896 bytes), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FE000&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x20009884, len=896 bytes), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: All flash operations have completed. DFU completed.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Shutting down transports (found: 1)&lt;br /&gt;&amp;lt;info&amp;gt; app: Resetting bootloader.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;info&amp;gt; app: Inside main, Bootloader size = 73728&lt;br /&gt;&amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: Valid App&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_dfu_app_continue&lt;br /&gt;&amp;lt;debug&amp;gt; app: No copy needed&lt;br /&gt;&amp;lt;info&amp;gt; app: Setting app as valid&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FF000&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20009504, len=896 bytes), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FE000&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x20009884, len=896 bytes), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0&lt;br /&gt;&amp;lt;info&amp;gt; app: Resetting bootloader.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;info&amp;gt; app: Inside main, Bootloader size = 73728&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216838?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 12:34:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa9fa49b-3a03-4e09-83fe-b9596ce5a689</guid><dc:creator>TomWS</dc:creator><description>&lt;p&gt;I find it odd (no pun intended) that the buffer isn&amp;#39;t aligned on a 32bit boundary, but the modifier __ALIGN(4) can be used to force it on a 4 byte boundary as in:&lt;/p&gt;
&lt;p&gt;__ALIGN(4) uint8_t m_buffer_rx[CODE_PAGE_SIZE];&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216807?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 11:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:870caaa9-8a58-452d-af50-fc7ae5affe49</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi TomWS&lt;/p&gt;
&lt;p&gt;Actually i have problem in reading QSPI data for hash calculation. I have decalred a array&amp;nbsp;&lt;/p&gt;
&lt;p&gt;uint8_t m_buffer_rx[CODE_PAGE_SIZE];&lt;/p&gt;
&lt;p&gt;In which reading data from QSPI&amp;nbsp; read,&lt;/p&gt;
&lt;p&gt;NRF_LOG_DEBUG(&amp;quot;Reading buffer at address = 0x%x with size = 0x%x&amp;quot;, src_addr, bytes);&lt;br /&gt;nrf_dfu_qspi_read(src_addr, &amp;amp;m_buffer_rx, ALIGN_NUM(sizeof(uint32_t), bytes));&lt;/p&gt;
&lt;p&gt;Error is thrown after the&amp;nbsp;&lt;span&gt;nrf_dfu_qspi_read is called,&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x5000, size: 0x6AC&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_qspi: nrf_qspistorage_read(addr=0x5000, src=0x200084FD, len=1708 bytes), queue usage: 1&lt;br /&gt;&amp;lt;error&amp;gt; app: Received a fault! id: 0x00004002, pc: 0x00000000, info: 0x2003FD80&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;NRFX_ASSERT(nrfx_is_word_aligned(p_rx_buffer)) is thrown error because address of&amp;nbsp;&lt;span&gt;m_buffer_rx =&amp;nbsp;0x200084FD.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;((((uint32_t)p_object) &amp;amp; 0x3u) == 0u);&amp;nbsp; ==&amp;gt; 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;How to solve this issue??&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216706?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 21:41:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:961c6b21-b7d5-4be9-a34d-09e6827dbc1b</guid><dc:creator>TomWS</dc:creator><description>&lt;p&gt;@Mohammad, the Hex file line you&amp;#39;re referencing is only 14 bytes of data.&amp;nbsp; Consequently the next two bytes of QSPI flash are not written and hence are 0xff in value.&amp;nbsp; The hash calculation may be assuming that the extra two bytes are padded with zeroes to make it a full word write (to Flash Memory).&lt;/p&gt;
&lt;p&gt;From what I&amp;#39;ve seen with the BLE data transfers to the DFU code, all data blocks have always been full word multiples so I&amp;#39;m not sure how the raw Hex data would appear on the DFU end of the transfer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/216426?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2019 14:54:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57ed8972-32ff-4f6c-b90e-c0eaa85701ef</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mohammad,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for late response, I was on vacation last week.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t have the example, the application is supposed to start at address 0x1000. I&amp;#39;m not sure why you set the Flash Start to 0x26000&lt;/p&gt;
&lt;p&gt;You may want to check how the last packet is written to QSPI.&lt;/p&gt;
&lt;p&gt;But please clarify how you have &amp;quot;&amp;nbsp;&lt;span&gt;&amp;nbsp;Hash verification succeed&amp;nbsp;&amp;quot; did you remove the hash checking ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214926?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 20:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff14ee4f-1a68-428a-af4d-9ea45c90a6e5</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I compared the blinky_pca10056_mbr.hex with the data written into QSPI, couple of data is mismatch with hex.&lt;br /&gt;&lt;br /&gt;In blinky_pca10056_mbr.hex at 4th line before end of hex file as follows&lt;/p&gt;
&lt;p&gt;:0E1698000D0E0F10000000000338FDD8704743&lt;br /&gt;:0416A8000090D003DB&lt;/p&gt;
&lt;p&gt;Data from end of the QSPI file&lt;/p&gt;
&lt;p&gt;d e f 10 0 0 0 0 3 38 fd d8 70 47 ff ff 0 90 d0 3&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you compare the above two extra two bytes 0xFF and 0xFF is read from QSPI, but remaining all are same.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I dont know why 0xFF, 0xFF is there after&amp;nbsp;&lt;span&gt;d e f 10 0 0 0 0 3 38 fd d8 70 47.&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/QSPI-data-read.txt"&gt;devzone.nordicsemi.com/.../QSPI-data-read.txt&lt;/a&gt;This makes the hash verification fails.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_5F00_pca10056_5F00_mbr.hex"&gt;devzone.nordicsemi.com/.../blinky_5F00_pca10056_5F00_mbr.hex&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214562?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 11:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d291dc2-9eb8-456c-978f-0be5bfb60a4c</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I assume you don&amp;#39;t have the softdevice ?&amp;nbsp; yes correct&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Where do you put the application to ?&amp;nbsp; In blinky_pca10056_mbr project i have set the FLASH_START = 0x26000&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214434?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 14:33:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac590506-f638-461e-8cf5-a95aeb95aa3c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume you don&amp;#39;t have the softdevice ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Where do you put the application to ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can try to do a hex dump (nrfjprog --readcode) to read the flash after you do DFU, and compare it with when you flash only the MBR and the blinky.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214380?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 13:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deae9978-2179-4969-8281-eada85a8dad3</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi Hung,&lt;br /&gt; I used blinky_pca10056_mbr.hex found in examples under nordic SDK 15.3 to generate the dfu_app_pkg.zip. I followed the below steps,&lt;br /&gt; &lt;br /&gt; 1. In the blinky_pca10056_mbr example code, i modified the FLASH_START=0x26000, in order to place code above SD section.&lt;br /&gt; &lt;br /&gt; 2. Then i generated the settings file,&lt;br /&gt; nrfutil settings generate --family NRF52840 --application blinky_pca10056_mbr.hex --application-version 5 --bootloader-version 2 --bl-settings-version 2 settings.hex&lt;br /&gt; &lt;br /&gt; Bootloader DFU Settings:&lt;br /&gt;* File: settings.hex&lt;br /&gt;* Family: NRF52840&lt;br /&gt;* Start Address: 0x000FF000&lt;br /&gt;* CRC: 0x236ED638&lt;br /&gt;* Settings Version: 0x00000002 (2)&lt;br /&gt;* App Version: 0x00000005 (5)&lt;br /&gt;* Bootloader Version: 0x00000002 (2)&lt;br /&gt;* Bank Layout: 0x00000000&lt;br /&gt;* Current Bank: 0x00000000&lt;br /&gt;* Application Size: 0x000006AC (1708 bytes)&lt;br /&gt;* Application CRC: 0x4009821F&lt;br /&gt;* Bank0 Bank Code: 0x00000001&lt;br /&gt;* Softdevice Size: 0x00000000 (0 bytes)&lt;br /&gt;* Boot Validation CRC: 0x1202D358&lt;br /&gt;* SD Boot Validation Type: 0x00000000 (0)&lt;br /&gt;* App Boot Validation Type: 0x00000001 (1)&lt;/p&gt;
&lt;p&gt;3. Then I merged the blinky_pca10056_mbr.hex and settings.hex into app_settings.hex&lt;/p&gt;
&lt;p&gt;4. Finally the dfu_app_pkg is generated,&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application-version 5 --application app_settings.hex --key-file Test2.key app_dfu_pkg.zip&lt;/p&gt;
&lt;p&gt;5. I am sending the app_dfu_pkg.zip,&lt;br /&gt; nrfutil dfu usb-serial -pkg app_dfu_pkg.zip -p COM5 -b 115200&lt;br /&gt; &lt;br /&gt;6. The output, &lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: No firmware to activate.&lt;br /&gt;&amp;lt;info&amp;gt; app: App is valid&lt;br /&gt;&amp;lt;info&amp;gt; app: DFU mode requested via button.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_bootloader_wdt: WDT is not enabled&lt;br /&gt;&amp;lt;info&amp;gt; app: in weak nrf_dfu_init_user&lt;br /&gt;&amp;lt;info&amp;gt; app: Entering DFU mode.&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter main loop&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB power detected&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB ready&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_serial_usb: Could not read from CDC. Error: 0x92.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Signature required. Checking signature.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Calculating hash (len: 63)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Verify signature&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Image verified&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_dfu_cache_prepare()&lt;br /&gt;&amp;lt;info&amp;gt; app: required_size: 0xD9324.&lt;br /&gt;&amp;lt;info&amp;gt; app: single_bank: false.&lt;br /&gt;&amp;lt;info&amp;gt; app: keep_app: false.&lt;br /&gt;&amp;lt;info&amp;gt; app: keep_softdevice: false.&lt;br /&gt;&amp;lt;info&amp;gt; app: SD_PRESENT: false.&lt;br /&gt;&amp;lt;info&amp;gt; app: Bank contents:&lt;br /&gt;&amp;lt;info&amp;gt; app: Bank 0 code: 0x01: Size: 0xD9324&lt;br /&gt;&amp;lt;info&amp;gt; app: Bank 1 code: 0x00: Size: 0x0&lt;br /&gt;&amp;lt;info&amp;gt; app: pass: 0.&lt;br /&gt;&amp;lt;info&amp;gt; app: cache_address: 0xDB000.&lt;br /&gt;&amp;lt;info&amp;gt; app: cache_too_small: true.&lt;br /&gt;&amp;lt;info&amp;gt; app: keep_firmware: false.&lt;br /&gt;&amp;lt;info&amp;gt; app: delete_more: true.&lt;br /&gt;&amp;lt;info&amp;gt; app: pass: 1.&lt;br /&gt;&amp;lt;info&amp;gt; app: cache_address: 0x1000.&lt;br /&gt;&amp;lt;info&amp;gt; app: cache_too_small: false.&lt;br /&gt;&amp;lt;info&amp;gt; app: keep_firmware: true.&lt;br /&gt;&amp;lt;info&amp;gt; app: delete_more: false.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Write address set to 0x00001000&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Writing valid init command to flash.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Whole firmware image received. Postvalidating.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Convert to hash to big-endian format for use in nrf_crypto&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x1000, size: 0xD9324&lt;br /&gt;--------------------------- Hash verification succeed -----------------------&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Invalidating old application in bank 0.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: All flash operations have completed. DFU completed.&lt;br /&gt;&amp;lt;info&amp;gt; app: Resetting bootloader.&lt;br /&gt;&amp;lt;info&amp;gt; app: Inside main&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: Valid App&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_dfu_app_continue&lt;br /&gt;&amp;lt;info&amp;gt; app: Setting app as valid&lt;br /&gt;&amp;lt;info&amp;gt; app: Resetting bootloader.&lt;br /&gt;&amp;lt;info&amp;gt; app: Inside main&lt;br /&gt;&amp;lt;info&amp;gt; app: Inside main&lt;/p&gt;
&lt;p&gt;--------- But the Led Blink doesn&amp;#39;t working --------------&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214201?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 14:14:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0c41f34-8a54-4998-9b0a-4518a019fd91</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;So you have checked what written in QSPI and the last byte was not the same ? Could you check why that happens ? Note that the size of the last packet is not the same size as other packet.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214124?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 10:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:065f77ca-4a72-44ce-bd12-b40ddff50dc5</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB power detected&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB ready&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_serial_usb: Could not read from CDC. Error: 0x92.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_RECEIPT_NOTIF_SET&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_MTU_GET&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: PB: Init packet data len: 62&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Signature required. Checking signature.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Calculating hash (len: 62)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Verify signature&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Image verified&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Write address set to 0x00001000&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Writing valid init command to flash.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (data)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: crc = 0x0, offset = 0x0, max_size = 0x1000&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (data)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Creating object with size: 1708. Offset: 0x00000000, CRC: 0x00000000&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)&lt;/p&gt;
&lt;p&gt;------------------------------------------QSPI write---------------------------------------&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Wirting to qspi at address 0x1000 with length 0x400&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Data inconsistent at location = 1023, QSPIData[1023] = 0 and Imagedata[1023] = 32&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Data inconsistent, times = 1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Wirting to qspi at address 0x1400 with length 0x2AC&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Data inconsistent at location = 683, &lt;span&gt;QSPIData&lt;/span&gt;[683] = 70 and &lt;span&gt;Image&lt;/span&gt;&lt;span&gt;data&lt;/span&gt;[683] = 3&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Data inconsistent, times = 1&lt;/p&gt;
&lt;p&gt;------------------------------------------------------------------------------------&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Offset:1708, CRC:0x4009821F&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: Whole firmware image received. Postvalidating.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x1000, size: 0x6AC&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_validation: Hash verification failed.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Expected FW hash:&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 97 AF 3F C4 72 7B DD 8B|..?.r{..&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 21 75 95 95 DF 47 D9 88|!u...G..&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: D1 38 7A C0 32 8C 0C E4|.8z.2...&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 0A 11 68 6E 78 7A B3 54|..hnxz.T&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: Actual FW hash:&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 4F 4A FE AE 1A 61 B8 CB|OJ...a..&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 96 05 85 07 BA 8B 88 60|.......`&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: 9E C0 F7 38 11 1D C3 6A|...8...j&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_validation: BD 04 FC 39 3C 13 BA B6|...9&amp;lt;...&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_dfu_serial: DFU request completed with result: 0xB&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_req_handler: All flash operations have completed. DFU completed.&lt;br /&gt;&amp;lt;info&amp;gt; app: Resetting bootloader.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;info&amp;gt; app: Inside main&lt;br /&gt;&amp;lt;info&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: No firmware to activate.&lt;br /&gt;&amp;lt;info&amp;gt; app: Boot validation failed. No valid app to boot.&lt;br /&gt;&amp;lt;info&amp;gt; app: DFU mode because app is not valid.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_bootloader_wdt: WDT is not enabled&lt;br /&gt;&amp;lt;info&amp;gt; app: in weak nrf_dfu_init_user&lt;br /&gt;&amp;lt;info&amp;gt; app: Entering DFU mode.&lt;br /&gt;&amp;lt;info&amp;gt; app: Enter main loop&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB power detected&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_serial_usb: USB ready&lt;/p&gt;
&lt;p&gt;This is the output from NRF_LOG. The last byte written to QSPI is not same as image received.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/214075?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2019 08:46:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e203d6c9-846a-400c-bdc0-183798aadf16</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mohammad,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, it&amp;#39;s the correct place to replace the&amp;nbsp;nrf_dfu_flash_store() with your qspi function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You then need to check if the image copied to the qspi flash correctly after the image is fully transferred.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with external QSPI memory</title><link>https://devzone.nordicsemi.com/thread/213964?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2019 14:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06f0642e-62ab-46ab-b5d8-76032693d089</guid><dc:creator>Mohammad</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Inside&amp;nbsp;on_data_obj_write_request(), i am using&amp;nbsp;ret_code_t ret = nrf_drv_qspi_write( p_req-&amp;gt;write.p_data,&amp;nbsp; p_req-&amp;gt;write.len, write_addr) to write into QSPI instead of writing into flash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is that correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>