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

pstorage raw and device manager

I have followup question to the one asked in this thread:

devzone.nordicsemi.com/.../

I'm also using the device manager in DFU so that I need both the pstorage_raw and pstorage functions. However, I'm seeing behavior where the pstorage_callback is not always called.

According to the answer in the thread below, I should upgrade pstorage from the SDK 8.0.0 version I'm using to 9.0.0+.

devzone.nordicsemi.com/.../

However, the later versions break up the pstorage into pstorage.c and pstorage_raw. What is the best solution for using the device manager and the DFU code in one project?

Parents
  • Hi

    I agree, if you are missing pstorage callbacks with using SDK 8.1.0- pstorage module, then you should upgrade your pstorage module to SDK 9.0.0+.

    I can't immediately think of any plug and play solution, since pstorage raw mode is implemented separately in SDK 9.0.0+ in pstorage_raw.c

    One suggestion is to modify the pstorage calls in the DM so that the raw module can be used with the DM.

    The pstorage.c and psotrage_raw.c anyway don't seem to be that different. Seems to me that the main difference is that pstorage_raw.c does not use blocks, and does not implement pstorage_update function. It however uses pstorage_init, pstorage_register, pstorage_store and pstorage_erase. The pstorage_register only registers callback function and does not define any blocks, so you will not use any block identifiers, but need to write/erase to a physical flash address instead when calling pstorage_write/pstorage_erase.

Reply
  • Hi

    I agree, if you are missing pstorage callbacks with using SDK 8.1.0- pstorage module, then you should upgrade your pstorage module to SDK 9.0.0+.

    I can't immediately think of any plug and play solution, since pstorage raw mode is implemented separately in SDK 9.0.0+ in pstorage_raw.c

    One suggestion is to modify the pstorage calls in the DM so that the raw module can be used with the DM.

    The pstorage.c and psotrage_raw.c anyway don't seem to be that different. Seems to me that the main difference is that pstorage_raw.c does not use blocks, and does not implement pstorage_update function. It however uses pstorage_init, pstorage_register, pstorage_store and pstorage_erase. The pstorage_register only registers callback function and does not define any blocks, so you will not use any block identifiers, but need to write/erase to a physical flash address instead when calling pstorage_write/pstorage_erase.

Children
No Data
Related