<?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>Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66781/custom-transport-layer-for-dfu-in-app-and-dual-bank-settings-issue</link><description>I&amp;#39;m currently using a HostController with pregiven communication protocol for transfering data to the NRF52840 (over uart). The NRF is flashed with the SD140 and I&amp;#39;m using the SDK V16.0. The communication protocol of the host is already implemented in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Oct 2020 10:01:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66781/custom-transport-layer-for-dfu-in-app-and-dual-bank-settings-issue" /><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273683?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2020 10:01:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9862bc41-eec2-44c7-ad83-c12690f996fe</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Massimo,&lt;/p&gt;
&lt;p&gt;Since you are doing custom transport for DFU, and you are modifying the bootloader anyway, it&amp;#39;s all up to you&amp;nbsp; to modify the bootloader to do what you need.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any problem modifying the bootloader to allow you to write to bootloader setting backup, or to change the bootloader to ignore hash check, and so on.&amp;nbsp;&lt;br /&gt;The bootloader is just like a normal application code, the only difference is that it runs before the application.&lt;br /&gt;&lt;br /&gt;In addition, even though the transport layer in the example is different from what you are planning to do, the last part to save to bootloader setting and switch to bootloader to swap image should be the same and&amp;nbsp; you can&amp;nbsp;use that as the reference for your solution.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273673?ContentTypeID=1</link><pubDate>Thu, 08 Oct 2020 09:11:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d283c0e1-61de-47df-8b54-d53267da0bb3</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;Hello Hung,&lt;/p&gt;
&lt;p&gt;the example is not what I want to achieve. The transport layer is custom and not comparable with the example. I think the only problem is the storage of the settings.&lt;/p&gt;
&lt;p&gt;If I check the flash memory at 0xFF000 after calling nrf_dfu_settings_write() and compare it with the s_dfu_settings struct it does not match. Variables like bank_code, bank_current or current_bank do not match. nrf_defu-settings_write_and_backup() call only nrf_dfu_settings_write as I&amp;#39;m in the App and calling the backup is not allowed.&lt;/p&gt;
&lt;p&gt;Is it possible to swap the image without init command (no signature...), just by a correct settings page with app_crc, settings_crc, app_size?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273555?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 15:19:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aadab8eb-0509-45bc-9256-6ca3fed1148c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Massimo,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t got time to dig into the code to find a solution for you. But could you check the example ?&amp;nbsp;It&amp;#39;s made for SDK v15.3 but it shouldn&amp;#39;t too difficult to port to v16.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think the bootloader setting flash re-write in the log has something to do with the fact that the bootloader setting back up doesn&amp;#39;t match with the current bootloader setting.&amp;nbsp; This will cause the bootloader to copy the bootloader setting backup back to the bootloader setting.&amp;nbsp;&lt;br /&gt;Also, I&amp;#39;m not sure if you aware of but every time you store bootloader setting you need to calculate the .crc of it. Please have a look at&amp;nbsp;nrf_dfu_settings_write_and_backup() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273514?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 13:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98dacee5-4e80-41e2-afa0-6eea2e3271e4</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;In the first step I don&amp;#39;t need any app signature and. Is it possible to trigger the image swap in the bootloader without the init_command and validation inside the app?&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m trying to store the settingspage with information about bank1:&lt;/p&gt;
&lt;p&gt;memset(&amp;amp;s_dfu_settings.bank_0, 0, sizeof(nrf_dfu_bank_t));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.write_offset = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_layout = NRF_DFU_BANK_LAYOUT_DUAL;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_current = NRF_DFU_CURRENT_BANK_1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_1.image_size = m_settings_decoding.appsize; // received by host (gen. by nrfutil)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_1.image_crc = m_settings_decoding.app_crc;&amp;nbsp; // received by host (gen. by nrfutil)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_1.bank_code = NRF_DFU_BANK_VALID_APP;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_0.bank_code = NRF_DFU_BANK_INVALID;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_dfu_settings.bank_current = NRF_DFU_CURRENT_BANK_1;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;err_code = nrf_dfu_settings_write(firmwareDfu_flashOp_cb);&lt;/p&gt;
&lt;p&gt;The return value tells me that storing was succesfull. Is there a way to check this by reloading the settings from flash?&lt;/p&gt;
&lt;p&gt;After the settings storage i call:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;err_code = sd_power_gpregret_clr(0, 0xFFFFFFFF);&lt;br /&gt;&amp;nbsp;APP_ERROR_CHECK(err_code);&lt;br /&gt;&amp;nbsp;nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_DFU);&lt;/p&gt;
&lt;p&gt;When entering the Bootloader the settings seem to be not recovered. I added a breakpoint nrf_bootloader_fw_activate() to check the settings but they seem not present:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1602077525665v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The Bootloader log shows the wildly copying settings pages but for what?&lt;/p&gt;
&lt;p&gt;The Bootloader Logging output was:&lt;/p&gt;
&lt;p&gt;[0m[00000000] &amp;lt;info&amp;gt; app: Inside main[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: In nrf_bootloader_init[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FF000[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20003AEC, len=896 bytes), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FE000[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x20003E6C, len=896 bytes), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; app: Postvalidating update after reset.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FF000[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20003AEC, len=896 bytes), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x000FE000[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x20003E6C, len=896 bytes), queue usage: 1[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; app: No firmware to activate.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: App is valid[0m&lt;br /&gt;[1;33m[00000000] &amp;lt;warning&amp;gt; nrf_dfu_settings: No additional data erased[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x0[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; app: Inside main[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: In nrf_bootloader_init[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; app: No firmware to activate.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: App is valid[0m&lt;br /&gt;[1;33m[00000000] &amp;lt;warning&amp;gt; nrf_dfu_settings: No additional data erased[0m&lt;br /&gt;[0m[00000000] &amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0xFE000.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000[0m&lt;br /&gt;[0m[00000000] &amp;lt;debug&amp;gt; app: Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x0[0m&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273481?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 12:14:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39568480-d39d-4e01-84c5-f53dc50e8db8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume you meant the .dat file ?&amp;nbsp;&lt;br /&gt;As far as I know there is no overhead or filter. But you may need to double check.&lt;/p&gt;
&lt;p&gt;I would suggest the following test. You can modify the original bootloader so that it pause at the swapping phase.&amp;nbsp;So that you know what exactly expected in the bootloader setting in order for the bootloader to swap the image.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273425?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 09:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea4d78c9-2cf0-400c-98a6-1868229e755a</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;If I didn&amp;#39;t understand it wrong then the .bat file in the generated zip package contains the content of the init_command.&lt;/p&gt;
&lt;p&gt;Is it possible just to store the content of the .bat file in the init_command[512] array, or is there any overhead in the .bat file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273401?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 08:51:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de7333a0-2a99-4e37-afc3-2c0aa4757e88</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Massimo,&amp;nbsp;&lt;br /&gt;I think you missed the &amp;quot;init packet&amp;quot; transferring part. It&amp;#39;s described &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_dfu_validation.html?cp=7_1_3_5_1_1_0#lib_bootloader_dfu_init"&gt;here&lt;/a&gt;. It&amp;#39;s transferred before the image is transmitted. And stored in&amp;nbsp;init_command inside&amp;nbsp;nrf_dfu_settings_t struct.&lt;br /&gt;The init packet not only include the hash but also the signature for authentication check. I think it&amp;#39;s something important that you may want to implement in&amp;nbsp; your application.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273396?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 08:37:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f26de251-9d4b-4aeb-9961-6f7661a3944b</guid><dc:creator>MassimoF</dc:creator><description>&lt;p&gt;Hello Hung,&lt;/p&gt;
&lt;p&gt;thank you for your answer. I followed the suggestion of the mentioned thread and instead of invalidating banks by myself, I called nrf_dfu_validation_post_data_execute(bank1_start, app_size);.&lt;/p&gt;
&lt;p&gt;Then I had to enabled the ram buffering (int sdk_config.h) and replaced the cc310_backend_hash.c with Vidar&amp;#39;s one of the dfu example.&lt;/p&gt;
&lt;p&gt;But now I get a non matching hash:&lt;/p&gt;
&lt;p&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x55000, size: 0x29AB4&lt;br /&gt;[1;33m&amp;lt;warning&amp;gt; nrf_dfu_validation: Hash verification failed.&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation: Expected FW hash:&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; 08 23 00 00 08 19 00 00|.#......&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; 08 0F 00 00 08 05 00 00|........&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; 07 FB 00 00 07 F1 00 00|........&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; 07 E7 00 00 07 DD 00 00|........&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation: Actual FW hash:&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; 71 E0 6D D1 E1 12 E9 72|q.m....&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; ED 40 43 D1 80 6C A6 3E|.@C..l.&amp;gt;&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; 3A 12 CB 30 19 8F 94 FD|:..0....&lt;br /&gt;[1;32m&amp;lt;debug&amp;gt; nrf_dfu_validation:&amp;nbsp; C6 2A 6A 81 F8 5F 7D B1|.*j.._}.&lt;/p&gt;
&lt;p&gt;Where is the &amp;quot;expected FW&amp;quot; hash stored? As I just decode and store the incomming hex file (app only from 0x27000) data in bank1 I do no previous hash calculation as reference for this step.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom transport layer for dfu in app and dual bank settings issue</title><link>https://devzone.nordicsemi.com/thread/273277?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 14:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4734745a-849c-485a-8bc4-a4ae5a7145bb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Massimo,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Have you invalide Bank 0 and valid Bank 1 before you switch to bootloader to swap the image ?&lt;br /&gt;&lt;br /&gt;We do that in&amp;nbsp;postvalidate_app() function.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;We have an example of doing background DFU on UART which is quite similar to what you are trying to do. It&amp;#39;s for SDK v15.3 but should be a good source of reference for your application I think. Please have a look &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46994/background-dfu-application-source-code"&gt;here.&lt;/a&gt;&amp;nbsp;The example named&amp;nbsp;nrf_sdk_15.3.0_background_dfu_3.zip&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>