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

SDKV12 fstorage documentation change request

As of SDKV12, because of the removal of pstorage, I upgraded my app to use fstorage.

If you look at the SDKV12 doc at this link, you will notice that it is quite lacking in that it doesn't have any narrative about usage: infocenter.nordicsemi.com/.../group__fstorage.html

As such, I clicked the SDKV11 doc at this link, and read the helpful narrative: infocenter.nordicsemi.com/index.jsp

Unfortunately, after following the instructions, I wrote incorrect code which took me a while to debug. Under "Priority for flash usage" it says: "For each module registration, you must specify the priority with which fstorage assigns flash space to the module. Possible values are 0 to 255, where 255 is reserved for usage by the Peer Manager. "

And so, because of this, I used the value 0.

That was a mistake.

If you look at fstorage.c, in fs_init(), you will see that it initializes a field "max_priority = 0" and does a later comparison of "if (p_config_j->priority > max_priority)". Because of this test, if an entry's priority is == 0, the entry's start and end addr are never initialized.

The fix can be done in the documentation; a code change is not necessary.

Please change the doc to say simply "Possible values are 1 to 254".

Parents Reply Children
No Data
Related