<?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>NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11302/nvmc-timing-flash-access-blocked-during-low-latency-bt-communication</link><description>Hi, 
 my question is related to this question:
 devzone.nordicsemi.com/.../ 
 Erasing Flash pages takes a pretty long time (and the CPU is blocked during this time). For the nRF52, up to 89.7 ms (!!) are specified in the manual. 
 Considering I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Jan 2016 09:42:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11302/nvmc-timing-flash-access-blocked-during-low-latency-bt-communication" /><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42514?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2016 09:42:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bdd94ff-c3ff-4058-bbf5-971618006c21</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi Michael,&lt;/p&gt;
&lt;p&gt;I think the VERIFY_FAILED was supposed to do that, yes, but somewhere between s132 v2.0.0 alpha 4 and 7 it was removed. My guess is that it did not work as intended.&lt;/p&gt;
&lt;p&gt;For estimates on when s132 and SDK 11 will be released, I am afraid you will have to talk to your sales representative. If you do not know who is the Nordic sales representative in your region, you can send me a PM with your location so that I can find the contact details.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42513?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2016 15:13:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:267b060e-82de-4890-ba10-890dd576ca64</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;thanks for the info. Does this mean that when the Flash begins degrading (after erasing/writing for too many times), the SoftDevice will report NRF_EVT_FLASH_OPERATION_VERIFY_FAILED? This way it would be impossible to distinguish between degrading Flash and missing time slots due to radio activity.&lt;/p&gt;
&lt;p&gt;Do you have a coarse estimation/schedule when a production ready S132 (and nRF52 SDK) will be released?&lt;/p&gt;
&lt;p&gt;Thanks, Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42512?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2016 17:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4079ad63-fbfb-4fc1-a7c8-615ba78753d6</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As far as I know, the NRF_EVT_FLASH_OPERATION_VERIFY_FAILED event will not be part of the full s132 v2.0.0 release. It is seen in some of the alpha releases. For the s132 v2.0.0-alpha releases it seems it can be safely handled as if it was an NRF_EVT_FLASH_OPERATION_SUCCESS. It is no longer present in s132_nrf52_2.0.0-7.alpha.&lt;/p&gt;
&lt;p&gt;There are a couple of unsuccessful flash operations in your log, but they seem to be signaled correctly by NRF_EVT_FLASH_OPERATION_ERROR events.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42511?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 16:15:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:343560e7-63bc-4d05-8a72-032115b9ac47</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Flash dump: FFFFFFFF FFFFFFFF FFFFFFFF
Erasing flash page... OK
SYS Event 2: NRF_EVT_FLASH_OPERATION_SUCCESS
Flash dump: FFFFFFFF FFFFFFFF FFFFFFFF
Writing first word to 0x12345678... OK
SYS Event 2: NRF_EVT_FLASH_OPERATION_SUCCESS
Flash dump: 12345678 FFFFFFFF FFFFFFFF
Writing first word to 0x00000000 and second word to 0x9abcdef0... OK
SYS Event 2: NRF_EVT_FLASH_OPERATION_SUCCESS
Flash dump: 00000000 9ABCDEF0 FFFFFFFF
Erasing flash page... OK
SYS Event 3: NRF_EVT_FLASH_OPERATION_ERROR
Flash dump: 00000000 9ABCDEF0 FFFFFFFF

Flash dump: 00000000 9ABCDEF0 FFFFFFFF
Erasing flash page... OK
SYS Event 3: NRF_EVT_FLASH_OPERATION_ERROR
Flash dump: 00000000 9ABCDEF0 FFFFFFFF
Writing first word to 0x12345678... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: 00000000 9ABCDEF0 FFFFFFFF
Writing first word to 0x00000000 and second word to 0x9abcdef0... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: 00000000 9ABCDEF0 FFFFFFFF
Erasing flash page... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: FFFFFFFF FFFFFFFF FFFFFFFF

