<?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 bootloader and FDS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65855/dfu-bootloader-and-fds</link><description>Hi, 
 we have in production an old application developed with SDK13. The application size is growing and with the last update we discovered that during DFU bootloader update, the area reserved for FDS gets corrupted. 
 In bootloader the area appears to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Sep 2020 09:09:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65855/dfu-bootloader-and-fds" /><item><title>RE: DFU bootloader and FDS</title><link>https://devzone.nordicsemi.com/thread/269584?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 09:09:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e96d1fc-c5cf-4718-9e4f-6ddfe11b5bb4</guid><dc:creator>Edvin</dc:creator><description>[quote user="Andrea Lombardo"]So this does it mean that the SDK13 BL tries to perform dual bank not considering the FDS storage area?[/quote]
&lt;p&gt;&amp;nbsp;Actually, I see that there is something in nrf_dfu_utils.c and nrf_dfu_types.h.&lt;/p&gt;
&lt;p&gt;nrf_dfu_utils.c, line 540:&lt;/p&gt;
&lt;p&gt;uint32_t free_size =&amp;nbsp; DFU_REGION_TOTAL_SIZE - DFU_APP_DATA_RESERVED;&lt;/p&gt;
&lt;p&gt;Where DFU_APP_DATA_RESERVED is defined in nrf_dfu_types.h, and by defatult set to 3 pages. What is this set to in your case? If it is set to 3 pages, then can you try to debug to see what happens in this function:&amp;nbsp;nrf_dfu_find_cache(). What bank does it select?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Andrea Lombardo"]Any other idea to force the bootloader to run single page (without reprogramming the BL) instead of artificially increase the size of the application?[/quote]
&lt;p&gt;&amp;nbsp;You have some options:&lt;/p&gt;
&lt;p&gt;Either, you can update to a very small application. I am not sure if the bootloader in SDK13 always uses the same address for the second bank, or if it sets the second bank right above the end of the first application.&lt;/p&gt;
&lt;p&gt;The other option is to update to a new bootloader that has the app data reserved functionality working properly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Andrea Lombardo"]Any idea why we experience bonding information loss during bootloader upgrade?[/quote]
&lt;p&gt;&amp;nbsp;What do you update from and to? Sorry if this is really clear, but I am not sure. Do you upgrade from SDK13 to 17? Do you update the softdevice as well? Is the new application using the peer manager? Is the old application using the peer manager as well, or does it use device_manager?&lt;/p&gt;
&lt;p&gt;Is your bootloader set to use bonding or not? (If it is not, then I don&amp;#39;t think the solution is to turn that on. It may not do exactly what you expect. This is used to require bonds from the device that is performing DFU).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU bootloader and FDS</title><link>https://devzone.nordicsemi.com/thread/269504?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 04:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c30e280-2661-42c6-805c-0a0c67cad648</guid><dc:creator>Andrea Lombardo</dc:creator><description>&lt;p&gt;Yes, you are right.&lt;/p&gt;
&lt;p&gt;As I mentioned we have two applications and we are experiencing similar problems. So I put them together, but I got confused.&lt;/p&gt;
&lt;p&gt;OLD APPLICATION - SDK 13&lt;/p&gt;
&lt;p&gt;The bootloader of the old application is basically the&amp;nbsp;bootloader_secure_ble project in SDK 13 and, yes, you are also&amp;nbsp;right when you say that there is no&amp;nbsp;&lt;span&gt;NRF_DFU_APP_DATA_AREA_SIZE&amp;nbsp; definition in the SDK 13 bootloader.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So this does it mean that the SDK13 BL tries to perform dual bank not considering the FDS storage area? Deciding only on firmware size.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any other idea to force the bootloader to run single page (without reprogramming the BL) instead of artificially increase the size of the application?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NEWER APPLICATION - SDK17&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ok, good to know that we did right in defining the&amp;nbsp;NRF_DFU_APP_DATA_AREA_SIZE. Any idea why we experience bonding information loss during bootloader upgrade? Anyway, If not, we will investigate more on this and we will get back to you. As I mentioned, it does not happen 100% of the time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Am I right if I say that all bonding info are stored in the FDS area?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Andrea&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&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 bootloader and FDS</title><link>https://devzone.nordicsemi.com/thread/269415?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 14:07:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10b97c6b-bbec-4b72-b944-39d450aa9727</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What SDK is the bootloader with&amp;nbsp;&lt;span&gt;NRF_DFU_APP_DATA_AREA_SIZE defined from? I can&amp;#39;t see anything like that in SDK13.x.0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ll use SDK17 for reference for now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;12288 = 3*CODE_PAGE_SIZE, so that should be enought.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Neverthless the bootloader runs a dual bank page update, corrupting the area. At new startup the FDS_Init fails because no pages are available.[/quote]
&lt;p&gt;&amp;nbsp;What does the bootloader that is currently flashed look like? Does it have any app_protect functionality? What SDK is it from? Does it only support dual bank, or should it switch over to single bank if there is no space for two applications?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>