Efficient Use of Propeller EEPROM to Maximize Lifespan
coryco2
Posts: 107
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?
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
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.
http://www.redrok.com/Memory_24LC256_EEPROM_32Kx8_I2C.pdf
They claim a minimum of 1,000,000 write cycles.
Duane
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.
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.
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