JPH07225718A - Microcomputer system - Google Patents

Microcomputer system

Info

Publication number
JPH07225718A
JPH07225718A JP1690794A JP1690794A JPH07225718A JP H07225718 A JPH07225718 A JP H07225718A JP 1690794 A JP1690794 A JP 1690794A JP 1690794 A JP1690794 A JP 1690794A JP H07225718 A JPH07225718 A JP H07225718A
Authority
JP
Japan
Prior art keywords
eeprom
data
writing
signal
write
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
JP1690794A
Other languages
Japanese (ja)
Inventor
Yasushi Tajiri
裕史 田尻
Junichi Takai
純一 高井
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP1690794A priority Critical patent/JPH07225718A/en
Publication of JPH07225718A publication Critical patent/JPH07225718A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)
  • Read Only Memory (AREA)

Abstract

PURPOSE:To prevent the over of the number of times of data write into EEPROM caused by the runaway of computer or the like and to surely and easily manage the number of times of data write. CONSTITUTION:In the case of writing data in an EEPROM 102 with a CPU 101 access from the CPU within a fixed time T is monitored by a watchdog timer (WDT) 109 and the area select signal of a selector 105 for the access of the EEPROM is suppressed by a circuit 111 when there is no access, so that unwanted write and the over of the number of times of write into the EEPROM caused by the runaway of the CPU can be prevented. The operation of the selector is suppressed by a one-shot trigger circuit 112 just for a fixed time from the data write into the EEPROM so that required interval time can be secured in the EEPROM and the number of times of unwanted write at the time of runaway can be estimated and managed from timer relation with the WDT.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
装置に係り、特にEEPROMへのデータ書き込み回数
管理のための制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer device, and more particularly to a control device for managing the number of times data is written in an EEPROM.

【0002】[0002]

【従来の技術】マイクロコンピュータ装置のデータ記憶
手段として、一般に使用されるDRAM(ダイナミック
・ランダム・アクセス・メモリ)やSRAM(スタティ
ック・ランダム・アクセス・メモリ)のような揮発性メ
モリは、電源が落ちてしまうとメモリ情報(データ)は
消えてしまう。
2. Description of the Related Art A volatile memory such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory) which is generally used as a data storage means of a microcomputer device is powered down. If you do, the memory information (data) will be lost.

【0003】しかし、時間の管理や電源断前の情報を再
立ち上げ時に必要とするシステムでは、揮発性メモリの
電池等によるバックアップや電気的に書き込み可能なE
EPROM(Electrically・Erasab
le・PROM)等を使用する。
However, in a system that requires time management and information before power-off at the time of restarting, backup by a battery of a volatile memory or electrically writable E
EPROM (Electrically Erasab)
le ・ PROM) etc. are used.

【0004】EEPROMは、電源が落ちてもデータを
保持するという特性があるが、データを内部セルに書き
込める回数に制限がある。これはデバイスの特性により
1セル当たり通常10000回から100000回程度
であるが、その回数を越えるとデータの信頼性の保証が
なくなる。
The EEPROM has a characteristic of retaining data even when the power is turned off, but the number of times data can be written in the internal cell is limited. This is usually about 10,000 to 100,000 times per cell depending on the characteristics of the device, but if the number of times is exceeded, there is no guarantee of data reliability.

【0005】従って、システムマスタ(CPU)によっ
て書き込み回数を管理する必要がある。また、一度書き
込みを行うとある程度の時間が経たないと書き込みはで
きない。この時間は書き込みインターバル時間と呼ぶ。
Therefore, it is necessary to manage the number of writes by the system master (CPU). In addition, once writing is performed, writing cannot be performed until some time has passed. This time is called a write interval time.

【0006】書き込み回数の管理は、ソフトウエアのプ
ログラムによって書き込み回数と必要情報を数アドレス
に連続して書き込む方法が一般的である。書き込みイン
ターバル時間の管理は、ハードウエア又はソフトウエア
によるインターバル・タイマによって行う方法が一般的
である。
The management of the number of times of writing is generally a method of continuously writing the number of times of writing and necessary information to several addresses by a software program. The write interval time is generally managed by an interval timer made of hardware or software.

【0007】図9にEEPROMを実装したコンピュー
タ・システムを示す。また、図10にEEPROMの内
部情報の一例を示す。101はCPU、102はEEP
ROM、103は読み込み(RD)信号、104は書き
込み(WR)信号、105はデバイス選択を行うセレク
タ、106はCPU101のアドレス群、107はEE
PROM102の選択信号である。また、aはカウント
情報、bは必要情報であり、書き込み時は1バイトづつ
書き込みを行う。
FIG. 9 shows a computer system in which the EEPROM is mounted. Further, FIG. 10 shows an example of the internal information of the EEPROM. 101 is a CPU and 102 is an EEP
ROM, 103 is a read (RD) signal, 104 is a write (WR) signal, 105 is a selector for selecting a device, 106 is an address group of the CPU 101, 107 is EE
This is a selection signal for the PROM 102. In addition, a is count information and b is necessary information. When writing, writing is performed byte by byte.

【0008】[0008]

