<?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 writes while performing garbage collection.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45706/fds-writes-while-performing-garbage-collection</link><description>I&amp;#39;m testing this with SDK 15.2 on an NRF52832, with SD132. 
 The documentation says: &amp;quot;When the space is exhausted, write requests return the error FDS_ERR_NO_SPACE_IN_FLASH, and you must run garbage collection and wait for completion before repeating</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Apr 2019 06:44:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45706/fds-writes-while-performing-garbage-collection" /><item><title>RE: FDS writes while performing garbage collection.</title><link>https://devzone.nordicsemi.com/thread/180641?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 06:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b838484-df48-439a-a330-79371ebdb707</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;I understand. I&amp;#39;ll forward your suggestion to the developing team.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS writes while performing garbage collection.</title><link>https://devzone.nordicsemi.com/thread/180509?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 13:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea6ea880-0162-4642-bd28-6ae73c34a453</guid><dc:creator>bart</dc:creator><description>&lt;p&gt;Indeed, it returns success, while it should not, since you have to wait for GC to be done. So my suggestion is that it should return FDS_ERR_BUSY when GC is running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS writes while performing garbage collection.</title><link>https://devzone.nordicsemi.com/thread/180476?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 11:22:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b0f40f5-2fba-449c-be67-811af52fc8cb</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No, FDS_ERR_BUSY is not returned by fds_record_write(), but is returned by&amp;nbsp;record_write_data(). The latter is an internally function used by the module which is not meant to be used directly by the application. The documentation for &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/group__fds#ga0114083241dc287c7145fe113c9adc2c"&gt;fds_record_write()&lt;/a&gt;&amp;nbsp;specifies the return types as follows:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Return values&lt;/p&gt;
&lt;div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FDS_SUCCESS&lt;/td&gt;
&lt;td&gt;If the operation was queued successfully.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_NOT_INITIALIZED&lt;/td&gt;
&lt;td&gt;If the module is not initialized.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_NULL_ARG&lt;/td&gt;
&lt;td&gt;If&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;p_record&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is NULL.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_INVALID_ARG&lt;/td&gt;
&lt;td&gt;If the file ID or the record key is invalid.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_UNALIGNED_ADDR&lt;/td&gt;
&lt;td&gt;If the record data is not aligned to a 4 byte boundary.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_RECORD_TOO_LARGE&lt;/td&gt;
&lt;td&gt;If the record data exceeds the maximum length.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_NO_SPACE_IN_QUEUES&lt;/td&gt;
&lt;td&gt;If the operation queue is full or there are more record chunks than can be buffered.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FDS_ERR_NO_SPACE_IN_FLASH&lt;/td&gt;
&lt;td&gt;If there is not enough free space in flash to store the record.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note: that the return of FDS_SUCCESS does not mean that the write operation is done, but that the operation has been staged.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS writes while performing garbage collection.</title><link>https://devzone.nordicsemi.com/thread/180290?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 11:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18971752-f15c-4c47-87e2-cfe141f6caa5</guid><dc:creator>bart</dc:creator><description>&lt;p&gt;Right, so shouldn&amp;#39;t fds_record_write() return FDS_ERR_BUSY? I only have 1 FDS user, but when you have multiple, the other users don&amp;#39;t even know GC started.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS writes while performing garbage collection.</title><link>https://devzone.nordicsemi.com/thread/180039?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 13:37:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93e1ad41-a607-423f-adb6-1d1ec910dfae</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The reason that you should wait for the asynchronous function to return is because it guarantees that the garbage collection has released the memory. A program that doesn&amp;#39;t wait for the function to return could result in unexpected behavior.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>