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

pstorage block size

I was wondering what would be a good block size, and saw this in the documentation:

For example, if a module has a table with 10 entries, and each entry is 64 bytes in size, it can request 10 blocks with a block size of 64 bytes. The module can also request one block that is 640 bytes depending on how it would like to access or alter the memory in persistent memory. The first option is preferred when it is a single entry that needs to be updated often and doesn't impact the other entries. The second option is preferred when table entries are not changed individually but have a common point of loading and storing data.

But the functions pstorage_store and pstorage_update, can write less bytes than block size, which make me wonder what the use is of a smaller block size.

Using: nrf52, sdk 11, sd 132

Related