<?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 delete multiple records</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25064/fds-delete-multiple-records</link><description>I call the following function to delete old FDS records before I write a new record. It works well if I have only one old record. But when there are multiple records, it stops the application. RTT viewer shows it has gone through fds_record_delete() for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Sep 2017 10:20:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25064/fds-delete-multiple-records" /><item><title>RE: FDS delete multiple records</title><link>https://devzone.nordicsemi.com/thread/98696?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2017 10:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33f35999-fb01-43f8-a9f5-51374cc89e49</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Usually 4 is fine. The larger the number, the more RAM has to be reserved.&lt;/p&gt;
&lt;p&gt;The limit is 2^32, and in practice this will never be reached.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS delete multiple records</title><link>https://devzone.nordicsemi.com/thread/98695?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2017 05:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89d26beb-c68c-4eab-a5ca-08ad63e1f96f</guid><dc:creator>xhr0428</dc:creator><description>&lt;p&gt;I increased FDS_OP_QUEUE_SIZE and the error is gone now. Why is this number set to 4 by default? Is there any problem setting this a large number?&lt;/p&gt;
&lt;p&gt;Could you also answer the other question of mine? I see record ID counts up every time I write a new one. The old ID is not reused even the record is deleted. Is there an up limit for the count? What will happen if it counts to the limit?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS delete multiple records</title><link>https://devzone.nordicsemi.com/thread/98697?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2017 07:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a02c955b-186c-445b-92ab-059e09b15550</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you look at the documentation for fds_record_delete() you can see that 0x00000008 is FDS_ERR_NO_SPACE_IN_QUEUES - If the operation queue is full.&lt;/p&gt;
&lt;p&gt;You can try to call it at a later point in time (or wait for a FDS_EVT_DEL_RECORD event), or you can try to increase FDS_OP_QUEUE_SIZE and/or FDS_CHUNK_QUEUE_SIZE. See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/lib_fds_functionality.html?cp=4_0_3_3_37_0_3#lib_fds_functionality_cfg"&gt;this&lt;/a&gt; for more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS delete multiple records</title><link>https://devzone.nordicsemi.com/thread/98693?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2017 05:21:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:470bfcf4-329e-4978-aa95-95ccbb63ddee</guid><dc:creator>xhr0428</dc:creator><description>&lt;p&gt;Changing &lt;code&gt;fds_record_delete(&amp;amp;record_desc);&lt;/code&gt; to &lt;code&gt;uint32_t err_code = fds_record_delete(&amp;amp;record_desc); APP_ERROR_CHECK(err_code);&lt;/code&gt; triggers app_error_fault_handler() now. Error code is 8.&lt;/p&gt;
&lt;p&gt;Another thing I noticed is if there are more than 4 records, fatal error always appears after 4 records. The first 4 records return error code 0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FDS delete multiple records</title><link>https://devzone.nordicsemi.com/thread/98694?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2017 09:22:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8f05057-865a-41f1-8d3c-0887c45ed018</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You should check that the returned error code of fds_record_delete() is actually FDS_SUCCESS (0x00000000), to be sure that the call is actually accepted.&lt;/p&gt;
&lt;p&gt;You cannot be sure that the record is deleted until the FDS_EVT_DEL_RECORD event is received.&lt;/p&gt;
&lt;p&gt;Fatal must be printed from somewhere. Are you sure app_error_fault_handler() is not called? Try to define DEBUG, and put a breakpoint in app_error_handler()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>