<?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 operation error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5856/flash-operation-error</link><description>I usually see a system event &amp;quot;NRF_EVT_FLASH_OPERATION_ERROR&amp;quot; when updating my device firmware. SDK says that this event indicates that the ongoing flash operation has timed out with an error. What I have done would cause this error? How do I handle this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jul 2015 16:44:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5856/flash-operation-error" /><item><title>RE: flash operation error</title><link>https://devzone.nordicsemi.com/thread/20440?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2015 16:44:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26cfaf2d-b85b-446d-a5e6-d8a0ece65408</guid><dc:creator>kechouindi.a</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have tried the proposed solution on SDK 8.0.0, and it was not fixing flash error on command involving swapping.&lt;/p&gt;
&lt;p&gt;First i try to reset the m_swap_state to STATE_SWAP_DIRTY after erasing the swap page, this was causing data corruption if the error occur after successful STATE_DATA_ERASE.&lt;/p&gt;
&lt;p&gt;And as m_swap_state is updated before flash execution complete (sys_event_handler), i have added a backup of the m_swap_state and on NRF_EVT_FLASH_OPERATION_ERROR:
if (m_swap_state != STATE_INIT)
{
m_swap_state = m_prev_swap_state;
}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash operation error</title><link>https://devzone.nordicsemi.com/thread/20439?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 12:41:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25f13c1d-c64b-4346-9b98-2ee8a8c70022</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Great. Let me know what you find out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash operation error</title><link>https://devzone.nordicsemi.com/thread/20438?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 04:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:268d9a7d-e672-4891-a51d-c1b0d241f9e6</guid><dc:creator>Ben.Qin</dc:creator><description>&lt;p&gt;Thank you, Stefan. I don&amp;#39;t erase flash. But I saw the range of the connection interval was modified by some one of us. It was limited between 11.25ms to 15ms instead of between 20ms to 30ms. It might be the cause. I&amp;#39;ll test it. Otherwise, I&amp;#39;ll learn the later soft device to get a solution, or update to the latest one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash operation error</title><link>https://devzone.nordicsemi.com/thread/20437?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 14:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d62984-7800-4872-93c7-868a3fcdec45</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thank you for the update.&lt;/p&gt;
&lt;p&gt;You might get a timeout if you are performing a flash erase operation during DFU operation, and the connection interval is very short, 25ms or shorter. I think the default bootloader only performs a flash write, which is not that time consuming and should not time out in this case. Have you modified the default bootloader or are you by any chance performing a flash erase operation during the DFU.&lt;/p&gt;
&lt;p&gt;Are you able to update to the more recent softdevice and SDK? I think the pstorage was first introduced in S110 6.0.0. A lot of improvements have been implemented since then. I know that SDK 8.0.0 introduces a way to handle the NRF_EVT_FLASH_OPERATION_ERROR by retrying a flash operation number of times. Perhaps you could mimic that functionality from SDK 8.0.0 into your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash operation error</title><link>https://devzone.nordicsemi.com/thread/20435?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 10:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af8a32e3-c74c-49e2-9177-408969845658</guid><dc:creator>Ben.Qin</dc:creator><description>&lt;p&gt;We are using SDK v. 5.1.0 and soft device s110_nrf51822_6.0.0_softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash operation error</title><link>https://devzone.nordicsemi.com/thread/20436?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 07:18:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:661edee3-3120-4c7d-9f9b-e7b0cdba3558</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you tell me what nRF51 SDK version you are using, what nRF51 revision you have (the nRF51 chip markings) and what softdevice you are using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>