【発明が解決しようとする課題】前述のように、EEP
ROMは書き込み情報の信頼性は、書き込み回数に制約
を受けるため、書き込み回数を管理しなければならな
い。この管理は、ソフトウエアで行う場合が一般的であ
るが、何らかの原因でCPUやソフトウエアが暴走して
しまうと書き込み回数の管理情報も誤るばかりでなく、
1つのセルに何万回も書き込む可能性があり、デバイス
自体の信頼性も保証できなくなる。また、書き込み回数
も不確かで再起動時に確証も取れないため、デバイス
(EEPROM)の交換が必要となってしまう。
As mentioned above, the EEP
Since the reliability of the writing information in the ROM is limited by the number of times of writing, the number of times of writing must be managed. This management is generally performed by software, but if the CPU or software runs out of control for some reason, not only the management information of the number of writes becomes erroneous,
One cell may be written tens of thousands of times, and the reliability of the device itself cannot be guaranteed. In addition, since the number of times of writing is uncertain and the confirmation cannot be obtained at the time of restart, it is necessary to replace the device (EEPROM).

【0009】本発明の目的は、コンピュータの暴走等に
よるEEPROMへのデータ書き込み回数オーバーを防
止したマイクロコンピュータ装置を提供することにあ
る。
It is an object of the present invention to provide a microcomputer device which prevents the number of times data is written to the EEPROM due to a computer runaway or the like.

【0010】本発明の他の目的は、EEPROMへのデ
ータ書き込み回数管理を確実容易にするマイクロコンピ
ュータ装置を提供することにある。
Another object of the present invention is to provide a microcomputer device which surely and easily manages the number of times data is written in the EEPROM.

【0011】[0011]

【課題を解決するための手段】本発明は、前記課題の解
決を図るため、EEPROMをデータ記憶手段として有
するマイクロコンピュータ装置において、CPUからの
一定時間T内のアクセスがないときに前記EEPROM
のアクセスのためのエリア選択を抑止するウオッチ・ド
グ・タイマと、前記EEPROMへの前回のデータ書き
込みから今回のデータ書き込みまでの時間が一定時間t
以上になるときに前記エリア選択を許容するインターバ
ル・タイマとを備えたことを特徴とする。
In order to solve the above-mentioned problems, the present invention provides a microcomputer device having an EEPROM as a data storage means when the CPU does not access within a certain time T.
Watchdog timer that suppresses area selection for access to the memory, and the time from the previous writing of data to the EEPROM to the present writing of data is constant time t
And an interval timer that allows the area selection when the above conditions are met.

【0012】また、本発明は、EEPROMをデータ記
憶手段として有するマイクロコンピュータ装置におい
て、前記EEPROMのアドレス別のデータ書き込み回
数データを記憶する書き込み回数カウント用EEPRO
Mと、カウントアップ機能を持ち設定される値までのカ
ウントアップでCPUに書き込みを回数オーバーの割り
込みを行うカウンタ手段と、CPUから前記EEPRO
Mにデータ書き込みを行うときにそのアドレスに対応す
る前記カウント用EEPROMの書き込み回数データを
前記カウンタ手段に読み出し、該カウンタ手段でカウン
トアップされたデータを該カウント用EEPROMに再
書き込みする制御回路とを備えたことを特徴とする。
Further, the present invention is a microcomputer device having an EEPROM as a data storage means, for writing number counting EEPROM for storing data writing number data for each address of the EEPROM.
M, a counter unit having a count-up function and performing a write-over interrupt to the CPU by counting up to a set value, and the CPU from the EEPRO
When writing data to M, a control circuit for reading the writing frequency data of the counting EEPROM corresponding to the address to the counter means and rewriting the data counted up by the counter means to the counting EEPROM. It is characterized by having.

【0013】[0013]

【作用】請求項1では、ウオッチ・ドグ・タイマによる
コンピュータの暴走監視によってEEPROMへの書き
込みを抑止し、EEPROMへの不要な書き込み動作を
無くす。
According to the first aspect of the present invention, writing to the EEPROM is suppressed by monitoring the computer runaway by the watch dog timer, and unnecessary writing operation to the EEPROM is eliminated.

【0014】また、インターバル・タイマによるEEP
ROMへの書き込みインターバル時間を制限すると共
に、ウオッチ・ドグ・タイマの時間Tとインターバル時
間tからコンピュータの暴走時の誤ったアクセス回数を
類推可能にする。
Also, the EEP by the interval timer
It limits the write interval time to the ROM and makes it possible to analogize the wrong access count during runaway of the computer from the time T of the watch dog timer and the interval time t.

【0015】請求項2では、EEPROMへのデータ書
き込み回数を記憶するカウント用EEPROMを設け、
EEPROMへのデータ書き込み毎にカウント用EEP
ROMのデータをカウンタ手段によってカウントアップ
しておき、このカウント値が書き込み回数を越えるとき
にCPUへの割り込みによって書き込み回数オーバーの
認識ができるようにする。
According to a second aspect of the present invention, there is provided a counting EEPROM for storing the number of times data is written to the EEPROM.
EEP for counting each time data is written to EEPROM
The data in the ROM is counted up by the counter means, and when the count value exceeds the number of times of writing, it is possible to recognize the number of times of writing by interrupting the CPU.

【0016】[0016]

【実施例】図1は、本発明の一実施例を示す回路図であ
り、図9と同じ部分は同一符号で示す。108はEEP
ROM102のエリア選択信号、109はCPU101
の正常動作を管理するソフトウエア・ウオッチ・ドグ・
タイマ、110はソフトウエア異常時にタイムアップす
ると出力されるインヒビット信号、111はエリア選択
信号108をインヒビット信号110がアサートされな
いときにEEPROM選択信号107に出力させる回路
である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a circuit diagram showing an embodiment of the present invention, and the same parts as those in FIG. 108 is EEP
Area selection signal of ROM 102, 109 CPU 101
Software that manages the normal operation of
A timer 110 is an inhibit signal that is output when a time-out occurs in the event of software abnormality, and 111 is a circuit that outputs the area selection signal 108 to the EEPROM selection signal 107 when the inhibit signal 110 is not asserted.

