JPH09204787A - Measure system for abnormality in writing non-volatile memory - Google Patents

Measure system for abnormality in writing non-volatile memory

Info

Publication number
JPH09204787A
JPH09204787A JP1412496A JP1412496A JPH09204787A JP H09204787 A JPH09204787 A JP H09204787A JP 1412496 A JP1412496 A JP 1412496A JP 1412496 A JP1412496 A JP 1412496A JP H09204787 A JPH09204787 A JP H09204787A
Authority
JP
Japan
Prior art keywords
main control
memory
control unit
power
switch
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
JP1412496A
Other languages
Japanese (ja)
Inventor
Hideki Fukazawa
英樹 深沢
Yoshiteru Otomo
芳晃 大友
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.)
Kokusai Electric Corp
Original Assignee
Kokusai Electric Corp
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 Kokusai Electric Corp filed Critical Kokusai Electric Corp
Priority to JP1412496A priority Critical patent/JPH09204787A/en
Publication of JPH09204787A publication Critical patent/JPH09204787A/en
Pending legal-status Critical Current

Links

Landscapes

  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable writing a sum correction value and data for checking CRC for a non-volatile memory immediately before turning off a power source during writing operation. SOLUTION: A main control section 12 accesses a memory 11 and performs writing operation. An output interface 13 and an output section 14 including LEDs and the like are provided in order that the main control section 12 informs writing operation in the memory 11 to the outside. Also, a switch status section 15 informing a ON/OFF state of a switch to the main control section 12 is provided, and a power control section 16 controlling ON/OFF of a power source by a switch ON/OFF signal from the main control section 12 is provided. When a switch OFF information is inputted from the switch status section 15, after confirming a state under writing operation, the main control section 12 outputs a power source OFF signal to the power source control section 16 and turns off a power source.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、フラッシュメモリ
やEEPROM(電気的消去型)等の不揮発性メモリに
おける書き込み動作中の電源オフ、電源電圧低下等の異
常時対策処理に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an abnormal state countermeasure process such as power-off or power-source voltage drop during a write operation in a nonvolatile memory such as a flash memory or an EEPROM (electrically erasable type).

【0002】[0002]

【従来の技術】フラッシュメモリやEEPROMのよう
な、電気的に書き込み可能で、かつ電源が供給されなく
てもメモリ内部のデータが保持されるタイプのメモリ
は、データ化け等のチェック方法として、サム値による
チェックやCRC計算によるチェックを行ない、メモリ
内のデータが正しいか否かをチェックしている。
2. Description of the Related Art A memory, such as a flash memory or an EEPROM, which is electrically writable and retains data in the memory even when power is not supplied, is used as a check method for garbled data. A check based on a value or a CRC calculation is performed to check whether or not the data in the memory is correct.

【0003】例えば、サム値によるチェックでは、メモ
リ内の書き込み動作終了時にメモリ内の全データをプラ
スした結果にある数値(サム補正値)をプラスし、その
値がOOHになるようにしている。図3のメモリ1を例
にとると、メモリのデータエリア2の一部にサム補正値
を格納するエリア3を設け、このサム補正値を用いてデ
ータチェックしている。またCRCチェックの場合も、
CRC計算した結果をメモリの一部に格納することによ
り、メモリ内のデータが正常か否か再計算によりチェッ
クを行っている。
For example, in the check using the sum value, a numerical value (sum correction value) which is a result of adding all the data in the memory at the end of the write operation in the memory is added so that the value becomes OOH. Taking the memory 1 of FIG. 3 as an example, an area 3 for storing a sum correction value is provided in a part of the data area 2 of the memory, and data check is performed using this sum correction value. Also in the case of CRC check,
By storing the result of CRC calculation in a part of the memory, whether or not the data in the memory is normal is checked by recalculation.

【0004】[0004]

【発明が解決しようとする課題】しかし、これらのメモ
リに対して、書き込み動作中に電源が切れてしまうと、
CRCチェック用のデータやサム補正値の書き込み動作
ができないため、データが正しいか否かがチェックでき
ない。このためメモリ内のデータが化けていてもわから
ず、これが品質上重大な問題であった。
However, if the power supply to these memories is cut off during the write operation,
Since the write operation of the CRC check data and the sum correction value cannot be performed, it cannot be checked whether the data is correct or not. Therefore, even if the data in the memory is garbled, it is not known, and this is a serious problem in terms of quality.

【0005】本発明の目的は、メモリ内のチェック用デ
ータを電源オフ直前に書き込むことができるようにする
ことにある。
An object of the present invention is to make it possible to write the check data in the memory immediately before the power is turned off.

【0006】[0006]

【課題を解決するための手段】上記の目的は、主制御部
から不揮発性メモリに対して書き込み動作中に電源オフ
した場合の異常対策として、電源スイッチのオン・オフ
状態を上記主制御部に知らせるスイッチステータス部
と、上記主制御部からのオン・オフ信号により電源オン
・オフする電源制御部とを設け、上記主制御部は、スイ
ッチステータス部からの電源スイッチオフ情報の入力時
に、メモリに書き込み動作中でないことを確認して後
に、電源制御部に電源オフ信号を出力するものであるこ
とによって達成される。
The above-mentioned object is to control the ON / OFF state of the power switch to the main control unit as a countermeasure against an abnormality when the main control unit turns off the power supply during writing operation to the nonvolatile memory. A switch status section for notifying and a power control section for turning the power on / off by an on / off signal from the main control section are provided, and the main control section stores in the memory when the power switch off information is input from the switch status section. This is accomplished by outputting a power-off signal to the power supply control unit after confirming that the write operation is not in progress.

【0007】また上記の目的は、主制御部から不揮発性
メモリに対して書き込み動作中に電源電圧が低下した場
合の異常対策として、電源電圧低下を検知して上記主制
御部に知らせる低電圧検知部を設け、上記主制御部は、
低電圧検知部からの電圧低下情報の入力時に、CPUに
割り込み入力して書き込み動作を終了すると共に、サム
チェックまたはCRC計算を実行させてチェック用デー
タの書き込み処理をするものであることによって達成さ
れる。
The above-mentioned object is to detect a low power supply voltage and notify the main control unit of a low voltage detection as an abnormal measure when the power supply voltage drops during the writing operation from the main control unit to the nonvolatile memory. Section, and the main control section,
This is achieved by the fact that when the voltage drop information is input from the low voltage detection unit, the CPU is interrupted to end the write operation and at the same time the sum check or CRC calculation is executed to write the check data. It

【0008】上記手段によれば、主制御部はスイッチス
テータスを監視し、スイッチがオフとなった場合にメモ
リに書き込み動作していないかどうか調べ、書き込み動
作中でないことを確認して後に、電源制御部に対して電
源オフ信号を出力し、電源制御部がリレーやサイリスタ
を作動して電源オフする。
According to the above means, the main control unit monitors the switch status, and when the switch is turned off, checks whether or not the writing operation is performed in the memory, confirms that the writing operation is not performed, and then the power source is turned on. A power supply off signal is output to the control unit, and the power supply control unit operates a relay or thyristor to turn off the power supply.

【0009】また電圧低下した場合は、主制御部は電圧
低下検知部からの情報入力時に、割り込み信号をCPU
のNMI(none maskable interrupt)等に入力する。
これにより電源低下が瞬時にわかり、メモリへの書き込
み中であれば、書き込み動作を終了し、電源電圧低下ま
でにサムチェックまたはCRC計算を実行させてチェッ
ク用データの書き込みをしておくようにする。
When the voltage drops, the main control unit sends an interrupt signal to the CPU when the information is input from the voltage drop detection unit.
Input to NMI (none maskable interrupt), etc.
This makes it possible to instantly recognize the power supply drop, and if the memory is being written to, terminate the write operation and execute checksum or CRC calculation before writing the check data before the power supply voltage drops. .

【0010】[0010]

