JPH11249972A - Abnormality detection circuit for flash memory - Google Patents

Abnormality detection circuit for flash memory

Info

Publication number
JPH11249972A
JPH11249972A JP10047278A JP4727898A JPH11249972A JP H11249972 A JPH11249972 A JP H11249972A JP 10047278 A JP10047278 A JP 10047278A JP 4727898 A JP4727898 A JP 4727898A JP H11249972 A JPH11249972 A JP H11249972A
Authority
JP
Japan
Prior art keywords
flash memory
data
procedure
writing
abnormality
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.)
Pending
Application number
JP10047278A
Other languages
Japanese (ja)
Inventor
Seiichi Tomono
清一 友野
Yoshihisa Aoyama
芳久 青山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nissin Electric Co Ltd
Original Assignee
Nissin Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nissin Electric Co Ltd filed Critical Nissin Electric Co Ltd
Priority to JP10047278A priority Critical patent/JPH11249972A/en
Publication of JPH11249972A publication Critical patent/JPH11249972A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an abnormality detection circuit which can detect the abnormality of data stored in a flash memory even in the case a power source is interrupted during the write. SOLUTION: A sequencer 13 detects commands successively given to a flash memory 3 during write and stores corresponding codes in a storage element 12. When a BUSY signal of the flash memory 3 reports the end of internal processing, the sequencer 13 stores a code indicating the normal end in the storage element 12. The storage element 12 is connected to a backup power source 14 and holds this code group in the period when a system power source 4 is interrupted. If a system 1 is stopped during write, only the code group given till then is stored in the storage element 12. Consequently, the system 1 can surely detect the data abnormality of the flash memory 3 in a short time based on the code group in the storage element 12 in the activation.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、例えば、パーソナ
ルコンピュータなど、フラッシュメモリを使用したシス
テムに好適に使用されるフラッシュメモリの異常検出回
路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a flash memory abnormality detection circuit suitably used in a system using a flash memory such as a personal computer.

【0002】[0002]

【従来の技術】近年では、ソフトウェアが大規模にな
り、誤り(バグ)のないソフトウェアを完成させること
は、益々困難になっている。一方、例えば、システムを
利用する場所や、当該システムと協調して動作するシス
テムなど、システムの利用環境が変化する速度は、年々
速くなっている。
2. Description of the Related Art In recent years, software has become large-scale, and it is increasingly difficult to complete software without errors (bugs). On the other hand, for example, the speed at which the use environment of the system changes, such as a place where the system is used or a system operating in cooperation with the system, is increasing year by year.

【0003】したがって、電源断時にも保持すべきデー
タを格納するために、書換えが不可能なROMに代え
て、フラッシュメモリが使用されつつある。当該フラッ
シュメモリは、例えば、プログラムに不具合が発見され
た場合や、初期データや設定データを変更したい場合に
は、データを容易に書き換えることができる。それゆ
え、通常のROMを使用する場合に比べて自由度の高い
システムを構築できる。
[0003] Therefore, in order to store data to be retained even when the power is turned off, a flash memory is being used instead of a non-rewritable ROM. In the flash memory, for example, when a defect is found in a program or when it is desired to change initial data or setting data, data can be easily rewritten. Therefore, a system having a higher degree of freedom can be constructed as compared with the case where a normal ROM is used.

【0004】当該フラッシュメモリは、通常のRAMよ
りも速度が遅いので、作業領域のデータなど、頻繁に書
き換えられるデータの格納には適さない。したがって、
例えば、プログラムや初期データあるいは設定データな
ど、書換え頻度が大幅に低く、電源断時も保持する必要
があるデータを格納するために使われることが多い。
The flash memory is slower than a normal RAM, and is not suitable for storing frequently rewritten data such as data in a work area. Therefore,
For example, it is often used to store data such as programs, initial data, or setting data, whose rewriting frequency is extremely low and which needs to be retained even when the power is turned off.

【0005】上記フラッシュメモリにデータを書き込む
場合は、メモリセルの構造上、格納されたデータを一度
消去した後に、新たなデータを書き込む必要がある。ま
た、フラッシュメモリをより安価に製造するために、デ
ータの消去は、複数のメモリセルからなる領域(セク
タ)毎に行う必要がある。したがって、不用意な書き込
みや消去を防止するために、書き込みや消去の手順が定
められている。フラッシュメモリの一般的な書き込み
(消去)手順であるJEDEC( Joint ElectronDevic
e Engineering Council)標準型コマンドの場合、予め
定められたアドレスへ決まったデータを書き込むという
手順を、4回〜6回繰り返すことによって、書き込みや
消去が行われる。例えば、特定のアドレスへワード単位
で書き込む際の手順は、図16のS1〜S4に示すよう
に、フラッシュメモリへ4回書き込むことによって行わ
れる。
When data is written in the flash memory, it is necessary to erase the stored data once and then write new data due to the structure of the memory cell. Further, in order to manufacture a flash memory at lower cost, it is necessary to erase data for each area (sector) including a plurality of memory cells. Therefore, in order to prevent careless writing and erasing, writing and erasing procedures are defined. JEDEC (Joint Electron Device) is a general flash (erase) procedure for flash memory.
In the case of the standard command of the e Engineering Council, writing and erasing are performed by repeating a procedure of writing predetermined data to a predetermined address four to six times. For example, the procedure for writing to a specific address in word units is performed by writing to a flash memory four times, as shown in S1 to S4 in FIG.

【0006】ここで、従来のシステムでは、上記フラッ
シュメモリに格納されたデータに異常があるか否かを判
定する際、例えば、チェックサムなどを用いて、フラッ
シュメモリに書き込むデータを冗長化しておくと共に、
システムの起動時などに、フラッシュメモリに格納され
たデータからチェックサムを算出し、データに異常があ
るか否かを判定している。
Here, in the conventional system, when it is determined whether or not there is an abnormality in the data stored in the flash memory, data to be written to the flash memory is made redundant by using, for example, a checksum. Along with
When the system is started, a checksum is calculated from the data stored in the flash memory, and it is determined whether or not the data is abnormal.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、冗長化
されたデータを用いてデータ異常を検出する場合、デー
タ異常の箇所が多いときには、計算結果が偶然一致し
て、データの異常を検出できないことがある。また、デ
ータ異常の範囲が広い場合には、保存しているチェック
サムの値自体も破壊される虞れがある。この場合も、デ
ータ異常を検出できない。
However, when a data abnormality is detected using redundant data, when there are many data abnormalities, the calculation results may coincide with each other and the data abnormality cannot be detected. is there. If the range of data abnormality is wide, the stored checksum value itself may be destroyed. Also in this case, data abnormality cannot be detected.

【0008】ここで、フラッシュメモリは、デバイスの
信頼性が向上しているため、正常に書き込みが終了すれ
ば、殆どの場合、格納したデータに異常が発生しない。
ところが、例えば、停電や、使用者の操作ミスなどによ
って、データの書き込み(消去)中に電源が切れた場合
には、確実にデータが破壊されてしまう。また、上述し
たように、セクタ単位でデータが消去されるため、破壊
されるデータの範囲は、セクタ単位に及ぶことが多く、
フラッシュメモリ全体のデータが破壊されることもあ
る。したがって、上記従来の方法では、データ異常を検
出できない可能性がある。
Here, in the flash memory, since the reliability of the device is improved, if the writing is completed normally, in most cases, no abnormality occurs in the stored data.
However, if the power is turned off during data writing (erasing) due to, for example, a power failure or a user operation error, the data is surely destroyed. As described above, since data is erased in sector units, the range of data to be destroyed often extends in sector units.
Data in the entire flash memory may be destroyed. Therefore, there is a possibility that data abnormality cannot be detected by the above-described conventional method.