【0017】また、112はEEPROM102に書き
込みを行った後にアサートされ、ある一定時間後にネゲ
ートされるワンショット・トリガ回路、113はワンシ
ョット・トリガ回路112による信号であり、この信号
がアサートされないときにセレクタ105からのエリア
選択信号出力を抑止する。114はレデイ回路であり、
選択信号107が出力されないときにウエイト(待機)
状態にする。115はCPU101に対するレデイ信
号、116はEEPROM102へ書き込みを表す回
路、117はウオッチ・ドグ・タイマ109を周期的に
トリガするための信号である。
Further, 112 is a one-shot trigger circuit which is asserted after writing to the EEPROM 102 and negated after a certain period of time, 113 is a signal by the one-shot trigger circuit 112, and when this signal is not asserted The output of the area selection signal from the selector 105 is suppressed. 114 is a ready circuit,
Wait when the selection signal 107 is not output (standby)
Put in a state. Reference numeral 115 is a ready signal to the CPU 101, 116 is a circuit representing writing to the EEPROM 102, and 117 is a signal for periodically triggering the watch dog timer 109.

【0018】以下に本実施例の動作を図2の通常動作シ
ーケンス及び図3の保護動作シーケンスを参照して説明
する。なお、シーケンス中に以下の項目(1)〜(5)
を対応付けて示す。
The operation of this embodiment will be described below with reference to the normal operation sequence of FIG. 2 and the protection operation sequence of FIG. The following items (1) to (5) are included in the sequence.
Are shown in association with each other.

【0019】(1)プログラムによって、CPU101
はある時間(ここでは時間Tとする)毎にウオッチ・ド
グ・タイマ109をアクセスする。このタイマは時間が
2T(任意)経過してもCPU101からのアクセスが
ない場合はウオッチ・ドグ・タイマ109がインヒビッ
ト信号110をアサートする。このタイマ・アクセス動
作は他のどのプログラムとも独立性があるものとする。
(1) By the program, the CPU 101
Accesses the watch dog timer 109 every certain time (here, time T). This timer asserts an inhibit signal 110 by the watch dog timer 109 when there is no access from the CPU 101 even after a lapse of 2T (arbitrary). This timer access operation is independent of any other program.

【0020】(2)EEPROM102への書き込みが
必要となったCPU101は、EEPROM102のエ
リア・アドレス群106とライト信号104を出力す
る。また、セレクタ105はアドレス群106をデコー
ドし、EEPROMのエリア選択信号108を出力す
る。
(2) The CPU 101, which needs to write to the EEPROM 102, outputs the area / address group 106 and the write signal 104 of the EEPROM 102. Further, the selector 105 decodes the address group 106 and outputs the area selection signal 108 of the EEPROM.

【0021】(3)前記(1)のように起動されたソフ
トウエア・ウオッチ・ドグ・タイマ109は、CPU1
01が正常動作中において、時間T毎にタイマ・アクセ
スがなされるため、インヒビット信号110がアサート
されず、EEPROM選択信号107がEEPROM1
02に入力される。
(3) The software watch dog timer 109 activated as described in (1) above is the CPU 1
While 01 is operating normally, the inhibit signal 110 is not asserted because the timer access is made every time T, and the EEPROM selection signal 107 is set to EEPROM1.
It is input to 02.

【0022】また、選択信号107がアサートされたこ
とによりレデイ回路114が動作し、CPU101にレ
デイ信号115が返送されてアクセスを完了する。
The assertion of the selection signal 107 causes the ready circuit 114 to operate, and the ready signal 115 is returned to the CPU 101 to complete the access.

【0023】(4)EEPROM102への2度目以降
の書き込みが必要となったCPU101は、前記(2)
と同様の動作を行う。しかし、前回の書き込み動作によ
って、回路116から出力された信号はワンショット・
トリガ回路112の信号(時間幅をtとする)をアサー
トするが、時間tが経過し、ワンショット・トリガ回路
112がネゲートするまで信号113がアサートされな
いと、回路105から信号108が出力されないため、
CPU101はウエイト状態になる。この時間tは前述
の書き込みインターバル時間に相当する。以後、EEP
ROM102への書き込みは(4)の動作を繰り返す。
(4) The CPU 101, which needs to write the EEPROM 102 for the second time and thereafter, is
Performs the same operation as. However, the signal output from the circuit 116 by the previous writing operation is a one-shot signal.
Although the signal of the trigger circuit 112 (assuming the time width is t) is asserted, the signal 108 is not output from the circuit 105 unless the signal 113 is asserted until the time t elapses and the one-shot trigger circuit 112 is negated. ,
The CPU 101 is in a wait state. This time t corresponds to the above write interval time. After that, EEP
Writing to the ROM 102 repeats the operation (4).

【0024】以上までの動作は図2のシーケンスに示さ
れる。
The above operation is shown in the sequence of FIG.

【0025】(5)ここで、図3に示すように、何らか
の異常によりプログラムが暴走したとする。ウオッチ・
ドグ・タイマ回路109は時間Tが経過してもCPU1
01からのアクセスが発生しないため、時間2T後に信
号110をアサートし、回路111をロックする。
(5) Here, as shown in FIG. 3, it is assumed that the program has run away due to some abnormality. Watch
The dog timer circuit 109 is the CPU 1 even if the time T elapses.
Since the access from 01 does not occur, the signal 110 is asserted and the circuit 111 is locked after the time 2T.