【発明の実施の形態】以下本発明を実施の形態によって
説明する。図1は、本発明の一実施形態の構成を示し、
電源オフの異常対策をするものである。図において、主
制御部12がメモリ11にアクセスし、書き込み動作す
る。メモリ11はフラッシュメモリ、EEPROM等の
不揮発性メモリが用いられる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to embodiments. FIG. 1 shows the configuration of an embodiment of the present invention,
This is to take measures against abnormalities when the power is turned off. In the figure, the main control unit 12 accesses the memory 11 and performs a write operation. A nonvolatile memory such as a flash memory or an EEPROM is used as the memory 11.

【0011】主制御部12がメモリ11に書き込み動作
していることを外部に知らせるために出力インタフェー
ス13と出力表示部14が具備されている。この出力表
示部14はLEDや7セグLEDを設け、外部から容易
に監視することが出来るようになっており、メモリ11
への書き込み動作中に主制御部12から情報を送って点
灯させる。LEDが消えていれば、電源をオフしてよ
く、メモリ11へのチェック用データやサム補正値のデ
ータが格納された状態でメモリ11内のデータが保持さ
れる。
An output interface 13 and an output display unit 14 are provided to notify the outside that the main control unit 12 is writing to the memory 11. The output display unit 14 is provided with an LED and a 7-segment LED so that it can be easily monitored from the outside.
Information is sent from the main control unit 12 during the writing operation to and is turned on. If the LED is off, the power may be turned off, and the data in the memory 11 is held in a state where the check data and the sum correction value data are stored in the memory 11.

【0012】また、スイッチオン・オフ状態を主制御部
12に知らせるスイッチステータス部15が設けられ、
主制御部12からのスイッチオン・オフ信号により電源
をオン・オフ制御する電源制御部16が設けられる。電
源制御部16は主制御部12から入力するオン・オフ信
号によりリレーやサイリスタが作動して電源をオン・オ
フ制御する。
Further, a switch status section 15 for informing the main control section 12 of the switch on / off state is provided,
A power supply control unit 16 is provided which controls the power supply on / off by a switch on / off signal from the main control unit 12. The power supply control unit 16 controls ON / OFF of a power supply by operating a relay or a thyristor according to an ON / OFF signal input from the main control unit 12.

【0013】今、主制御部12によりメモリ11をアク
セスしてデータの書き込み動作中に、スイッチステータ
ス部15からスイッチオフ情報が入力しても、主制御部
12は電源オフ信号を電源制御部16に対して出力しな
い。メモリ11に書き込み動作中でないことを確認する
と、主制御部12は電源制御部16に電源オフ信号を出
力するから、電源制御部16は電源オフ信号を受けて電
源オフする。これにより必ずメモリ11内にCRCチェ
ック用データやサム補正値のデータの書き込みが完了し
た時点で電源オフが行なえ、書き込み中の電源オフは防
止される。
Now, even if the switch-off information is input from the switch status section 15 during the data write operation by accessing the memory 11 by the main control section 12, the main control section 12 sends a power-off signal to the power control section 16. Is not output to. When it is confirmed that the memory 11 is not being written, the main controller 12 outputs a power-off signal to the power controller 16, so that the power controller 16 receives the power-off signal and powers off. As a result, the power can be turned off without fail when the writing of the CRC check data and the sum correction value data is completed in the memory 11, and the power off during writing is prevented.

【0014】図2は、本発明の他の実施形態の構成を示
し、電源電圧低下時の異常対策をしたものである。主制
御部12は低電圧検知部17を備え、検知部17が電圧
低下を検知すると、例えば通常電源電圧が5Vで動作す
る回路において、検知閾値を4.8Vに設定し、電源が
オフし5Vから4.8Vに電圧が低下した時点で検知部
17は主制御部12に情報伝達する。
FIG. 2 shows the configuration of another embodiment of the present invention, in which measures against abnormalities when the power supply voltage drops are taken. The main control unit 12 includes a low voltage detection unit 17, and when the detection unit 17 detects a voltage drop, for example, in a circuit operating at a normal power supply voltage of 5V, the detection threshold value is set to 4.8V and the power is turned off to 5V. When the voltage decreases from 4.8V to 4.8V, the detection unit 17 transmits information to the main control unit 12.

【0015】主制御部12では、検知部17からの情報
をCPUのNMI等に入力することにより電圧低下が瞬
時にわかる。このとき、メモリ11への書き込み動作中
であれば、直ちに書き込み動作を終了し、サムチェック
またはCRC計算を実行させてチェック用データの書き
込みを行なう。この処理時間は電源の電圧降下時間(+
5V−GND間の静電容量が大きい程電圧降下時間は長
くなる)に比べて短く、上記データ書き込み処理は充分
可能である。
In the main controller 12, the voltage drop can be instantly recognized by inputting the information from the detector 17 into the NMI of the CPU. At this time, if the writing operation to the memory 11 is in progress, the writing operation is immediately ended, and the check data is written by performing the sum check or the CRC calculation. This processing time is the voltage drop time (+
The larger the electrostatic capacity between 5V and GND is, the longer the voltage drop time is), and the above data writing process is sufficiently possible.

【0016】以上のようして電源オフ、または電圧低下
時にサムチェック用補正値またはCRCチェック用デー
タの格納ができ、メモリ内のデータが正常か否か、再計
算によるチェックをすることができる。
As described above, the sum check correction value or the CRC check data can be stored when the power is turned off or the voltage drops, and whether or not the data in the memory is normal can be checked by recalculation.

【0017】なお、フラッシュメモリ、EEPROMに
おいては、メモリの書き込み動作時に、5V以外に12
V電圧の電源を使用するタイプがあり、12V電圧を印
加した状態でメモリへの書き込み動作中、電源を急にオ
フすると、メモリ内部の素子に過負荷がかかり故障につ
ながる場合があるが、上記本発明の電源オフ異常対策を
実行することにより上記問題が解決できメモリの不良率
も低減する。
Incidentally, in the flash memory and the EEPROM, when the writing operation of the memory is performed, the voltage other than 5V is set to 12V.
There is a type that uses a power supply of V voltage, and if the power supply is suddenly turned off during a write operation to the memory with a 12 V voltage applied, an element inside the memory may be overloaded and a failure may occur. By implementing the power off abnormality countermeasure of the present invention, the above problem can be solved and the defective rate of the memory can be reduced.

【0018】[0018]

【発明の効果】以上のように本発明によれば、メモリ内
のチェック用データを電源オフ、電圧低下の直前に書き
込むことができるので、フラッシュメモリ、EEPRO
M等のメモリ内部のデータのチェックが行なえ、これに
より不良率が減少し品質の向上が得られる。
As described above, according to the present invention, since the check data in the memory can be written immediately before the power is turned off and the voltage drops, the flash memory and the EEPROM can be written.
It is possible to check the data inside the memory such as M, thereby reducing the defective rate and improving the quality.

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

【図1】本発明の一実施形態の構成図。FIG. 1 is a configuration diagram of an embodiment of the present invention.

【図2】本発明の他の実施形態の構成図。FIG. 2 is a configuration diagram of another embodiment of the present invention.

【図3】メモリ内のエリア説明図。FIG. 3 is an explanatory diagram of areas in a memory.

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

