Commit graph

11 commits

Author SHA1 Message Date
Sagar Bijwe
536549253d nvs_flash: Update documentation at different places to indicate NVS encryption is supported 2018-10-29 06:57:28 +00:00
Sagar Bijwe
68a9d1168f nvs_flash: Add support for nvs encryption 2018-10-04 19:25:12 +05:30
Sagar Bijwe
e14b836fcc nvs-flash: Support for blobs larger than half of SPI Flash sector size
This change removes the earlier limitation of 1984 bytes for storing data-blobs.
Blobs larger than the sector size are split and stored on multiple sectors.
For this purpose, two new datatypes (multi-page index and multi-page data) are
added for entries stored in the sectors. The underlying read, write, erase and find
operations are modified to support these large blobs. The change is transparent
to users of the library and no special APIs need to be used to store these large
blobs.
2018-09-24 18:50:35 +05:30
Angus Gratton
3d92c6cccd nvs README: Remove section about encryption capability 2018-05-15 18:02:28 +08:00
Amey Inamdar
a2dcf7faa8 nvs: Support for handling multiple NVS partitions
This commit adds support for multiple NVS partitions. This provides application a flexibility to have multiple NVS
partitions such as separate partition with read-only manufacturing data and read-write partition with configuration.
Application can also use this to separate out application's configuration storage from system configuration.

This feature does not change any of the basic property of NVS subsystem. The same-named namespaces across partitions are
considered to be different namespaces. The original NVS API available for the applications remains unchanged. The only
difference is that instead of first NVS partition in the partition table, it now operates on the partition with label
"nvs" (which is default in the IDF provided partition table files). Additional APIs are provided to open a handle and
erase NVS with partition name as a parameter.

A test case is added in the host tests and it is made sure that all the host tests pass. nvs_rw_value app is also tested
with multiple partitions.

Signed-off-by: Amey Inamdar <amey.inamdar@gmail.com>
2017-08-22 13:48:14 +05:30
Ivan Grokhotkov
a25a4a0a7c nvs: check value size before writing, document limitations
Writing values longer than half of the page size (with header taken into
account) causes fragmentation issues. Previously it was suggested on the
forum that using long values may cause issues, but this wasn’t checked
in the library itself, and wasn’t documented. This change adds necessary
checks and introduces the new error code.

Documentation is also fixed to reflect the fact that the maximum length
of the key is 15 characters, not 16.
2017-05-31 12:59:24 +08:00
Ivan Grokhotkov
5a23ec4dc4 nvs: check that storage has at least one free page
This change adds a check for the free page count to nvs_flash_init.
Under normal operation, NVS keeps at least one free page available,
except for transient states such as freeing up new page. Due to external
factors (such as NVS partition size reduction) this free page could be
lost, making NVS operation impossible. Previously this would cause an
error when performing any nvs_set operation or opening a new namespace.
With this change, an error is returned from nvs_flash_init to indicate
that NVS partition is in such a state.
2017-03-14 22:03:39 +08:00
Krzysztof
fa002b4909 Fixed headers to match python doc standard 2016-11-01 01:20:04 +08:00
Ivan Grokhotkov
12a0786e2a components/nvs: maintain item hash list at page level 2016-09-21 18:02:52 +08:00
Ivan Grokhotkov
b783e2ffab components/nvs: fix typos in readme 2016-08-23 12:08:00 +08:00
Ivan Grokhotkov
bd6ea4393c Initial public version 2016-08-17 23:08:22 +08:00