【0026】従って、それ以降のEEPROM102に
対する書き込み動作は発生しないため、暴走による誤っ
たアクセスをロックできる。また、書き込み回路はハー
ドウエアで制御されているため、2T/t回以上の誤っ
た書き込みは発生しない。
Therefore, since the writing operation to the EEPROM 102 after that does not occur, an erroneous access due to a runaway can be locked. Further, since the writing circuit is controlled by hardware, erroneous writing of 2T / t times or more does not occur.

【0027】なお、上記2T/t回の誤った書き込みに
より、カウンタ値の破壊が考えられるが、時間Tがtに
対して10倍未満(オーダー的に1桁)であれば、EE
PROM102の全体的な情報を基に、電源再起動時に
誤ったアクセスによって不正に書き込まれたカウンタ・
アドレスやその値を類推することができるため、EEP
ROM102の信頼性(最高何回書き込みが行われたか
どうか)を確認することができる。
Although the counter value may be destroyed by the incorrect writing of 2T / t times, if the time T is less than 10 times t (one digit in order), EE
Based on the overall information of PROM 102, the counter that was illegally written by incorrect access at the time of restarting the power supply.
Since the address and its value can be analogized, EEP
It is possible to confirm the reliability of the ROM 102 (how many times writing has been performed at maximum).

【0028】図4は本発明の他の実施例を示す回路図で
ある。1はCPU、2はデータ用EEPROM、3は読
み込み(RD)信号、4は書き込み(WR)信号、5は
デバイス選択を行うセレクタ、6はCPU1のアドレス
群、7はデータ用EEPROM2の選択信号である。
FIG. 4 is a circuit diagram showing another embodiment of the present invention. 1 is a CPU, 2 is a data EEPROM, 3 is a read (RD) signal, 4 is a write (WR) signal, 5 is a selector for selecting a device, 6 is an address group of the CPU 1, and 7 is a selection signal of the data EEPROM 2. is there.

【0029】8はCPUのデータ群、11と12はデー
タ用EEPROM2とのデータのやりとりのための双方
向データバッファとデータ群、13はEEPROM2用
のレディ回路、14はCPU1のレディ信号である。
Reference numeral 8 is a CPU data group, 11 and 12 are bidirectional data buffers and data groups for exchanging data with the data EEPROM 2, 13 is a ready circuit for the EEPROM 2, and 14 is a ready signal of the CPU 1.

【0030】また、15はラッチ付きのアドレスバッフ
ァ、16と17はEEPROM2に与えるアドレスの内
のアドレス0とアドレス0以外のアドレス、18は書き
込み回数カウント用EEPROM、19と20はそれぞ
れEEPROM2の選択条件入りのRD信号とWR信号
である。
Further, 15 is an address buffer with a latch, 16 and 17 are addresses 0 and non-address 0 of addresses given to the EEPROM 2, 18 is an EEPROM for counting the number of times of writing, and 19 and 20 are selection conditions of the EEPROM 2, respectively. The incoming RD and WR signals.

【0031】21、22はEEPROM2の選択条件入
りのリード信号/ライト信号の生成回路(論理積回
路)。23は書き込み回数カウント用EEPROM制御
回路。24はEEPROMアクセス時のCPUレディ生
成回路へ渡すEEPROMレディ生成許可信号(RDY
ENB)。
Reference numerals 21 and 22 denote read signal / write signal generation circuits (logical product circuits) with a selection condition for the EEPROM 2. 23 is an EEPROM control circuit for counting the number of times of writing. Reference numeral 24 denotes an EEPROM ready generation permission signal (RDY) to be passed to the CPU ready generation circuit at the time of EEPROM access.
ENB).

【0032】25、26、27は書き込み回数カウント
用EEPROMのアドレスビット0とリード(RD)信
号とライト(WR)信号。28、29は書き込み回数用
の16ビットカウンタで、それぞれ下8ビットと上8ビ
ットに分かれ、キャリーデータ35で接続される。
Reference numerals 25, 26 and 27 are address bit 0 of the EEPROM for counting the number of times of writing, a read (RD) signal and a write (WR) signal. 28 and 29 are 16-bit counters for the number of times of writing, which are divided into lower 8 bits and upper 8 bits, respectively, and are connected by carry data 35.

【0033】30は書き込み回数のカウント用EEPR
OM18のデータ群で、16ビット・カウンタの上位桁
/下位桁にバッファ31、32を通してLバイト・デー
タ33とHバイト・データ34に分割される。
Reference numeral 30 is an EEPR for counting the number of times of writing.
The data group of the OM 18 is divided into L byte data 33 and H byte data 34 through the buffers 31 and 32 in the upper digit / lower digit of the 16-bit counter.

【0034】36、37、38、39、40は、上記カ
ウンタ及びL/Hバイト・データ・バッファの制御信号
で、それぞれHバイト/Lバイト・ゲート・イネーブル
信号、Hバイト/Lバイト・カウンタ・ロード信号、カ
ウンタ・クロック信号である。
Reference numerals 36, 37, 38, 39 and 40 denote control signals for the counter and the L / H byte data buffer, which are an H byte / L byte gate enable signal and an H byte / L byte counter, respectively. These are load signal and counter clock signal.

【0035】41はHバイト・カウンタのデータ・ビッ
ト出力であり、ここではデータ・ビットの最高位7とす
る。
Reference numeral 41 denotes the data bit output of the H byte counter, which is the highest 7 bits of the data bit here.

