<?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>fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55927/fds-is-not-working-in-buttonless-dfu</link><description>Hello All, 
 
 I am working on the nrf52810 , 
 Using sdk 15.3 . 
 
 I am working on the DFU feature on my application. 
 I have successfully integrated the my application with the buttonless DFU and its working properly. 
 Now I have added the fds feature</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 04 Jan 2020 10:05:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55927/fds-is-not-working-in-buttonless-dfu" /><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227518?ContentTypeID=1</link><pubDate>Sat, 04 Jan 2020 10:05:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31c9ed5b-b702-4c3c-8a95-950d581c8628</guid><dc:creator>Rohit</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for suggestion. Its worked.&lt;/p&gt;
&lt;p&gt;In my side i have reduced some services used in the code and loaded the zip file through OAD.&lt;/p&gt;
&lt;p&gt;Now it is retrieving data that store previously.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But if i wanted to make DFU again then it is not happening showing GATT error .&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to solve this problem because previously without fds it working and multiple DFU is happening.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to solve this issue ? Is related to setting of app preserve data memory?.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Waiting for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227422?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 13:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14529550-db2d-4086-83d4-df326ffea740</guid><dc:creator>Rohit</dc:creator><description>&lt;p&gt;Thanks for information&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/55927/fds-is-not-working-in-buttonless-dfu/227387"]Maybe you are using the&amp;nbsp;pca10040e_ble&lt;strong&gt;_debug&lt;/strong&gt; configuration of the bootloader?&amp;nbsp; It takes up more flash than the&amp;nbsp;pca10040e_ble configuration.[/quote]
&lt;p&gt;Okay..&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/55927/fds-is-not-working-in-buttonless-dfu/227387"]You need to reserve 0x3000 bytes when you have 3 allocated 3 virtual FDS pages. But maybe you should reduce it to 2 pages since you are running out of flash.&amp;nbsp;[/quote]
&lt;p&gt;okay i will try this&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;if i set 0x1000 then actually how many bytes it will store with setting fds virtual pages = 1 ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;waiting for your response..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227387?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 10:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baa21d64-9ccf-4117-9829-4842ccbf93a6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Rohit,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to reserve 0x3000 bytes when you have 3 allocated 3 virtual FDS pages. But maybe you should reduce it to 2 pages since you are running out of flash.&amp;nbsp;&lt;/p&gt;
[quote user="RohitK"]app debug window it is showing insufficient resource .[/quote]
&lt;p&gt;&amp;nbsp;The error indicates that the new image is too big to fit into the &amp;#39;Free&amp;#39; area between&amp;nbsp;Softdevice end and app data region start, see&amp;nbsp;&lt;a title="Dual-bank and single-bank updates" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_bootloader_dfu_banks.html?cp=7_1_3_5_1_2"&gt;Dual-bank and single-bank updates&lt;/a&gt;.&amp;nbsp;Maybe you are using the&amp;nbsp;pca10040e_ble&lt;strong&gt;_debug&lt;/strong&gt; configuration of the bootloader?&amp;nbsp; It takes up more flash than the&amp;nbsp;pca10040e_ble configuration.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227381?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 10:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30ca7eed-3fd6-49ab-bcb2-8fa3aa36a257</guid><dc:creator>Rohit</dc:creator><description>&lt;p&gt;In sdk_config.h file i have (fds setting)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;e&amp;gt; FDS_ENABLED - fds - Flash data storage module
//==========================================================
#ifndef FDS_ENABLED
#define FDS_ENABLED 1
#endif
// &amp;lt;h&amp;gt; Pages - Virtual page settings

// &amp;lt;i&amp;gt; Configure the number of virtual pages to use and their size.
//==========================================================
// &amp;lt;o&amp;gt; FDS_VIRTUAL_PAGES - Number of virtual flash pages to use. 
// &amp;lt;i&amp;gt; One of the virtual pages is reserved by the system for garbage collection.
// &amp;lt;i&amp;gt; Therefore, the minimum is two virtual pages: one page to store data and one page to be used by the system for garbage collection.
// &amp;lt;i&amp;gt; The total amount of flash memory that is used by FDS amounts to @ref FDS_VIRTUAL_PAGES * @ref FDS_VIRTUAL_PAGE_SIZE * 4 bytes.

