<?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 issues</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26027/pstorage-issues</link><description>Hi 
 I&amp;#39;m trying to use pstorage to save some info (device name, and user info).
I&amp;#39;ve found the following links with examples:
 infocenter.nordicsemi.com/index.jsp 
 devzone.nordicsemi.com/.../ 
 Which have code that looks rather straightforward.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Oct 2017 17:17:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26027/pstorage-issues" /><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102583?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 17:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:696d07c4-7b53-41c3-96d0-0a8ba5a99b9c</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;Yes, I am getting NRF_SUCCESS.
Read always works, but its the write and clear that don&amp;#39;t.
Sometimes I could just clear what was written, but not write it again.
Sometimes I could just write but not clear.
When writing I could just write over the existing, until I got all zeroes in the byte which is normal operation for flash.
At some point I got them both working, went away for 20 mins and when I came back one of the two was not working again. Also before I was having issues with the scope of variables that were used to forward the write data, so I ended up using a global variable since local variables did not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102582?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 14:54:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb0f385-0b0d-48eb-98c5-262f0e5028a3</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Could you explain some more what the issue is?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;quot;where in some cases it either can only write, or only erase &amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;you are not able to read? or are you not able to do both write and erase?&lt;/p&gt;
&lt;p&gt;is &lt;code&gt;retval&lt;/code&gt; not returning &lt;code&gt;NRF_SUCCESS&lt;/code&gt; ?&lt;/p&gt;
&lt;p&gt;Note that page clearing/storing operation is asynchronous when softdevice is enabled, while pstorage_load() does not use the SoftDevice Flash API.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102588?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2017 10:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78ee8962-6435-437c-b118-3f81f3049cee</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;Oh yes, I did see it.
When looking just at the basic parts, its the same thing:
pstorage_init();
pstorage_register(&amp;amp;param, &amp;amp;handle);
pstorage_block_identifier_get(&amp;amp;handle, 0, &amp;amp;block_0_handle);
pstorage_clear(&amp;amp;block_0_handle, 48);&lt;br /&gt;
pstorage_store(&amp;amp;block_0_handle, source_data_0, 16, 0);
pstorage_load(dest_data_0, &amp;amp;block_0_handle, 16, 0);&lt;/p&gt;
&lt;p&gt;And that are all the pstorage functions that are being used which are the same in the code I posted above.&lt;/p&gt;
&lt;p&gt;Tho what really is the issue with my current solution?
I&amp;#39;m using the limited 32k version, so I have plenty of unused space after the code segment.
Can&amp;#39;t I just access it raw if it is unused?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102587?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2017 10:46:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7885df5-744b-496c-a64f-c9f94ced4b9b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, the GitHub example I linked to: &lt;a href="https://github.com/NordicSemiconductor/nRF5-flash-storage-examples/tree/master/pstorage_example"&gt;github.com/.../pstorage_example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Do you have the same issue with that code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102586?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2017 10:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d27ff381-b820-46c9-bb2b-744dc3ee3165</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;I did go through a lot of examples, but its always the same code.
Do you have a link to a specific example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102581?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 07:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb05242b-a952-4939-94c5-1f5bb7fa04f4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Did you try the examples in the GitHub repository? Did you have any issues with them?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102580?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 17:14:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25d8f0db-7bcf-4ba7-9d6a-aad9393fc5f9</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;I am using the SoftDevice, and I still have not figured out why cant it work. Why sometimes it works, but then 20 minutes later it does not??
The code is simple that it can&amp;#39;t be more simple, yet I&amp;#39;m having such issues.
Tho that code I linked works perfectly fine even with the SoftDevice.
There are more things that don&amp;#39;t make much sense with the nrf52 besides this that I had to work around in odd manners.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102585?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 12:04:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:175b13e0-041f-4027-b61d-3b3470a0c997</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;The code you linked to uses the NVMC directly. This is fine as long as you are not using the SoftDevice, but if you are using the SoftDevice you will need to use sd_flash or pstorage.&lt;/p&gt;
&lt;p&gt;For SDK 11, you can find some &lt;a href="https://github.com/NordicSemiconductor/nRF5-flash-storage-examples/tree/master/pstorage_example"&gt;pstorage examples on this GitHub page&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102589?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 09:17:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f27fa68b-1180-4c02-95ea-9517d1109232</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;I tried this code:
&lt;a href="https://devzone.nordicsemi.com/question/71111/flash-read-issue-in-nrf52/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
And it seems to work fine while pstorage and sd_flash... both have issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102579?ContentTypeID=1</link><pubDate>Thu, 19 Oct 2017 09:58:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17b279da-75e1-4c71-ae18-80a0651f7bab</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;I&amp;#39;m using SDK 11, since it was the latest SDK when I started using it, and I&amp;#39;d try avoiding updating it now since it does create some issues that need fixing.&lt;/p&gt;
&lt;p&gt;It is simply not defined anywhere, same as if I just wrote a random variable name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102578?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 11:07:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64826dde-1b08-4541-848b-60170bfff382</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi Dajgoro,&lt;/p&gt;
&lt;p&gt;What SDK version are you using?&lt;/p&gt;
&lt;p&gt;What are the specific error messages you get with the FS_REGISTER_CFG and fs_ret_t  ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102577?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 10:59:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2591d4b4-0ed2-4fe9-9b6a-efe2ca54faf0</guid><dc:creator>Dajgoro Labinac</dc:creator><description>&lt;p&gt;I found this example for Flash Storage:
&lt;a href="https://github.com/NordicSemiconductor/nRF5-flash-storage-examples/blob/master/fstorage_example_ascii/main.c"&gt;github.com/.../main.c&lt;/a&gt;
And I&amp;#39;m having issues with compiling the code.
FS_REGISTER_CFG(fs_config_t fs_config) and fs_ret_t are not recognized.
I&amp;#39;m also having similar issues with flash data storage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pstorage issues</title><link>https://devzone.nordicsemi.com/thread/102584?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2017 18:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67aa8353-d3f7-45c1-b4a7-e87c335ea6e3</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;Pstorage is outdated. The latest libraries for accessing NVM are &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.0.0%2Flib_fds.html&amp;amp;cp=4_0_0_3_48"&gt;Flash Data Storage&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.0.0%2Flib_fstorage.html&amp;amp;cp=4_0_0_3_49"&gt;Flash Storage&lt;/a&gt;. I would recommend using those instead of pstorage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>