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

pstorage best practices

Hello,

I noticed the various examples as well as the ble_advertising component all check for pending flash operations and will not start advertising until they are all complete. I didn't notice any treatment for other scenarios such as pstorage operations that are started after BLE advertising has been started.

Are there more specific guidelines about what can and can't be performed while a flash operation is happening? Should I be stopping all BLE activities any time I want to write / delete / update data in pstorage?

Thanks!

Parents
  • When you do a pstorage write/update/clear operation and if you wait for the system event for pstorage operation success/failure, then I think you do not have to worry about anything else.

    Flash erase takes a long time and the chances for success are higher if your BLE events are so far that gives flash erase enough time. You cannot expect that your BLE events interval is 10ms and flash erase to be successful.

    This post gives about execution times of different pstorage activity,

  • No, you do not need to. But if there is a lot of RADIO activity, then the softdevice will not be able to sit idle for pstorage to complete its action, hence it will not allocate the time for pstorage for its operation. You have to be the judge in judging if your pstorage request will have ample time that the softdevice will reasonable agree to wait idle.

Reply Children
No Data
Related