#ifndef FDS_VIRTUAL_PAGES
#define FDS_VIRTUAL_PAGES 3
#endif

// &amp;lt;o&amp;gt; FDS_VIRTUAL_PAGE_SIZE  - The size of a virtual flash page.
 

// &amp;lt;i&amp;gt; Expressed in number of 4-byte words.
// &amp;lt;i&amp;gt; By default, a virtual page is the same size as a physical page.
// &amp;lt;i&amp;gt; The size of a virtual page must be a multiple of the size of a physical page.
// &amp;lt;1024=&amp;gt; 1024 
// &amp;lt;2048=&amp;gt; 2048 

#ifndef FDS_VIRTUAL_PAGE_SIZE
#define FDS_VIRTUAL_PAGE_SIZE 1024
#endif

// &amp;lt;o&amp;gt; FDS_VIRTUAL_PAGES_RESERVED - The number of virtual flash pages that are used by other modules. 
// &amp;lt;i&amp;gt; FDS module stores its data in the last pages of the flash memory.
// &amp;lt;i&amp;gt; By setting this value, you can move flash end address used by the FDS.
// &amp;lt;i&amp;gt; As a result the reserved space can be used by other modules.

#ifndef FDS_VIRTUAL_PAGES_RESERVED
#define FDS_VIRTUAL_PAGES_RESERVED 0
#endif

// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Backend - Backend configuration

// &amp;lt;i&amp;gt; Configure which nrf_fstorage backend is used by FDS to write to flash.
//==========================================================
// &amp;lt;o&amp;gt; FDS_BACKEND  - FDS flash backend.
 

// &amp;lt;i&amp;gt; NRF_FSTORAGE_SD uses the nrf_fstorage_sd backend implementation using the SoftDevice API. Use this if you have a SoftDevice present.
// &amp;lt;i&amp;gt; NRF_FSTORAGE_NVMC uses the nrf_fstorage_nvmc implementation. Use this setting if you don&amp;#39;t use the SoftDevice.
// &amp;lt;1=&amp;gt; NRF_FSTORAGE_NVMC 
// &amp;lt;2=&amp;gt; NRF_FSTORAGE_SD 

#ifndef FDS_BACKEND
#define FDS_BACKEND 2
#endif

// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Queue - Queue settings

//==========================================================
// &amp;lt;o&amp;gt; FDS_OP_QUEUE_SIZE - Size of the internal queue. 
// &amp;lt;i&amp;gt; Increase this value if you frequently get synchronous FDS_ERR_NO_SPACE_IN_QUEUES errors.

#ifndef FDS_OP_QUEUE_SIZE
#define FDS_OP_QUEUE_SIZE 4
#endif

// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; CRC - CRC functionality

//==========================================================
// &amp;lt;e&amp;gt; FDS_CRC_CHECK_ON_READ - Enable CRC checks.

// &amp;lt;i&amp;gt; Save a record&amp;#39;s CRC when it is written to flash and check it when the record is opened.
// &amp;lt;i&amp;gt; Records with an incorrect CRC can still be &amp;#39;seen&amp;#39; by the user using FDS functions, but they cannot be opened.
// &amp;lt;i&amp;gt; Additionally, they will not be garbage collected until they are deleted.
//==========================================================
#ifndef FDS_CRC_CHECK_ON_READ
#define FDS_CRC_CHECK_ON_READ 0
#endif
// &amp;lt;o&amp;gt; FDS_CRC_CHECK_ON_WRITE  - Perform a CRC check on newly written records.
 

// &amp;lt;i&amp;gt; Perform a CRC check on newly written records.
// &amp;lt;i&amp;gt; This setting can be used to make sure that the record data was not altered while being written to flash.
// &amp;lt;1=&amp;gt; Enabled 
// &amp;lt;0=&amp;gt; Disabled 

