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

fs_store doesn't update memory

Hi everyone,

I am using SDK12 and the Flash Storage module to store some data in Flash. I frequently need to update some of these data basing on received commands and new data.

When I use fs_store after the fs_erase, the Flash is written as expected.

If I invoke the fs_store without the fs_erase (to update the previously written content), it doesn't update the values in Flash, even if I receive FS_SUCCESS in my handler.

  1. Do I have to erase all the page just to change few bytes in it?

  2. Is there any other technique / api that I can use to partially update a page?

(honestly, I am completely confused by the many options I have to write Flash: fstorage, pstorage, an example in SDK doesn't use any api at all, etc. Some work with the softdevice, some not, not to mention all the posts in the forum with different pieces of code, I hope to see a clarifying tutorial on this subject sooner or later)

Thanks.

Related