<?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>pstorage_store and pstorage_update execution time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5036/pstorage_store-and-pstorage_update-execution-time</link><description>Hello 
 Where can I find operating characteristics of pstorage_store and pstorage_update? 
 Actually, I observe that about 100 ms are needed to update 4 bytes data. For me, it seems a little long for an internal memory access. 
 Is it normal ? 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Jan 2015 11:46:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5036/pstorage_store-and-pstorage_update-execution-time" /><item><title>RE: pstorage_store and pstorage_update execution time</title><link>https://devzone.nordicsemi.com/thread/17756?ContentTypeID=1</link><pubDate>Wed, 07 Jan 2015 11:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46072c78-b291-4e62-b196-8d6ab6bcb8ed</guid><dc:creator>ting&amp;#178;</dc:creator><description>&lt;p&gt;Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage_store and pstorage_update execution time</title><link>https://devzone.nordicsemi.com/thread/17755?ContentTypeID=1</link><pubDate>Wed, 07 Jan 2015 10:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a98c17a0-b79c-4d40-8910-8ed2db87b44f</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;According to the nRF51822 PS v3.1 table 61, flash write operation takes up to 46.3us and flash erase takes up to 22.3ms. Flash erase can be performed on minimum a whole page, i.e. 1024 bytes. Flash write can be done on minimum one word, i.e. 4 bytes.&lt;/p&gt;
&lt;p&gt;What happens when you issue an pstorage_update is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The so called swap page is erased&lt;/li&gt;
&lt;li&gt;The data of the updated page that is not being updated is written to the swap page&lt;/li&gt;
&lt;li&gt;The page is erased&lt;/li&gt;
&lt;li&gt;The update data is written to the flash page&lt;/li&gt;
&lt;li&gt;The the remainder of the page that is not to be updated is written back to the page from the swap page&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the pstorage_update command actually contains at least two flash erase commands and multiple flash write commands, which explains how long it takes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>