#ifndef FDS_CRC_CHECK_ON_WRITE
#define FDS_CRC_CHECK_ON_WRITE 0
#endif

// &amp;lt;/e&amp;gt;

// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; Users - Number of users

//==========================================================
// &amp;lt;o&amp;gt; FDS_MAX_USERS - Maximum number of callbacks that can be registered. 
#ifndef FDS_MAX_USERS
#define FDS_MAX_USERS 4
#endif

// &amp;lt;/h&amp;gt; 
//==========================================================&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;We have to see fds virtual page = 3 is there...&lt;br /&gt;&amp;nbsp;and if i set&amp;nbsp;DFU_APP_DATA_RESERVED = 0x2000 then&lt;/p&gt;
&lt;p&gt;i&lt;strong&gt;n app debug window it is showing insufficient resource .&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;fds virtual page =3 means we have to set 0x3000 or 0xc00?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1kb is equivalent to what value(&lt;span&gt;DFU_APP_DATA_RESERVED&amp;nbsp;&lt;/span&gt;)?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;what modification is required ?&lt;/p&gt;
&lt;p&gt;please provide your input...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227348?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 08:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce52056a-ba3e-42e7-b939-754314da5906</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;[quote user="RohitK"][/quote]&lt;/p&gt;
&lt;p&gt;i have try that in debug mode it is working but if i generate the dfu zip file and load with mobile (OAD)&lt;/p&gt;
&lt;p&gt;Then it is not advertising ..after all change...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Can you debug the app after DFU to see why it&amp;#39;s not advertising? Maybe it ends up in the app error handler.&lt;/p&gt;
[quote user="RohitK"]so i should try with 0x2000?[/quote]
&lt;p&gt;&amp;nbsp;It must match the number of FDS pages you have. Check the FDS settings in sdk_config.h&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227331?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 06:04:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ddfa6c1-064f-45fe-8d76-c94588598ba8</guid><dc:creator>Rohit</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;i have try that in debug mode it is working but if i generate the dfu zip file and load with mobile (OAD)&lt;/p&gt;
&lt;p&gt;Then it is not advertising ..after all change...&lt;/p&gt;
&lt;p&gt;What is the issue can you pointout..&lt;/p&gt;
&lt;p&gt;And&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/55927/fds-is-not-working-in-buttonless-dfu/227282"]Glad to hear that it&amp;#39;s working now. The preserved app data area must correspond with the number of flash pages allocated to FDS in your app. FDS requires at least two flash pages because it reserves one flash page (0x1000 bytes) for swap.&amp;nbsp;[/quote]
&lt;p&gt;so i should try with 0x2000?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Waiting for your response.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227282?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2020 15:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a664f642-4f95-48af-b747-afddcde156e7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Glad to hear that it&amp;#39;s working now. The preserved app data area must correspond with the number of flash pages allocated to FDS in your app. FDS requires at least two flash pages because it reserves one flash page (0x1000 bytes) for swap.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/227248?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2020 13:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13d987b7-a553-4fd2-83ad-ddecaa996974</guid><dc:creator>Rohit</dc:creator><description>&lt;p&gt;Thanks for your valuable and detail response.&lt;/p&gt;
&lt;p&gt;Thanks for clearing my issue.&lt;/p&gt;
&lt;p&gt;i have made changes as per your suggestion.&lt;/p&gt;
&lt;p&gt;now fds is working.&lt;/p&gt;
&lt;p&gt;Additionally I have modified nrf_dfu_type.h like below&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1577972380335v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for the app data preservation as 4KB&lt;/p&gt;
&lt;p&gt;Is it correct way? to preserve data after dfu?&lt;/p&gt;
&lt;p&gt;Waiting for your response...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fds is not working in buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/226935?ContentTypeID=1</link><pubDate>Fri, 27 Dec 2019 13:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db967088-f18c-4908-994a-1ea976055ec4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;FDS is initialized by the peer manager&amp;nbsp;so you should avoid initializing it twice. Also, all FDS users should be registered before FDS init. So ,&amp;nbsp;fds_test_init() should be called before pm_init(), and it should not call fds_init().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>