CN101989459B - Method for improving service life of electrically erasable programmable read-only memory (EEPROM) by data buffering - Google Patents
Method for improving service life of electrically erasable programmable read-only memory (EEPROM) by data buffering Download PDFInfo
- Publication number
- CN101989459B CN101989459B CN 201010521400 CN201010521400A CN101989459B CN 101989459 B CN101989459 B CN 101989459B CN 201010521400 CN201010521400 CN 201010521400 CN 201010521400 A CN201010521400 A CN 201010521400A CN 101989459 B CN101989459 B CN 101989459B
- Authority
- CN
- China
- Prior art keywords
- data
- buffer
- eeprom
- annular
- numerical value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Read Only Memory (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention provides a method for improving the service life of EEEPROM by data buffering. In the method, a means of buffering data in an annular buffering area is adopted for enabling all units of the EEPROM to be used uniformly and establishing a breakpoint resetting mechanism to ensure the normal operation of the method. The method enables each unit of the EEPROM to allow for 100,000 times of erasing and writing. In addition, when the system is in a resetting environment and a power supply fails, the system can correctly find the position of the annular buffering area again, so that parameters can be stored in the EEPROM permanently and the data storage is safe and efficient.
Description
[technical field]
The present invention relates to a kind of field of embedded technology, particularly at when eeprom memory is stored data, owing to be subjected to the restriction of device self character, what the problem that this unit can lose efficacy after a certain unit storage data are reached certain number of times proposed is a kind of by the data buffering raising EEPROM method in serviceable life.
[background technology]
Prior art behind the initialization external memory devices, is confirmed first address and the storage size of reference-to storage, required corresponding reference address when obtaining program work in embedded system each module of configuration-system during in initialization.EEPROM (Electrically Erasable Programmable Read Only Memo) EEPROM (Electrically Erasable Programmable Read-Only Memory) is the read-only storage chip that data are not lost after a kind of power down.It is as one of memory device of system, and general operation is directly carried out addressing with master chip to the eeprom memory inner space.And in the supplemental characteristic that embedded software system need be preserved, it is variable often having only some data block, and other data then are changes relatively seldom; These variable data parameters generally show as some variable that defines on the software; Data structure is fixed, and under the situation of not using any software engineering, the address that writes is also fixed, and this just causes the wiping/writing repeatedly of certain fixing unit among the EEPROM easily.Each unit of EEPROM generally can only guarantee to bear 100,000 times wiping/writing, and reaches the erasable number of times limit as certain unit, and can't carry out just meaning that finish the serviceable life of this EEPROM when erasable to this unit.So data need be considered EEPROM to the embedded system of EEPROM life-span is preserved in a timing.
[summary of the invention]
In view of the deficiency of above-mentioned technology, the purpose of this invention is to provide a kind of by the data buffering raising EEPROM method in serviceable life.
For realizing above-mentioned purpose, the present invention adopts following scheme to realize: a kind of by the data buffering raising EEPROM method in serviceable life, it is characterized in that: use buffer circle to preserve data, described buffer circle comprise a plurality of annular data buffers with each annular data buffer annularity buffer zone of operating of corresponding size same pointers identical and that have one by one; Specifically realize according to the following steps:
Step 10, this buffer circle of initialization;
Step 20, the data that will preserve write annular data buffer in order, and each storage unit of described annular data buffer is evenly recycled;
Step 30, provide a pointed to write the position of the storage unit of data at last respectively in described a plurality of annular data buffers, and store a numerical value at described state buffer, the address value that this numerical value equals the corresponding last writing position in annular data buffer adds 1;
Step 40, after system resets, the numerical value of system's reading state buffer zone, and the data that will preserve write the position of the data buffer of this numerical value correspondence of pointed.
The present invention has following advantage: can make each unit of EEPROM afford 100,000 times and wipe/write, work as system in addition in a reset environment, situation as power-fail, system can correctly find the position of buffer circle again, has realized guaranteeing the safe and efficient of data storage in the preservation parameter lasting in EEPROM.
[description of drawings]
Fig. 1 is the structural drawing of the buffer circle of the embodiment of the invention.
Fig. 2 is the program flow diagram of finding out the current location of data buffer after the embodiment of the invention resets.
Fig. 3 is the program flow diagram that EEPROM of the present invention reads buffer circle.
Fig. 4 is the program flow diagram that EEPROM of the present invention writes buffer circle.
[embodiment]
The present invention will be further described below in conjunction with drawings and Examples.
The invention provides a kind of by the data buffering raising EEPROM method in serviceable life, it is characterized in that: use buffer circle to preserve data, as shown in Figure 1, it is the structural representation of the buffer circle of embodiment, as known in the figure, described buffer circle comprise a plurality of annular data buffers with each annular data buffer annularity buffer zone of the identical and same pointers that the has operation of corresponding size one by one; Specifically realize according to the following steps:
Step 10, this buffer circle of initialization;
Step 20, the data that need are preserved write annular data buffer in order, and each storage unit of described annular data buffer is evenly recycled;
Step 30, provide a pointed to write the position of the storage unit of data at last respectively in described a plurality of annular data buffers, and store a numerical value at described state buffer, the address value that this numerical value equals the corresponding last writing position in annular data buffer adds the FA final address value that this numeric representation record data buffer zone of 1(can be used, and adds 1 position that just need calculate vacant data space in logic on the basis that writes data);
Step 40, after system resets, the numerical value of system's reading state buffer zone, and the data that will need to preserve write the position of the data buffer of this numerical value correspondence of pointed.
The present invention can increase the number of times that data are preserved using buffer circle to preserve data in EEPROM in EEPROM.If buffer zone has two-stage, the number of times that can preserve of data is exactly the twice of single EEPROM unit so.The size of using this method to increase buffer circle just can increase the number of times that data are preserved.In other words, data are disperseed to store into the number of times that a plurality of EEPROM position can increase the data storage.When using buffer circle, the buffer circle quantity that the number of times that data are preserved equals to use multiply by the number of times of single EEPROM unit.
Here being noted that to the invention provides state buffer, is the position for recovery pointer behind power supply power-fail, and this annularity buffer zone is not for preserving special address, is the preservation location status that " mark " shows the data buffer.Therefore, described annular data buffer has identical size and identical pointer operation with the annularity buffer zone, find out after concrete the resetting the data buffer current location program circuit as shown in Figure 2, search the EEPROM location address at first earlier, its address addr=state buffer start address, does and the value of judging the state buffer current address equal the value-1 of state buffer next address? be, EEPROM location address addr=addr+1 then, and return and continue to judge, otherwise EEPROM location address addr=EEPROM current location address addr deducts the sizes values of buffer zone subtracts 1 again, returns again.
Please refer to Fig. 3 and Fig. 4, Fig. 3, Fig. 4 are the program flow diagrams of present embodiment EEPROM read/write buffer circle, when writing annular data buffer, the annularity buffer zone also will upgrade simultaneously: the same position of described pointed data buffer and state buffer, the address value that the numerical value of state buffer equals the last writing position in data buffer adds 1, when buffer zone also is like this from unrolling at last when initial.After system resets, just can from the annularity buffer zone, search for, if the difference of the content of adjacent two unit greater than 1, just can be found out last position of revising.
Here being noted that before using for the first time needs initialization annularity buffer zone EEPROM, and therefore, above-mentioned step 10 is very important.Otherwise possibly can't correctly find the position of buffer zone final updating.This problem only can betide before buffer circle is finished the whole buffer zone of roaming and be reset.Best solution is to guarantee that buffer zone is initialised, erasing-programming together when the Flash erasing-programming.
What deserves to be mentioned is, method of the present invention can be passed through ST Embedded Toolset R2.1.2 development environment coding code, can in order to Sti5105 be the digital TV set-top box of master chip as target device, include among the EEPROM of the present invention a plurality of annular data buffers with each annular data buffer annularity buffer zone of the identical and same pointers operation that has of corresponding size one by one.
The above only is the present invention's preferred embodiment, and all equalizations of being done according to the present patent application claim change and modify, and all should belong to the present invention's covering scope.
Claims (2)
1. one kind is improved the EEPROM method in serviceable life by data buffering, it is characterized in that: use buffer circle to preserve data, described buffer circle comprise a plurality of annular data buffers with each annular data buffer annularity buffer zone of operating of corresponding size same pointers identical and that have one by one; Specifically realize according to the following steps:
Step 10, this buffer circle of initialization;
Step 20, the data that will preserve write annular data buffer in order, and each storage unit of described annular data buffer is evenly recycled;
Step 30, provide a pointed to write the position of the storage unit of data at last respectively in described a plurality of annular data buffers, and store a numerical value at described state buffer, the address value that this numerical value equals the corresponding last writing position in annular data buffer adds 1;
Step 40, after system resets, the numerical value of system's reading state buffer zone, and the data that will preserve write the position of the data buffer of this numerical value correspondence of pointed.
2. according to claim 1ly improve the EEPROM method in serviceable life by data buffering, it is characterized in that: this method is that the digital TV set-top box of master chip is as target device in order to Sti5105.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010521400 CN101989459B (en) | 2010-10-27 | 2010-10-27 | Method for improving service life of electrically erasable programmable read-only memory (EEPROM) by data buffering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010521400 CN101989459B (en) | 2010-10-27 | 2010-10-27 | Method for improving service life of electrically erasable programmable read-only memory (EEPROM) by data buffering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101989459A CN101989459A (en) | 2011-03-23 |
CN101989459B true CN101989459B (en) | 2013-10-09 |
Family
ID=43745955
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010521400 Expired - Fee Related CN101989459B (en) | 2010-10-27 | 2010-10-27 | Method for improving service life of electrically erasable programmable read-only memory (EEPROM) by data buffering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101989459B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108365283A (en) * | 2018-05-04 | 2018-08-03 | 深圳市道通智能航空技术有限公司 | Device battery and unmanned plane |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1338073A (en) * | 1998-12-22 | 2002-02-27 | 格姆普拉斯公司 | Storage system comprising means managing a storage unit with anti-wear and anti-wear management of a storage unit |
CN1529256A (en) * | 2003-10-17 | 2004-09-15 | 中兴通讯股份有限公司 | Dual-ring quene-based, non-interrupt PCI communication method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0546359A (en) * | 1991-08-13 | 1993-02-26 | Mitsubishi Electric Corp | Storage device |
JPH07210468A (en) * | 1994-01-18 | 1995-08-11 | Hitachi Ltd | Semiconductor auxiliary memory |
JPH11282758A (en) * | 1998-03-27 | 1999-10-15 | Sony Corp | Device and method for data writing into nonvolatile memory |
-
2010
- 2010-10-27 CN CN 201010521400 patent/CN101989459B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1338073A (en) * | 1998-12-22 | 2002-02-27 | 格姆普拉斯公司 | Storage system comprising means managing a storage unit with anti-wear and anti-wear management of a storage unit |
CN1529256A (en) * | 2003-10-17 | 2004-09-15 | 中兴通讯股份有限公司 | Dual-ring quene-based, non-interrupt PCI communication method |
Non-Patent Citations (3)
Title |
---|
JP特开平11-282758A 1999.10.15 |
JP特开平5-46359A 1993.02.26 |
JP特开平7-210468A 1995.08.11 |
Also Published As
Publication number | Publication date |
---|---|
CN101989459A (en) | 2011-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104750615B (en) | Data memory device and method for controlling flash memory | |
US8606987B2 (en) | Data writing method for flash memory and controller using the same | |
US8015370B2 (en) | Memory control method and memory system | |
US8386905B2 (en) | Error correcting method, and memory controller and memory storage system using the same | |
US9176865B2 (en) | Data writing method, memory controller, and memory storage device | |
US20150095663A1 (en) | Data processing method, memory storage device and memory control circuit unit | |
US10089225B2 (en) | Improving garbage collection efficiency by reducing page table lookups | |
KR20140133427A (en) | Method for managing data stored in flash memory and associated memory device and controller | |
US9383929B2 (en) | Data storing method and memory controller and memory storage device using the same | |
US9569126B2 (en) | Data storage device and flash memory control method | |
JP5329689B2 (en) | Memory controller and nonvolatile storage device | |
CN104765569A (en) | Data write-in method, memory control circuit unit and memory storing device | |
CN104658612A (en) | Method for accessing storage unit in flash memory and device using the same | |
US9613705B1 (en) | Method for managing programming mode of rewritable non-volatile memory module, and memory storage device and memory control circuit unit using the same | |
CN101989459B (en) | Method for improving service life of electrically erasable programmable read-only memory (EEPROM) by data buffering | |
CN103186470B (en) | Memorizer memory devices and Memory Controller thereof and method for writing data | |
US8762623B2 (en) | Method for managing a plurality of blocks of a flash memory, and associated memory device and controller thereof | |
CN103677868A (en) | Method for configuring built-in FPGA of chip by MCU inside chip | |
US8832358B2 (en) | Data writing method, memory controller and memory storage apparatus | |
CN105630687A (en) | Data writing method, memory control circuit unit and memory storage apparatus | |
CN102591738B (en) | Data managing method, Memory Controller and in-line memory storage device | |
CN111258498B (en) | FLASH memory management method | |
CN101963942A (en) | Rapid storage method for nor type flash of set-top box | |
CN104932831A (en) | Serial NAND flash memory and management method for managing built-in variable bad sectors of serial NAND flash memory | |
US8335888B2 (en) | Nor flash memory controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20131009 Termination date: 20151027 |
|
EXPY | Termination of patent right or utility model |