<?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 size for particular amount of data:</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96584/fds-size-for-particular-amount-of-data</link><description>Hello, 
 I want to store 18 * 200 bytes of data in flash. I am using fds for storing the data. 18*200 comes around 3600 byes. 
 FDS_VIRTUAL_PAGE_SIZE = 2048 
 FDS_VIRTUAL_PAGES = 3. 
 Is it the right configuration i.e. one page for garbage collection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Feb 2023 17:13:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96584/fds-size-for-particular-amount-of-data" /><item><title>RE: FDS size for particular amount of data:</title><link>https://devzone.nordicsemi.com/thread/409688?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 17:13:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87ae1eb3-7f4a-4507-ad47-224a53cd2a48</guid><dc:creator>ChinmayDixit97</dc:creator><description>&lt;p&gt;Hey Jorgen,&lt;/p&gt;
&lt;p&gt;Thanks for the detailed and prompt reply. I will make the changes according to your suggestion.&lt;/p&gt;
&lt;p&gt;Thanks a lot. Closing this ticket.&lt;/p&gt;
&lt;p&gt;Chinmay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS size for particular amount of data:</title><link>https://devzone.nordicsemi.com/thread/409515?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 09:24:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fe0a090-1d42-4ef1-b602-aa5d323e423a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The virtual page size is in number of words (32-bits). With 3 virtual pages of 2048 words, you can store up to 2*(FDS_VIRTUAL_PAGE_SIZE-PAGE_TAG) words = 2*(2048-2) words =&amp;nbsp;4088 words =&amp;nbsp;16352 bytes.&lt;/p&gt;
&lt;p&gt;Note that each record requires a&amp;nbsp;&lt;a title="Record header" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_fds_format.html?cp=9_1_3_16_2_0_0#lib_fds_format_header"&gt;Record header&lt;/a&gt;, which takes up 3 words (12 bytes). This means that each of your records will take 212 bytes, and you can store up to 77 of these records. Note that a record cannot be split between two virtual pages, so you are limited to 38 records of this size on each virtual page. If your data is not static, but you intend to update it occasionally, it is good to have room for more records than you are planning to store. When you update a record in FDS, it will write a new record and invalidate the old one until you run garbage collection. This limits the number of flash page erase operations you need to perform. If you have space for few extra record writes/updates, you will have to perform garbage collection more often in order to free space for new writes, which will wear down flash faster.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>