【0036】42は、ライト信号27で出力41をラッ
チするフリップ・フロップ。43はフリップ・フロップ
42の出力であり、CPU1に割り込みをかける信号と
なる。
A flip-flop 42 latches the output 41 with the write signal 27. An output 43 of the flip-flop 42 is a signal for interrupting the CPU 1.

【0037】44は割り込み信号43によって表示手段
としてのLED(発光ダイオード)を点灯させる回路。
45、46は書き込み回数カウント用EEPROM18
のクリア設定回路及び設定情報。47はCPU1からの
H/Lカウンタ・クリア情報。48はカウンタ・クリア
信号であり、49はカウンタ・クリア信号48がアサー
トされている間だけ点灯する回路である。
Reference numeral 44 is a circuit for lighting an LED (light emitting diode) as a display means by the interrupt signal 43.
45 and 46 are EEPROM 18 for counting the number of times of writing
Clear setting circuit and setting information. 47 is H / L counter clear information from the CPU 1. Reference numeral 48 is a counter clear signal, and 49 is a circuit which lights up only while the counter clear signal 48 is asserted.

【0038】50は信号43及び46の状態読み込み及
びEEPROM制御回路23にクリア信号47を渡すた
めのCPUアクセス可能なレジスタである。
Reference numeral 50 is a CPU accessible register for reading the states of the signals 43 and 46 and passing a clear signal 47 to the EEPROM control circuit 23.

【0039】51、52はレジスタ50とCPU1との
やり取りを行うデータ群及びデータ・バッファである。
なお、53はEEPROM2のアドレスをラッチする信
号である。
Reference numerals 51 and 52 are a data group and a data buffer for exchanging data between the register 50 and the CPU 1.
Reference numeral 53 is a signal for latching the address of the EEPROM 2.

【0040】本実施例の動作を図5〜図8を参照して以
下に詳細に説明する。
The operation of this embodiment will be described in detail below with reference to FIGS.

【0041】(A)イニシャライズ・シーケンス(図5
参照)。
(A) Initialization sequence (FIG. 5)
reference).

【0042】書き込み回数カウンタ用EEPROM18
の内容を全て0にする動作である。データ用EEPRO
M2の最初に書き込み動作を行う前(例えば工場出荷時
など)に実行する。そのシーケンスは以下の通りであ
る。
EEPROM 18 for writing number counter
Is an operation to set all the contents of 0 to 0. EEPRO for data
This is performed before the write operation is first performed in M2 (for example, at the time of factory shipment). The sequence is as follows.

【0043】(A1)設定回路45を短絡することによ
り、信号46がLレベルとなる。CPU1は電源起動
後、レジスタ50を参照して信号46のレベルを確認す
る。その場合、信号48と信号3がアサートされ、51
→データバッファ52→8のルートでデータを読み込
む。
(A1) By shorting the setting circuit 45, the signal 46 becomes L level. After the power is turned on, the CPU 1 refers to the register 50 to check the level of the signal 46. In that case, signal 48 and signal 3 are asserted and 51
→ Data buffer 52 → Data is read by the route of 8.

【0044】(A2)信号46のLレベルを確認後、C
PU1はレジスタ50の内部のビットにライト動作を行
い、クリア信号47をアサートする。この場合、クリア
信号48と書き込み信号4をアサートし、8→データバ
ッファト52→51のルートで書き込む。また、レジス
タ50の内容を図6に示す。
(A2) After confirming the L level of the signal 46, C
PU1 performs a write operation on the internal bit of the register 50 and asserts the clear signal 47. In this case, the clear signal 48 and the write signal 4 are asserted, and writing is performed by the route of 8 → data buffer 52 → 51. The contents of the register 50 are shown in FIG.

【0045】(A3)信号47を検出した制御回路23
は、カウンタクリア信号48をLレベルにドライブし、
書き込み回数カウンタ28、29を0クリアする。同時
に、LED点灯回路49を点灯させる。
(A3) Control circuit 23 which has detected the signal 47
Drives the counter clear signal 48 to the L level,
The write counters 28 and 29 are cleared to zero. At the same time, the LED lighting circuit 49 is turned on.

【0046】(A4)CPU1は、データ用EEPRO
M2の全エリアのイニシャライズを行う(書き込みデー
タは任意)。
(A4) The CPU 1 uses the data EEPROM
Initialize all areas of M2 (write data is arbitrary).

【0047】同時に、制御回路23は書き込み回数用E
EPROM18の全エリアをカウンタ28、29から読
み込んで0クリアする。その間は点灯回路49が点灯し
ているため、目で確認できる。書き込みシーケンスの詳
細は後述する。
At the same time, the control circuit 23 controls the write count E
The entire area of the EPROM 18 is read from the counters 28 and 29 and cleared to 0. During that time, since the lighting circuit 49 is lit, it can be visually confirmed. Details of the write sequence will be described later.

【0048】(A5)CPU1は全エリア・イニシャラ
イズが終了したとき、レジスタ50内部のビットにライ
ト(WR)動作を行い、信号47をネゲートする。同時
に、制御回路23は信号48をネゲートするため、カウ
ンタ28、29のクリアは解除され、点灯回路49は消
灯する。
(A5) When the all area initialization is completed, the CPU 1 performs a write (WR) operation on the bit inside the register 50 and negates the signal 47. At the same time, since the control circuit 23 negates the signal 48, the clearing of the counters 28 and 29 is released and the lighting circuit 49 is turned off.