Flash dump: FFFFFFFF FFFFFFFF FFFFFFFF
Erasing flash page... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: FFFFFFFF FFFFFFFF FFFFFFFF
Writing first word to 0x12345678... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: 12345678 FFFFFFFF FFFFFFFF
Writing first word to 0x00000000 and second word to 0x9abcdef0... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: 00000000 9ABCDEF0 FFFFFFFF
Erasing flash page... OK
SYS Event 4: NRF_EVT_FLASH_OPERATION_VERIFY_FAILED
Flash dump: FFFFFFFF FFFFFFFF FFFFFFFF
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42510?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 16:12:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebe6e394-5f59-46f9-a5ed-715005ab105c</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Today, the software behaved differently. It took about 15-17 minutes until the error condition appeared (no SUCCESS messages anymore but many VERIFY_FAILED messages). It also seems to be related to some MCU state because a reset by the debugger (loading the SoftDevice vector table start offset) did not reset the error condition, I had to unplug the development kit (power cycle) and restart the debugger.
.
Concerning your question, I still get NRF_EVT_FLASH_OPERATION_ERROR messages once in a while which seem to be related to the advertising (10s interval) in background. But the NRF_EVT_FLASH_OPERATION_SUCCESS messages seem to be replaced by NRF_EVT_FLASH_OPERATION_VERIFY_FAILED messages now. I will post a short section of my log, just when the error condition starts appearing (please note that the memory dumps show correct flash updates):&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42509?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 14:44:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75a155b2-2742-49d1-a678-13122dfb3a56</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Both SDK 11 and SoftDevice s132 are still in alpha, and nRF52 is not yet fully released, so there are some areas that are not yet fully documented. I will try to find answers to these issues as well, and update my answer accordingly. When you do not get any more SUCCESS events, do you still get ERROR events and if so which ones?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42515?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 14:29:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fdbd56e-b1d5-4a80-8d4f-b2d106bcdd47</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;thanks for the reply. This explains how the NVMC interface is supposed to work (maybe you want to put that information into the official documentation). I want to point out that the high write/erase ratio is just a test scenario on a development system and will not be implemented in the official software.&lt;/p&gt;
&lt;p&gt;What I still find confusing is the NRF_EVT_FLASH_OPERATION_VERIFY_FAILED error message (both by writing words and erasing pages). Can you give some information about this error and when it is reported, and why it is reported even if a write or erase operation has been performed successfully?&lt;/p&gt;
&lt;p&gt;Further, your reply doesn&amp;#39;t explain how it comes to the error scenario when writing and erasing every second suddely fails after a minute or so. This cannot be explained with the limit of 10,000 write/erase cycles.&lt;/p&gt;
&lt;p&gt;Thanks, Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVMC timing: Flash access blocked during low latency BT communication?</title><link>https://devzone.nordicsemi.com/thread/42508?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 14:10:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdffdf14-d4dc-43ce-b456-cb7233fa33c8</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The reason for the increased flash page erase time on the nRF52 is that the flash page size is increased to 4 kB. It was 1 kB on the nRF51.&lt;/p&gt;
&lt;p&gt;The SoftDevice will try to schedule the flash operation, but it might not be able to do so. The request will result in an NRF_EVT_FLASH_OPERATION_ERROR event if the SoftDevice is unable to scedule the flash operation within a certain time-out. This is what happens when you set up advertising and try a flash operation immediately afterwards. You should be able to perform the flash operation if you continuously retry on the NRF_EVT_FLASH_OPERATION_ERROR event. Implementing your own time out on the retries (in the form of a maximum number of retries before giving up) might be a good idea to prevent infinite retries.&lt;/p&gt;
&lt;p&gt;You will not be able to perform a flash erase when scanning at 100 % duty. You may also get the NRF_EVT_FLASH_OPERATION_ERROR (because of busy SoftDevice leading to time out) directly after disabling the scanning. The same strategy as before (retrying) should work in the case of recently disabled scanning as well.&lt;/p&gt;
&lt;p&gt;Regarding writing 1-2 words and erasing the (same) page continuously, do note that the specification states 10,000 write/erase cycles. (See the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fnrf52.v1.7%2FChunk146401440.html&amp;amp;resultof=%22absolute%22%20%22absolut%22%20%22maximum%22%20%22ratings%22%20%22rate%22"&gt;nRF52 Absolute Maximum Ratings&lt;/a&gt;.) The FLASH memory is not inteded for a scenario where the same location is rewritten as quickly as in your example. With one write/erase cycle every second, the 10,000 cycles will take less than three hours...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;edit:&lt;/strong&gt; In some cases you may get NRF_EVT_FLASH_OPERATION_VERIFY_FAILED events in early s132 alpha releases. These are no longer present in s132_nrf52_2.0.0-7.alpha, so I recommend upgrading to that SoftDevice version.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>