<?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>What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26382/what-is-the-real-nrf52840-max-writes-to-a-flash-block</link><description>The nRF52840 OPS 0.5.1, describes nWRITE,BLOCK as the amount of writes allowed in a block between erases, and lists nWRITE,BLOCK = 403 Maximum. 
 It looks like 8 blocks are in a 4 kB page, so each block is 512 Bytes. 
 Does this mean that only 403 of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Nov 2019 18:05:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26382/what-is-the-real-nrf52840-max-writes-to-a-flash-block" /><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/219152?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 18:05:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66c9da1d-cbac-4892-8153-77a43a5109ec</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;It’s out-of-scope, so the behavior is not defined. But I believe that it could potentially happen at both write time and volatility.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/218681?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 21:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b33949dc-030d-492a-b5f0-ed663078aab3</guid><dc:creator>eleven-x_devteam</dc:creator><description>&lt;p&gt;Hello, looking to revive this older thread instead of starting a new thread since my question directly builds off this response. We are finding this limit to be quite restrictive when trying to use status bits or keep any type of count going before requiring a full page erase for a single bit changing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When you say &amp;quot;bits will eventually start flipping inadvertently&amp;quot; does this mean during write time or volatilely? If bits only flipped at write time then this issue could be navigated easier by doing a sanity check after every write beyond the 2nd. Whereas if the bits could volatilely change at any indeterminate time after a write beyond the 2nd, this would make it considerably more difficult to do a sanity check on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you. &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103823?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 10:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1b5c3db-a30c-4ea4-9d5a-7c4666fe6047</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;No, nRF52832 uses a different flash, and you will here be limited by &lt;code&gt;nWRITE,BLOCK&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103824?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2017 16:52:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c278a77a-b0b1-4d53-b285-784b30c8d7b1</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;Hi Sigurd, is there a limit to how many times you can write to a single address for the nRF52832 like there is for the nRF52840?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103819?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2017 08:15:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0f1632b-8e9b-42af-9225-cc814aaa60f5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;For nRF52832, nWRITE,BLOCK is specified as &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/nvmc.html?cp=2_1_0_10_7_0#unique_156661312"&gt;181&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The reason why we have a &lt;code&gt;nWRITE,BLOCK&lt;/code&gt; limit is because flash memory is made up of floating-gate transistors, where each bit is stored as a charge on an isolated floating gate of a transistor. Writing to a block may affect all charges inside that block, which means bits will eventually start flipping inadvertently. The restriction of &lt;code&gt;nWRITE,BLOCK&lt;/code&gt; writes within the block ensures safe operation. The full block becomes &amp;quot;fresh&amp;quot; again on erase, at which point the write counter is reset to &lt;code&gt;nWRITE,BLOCK&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103822?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 19:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f554f13-bc40-43e0-b4fc-d7b80bd084f4</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;That is interesting. Looking at the spec for nRF52832, I don&amp;#39;t see such a limitation (nWRITE). But for the nRF52840, there is the nWRITE limitation. You are right. I can&amp;#39;t think of a situation either where you would exceed nWRITEBLOCK without exceeding nWRITE. I wonder if nRF52832 has such a limitation too, but they did not mention it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103821?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 19:11:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baead392-0d43-48b0-9d05-501cb7156ec8</guid><dc:creator>kermit the fog</dc:creator><description>&lt;p&gt;There&amp;#39;s a spec for nWRITE that applies to a single address.  For the nRF52840, nWRITE is 2.  I think that means you can write a single address 2 times max.  So I don&amp;#39;t think there is any way to exceed nWRITE, BLOCK without first exceeding nWRITE.&lt;/p&gt;
&lt;p&gt;When I first posted the question I forgot that all flash writes had to be 32 bit.  Now that I understand that, I can&amp;#39;t find a way to exceed nWRITE, BLOCK without surpassing the max number of writes for a single address first.&lt;/p&gt;
&lt;p&gt;Yes, writing to the flash only clears bits.  But this is still helpful for keeping non-volatile counters.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103820?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 18:13:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6524776-e270-4092-b36e-38651101e5d9</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;Keep in mind you cannot change a bit back from &amp;#39;0&amp;#39; to a &amp;#39;1&amp;#39;. So really an address can only be modified 32 times after that it becomes useless since you&amp;#39;ve modified all of the bits.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103818?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 17:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ff5da0e-3fde-4aee-9d35-5e4fbb077033</guid><dc:creator>kermit the fog</dc:creator><description>&lt;p&gt;Ah, the NVMC only supports 32 bit write operations, so it takes 128 write operations to write the entire 512 byte block.  That leaves 275 additional writes available to overwrite individual addresses within that block.&lt;/p&gt;
&lt;p&gt;So the entire block can be written without violating the nWRITE, BLOCK spec.  And there are enough additional writes to allow the entire block to be overwritten a second time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What is the real nRF52840 max writes to a flash block?</title><link>https://devzone.nordicsemi.com/thread/103817?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 16:38:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1363500-4324-42e0-afb0-54d27fe4870c</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;This is what I think:&lt;/p&gt;
&lt;p&gt;It means you can write to addresses in a block 403 times before the page that block is in has to be erased. Each write operation is a 32 bit word write operation. You can perform this write operation to addresses in a single block 403 times. So for an example, let’s talk about writing to a single block (Block1). You write to address1 in block1. This is one operation. You write to address2 in block1. Now you’ve written to the block 2 times. You write again to address1 in block1. Now you’ve written to block1 3 times. You can keep on doing this until you’ve written to a block 403 times without erasing it.&lt;/p&gt;
&lt;p&gt;Note, this is just a physical limitation. There is nothing actually (in software) stopping you from writing more than 403 times. It is just that after 403 times you can get undesirable results. The 403 number only becomes a problem if you are writing to an entire block 1 bit at a time or something of that nature. Maybe a Nordic employee can confirm what I wrote.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>