<?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>flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117055/flash-sharing-of-bootloader-and-app</link><description>I open up a flash shared space in app and bootloader, write values from app, bootloader read, bootloader read values such as 0xFFFFF, and not ideal values, may I ask why this is. 
 Based on the background of this problem, I want to customize the protocol</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jan 2025 10:45:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117055/flash-sharing-of-bootloader-and-app" /><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/518598?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 10:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c1e3e98-fb79-46cf-87e0-cc03b3665345</guid><dc:creator>name</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/117055/flash-sharing-of-bootloader-and-app/513789"]&lt;p&gt;&lt;font style="vertical-align:inherit;"&gt;&lt;font style="vertical-align:inherit;"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728393531337v1.png" alt=" " style="cursor:zoom-in;" /&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;我明白了，我又看了你之前的记录，结合后台的DFU例子，我理解的是在应用程序中往bank1写入bin文件数据，每次通过flash写入的时候更新setting里的进度就可以了吗？但是下面这些内容的更新我不太明白&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;1. firmware_image_offset 能不能是我每次往bank1写入的固件数据的大小？&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;2. command_size，command_offset，command_crc，data_object_size 能不能不更新，因为我好像不需要这些命令。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;正如你之前回答中所说，settings 会自动计算 CRC。如果我直接通过 flash 更新上面的 stttings 内容，它也会自动计算 CRC 吗？还是只有在使用 settings 模块时才会自动计算？&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/518590?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 09:58:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5219a483-d2cd-487d-bce8-d92bbdadf08d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;First you need to &amp;quot;memcpy&amp;quot; the original settings page to your write buffer, then you can change the struct members which the app is allowed to change. The app is *not* allowed to update .bank_0 and .bank_1, see the picture I posted earlier. You also need to update the CRC to match the new settings. You can use the settings module as a reference if you don&amp;#39;t want to use this module in your app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/518573?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 09:16:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c9e021e-f4be-49d6-8aab-4d53f25de7dd</guid><dc:creator>name</dc:creator><description>&lt;ol&gt;