【0049】(A6)点灯回路49の消灯を確認したと
き、設定回路45の設定(短絡)を開放にし、イニシャ
ライズ・シーケンスを終了する。以後、設定回路45は
EEPROMの交換によるイニシャライズ・シーケンス
まで短絡しない。
(A6) When it is confirmed that the lighting circuit 49 is turned off, the setting (short circuit) of the setting circuit 45 is opened, and the initialization sequence is completed. After that, the setting circuit 45 does not short-circuit until the initialization sequence by replacing the EEPROM.

【0050】(B)通常動作(ライト動作)(図7参
照)。
(B) Normal operation (write operation) (see FIG. 7).

【0051】(B1)CPU1がデータ用EEPROM
2に対してライト(書き込み)動作を行うとする。この
場合、セレクタ5より選択信号7とライト信号4が出力
され、回路22よりライトパルス20が出力される。ま
た、書き込みアドレスとデータはそれぞれアドレス群6
→バッファ15→16、17及びデータ群8→バッファ
11→12の順に渡される。ここでは、EEPROM2
のチップ選択信号は常時セレクトとする。
(B1) CPU 1 is a data EEPROM
It is assumed that a write (write) operation is performed on 2. In this case, the selector 5 outputs the selection signal 7 and the write signal 4, and the circuit 22 outputs the write pulse 20. Further, the write address and the data are the address group 6 respectively.
→ The buffers 15 → 16, 17 and the data group 8 → buffer 11 → 12 are passed in this order. Here, EEPROM2
The chip select signal is always selected.

【0052】(B2)前記の(B1)と同時に、ライト
パルス20を受け付けた制御回路23は、アドレス・ラ
ッチ・パルス53を出力し、バッファ15にアドレス情
報をラッチする。このアドレス情報の内、最下位ビット
を除く上位ビットはカウント用EEPROM18のアド
レスにもなる。
(B2) At the same time as the above (B1), the control circuit 23 receiving the write pulse 20 outputs an address latch pulse 53 to latch the address information in the buffer 15. Of this address information, the upper bits except the least significant bit also serve as the address of the counting EEPROM 18.

【0053】アドレス情報のラッチと同時に、制御回路
23はアドレスビット0信号25を0、1の順に変化さ
せ、EEPROM18に対するアドレスデータの最下位
のビット桁を偶数と奇数のバイト順に変化させることに
より、書き込み回数カウント用EEPROM18に書き
込まれている当該アドレスの書き込み回数データ(2バ
イト)をカウンタ28と29に分けて読み込む。
Simultaneously with the latching of the address information, the control circuit 23 changes the address bit 0 signal 25 in the order of 0 and 1, and changes the least significant bit digit of the address data to the EEPROM 18 in the order of even and odd bytes. The write count data (2 bytes) of the address written in the write count EEPROM 18 is separately read into the counters 28 and 29.

【0054】その場合、リード信号26、バッファ制御
信号36、37及びデータ・ロード信号38、39を使
用する。
In that case, the read signal 26, the buffer control signals 36, 37 and the data load signals 38, 39 are used.

【0055】(B3)前記の(B2)でカウント情報を
カウンタにロード後、カウンタ・クロック40でカウン
ト・アップする。カウント・アップされたデータは、ア
ドレス0信号25を0、1の順に変化させ、バッファ制
御信号36、37とライト信号27を使用してカウンタ
用EEPROM18の同じアドレスに再書き込みを行
う。
(B3) After the count information is loaded into the counter in (B2), the counter clock 40 counts up. The counted up data changes the address 0 signal 25 in the order of 0 and 1, and rewrites to the same address of the counter EEPROM 18 using the buffer control signals 36 and 37 and the write signal 27.

【0056】この場合、データの下位桁L/上位桁Hの
バイトは信号30→バッファ31→信号33又は信号3
0→バッファ32→信号34のルートを使用する。
In this case, the byte of the lower digit L / upper digit H of the data is signal 30 → buffer 31 → signal 33 or signal 3
The route of 0 → buffer 32 → signal 34 is used.

【0057】(B4)前記(B1)でデータ用EEPR
OM2のライト動作が終了した場合、制御回路23はレ
ディ生成許可信号24をアサートしてレディ回路13か
らCPU1に対してレディ信号14を返送する。しか
し、前記(B2)、(B3)の動作中にEEPROM2
へのライト動作が行われた場合は、信号24をネゲート
して(B2)、(B3)の動作終了を待つ。
(B4) EEPR for data in (B1)
When the write operation of the OM2 is completed, the control circuit 23 asserts the ready generation permission signal 24 and returns the ready signal 14 from the ready circuit 13 to the CPU 1. However, during the operation of (B2) and (B3), the EEPROM2
When the write operation to (1) is performed, the signal 24 is negated and the operation of (B2) and (B3) is waited for.

【0058】連続してEEPROM2に対してライト動
作が行われると、CPU1に常時ウエイトが入るが、実
用上はリード動作時は制御回路23はレディ生成許可信
号24をアサートするため、また、EEPROM2のラ
イト・サイクルのインターバルが非常に長いため、問題
とならない。
When the write operation is continuously performed on the EEPROM 2, the CPU 1 always waits. However, in practice, the control circuit 23 asserts the ready generation permission signal 24 during the read operation. This is not a problem because the write cycle interval is very long.

