<?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 manage the data integrity using Settings API when erase/write cycle value is reached?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114636/how-to-manage-the-data-integrity-using-settings-api-when-erase-write-cycle-value-is-reached</link><description>In our current development we are using NRF52840DK and the external memory MX 25R6435F. We are using Settings API to store some configurations on the external memory partition to persist the values (1MB for settings). As per the data sheet of MX25R6435F</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Sep 2024 08:14:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114636/how-to-manage-the-data-integrity-using-settings-api-when-erase-write-cycle-value-is-reached" /><item><title>RE: How to manage the data integrity using Settings API when erase/write cycle value is reached?</title><link>https://devzone.nordicsemi.com/thread/502240?ContentTypeID=1</link><pubDate>Thu, 12 Sep 2024 08:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4460cb6-02b9-4e3d-9b97-344410022298</guid><dc:creator>Elfving</dc:creator><description>[quote user="Amudhan R"]&lt;p&gt;This is a big concern for our project because we need to persist the device total power-on time. This will be a key factor to replace the device after some years let&amp;#39;s say 6 years of power on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Could yuo expand a bit more on the use-case? Is the problem that at one point in the future, the device will fail, and at which point you want to retrieve it and&amp;nbsp;figure out how long it has been online? And this accuracy&amp;nbsp;needs to be within 60-30 seconds?&lt;/p&gt;
&lt;p&gt;You could buffer more in the application between each time you write to flash.&lt;/p&gt;
[quote user="Amudhan R"]I am not seeing any documentation on to move the setting partitions dynamically to different location during boot or on the fly.&amp;nbsp;[/quote]
&lt;p&gt;I suspect that we do not have any samples or documentation for this exact scenario, but that should work. Though this is essentially what FCB would do as well.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to manage the data integrity using Settings API when erase/write cycle value is reached?</title><link>https://devzone.nordicsemi.com/thread/502193?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2024 20:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:071f6ca5-f220-4e00-8eb8-8eca2eb6c37c</guid><dc:creator>Amudhan R</dc:creator><description>&lt;p&gt;So far from the pages you shared, I understood that the data integrity is handled by Settings/NVS and not to worry about the write/erase cycle.&lt;/p&gt;
&lt;p&gt;This is a big concern for our project because we need to persist the device total power-on time. This will be a key factor to replace the device after some years let&amp;#39;s say 6 years of power on.&lt;/p&gt;
&lt;p&gt;I thought of creating multiple partitions (lets say 4 partitions) each have 1 MB on the External flash and dynamically move the Settings partition to next partition once it reached the write/erase cycles (100,000 times).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am not seeing any documentation on to move the setting partitions dynamically to different location during boot or on the fly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to manage the data integrity using Settings API when erase/write cycle value is reached?</title><link>https://devzone.nordicsemi.com/thread/502153?ContentTypeID=1</link><pubDate>Wed, 11 Sep 2024 13:35:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c0f6309-7293-4dac-bf58-65519221e2f5</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First of all, &lt;a href="https://devzone.nordicsemi.com/support-private/support/285479#permalink=740718"&gt;what I mentioned in this previous case might be interesting to you&lt;/a&gt;. As well as &lt;a href="https://devzone.nordicsemi.com/support-private/support/242809#permalink=528734"&gt;this&amp;nbsp;case which I just found&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.1.3/page/zephyr/services/settings/index.html"&gt;settings API&lt;/a&gt; uses &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.1.3/page/zephyr/services/storage/nvs/nvs.html#nvs-api"&gt;NVS&lt;/a&gt; by default.&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;span&gt;Is the Settings API capable of moving the data locations once it is become bad or reached the erase/write cycles reached?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;What you describe here is what I would say is one of the main features of &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.1.3/page/zephyr/services/storage/fcb/fcb.html"&gt;Flash circular buffer (FCB),&lt;/a&gt;&amp;nbsp;even though it doesn&amp;#39;t move when an area has gone bad per se, it just spreads out the wear.&amp;nbsp;Though as you can see there in the docs, NVS is recommended. I&amp;#39;ll look into why that is.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>