Re: [Zephyr-users] Power Configuration of nrf52840 (Vikrant More)
Hi Vikrant,toggle quoted messageShow quoted text
NFFS file system might not be a good choice to store frequently changing data.
For this case I have created a library called sfcb that you can find
in my zephyr project fork: https://github.com/Laczen/zephyr. The sfcb
(simple flash circular buffer) allows you to store data in a series of
sectors in flash.
All data is stored as a identifier-value pair, the identifier is a 16
bit value, the data can be anything from a byte to a very long string
of bytes (limited by the sector size). By writing a new
identifier-value pair the previous pair with the same identifier is
When all the available sectors have been used the library does a
garbage collection phase before erasing a sector. In this phase it
makes sure that there is at least one identifier-value pair for each
The library allows you to combine almost constant data: node address,
netkeys, groups together with frequently changing data: sequence
number, iv_index into one storage solution, without wearing out flash
to fast. The almost constant data could be stored into one
identifier-value pair, the frequently changing in a different
identifier-value pair. Of course for the sequence number you will need
to avoid storing it for every change.
It can also be used in different cases where you would like to combine
the storage of network address, device name, ... in combination with
the device state (e.g. light switched on) in the same storage
Another use of the library is to consider the identifier as a file
name and the value as file contents.
In my zephyr project fork you can find a simple example in samples/subsys/sfcb.
2018-02-10 7:17 GMT+01:00 <firstname.lastname@example.org>:
Send Zephyr-devel mailing list submissions to