【0059】以上の動作により、EEPROM2に書き
込まれた回数をカウンタ用EEPROM18に2バイト
単位で情報をもつことができる。また、1バイト単位で
管理する場合はEEPROM18が1つ増設される。
By the above operation, the number of times written in the EEPROM 2 can be stored in the counter EEPROM 18 in units of 2 bytes. Further, when managing in units of 1 byte, one EEPROM 18 is added.

【0060】(C)書き込み回数管理(図8参照)。(C) Management of number of times of writing (see FIG. 8).

【0061】(C1)カウンタ28、29は合計で16
ビット・カウンタのため、最大で65000回カウント
できる。ここで、MSBのビットが「1」となるまでカ
ウントする場合、約32000回カウントできる。上記
回路では2バイト単位で管理しているため、書き込み動
作が約16000回以上(32000回未満)になると
MSBが「1」となる。
(C1) Counters 28 and 29 have a total of 16
Since it is a bit counter, it can count up to 65,000 times. Here, when the MSB bit is counted until it becomes “1”, it can be counted about 32,000 times. Since the above circuit manages in units of 2 bytes, the MSB becomes "1" when the write operation is performed about 16000 times or more (less than 32000 times).

【0062】(C2)カウンタ29のMSBが「1」と
なると、カウント用EEPROM18へのライト・タイ
ミングでラッチ回路42にラッチを行う。ラッチされた
信号43は、CPU1に割り込みをかけると同時に回路
44を点灯させ、あるバイトの書き込み回数が約160
00回以上になったことを知らせる。
(C2) When the MSB of the counter 29 becomes "1", the latch circuit 42 is latched at the timing of writing to the counting EEPROM 18. The latched signal 43 interrupts the CPU 1 and turns on the circuit 44 at the same time, so that the write count of a certain byte is about 160.
Notify that it has been over 00 times.

【0063】(C3)CPU1は割り込み検出後、レジ
スタ50で信号43がアサートされていることを確認
し、EEPROM2の書き込みオーバーを検出できる。
(C3) After detecting the interrupt, the CPU 1 confirms that the signal 43 is asserted in the register 50 and can detect the overwriting of the EEPROM 2.

【0064】以上によって、EEPROM2の書き込み
回数のオーバー・フローを防ぐことができる。
As described above, it is possible to prevent the overflow of the number of writing times of the EEPROM 2.

【0065】なお、書き込みの制限回数は、信号41の
どのビットを使用するか(または組み合わせ)で任意に
とることができる。
The limit number of times of writing can be set arbitrarily depending on which bit of the signal 41 is used (or combination).

【0066】また、前記のようにカウンタ用EEPRO
M18を1個増せば、1バイト毎に正確な回数をカウン
トできる。さらに、アドレスバッファ15にラッチされ
た値を読み込む回路(レジスタとする)を付加すれば、
アドレス毎に書き込み回数を確認することができる。
Further, as described above, the counter EEPRO
If M18 is increased by one, an accurate number can be counted for each byte. Further, if a circuit (register) for reading the latched value is added to the address buffer 15,
The number of writes can be confirmed for each address.

【0067】[0067]

【発明の効果】以上のとおり、本発明によれば、ウオッ
チ・ドグ・タイマによるコンピュータの暴走監視をし、
暴走検出によってEEPROMへの書き込みを抑止する
ため、暴走によりEEPROMへの多数回の書き込み動
作が無くなる。
As described above, according to the present invention, the watchdog timer monitors the runaway of the computer,
Since the writing to the EEPROM is suppressed by the runaway detection, a large number of write operations to the EEPROM are eliminated by the runaway.

【0068】また、インターバル・タイマによるEEP
ROMへの書き込みインターバル時間を制限する機能と
の併用により、所定のインターバル時間の確保のほか
に、ウオッチ・ドグ・タイマの時間Tとインターバル時
間tからコンピュータの暴走時の誤ったアクセス回数を
類推可能にし、書き込み回数管理を容易にする。
EEP by interval timer
By combining with the function that limits the interval time for writing to ROM, in addition to securing a certain interval time, it is possible to infer the number of incorrect accesses during a computer runaway from the time T of the watch dog timer and the interval time t. To facilitate management of the number of writes.

【0069】また、EEPROMへのデータ書き込み回
数を記憶するカウント用EEPROMを設け、EEPR
OMへのデータ書き込み毎にカウント用EEPROMの
データをカウンタ手段によってカウントアップしておく
ことにより、カウント値から書き込み回数オーバーを防
止すると共にその管理・認識が確実になる。
Further, a counting EEPROM for storing the number of times of writing data to the EEPROM is provided, and the EEPROM is
By counting up the data of the counting EEPROM by the counter means every time data is written to the OM, it is possible to prevent the number of times of writing from being exceeded from the count value and to ensure the management and recognition thereof.

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

【図1】本発明の一実施例を示す回路図。FIG. 1 is a circuit diagram showing an embodiment of the present invention.

【図2】実施例の通常動作シーケンス。FIG. 2 is a normal operation sequence according to the embodiment.

【図3】実施例の保護動作シーケンス。FIG. 3 is a protection operation sequence according to the embodiment.

【図4】他の実施例の回路図。FIG. 4 is a circuit diagram of another embodiment.

【図5】他の実施例のイニシャライズシーケンス。FIG. 5 is an initialization sequence of another embodiment.

【図6】他の実施例のレジスタ50の内容例。FIG. 6 shows an example of contents of a register 50 according to another embodiment.

【図7】他の実施例の通常動作シーケンス。FIG. 7 shows a normal operation sequence of another embodiment.

【図8】他の実施例の書き込み回数管理シーケンス。FIG. 8 is a write count management sequence according to another embodiment.

