Skip to content

ESP32: Non-volatile storage support #4436

Description

@dmartauz

This feature would be great for storage of configuration parameters, flags and other data in between power cycles or during deep-sleep while avoiding file system corruption which might occur during power outage in case data would stored in the file system (currently the only option).

ESP-IDF provides NVS library:
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/storage/nvs_flash.html

Activity

  1. dpgeorge commented on Jan 29, 2019

    @dpgeorge
    Member

    while avoiding file system corruption which might occur during power outage in case data would stored in the file system (currently the only option).

    An alternative filesystem which is robust against power outages during write is LittleFS, and this is due to be integrated soon. See #3847 for more details.

    ESP-IDF provides NVS library:

    I guess it could be exposed as a module, but it's more Python-like, and portable to other platforms, to use files for this purpose.

  2. dmartauz commented on Feb 28, 2019

    @dmartauz
    Author

    @dpgeorge
    A question regarding storage of data in the current implementation of file system in ESP32 port - is it suitable for frequent rewrites of data? I mean is there some wear-leveling mechanism implemented? My goal is to store data in between deep-sleep wake-ups.

  3. Lisa999 commented on Apr 1, 2019

    @Lisa999

    I have NVS working after making some mods to the source code. However, since @dpgeorge is quite slow with merging PR's i'm not sure whether to put the effort in making a NVS PR....

  4. dmartauz commented on Apr 2, 2019

    @dmartauz
    Author

    Yes, please make a PR, it is worth it.
    Which data types are currently supported by your implementation?

  5. Lisa999 commented on Apr 13, 2019

    @Lisa999

    All data types are support AND i’m using it in my own product. However, as long @dpgeorge is not merging PR #3576 i’m not putting in any effort in a PR that never gets merged....
    So here you go @dpgeorge , all or nothing: merge #3576 and i’ll make a PR for the NVS part OR nothing....

  6. dpgeorge commented on Feb 19, 2021

    @dpgeorge
    Member

    NVS support was added in c10d431

  7. added a commit that references this issue on Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests, new feature implementationsport-esp32

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions