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

how pstorage_register insure same address between startup?

it register a handler, what about restart and run pstorage_register again, how it insure everytime we get the same address for our content in the flash? before pstorage_register, we use flash_io, which we know the address, so no problem to access the right place in flash, so pstorage_register ensures the correct address by order of calling pstorage_register?

and PSTORAGE_MAX_APPLICATIONS, seems not for application, but defines how many pages we use? is there a max number of pages we can use? how to find out this number for nrf51822-xxaa-s110? as I recalled, 16k for softdevice, and size of app(how to find the size of app in the device?) anything else will take space?

Thanks!

Parents
  • Hi Dan,

    @I am not clear on why I needed to do that, honestly. The bond manager is the only other application it seems that uses the PStorage services

    The bond manager registers twice with the pstorage module - once for storing the Bonding Information and another time for storing the System attributes. You will notice two calls to the pstorage_register in ble_bondmngr.c and a comment above it. But yes, this should be described better to avoid confusion. I will take this up internally so that this gets documented more clearly in the upcoming release.

    Cheers, Balaji

Reply
  • Hi Dan,

    @I am not clear on why I needed to do that, honestly. The bond manager is the only other application it seems that uses the PStorage services

    The bond manager registers twice with the pstorage module - once for storing the Bonding Information and another time for storing the System attributes. You will notice two calls to the pstorage_register in ble_bondmngr.c and a comment above it. But yes, this should be described better to avoid confusion. I will take this up internally so that this gets documented more clearly in the upcoming release.

    Cheers, Balaji

Children
Related