<?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>Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44376/fstorage-issue-without-softdevice</link><description>Hi all, 
 I have an issue when trying to use the fstorage without the SoftDevice. The documentation explains that it is possible to use the FStorage without SoftDevice if the NVMC api backend is used, that is what I do. I have no issue when reading data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Mar 2019 12:51:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44376/fstorage-issue-without-softdevice" /><item><title>RE: Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/thread/174249?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 12:51:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:beb0d746-b086-4516-9cb9-e6fa56e4daaf</guid><dc:creator>raphael_gsa</dc:creator><description>&lt;p&gt;Thanks Einar and awneil,&lt;/p&gt;
&lt;p&gt;It is working now thanks to the page erasing before any new writing operation.&lt;br /&gt;Thanks a lot for the very detailed explanations.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/thread/174239?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 12:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386de77c-4a78-48ad-bb20-bbaba0c43ebb</guid><dc:creator>awneil</dc:creator><description>[quote userid="76201" url="~/f/nordic-q-a/44376/fstorage-issue-without-softdevice/174184"]the concerned page must be erased before being written again[/quote]
&lt;p&gt;Yes, that&amp;#39;s basically [1] correct.&lt;/p&gt;
&lt;p&gt;The ability to &lt;em&gt;&lt;strong&gt;update&lt;/strong&gt; &lt;/em&gt;records is one of the things that FDS adds for you:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44183/including-flash-storage-library-into-another-ble-example/173253#173253"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/44183/including-flash-storage-library-into-another-ble-example/173253#173253&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[1]&lt;/strong&gt; To be more precise, it is a feature of &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt; &lt;/em&gt;Flash memory that &amp;#39;1&amp;#39; is the erased state of a bit. You can only &lt;em&gt;write&lt;/em&gt;&amp;nbsp;(or &amp;quot;program&amp;quot;) bits from a &amp;#39;1&amp;#39; to a &amp;#39;0&amp;#39;; to get from a &amp;#39;0&amp;#39; to a &amp;#39;1&amp;#39; requires an erase operation.&lt;/p&gt;
&lt;p&gt;So you &lt;em&gt;&lt;strong&gt;can&lt;/strong&gt; &lt;/em&gt;write a page more than once;&amp;nbsp; but you can only change bits from &amp;#39;1&amp;#39; to &amp;#39;0&amp;#39; - any bits that have already been written to &amp;#39;0&amp;#39; cannot be set back to &amp;#39;1&amp;#39; without an erase.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/thread/174227?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 11:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5cda0cd-3e3f-4e98-9466-2e6632a0ccd1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This should be OK, but we have only seen snippets and not the full flow of your application. Can you make a minimal example that demonstrate this issue? If not, an alternative for sharing your code could be to create a private support case and refer to this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/thread/174184?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 09:17:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18fb351f-eb66-4764-a014-56a9d5a36adf</guid><dc:creator>raphael_gsa</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for your answer, here is the implementation of the vWaitForFlashReady( ) function :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * @brief Wait for events while flash storage is busy.
 *
 * @param p_fstorage Pointer to the fstorage instance to wait for.
 */
static void vWaitForFlashReady(nrf_fstorage_t const * p_fstorage)
{
    /* While fstorage is busy, sleep and wait for an event. */
    while (nrf_fstorage_is_busy(p_fstorage))
    {
        __WFE();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I prefer not to share the entire project at the moment as it is a strategic project for my company. However, after some more research and tests, I found out that when using the NVMC api backend, the concerned page must be erased before being written again. When doing so, it works pretty well. Can you confirm ? If so, is it also needed when using the SD api backend in combination with the SoftDevice ?&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/thread/174174?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 08:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46ad857a-090f-446a-a08e-426e0f3f80a0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you show us the implementation of your&amp;nbsp;vWaitForFlashReady() function? (Or even better, upload your whole project so that I can test on my side). Which SDK are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fstorage issue without SoftDevice</title><link>https://devzone.nordicsemi.com/thread/174055?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 15:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55386947-e36b-4617-a70d-89728af99cd3</guid><dc:creator>raphael_gsa</dc:creator><description>&lt;p&gt;&lt;span&gt;After a lot of identical tries, it sometimes write the data... I don&amp;#39;t understand such a weird&amp;nbsp;behavior.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>