<?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 max number of writing ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51349/flash-max-number-of-writing</link><description>Hello ! 
 I have read in DevZone, but still not sure regarding nRF52832 . 
 For nRF52832 and page size 4k, and regarding only writing zero-bits. 
 Can I in same page perform total 6144 number of 32-bits writings (6 times each 32-bit address) without erase</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Aug 2019 13:21:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51349/flash-max-number-of-writing" /><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205912?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 13:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f8b8651-1767-40a0-a2cd-3f90a35b3a01</guid><dc:creator>Lennart</dc:creator><description>&lt;p&gt;Ok I see, it will recover on an erase, but until erase it does not work anymore however.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205859?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 11:11:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c76f47d-5cc8-420d-84dc-24800f5e50fe</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Ah - what &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&amp;nbsp; writes &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/26382/what-is-the-real-nrf52840-max-writes-to-a-flash-block/103819#103819" rel="noopener noreferrer" target="_blank"&gt;there&lt;/a&gt; is about losing the stored value, rather than wear of the sells.&lt;/p&gt;
&lt;p&gt;So that&amp;#39;s a different limitation - but, yes, that does mean that you do also have a limited number of writes between erases.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205855?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 10:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:343cc695-7617-44b2-8147-80f5bad18d1c</guid><dc:creator>Lennart</dc:creator><description>&lt;p&gt;Ok, but this is not what foks write in this tread&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/26382/what-is-the-real-nrf52840-max-writes-to-a-flash-block"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/26382/what-is-the-real-nrf52840-max-writes-to-a-flash-block&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They write some limitation of total 403 write-operation for the nRF52840 in some context.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And in Nordic PS document it say &amp;quot; &lt;span class="fontstyle0"&gt;The same block in flash can only be written &lt;/span&gt;&lt;span class="fontstyle0"&gt;n&lt;/span&gt;&lt;span class="fontstyle0"&gt;WRITE &lt;/span&gt;&lt;span class="fontstyle0"&gt;number of times before an erase&amp;nbsp;must be performed using &lt;/span&gt;&lt;span class="fontstyle0"&gt;ERASEPAGE &lt;/span&gt;&lt;span class="fontstyle0"&gt;or &lt;/span&gt;&lt;span class="fontstyle0"&gt;ERASEALL&lt;/span&gt;&lt;span class="fontstyle0"&gt;.&lt;/span&gt; &lt;br /&gt; &amp;quot;&lt;/p&gt;
&lt;p&gt;So what does that mean ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205852?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 10:47:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da526a57-fe8c-46ee-93fa-8ae509917911</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Again, it&amp;#39;s the Erase which causes the wear - not the writing of ones to zeros.&lt;/p&gt;
&lt;p&gt;But you can only ever write any one bit from &amp;#39;1&amp;#39; to &amp;#39;0&amp;#39; once - so it is still the same number as the number of erase cycles!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205843?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 10:31:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10d84dc-7f90-49fb-be47-26aa8b711205</guid><dc:creator>Lennart</dc:creator><description>&lt;p&gt;I see I&amp;#39;m not really clear in my question, because most of answers aim &amp;quot;you cannot write 1&amp;quot;. I know that&amp;#39;s for all flash. And I do not aim writing &amp;#39;1&amp;#39;. But I have read that also writing zero-bits has some kind of limitations for writing-operations, or can I write one single zero-bit each time by 32768 write-operation to fill the 4k with zeros ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I aim perform similar as following for a 4k page without erase:&lt;/p&gt;
&lt;p&gt;1. Writing a 14-bit value (bit 0 to 13 ) into each 32-bit address, leaving&amp;nbsp;all other 18 bits unmodified.&amp;nbsp; I.e. 1024 write operations.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Writing a 14-bit value (bit 16 to 29 ) into each 32-bit address, leaving&amp;nbsp;all other 18 bits unmodified.&amp;nbsp; I.e. 1024 write operations.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3. Writing a zero into bit 14 for each&amp;nbsp;&lt;span&gt;32-bit address leaving all other 31 bits unmodified.&amp;nbsp;&amp;nbsp;1024 write operations.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4. Writing a zero into bit 15 for each&amp;nbsp;&lt;/span&gt;&lt;span&gt;32-bit address leaving all other 31 bits unmodified.&amp;nbsp;&amp;nbsp;1024 write operations.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5. Writing a zero into bit 30 for each&amp;nbsp;32-bit address leaving all other 31 bits unmodified.&amp;nbsp;&amp;nbsp;1024 write operations.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;6. Writing a zero into bit 31 for each&amp;nbsp;32-bit address leaving all other 31 bits unmodified.&amp;nbsp;&amp;nbsp;1024 write operations.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In total it is&amp;nbsp;6144 write-operating, writing one or several zero-bits into the page. (and I correct, it is actually 6 write-operations in each 32-bit address)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I need to have this confirmed by Nordic (e.g. Torbj&amp;oslash;rn &amp;Oslash;vrebekk) , or we might have an issue later (too late).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards Lennart Vedin for tss.se&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205802?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 08:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a61807f2-6710-4907-951e-8fe73ae5fea0</guid><dc:creator>awneil</dc:creator><description>[quote userid="6207" url="~/f/nordic-q-a/51349/flash-max-number-of-writing/205790"]In the Flash we use, after the flash is erased, all bits in the flash are set to &amp;#39;1&amp;#39;.[/quote]
&lt;p&gt;That&amp;#39;s universal to all flash used by all microcontrollers - not just Nordic.&lt;/p&gt;
[quote userid="6207" url="~/f/nordic-q-a/51349/flash-max-number-of-writing/205790"]When you write something to the flash memory address, the data is stored by writing 0&amp;#39;s of that data to the given flash memory address but the 1&amp;#39;s are not toggled[/quote]
&lt;p&gt;Indeed.&lt;/p&gt;
[quote userid="6207" url="~/f/nordic-q-a/51349/flash-max-number-of-writing/205790"]this would mean that you could only write once to a memory address in flash before you need to erase the whole page again[/quote]
&lt;p&gt;Not &lt;em&gt;quite&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You &lt;em&gt;&lt;strong&gt;can&lt;/strong&gt; &lt;/em&gt;write again to the same location,&amp;nbsp; but &lt;em&gt;only to change more ones to zeros&lt;/em&gt;&amp;nbsp;- you cannot write zeros back to ones.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Back at the pencil-and-paper analogy, it&amp;#39;s like you can change a &amp;#39;&lt;strong&gt;P&lt;/strong&gt;&amp;#39; to an &amp;#39;&lt;strong&gt;R&lt;/strong&gt;&amp;#39; - by just adding the extra stroke - but you cannot change the &amp;#39;&lt;strong&gt;R&lt;/strong&gt;&amp;#39; to a &amp;#39;&lt;strong&gt;P&lt;/strong&gt;&amp;#39; without erasing.&lt;/p&gt;
&lt;p&gt;This can be useful, for example, in having a bitmap to show you which addresses in Flash are &amp;quot;dirty&amp;quot; - you just clear another bit each time another address is used.&lt;/p&gt;
[quote userid="6207" url="~/f/nordic-q-a/51349/flash-max-number-of-writing/205790"]That is the reason flash endurance is given only in erase cycles[/quote]
&lt;p&gt;Indeed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205793?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 08:34:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:139d1f7d-499a-4d80-baa2-2a6acfee61d8</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;This is a general feature of Flash memory - not specific to Nordic.&lt;/p&gt;
&lt;p&gt;It is the erasing which causes the wear - not the writing of zeros.&lt;/p&gt;
&lt;p&gt;See the pencil-and-paper analogy here:&amp;nbsp;&lt;a href="https://www.violinsystems.com/all-flash-storage/how-flash-storage-works/"&gt;https://www.violinsystems.com/all-flash-storage/how-flash-storage-works/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The way so-called &lt;em&gt;wear-levelling&lt;/em&gt; schemes work is to write to different locations in the page, and only do an erase when the whole page has been used up.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Wear_leveling"&gt;https://en.wikipedia.org/wiki/Wear_leveling&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the Nordic SDK, FDS manages this for&amp;nbsp; &amp;nbsp;you:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_fds.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash max number of writing ?</title><link>https://devzone.nordicsemi.com/thread/205790?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 08:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21c9ef5a-16f9-4e28-93df-70f1bee8e7ce</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;In the Flash we use, after the flash is erased, all bits in the flash are set to &amp;#39;1&amp;#39;.&lt;/p&gt;
&lt;p&gt;When you write something to the flash memory address, the data is stored by writing 0&amp;#39;s of that data to the given flash memory address but the 1&amp;#39;s are not toggled. So this would mean that you could only write once to a memory address in flash before you need to erase the whole page again. So you cannot write 6144 words at different times to a 4092 bytes (1023 words) page without any erase operations done.&lt;/p&gt;
&lt;p&gt;That is the reason flash endurance is given only in erase cycles and not so much in write cycles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>