<?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>how to erase fds previous data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56856/how-to-erase-fds-previous-data</link><description>i have done read and write operations on fds with dummy buffer. now when im writing new data into fds it is showing the previous data .can anyone give the function to erase the fds of previous data.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 26 Jan 2020 04:11:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56856/how-to-erase-fds-previous-data" /><item><title>RE: how to erase fds previous data</title><link>https://devzone.nordicsemi.com/thread/230986?ContentTypeID=1</link><pubDate>Sun, 26 Jan 2020 04:11:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:daa54b37-d277-4086-bd14-7dd81f432cd5</guid><dc:creator>Ameer Usman</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/manoj97"&gt;manoj97&lt;/a&gt; Did it happen to solve the issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase fds previous data</title><link>https://devzone.nordicsemi.com/thread/230369?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 13:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f79de5a4-51f4-4d6b-a3bf-da2f89d2d3a3</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;fds_gc (garbage collection) reclaims the flash space that is occupied by records that have been deleted, or that failed to be completely written due to, I.E., a power loss. So, in order to get rid of old records and make space for new ones, you have to first delete the records you don&amp;#39;t want/need anymore by using fds_record_delete or fds_file_delete and then run a garbage collection with fds_gc to free them before you can write to these records again.&lt;/p&gt;
&lt;p&gt;These commands should all be very well described in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__fds.html"&gt;Flash Data Storage documentation&lt;/a&gt; on the Infocenter, as well as in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/fds_example.html"&gt;fds example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase fds previous data</title><link>https://devzone.nordicsemi.com/thread/230356?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 13:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86e5c38d-6ba7-401d-a8d2-52f14307e18a</guid><dc:creator>Ameer Usman</dc:creator><description>&lt;p&gt;So actually the fds writes but does not exactly clear out the previous data and at one point unless the fds_gc() function is used it does not write new data and halts at app_error_check.&lt;br /&gt;&lt;br /&gt;What I did was that if I got error 0x07 at app error check upon fds write, I would call the fds_gc() function. You can even check the amount of garbage collection and clear it at your will too.&lt;br /&gt;&lt;br /&gt;so the trick is to use this function!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase fds previous data</title><link>https://devzone.nordicsemi.com/thread/230312?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 11:35:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9a40452-8f73-4440-ab98-7bcbc446fb2f</guid><dc:creator>manoj97</dc:creator><description>&lt;p&gt;yes im using generic FDS library can you explain in detail.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to erase fds previous data</title><link>https://devzone.nordicsemi.com/thread/230308?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 11:16:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0ea80f9-d5ff-432d-acac-438cd797f2a0</guid><dc:creator>Ameer Usman</dc:creator><description>&lt;p&gt;Are you using the generic FDS library? If yes then it could be the fds needs a garbage collection&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;fds_gc();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The fds does not automatically delete previous records you have to perform garbage collection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>