【図9】EEPROMの使用例。FIG. 9 shows an example of using the EEPROM.

【図10】EEPROMの内部情報例。FIG. 10 shows an example of internal information of an EEPROM.

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

1、101…CPU 2、102…EEPROM 5、105…セレクタ 13、114…レディ回路 18…書き込み回数カウント用EEPROM 23…書き込み回路カウント用EEPROM制御回路 28、29…書き込み回数用ビットカウンタ 31、32…バッファ 42…ラッチ回路 45…設定回路 50…レジスタ 109…ウオッチ・ドグ・タイマ 112…ワンショット・トリガ回路 1, 101 ... CPU 2, 102 ... EEPROM 5, 105 ... Selector 13, 114 ... Ready circuit 18 ... Write count count EEPROM 23 ... Write circuit count EEPROM control circuit 28, 29 ... Write count bit counter 31, 32 ... Buffer 42 ... Latch circuit 45 ... Setting circuit 50 ... Register 109 ... Watch dog timer 112 ... One-shot trigger circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 EEPROMをデータ記憶手段として有
するマイクロコンピュータ装置において、CPUからの
一定時間T内のアクセスがないときに前記EEPROM
のアクセスのためのエリア選択を抑止するウオッチ・ド
グ・タイマと、前記EEPROMへの前回のデータ書き
込みから今回のデータ書き込みまでの時間が一定時間t
以上になるときに前記エリア選択を許容するインターバ
ル・タイマとを備えたことを特徴とするマイクロコンピ
ュータ装置。
1. In a microcomputer device having an EEPROM as a data storage means, the EEPROM is accessed when there is no access from the CPU within a certain time T.
Watchdog timer that suppresses area selection for access to the memory, and the time from the previous writing of data to the EEPROM to the present writing of data is constant time t
A microcomputer device, comprising: an interval timer that permits the area selection when the above is reached.
【請求項2】 EEPROMをデータ記憶手段として有
するマイクロコンピュータ装置において、前記EEPR
OMのアドレス別のデータ書き込み回数データを記憶す
る書き込み回数カウント用EEPROMと、カウントア
ップ機能を持ち設定される値までのカウントアップでC
PUに書き込みを回数オーバーの割り込みを行うカウン
タ手段と、CPUから前記EEPROMにデータ書き込
みを行うときにそのアドレスに対応する前記カウント用
EEPROMの書き込み回数データを前記カウンタ手段
に読み出し、該カウンタ手段でカウントアップされたデ
ータを該カウント用EEPROMに再書き込みする制御
回路とを備えたことを特徴とするマイクロコンピュータ
装置。
2. A microcomputer device having an EEPROM as data storage means, wherein the EEPR
An EEPROM for storing the number of times of writing the data for storing the number of times of writing the data for each address of the OM, and a count-up function to count up to a set value.
A counter means for interrupting the writing to the PU and a count means corresponding to the address when writing data from the CPU to the EEPROM is read to the counter means and counted by the counter means. And a control circuit for rewriting the updated data to the counting EEPROM.
JP1690794A 1994-02-14 1994-02-14 Microcomputer system Pending JPH07225718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1690794A JPH07225718A (en) 1994-02-14 1994-02-14 Microcomputer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1690794A JPH07225718A (en) 1994-02-14 1994-02-14 Microcomputer system

Publications (1)

Publication Number Publication Date
JPH07225718A true JPH07225718A (en) 1995-08-22

Family

ID=11929216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1690794A Pending JPH07225718A (en) 1994-02-14 1994-02-14 Microcomputer system

Country Status (1)

Country Link
JP (1) JPH07225718A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005235225A (en) * 2004-02-20 2005-09-02 Hewlett-Packard Development Co Lp Standalone memory device, and system and method using it

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005235225A (en) * 2004-02-20 2005-09-02 Hewlett-Packard Development Co Lp Standalone memory device, and system and method using it

Similar Documents

Publication Publication Date Title
US5987560A (en) Integrated programmable logic circuit for conditioning received input signals, detecting transitions of conditioned signals, and generating an associated interrupt respectively
US7574611B2 (en) Command decoder for microcontroller based flash memory digital controller system
KR101110994B1 (en) Method and apparatus for protecting an integrated circuit from erroneous operation
KR101252367B1 (en) Disabling cache portions during low voltage operations
JP5535547B2 (en) Secure memory interface
JPS63133238A (en) Digital data processing system
EP0608060B1 (en) Data protection apparatus and method
US9075741B2 (en) Dynamic error handling using parity and redundant rows
US8516298B2 (en) Data protection method for damaged memory cells
CN104932954A (en) FPGA (Field Programmable Gate Array) key data protection method for microsatellite
US11455251B2 (en) Enhanced durability for systems on chip (SOCs)
US20180060239A1 (en) Disabling cache portions during low voltage operations
JP3578175B2 (en) Memory word management circuit
JPH07225718A (en) Microcomputer system
US6260132B1 (en) Method and apparatus for secure address re-mapping
US20200371929A1 (en) Method and apparatus for architectural cache transaction logging
US20230395181A1 (en) Glitch detection redundancy
US11900150B2 (en) Methods and systems for collection of system management interrupt data
US7475237B2 (en) Timer with periodic channel service
JP2994642B2 (en) Data processing device
JP3216200B2 (en) Data memory write control circuit
JPH01258054A (en) Access control system for storage device
JPH08185358A (en) Microprocessor
JPH06259337A (en) Data protection system
JPH05265850A (en) Memory card controller