JP3012737B2 - Method of writing data to E2ROM - Google Patents
Method of writing data to E2ROMInfo
- Publication number
- JP3012737B2 JP3012737B2 JP17275092A JP17275092A JP3012737B2 JP 3012737 B2 JP3012737 B2 JP 3012737B2 JP 17275092 A JP17275092 A JP 17275092A JP 17275092 A JP17275092 A JP 17275092A JP 3012737 B2 JP3012737 B2 JP 3012737B2
- Authority
- JP
- Japan
- Prior art keywords
- rom
- data
- writing
- block
- blocks
- 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 - Lifetime
Links
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Memory System (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Read Only Memory (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、CPUを含むシステム
が設けられた装置で、且つ電源オフ時等に生じるバック
アップデータを書き込むためにE2 ROMを使用した装
置において、該E2 ROMへのバックアップデータへの
バックアップデータへの書き込み方法の改良に関する。BACKGROUND OF THE INVENTION This invention is a device system is provided that includes a CPU, and the device using the E 2 ROM to write backup data occurring power-off or the like, to the E 2 ROM The present invention relates to an improvement in a method of writing backup data to backup data.
【0002】[0002]
【従来の技術】従来のこの種の装置では、バックアップ
データが発生した時に、単にそのバックアップデータを
E2 ROMに対してそのまま書き込んでいるだけであ
る。2. Description of the Related Art In such a conventional apparatus, when backup data is generated, the backup data is simply written to an E 2 ROM as it is.
【0003】[0003]
【発明が解決しようとする課題】しかし、バッテリバッ
クアップされた通常のRAMと異なり、E2 ROMには
ハードウェア上の特性から、保証できる最大書き込み回
数が予め決められている。したがって、その決められた
最大書き込み回数以上の書き込みが行われると書き込ま
れたデータの保証ができない問題があった。However, unlike a normal RAM that is backed up by a battery, the maximum number of write operations that can be guaranteed in the E 2 ROM is determined in advance from the hardware characteristics. Therefore, there has been a problem that if data is written more than the determined maximum number of times, the written data cannot be guaranteed.
【0004】本発明の目的は、E2 ROMを工夫するこ
とによって、装置に保証される最大バックアップデータ
の書き込み回数を簡単に増やすことのできるE2 ROM
へのデータ書き込み方法を提供することにある。An object of the present invention, E by devising a 2 ROM, device guaranteed E 2 can easily increase by the number of times of writing up the backup data is ROM
To provide a method of writing data to the memory.
【0005】[0005]
【課題を解決するための手段】本発明は、CPUを含む
制御システムが設けられた装置のバックアップデータが
書き込まれるE2ROMを、該E2ROMに予め決めら
れている最大書き込み回数で前記装置に予め保証される
最大バックアップデータ書き込み回数を除した値以上の
ブロック数に区分けし、各ブロックに対する書き込み回
数を計数し、書き込み回数の最も少ないブロックに対し
て書き込みを行うことを特徴とする。According to the present invention, an E 2 ROM in which backup data of an apparatus provided with a control system including a CPU is written is stored in the E 2 ROM at a predetermined maximum number of times of writing to the E 2 ROM. previously guaranteed is to partition the maximum backup data write count the number of blocks of more than a value obtained by dividing the write times for each block
Count the number of blocks and write the
And performing write Te.
【0006】[0006]
【0007】[0007]
【作用】本発明では、E2ROMに予め定められている
最大書き込み回数で、装置に予め保証される最大バック
アップデータ書き込み回数を除した値以上のブロック数
に該E2ROMを区分けする。例えば、E2ROMに予
め決められている最大書き込み回数が10万回とし、装
置に予め保証されている最大バックアップデータ書き込
み回数が100万回とすると、100万回を10万回で
除した値10のブロック数又はそれ以上のブロック数に
E2ROMを区分けする。さらに、各ブロックにおける
書き込み回数を計数する。E 2 ROMにデータを書き込
む際には、各ブロックにおける書き込み回数を比較し、
書き込み回数が最も少ないブロックに対して書き込みが
行なわれる。このように、E2ROMをブロック化する
と、1つのE2ROM全体に対して予め決められている
最大書き込み回数が、各ブロックに対して保証できるよ
うになるので、前記予め決められている最大書き込み回
数にブロックの数を乗じた回数がその装置の最大バック
アップデータ書き込み回数として保証できるようにな
る。また、書き込み回数が最も少ないブロックに対して
書き込みを行うことにより、ポイントビットの読み出し
エラー等が生じた場合に単一のブロックに対して集中的
に書き込みが行われることによるデータの信頼性の低下
を防止できる。 According to the present invention, the E 2 ROM is divided into blocks equal to or larger than a value obtained by dividing the maximum number of times of backup data writing guaranteed in advance by the maximum number of times of writing predetermined in the E 2 ROM. For example, if the predetermined maximum number of times of writing to the E 2 ROM is 100,000 and the maximum number of times of backup data guaranteed to the device is 1,000,000, a value obtained by dividing 1,000,000 times by 100,000 times. The E 2 ROM is divided into 10 blocks or more. Furthermore, in each block
The number of times of writing is counted. Write data to E 2 ROM
The number of writes in each block,
Write to the block with the least number of writes
Done. As described above, when the E 2 ROM is divided into blocks, a predetermined maximum number of times of writing for one entire E 2 ROM can be guaranteed for each block. The number obtained by multiplying the number of times of writing by the number of blocks can be guaranteed as the maximum number of times of writing backup data of the device. Also, for the block with the least number of writes
Read point bit by writing
Focus on a single block when errors occur
Of data reliability due to data being written to
Can be prevented.
【0008】[0008]
【実施例】図1は、CPUを含む典型的な制御部のブロ
ック図を示す。CPU1には、センサ2から入力データ
が入り、ROM3に格納されているプログラムに従っ
て、入力データの処理を行って、駆動部4に駆動データ
を出力する。データの一時記憶や処理にはRAM5が使
用される。また、電源がオフされた時等には、RAM5
上に記憶されているデータを退避する必要があるが、そ
の退避データをバックアップデータとしてE2 ROM6
に転送する。E2 ROM6は、電源がオフされて完全停
電するまでのわずかの時間に、RAM5上に記憶されて
いるデータをCPU1から受けて記憶する。E2 ROM
6はバッテリバックアップする必要がないために、再度
電源がオンされた時には、イニシャルルーチンによって
CPU1からデータが読み込まれ、RAM5に再び記憶
される。このような制御システムが、例えば複写機に適
用された場合には、バックアップデータとしては累積コ
ピー枚数,帯電電圧,現像バイアス電圧,除電電圧等の
各種プロセスデータが考えられる。FIG. 1 is a block diagram of a typical control unit including a CPU. The CPU 1 receives input data from the sensor 2, processes the input data according to a program stored in the ROM 3, and outputs drive data to the drive unit 4. The RAM 5 is used for temporary storage and processing of data. When the power is turned off, the RAM 5
It is necessary to save the data stored on the E 2 ROM 6 as backup data.
Transfer to The E 2 ROM 6 receives the data stored in the RAM 5 from the CPU 1 and stores it in a short time from when the power is turned off to when a complete power failure occurs. E 2 ROM
Since the battery 6 does not need to be backed up by a battery, when the power is turned on again, data is read from the CPU 1 by the initial routine and stored in the RAM 5 again. When such a control system is applied to, for example, a copying machine, various process data such as an accumulated number of copies, a charging voltage, a developing bias voltage, and a static elimination voltage can be considered as backup data.
【0009】本発明では、上記E2 ROMを複数のブロ
ックに分割する。分割するブロックの数は、装置に予め
保証される最大バックアップデータ書き込み回数を、E
2 ROM6に予め決められている最大書き込み回数で除
した値以上の大きさである。In the present invention, the E 2 ROM is divided into a plurality of blocks. The number of blocks to be divided is determined by the maximum number of backup data
(2) The size is equal to or larger than a value obtained by dividing by a predetermined maximum number of times of writing to the ROM 6.
【0010】例えば、装置に予め保証される最大バック
アップデータ書き込み回数が40万回であり、E2 RO
M6に予め決められている最大書き込み回数が10万回
であるとすると、分割するブロックの数は4以上であ
る。図2は、8KBのE2 ROMを4ブロックに分割し
た場合を示す。各ブロックA〜Dはそれぞれ2KBの容
量を持ち、また、各ブロックにはライトカウンタWCが
割当てられている。このライトカウンタWCは、各ブロ
ックに対して書き込みが行われた回数を計数するもので
ある。For example, the maximum number of backup data write operations guaranteed in the device in advance is 400,000, and the E 2 RO
Assuming that the maximum number of times of writing predetermined for M6 is 100,000, the number of blocks to be divided is four or more. FIG. 2 shows a case where an 8 KB E 2 ROM is divided into four blocks. Each of the blocks A to D has a capacity of 2 KB, and a write counter WC is assigned to each block. The write counter WC counts the number of times writing has been performed on each block.
【0011】図3は、図2に示すE2 ROMに対してバ
ックアップデータを書き込む時のフローチャートを示
す。この動作は、通常、装置の電源がオフされた時や、
瞬時停電時に実行される。FIG. 3 shows a flowchart when writing backup data to the E 2 ROM shown in FIG. This usually happens when the device is turned off,
Executed when there is a momentary power failure.
【0012】最初にブロックナンバーをカウントするカ
ウンタxに1をセットし、そのxで指定されるブロック
のライトカウンタWCを読み込む。その値をYとする。
Yの値が10万回を超えているかどうかの判定を行い、
超えていなければ、現在のブロックに対してバックアッ
プデータの書き込みを行い、さらに同ブロックのライト
カウンタWCをカウントアップして終了する。一方、ラ
イトカウンタWCのカウント値Yが10万回を超えてい
れば、xを1つ増やして、すなわちアクセスするブロッ
クの番号を1つ増やし、上記と同じ動作を行う。ブロッ
ク4を超えて書き込もうとする場合にはエラー処理を行
う。First, a counter x for counting a block number is set to 1, and a write counter WC of a block designated by the x is read. Let the value be Y.
Judge whether the value of Y exceeds 100,000 times,
If not, the backup data is written to the current block, the write counter WC of the block is counted up, and the process ends. On the other hand, if the count value Y of the write counter WC exceeds 100,000 times, x is increased by 1, that is, the number of the block to be accessed is increased by 1, and the same operation as described above is performed. When writing beyond block 4, error processing is performed.
【0013】このような動作により、最大40万回の書
き込みが可能となる。By such an operation, writing can be performed up to 400,000 times at the maximum.
【0014】図4は、本発明の他の実施例を示す。FIG. 4 shows another embodiment of the present invention.
【0015】この実施例では、バックアップデータの書
き込み毎に、アクセスブロックを順次切り換えていく。
すなわち、まず、各ブロック1〜4のライトカウンタW
CのデータY(Y1〜Y4)を読み込む。そして、各値
Y1〜Y4の比較を行い、値が小さいカウント値を持つ
ブロックに対してバックアップデータの書き込みを行
う。そして、そのブロックのライトカウンタのカウント
値を1つ増やして終了する。全てのブロックのライトカ
ウンタの値が同じである時にはブロック1に対してアク
セスして同様の動作を行う。以上の動作によって、デー
タの書き込みを行う毎に、E2 ROMのブロックが順次
切り換えられていくことになる。なお、この場合でも、
最大40万回の書き込みができる。In this embodiment, the access block is sequentially switched every time backup data is written.
That is, first, the write counter W of each of the blocks 1 to 4
The data Y of C (Y1 to Y4) is read. Then, the values Y1 to Y4 are compared, and backup data is written to a block having a small count value. Then, the count value of the write counter of the block is incremented by one, and the process ends. When the write counter values of all blocks are the same, block 1 is accessed and the same operation is performed. By the above operation, every time data is written, the blocks of the E 2 ROM are sequentially switched. Note that even in this case,
Up to 400,000 writes can be performed.
【0016】[0016]
【発明の効果】本発明では、E2ROMに対する書き込
み可能回数を、予めそのE2ROMに決められている最
大書き込み回数を大幅に越える回数に簡単にできるため
に、装置の最大バックアップデータ書き込み回数をかな
り増やすことができる。このため、装置の耐用期間がE
2ROMによって制限されるということがなくなる。ま
た、書き込み回数が最も少ないブロックに対して書き込
みを行うことにより、ポイントビットの読み出しエラー
等が生じた場合にも、単一のブロックに対して集中的に
書き込みが行われることがなく、データの信頼性の低下
を確実に防止することができる。 In the present invention, the writable number of times the E 2 ROM, in order to be easy on the number of times previously the E greatly exceeds the maximum number of writes that are determined to 2 ROM, the maximum backup data write count of the device Can be significantly increased. Therefore, the service life of the device is E
2 You are no longer limited by ROM. Ma
Write to the block with the least number of writes
The read error of the point bit.
Etc., even when a single block is concentrated
No data is written and data reliability is reduced
Can be reliably prevented.
【図1】本発明に係るデータ書き込み方法が実施される
CPU制御システムのブロック図を示す。FIG. 1 shows a block diagram of a CPU control system in which a data writing method according to the present invention is performed.
【図2】E2 ROMを4ブロックに分割した時の様子を
示す図である。FIG. 2 is a diagram showing a state when an E 2 ROM is divided into four blocks.
【図3】バックアップデータをE2 ROMに書き込む時
のフローチャートを示す図である。FIG. 3 is a diagram showing a flowchart when writing backup data to an E 2 ROM.
【図4】バックアップデータをE2 ROMに書く時の他
の動作例を示すフローチャートである。FIG. 4 is a flowchart illustrating another operation example when writing backup data to an E 2 ROM.
Claims (1)
置のバックアップデータが書き込まれるE2ROMを、
該E2ROMに予め定められている最大書き込み回数で
前記装置に予め保証される最大バックアップデータ書き
込み回数を除した値以上のブロック数に区分けし、各ブ
ロックに対する書き込み回数を計数し、書き込み回数の
最も少ないブロックに対して書き込みを行うことを特徴
とする、E2ROMへのデータ書き込み方法。1. An E 2 ROM in which backup data of an apparatus provided with a control system including a CPU is written.
It is divided into the maximum number of backups data write count by dividing the value or more blocks in advance is guaranteed to the device at the maximum number of writes predetermined for the E 2 ROM, each blanking
Count the number of writes to the lock, and
A method for writing data to an E 2 ROM, wherein writing is performed on the least number of blocks .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17275092A JP3012737B2 (en) | 1992-06-30 | 1992-06-30 | Method of writing data to E2ROM |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17275092A JP3012737B2 (en) | 1992-06-30 | 1992-06-30 | Method of writing data to E2ROM |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0619800A JPH0619800A (en) | 1994-01-28 |
| JP3012737B2 true JP3012737B2 (en) | 2000-02-28 |
Family
ID=15947635
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17275092A Expired - Lifetime JP3012737B2 (en) | 1992-06-30 | 1992-06-30 | Method of writing data to E2ROM |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3012737B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001210083A (en) * | 2000-01-24 | 2001-08-03 | Denso Corp | Electronic control unit |
| US20100070720A1 (en) * | 2006-10-27 | 2010-03-18 | Panasonic Corporation | Memory access method |
| JP6890238B2 (en) * | 2017-04-07 | 2021-06-18 | パナソニックIpマネジメント株式会社 | Non-volatile memory with increased usage |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS60232000A (en) * | 1984-05-01 | 1985-11-18 | Meidensha Electric Mfg Co Ltd | Data processing system of non-volatile memory |
| JPH03250498A (en) * | 1990-02-27 | 1991-11-08 | Seiko Epson Corp | non-volatile memory device |
| JPH03272605A (en) * | 1990-03-20 | 1991-12-04 | Kubota Corp | Datum storing device |
| JPH0421999A (en) * | 1990-05-15 | 1992-01-24 | Mitsubishi Electric Corp | Divided memory write system |
-
1992
- 1992-06-30 JP JP17275092A patent/JP3012737B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0619800A (en) | 1994-01-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5159671A (en) | Data transfer unit for small computer system with simultaneous transfer to two memories and error detection and rewrite to substitute address | |
| US5412612A (en) | Semiconductor storage apparatus | |
| KR100301719B1 (en) | Fault Prevention Cue System | |
| US20060059385A1 (en) | Volatile storage based power loss recovery mechanism | |
| JP2001501000A (en) | Semiconductor memory device having error detection and correction | |
| JPH08272664A (en) | File system for flash memory | |
| JP3012737B2 (en) | Method of writing data to E2ROM | |
| US5613107A (en) | Method and apparatus for managing file versions in an information processing system based on a predetermined amount of storage media | |
| JP3076881B2 (en) | Information processing device with memory restoration function | |
| EP0070184A2 (en) | A method of testing memory | |
| US11636884B2 (en) | Back-up and restoration of register data | |
| KR100492793B1 (en) | Ferroelectric memory device with bad cell repair | |
| JPH06348535A (en) | Abnormality generation history storage device | |
| JP3130796B2 (en) | Control storage device | |
| JP3084823B2 (en) | Operator's console | |
| JP2507579B2 (en) | Logging information storage method by occurrence frequency | |
| JPS61265613A (en) | Data processing device | |
| JP2000132432A (en) | Memory dump method for parallel nodes | |
| JP3009168B2 (en) | Data processing device | |
| JPH07129208A (en) | Numerical control unit | |
| JPH07141120A (en) | Information storage medium failure processing method | |
| JPH0820933B2 (en) | Data writing method and device | |
| JPH05210597A (en) | Patrol circuit for storage device | |
| JPH0713764A (en) | Information processing equipment | |
| JPH04124740A (en) | Fault information store system for computer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071210 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081210 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091210 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091210 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101210 Year of fee payment: 11 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101210 Year of fee payment: 11 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111210 Year of fee payment: 12 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111210 Year of fee payment: 12 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121210 Year of fee payment: 13 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121210 Year of fee payment: 13 |