<?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 behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11646/pstorage-behaviour-changed-from-sdk-v8-to-v10</link><description>I used to store 10 bytes to flash with pstorage under sdk version 8.2 and it always worked fine. As I also use the mesh app, the timeslot_handler dispatches the pstorage events like this: 
 case NRF_EVT_FLASH_OPERATION_SUCCESS:
case NRF_EVT_FLASH_OPERATION_ERROR</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 05 Mar 2016 10:30:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11646/pstorage-behaviour-changed-from-sdk-v8-to-v10" /><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44016?ContentTypeID=1</link><pubDate>Sat, 05 Mar 2016 10:30:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07b8b813-442c-4e9e-8d1b-946c5b3d300e</guid><dc:creator>codezork</dc:creator><description>&lt;p&gt;Accidently I changed the size of the buffer to store to a non-multiple of 4 bytes. It is important to check the result in the storage_callback_handler. It tells you a lot about what you are doing wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44014?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 07:54:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff375b2-8003-4a24-94ec-deefddee02cc</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand why this has worked earlier, but if you are in an interrupt callback waiting for a &amp;#39;pstorage_wait_flag&amp;#39; to be updated from an interrupt with the same priority, then that won&amp;#39;t work. It&amp;#39;s not possible for an interrupt of same priority to preempt an already running interrupt of same priority.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44015?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2016 19:37:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41b2eadf-0e47-4a57-a641-719c0b580b2b</guid><dc:creator>codezork</dc:creator><description>&lt;p&gt;Both are default what is APP_PRIORITY_LOW. Pstorage.c and .h didn&amp;#39;t change between versions, so it must be s.th. else. I&amp;#39;ll come back when I find it. The only thing is the NRF52 switch in nrf.h included in pstorage_platform.h. Thank you for your care.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44013?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 13:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2859627c-d7e7-4417-9c73-3c263f120463</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;What interrupt priority is the &amp;#39;pstorage_wait_flag&amp;#39; updated and what interrupt priority is app_timer using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44012?ContentTypeID=1</link><pubDate>Sat, 06 Feb 2016 00:10:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28ef30ea-7598-4041-8076-10b14f6981a2</guid><dc:creator>codezork</dc:creator><description>&lt;p&gt;No, I read the migration stuff. This is the start of the module:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define LOCALIZER_LEN						16
#define MAX_LOCVAL_LEN					10

// storage of metadata
static uint8_t 					pstorage_wait_flag = 0;
static pstorage_block_t 				pstorage_wait_handle = 0;
static pstorage_handle_t       			m_localizerHandle;
static uint8_t						m_localizer[LOCALIZER_LEN];						
static uint32_t					m_result;

APP_TIMER_DEF(m_store_timer_id);	
#define APP_TIMER_PRESCALER             0
#define STORAGE_DELAY			        APP_TIMER_TICKS(100, APP_TIMER_PRESCALER)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have no more ideas. With the storage clear command I already omitted the waiting on the callback and it clears somehow. But no callback as no event reaches my event loop. I&amp;#39;ll try to pump up the pstorage module with printfs to see what happens...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44011?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 11:35:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7380d88e-438c-442d-a35b-472eaeb4ca44</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can it in some way be related to &lt;a href="https://devzone.nordicsemi.com/question/57425/migrating-to-sdk-10-app_timer_def/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44010?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 22:56:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4249bf6-2100-4746-9482-ad37f209ad72</guid><dc:creator>codezork</dc:creator><description>&lt;p&gt;The context is a app_timer context according to the following sequence called from a ble_evt dispatched write of an indication service:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t localizer_new_value(uint8_t* data, uint8_t data_len, ble_loc_t * p_loc)
{
	uint32_t err_code;
	
	memcpy(&amp;amp;m_localizer, data, data_len);
	err_code = app_timer_start(m_store_timer_id, STORAGE_DELAY, p_loc);
	if (err_code != NRF_SUCCESS)
	{
		return err_code;
	}
	return NRF_SUCCESS;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the timer does:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void store_localizer_handler(void * p_context)
{
	uint32_t err_code;
	err_code = localizer_store();
	if (err_code != NRF_SUCCESS)
	{
		return;
	}
	ble_loc_value_send((ble_loc_t *)p_context);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PStorage behaviour changed from sdk v8 to v10</title><link>https://devzone.nordicsemi.com/thread/44009?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 14:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a5b046e-8713-40d7-9697-55e9a0ee665d</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;There haven&amp;#39;t been any changes in the API that should induce this kind of behavior. In what context are you calling your functions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>