<?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>Flash write issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66110/flash-write-issue</link><description>Hello, 
 nRF52840, SDk16.0, Softdevice 7.0.1, 
 I am having the following flash write error message while writing data to flash. I&amp;#39;m using FDS library. Interestingly this happens only on a particular hardware. There are other boards with same chipset</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Sep 2020 14:55:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66110/flash-write-issue" /><item><title>RE: Flash write issue</title><link>https://devzone.nordicsemi.com/thread/270904?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 14:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8417e681-73e9-48d0-b3ad-61b6f0d6a49d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Looks like there should be plenty of space in the FDS area to store 22 bytes. Can you debug the application and check the content of the parameters passed to&amp;nbsp;addr_is_within_bounds (dest, len), then you get the error?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash write issue</title><link>https://devzone.nordicsemi.com/thread/270535?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2020 10:03:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db478ce8-966f-4596-a773-e36eda9ccc77</guid><dc:creator>Aftab</dc:creator><description>&lt;p&gt;The error prompts in response to following commands:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rc = fds_record_update(&amp;amp;desc, &amp;amp;scr_dummy_record);
APP_ERROR_CHECK(rc);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;fds_stat() give:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Event: FDS_EVT_INIT received (FDS_SUCCESS)
00&amp;gt; &amp;lt;info&amp;gt; app: Running garbage collector...
00&amp;gt; &amp;lt;info&amp;gt; app: Event: FDS_EVT_GC received (FDS_SUCCESS)
00&amp;gt; &amp;lt;info&amp;gt; app: Garbage collection complete
00&amp;gt; &amp;lt;info&amp;gt; app: Reading flash usage statistics...
00&amp;gt; &amp;lt;info&amp;gt; app: Found 5 valid records.
00&amp;gt; &amp;lt;info&amp;gt; app: Found 0 dirty records (ready to be garbage collected).&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Garbage collection is done here in the &lt;strong&gt;pm_evt_handler&lt;/strong&gt; in&lt;strong&gt; main.c&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;case PM_EVT_STORAGE_FULL:
        {
            // Run garbage collection on the flash.
            err_code = fds_gc();
            if (err_code == FDS_ERR_NO_SPACE_IN_QUEUES)
            {
                // Retry.
            }
            else
            {
                APP_ERROR_CHECK(err_code);
            }
        } break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Flash dump:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3630.flash.hex"&gt;devzone.nordicsemi.com/.../3630.flash.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash write issue</title><link>https://devzone.nordicsemi.com/thread/270429?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2020 17:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9097d948-bf09-445c-b320-78b275670301</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is the write/update completed successfully, or is there any errors reported from the FDS function call?&lt;/p&gt;
&lt;p&gt;Could be that the FDS area is full, preventing you from storing more data to flash. What values do you get if you call&amp;nbsp;&lt;a title="fds_stat" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__fds.html?cp=7_1_6_10_18_31#ga5d3f04e9755408293408be377f7eeaf9"&gt;fds_stat&lt;/a&gt;()?&lt;/p&gt;
&lt;p&gt;Are you running garbage collection somewhere in your application?&lt;/p&gt;
&lt;p&gt;Can you provide a dump of the flash? You can do that using &amp;quot;nrfjprog --readcode flash.hex&amp;quot; command.&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>