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

migration guide for pstorage?

I have some non-volatile storage routines that I have written before, but the new SDK V5.0.0 has this pstorage module that is supposed to replace it, right? How do I migrate safely from using ble_flash to pstorage?

It seems like ble_flash is using blocking routines but the pstorage is using some sort of command queue with a callback. Should I set a flag from within the callback and have a wait loop in my main thread checking that flag?

Is migration even neccessary?

Parents
  • Hi Frank,

    We currently don't have a migration note for pstorage.

    pstorage is first implemented on Softdevice S110 v6.0.0 (currently beta). So if you use softdevice v5.x you should use ble_flash.

    If you plan to use ble_flash on S110 v6.0.0 ..(See EDIT)

    Regarding the asynchronous property of pstorage, as you can find in the description of pstorage_store (), you should not modify or change the input data until the callback is received. So your approach to set a flag in the callback for the loop in main is a proper way of handling it.

    EDIT: [b]I was in correct about ble_flash and S110 v6.0.0. It was not possible to access NVMC when softdevice is active. So ble_flash should not be used with S110 v6.0 I am sorry for giving the wrong information. [/b]

  • thanks

    is a clear operation mandatory before a stora operation? ble_flash did the erase automatically.

    is there a good word alignment macro I can use that is good for both GCC and Keil? is "attribute ((aligned (sizeof(int))))" good? is it even required?

Reply Children
No Data
Related