Shop OBEX P1 Docs P2 Docs Learn Events
Efficient Use of Propeller EEPROM to Maximize Lifespan — Parallax Forums

Efficient Use of Propeller EEPROM to Maximize Lifespan

coryco2coryco2 Posts: 107
edited 2011-03-30 12:56 in Propeller 1
I've been reading on the forum and I know this subject has been discussed in parts, but I am interested specifically on opinions applying to the Propeller Protoboard...

What is the simplest and best approach for storing/retaining the current values of variables used by methods in the event of power failure or reboot, using a stock Protoboard or one with very simple modification?

Does rebooting eat up a cycle of the 100,000 rating for the on-board EEPROM? How about reading the EEPROM (i.e. does that wear it in a similar fashion to a writing it, and if so how many reads is it rated for)? Would there be some better approach--for example a cog "sleeping" method to keep the program in RAM but inactive? Or is all this much ado about nothing practically speaking?

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-29 20:10
    Reads are Non-destructive (though F-RAMs are destructive reads & writes.)

    Howbeit, All Things Must Pass.

    PE -- In 'development', you can d/l your program into RAM, it just won't be there/retained, stand-alone, if/when you cycle power.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-03-29 20:27
    This is the speck sheet for Microchip's 24LC256:
    http://www.redrok.com/Memory_24LC256_EEPROM_32Kx8_I2C.pdf
    They claim a minimum of 1,000,000 write cycles.

    Duane
  • wmosscropwmosscrop Posts: 409
    edited 2011-03-30 07:24
    The number of lifetime write cycles for a EEPROM varies inversely with the temperature of the chip when writing. The 100,000 rating is typically for chips at 25 degrees C.

    How often are the values changing? If you rewrite the values once an hour, then you'll still be under the 100,000 write limit after 10 years... and the data retention for EEPROMS is typically only 10 years.
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2011-03-30 08:30
    wmosscrop wrote: »
    and the data retention for EEPROMS is typically only 10 years.

    Several EEPROMs searched on Digi-Key have datasheets that claim >200 years data retention. While this might be somewhat ambitious for the purposes of sales, I do believe 10 years to be a little pessimistic.

    EEPROM cell longevity is probabilistic with some failure rate (due to cell wearout) which depends on many factors, here is a link to Microchip's endurance calculator which is telling as you can tinker with various parameters and directly see the reliability outcome.

    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010003&part

    As PJ Allen mentioned reads do not wear out the cells only writes are a concern. To get around this most folks use a circular write scheme where values are written to a moving address controlled by the program itself rather than a single address...or if you want to avoid coding this you can also make the EEPROM removable and calculate the period between replacements. Another option (not for products) is to periodically recode and compile the program to write to a new address location. Be careful to not write too frequently as you can easily wear out an EEPROM location within a couple of hours by writing to it every 5 ms.
  • mynet43mynet43 Posts: 644
    edited 2011-03-30 12:56
    If you're writing more often to it, then there are simple load-leveling algorithms you can use.

    I use this to store calibration and location parameters in an application I have. It is a fixed block size, like 64 bytes. I just move and store the starting address location when the program boots. That way there are a limited number of writes to each physical block. When the address reaches an upper limit, I wrap it around to the starting location.

    I'll be happy to provide a sample if you need it.

    Jim
Sign In or Register to comment.