The invention relates to a method of updating a stored data value in a non-volatile memory. The invention further relates to a system configured to update a stored data value in a non-volatile memory.
Non-volatile memory technology products such as EEPROM and FLASH are relatively cheap and commonly used in embedded systems that require data to be preserved when the power is turned off.
One disadvantage of non-volatile memory is that it is relatively slow to write to. A further disadvantage is that non-volatile memory has a limited life that is defined by the number of times a non-volatile memory location can be written to.
Due to its construction, the solid state gate cells of FLASH MEMORY or EEPROM can only tolerate a maximum number of write/erase cycles. This is typically 100,000 cycles maximum for 4 k bytes of EEPROM. This predictable failure mode is a major lifetime-limiting factor for EEPROM/FLASH MEMORY used in devices that have many write/erase cycles.
Although economical and stable devices, FLASH MEMORY and EEPROM can clearly become a risk factor and be unsuitable in applications where large amounts of data are stored, or where the data is frequently updated.
It is an object of at least preferred embodiments of the present invention to address the foregoing problems or at least to provide the public with a useful choice.
In broad terms in one form the invention provides a method of updating a stored data value in a non-volatile memory, the method comprising: reading the stored data value from the non-volatile memory; reading a stored differential value from a volatile memory; receiving an updated data value; calculating a calculated differential value from the difference between the updated data value and the sum of the current data value and the stored differential value; comparing the calculated differential value with a threshold differential value; and writing the updated data value to the non-volatile memory if the calculated differential value exceeds the threshold differential value.
As used herein the term “(s)” following a noun means the plural and/or singular form of that noun.
As used herein the term “and/or” means “and” or “or”, or where the context allows both.
To those skilled in the art to which the invention relates, many changes in construction and widely differing embodiments and applications of the invention will suggest themselves without departing from the scope of the invention as defined in the appended claims. The disclosures and the descriptions herein are purely illustrative and are not intended to be in any sense limiting.
The invention consists in the foregoing and also envisages constructions of which the following gives examples only.
Preferred forms of the method and system for updating the stored data value in a non-volatile memory will now be described with reference to the accompanying figures in which:
System 100 includes a processor 105. The processor 105 is interfaced to volatile memory 110, non-volatile memory 115 and secondary non-volatile memory 120. An I/O component 125 is configured to read data from and write data to volatile memory 110, non-volatile memory 115 and secondary non-volatile memory 120.
Stored in non-volatile memory 115 are a plurality of data values 1301 . . . N. Non-volatile memory 115 is a typical EEPROM or FLASH MEMORY. Data values 130 stored on non-volatile memory 115 are required to be maintained when power to the system 100 is turned off.
The system 105 receives updated data values through input device 135 and optionally outputs data values through output device 140. As new data values are received through input device 135 that correspond to respective data values 130, rather than simply replace the new data value 130 in non-volatile memory, the processor instead calculates a differential value at least partly from the updated data value, and the data value stored in the non-volatile memory 115. The system then stores a plurality of differential values 1501 . . . N in volatile memory 110. Respective differential values 150 each correspond to respective data values 130. The data values and differential values are described in more detail below.
Prior to power interruption to the system 100, differential values 150 stored on volatile memory 110 are written to the secondary non-volatile memory 120 as differential values 1601 . . . N. It is envisaged that non-volatile memory 120 has a secondary power supply 170 to ensure that data in non-volatile memory 120 is not lost.
Software implemented components such as calculating component 180 and comparator 185 function in a manner more particularly described below.
The corresponding stored data value is read 210, from non-volatile memory 115 through I/O device 125. If there is no corresponding stored data value, then the updated data value is simply written to non-volatile memory 115.
If there is a differential value corresponding to the stored data value, then this differential value is read 215 from volatile memory 110. Calculating component 180 adds the retrieved data value to the retrieved differential value in a random access memory or cache. This sum is then subtracted from the updated data value in order to calculate 220 a calculated differential value.
Comparator 185 checks whether 225 the calculated differential value is 0, this means that the updated data value is the same as the sum of the stored data value and the stored differential value. If the calculated differential value is 0, then nothing further is needed.
If 230 the comparator 185 determines that the calculated differential value is greater than a predefined threshold differential value, then the updated data value is stored 235 in non-volatile memory 115. The new differential value is set 240 to zero and the updated differential value is stored 245 in volatile memory.
If 230 the calculated differential value is not greater than a threshold value as shown in
The above systems are particularly suited to maintaining data values that change frequently by single amounts. Typical applications of the above technology include utility meters and moisture measurement.
The techniques described above go some way toward providing the benefit of extending the life of a FLASH MEMORY/EEPROM, thereby increasing the lifespan of the product in which the non-volatile memory is employed and reducing maintenance servicing requirements and cost. A further benefit is that the system is able to provide processing time benefits as non-volatile memory is typically slower to write to than volatile memory. By reducing the number of writes needed to a non-volatile memory, this has potential to speed up applications as well as extend non-volatile memory life.
Whenever a value is updated, the value stored in non-volatile memory is only updated if the difference between the currently stored value and the new value is greater than the maximum value that can be stored in any differential value. This technique is flexible in that differential values or threshold values for differential values can be defined to be any size depending on the resource and strengths of the system, the characteristics of the data that is stored and the time required or available to store differential values in secondary non-volatile memory when a power fail event occurs. The technique can also be extended to cache data values completely in volatile memory if it is available, which has the potential to offer speed improvements.
The foregoing describes the invention including preferred forms thereof. Modifications and improvements as would be obvious to those skilled in the art are intended to be incorporated within the scope hereof, as defined by the accompanying claims.
Number | Date | Country | Kind |
---|---|---|---|
562200 | Oct 2007 | NZ | national |
Number | Name | Date | Kind |
---|---|---|---|
5010568 | Merriam et al. | Apr 1991 | A |
5056107 | Johnson et al. | Oct 1991 | A |
5161182 | Merriam et al. | Nov 1992 | A |
5179376 | Pomatto | Jan 1993 | A |
5239575 | White et al. | Aug 1993 | A |
5293115 | Swanson | Mar 1994 | A |
5311581 | Merriam et al. | May 1994 | A |
5422565 | Swanson | Jun 1995 | A |
5467287 | Wenner et al. | Nov 1995 | A |
5469365 | Diekema et al. | Nov 1995 | A |
5473322 | Carney | Dec 1995 | A |
5488565 | Kennon et al. | Jan 1996 | A |
5493287 | Bane | Feb 1996 | A |
5523559 | Swanson | Jun 1996 | A |
5617084 | Sears | Apr 1997 | A |
5621397 | Mutch et al. | Apr 1997 | A |
5664202 | Chen et al. | Sep 1997 | A |
5852658 | Knight et al. | Dec 1998 | A |
5897607 | Jenney et al. | Apr 1999 | A |
5898387 | Davis et al. | Apr 1999 | A |
5940009 | Loy et al. | Aug 1999 | A |
5995022 | Plis et al. | Nov 1999 | A |
6028522 | Petite | Feb 2000 | A |
6088659 | Kelley et al. | Jul 2000 | A |
6118269 | Davis | Sep 2000 | A |
6218953 | Petite | Apr 2001 | B1 |
6232886 | Morand | May 2001 | B1 |
6243693 | Richards | Jun 2001 | B1 |
6351223 | DeWeerd et al. | Feb 2002 | B1 |
6362745 | Davis | Mar 2002 | B1 |
6380852 | Hartman et al. | Apr 2002 | B1 |
6401081 | Montgomery et al. | Jun 2002 | B1 |
6437692 | Petite et al. | Aug 2002 | B1 |
6538577 | Ehrke et al. | Mar 2003 | B1 |
6801865 | Gilgenbach et al. | Oct 2004 | B2 |
6819098 | Villicana et al. | Nov 2004 | B2 |
6842706 | Baraty | Jan 2005 | B1 |
6900737 | Ardalan et al. | May 2005 | B1 |
6954814 | Leach | Oct 2005 | B1 |
6980973 | Karpenko | Dec 2005 | B1 |
7020566 | Villicana et al. | Mar 2006 | B2 |
7049932 | French et al. | May 2006 | B2 |
7053767 | Petite et al. | May 2006 | B2 |
7085161 | Chen et al. | Aug 2006 | B2 |
7088239 | Basinger et al. | Aug 2006 | B2 |
7091818 | Nuutinen | Aug 2006 | B2 |
7102533 | Kim | Sep 2006 | B2 |
7146285 | Wheless et al. | Dec 2006 | B2 |
7184904 | Kagan | Feb 2007 | B2 |
7185131 | Leach | Feb 2007 | B2 |
7228726 | Kates | Jun 2007 | B2 |
7231482 | Leach | Jun 2007 | B2 |
7236897 | Gandhi | Jun 2007 | B2 |
7256709 | Kagan | Aug 2007 | B2 |
7262709 | Borleske et al. | Aug 2007 | B2 |
7304587 | Boaz | Dec 2007 | B2 |
7327998 | Kumar et al. | Feb 2008 | B2 |
7336200 | Osterloh et al. | Feb 2008 | B2 |
7362232 | Holle et al. | Apr 2008 | B2 |
7362236 | Hoiness | Apr 2008 | B2 |
7379791 | Tamarkin et al. | May 2008 | B2 |
7649782 | Eguchi et al. | Jan 2010 | B2 |
20030063723 | Booth et al. | Apr 2003 | A1 |
20030167178 | Jarman et al. | Sep 2003 | A1 |
20050105703 | Baraty | May 2005 | A1 |
20050134430 | French et al. | Jun 2005 | A1 |
20050240315 | Booth et al. | Oct 2005 | A1 |
20060055513 | French et al. | Mar 2006 | A1 |
20060129497 | Baraty | Jun 2006 | A1 |
20060129498 | Baraty | Jun 2006 | A1 |
20070103335 | Fitzgerald et al. | May 2007 | A1 |
20070247789 | Benson et al. | Oct 2007 | A1 |
20080042871 | Donaghey et al. | Feb 2008 | A1 |
20080126724 | Danilak | May 2008 | A1 |
Number | Date | Country |
---|---|---|
2001-092713 | Apr 2001 | JP |
Number | Date | Country | |
---|---|---|---|
20090091977 A1 | Apr 2009 | US |