&lt;li&gt;Yes, I use nrfjprog --memrd 0xFF000 to read data.&lt;br /&gt;This is the new content of the settings page I wrote. I did not use the settings module to write the settings page content, because I found that using the settings module requires adding some settings module library files in the bootloader. During the adding process, I encountered some difficulties (reporting undefined), so I wrote directly through flash. As for settings_crc_ok, it is rewritten in the application with reference to the bootloader.&lt;br /&gt;I checked the relevant background DFU examples, and the application has a settings page module. To add the settings page module, do I need to add some macros in the sdk.config of the application?&lt;br /&gt;In addition, the project originally used FDS, which involves initializing fstorage when upgrading the firmware. I don&amp;rsquo;t know if this is the reason&lt;/li&gt;
&lt;li&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/settings.png_2D00_640x480.png" /&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/518560?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 08:37:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3338698-9f71-4340-9ffd-f87f6dbc2e0a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;What does the settings page&amp;nbsp;contain after programming the application and bootloader and resetting the device?&lt;/p&gt;
&lt;p&gt;Reading settings page with nrfjprog&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --memrd 0xFF000 --n 256&lt;/pre&gt;&lt;/p&gt;
[quote user="hklsa"]. However, settings_crc_ok cannot verify the CRC (i.e., the result of settings_crc_ok is 0). The value read from address 0xFF000 through nrfjprog also does not match what I wrote. I wonder why.[/quote]
&lt;p&gt;Do you use the settings module to write to the settings page? This will automatically compute a new crc when you write something to it. Also, what values are you trying to change? Remember that there are several of the struct elements which the app is not permitted to change. Doing so will cause the bootloader to restore the original settings from the backup page at 0xFE000&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/518538?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2025 03:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b73d026a-f9ed-4ea5-94b8-55a1c915b81f</guid><dc:creator>name</dc:creator><description>&lt;p&gt;Sorry, I always fail to set breakpoints in the bootloader. I plan not to modify any code in the bootloader. This article &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86027/dfu-approach-from-cloud-to-esp32-to-nrf52840"&gt;devzone.nordicsemi.com/.../dfu-approach-from-cloud-to-esp32-to-nrf52840&lt;/a&gt; explains the cloud to nrf52840 DFU approach. The original value of nrf_dfu_settings_t that I read from flash in the application is 0. After writing some values to flash, they are read correctly. However, settings_crc_ok cannot verify the CRC (i.e., the result of settings_crc_ok is 0). The value read from address 0xFF000 through nrfjprog also does not match what I wrote. I wonder why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/517125?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 06:22:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d688594-8106-4179-8a3b-e3c749abb545</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Did you place a breakpoint in the bootloader&amp;#39;s error handler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/517108?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 01:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3c17116-68a0-464e-bb8c-e4c6c01aee93</guid><dc:creator>name</dc:creator><description>&lt;p&gt;Hello, I&amp;#39;m sorry, I followed your instructions, may be the reason for my operation, and failed to solve the problem. Can I provide bootlaoder program and seek effective help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/515170?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2024 15:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ceb5a07-bf5d-449b-aadb-daccaf360f51</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can debug the bootloader the same way you debug your application. The difference is that you need to open the bootloader project in Keil instead. The application project does not include the debug symbols needed to debug the bootlaoder.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/515011?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2024 03:36:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2261f919-9058-4825-b5b8-97bd0b633a44</guid><dc:creator>name</dc:creator><description>&lt;p&gt;Hello, I tried extending the watchdog timer in the app, but it didn&amp;#39;t solve the problem. I tried setting breakpoints in Keil, but when the debugger jumped to the bootloader, it disconnected. I wonder if there&amp;#39;s something wrong with my debugging method. I would like to ask how to set breakpoints for debugging in the bootloader, or if there are any tools or related documentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/514680?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 09:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4283189f-6929-464e-b6b7-fb54ba2a00d3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The bootloader will feed the watchdog if it sees that it is enabled by the application prior to entering dfu mode, but it will not enable it. Can you please a breakpoint in the bootloader&amp;#39;s error handler to see if the error may have been triggered by a runtime error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/514652?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 07:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b800ac1-e17e-4684-a20e-d52ad19470e5</guid><dc:creator>name</dc:creator><description>&lt;p&gt;Hello, thank you very much for your time. Now I can successfully write firmware data to bank_1 area through the app, and I can also successfully pass the verification of setting after entering the bootloader. I have successfully made the bootloader recognize the firmware data written by me as valid. However, the problem is that the process of copying firmware data from bank_1 to bank_0 in the bootloader is restarting. The following is the run log. The log for the first image shows that the watchdog turned on when entering image_copy is not turned on. I wonder if that&amp;#39;s what caused the reboot?&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/88253.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6215.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/514209?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2024 10:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59dbbed1-a78f-4959-95e5-90ebd9b1882e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The bank 1 start address should be found using the&amp;nbsp;&lt;span&gt;nrf_dfu_bank1_start_addr() function. It is&amp;nbsp;based on the&amp;nbsp;start address and size of the current application image. If you use another address than this, the bootloader will not be able to activate the update.&lt;/span&gt;&lt;/p&gt;
[quote user="hklsa"]Update_start_address, s_dfu_settings bank_1. Image_size, s_dfu_settings.bank_1.image_crc, s_dfu_settings.bank_1.bank_code, s_dfu_settings.crc.[/quote]
&lt;p&gt;The application is not permitted to change .bank_1.&lt;/p&gt;
[quote user="hklsa"]But init_command looks like something like a command, how do I change it?[/quote]
&lt;p&gt;The &lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/lib_bootloader_dfu_validation.html"&gt;init command&lt;/a&gt; contains metadata about the update which is needed by the bootloader to activate the update and should be uploaded along with the binary image. The init command is created with &lt;a href="https://docs.nordicsemi.com/bundle/nrfutil/page/guides-nrf5sdk/dfu_generating_packages.html"&gt;nrfutil&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
[quote user="hklsa"]NRF_BL_DFU_ALLOW_UPDATE_FROM_APP is enabled in sdk_config.h, it will not protect the Settings page&amp;quot;. I also want to keep the original BLE OTA way. NRF_BL_DFU_ALLOW_UPDATE_FROM_APP Should I disable it?[/quote]
&lt;p&gt;You will still be able to perform dfu within the bootloader with this setting enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/513799?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 10:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba2a3fe6-047e-480d-85e3-48218704f8c2</guid><dc:creator>name</dc:creator><description>&lt;p&gt;Hello, I have changed the method now.&lt;br /&gt;Create a flash space (shared by app and bootlaoder) to store bank_1&amp;#39;s new address, firmware size, and whether or not to customize OTA tags. Enter bootloader back to read the original s_dfu_settings to modify these values s_dfu_settings after RAM. The progress. Update_start_address, s_dfu_settings bank_1. Image_size, s_dfu_settings.bank_1.image_crc, s_dfu_settings.bank_1.bank_code, s_dfu_settings.crc. As you said I should modify bank_current and init_command again, right? But init_command looks like something like a command, how do I change it?&lt;br /&gt;Also, as you said &amp;quot;NRF_BL_DFU_ALLOW_UPDATE_FROM_APP is enabled in sdk_config.h, it will not protect the Settings page&amp;quot;. I also want to keep the original BLE OTA way. NRF_BL_DFU_ALLOW_UPDATE_FROM_APP Should I disable it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/513789?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 09:44:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e27cdd28-6537-4b95-9afd-3a03015a215f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The bootloader enables read and write protection on itself with the ACL before booting the application. However,&amp;nbsp;it will not protect the settings page if you have the bootloader built with&amp;nbsp;NRF_BL_DFU_ALLOW_UPDATE_FROM_APP enabled in sdk_config.h.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that the app can only changes that are not within the&amp;nbsp;red squares below, those are off limits to the app. Therefore you must load the stored values for the other elements into your RAM buffer. The app must not write to the backup either, the bootloader is responsible for that.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728393531337v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The struct elements you must update to make the bootloader activate your update are: crc (is the checksum of settings struct - see settings_module for how it is calculated),&amp;nbsp; bank_current (set it to bank 1), progress, and init_command.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash sharing of bootloader and app</title><link>https://devzone.nordicsemi.com/thread/513779?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 09:11:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65b715b0-436c-4ce1-a539-e3632b7187f5</guid><dc:creator>name</dc:creator><description>&lt;p&gt;Hello, I have solved the above problem, and now there is a new problem:&lt;br /&gt;When the bootloader copies the new firmware from bank1 to bank0, there is a dead loop when the app is finally started. The run log file is as follows&lt;/p&gt;
&lt;p&gt;The background to these questions is: The nrf52840 external 4G module sends the firmware data to the app through http, and then the app saves the firmware data to bank_1 through flash, and then modifies these configurations in the bootloader, so that the bootloader copies the bank_1 data to bank_0. Here is the code added to the bootloader&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void nrf_dfu_settings_reinit(void)
{
// nrf_dfu_flash_read(0xFF000, m_dfu_settings_buffer, sizeof(new_dfu_setting_t));
bool settings_valid = settings_crc_ok();
bool settings_backup_valid = settings_backup_crc_ok();


if (settings_valid)
{
NRF_LOG_DEBUG(&amp;quot;Using settings page.&amp;quot;);
memcpy(&amp;amp;s_dfu_settings, m_dfu_settings_buffer, sizeof(nrf_dfu_settings_t));
new_dfu_setting_t new_dfu_setting = {0};

uint32_t setting_addr = 0;
// setting_addr = 0x27000 + s_dfu_settings.bank_0.image_size;
// setting_addr += 4096;
nrf_dfu_flash_read(0x78000, &amp;amp;new_dfu_setting, sizeof(new_dfu_setting_t));
NRF_LOG_INFO(&amp;quot;new_dfu_setting.flag: %d&amp;quot;, new_dfu_setting.flag);
NRF_LOG_INFO(&amp;quot;new_dfu_setting.fw_addr: 0x%08x, new_dfu_setting.fw_size: 0x%08x&amp;quot;, new_dfu_setting.fw_addr, new_dfu_setting.fw_size);
if(new_dfu_setting.flag == 0x01)    //Added the user-defined OTA mode, which is directly written to s_dfu_settings.
{
s_dfu_settings.progress.update_start_address = new_dfu_setting.fw_addr;
s_dfu_settings.bank_1.image_size = new_dfu_setting.fw_size;
s_dfu_settings.bank_1.image_crc = crc32_compute((uint8_t*)(s_dfu_settings.progress.update_start_address),s_dfu_settings.bank_1.image_size,NULL);
s_dfu_settings.bank_1.bank_code = NRF_DFU_BANK_VALID_APP;
s_dfu_settings.crc = settings_crc_get(&amp;amp;s_dfu_settings);
memcpy(s_dfu_settings.boot_validation_app.bytes, &amp;amp;s_dfu_settings.bank_1.image_crc, 4);
ret_code_t err_code = nrf_dfu_settings_write(NULL);
if(err_code != NRF_SUCCESS) return;

new_dfu_setting.flag = 0;
err_code = nrf_dfu_flash_store(0x78000, &amp;amp;new_dfu_setting, sizeof(new_dfu_setting_t), NULL);
if(err_code == NRF_SUCCESS)
NRF_LOG_INFO(&amp;quot;write new_dfu_setting success&amp;quot;);
//nrf_dfu_flash_erase(0x78000, 1, NULL);

}
else if (settings_backup_valid)
{
NRF_LOG_DEBUG(&amp;quot;Copying forbidden parts from backup page.&amp;quot;);
settings_forbidden_parts_copy_from_backup((uint8_t *)&amp;amp;s_dfu_settings);
}
}
else if (settings_backup_valid)
{
NRF_LOG_INFO(&amp;quot;Restoring settings from backup since the settings page contents are &amp;quot;
&amp;quot;invalid (CRC error).&amp;quot;);
memcpy(&amp;amp;s_dfu_settings,
mp_dfu_settings_backup_buffer,
sizeof(nrf_dfu_settings_t));
}
else
{
NRF_LOG_WARNING(&amp;quot;Resetting bootloader settings since neither the settings page nor the &amp;quot;
&amp;quot;backup are valid (CRC error).&amp;quot;);
memset(&amp;amp;s_dfu_settings, 0x00, sizeof(nrf_dfu_settings_t));
s_dfu_settings.settings_version = NRF_DFU_SETTINGS_VERSION;
}

if (NRF_DFU_SETTINGS_COMPATIBILITY_MODE &amp;amp;&amp;amp; !NRF_DFU_IN_APP &amp;amp;&amp;amp; (s_dfu_settings.settings_version == 1))
{
NRF_LOG_INFO(&amp;quot;Old settings page detected. Upgrading info.&amp;quot;);

// Old version. Translate.
memcpy(&amp;amp;s_dfu_settings.peer_data, (uint8_t *)&amp;amp;s_dfu_settings + DFU_SETTINGS_BOND_DATA_OFFSET_V1, NRF_DFU_PEER_DATA_LEN);
memcpy(&amp;amp;s_dfu_settings.adv_name, (uint8_t *)&amp;amp;s_dfu_settings + DFU_SETTINGS_ADV_NAME_OFFSET_V1, NRF_DFU_ADV_NAME_LEN);

// Initialize with defaults.
s_dfu_settings.boot_validation_softdevice.type = NO_VALIDATION;
s_dfu_settings.boot_validation_app.type = VALIDATE_CRC;
s_dfu_settings.boot_validation_bootloader.type = NO_VALIDATION;
memcpy(s_dfu_settings.boot_validation_app.bytes, &amp;amp;s_dfu_settings.bank_0.image_crc, sizeof(uint32_t));

s_dfu_settings.settings_version = NRF_DFU_SETTINGS_VERSION;
}

return;
}&lt;/pre&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2474.log.txt"&gt;devzone.nordicsemi.com/.../2474.log.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>