【0009】さらに、チェックサムやCRC( Cyclic
Redundancy Check)符号などを用いてデータ異常を検出
する場合には、冗長化されたデータ全てを計算しない
と、データ異常が発生しているか否かを判定できない。
近年では、集積度の向上に伴って、フラッシュメモリの
記憶容量も向上しているため、判定に要する時間も増大
している。この結果、システムの起動時間が長くなると
いう問題も生じている。
Further, checksum and CRC (Cyclic
When a data abnormality is detected using a code (Redundancy Check) or the like, it is not possible to determine whether or not a data abnormality has occurred unless all of the redundant data is calculated.
In recent years, since the storage capacity of the flash memory has been improved with the improvement in the degree of integration, the time required for determination has also increased. As a result, there is a problem that the system startup time is prolonged.

【0010】ここで、上述したように、フラッシュメモ
リには、プログラムや初期データあるいは設定データな
ど、システムが正常に動作するために不可欠のデータが
格納されていることが多い。したがって、データ異常を
検出できなかった場合に被る被害は大きく、短時間かつ
確実にデータ異常を検出することが強く求められてい
る。
Here, as described above, the flash memory often stores data, such as programs, initial data, and setting data, which are essential for the normal operation of the system. Therefore, if data abnormality is not detected, the damage is large, and it is strongly required to detect data abnormality in a short time and reliably.

【0011】本発明は、上記の問題点に鑑みてなされた
ものであり、その目的は、フラッシュメモリに格納され
ているデータの異常を確実に検出可能なフラッシュメモ
リの異常検出回路を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide a flash memory abnormality detection circuit capable of reliably detecting an abnormality in data stored in the flash memory. It is in.

【0012】[0012]

【課題を解決するための手段】請求項1の発明に係るフ
ラッシュメモリの異常検出回路は、上記課題を解決する
ために、フラッシュメモリへデータを書き込む際の書き
込み手順を監視する監視手段と、上記書き込み手順を記
憶すると共に、上記フラッシュメモリへ電力が供給され
ていない間であっても、記憶した書き込み手順を保持す
る手順記憶手段とを備えていることを特徴としている。
According to a first aspect of the present invention, there is provided a flash memory abnormality detection circuit for monitoring a writing procedure when writing data to a flash memory. It is characterized by comprising a procedure storage means for storing the write procedure and for storing the stored write procedure even when power is not supplied to the flash memory.

【0013】上記構成において、フラッシュメモリへデ
ータを書き込む際、手順記憶手段は、書き込み手順を記
憶している。ここで、フラッシュメモリへデータを書き
込んでいる最中に、フラッシュメモリの電源が遮断され
ると、フラッシュメモリに格納されたデータは、破壊さ
れる。一方、上記手順記憶手段は、例えば、バックアッ
プ電源などによって、それまでに格納された書き込み手
順を保持しつづける。したがって、当該書き込み手順を
参照することにより、前回の電源遮断が、データを書き
込んでいる最中に発生したか否かを判定できる。この結
果、書き込み途中の電源断に起因するフラッシュメモリ
のデータ破壊を確実に検出でき、フラッシュメモリを使
用するシステムの信頼性を向上できる。
In the above configuration, when data is written to the flash memory, the procedure storage means stores a write procedure. Here, if the power of the flash memory is turned off while data is being written to the flash memory, the data stored in the flash memory is destroyed. On the other hand, the procedure storage means keeps storing the write procedure stored up to that time by, for example, a backup power supply. Therefore, by referring to the writing procedure, it is possible to determine whether or not the previous power shutdown occurred during the data writing. As a result, it is possible to reliably detect data destruction of the flash memory due to power interruption during writing, and to improve the reliability of a system using the flash memory.

【0014】さらに、上記書き込み手順を格納する際に
必要な記憶容量は、フラッシュメモリの記憶容量に比べ
て極めて少ない。したがって、フラッシュメモリに格納
されたデータからチェックサムなどを算出してデータ異
常を検出する場合に比べて、短い時間でデータ異常を検
出できる。
Further, the storage capacity required for storing the above-mentioned writing procedure is extremely smaller than the storage capacity of the flash memory. Therefore, the data abnormality can be detected in a shorter time as compared with the case where the data sum is calculated from the data stored in the flash memory to detect the data abnormality.

【0015】なお、上記書き込み手順は、フラッシュメ
モリに格納されているデータを変更するための手順であ
れば、例えば、データを指定して書き込む際の手順でも
よいし、例えば、0リセットなど、所定のデータを書き
込む際の手順でもよい。
The writing procedure may be a procedure for changing the data stored in the flash memory, for example, a procedure for specifying and writing data, or a predetermined procedure such as resetting to zero. May be the procedure for writing the data.

【0016】また、請求項2の発明に係るフラッシュメ
モリの異常検出回路は、請求項1記載の発明の構成にお
いて、さらに、データの書き込み時に上記フラッシュメ
モリへ順次入力される各書き込みコマンドに対応し、よ
り少ないビット幅のコードを生成するコード生成手段を
備え、上記手順記憶手段は、上記コードを順次格納する
ことを特徴としている。
According to a second aspect of the present invention, in the flash memory abnormality detecting circuit according to the first aspect of the present invention, the abnormality detecting circuit further supports each write command sequentially input to the flash memory when data is written. , Code generation means for generating a code having a smaller bit width, wherein the procedure storage means sequentially stores the codes.

【0017】上記構成によれば、書き込みコマンド群に
代えて、各コマンドに対応したコード群が格納されるの
で、手順記憶手段に書き込みコマンドをそのまま格納す
る場合に比べて、必要な記憶容量を削減できる。したが
って、データ異常を検出する際の時間をさらに短縮でき
ると共に、書き込み手順を保持する際に必要なエネルギ
を削減できる。
According to the above configuration, the code group corresponding to each command is stored instead of the write command group, so that the required storage capacity is reduced as compared with the case where the write command is stored in the procedure storage means as it is. it can. Therefore, the time required to detect a data abnormality can be further reduced, and the energy required for maintaining the writing procedure can be reduced.

【0018】加えて、例えば、8ビットのデータ幅な
ど、同時に書き込み可能なデータバスの幅が狭い記憶素
子しか使用できない場合であっても、1度の書き込みで
コードを格納できるので、使用する記憶素子の数を削減
できる。この結果、書き込み手順を保持する際に必要な
エネルギをさらに削減でき、製造時のコストを削減でき
る。
In addition, even when only a storage element having a narrow data bus width, such as an 8-bit data width, can be used, a code can be stored by one writing. The number of elements can be reduced. As a result, the energy required for maintaining the writing procedure can be further reduced, and the manufacturing cost can be reduced.

【0019】一方、請求項3の発明に係るフラッシュメ
モリの異常検出回路は、請求項1記載の発明の構成にお
いて、上記手順記憶手段は、書き込み手順として、デー
タの書き込み時にフラッシュメモリが取りうる状態のう
ち、フラッシュメモリの現在の状態を記憶すると共に、
上記フラッシュメモリの異常検出回路は、さらに、上記
手順記憶手段に格納された状態と、当該フラッシュメモ
リへ新たに入力される書き込みコマンドとに基づいて、
上記手順記憶手段に格納されている状態を更新する状態
遷移手段を備えていることを特徴としている。
According to a third aspect of the present invention, in the flash memory abnormality detecting circuit according to the first aspect of the present invention, the procedure storing means may store the flash memory in a state that the flash memory can take at the time of data writing as a writing procedure. Of these, while storing the current state of the flash memory,
The flash memory abnormality detection circuit further includes a state stored in the procedure storage unit and a write command newly input to the flash memory.
It is characterized by comprising state transition means for updating the state stored in the procedure storage means.

【0020】上記構成では、手順記憶手段がフラッシュ
メモリの現在の状態を記憶しているので、各書き込みコ
マンドを順次格納する場合に比べて、必要な記憶容量を
削減できる。したがって、データ異常を検出する際の時
間をさらに短縮できると共に、書き込み手順を保持する
際に必要なエネルギを削減できる。
In the above configuration, since the procedure storage means stores the current state of the flash memory, the required storage capacity can be reduced as compared with the case where each write command is stored sequentially. Therefore, the time required to detect a data abnormality can be further reduced, and the energy required for maintaining the writing procedure can be reduced.

【0021】ところで、演算処理装置は、プログラムに
ミス(バグ)があった場合や、入出力処理が、特定のタ
イミングで組み合わされた場合など、種々の要因で暴走
し、誤動作する虞れがある。特に、パーソナルコンピュ
ータなど、定型化されていない処理を行うシステムで
は、処理全てが正常に動作するか否かを検証することが
難しく、定型処理のみを行うシステムに比べて暴走する
可能性が高い。
The arithmetic processing unit may run out of control due to various factors, such as when there is a mistake (bug) in the program or when the input / output processing is combined at a specific timing. . In particular, in a system such as a personal computer that performs non-standardized processing, it is difficult to verify whether or not all processing operates normally, and it is more likely that a runaway will occur than in a system that performs only standardized processing.

【0022】通常、暴走時には、電源を遮断した後、再
度電源を投入するなどの復帰処理が行われる。ところ
が、暴走時には、演算処理装置は、予期しない動作を行
うので、フラッシュメモリへアクセスを繰り返し、偶
然、フラッシュメモリのデータを破壊する虞れがある。
したがって、暴走時には、なるべく早い段階で復帰処理
を行わないと、フラッシュメモリのデータが破壊され、
正常動作に復帰できなくなる可能性がある。
Normally, during runaway, a return process such as turning off the power and turning on the power again is performed. However, at the time of runaway, the arithmetic processing unit performs an unexpected operation, so that there is a possibility that data in the flash memory is accidentally destroyed by repeatedly accessing the flash memory.
Therefore, during runaway, if the recovery process is not performed as early as possible, the data in the flash memory will be destroyed,
It may not be possible to return to normal operation.

【0023】これに対して、請求項4の発明に係るフラ
ッシュメモリの異常検出回路は、請求項3記載の発明の
構成において、上記フラッシュメモリへ新たに入力され
る書き込みコマンドが、上記手順記憶手段に格納された
状態では受け付け不可能な場合、不正な手順で上記フラ
ッシュメモリがアクセスされたと判定し、当該フラッシ
ュメモリのデータをアクセスする演算処理装置へ通知す
る不正手順通知手段を備えていることを特徴としてい
る。
According to a fourth aspect of the present invention, in the flash memory abnormality detecting circuit according to the third aspect of the present invention, the write command newly input to the flash memory includes the procedure storing means. If the flash memory cannot be accepted in the state stored in the flash memory, it is determined that the flash memory has been accessed by an illegal procedure, and an unauthorized procedure notifying means for notifying an arithmetic processing unit that accesses data of the flash memory is provided. Features.

【0024】上記構成では、フラッシュメモリが不正な
手順でアクセスされた場合、不正手順通知手段は、演算
処理装置へ通知する。それゆえ、演算処理装置は、自ら
が暴走していることを認識でき、例えば、再起動するな
ど、適切な処置を講ずることができる。この結果、演算
処理装置が暴走した場合であっても、フラッシュメモリ
のデータを確実に保護でき、フラッシュメモリを使用す
るシステムの信頼性をさらに向上できる。
In the above configuration, when the flash memory is accessed by an unauthorized procedure, the unauthorized procedure notifying unit notifies the arithmetic processing unit. Therefore, the arithmetic processing device can recognize that it is out of control, and can take appropriate measures such as, for example, restarting. As a result, even if the arithmetic processing unit runs away, the data in the flash memory can be reliably protected, and the reliability of the system using the flash memory can be further improved.

【0025】また、上記構成では、フラッシュメモリへ
の不正アクセスによって、演算処理装置の暴走を検出し
ているので、フラッシュメモリの異常検出回路と、演算
処理装置の暴走を監視する回路とを別に設ける場合に比
べて、回路の構成を簡略化できる。
Further, in the above configuration, runaway of the arithmetic processing unit is detected by illegal access to the flash memory. Therefore, an abnormality detection circuit for the flash memory and a circuit for monitoring runaway of the arithmetic processing unit are provided separately. As compared with the case, the configuration of the circuit can be simplified.

【0026】ところで、異常を検出する部材は、例え
ば、演算処理装置などであってもよい。この場合、演算
処理装置は、フラッシュメモリのデータを処理する場合
と、データの異常を検出する場合との双方に使用される
ので、演算処理装置を含むシステム全体の構成を簡略化
できる。ところが、演算処理装置がフラッシュメモリに
格納されたプログラムによって異常を検出している場
合、データが破壊される範囲が広く、上記プログラムも
破壊されると、データの異常を検出できなくなる虞れが
ある。
The member for detecting an abnormality may be, for example, an arithmetic processing unit. In this case, the arithmetic processing device is used both for processing data in the flash memory and for detecting data abnormality, so that the configuration of the entire system including the arithmetic processing device can be simplified. However, when the arithmetic processing unit detects an abnormality by a program stored in the flash memory, a range in which data is destroyed is wide, and if the program is also destroyed, there is a possibility that an abnormality in the data cannot be detected. .

【0027】これに対して、請求項5の発明に係るフラ
ッシュメモリの異常検出回路は、請求項1、2、3また
は4記載の発明の構成において、上記フラッシュメモリ
のデータをアクセスする演算処理装置が起動したとき
に、上記手順記憶手段に記憶した書き込み手順を参照し
て、当該フラッシュメモリの書き込み時に異常が発生し
たか否かを判定し、上記演算処理装置へ通知する異常通
知手段を備えていることを特徴としている。
According to a fifth aspect of the present invention, there is provided a flash memory abnormality detecting circuit according to the first, second, third, or fourth aspect of the present invention, wherein the arithmetic processing unit accesses data of the flash memory. When the device is activated, the device includes an abnormality notifying unit that determines whether or not an abnormality has occurred during writing to the flash memory with reference to the writing procedure stored in the procedure storing unit and notifies the arithmetic processing unit. It is characterized by having.

【0028】上記構成では、演算処理装置とは別に設け
られた異常通知手段で異常を検出しているので、フラッ
シュメモリのデータが破壊される際の範囲に拘わらず、
確実にデータ異常を検出でき、フラッシュメモリを使用
するシステムの信頼性をさらに向上できる。
In the above configuration, since the abnormality is detected by the abnormality notification means provided separately from the arithmetic processing unit, regardless of the range in which the data in the flash memory is destroyed,
The data abnormality can be reliably detected, and the reliability of the system using the flash memory can be further improved.

【0029】[0029]

【発明の実施の形態】〔第1の実施形態〕本発明の一実
施形態について図1ないし図7に基づいて説明すると以
下の通りである。すなわち、本発明に係るフラッシュメ
モリの異常検出回路は、フラッシュメモリに格納される
データの異常を検出する回路であって、例えば、パーソ
ナルコンピュータなど、フラッシュメモリを使用したシ
ステムに広く適用できる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS [First Embodiment] An embodiment of the present invention will be described below with reference to FIGS. That is, the abnormality detection circuit of the flash memory according to the present invention is a circuit for detecting an abnormality of data stored in the flash memory, and can be widely applied to a system using the flash memory such as a personal computer.

【0030】例えば、図1に示すように、本実施形態に
係るシステム1は、CPU(演算処理装置)2とフラッ
シュメモリ3と、システム1全体に電力を供給するシス
テム電源4とを有するコンピュータシステムである。上
記CPU2とフラッシュメモリ3とは、アドレスバスA
cpu、データバスDcpuおよび制御バスCcpuに
て、互いに接続されており、CPU2は、フラッシュメ
モリ3に格納されているデータを読み出す場合、アドレ
スバスAcpuにて、当該データが格納されているアド
レスを指示すると共に、制御バスCcpuにて、フラッ
シュメモリ3へ読み出しを指示する。一方、フラッシュ
メモリ3は、与えられたアドレスに格納されたデータを
データバスDcpuへ出力する。これにより、CPU2
は、フラッシュメモリ3の所望のアドレスからデータを
読み出すことができる。
For example, as shown in FIG. 1, a system 1 according to this embodiment includes a computer system having a CPU (arithmetic processing unit) 2, a flash memory 3, and a system power supply 4 for supplying power to the entire system 1. It is. The CPU 2 and the flash memory 3 are connected to an address bus A
The CPU 2 is connected to each other via cpu, a data bus Dcpu, and a control bus Ccpu. When reading data stored in the flash memory 3, the CPU 2 specifies an address at which the data is stored via an address bus Acpu. At the same time, the control bus Ccpu instructs the flash memory 3 to read. On the other hand, the flash memory 3 outputs the data stored at the given address to the data bus Dcpu. Thereby, the CPU 2
Can read data from a desired address of the flash memory 3.

【0031】また、上記フラッシュメモリ3は、データ
を書き込む場合、メモリセルの構造上の制限から、メモ
リセルに格納されたデータを一度消去してから所望のデ
ータを書き込む必要があり、例えば、プログラムデータ
や設定データなど、作業用のデータに比べて書換え頻度
が少ないデータを格納するために使用される。したがっ
て、メモリセルに書き込まれたデータが不用意に変更さ
れないように、所定の手順の書き込み/消去コマンドが
用意されている。また、メモリセルを簡略化するため
に、メモリセルの消去は、複数のメモリセル(セクタ)
毎に行うようになっている。本実施形態に係るフラッシ
ュメモリ3は、例えば、以下の表1および表2に示すよ
うに、JEDEC標準コマンドにて、データを書き込
み、あるいは、消去できる。
In the flash memory 3, when writing data, it is necessary to erase the data stored in the memory cell once and then write the desired data due to the structural limitation of the memory cell. It is used to store data such as data and setting data, which is rewritten less frequently than work data. Therefore, a write / erase command of a predetermined procedure is prepared so that data written in the memory cell is not inadvertently changed. In order to simplify the memory cell, erasing of the memory cell is performed by a plurality of memory cells (sectors).
This is done every time. In the flash memory 3 according to the present embodiment, for example, as shown in Tables 1 and 2 below, data can be written or erased using JEDEC standard commands.

【0032】[0032]

【表1】 [Table 1]

【0033】[0033]

【表2】 [Table 2]

【0034】なお、上記表1および表2において、RA
およびRDは、読み出しアドレスおよび読み出しデータ
を示しており、PAおよびPDは、書き込みアドレスお
よび書き込みデータを示している。また、SAは、アド
レスビットA17〜A12の組み合わせからなる消去ア
ドレスであり、個々のセクタを特定できる。さらに、上
記表1および表2の他に、フラッシュメモリ3のデータ
バスへ”B0H”を印加することによって、セクタ消去
一時停止コマンドが指定され、上記セクタ消去一時停止
コマンドを発行した後、”30H”を印加することによ
って、セクタ消去を再開できる。
In Tables 1 and 2, RA
And RD indicate a read address and read data, and PA and PD indicate a write address and write data. SA is an erase address composed of a combination of address bits A17 to A12, and can specify individual sectors. Further, in addition to the above Tables 1 and 2, by applying "B0H" to the data bus of the flash memory 3, a sector erase suspend command is designated, and after the sector erase suspend command is issued, "30H" is issued. ”Can restart the sector erase.

【0035】したがって、例えば、あるアドレスa1
へ、ワード単位のデータd1を書き込む場合は、図2に
示すように、1番目から3番目のライトサイクルにて、
CPU2は、フラッシュメモリ3に、ワード単位のプロ
グラムを示すコマンド(アドレス/データ)として、”
5555H/AAH”、”2AAAH/55H”およ
び”5555H/A0H”を順次与える(t1〜t3の
時点)。その後、4番目のライトサイクルにて、所望の
アドレスa1とデータd1とをフラッシュメモリ3へ与
えると、当該アドレスa1にデータd1が書き込まれる
(t4の時点)。ここで、フラッシュメモリ3は、上記
4番目のライトサイクルが終了しても、フラッシュメモ
リ3内部で書き込みや消去の処理を行っている。本実施
形態に係るフラッシュメモリ3は、内部処理を行ってい
る間中、例えば、ローレベルなど、決められたレベルの
BUSY信号を出力するように構成されており、内部処
理中か否かを外部に通知できる。
Therefore, for example, a certain address a1
When writing the data d1 in word units, as shown in FIG. 2, in the first to third write cycles,
The CPU 2 stores a command (address / data) indicating a program in units of words in the flash memory 3 as “command (address / data)”.
5555H / AAH "," 2AAAH / 55H ", and" 5555H / A0H "are sequentially given (at times t1 to t3), and the desired address a1 and data d1 are written to the flash memory 3 in the fourth write cycle. Then, the data d1 is written to the address a1 (at time t4), and the flash memory 3 performs the writing and erasing processes inside the flash memory 3 even after the fourth write cycle is completed. The flash memory 3 according to the present embodiment is configured to output a BUSY signal of a predetermined level, for example, a low level during the execution of the internal processing. Can be notified to the outside.

【0036】さらに、本実施形態に係るシステム1は、
図1に示すように、フラッシュメモリ3への書き込み手
順を監視して異常の発生を検出する異常検出回路11を
備えている。当該異常検出回路11には、フラッシュメ
モリ3へのコマンドを示すコードを順次格納する記憶素
子(手順記憶手段)12と、上記アドレスバスAcp
u、データバスDcpuおよび制御バスCcpuを監視
して、フラッシュメモリ3へのコマンドを検出すると共
に、検出したコマンドをコード化して上記記憶素子12
へ書き込むシーケンサ(監視手段)13と、上記システ
ム電源4とは独立して設けられたバックアップ電源14
とが設けられている。さらに、上記シーケンサ13は、
フラッシュメモリ3からのBUSY信号が内部処理中を
示した後で内部処理終了を示した場合に、正常終了を示
すコード(終了コード)を記憶素子12へ書き込むこと
ができる。また、上記バックアップ電源14は、システ
ム電源4が遮断されていても、コードを書き込んでいる
間中、シーケンサ13と記憶素子12とが正常に動作で
きるように、両者へ電力を供給すると共に、システム電
源4が遮断されている間、記憶素子12が書き込まれた
コードを保持できるように、記憶素子12へ電力を供給
し続けることができる。
Further, the system 1 according to the present embodiment
As shown in FIG. 1, there is provided an abnormality detection circuit 11 for monitoring a writing procedure to the flash memory 3 and detecting occurrence of an abnormality. The abnormality detection circuit 11 includes a storage element (procedure storage means) 12 for sequentially storing codes indicating commands to the flash memory 3 and the address bus Acp.
u, the data bus Dcpu, and the control bus Ccpu, to detect a command to the flash memory 3 and to encode the detected command,
Sequencer (monitoring means) 13 for writing data to a backup power supply 14 provided independently of the system power supply 4
Are provided. Further, the sequencer 13
When the BUSY signal from the flash memory 3 indicates that the internal processing is being performed after the BUSY signal indicates that the internal processing is being performed, a code (end code) indicating a normal end can be written to the storage element 12. The backup power supply 14 supplies power to both the sequencer 13 and the storage element 12 so that the sequencer 13 and the storage element 12 can operate normally while the code is being written, even when the system power supply 4 is shut off. While the power supply 4 is shut off, power can be continuously supplied to the storage element 12 so that the storage element 12 can hold the written code.

【0037】上記構成では、記憶素子12は、フラッシ
ュメモリ3へ順次与えられたコマンドをコードとして格
納する。したがって、通常の場合、すなわち、フラッシ
ュメモリ3へのデータ書き込みが正常に終了した後でシ
ステム1を停止させた場合、記憶素子12には、直前の
書き込み手順を示すコード群と、終了コードとが格納さ
れる。
In the above configuration, the storage element 12 stores commands sequentially applied to the flash memory 3 as codes. Therefore, in the normal case, that is, when the system 1 is stopped after the data writing to the flash memory 3 ends normally, a code group indicating the immediately preceding writing procedure and an end code are stored in the storage element 12. Is stored.

【0038】ところが、例えば、運用中に停電が発生し
てシステム電源4が遮断された場合など、フラッシュメ
モリ3へデータを書き込んでいる最中に、システム1が
停止した場合は、記憶素子12には、システム1の停止
時点までに指示された書き込み手順を示すコード群のみ
が格納され、残余の書き込み手順を示すコード群や終了
コードは格納されない。この場合、フラッシュメモリ3
は、コマンドの一部または全部を受け取っているので、
セクタ単位のデータは、消去あるいは一部分の書き込み
によって破壊されている。したがって、例えば、システ
ム1の起動時などに、CPU2が記憶素子12に格納さ
れているコード群を読み出し、終了コードが格納されて
いるか否かを判定することによって、書き込み途中の電
源断に起因するデータ破壊を確実に検出できる。
However, when the system 1 is stopped while data is being written to the flash memory 3, for example, when a power failure occurs during operation and the system power supply 4 is cut off, the storage element 12 Stores only the code group indicating the writing procedure instructed until the system 1 stops, and does not store the code group indicating the remaining writing procedure or the end code. In this case, the flash memory 3
Has received some or all of the command,
Data in sector units is destroyed by erasing or partial writing. Therefore, for example, when the system 1 is started, the CPU 2 reads the code group stored in the storage element 12 and determines whether or not the end code is stored. Data corruption can be reliably detected.

【0039】異常を検出した場合、CPU2は、例え
ば、以下のような復帰処理によって、フラッシュメモリ
3のデータを正しいデータに書き換える。すなわち、C
PU2は、フラッシュメモリ3のデータが異常であるこ
とを表示したり、ネットワークを介して接続されている
外部機器へ通知する。また、CPU2は、ネットワーク
を介して、正しいデータが格納されたネットワークサー
バへアクセスして、当該データをダウンロードする。さ
らに、ダウンロードされたデータがフラッシュメモリ3
に書き込まれた後、CPU2は、システム1を再起動さ
せる。なお、正しいデータが格納されたネットワークサ
ーバのアドレスや、当該ネットワークサーバへ接続する
ためのプログラムは、例えば、ROMや別のフラッシュ
メモリ(いずれも図示せず)などに格納されており、C
PU2は、図1に示すフラッシュメモリ3に異常が発生
しても、当該ネットワークへアクセスできる。
When an abnormality is detected, the CPU 2 rewrites the data in the flash memory 3 to correct data by, for example, the following recovery processing. That is, C
The PU 2 displays that the data in the flash memory 3 is abnormal, or notifies the external device connected via the network. Further, the CPU 2 accesses a network server in which correct data is stored via a network, and downloads the data. Furthermore, the downloaded data is stored in the flash memory 3
After that, the CPU 2 restarts the system 1. The address of the network server storing the correct data and the program for connecting to the network server are stored in, for example, a ROM or another flash memory (neither is shown).
The PU 2 can access the network even if an abnormality occurs in the flash memory 3 shown in FIG.

【0040】上述したように、書き込み手順は、多くと
も6回のコマンドなので、記憶素子12へコマンド自体
を格納する場合であっても、書き込み手順の格納に必要
な記憶容量は少なく、データ破壊の検出に必要な時間は
極めて短い。特に、本実施形態では、コマンドをコード
化して格納しているので、記憶容量をさらに削減でき
る。一方、フラッシュメモリ3は、書き込みが正常に終
了した場合、格納されたデータを確実に保持し続けるこ
とができる。この結果、例えば、チェックサムなど、フ
ラッシュメモリ3に書き込まれたデータによって、デー
タ異常を検出する従来技術に比べて、より短時間かつ確
実にデータの異常を検出できる。
As described above, the write procedure is a command of at most six times. Therefore, even when the command itself is stored in the storage element 12, the storage capacity required for storing the write procedure is small, and data destruction is not performed. The time required for detection is extremely short. In particular, in the present embodiment, the commands are coded and stored, so that the storage capacity can be further reduced. On the other hand, when the writing is normally completed, the flash memory 3 can reliably hold the stored data. As a result, for example, a data abnormality such as a checksum can be detected in a shorter time and more reliably than the conventional technique of detecting a data abnormality by using data written in the flash memory 3.

【0041】ここで、記憶素子12は、フラッシュメモ
リ3の各ライトサイクル毎に、シーケンサ13が出力す
るコードを格納可能で、かつ、システム電源4の遮断中
にデータを保持できれば、どのような記憶素子を用いて
も本実施形態と同様の効果が得られる。なお、記憶素子
への書き込み速度が遅い場合は、フラッシュメモリ3に
ウェイトを挿入して、各ライトサイクルを長くすれば、
上記条件を満足できる。ただし、この場合は、フラッシ
ュメモリ3への書き込み時間が長くなるので、記憶素子
は、ウェイトを挿入しない場合であっても、上記条件を
満足できる書き込み速度を持った素子である方がよい。
The storage element 12 can store a code output from the sequencer 13 for each write cycle of the flash memory 3 and can hold data while the system power supply 4 is shut off. Even if an element is used, the same effect as in the present embodiment can be obtained. If the writing speed to the storage element is low, a wait is inserted into the flash memory 3 to lengthen each write cycle.
The above conditions can be satisfied. However, in this case, the writing time to the flash memory 3 becomes longer, and therefore, it is preferable that the storage element be an element having a writing speed that satisfies the above-mentioned condition even when no weight is inserted.

【0042】さらに、上記条件を満足する記憶素子のう
ち、できるだけ低コストで、データを保持するためのエ
ネルギが少ない方が望ましい。以下では、これらの条件
を満たす好適な記憶素子として、バックアップされたS
RAMを使用した場合について、図3を参照しながら詳
細に説明する。
Further, among the storage elements satisfying the above conditions, it is desirable that the cost for holding data is as low as possible and the energy for holding data is small. In the following, as a suitable storage element satisfying these conditions, the backed-up S
The case where a RAM is used will be described in detail with reference to FIG.

【0043】すなわち、当該構成例に係る異常検出回路
21において、手順記憶手段となるSRAM22は、バ
ックアップ電源となるバッテリ24にてバックアップさ
れている。一方、シーケンサ23は、コマンドに応じた
コードを生成するコード生成部(コード生成手段)25
と、当該コードをSRAM22へ書き込む際のアドレス
などを制御するSRAM制御部26とを備えている。
That is, in the abnormality detection circuit 21 according to the configuration example, the SRAM 22 serving as the procedure storage means is backed up by the battery 24 serving as a backup power supply. On the other hand, the sequencer 23 includes a code generation unit (code generation unit) 25 that generates a code corresponding to the command.
And an SRAM control unit 26 for controlling an address and the like when the code is written to the SRAM 22.

【0044】上記SRAM制御部26は、コード生成部
25からコードが与えられる度に、SRAM22へ与え
るアドレス信号Aseqの値を1つ増加させる。また、
一連の書き込み手順の最後にて、終了コードが書き込ま
れると、例えば、SRAM22の最初のアドレスなど、
予め定められた値に、上記アドレス信号Aseqの値を
初期化する。さらに、SRAM制御部26は、図2に示
すように、上記アドレス信号Aseqの値と、コード生
成部25が生成するデータ信号Dseqの値とが安定し
た時点で、SRAM22へコード記録信号(図1に示す
書き込み制御信号)を出力し、コードを書き込むタイミ
ングを指示する。
The SRAM control unit 26 increases the value of the address signal Aseq to be supplied to the SRAM 22 by one each time a code is supplied from the code generation unit 25. Also,
When the end code is written at the end of a series of writing procedures, for example, the first address of the SRAM 22
The value of the address signal Aseq is initialized to a predetermined value. Further, as shown in FIG. 2, when the value of the address signal Aseq and the value of the data signal Dseq generated by the code generation unit 25 are stabilized, the SRAM control unit 26 sends the code recording signal (FIG. (Write control signal shown in FIG. 3), and instructs the timing of writing the code.

【0045】本実施形態に係るフラッシュメモリ3のコ
マンドは、上述の表1および表2に示すように、9種の
値のデータと、2種の値のアドレスとの組み合わせで表
されている。したがって、本実施形態に係るコード生成
部25は、デコードの一例として、以下の表3および表
4に示すように、コマンドのうちのデータをD0〜D3
の4ビットにコード化し、アドレスをD4,D5の2ビ
ットにコード化している。なお、以下の表3および表4
において、その他は、例えば、表1および表2におい
て、書き込みアドレスが与えられる場合など、アドレス
やデータが、コマンド以外の値の場合を示している。ま
た、表4は、ワード単位の書き込み(消去)コマンドの
みを示している。
The command of the flash memory 3 according to the present embodiment is represented by a combination of data of nine values and addresses of two values, as shown in Tables 1 and 2 described above. Therefore, as an example of decoding, the code generation unit 25 according to the present embodiment converts the data of the command into D0 to D3 as shown in Tables 3 and 4 below.
And the address is coded into two bits D4 and D5. Tables 3 and 4 below
In Table 1 and Table 2, "Other" indicates a case where the address or data has a value other than the command, such as a case where a write address is given. Table 4 shows only write (erase) commands in word units.

【0046】[0046]

【表3】 [Table 3]

【0047】[0047]

【表4】 [Table 4]

【0048】さらに、本実施形態では、上記D0〜D5
の6ビットに加えて、終了コードであるか否かを示すフ
ラグD6と、各コードが、前回の書き込み手順にて書き
込まれたコードであるか否かを示すフラグD7とが設け
られる。当該フラグD7は、一連の書き込み手順の間
は、同じ値であり、終了コードが記録される度に、値を
反転させる。したがって、手順を示すコードがオーバー
ライトされても、後述するように、前回書き込まれたコ
ードと、今回書き込んだコードとを区別できる。これら
のD0〜D7の8ビットによって、書き込み手順を示す
コードが作成される。
Further, in the present embodiment, D0 to D5
In addition to these 6 bits, a flag D6 indicating whether or not the code is an end code and a flag D7 indicating whether or not each code is a code written in the previous writing procedure are provided. The flag D7 has the same value during a series of writing procedures, and inverts the value each time an end code is recorded. Therefore, even if the code indicating the procedure is overwritten, it is possible to distinguish between the previously written code and the currently written code, as described later. A code indicating a write procedure is created by these eight bits D0 to D7.

【0049】上記コード生成部25は、例えば、図4に
示すように、データバスDcpuを監視して、フラッシ
ュメモリ3へのライトサイクルにおけるデータバスDc
puの値に基づき、上記表3に示す値のビットD0〜D
3を生成するデータエンコーダ25aと、アドレスバス
Acpuを監視して、フラッシュメモリ3へのライトサ
イクルにおけるアドレスバスAcpuの値に基づき、上
記表4に示す値のビットD4,D5を生成するアドレス
エンコーダ25bと、BUSY信号に基づいて、上記値
のフラグD6およびD7を生成するフラグ生成回路25
cとによって構成され、D0〜D7からなるコードをデ
ータ信号Dseqとして、図3に示すSRAM22に与
えることができる。フラッシュメモリ3のライトサイク
ルは、例えば、フラッシュメモリ3のチップセレクト信
号CS♯と、ライトイネーブル信号WE♯との論理積を
取るなどすれば識別できる。また、リセットを示すコマ
ンドが発行された場合、上記両エンコーダ25a・25
bは、フラグ生成回路25cへ指示して終了コードを生
成させる。なお、図4などにおいて、参照符号に付した
♯は、当該信号が負論理であることを示している。
The code generator 25 monitors the data bus Dcpu, for example, as shown in FIG.
Based on the value of pu, bits D0-D of the values shown in Table 3 above
3 and an address encoder 25b that monitors the address bus Acpu and generates the bits D4 and D5 having the values shown in Table 4 above based on the value of the address bus Acpu in the write cycle to the flash memory 3. And a flag generation circuit 25 for generating flags D6 and D7 of the above values based on the BUSY signal
c, and a code composed of D0 to D7 can be given as a data signal Dseq to the SRAM 22 shown in FIG. The write cycle of the flash memory 3 can be identified by, for example, taking the logical product of the chip select signal CS # of the flash memory 3 and the write enable signal WE #. When a command indicating reset is issued, the encoders 25a and 25
b instructs the flag generation circuit 25c to generate an end code. In addition, in FIG. 4 and the like, ♯ attached to a reference sign indicates that the signal is negative logic.

【0050】ところで、本実施形態では、CPU2は、
システム1の起動時などに、SRAM22に格納された
コード群を読み出す。ところが、フラッシュメモリ3の
書き込み時には、シーケンサ23が、SRAM22へア
ドレス信号Aseqおよびデータ信号Dseqを与えて
いるので、CPU2のアドレスバスAcpuとSRAM
22のアドレスバスAsramとを直接接続したり、C
PU2のデータバスDcpuと、SRAM22のデータ
バスDsramとを直接接続した場合、アドレスバスA
cpuの信号とアドレス信号Aseqとが衝突すると共
に、データバスDcpuの信号とデータ信号Dseqと
が衝突してしまう。
By the way, in this embodiment, the CPU 2
The code group stored in the SRAM 22 is read when the system 1 is activated. However, when writing to the flash memory 3, the sequencer 23 supplies the address signal Aseq and the data signal Dseq to the SRAM 22, so that the address bus Acpu of the CPU 2 and the SRAM
22 address bus Asram or C
When the data bus Dcpu of the PU 2 is directly connected to the data bus Dsram of the SRAM 22, the address bus A
The signal of cpu collides with the address signal Aseq, and the signal of the data bus Dcpu collides with the data signal Dseq.

【0051】したがって、本実施形態に係る異常検出回
路21では、衝突を回避するために、SRAM22は、
アドレスセレクタ27を介して、アドレスバスAcpu
と接続され、トライステートバッファであるデータバッ
ファ28を介して、データバスDcpuと接続されてい
る。上記アドレスセレクタ27は、例えば、CPU2が
SRAM22からコードを読み込む際のアドレスをデコ
ードした信号とリード信号RD♯との論理積から算出さ
れるSRAMリード信号RRDが、SRAM22からの
読み込みを示している場合、アドレスバスAcpuをS
RAM22へ印加し、それ以外の場合、SRAM22の
アドレスとして、アドレス信号Aseqを選択する。同
様に、データバッファ28は、SRAM22からの読み
込みを示している場合、SRAM22のデータをデータ
バスDcpuへ出力すると共に、それ以外の場合、デー
タバスDcpu側をハイインピーダンス状態に保つ。こ
れにより、シーケンサ23は、フラッシュメモリ3の書
き込み時において、CPU2からの信号の影響を受けず
にコードを書き込むことができる。一方、CPU2は、
通常のリードサイクルにおいて、シーケンサ23の影響
を受けることなく、SRAM22のコードを読み出すこ
とができる。
Therefore, in the abnormality detecting circuit 21 according to the present embodiment, in order to avoid a collision, the SRAM 22
Via an address selector 27, an address bus Acpu
And a data bus Dcpu via a data buffer 28 which is a tri-state buffer. The address selector 27 is, for example, when the SRAM read signal RRD calculated from the logical product of the signal obtained by decoding the address when the CPU 2 reads the code from the SRAM 22 and the read signal RD # indicates the reading from the SRAM 22. And the address bus Acpu to S
The voltage is applied to the RAM 22, otherwise, the address signal Aseq is selected as the address of the SRAM 22. Similarly, when the data buffer 28 indicates reading from the SRAM 22, the data buffer 28 outputs the data of the SRAM 22 to the data bus Dcpu, and otherwise keeps the data bus Dcpu in a high impedance state. Thus, the sequencer 23 can write a code at the time of writing to the flash memory 3 without being affected by a signal from the CPU 2. On the other hand, the CPU 2
In a normal read cycle, the code in the SRAM 22 can be read without being affected by the sequencer 23.

【0052】上記構成では、図2に示すように、一連の
コマンドがフラッシュメモリ3へ与えられた場合、シー
ケンサ23は、図5に示すようなコードをSRAM22
に順次書き込む(t1〜t5の期間)。また、フラッシ
ュメモリ3への書き込みが正常に出力した後、さらに、
一連のコマンドがフラッシュメモリ3へ与えられる場
合、シーケンサ23は、新たなコマンド群に応じたコー
ドをSRAM22へ書き込む(t6〜t10の期間)。
In the above configuration, as shown in FIG. 2, when a series of commands is given to the flash memory 3, the sequencer 23 writes a code as shown in FIG.
Are sequentially written (periods t1 to t5). After the writing to the flash memory 3 is normally output,
When a series of commands is given to the flash memory 3, the sequencer 23 writes a code corresponding to the new command group into the SRAM 22 (period t6 to t10).

【0053】ただし、t1〜t5の期間と、t6〜t1
0の期間とでは、フラグD7の値が互いに異なる値とな
っている。したがって、例えば、t5の時点とt6の時
点との間のように、書き込みが正常終了した後にシステ
ム1が停止する場合、SRAM22に格納されるコード
群は、図6に示すようになり、SRAM22において、
最初のアドレスから終了コードが格納されたアドレスま
での領域では、コードのフラグD7は、一致している。
これとは逆に、例えば、t7の時点など、書き込み中に
システム1が停止した場合、SRAM22のコード群
は、図7に示すようになり、最初のアドレスから終了コ
ードが格納されたアドレスまでの領域において、コード
のフラグD7の値が変化する。したがって、CPU2
は、SRAM22に格納されたコード群を読み出すこと
によって、書き込み中にシステム1が停止したか否かを
判定できる。この結果、書き込み中のシステム停止に起
因するフラッシュメモリ3のデータ異常を確実に検出で
きる。
However, the period from t1 to t5 and the period from t6 to t1
During the period of 0, the value of the flag D7 is different from each other. Therefore, for example, when the system 1 is stopped after the writing is normally completed, such as between the time t5 and the time t6, the code group stored in the SRAM 22 becomes as shown in FIG. ,
In the area from the first address to the address where the end code is stored, the code flag D7 matches.
Conversely, when the system 1 stops during writing, for example, at time t7, the code group of the SRAM 22 becomes as shown in FIG. 7, and the code group from the first address to the address where the end code is stored is shown. In the area, the value of the code flag D7 changes. Therefore, CPU2
Can read out the code group stored in the SRAM 22 to determine whether the system 1 has stopped during writing. As a result, a data abnormality in the flash memory 3 due to a system stop during writing can be reliably detected.

【0054】加えて、SRAM22に格納されたコード
群が正規の手順と異なっている場合、前回のシステム停
止時において、システム1が誤動作して、他の場所に書
き込むべきデータをフラッシュメモリ3へ誤って書き込
もうとしたことが判る。したがって、システム1の誤動
作に起因するフラッシュメモリ3のデータ異常も確実に
検出できる。
In addition, if the code group stored in the SRAM 22 is different from the normal procedure, the system 1 malfunctions and the data to be written to another location is erroneously stored in the flash memory 3 at the time of the previous system stop. You can see that I tried to write. Therefore, the data abnormality of the flash memory 3 due to the malfunction of the system 1 can be reliably detected.

【0055】また、上記コード群は、最大でも6バイト
なので、フラッシュメモリ3に書き込まれたデータをチ
ェックして、データ異常を検出する従来技術に比べて、
異常検出に必要なデータ量は少なく、高速にデータ異常
を検出できる。なお、書き込み時にフラッシュメモリ3
へ与えられるコマンドから、データが消去されるセクタ
を判定し、上記コードに加えて、当該セクタも記憶して
おけば、書き込み中に異常が発生した際、データ破壊の
虞れのあるセクタを特定できる。この場合、CPU2
は、フラッシュメモリ3に発生したデータ異常の範囲を
さらに的確に把握できるので、例えば、特定のセクタの
内容のみをダウンロードするなど、より的確な復帰処理
を講じることができる。
Since the above code group has a maximum of 6 bytes, the data written in the flash memory 3 is checked and compared with the prior art in which data abnormality is detected.
The amount of data required for abnormality detection is small, and data abnormality can be detected at high speed. When writing, the flash memory 3
Judgment of the sector from which the data is to be erased from the command given to the device, and storing the sector in addition to the above code, identifies the sector that may be destroyed when an error occurs during writing. it can. In this case, CPU2
Can more accurately grasp the range of data abnormalities that have occurred in the flash memory 3, so that more accurate recovery processing, such as downloading only the contents of a specific sector, can be taken.

【0056】ところで、図3に示す構成例では、コマン
ドをコード化して格納したが、各コマンドをSRAM2
2にそのまま記憶してもよい。ただし、この場合は、コ
マンドのビット幅がフラッシュメモリ3の有するアドレ
スバスの本数とデータバスの本数との和になるので、コ
マンドを一度に書き込もうとすると、SRAM22に
は、同じビット幅のデータバスが必要になる。この結
果、通常のデータバス幅を持つSRAM素子で、SRA
M22を構成した場合、SRAM素子の個数が増加して
しまう。一方、単一のSRAM素子を使用して、上記コ
マンドを時分割で書き込んだ場合、フラッシュメモリ3
のライトサイクル1回の間に複数回、SRAM素子にデ
ータを書き込む必要がある。したがって、フラッシュメ
モリ3の数倍の書き込み速度を有する高速のSRAM素
子が必要になる。いずれの場合であっても、SRAM素
子のコストと、バックアップに必要なエネルギとが増大
してしまう。
In the configuration example shown in FIG. 3, the commands are coded and stored.
2 may be stored as it is. However, in this case, since the bit width of the command is the sum of the number of address buses and the number of data buses of the flash memory 3, if an attempt is made to write a command at a time, the SRAM 22 has a data bus of the same bit width. Is required. As a result, an SRAM device having a normal data bus
When M22 is configured, the number of SRAM elements increases. On the other hand, when the above command is written in a time-division manner using a single SRAM element, the flash memory 3
It is necessary to write data to the SRAM element a plurality of times during one write cycle. Therefore, a high-speed SRAM device having a writing speed several times that of the flash memory 3 is required. In either case, the cost of the SRAM device and the energy required for backup increase.

【0057】これに対して、本実施形態では、コマンド
をコード化して格納しているので、フラッシュメモリ3
のライトサイクル毎に1回アクセス可能な中速のSRA
M素子1個で、SRAM22を構成できる。この結果、
異常検出回路11(21)のコストと、バックアップに
必要なエネルギとを抑えることができる。
On the other hand, in the present embodiment, since commands are coded and stored, the flash memory 3
Medium-speed SRA accessible once every write cycle
The SRAM 22 can be constituted by one M element. As a result,
The cost of the abnormality detection circuit 11 (21) and the energy required for backup can be reduced.

【0058】なお、図1に示す記憶素子12としては、
上記構成に限るものではなく、小容量で多ビットのSR
AMをASICなどにて作成してもよい。この場合は、
通常のSRAM素子を利用する場合に比べて記憶容量が
少なく、かつ、SRAMのビット幅を各コマンドを一度
に書き込み可能な幅に設定できる。したがって、特にコ
ード化せずに、コマンド(アドレス/データ)をそのま
ま格納しても、バックアップに必要なエネルギを抑える
ことができる。
The storage element 12 shown in FIG.
The present invention is not limited to the above-described configuration, and has a small capacity
The AM may be created by an ASIC or the like. in this case,
The storage capacity is smaller than when a normal SRAM element is used, and the bit width of the SRAM can be set to a width that allows each command to be written at once. Therefore, even if the command (address / data) is stored as it is without coding, the energy required for backup can be suppressed.

【0059】〔第2の実施形態〕ところで、上記第1の
実施形態では、異常検出回路11(21)に格納された
コード群に基づいて、CPU2がデータの異常を検出す
る場合を例に説明したが、異常を検出する部材は、これ
に限るものではない。また、異常検出回路11(21)
には、与えられた書き込み指示をデコードしたデータを
順次格納したが、書き込み手順を書き込む方法も、これ
に限るものではない。本実施形態では、他の検出方法と
して、フラッシュメモリが取りうる状態のうち、現在の
状態を格納する場合を例として説明する。また、本実施
形態では、異常を検出する部材として、CPUとは別
に、上記状態遷移を監視して、CPUへ異常を通知する
部材を設けた場合を例にして説明する。
[Second Embodiment] By the way, in the first embodiment, the case where the CPU 2 detects a data abnormality based on a code group stored in the abnormality detection circuit 11 (21) will be described as an example. However, the member that detects the abnormality is not limited to this. Further, the abnormality detection circuit 11 (21)
In this example, data obtained by decoding a given write instruction is sequentially stored, but the method of writing the write procedure is not limited to this. In the present embodiment, as another detection method, a case where the current state is stored among the states that the flash memory can take will be described as an example. Further, in the present embodiment, a case will be described as an example in which a member that monitors the state transition and notifies the CPU of the abnormality is provided separately from the CPU as a member for detecting the abnormality.

【0060】具体的には、図8に示すように、本実施形
態に係るシステム1aは、図1に示す異常検出回路11
に代えて、異常を検出時にCPU2へ異常を通知する異
常検出回路31を備えている。なお、図1と同様の機能
を有する部材には、同じ参照符号を付して説明を省略す
る。
More specifically, as shown in FIG. 8, the system 1a according to the present embodiment comprises the abnormality detection circuit 11 shown in FIG.
And an abnormality detection circuit 31 that notifies the CPU 2 of the abnormality when the abnormality is detected. Members having the same functions as those in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted.

【0061】本実施形態に係るシステム1aでは、フラ
ッシュメモリ3が受理可能なコマンドは、リセットを示
すコマンドRと、プログラムを示すコマンドC1〜C3
とに制限されており、フラッシュメモリ3が取りうる状
態として、図9に示す4つの状態が設定されている。1
つは、書き込みを正常終了して、次の書き込みを待ち受
けるIDLE状態であり、コマンドC1、C2およびC
3の順番で、プログラムを示すコマンド群を受け取るこ
とによって、フラッシュメモリ3の状態は、当該IDL
E状態から状態State1、State2およびSt
ate3へと順次遷移する。状態State3におい
て、フラッシュメモリ3が書き込みアドレスおよび書き
込みデータを受け取り、データを書き込んだ後、書き込
み終了を示すBUSY信号が出力されると、フラッシュ
メモリ3は、状態State3からIDLE状態へと遷
移する。また、各状態State1ないしState3
において、リセットコマンドRを受け取った場合、フラ
ッシュメモリ3は、IDLE状態へ移行する。なお、表
1および表2に示すように、フラッシュメモリ3自体
は、例えば、チップ消去コマンドなど、上記以外のコマ
ンドも受理可能であるが、本実施形態に係る異常検出回
路31は、これらのコマンドを不正なコマンドとして検
出する。
In the system 1a according to the present embodiment, the commands that can be accepted by the flash memory 3 include a command R indicating a reset and commands C1 to C3 indicating a program.
The four states shown in FIG. 9 are set as states that the flash memory 3 can take. 1
One is an IDLE state in which the writing is completed normally and the next writing is awaited, and commands C1, C2 and C
3, the state of the flash memory 3 is changed to the IDL by receiving a command group indicating a program.
From state E to states State1, State2 and St
transition to ate3. In the state State3, when the flash memory 3 receives the write address and the write data, writes the data, and outputs a BUSY signal indicating the end of the write, the flash memory 3 transits from the state State3 to the IDLE state. In addition, each state State1 to State3
, When the reset command R is received, the flash memory 3 shifts to the IDLE state. As shown in Tables 1 and 2, the flash memory 3 itself can receive other commands such as a chip erase command, for example, but the abnormality detection circuit 31 according to the present embodiment Is detected as an invalid command.

【0062】具体的には、上記異常検出回路31は、フ
ラッシュメモリ3へ与えられたコマンドC1〜C3およ
びRを識別し、各コマンドC1〜C3およびRに応じた
シーケンサ制御信号SEQを生成するデコーダ(監視手
段)32と、当該シーケンサ制御信号SEQが自らに保
持したフラッシュメモリ3の状態で受付可能な場合、当
該状態を新たな状態へと遷移させると共に、受付られな
い場合、CPU2へ異常通知信号を出力する動作監視シ
ーケンサ(手順記憶手段)33とを備えている。また、
図1と同様に、異常検出回路31には、バックアップ電
源34が設けられており、システム電源4遮断時におい
て、動作監視シーケンサ33に格納されている状態を保
持できる。
More specifically, the abnormality detection circuit 31 identifies the commands C1 to C3 and R given to the flash memory 3 and generates a sequencer control signal SEQ according to the commands C1 to C3 and R. (Monitoring means) 32, if the sequencer control signal SEQ can be accepted in the state of the flash memory 3 held by itself, the state is changed to a new state, and if not accepted, an abnormality notification signal is sent to the CPU 2. And an operation monitoring sequencer (procedure storage means) 33 for outputting Also,
As in FIG. 1, a backup power supply 34 is provided in the abnormality detection circuit 31, and the state stored in the operation monitoring sequencer 33 can be maintained when the system power supply 4 is shut off.

【0063】上記デコーダ32には、図10に示すよう
に、アドレスバスAcpuおよびデータバスDcpu
と、制御バスCcpuのうち、CPU2がデータを読み
込むことを示すリード信号RD♯と、書き込みを示すラ
イトイネーブル信号WE♯と、フラッシュメモリ3がア
クセスされていることを示すチップセレクト信号CS♯
とが入力されており、デコーダ32は、これらの信号に
基づいて、上記各コマンドC1〜C3およびRがフラッ
シュメモリ3に与えられた場合、シーケンサ制御信号S
EQとして、それぞれに対応する信号Sc1〜Sc3お
よびSrをハイレベルに設定できる。
As shown in FIG. 10, the decoder 32 has an address bus Acpu and a data bus Dcpu.
A read signal RD # indicating that the CPU 2 reads data, a write enable signal WE # indicating writing, and a chip select signal CS # indicating that the flash memory 3 is being accessed, of the control bus Ccpu.
When the commands C1 to C3 and R are given to the flash memory 3 based on these signals, the decoder 32 outputs the sequencer control signal S
The signals Sc1 to Sc3 and Sr corresponding to the respective EQs can be set to a high level.

【0064】一方、上記動作監視シーケンサ33は、図
11に示すように、フラッシュメモリ3からのBUSY
信号と、デコーダ32からのシーケンサ制御信号SEQ
とに基づいて、自らに格納しているフラッシュメモリ3
の状態を遷移させる状態遷移部(状態遷移手段)33a
と、システム1aの起動時に上記状態遷移部33aに格
納されている状態がIDLE状態ではなかった場合、フ
ラッシュメモリ3の書き込み中にシステム1aが終了し
たと判定して、CPU2に異常を通知する異常終了検出
部(異常通知手段)33bとを備えている。さらに、動
作監視シーケンサ33には、上記状態遷移部33aに格
納されている状態を判定する状態判定部33cと、当該
状態判定部33cの出力およびデコーダ32の出力に基
づいて、フラッシュメモリ3が不正な手順でアクセスさ
れたか否かを判定し、CPU2へ通知する不正手順検出
部(不正手順通知手段)33dとが設けられている。
On the other hand, the operation monitoring sequencer 33, as shown in FIG.
Signal and the sequencer control signal SEQ from the decoder 32
And the flash memory 3 stored in the
State transition unit (state transition means) 33a that transitions the state of
If the state stored in the state transition unit 33a at the time of activation of the system 1a is not the IDLE state, it is determined that the system 1a has been terminated while the flash memory 3 is being written, and the CPU 2 is notified of an abnormality. And an end detection unit (abnormality notification unit) 33b. Further, the operation monitoring sequencer 33 has a state determination unit 33c for determining the state stored in the state transition unit 33a, and the flash memory 3 has an illegal state based on the output of the state determination unit 33c and the output of the decoder 32. An unauthorized procedure detection unit (an unauthorized procedure notification unit) 33d that determines whether or not the access has been performed according to a simple procedure and notifies the CPU 2 of the access is provided.

【0065】本実施形態に係る状態遷移部33aは、例
えば、図12に示すように、フラッシュメモリ3の現在
の状態を格納するために、上記バックアップ電源34に
よってバックアップされた2つのJKフリップフロップ
F1・F2を備えている。両JKフリップフロップF1
・F2は、巡回するように互いに縦続に接続されてお
り、ジョンソンカウンタを構成している。また、両JK
フリップフロップF1・F2のクリア端子CLRには、
図10に示すデコーダ32から、リセットコマンドRを
示す信号Srが印加されている。さらに、当該ジョンソ
ンカウンタのクロック信号は、上記チップセレクト信号
CS♯とライトイネーブル信号WE♯との論理積を、負
論理入力のAND回路L1が算出すると共に、NOR回
路L2が上記AND回路L1の出力と上記BUSY信号
との論理和の否定を算出することによって生成される。
For example, as shown in FIG. 12, the state transition unit 33a according to the present embodiment includes two JK flip-flops F1 backed up by the backup power supply 34 in order to store the current state of the flash memory 3.・ It has F2. Both JK flip-flops F1
F2 is cascaded with each other so as to make a circuit, and forms a Johnson counter. Also, both JK
The clear terminals CLR of the flip-flops F1 and F2
A signal Sr indicating a reset command R is applied from the decoder 32 shown in FIG. Further, the AND signal of the logic signal of the chip select signal CS # and the write enable signal WE # is calculated by the AND circuit L1 having a negative logic input, and the NOR circuit L2 outputs the output of the AND circuit L1. It is generated by calculating the NOT of the logical sum of the BUSY signal and the BUSY signal.

【0066】また、JKフリップフロップF1のJ入力
には、一方が負論理入力のAND回路L3が接続されて
おり、JKフリップフロップF2の出力Q2がローレベ
ルで、かつ、コマンドC1を示す信号Sc1がハイレベ
ルの場合にのみ、ハイレベルの信号が入力される。一
方、JKフリップフロップF2のJ入力は、正論理のA
ND回路L4に接続されており、JKフリップフロップ
F1の出力Q1とコマンドC2を示す信号Sc2との双
方がハイレベルの場合にのみ、ハイレベルに設定され
る。同様に、正論理のAND回路L5によって、JKフ
リップフロップF1のK入力は、コマンドC3を示す信
号Sc3と上記出力Q2との双方がハイレベルの場合に
のみ、ハイレベルの信号が入力される。さらに、一方が
負論理入力のAND回路L6は、上記BUSY信号がハ
イレベルで、かつ、上記出力Q1がローレベルの場合に
のみ、JKフリップフロップF2のK入力をハイレベル
にする。
The J input of the JK flip-flop F1 is connected to an AND circuit L3, one of which has a negative logic input, the output Q2 of the JK flip-flop F2 is at a low level, and the signal Sc1 indicating the command C1. Is at a high level, a high-level signal is input. On the other hand, the J input of the JK flip-flop F2 is
It is connected to the ND circuit L4, and is set to the high level only when both the output Q1 of the JK flip-flop F1 and the signal Sc2 indicating the command C2 are at the high level. Similarly, by the positive logic AND circuit L5, a high-level signal is input to the K input of the JK flip-flop F1 only when both the signal Sc3 indicating the command C3 and the output Q2 are at a high level. Further, the AND circuit L6 having one negative logic input sets the K input of the JK flip-flop F2 to high level only when the BUSY signal is at high level and the output Q1 is at low level.

【0067】したがって、両JKフリップフロップF1
・F2により構成されるジョンソンカウンタは、各状態
State1、State2およびIDLE状態におい
て、フラッシュメモリ3へ正しい書き込みコマンドC1
〜C3が与えられた場合、および、状態State3に
おいて、BUSY信号が正常終了を示した場合にのみカ
ウントアップする。なお、カウントアップするタイミン
グは、クロック信号が入力された時点である。これによ
り、フラッシュメモリ3に正しい手順でデータを書き込
んだ場合、両JKフリップフロップF1・F2の保持す
る値は、各手順毎に、次の状態を示す値へと変化する。
また、フラッシュメモリ3にリセットコマンドRが与え
られた場合、両JKフリップフロップF1・F2の値
は、IDLE状態を示すように、0リセットされる。
Therefore, both JK flip-flops F1
The Johnson counter constituted by F2 indicates that the correct write command C1 to the flash memory 3 in each state State1, State2 and IDLE state
The count is incremented only when .about.C3 is given and when the BUSY signal indicates normal end in state State3. The timing of counting up is the point in time when the clock signal is input. Thus, when data is written to the flash memory 3 in a correct procedure, the values held by the two JK flip-flops F1 and F2 change to values indicating the next state for each procedure.
When a reset command R is given to the flash memory 3, the values of both JK flip-flops F1 and F2 are reset to 0 so as to indicate the IDLE state.

【0068】一方、図13に示すように、異常終了検出
部33bにおいて、OR回路L11は、上記JKフリッ
プフロップF1の出力Q1と、JKフリップフロップF
2の出力F2との論理和を算出する。さらに、Dフリッ
プフロップF11は、信号RESET♯の立ち上がりタ
イミングにて、上記OR回路L11の出力をホールドし
て、異常終了検出信号として出力する。なお、当該信号
RESET♯は、システム1aのリセットを示してお
り、システム1aの起動時点で立ち上がる。また、Dフ
ロップフロップF11は、リセットコマンドRを示す信
号Srにてリセットされる。これにより、異常終了検出
部33bは、システム1aの起動時において、両JKフ
リップフロップF1・F2がIDLE状態を示す値を保
持していない場合、ハイレベルの異常終了検出信号を出
力して、CPU2に異常の発生を通知できる。
On the other hand, as shown in FIG. 13, in the abnormal termination detecting section 33b, the OR circuit L11 includes the output Q1 of the JK flip-flop F1 and the JK flip-flop F
2 is calculated with the output F2. Further, the D flip-flop F11 holds the output of the OR circuit L11 at the rising timing of the signal RESET # and outputs it as an abnormal end detection signal. Note that the signal RESET # indicates reset of the system 1a, and rises at the time of activation of the system 1a. The D flop F11 is reset by a signal Sr indicating a reset command R. Accordingly, if the JK flip-flops F1 and F2 do not hold a value indicating the IDLE state at the time of activation of the system 1a, the abnormal end detection unit 33b outputs a high-level abnormal end detection signal and outputs the CPU 2 Can be notified of the occurrence of an error.

【0069】さらに、図14に示すように、状態判定部
33cは、図12に示すJKフリップフロップF1・F
2の出力Q1・Q2をデコードして、両JKフリップフ
ロップF1・F2に格納されている状態を判定する。具
体的には、負論理入力のAND回路L21は、両出力Q
1・Q2が共にローレベルの場合、ハイレベルの信号S
iを出力して、IDLE状態であることを通知する。ま
た、一方が負論理入力のAND回路L22は、出力Q1
がハイレベルで、出力Q2がローレベルの場合に、ハイ
レベルの信号Ss1を出力して、状態State1であ
ることを通知する。同様に、AND回路L23は、両出
力Q1・Q2が共にハイレベルの場合、状態State
2であると判定して、ハイレベルの信号Ss2を出力す
ると共に、一方が負論理入力のAND回路L24は、出
力Q1がローレベルで、出力Q3がハイレベルの場合に
状態State3であると判定して、信号Ss3をハイ
レベルに設定する。
Further, as shown in FIG. 14, the state determination unit 33c includes the JK flip-flops F1 and F shown in FIG.
2 are decoded, and the state stored in both JK flip-flops F1 and F2 is determined. Specifically, the AND circuit L21 having a negative logic input has two outputs Q
When both 1 and Q2 are at the low level, the high-level signal S
Outputs i to notify that it is in the IDLE state. The AND circuit L22 having one negative logic input outputs the output Q1.
Is at a high level and the output Q2 is at a low level, a high-level signal Ss1 is output to notify that the state is State1. Similarly, when both outputs Q1 and Q2 are at the high level, the AND circuit L23 outputs the state State.
2 and outputs the high-level signal Ss2, and the AND circuit L24 having one negative logic input determines that the state is State3 when the output Q1 is at the low level and the output Q3 is at the high level. Then, the signal Ss3 is set to the high level.

【0070】また、図15に示すように、不正手順検出
部33dにおいて、4入力のNOR回路L31は、デコ
ーダ32の出力信号Sc1〜Sc3およびBUSY信号
の何れかがハイレベルの場合、DフリップフロップF3
1のクロック入力をハイレベルへと変化させる。さら
に、4入力のOR回路L32は、信号Sc1の否定と信
号Siとの論理積と、信号Sc2の否定と信号Ss1と
の論理積と、信号Sc3の否定と信号Ss2との論理積
と、BUSY信号の否定と信号Ss3との論理積との論
理和を算出して、上記DフリップフロップF31のD入
力へ印加する。また、上記DフリップフロップF31の
クリア入力Rには、リセットコマンドRを示す信号Sr
が印加されている。これにより、正規の手順ではない手
順でコマンドが入力された場合、不正手順検出部33d
のDフリップフロップF31は、ハイレベルの不正手順
検出信号を出力して、CPU2へ異常の発生を通知でき
る。
As shown in FIG. 15, in the illegal procedure detecting section 33d, the 4-input NOR circuit L31 outputs a D flip-flop when any of the output signals Sc1 to Sc3 of the decoder 32 and the BUSY signal is at a high level. F3
1 clock input to a high level. Further, the four-input OR circuit L32 outputs the logical product of the negation of the signal Sc1 and the signal Si, the logical product of the negation of the signal Sc2 and the signal Ss1, the logical product of the negation of the signal Sc3 and the signal Ss2, and BUSY The logical sum of the negation of the signal and the logical product of the signal Ss3 is calculated and applied to the D input of the D flip-flop F31. A clear input R of the D flip-flop F31 has a signal Sr indicating a reset command R.
Is applied. Thus, when a command is input in a procedure that is not a regular procedure, the unauthorized procedure detection unit 33d
The D flip-flop F31 outputs a high-level illegal procedure detection signal to notify the CPU 2 of the occurrence of an abnormality.

【0071】上記構成によれば、図8に示す異常検出回
路31において、デコーダ32は、フラッシュメモリ3
へ与えられる書き込みコマンドを監視して、動作監視シ
ーケンサ33へ、各コマンドに対応するシーケンサ制御
信号SEQを与える。また、書き込み終了時には、フラ
ッシュメモリ3から動作監視シーケンサ33へBUSY
信号が入力される。一方、動作監視シーケンサ33にお
いて、図11に示す状態遷移部33aは、自らに保持し
ているフラッシュメモリ3の現在の状態と、シーケンサ
制御信号SEQおよびBUSY信号とに基づいて、フラ
ッシュメモリ3の状態を更新して記憶する。
According to the above configuration, in the abnormality detection circuit 31 shown in FIG.
The sequencer control signal SEQ corresponding to each command is supplied to the operation monitoring sequencer 33 by monitoring the write command given to the command. At the end of writing, BUSY is sent from the flash memory 3 to the operation monitoring sequencer 33.
A signal is input. On the other hand, in the operation monitoring sequencer 33, the state transition unit 33a shown in FIG. 11 determines the state of the flash memory 3 based on the current state of the flash memory 3 held by itself and the sequencer control signal SEQ and the BUSY signal. Is updated and stored.

【0072】これにより、フラッシュメモリ3が正常な
書き込み手順で書き込まれた場合、状態遷移部33aに
格納された状態は、図9に示すように、IDLE状態か
ら、状態State1、State2およびState
3へと順次遷移し、フラッシュメモリ3への書き込みが
終了した時点でIDLE状態へと移行する。したがっ
て、システム1aが正常に終了した場合は、状態遷移部
33aがIDLE状態を記憶しており、当該状態は、次
の起動時点まで保持される。次の起動時点では、図11
に示す異常終了検出部33bは、状態遷移部33aの記
憶内容を参照して、フラッシュメモリ3の書き込み途中
でシステム1aが終了したか否かを判定する。この場合
は、状態遷移部33aがIDLE状態を記憶しているの
で、異常終了検出部33bは、フラッシュメモリ3の書
き込みが終了してからシステム1aが終了した(正常終
了)と判定し、CPU2へ異常を通知しない。
As a result, when the flash memory 3 is written in the normal writing procedure, the state stored in the state transition section 33a is changed from the IDLE state to the states State1, State2 and State as shown in FIG.
3 sequentially, and transitions to the IDLE state when the writing to the flash memory 3 is completed. Therefore, when the system 1a ends normally, the state transition unit 33a stores the IDLE state, and this state is held until the next start time. At the next start-up, FIG.
The abnormal termination detection unit 33b shown in (1) refers to the storage contents of the state transition unit 33a to determine whether or not the system 1a has terminated during the writing to the flash memory 3. In this case, since the state transition unit 33a stores the IDLE state, the abnormal end detection unit 33b determines that the system 1a has ended after the writing of the flash memory 3 has ended (normal end), and Does not report an error.

【0073】これとは逆に、フラッシュメモリ3の書き
込み途中でシステム1aが終了(異常終了)した場合、
状態遷移部33aは、IDLE状態以外の状態を記憶し
ている。したがって、上記異常終了検出部33bは、次
の起動時において、状態遷移部33aの記憶内容から、
システム1aが異常終了したと判定し、CPU2へ異常
終了検出信号を出力する。これにより、CPU2は、第
1の実施形態と同様の復帰処理を行い、システム1aを
正常な状態へと復帰させる。
On the contrary, if the system 1a is terminated (abnormal termination) while the flash memory 3 is being written,
The state transition unit 33a stores states other than the IDLE state. Therefore, at the time of the next startup, the abnormal end detection unit 33b determines from the storage contents of the state transition unit 33a that
It determines that the system 1a has terminated abnormally, and outputs an abnormal termination detection signal to the CPU 2. Thus, the CPU 2 performs the same return processing as in the first embodiment, and returns the system 1a to a normal state.

【0074】さらに、不正手順検出部33dは、シーケ
ンサ制御信号SEQおよびBUSY信号と、状態判定部
33cが判定した状態遷移部33aの記憶内容とに基づ
いて、フラッシュメモリ3への書き込み手順が不正であ
ることを検出し、直ちに、CPU2へ不正手順検出信号
を通知する。これにより、CPU2は、自らが暴走した
ことを即座に検出でき、上記復帰処理を行うことができ
る。この結果、暴走時におけるCPU2の予期しない動
作によって、フラッシュメモリ3のデータが破壊される
ことを確実に防止でき、フラッシュメモリ3のデータを
保護できる。
Further, based on the sequencer control signal SEQ and the BUSY signal and the contents stored in the state transition section 33a determined by the state determination section 33c, the unauthorized procedure detection section 33d determines that the procedure for writing to the flash memory 3 is illegal. Detects that there is, and immediately notifies the CPU 2 of an illegal procedure detection signal. As a result, the CPU 2 can immediately detect that the CPU 2 has gone out of control, and can perform the return process. As a result, it is possible to reliably prevent the data in the flash memory 3 from being destroyed by an unexpected operation of the CPU 2 at the time of runaway, and to protect the data in the flash memory 3.

【0075】なお、上記第1および第2の実施形態で
は、各異常検出回路(11・21・31)と、フラッシ
ュメモリ(3)とが、それぞれ別に設けられている場合
について説明したが、これに限らず、両者を一体に形成
してもよい。これにより、システム(1・1a)を構成
する部品数を削減できる。ただし、一体に形成した場合
であっても、フラッシュメモリへ電力が供給されていな
い期間中、異常検出回路が書き込み手順を保持できるよ
うに、両者の電源ラインは、別々に設けられている方が
よい。なお、異常検出回路とフラッシュメモリとを別体
に形成すれば、例えば、高電圧の印加や、停電など、フ
ラッシュメモリに不具合が発生した場合でも、異常検出
回路は、何ら支障なくフラッシュメモリの異常を検出で
きる。
In the first and second embodiments, the case where the abnormality detection circuits (11, 21 and 31) and the flash memory (3) are provided separately has been described. Not limited to this, both may be formed integrally. This makes it possible to reduce the number of parts constituting the system (1.1a). However, even if they are formed integrally, it is better that both power supply lines are provided separately so that the abnormality detection circuit can maintain the writing procedure during the period when power is not supplied to the flash memory. Good. If the abnormality detection circuit and the flash memory are formed separately, for example, even if a failure occurs in the flash memory such as application of a high voltage or a power failure, the abnormality detection circuit can operate the abnormality of the flash memory without any trouble. Can be detected.

【0076】また、上記各実施形態では、BUSY信号
に基づいて、フラッシュメモリの内部処理が終了したか
否かを判定する場合を例にして説明したが、これに限る
ものではない。例えば、所定の間隔で、フラッシュメモ
リへ書き込みの可否を問い合わせるコマンドを発行する
方法(ポーリング)などを用い、ソフトウェアによって
判定してもよい。この場合は、BUSY信号を出力しな
いフラッシュメモリでも、フラッシュメモリの処理終了
を検出できる。
Further, in each of the above embodiments, the case where it is determined whether or not the internal processing of the flash memory has been completed based on the BUSY signal has been described as an example. However, the present invention is not limited to this. For example, the determination may be made by software using a method (polling) of issuing a command for inquiring whether or not writing to the flash memory is possible at predetermined intervals. In this case, even a flash memory that does not output a BUSY signal can detect the end of processing of the flash memory.

【0077】さらに、上記各実施形態では、バックアッ
プ電源(14・24・34)が、バッテリの場合を例に
して説明したが、例えば、電気二重層コンデンサなどの
大容量キャパシタであってもよい。フラッシュメモリに
電力が供給されていない状態であっても、手順記憶手段
(12・22・33)に格納された書き込み手順を保持
可能であれば、本実施形態と同様の効果が得られる。
Further, in each of the above embodiments, the case where the backup power supply (14, 24, 34) is a battery has been described as an example. However, for example, a large capacity capacitor such as an electric double layer capacitor may be used. Even if power is not supplied to the flash memory, the same effect as that of the present embodiment can be obtained as long as the write procedure stored in the procedure storage means (12, 22, 33) can be held.

【0078】[0078]

【発明の効果】請求項1の発明に係るフラッシュメモリ
の異常検出回路は、以上のように、フラッシュメモリへ
データを書き込む際の書き込み手順を監視する監視手段
と、上記書き込み手順を記憶すると共に、上記フラッシ
ュメモリへ電力が供給されていない間であっても、記憶
した書き込み手順を保持する手順記憶手段とを備えてい
る構成である。
As described above, the abnormality detection circuit for a flash memory according to the first aspect of the present invention stores monitoring means for monitoring a writing procedure when writing data to the flash memory, and stores the writing procedure. And a procedure storage unit for retaining the stored writing procedure even while power is not supplied to the flash memory.

【0079】上記構成によれば、手順記憶手段がフラッ
シュメモリへの書き込み手順を記憶しているので、書き
込み途中の電源断に起因するフラッシュメモリのデータ
破壊を確実に検出できるという効果を奏する。さらに、
上記書き込み手順を格納する際に必要な記憶容量は、フ
ラッシュメモリの記憶容量に比べて極めて少ないので、
短時間にデータ異常を検出できるという効果を併せて奏
する。
According to the above configuration, since the procedure storing means stores the procedure for writing to the flash memory, it is possible to reliably detect data destruction of the flash memory due to power interruption during writing. further,
Since the storage capacity required for storing the above write procedure is extremely small compared to the storage capacity of the flash memory,
In addition, the data abnormality can be detected in a short time.

【0080】請求項2の発明に係るフラッシュメモリの
異常検出回路は、以上のように、請求項1記載の発明の
構成において、さらに、データの書き込み時に上記フラ
ッシュメモリへ順次入力される各書き込みコマンドに対
応したコードを生成するコード生成手段を備え、上記手
順記憶手段は、上記コードを順次格納する構成である。
According to a second aspect of the present invention, in the flash memory abnormality detecting circuit according to the first aspect of the present invention, each of the write commands sequentially input to the flash memory at the time of data writing is further provided. And a code generation means for generating a code corresponding to the above, and the procedure storage means is configured to sequentially store the codes.

【0081】上記構成によれば、書き込みコマンド群に
代えて、各コマンドに対応したコード群が格納されるの
で、書き込み手順の格納に必要な記憶容量を削減でき
る。したがって、データ異常を検出する際の時間をさら
に短縮できると共に、書き込み手順を保持する際に必要
なエネルギを削減できるという効果を奏する。
According to the above configuration, the code group corresponding to each command is stored instead of the write command group, so that the storage capacity required for storing the write procedure can be reduced. Therefore, it is possible to further reduce the time required for detecting the data abnormality and to reduce the energy required for maintaining the writing procedure.

【0082】請求項3の発明に係るフラッシュメモリの
異常検出回路は、以上のように、請求項1記載の発明の
構成において、上記手順記憶手段は、書き込み手順とし
て、フラッシュメモリの現在の状態を記憶すると共に、
上記フラッシュメモリの異常検出回路は、さらに、当該
フラッシュメモリへ新たに入力される書き込みコマンド
に応じて、上記手順記憶手段に格納されている状態を更
新する状態遷移手段を備えている構成である。
In the flash memory abnormality detecting circuit according to the third aspect of the present invention, as described above, in the configuration of the first aspect of the present invention, the procedure storage means stores the current state of the flash memory as a writing procedure. Along with remembering,
The abnormality detection circuit of the flash memory further includes state transition means for updating a state stored in the procedure storage means in response to a write command newly input to the flash memory.

【0083】上記構成では、手順記憶手段がフラッシュ
メモリの現在の状態を記憶しているので、書き込み手順
の格納に必要な記憶容量を削減できる。したがって、デ
ータ異常を検出する際の時間をさらに短縮できると共
に、書き込み手順を保持する際に必要なエネルギを削減
できるという効果を奏する。
In the above configuration, since the procedure storage unit stores the current state of the flash memory, the storage capacity required for storing the write procedure can be reduced. Therefore, it is possible to further reduce the time required for detecting the data abnormality and to reduce the energy required for maintaining the writing procedure.

【0084】さらに、請求項4の発明に係るフラッシュ
メモリの異常検出回路は、以上のように、請求項3記載
の発明の構成において、上記フラッシュメモリへ新たに
入力される書き込みコマンドが、上記手順記憶手段に格
納された状態では受け付け不可能な場合、不正な手順で
上記フラッシュメモリがアクセスされたと判定し、当該
フラッシュメモリのデータをアクセスする演算処理装置
へ通知する不正手順通知手段を備えている構成である。
Further, in the flash memory abnormality detecting circuit according to the fourth aspect of the present invention, as described above, in the configuration of the third aspect of the present invention, the write command newly input to the flash memory is the same as the above-described procedure. If the data cannot be accepted in the state stored in the storage means, the flash memory is determined to have been accessed in an unauthorized procedure, and an unauthorized procedure notifying means is provided for notifying an arithmetic processing unit accessing data in the flash memory. Configuration.

【0085】上記構成では、演算処理装置が暴走して、
フラッシュメモリに不正なアクセスを繰り返そうとした
場合、不正手順通知手段は、演算処理装置が暴走してい
ることを通知して、適切な処置をとるように指示でき
る。この結果演算処理装置が暴走した場合であっても、
フラッシュメモリのデータを確実に保護できるという効
果を奏する。
In the above configuration, the arithmetic processing unit runs away,
If an illegal access to the flash memory is to be repeated, the illegal procedure notifying unit can notify that the arithmetic processing unit is running out of control and instruct to take an appropriate action. As a result, even if the arithmetic processing unit runs away,
This has the effect of reliably protecting the data in the flash memory.

【0086】請求項5の発明に係るフラッシュメモリの
異常検出回路は、以上のように、請求項1、2、3また
は4記載の発明の構成において、演算処理装置の起動時
に、上記手順記憶手段に記憶した書き込み手順を参照し
て、当該フラッシュメモリの書き込み時に異常が発生し
たか否かを判定し、上記演算処理装置へ通知する異常通
知手段を備えている構成である。
According to a fifth aspect of the present invention, there is provided a flash memory abnormality detecting circuit according to the first, second, third or fourth aspect of the present invention, wherein the procedure storage means is provided when the arithmetic processing unit is started. And an abnormality notifying unit that determines whether or not an abnormality has occurred during the writing of the flash memory with reference to the writing procedure stored in the flash memory and notifies the arithmetic processing unit of the abnormality.

【0087】上記構成では、演算処理装置とは別に設け
られた異常通知手段で異常を検出しているので、フラッ
シュメモリのデータが破壊される際の範囲に拘わらず、
確実にデータ異常を検出できるという効果を奏する。
In the above configuration, since the abnormality is detected by the abnormality notification means provided separately from the arithmetic processing unit, regardless of the range in which the data in the flash memory is destroyed,
This has the effect of reliably detecting data abnormalities.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態を示すものであり、フラッ
シュメモリと異常検出回路とを有するシステムの要部構
成を示すブロック図である。
FIG. 1 illustrates one embodiment of the present invention, and is a block diagram illustrating a main configuration of a system including a flash memory and an abnormality detection circuit.

【図2】上記システムにおいて、フラッシュメモリへの
書き込み時の動作を示すタイミングチャートである。
FIG. 2 is a timing chart showing an operation at the time of writing to a flash memory in the above system.

【図3】上記異常検出回路の構成例を示すブロック図で
ある。
FIG. 3 is a block diagram illustrating a configuration example of the abnormality detection circuit.

【図4】上記異常検出回路において、コード生成部の構
成例を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration example of a code generation unit in the abnormality detection circuit.

【図5】上記システムにおいて、フラッシュメモリへの
書き込み時における動作を示すものであり、異常検出回
路に格納されるコードを示す説明図である。
FIG. 5 is a diagram illustrating an operation at the time of writing to a flash memory in the above system, and is an explanatory diagram illustrating codes stored in an abnormality detection circuit.

【図6】上記システムにおいて、書き込みが正常に終了
した場合に、異常検出回路へ格納されているコード群を
示す説明図である。
FIG. 6 is an explanatory diagram showing a code group stored in an abnormality detection circuit when writing is normally completed in the system.

【図7】上記システムにおいて、書き込み中にシステム
が停止した場合に、異常検出回路へ格納されているコー
ド群を示す説明図である。
FIG. 7 is an explanatory diagram showing a group of codes stored in an abnormality detection circuit when the system stops during writing in the system.

【図8】本発明の他の実施形態を示すものであり、フラ
ッシュメモリと異常検出回路とを有するシステムの要部
構成を示すブロック図である。
FIG. 8 illustrates another embodiment of the present invention, and is a block diagram illustrating a main configuration of a system including a flash memory and an abnormality detection circuit.

【図9】上記システムにおいて、フラッシュメモリの状
態遷移を示す説明図である。
FIG. 9 is an explanatory diagram showing a state transition of a flash memory in the above system.

【図10】上記異常検出回路において、デコーダの入出
力を示すブロック図である。
FIG. 10 is a block diagram showing inputs and outputs of a decoder in the abnormality detection circuit.

【図11】上記異常検出回路において、動作監視シーケ
ンサの要部構成を示すブロック図である。
FIG. 11 is a block diagram showing a main configuration of an operation monitoring sequencer in the abnormality detection circuit.

【図12】上記動作監視シーケンサにおいて、状態遷移
部の構成例を示す回路図である。
FIG. 12 is a circuit diagram showing a configuration example of a state transition unit in the operation monitoring sequencer.

【図13】上記動作監視シーケンサにおいて、異常終了
検出部の構成例を示す回路図である。
FIG. 13 is a circuit diagram showing a configuration example of an abnormal end detection unit in the operation monitoring sequencer.

【図14】上記動作監視シーケンサにおいて、状態判定
部の構成例を示す回路図である。
FIG. 14 is a circuit diagram showing a configuration example of a state determination unit in the operation monitoring sequencer.

【図15】上記動作監視シーケンサにおいて、不正手順
検出部の構成例を示す回路図である。
FIG. 15 is a circuit diagram showing a configuration example of an unauthorized procedure detection unit in the operation monitoring sequencer.

【図16】フラッシュメモリへデータを書き込む手順の
一例を示すフローチャートである。
FIG. 16 is a flowchart illustrating an example of a procedure for writing data to a flash memory.

【符号の説明】[Explanation of symbols]

2 CPU(演算処理装置) 3 フラッシュメモリ 12 記憶素子(手順記憶手段) 13 シーケンサ(監視手段) 22 SRAM(手順記憶手段) 25 コード生成部(コード生成手段) 32 デコーダ(監視手段) 33 動作監視シーケンサ(手順記憶手段) 33a 状態遷移部(状態遷移手段) 33b 異常終了検出部(異常通知手段) 33d 不正手順検出部(不正手順通知手段) 2 CPU (arithmetic processing unit) 3 flash memory 12 storage element (procedure storage unit) 13 sequencer (monitoring unit) 22 SRAM (procedure storage unit) 25 code generation unit (code generation unit) 32 decoder (monitoring unit) 33 operation monitoring sequencer (Procedure storage unit) 33a State transition unit (state transition unit) 33b Abnormal termination detection unit (abnormal notification unit) 33d Illegal procedure detection unit (illegal procedure notification unit)

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】フラッシュメモリへデータを書き込む際の
書き込み手順を監視する監視手段と、 上記書き込み手順を記憶すると共に、上記フラッシュメ
モリへ電力が供給されていない間であっても、記憶した
書き込み手順を保持する手順記憶手段とを備えているこ
とを特徴とするフラッシュメモリの異常検出回路。
1. A monitoring means for monitoring a writing procedure when writing data to a flash memory, and storing the writing procedure and storing the stored writing procedure even when power is not supplied to the flash memory. A flash memory abnormality detection circuit, comprising:
【請求項2】さらに、データの書き込み時に上記フラッ
シュメモリへ順次入力される各書き込みコマンドに対応
し、より少ないビット幅のコードを生成するコード生成
手段を備え、 上記手順記憶手段は、上記コードを順次格納することを
特徴とする請求項1記載のフラッシュメモリの異常検出
回路。
2. The apparatus according to claim 1, further comprising: code generation means for generating a code having a smaller bit width in response to each write command sequentially input to said flash memory at the time of data writing, wherein said procedure storage means stores said code. 2. The abnormality detection circuit for a flash memory according to claim 1, wherein the abnormality is sequentially stored.
【請求項3】上記手順記憶手段は、書き込み手順とし
て、データの書き込み時にフラッシュメモリが取りうる
状態のうち、フラッシュメモリの現在の状態を記憶する
と共に、 上記フラッシュメモリの異常検出回路は、さらに、上記
手順記憶手段に格納された状態と、当該フラッシュメモ
リへ新たに入力される書き込みコマンドとに基づいて、
上記手順記憶手段に格納されている状態を更新する状態
遷移手段を備えていることを特徴とする請求項1記載の
フラッシュメモリの異常検出回路。
3. The procedure storage means stores, as a write procedure, a current state of the flash memory among states that can be taken by the flash memory at the time of data writing, and an abnormality detection circuit of the flash memory further comprises: Based on the state stored in the procedure storage unit and a write command newly input to the flash memory,
2. The flash memory abnormality detection circuit according to claim 1, further comprising a state transition means for updating a state stored in said procedure storage means.
【請求項4】上記フラッシュメモリへ新たに入力される
書き込みコマンドが、上記手順記憶手段に格納された状
態では受け付け不可能な場合、不正な手順で上記フラッ
シュメモリがアクセスされたと判定し、当該フラッシュ
メモリのデータをアクセスする演算処理装置へ通知する
不正手順通知手段を備えていることを特徴とする請求項
3記載のフラッシュメモリの異常検出回路。
4. If the write command newly input to the flash memory cannot be accepted in a state stored in the procedure storage means, it is determined that the flash memory has been accessed in an illegal procedure, and the flash memory is accessed. 4. The flash memory abnormality detection circuit according to claim 3, further comprising an unauthorized procedure notification unit that notifies an arithmetic processing unit that accesses data in the memory.
【請求項5】上記フラッシュメモリのデータをアクセス
する演算処理装置が起動したときに、上記手順記憶手段
に記憶した書き込み手順を参照して、当該フラッシュメ
モリの書き込み時に異常が発生したか否かを判定し、上
記演算処理装置へ通知する異常通知手段を備えているこ
とを特徴とする請求項1、2、3または4記載のフラッ
シュメモリの異常検出回路。
5. When an arithmetic processing unit for accessing data in said flash memory is started, referring to a write procedure stored in said procedure storage means, it is determined whether or not an abnormality has occurred during writing to said flash memory. 5. The flash memory abnormality detection circuit according to claim 1, further comprising abnormality notification means for determining and notifying the arithmetic processing unit.
JP10047278A 1998-02-27 1998-02-27 Abnormality detection circuit for flash memory Pending JPH11249972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10047278A JPH11249972A (en) 1998-02-27 1998-02-27 Abnormality detection circuit for flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10047278A JPH11249972A (en) 1998-02-27 1998-02-27 Abnormality detection circuit for flash memory

Publications (1)

Publication Number Publication Date
JPH11249972A true JPH11249972A (en) 1999-09-17

Family

ID=12770835

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10047278A Pending JPH11249972A (en) 1998-02-27 1998-02-27 Abnormality detection circuit for flash memory

Country Status (1)

Country Link
JP (1) JPH11249972A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338083A (en) * 2005-05-31 2006-12-14 Tdk Corp Memory controller
JP2008070919A (en) * 2006-09-12 2008-03-27 Tdk Corp Memory controller, flash memory system having memory controller, and method for controlling flash memory
JP2013009428A (en) * 2012-09-25 2013-01-10 Renesas Electronics Corp Control signal generating circuit and semiconductor device using the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338083A (en) * 2005-05-31 2006-12-14 Tdk Corp Memory controller
JP4661369B2 (en) * 2005-05-31 2011-03-30 Tdk株式会社 Memory controller
JP2008070919A (en) * 2006-09-12 2008-03-27 Tdk Corp Memory controller, flash memory system having memory controller, and method for controlling flash memory
JP2013009428A (en) * 2012-09-25 2013-01-10 Renesas Electronics Corp Control signal generating circuit and semiconductor device using the same

Similar Documents

Publication Publication Date Title
EP2367110B1 (en) Emerging bad block detection
US7447948B2 (en) ECC coding for high speed implementation
US7290097B2 (en) Nonvolatile memory
JPH07508120A (en) Writing data to non-volatile memory
WO2007119267A1 (en) Flash memory controller
US9619318B2 (en) Memory circuits, method for accessing a memory and method for repairing a memory
JP2010500699A (en) Allowable bit errors for each sector in the memory device
US3898443A (en) Memory fault correction system
JPS62173696A (en) Information memorizing/reading system
JP3376306B2 (en) Data processing apparatus and data processing method
US20070277028A1 (en) Method and system for recovery from reprogramming failures in nonvolatile memory
JP5099342B2 (en) Component mounting board for PLC
CN1310132C (en) Adaptive runtime repairable entry register file
JP2010181990A (en) Data processor
JPH11249972A (en) Abnormality detection circuit for flash memory
US6535442B2 (en) Semiconductor memory capable of debugging an incorrect write to or an incorrect erase from the same
CN116185299A (en) Flash memory controller and related device and method
CN113094307B (en) Mapping information management method, memory storage device and memory controller
JPH10302485A (en) Information processor having flash memory
CN111061591B (en) System and method for implementing data integrity check based on memory integrity check controller
CN111159123B (en) Embedded reliable parameter storage file system and method
US20030081468A1 (en) Method and device for backing up data in a memory module and memory module
CN112114888B (en) Method for generating universal client side bootstrap program of electric automobile electric control system
JP2005056144A (en) Electronic apparatus loaded with flash memory, its memory data managing method, and program
JPWO2013132806A1 (en) Method for correcting error bits in nonvolatile logic integrated circuit and nonvolatile register