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.

Parents
  • The screen shot is in a Debug build, but the error is seen both on release and debug. The extremely difficult thing is it seems Hardware dependant. I can't test on several devices with the same firmware, but the problem is only repeatable on a select few. The the behaviour also exhibits another error by often never calling the pstorage_callback_function(). I supposed maybe the pstorage internal queue overflows?

    Again the most frustrating part in on 90% of devices everything works great. Not odd err_code return values, and the pstorage_callback_function() it hit everytime. Its only on a small population that this inconsistent bizzare behaviour is seen with err_code=0x03 and the pstorage_queue always containing pending events that don't clear.

Reply
  • The screen shot is in a Debug build, but the error is seen both on release and debug. The extremely difficult thing is it seems Hardware dependant. I can't test on several devices with the same firmware, but the problem is only repeatable on a select few. The the behaviour also exhibits another error by often never calling the pstorage_callback_function(). I supposed maybe the pstorage internal queue overflows?

    Again the most frustrating part in on 90% of devices everything works great. Not odd err_code return values, and the pstorage_callback_function() it hit everytime. Its only on a small population that this inconsistent bizzare behaviour is seen with err_code=0x03 and the pstorage_queue always containing pending events that don't clear.

Children
No Data
Related