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

How to use pstorage alongside a softdevice?

I am wanting to use pstorage for storing a few persistent variables. I am working from the multilink central example, which already is using pstorage for, I assume, saving context. How do I use pstorage without breaking the other parts of the example?

I have been looking at the reference documentation...

infocenter.nordicsemi.com/index.jsp

but I am not sure how to weave it in to the project.

I am using sdk11 and s130

Parents
  • Ok, thanks for the pointer. Keil did not find this for me for some reason.

    You should only call pstorage_init once, then you can call pstorage_register multiple times from different locations. Each pstorage register will reserve flash space in different locations. So I suspect you should call device_manager_init before calling pstorage_register in other modules. Perhaps this link could help realize how flash space is reserved when pstorage_register is called from different modules.

Reply
  • Ok, thanks for the pointer. Keil did not find this for me for some reason.

    You should only call pstorage_init once, then you can call pstorage_register multiple times from different locations. Each pstorage register will reserve flash space in different locations. So I suspect you should call device_manager_init before calling pstorage_register in other modules. Perhaps this link could help realize how flash space is reserved when pstorage_register is called from different modules.

Children
No Data
Related