Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nrf_fstorage_sd vs. nrf_fstorage_nvmc - what are the main differences

Hello,

My application (nRF52832, SDK17.1) uses the fsotrage library for low-level sequential data storage and retrieval.

At the moment I'm using nrf_fstorage_sd as an API instance.

As the BLE activity of the application is quite sparse (several times a day upon specific command), I was considering switching between nrf_fstorage_sd & nrf_fstorage_nvmc.

My questions are:

  • Is there any benefit using nrf_fstorage_nvmc over nrf_fstorage_sd ?
  • Are BLE & flash the only 'clients' managed by the softdevice?  (in other words, what compromises I'm taking when disabling the softdevice)
  • What are the prerequisites to disable the softdevice in runtime ?
  • What is the proper sequence of operations to switch back and forth between nrf_fstorage_nvmc & nrf_fstorage_sd ?
  • Any demo app of the above?

Thanks

tags: #fstorage #flash #sofdevice #nvmc #sd

  • Hi,

    Is there any benefit using nrf_fstorage_nvmc over nrf_fstorage_sd ?

    Not much that I can think of, apart from the flash operation happening right after you start it in the NVMC backend. For the SD backend, flash operations will be scheduled between other SoftDevice events, according to the documentation in Flash memory API. If no BLE activity is enabled, this should not make a big difference.

    Are BLE & flash the only 'clients' managed by the softdevice?  (in other words, what compromises I'm taking when disabling the softdevice)

    The SoftDevice can also include the ANT protocol, and other interfaces like Radio Timeslots, etc. Most of this will be application specific, and you might not compromise any other functionality in your specific use-case.

    What are the prerequisites to disable the softdevice in runtime ?

    I would recommend disconnecting any existing connection, stop advertising/scanning, and stop any activities using timeslots before disabling the SoftDevice.

    What is the proper sequence of operations to switch back and forth between nrf_fstorage_nvmc & nrf_fstorage_sd ?

    You would have to call nrf_fstorage_uninit() on the existing instance, then call nrf_fstorage_init() with the new nrf_fstorage_api_t pointer to the API you want to use. 

    Any demo app of the above?

    Unfortunately, I don't know of any such examples. Usage of both the SD and NVMC backends are shown in the same Flash Storage Example the SDK, but only one are initialized based on preprocessor symbols.

    Best regards,
    Jørgen

Related