1…メモリ、2…データエリア、3…チェック用データ
エリア、11…メモリ、12…主制御部、13…出力イ
ンタフェース、14…出力表示部、15…スイッチステ
ータス部、16…電源制御部、17…低電圧検知部。
DESCRIPTION OF SYMBOLS 1 ... Memory, 2 ... Data area, 3 ... Check data area, 11 ... Memory, 12 ... Main control part, 13 ... Output interface, 14 ... Output display part, 15 ... Switch status part, 16 ... Power supply control part, 17 ... Low voltage detector.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 主制御部から不揮発性メモリに対して書
き込み動作中に電源オフする場合の異常対策を行なう方
式において、スイッチのオン・オフ状態を上記主制御部
に知らせるスイッチステータス部と、上記主制御部から
のオン・オフ信号により電源オン・オフする電源制御部
とを設け、上記主制御部は、スイッチステータス部から
のスイッチオフ情報の入力時に、メモリに書き込み動作
中でないことを確認した後、電源制御部に電源オフ信号
を出力するものであることを特徴とする不揮発性メモリ
書込中異常対策方式。
1. A switch status section for notifying the main control section of the on / off state of a switch in a method for taking measures against an abnormality when the power is turned off during a write operation from a main control section to a nonvolatile memory, A power supply control unit for turning on / off the power supply by an on / off signal from the main control unit was provided, and it was confirmed that the main control unit was not writing data to the memory when the switch off information was input from the switch status unit. After that, it outputs a power-off signal to the power-supply control unit, and is a non-volatile memory writing abnormality countermeasure method.
【請求項2】 主制御部から不揮発性メモリに対して書
き込み動作中に電源電圧が低下した場合の異常対策を行
なう方式において、電源電圧低下を検知して上記主制御
部に知らせる低電圧検知部を設け、上記主制御部は、低
電圧検知部からの電圧低下情報の入力時に、CPUに割
込み入力して書き込み動作を終了すると共に、サムチェ
ックまたはCRC計算を実行させてチェック用データの
書き込み処理をするものであることを特徴とする不揮発
性メモリ書込中異常対策方式。
2. A low voltage detection unit for detecting a power supply voltage drop and notifying the main control unit in a method of taking measures against an abnormality when the power supply voltage drops during a write operation from a main control unit to a nonvolatile memory. When the voltage drop information is input from the low voltage detection unit, the main control unit interrupts the CPU to end the write operation and causes the sum check or CRC calculation to be executed to write the check data. A non-volatile memory write error countermeasure method characterized by the following.
【請求項3】 上記主制御部は、上記メモリにアクセス
し書き込み動作中であることを表示する出力インタフェ
ース部と出力表示部を具備したことを特徴とする請求項
1または2記載の不揮発性メモリ書込中異常対策方式。
3. The non-volatile memory according to claim 1, wherein the main control unit includes an output interface unit and an output display unit that access the memory and indicate that a writing operation is being performed. Abnormality countermeasure method during writing.
JP1412496A 1996-01-30 1996-01-30 Measure system for abnormality in writing non-volatile memory Pending JPH09204787A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1412496A JPH09204787A (en) 1996-01-30 1996-01-30 Measure system for abnormality in writing non-volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1412496A JPH09204787A (en) 1996-01-30 1996-01-30 Measure system for abnormality in writing non-volatile memory

Publications (1)

Publication Number Publication Date
JPH09204787A true JPH09204787A (en) 1997-08-05

Family

ID=11852385

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1412496A Pending JPH09204787A (en) 1996-01-30 1996-01-30 Measure system for abnormality in writing non-volatile memory

Country Status (1)

Country Link
JP (1) JPH09204787A (en)

Similar Documents

Publication Publication Date Title
JP4929783B2 (en) Power monitoring device
JPH0319571B2 (en)
US5257269A (en) Error controller for use in debugging microprocessor
JP3491358B2 (en) Power cut-off detection device
CN111400136A (en) Server-dedicated GPU fault protection device, method, equipment and medium
JPH09204787A (en) Measure system for abnormality in writing non-volatile memory
JP2002543521A (en) Method and apparatus for automatically reintegrating modules into a computer system
JPH10105422A (en) Control circuit of protecting device
JPS62281781A (en) Monitoring method for accident information
JPH0325813B2 (en)
CN116701041B (en) Memory data retention method, retention device and related equipment
JP3451489B2 (en) RAM content destruction handling method and programmable controller
JPH03100848A (en) Memory back-up device using eeprom
JP2013065261A (en) Memory management device
JP2000163274A (en) Electronic equipment and recording medium with rom data monitoring program recorded thereon
JP2556442B2 (en) Power supply monitoring device
US6959228B2 (en) Method of protecting data stored in a memory of welding controller
JP2782784B2 (en) Microcomputer control device
JP2006020428A (en) Method of protecting data in control system, and control system
JP2006003929A (en) Process controller and diagnosis method of control data of the same
JP2733395B2 (en) Drive system controller
JPH06225444A (en) Power supply control apparatus
JPH08147001A (en) Fail-safe device
JPS60258623A (en) Microcomputer
JPH05108503A (en) Power failure processing system