<?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 write IMU data to flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96480/how-to-write-imu-data-to-flash</link><description>Hello, 
 
 I was wanting to record IMU data through the LSM6DS3 6-axis motion detector on the Seeed XIAO nRF52840. 
 I know that the flash has a limit of 100,000 writes, but that will not be an issue for the data I will be handling. 
 Is there a simple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Feb 2023 18:37:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96480/how-to-write-imu-data-to-flash" /><item><title>RE: How to write IMU data to flash</title><link>https://devzone.nordicsemi.com/thread/411778?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 18:37:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d86a927a-20f3-4271-aad9-764ffcd7ab66</guid><dc:creator>wellmacj</dc:creator><description>&lt;p&gt;thank you for your insight edvin!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write IMU data to flash</title><link>https://devzone.nordicsemi.com/thread/409126?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 11:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a25b83d6-ffa0-4766-b65c-1308c142fc16</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This looks like an Arduino board (and you also say that you are using Arduino IDE). If that is the case, then I am sorry to say that I don&amp;#39;t know how either the sensor or flash writing will work. You need to reach out either to Arduino or an Arduino forum, as this is not something that we either provide, support, or have particular knowledge in.&lt;/p&gt;
&lt;p&gt;That being said,&amp;nbsp;&lt;/p&gt;
[quote user=""]I know that the flash has a limit of 100,000 writes,[/quote]
&lt;p&gt;That is partially true. The flash on the nRF52840 has a 10.000 (not 100.000) write erase cycles, as stated here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/abs_max_ratings.html?cp=5_0_0_8"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/abs_max_ratings.html?cp=5_0_0_8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is not a hard limit. It doesn&amp;#39;t mean that on the 10 001st write you will be denied, or it will not work. This number is based on a test where let us say that 99.9% of the devices were not failing at 10k cycles. It may also mean that 99.8% survived 20k cycles with no errors. (these numbers are made up. I don&amp;#39;t have the actual results). Temperature also plays a huge role in these tests. A device running at 80 degrees celcius will on average fail faster than a device at room temperature.&lt;/p&gt;
&lt;p&gt;In addition, the write cycles are write -&amp;gt; erase. So if you do not need to erase the flash, you don&amp;#39;t need to use a cycle. A flash address can only be written to once between each erase, and when you erase, you need to erase an entire flash page (not just a single address). So usually, you would use a flash storage system that handles flash wear (uses all the addresses, marks flash records as dirty or valid, and first when the entire flash is used up, it will trigger an erase on the old pages. Then you have one cycle. How flash management is handled in Arduino, I have no idea. You need to look it up in the Arduino documentation/forum.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>