This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_ERROR_INTERNAL from a pstorage_store() call?

I received a NRF_ERROR_INTERNAL error from a pstorage_store() function. As far as I can tell this error should not result from this function. It occurs fairly randomly. This function is called regularly successfully. I'm not sure how I should handle this error.

EDIT: June 1, 2016 Added Screen shot as requested Screen-Shot Flash ERROR.png

A few further notes 1)Often times this error will accompany other odd behaviour with the pstorage_callback_function() not being called. Its weird that the same code runs fine on some devices and not others.

  1. I use the same function which calls pstorage_clear() and pstorage_store(). I use the proper wait for events to clear loops:

    while( pstorage_wait_flag ){ sd_app_evt_wait(); app_sched_execute(); } //Sleep until store operation is finished.

  2. The calls the clear and store occur during a phones default connection interval (~35ms)

  3. I use a static variable in this store function for the source_data[]. Could there be an odd mutex or concurrency issue? Since this function could be called from multiple sources. its in theory possible for it to be called back to back while pstorage events have not cleared.

Related