<?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>p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13752/p_storage-conflict-with-device-manager</link><description>I have migrated to SDK 9.0 primarily to take advantage of some of the Advertising Mode functionality in Device Manager. While I was still in SDK 8.1, I had implemented functionality to change the Advertising Name from an IOS App. The new name was stored</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 14 May 2016 09:32:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13752/p_storage-conflict-with-device-manager" /><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52559?ContentTypeID=1</link><pubDate>Sat, 14 May 2016 09:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0392d05-e1e1-4dd5-9a4f-534830ce9d42</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;In SDK 11 I have PSTORAGE_NUM_OF_PAGES in pstorage_platform.h. In SDK 9 you should have PSTORAGE_MAX_APPLICATIONS defined in pstorage_platform.h Try to increase it instead of PSTORAGE_NUM_OF_PAGES&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52558?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 22:08:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56e03e74-eaa7-403b-912b-f0f334bac651</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;Thank you Vladimir that was the problem!  One question.  In my set up in SDK 9 PSTORAGE_NUM_OF_PAGES is defined in pstorage.c which is kind of weird for a #define that may need modification.  Is there a reason for this or should I just comment it out there and move it to pstorage_platform.h ?  Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52557?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 12:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcb96d32-1117-424e-9326-a8ad4c45d0f9</guid><dc:creator>Vladimir</dc:creator><description>&lt;p&gt;&lt;strong&gt;eq&lt;/strong&gt; You can get error during pstorage_register if you have only 1 pstorage page at your pstorage_platform.h and if your code and deviceManager are booth using pStorage.
In my case changing PSTORAGE_NUM_OF_PAGES from 1 to 2 solved pstorage_register problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52556?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 19:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afb495f0-1dbd-4d4c-a72e-07bc818d8eb9</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;When I follow this example (remove the pstorage_init() function from init_p_storage()) I get : &lt;strong&gt;p_storage registration error&lt;/strong&gt; during pstorage init.  Also the example doesn&amp;#39;t have this function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//
	//  Get the Block Handle
	//
	retval = pstorage_block_identifier_get(&amp;amp;pstorage_handle, block_num, &amp;amp;p_block_handle);
	APP_ERROR_CHECK(retval);
	if (retval != NRF_SUCCESS)
	{
	   	printf(&amp;quot;Error: %lu\n&amp;quot;, retval);
	}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which seems to be needed to read and write as below:&lt;/p&gt;
&lt;p&gt;err_code = pstorage_store(&amp;amp;p_block_handle, pstorage_buffer, block_size, block_offset);&lt;/p&gt;
&lt;p&gt;err_code = pstorage_load(pstorage_buffer, &amp;amp;p_block_handle, 16, 0);&lt;/p&gt;
&lt;p&gt;Should I not be using these calls to read and write to pstorage anymore?  A bit confused... Do I no longer need the storage handle?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52555?ContentTypeID=1</link><pubDate>Thu, 12 May 2016 03:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbc09ac2-70fe-4b97-a01a-eef874936f68</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;yes, however, when i remove it from one or the other things break.  The best question is:  IS THERE AN SDK 9.0 EXAMPLE OF HOW TO USE THE DEVICE MANAGER ALONG WITH PSTORAGE.  THIS IS THE PROBLEM THAT I CAN&amp;#39;T SEEM T OVERCOME.  MY CODE WORKED IN SDK 8 WITHOUT DEVICE MANAGER.&lt;/p&gt;
&lt;p&gt;THANKS&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52554?ContentTypeID=1</link><pubDate>Wed, 11 May 2016 12:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:759d836d-4c54-413e-b4db-9416cb07b867</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You need to remove the call to pstorage_init() in either device_manager_init() or init_p_storage() depending on which one is called first on startup.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52553?ContentTypeID=1</link><pubDate>Wed, 11 May 2016 12:20:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78d2d653-1af3-4fde-9005-e68b29832691</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;Indeed, which is why I was trying to combine the two modules into one.  I am encountering the problem when trying to combine the DM initialization functions with those required for p_storage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: p_storage conflict with Device Manager</title><link>https://devzone.nordicsemi.com/thread/52552?ContentTypeID=1</link><pubDate>Wed, 11 May 2016 11:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a8ff58f-1a3b-41bb-8948-74f30b9921dc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi, pstorage_init() must only be called once before registering the first pstorage instance. Otherwise you risk getting several instances registered with the same base handle.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit - Added example&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This example  writes a dummy value to 0x3F800 in the &amp;quot;flash_write_timeout_handler&amp;quot;. Should work together with the DM module.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF51_5F00_SDK_5F00_9.0.0_5F00_ble_5F00_app_5F00_hrs_5F00_w_5F00_pstorage.zip"&gt;nRF51_SDK_9.0.0_ble_app_hrs_w_pstorage.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>