🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5 stack paper stop storing data in preferences?

    Scheduled Pinned Locked Moved PRODUCTS
    1 Posts 1 Posters 1.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ScheduleDisplayS Offline
      ScheduleDisplay
      last edited by

      Hello,

      I am using Preferences.h to store data on my M5 Stack Paper, such as Wi-Fi credentials, during my application's setup. It was working fine.
      During development and testing, I have rewritten the data in Preferences multiple times on this device. However, I recently noticed that new data is no longer being stored in Preferences, even though there is still available space, as confirmed by running the following code.

      #include <Preferences.h>
      .
      .
      .
      
      void checkWifiCredentialsAndDecide(){
        preferences.begin("wifiCredentials", false);
      
       if(debugFlag){
          size_t whatsLeft = preferences.freeEntries();   
          Serial.printf("Available enteries in the namespace table.\n" );
          Serial.println(whatsLeft);
          preferences.putString("test1", "test 1 value"); 
          Serial.println("preferences.getString(test1): " + String(preferences.getString("test1", "Default value")));
       }
      .
      .
      .
      }
      
      Output
      
      Available enteries in the namespace table.
      127
      preferences.getString(test1): Default value // I am expecting to see "test 1 value"
      

      I have read that the NVS (Non-Volatile Storage) has a write cycle limitation of approximately 10,000 to 100,000 cycles.
      I have a few questions:
      Is there a way to check how many write cycles are remaining?
      Can I check if my flash memory is healthy or corrupted?
      Is it possible that the flash memory of my M5 Stack Paper has worn out?

      Thank you

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post