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

pstorage, sd_flash, ble_flash, NVMC, ...

Hello,

I want to use flash for logging sensor data and sending via BLE. I found several APIs for store data to flash.

  • pstorage (Persistent Storage Access Routines)
  • sd_flash_...
  • ble_flash_...
  • NRF_NVMC_...

However, I cannot understand relationships among them and which to use. If you know anything about that please let me know.

Thanks,

Parents
  • pstorage is a higher-level library for managing flash. The sd_flash_ routines are lower-level operations that interact with the NRF_NVMC module's registers (which user code can't interact with directly when using the soft device). The ble_flash_ routines are older than the pstorage library and maybe even a little out of date.

    pstorage has some overhead (callbacks / asynchronous operations), but if you need to update flash while "on-air", it's probably the best choice for a few reasons:

    1. It avoids conflicts with flash writes and radio on-time
    2. It can be used across modules, including when a device needs to "bond" (more secure connections and some persistent configuration settings)
Reply
  • pstorage is a higher-level library for managing flash. The sd_flash_ routines are lower-level operations that interact with the NRF_NVMC module's registers (which user code can't interact with directly when using the soft device). The ble_flash_ routines are older than the pstorage library and maybe even a little out of date.

    pstorage has some overhead (callbacks / asynchronous operations), but if you need to update flash while "on-air", it's probably the best choice for a few reasons:

    1. It avoids conflicts with flash writes and radio on-time
    2. It can be used across modules, including when a device needs to "bond" (more secure connections and some persistent configuration settings)
Children
No Data
Related