<?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>NVS strange performance; NVS needs to be primed/warmed up before it can be used</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111427/nvs-strange-performance-nvs-needs-to-be-primed-warmed-up-before-it-can-be-used</link><description>Hello and thank you for your time. I seem to be getting some incorrect performance from the flash memory with NVS, in that NVS needs to be primed or something before it works properly. I have been testing with this code: 
 
 void Prime_Flash () 
 { 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 May 2024 17:40:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111427/nvs-strange-performance-nvs-needs-to-be-primed-warmed-up-before-it-can-be-used" /><item><title>RE: NVS strange performance; NVS needs to be primed/warmed up before it can be used</title><link>https://devzone.nordicsemi.com/thread/486057?ContentTypeID=1</link><pubDate>Mon, 27 May 2024 17:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bafbfab-1737-4df5-9297-fad490613795</guid><dc:creator>i_4556</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;Per your suggestion, I created a new partition for storing my data in flash. I want to do more testing but it seems everything is working.&lt;/p&gt;
&lt;p&gt;If I might make a suggestion, im sure other people will also want to use BLE and the NVS in the same project, perhaps NRF might consider some changes, although I admit im not sure what would be the best way to handle it, to avoid them having the same problem I did.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS strange performance; NVS needs to be primed/warmed up before it can be used</title><link>https://devzone.nordicsemi.com/thread/485748?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 08:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e2ec826-967d-46dd-9b84-2a9d882aab68</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I found a similar report of this issue here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84285/using-nvs-with-bluetooth-enabled"&gt;Using NVS with Bluetooth Enabled&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Maybe you can try the suggested workaround there, with using your&amp;nbsp;&lt;span&gt;own &amp;quot;userstorage&amp;quot; partition for&amp;nbsp;nvs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS strange performance; NVS needs to be primed/warmed up before it can be used</title><link>https://devzone.nordicsemi.com/thread/485684?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 16:03:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:958cfbff-0c02-4eff-b918-e4f904dec6ed</guid><dc:creator>i_4556</dc:creator><description>&lt;p&gt;Hello and thank you for your reply; the right-most column of data represents what the write and read functions are returning:&lt;/p&gt;
&lt;p&gt;Write 0 4&lt;br /&gt;Read 0 -2&lt;br /&gt;Write 1 4&lt;br /&gt;Read 1 -2&lt;br /&gt;Write 2 4&lt;br /&gt;Read 2 -2&lt;br /&gt;Write 3 4&lt;br /&gt;Read 3 -2&lt;br /&gt;Write 4 4&lt;br /&gt;Read 4 -2&lt;br /&gt;Write 5 4&lt;br /&gt;Read 5 -2&lt;br /&gt;Write 6 4&lt;br /&gt;Read 6 4&lt;br /&gt;Write 7 4&lt;br /&gt;Read 7 4&lt;br /&gt;Write 8 4&lt;br /&gt;Read 8 4&lt;br /&gt;Write 9 4&lt;br /&gt;Read 9 4&lt;br /&gt;Write 10 4&lt;br /&gt;Read 10 4&lt;br /&gt;Write 11 4&lt;br /&gt;Read 11 4&lt;br /&gt;Write 12 4&lt;br /&gt;Read 12 4&lt;br /&gt;Flash ready took 13 tries&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Every write returns a 4, indicating 4 bytes have been written; this inherently indicates a problem, given that we are writing the same data to the same address, and would therefore expect a 0 after the first write.&lt;/p&gt;
&lt;p&gt;The reads start by returning -2, indicating there isnt even an entry in the flash register that that address exists. On read 6 we finally get a 4, indicating four bytes were read, but the data doesnt match the expected data, so another loop iteration is executed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NVS strange performance; NVS needs to be primed/warmed up before it can be used</title><link>https://devzone.nordicsemi.com/thread/485648?ContentTypeID=1</link><pubDate>Thu, 23 May 2024 13:17:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:007542d2-7a90-496a-b59a-4060d7f4d823</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Could you check what value the&amp;nbsp;&lt;span&gt;nvs_write and and&amp;nbsp;nvs_read functions are returning ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>