Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. EEPROM wearing

EEPROM wearing

Scheduled Pinned Locked Moved Development
6 Posts 4 Posters 1.9k Views 5 Watching
  • 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.
  • N Offline
    N Offline
    napo7
    Hardware Contributor
    wrote on last edited by
    #1

    Hi there !

    I was about to use saveState function, but I first aked myself about the wearing of the EEPROM.
    It seems that the EEPROM has a life of about 100.000 writes.
    So, if I do 100 writes per day (4 state change every hour), it takes 1000 days to write 100k times : about 3 years and the EEPROM may start failing.

    Do anyone use a wear-leveling trick ?
    I've quickly searched for code over google, but hasn't tried anything yet.

    Y 1 Reply Last reply
    0
    • N napo7

      Hi there !

      I was about to use saveState function, but I first aked myself about the wearing of the EEPROM.
      It seems that the EEPROM has a life of about 100.000 writes.
      So, if I do 100 writes per day (4 state change every hour), it takes 1000 days to write 100k times : about 3 years and the EEPROM may start failing.

      Do anyone use a wear-leveling trick ?
      I've quickly searched for code over google, but hasn't tried anything yet.

      Y Offline
      Y Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @napo7 yup. I wrote an EEprom wear leveling library a while ago. Didn't publish it yet though...
      I'll have a look if I can have it go public.

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • S Offline
        S Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #3
        • you could use a circular buffer for this http://www.atmel.com/images/doc2526.pdf . I'm sure there are already libs for this.
        • when it's not enough, it's maybe better to use a better mem,
        • change strategy :)
        1 Reply Last reply
        0
        • N Offline
          N Offline
          napo7
          Hardware Contributor
          wrote on last edited by napo7
          #4

          Quick thought :

          At least, if the old value is the same as the new value, don't write it !
          I'm sure we can avoid a big amount of updates in case of the controller resend the same value...

          I did thought of a kind of circular buffer , but it's too late for my brain to find a working solution :joy:
          Reading the atmel doc will surely be easier !

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hek
            Admin
            wrote on last edited by
            #5

            We're using eeprom_update_byte which only updates if the value differs.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              napo7
              Hardware Contributor
              wrote on last edited by napo7
              #6

              Great !
              Now I have to implement a circular buffer and the solution will be perfect !

              Edit : This reading is interresting : http://hackaday.com/2011/05/16/destroying-an-arduinos-eeprom/
              The user did a test to wear out EEPROM, and did managed to get more than 1M writes before it started to fail !

              1 Reply Last reply
              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
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              28

              Online

              12.0k

              Users

              11.2k

              Topics

              113.4k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular