<?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>wear leveling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65700/wear-leveling</link><description>Nordic nRF52840, with regards to stored security keys in flash, some wear leveling schemes move data when being updated but do not erase data from the old location. This is an issue when going through the FIPS 140-2 certification. Can you comment in this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Sep 2020 13:35:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65700/wear-leveling" /><item><title>RE: wear leveling</title><link>https://devzone.nordicsemi.com/thread/268776?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 13:35:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a215add4-0586-4a5c-95ed-bcc26518f342</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If you use the FDS module to store data, then you are right that when updating stored data in flash, it will simply write new data to a free location in the available flash pages reserved for FDS, without deleting or erasing previous data (it&amp;#39;s only marked as &amp;quot;invalid&amp;quot;). The reason for this is to reduce the wear on the flash, e.g. flash retention is 10.000 flash erase operations if I remember correctly, in addition flash erase operations take time, so for most applications you want to reduce the amount of flash operations. If this is a problem there are basically two options:&lt;/p&gt;
&lt;p&gt;- run the fds_gc() each time you update the data in question, because running garbage collection this will &amp;quot;clean up&amp;quot; flash pages to erase data that is no longer valid, note that this will trigger multiple flash erase operations depending on the number of flash pages that are reserved for the FDS.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;p&gt;- don&amp;#39;t use the FDS module, but instead use the flash api directly to store data raw in a flash page.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>