JP2516711B2 - Watchdog timer device - Google Patents

Watchdog timer device

Info

Publication number
JP2516711B2
JP2516711B2 JP3051051A JP5105191A JP2516711B2 JP 2516711 B2 JP2516711 B2 JP 2516711B2 JP 3051051 A JP3051051 A JP 3051051A JP 5105191 A JP5105191 A JP 5105191A JP 2516711 B2 JP2516711 B2 JP 2516711B2
Authority
JP
Japan
Prior art keywords
signal
reset
reset signal
circuit
binary counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP3051051A
Other languages
Japanese (ja)
Other versions
JPH04286036A (en
Inventor
崇 内貴
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.)
Rohm Co Ltd
Original Assignee
Rohm 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 Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP3051051A priority Critical patent/JP2516711B2/en
Publication of JPH04286036A publication Critical patent/JPH04286036A/en
Application granted granted Critical
Publication of JP2516711B2 publication Critical patent/JP2516711B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロプロセッサな
どが暴走した場合にシステムリセット信号を発生するウ
ォッチドッグタイマ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a watchdog timer device which generates a system reset signal when a microprocessor or the like runs out of control.

【0002】[0002]

【従来の技術】マイクロコンピュータシステムにおいて
は、所定のプログラムに従ってCPUが制御や処理を行
う。しかしながら、何らかの不具合により、適正なプロ
グラムの実行が行えなくなると、いわゆるCPUの暴走
が生ずる。
2. Description of the Related Art In a microcomputer system, a CPU controls and processes according to a predetermined program. However, if the proper program cannot be executed due to some trouble, so-called CPU runaway occurs.

【0003】そこで、そのような暴走を判定し、自動的
にCPUを復帰させるために、いわゆるウォッチドッグ
タイマ装置が用いられている。
Therefore, a so-called watchdog timer device is used to determine such a runaway and automatically return the CPU.

【0004】図2には、従来のウォッチドッグタイマ装
置10の構成が示されている。この従来例においては、
ウォッチドッグタイマ装置10は、バイナリカウンタ1
2によって構成されている。そして、このバイナリカウ
ンタ12には、所定のクロック100が入力されてお
り、このバイナリカウンタ12はこの入力されたクロッ
ク100をカウントして、そのカウント値が所定のシス
テムリセット実行値に達したときにシステムリセット信
号102を発生させている。
FIG. 2 shows the configuration of a conventional watchdog timer device 10. In this conventional example,
The watchdog timer device 10 includes a binary counter 1
It is composed of two. A predetermined clock 100 is input to the binary counter 12, and the binary counter 12 counts the input clock 100, and when the count value reaches a predetermined system reset execution value. The system reset signal 102 is generated.

【0005】このようなシステムリセット信号は、図2
に示されるようにCPU11の所定の端子に入力されて
いる。一方、CPU11は、ソフトウェアに組み込まれ
た所定のリセットルーチンに従って、バイナリカウンタ
12に対して、ある時間幅をもった所定の周期でカウン
タリセット信号104を出力しており、これによってバ
イナリカウンタ12がリセットされ、通常のCPU実行
時においては、バイナリカウンタ12がほぼ定期的にリ
セットされている。そして、例えばCPU11の暴走が
生じた場合には、このようなカウンタリセット信号10
4が定期的に出力されなくなるため、上述したように、
バイナリカウンタ12からCPU11に対してシステム
リセット信号102が出力され、この結果、CPU11
がリセットされ、一般的にはシステムが初期状態に戻る
ことになる。
Such a system reset signal is shown in FIG.
Is input to a predetermined terminal of the CPU 11 as shown in FIG. On the other hand, the CPU 11 outputs a counter reset signal 104 to the binary counter 12 at a predetermined cycle with a certain time width in accordance with a predetermined reset routine incorporated in the software, whereby the binary counter 12 is reset. The binary counter 12 is reset almost regularly during normal CPU execution. Then, for example, when the CPU 11 runs out of control, such a counter reset signal 10
As 4 is not output periodically, as described above,
A system reset signal 102 is output from the binary counter 12 to the CPU 11, and as a result, the CPU 11
Will be reset and the system will generally return to its initial state.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、この図
2に示した従来のウォッチドッグタイマ装置において
は、CPU11が不正常な動作を行っていてもカウンタ
リセット信号104がある期間毎に出力されている場合
には、ウォッチドッグタイマ装置10がそれを判定でき
ないという問題があった。つまり、カウンタリセット信
号104が、通常の出力間隔より短期間に出力される場
合においては、CPU11の暴走を判別できないという
課題があった。
However, in the conventional watchdog timer device shown in FIG. 2, the counter reset signal 104 is output every certain period even if the CPU 11 is performing an abnormal operation. In this case, there is a problem that the watchdog timer device 10 cannot judge it. That is, when the counter reset signal 104 is output within a shorter period than the normal output interval, there is a problem that the runaway of the CPU 11 cannot be determined.

【0007】本発明は、上記従来の課題に鑑みなされた
ものであり、その目的は、カウンタリセット信号が通常
より短い周期で生じているようなシステムの異常をも判
断することのできるウォッチドッグタイマ装置を提供す
ることにある。
The present invention has been made in view of the above conventional problems, and an object thereof is to provide a watchdog timer capable of judging a system abnormality such that a counter reset signal occurs in a cycle shorter than usual. To provide a device.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、所定のクロックのカウントを行い、ほぼ
定期的に入力されるカウントリセット信号によってリセ
ットされるn段のバイナリカウンタであって、そのカウ
ント値が所定のシステムリセット実行値に達したときに
その最上位のn段目出力端子からシステムリセット信号
を出力するバイナリカウンタと、前記バイナリカウンタ
のn段目出力端子を除いた残りの出力端子の中で所定の
m個の出力端子に共通接続され、前記m個の出力端子か
ら出力されるm個の信号が示す値が、カウントリセット
間隔が短くなる異常を判定するために設定された判定値
に到達するまで判定期間内信号を出力する第1のアンド
回路と、前記判定期間内信号が入力され、かつ前記カウ
ントリセット信号が入力された場合に、前記システムリ
セット信号を出力する第2のアンド回路と、を含むこと
を特徴とする。
In order to achieve the above object, the present invention is an n-stage binary counter which counts a predetermined clock and is reset by a count reset signal input almost regularly. When the count value reaches a predetermined system reset execution value,
A binary counter that outputs a system reset signal from the n-th highest-order output terminal, and the binary counter
Predetermined among the remaining output terminals except the nth output terminal of
Commonly connected to m output terminals.
The value indicated by the m signals output from the counter is reset
Judgment value set to judge the abnormality that the interval becomes shorter
1st AND that outputs a signal within the determination period until the
Circuit, the signal within the judgment period is input, and
If the system reset signal is input,
And a second AND circuit that outputs a set signal .

【0009】[0009]

【作用】上記構成によれば、判定手段によって、カウン
トリセット間隔が正常であるか否かを判定することがで
きる。そして、カウントリセット間隔が非正常になった
時は、異常判断回路によってシステムリセット信号を発
生させることができる。従って、従来においては判定し
得なかったようなシステム異常をも検出できるという利
点がある。また、本発明では、単一のバイナリカウンタ
を2つのタイマのように機能させることができるので、
ウオッチドッグタイマ装置の構成を簡易化でき、回路規
模を小さくできるという利点がある。更に、第1のアン
ド回路に接続されるn個の出力端子の個数等を適宜調整
することによってカウントリセット間隔が短くなる異常
を判定するための判定値を容易に増減できるという利点
もある。加えて、本発明によれば、第2のアンド回路に
おいて、カウントリセット信号をそのままシステムリセ
ット信号として利用できるという利点がある。
According to the above construction, the judgment means can judge whether the count reset interval is normal or not. Then, when the count reset interval becomes abnormal, a system reset signal can be generated by the abnormality determination circuit. Therefore, there is an advantage that it is possible to detect a system abnormality that could not be determined in the past. Also, in the present invention, a single binary counter
Can be made to function like two timers,
The configuration of the watchdog timer device can be simplified and
There is an advantage that the size can be reduced. Furthermore, the first Anne
The number of n output terminals connected to the circuit
Error that shortens the count reset interval by
The advantage that you can easily increase or decrease the judgment value for judging
There is also. In addition, according to the present invention, the second AND circuit is provided.
The count reset signal as it is
It has the advantage that it can be used as a set signal.

【0010】[0010]

【実施例】以下、本発明の好適な実施例を図面に基づい
て説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will be described below with reference to the drawings.

【0011】図1には、本発明に係るウォッチドッグタ
イマ装置の構成が示されている。13段の例えばフリッ
プフロップなどから構成されるバイナリカウンタ14に
は従来と同様にクロック100が入力されている。そし
て、このバイナリカウンタ14は、そのクロック100
をカウントし、それが定められたシステムリセット実行
値に達したとき、すなわち212までカウントされたとき
に、従来と同様にシステムリセット信号102を出力す
る。
FIG. 1 shows the configuration of a watchdog timer device according to the present invention. The clock 100 is input to the binary counter 14 including 13 stages, such as a flip-flop, as in the conventional case. Then, this binary counter 14 has its clock 100
Is counted, and when it reaches a predetermined system reset execution value, that is, when it is counted up to 2 12 , the system reset signal 102 is output as in the conventional case.

【0012】このバイナリカウンタ14には、カウンタ
リセット信号104が従来と同様に入力されている。
A counter reset signal 104 is input to the binary counter 14 as in the conventional case.

【0013】図において16は、カウントリセット間隔
異常の検出を行う回路であり、この回路16は、本実施
例において4つの入力端子をもつアンド回路18と、そ
のアンド回路18の出力信号と前記カウンタリセット信
号104とを入力するアンド回路20と、このアンド回
路の出力とバイナリカウンタ14の出力とを入力するオ
ア回路22と、で構成されている。
In the figure, reference numeral 16 is a circuit for detecting a count reset interval abnormality. This circuit 16 is an AND circuit 18 having four input terminals in this embodiment, an output signal of the AND circuit 18 and the counter. The AND circuit 20 receives the reset signal 104, and the OR circuit 22 receives the output of the AND circuit and the output of the binary counter 14.

【0014】アンド回路18には、その4つの入力端子
にそれぞれバイナリカウンタQ(バー)8 〜Q(バー)
11の信号が入力されている。これらは、バイナリカウン
タ14を構成するフリップフロップのQ(バー)端子か
ら出力されるものである。
The AND circuit 18 has binary counters Q (bar) 8 to Q (bar) at its four input terminals, respectively.
11 signals are being input. These are output from the Q (bar) terminal of the flip-flop that constitutes the binary counter 14.

【0015】従って、バイナリカウンタ14において、
そのカウント値が28 以上の場合には、Q(バー)8
Q(バー)11のいずれかの端子から“0”が出力される
ことになる。そして、この“0”が出力されたときに
は、アンド回路18の出力も“0”となり、この結果カ
ウンタリセット信号104を入力しているアンド回路2
0のゲートが閉じることになる。ここで、アンド回路1
8の出力は、判定期間内信号に相当するものである。す
なわち、その判定期間内信号が1の場合にはリセット間
隔が短くなる異常を判定するための判定期間内であり、
その判定期間内信号が0の場合はその判定期間外であ
る。
Therefore, in the binary counter 14,
If the count value is 2 8 or more, Q (bar) 8 ~
"0" will be output from either terminal of Q (bar) 11 . When this "0" is output, the output of the AND circuit 18 also becomes "0", and as a result, the AND circuit 2 receiving the counter reset signal 104 is input.
Gate 0 will close. Where AND circuit 1
The output of 8 corresponds to the signal within the determination period. You
That is, when the signal within the judgment period is 1, it is during reset
It is within the judgment period for judging the abnormality that the gap becomes shorter,
If the signal within the determination period is 0, it is outside the determination period.
It

【0016】これとは反対に、バイナリカウンタ14に
おいてそのカウント値が28 に満たない場合には、アン
ド回路18から“1”が出力され、この結果、アンドゲ
ート20が開いた状態になるため、カウンタリセット信
号104がその状態で得られると、オア回路22に向け
てその信号104が出力されることになる。つまり、シ
ステムリセット信号102が生じることになる。
On the contrary, when the count value of the binary counter 14 is less than 2 8 , the AND circuit 18 outputs "1", and as a result, the AND gate 20 is opened. When the counter reset signal 104 is obtained in that state, the signal 104 is output to the OR circuit 22. That is, the system reset signal 102 is generated.

【0017】すなわち、この回路16は、カウントリセ
ット間隔についてあらかじめ定めた正常時期以外でカウ
ンタリセット信号104が得られた場合に、そのままカ
ウンタリセット信号104をシステムリセット信号10
2として出力するものである。もちろん、アンド回路1
8に入力される出力線の数を増減することにより、カウ
ンタリセット信号の間隔についての正常判定期間を可変
させることができる
That is, this circuit 16 directly outputs the counter reset signal 104 to the system reset signal 10 when the counter reset signal 104 is obtained at a time other than the normal time which is predetermined for the count reset interval.
It is output as 2. Of course, AND circuit 1
By increasing or decreasing the number of output lines input to 8, the normal determination period for the interval of the counter reset signal can be changed .

【0018】以上のウォッチドッグタイマ装置によれ
ば、例えばCPUが不良動作を行って、正常なカウンタ
リセット信号の出力がされない場合においても、そのよ
うな不良動作を的確に判断して、CPUのリセットなど
を実行させることが可能となる。なお、カウンタリセッ
ト信号104が連続的に出力されるような場合をも検出
する構成としても好適である。
According to the above watchdog timer device, even when the CPU performs a defective operation and a normal counter reset signal is not output, for example, such a defective operation is accurately determined and the CPU is reset. It becomes possible to execute such as. It should be noted that the configuration is also suitable for detecting the case where the counter reset signal 104 is continuously output.

【0019】[0019]

【発明の効果】以上説明したように、本発明によれば、
カウンタリセット間隔が非正常の場合を判断して、従来
においては判定できなかったシステムの動作不良などを
判断することが可能となる。従って、信頼性の高いシス
テムを構築することが可能となる。
As described above, according to the present invention,
It is possible to judge a case where the counter reset interval is abnormal, and to judge a malfunction of the system, which could not be judged in the past. Therefore, it is possible to construct a highly reliable system.

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

【図1】本発明に係るウォッチドッグタイマ装置の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a watchdog timer device according to the present invention.

【図2】従来のウォッチドッグタイマ装置の構成を示す
ブロック図である。
FIG. 2 is a block diagram showing a configuration of a conventional watchdog timer device.

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

14 バイナリカウンタ 16 カウントリセット間隔異常判定回路 100 クロック 102 システムリセット信号 104 カウンタリセット信号 14 binary counter 16 count reset interval abnormality determination circuit 100 clock 102 system reset signal 104 counter reset signal

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】所定のクロックのカウントを行い、ほぼ定
期的に入力されるカウントリセット信号によってリセッ
トされるn段のバイナリカウンタであって、そのカウン
ト値が所定のシステムリセット実行値に達したときに
の最上位のn段目出力端子からシステムリセット信号を
出力するバイナリカウンタと、 前記バイナリカウンタのn段目出力端子を除いた残りの
出力端子の中で所定のm個の出力端子に共通接続され、
前記m個の出力端子から出力されるm個の信号が示す値
が、カウントリセット間隔が短くなる異常を判定するた
めに設定された判定値に到達するまで判定期間内信号を
出力する第1のアンド回路と、 前記判定期間内信号が入力され、かつ前記カウントリセ
ット信号が入力された場合に、前記システムリセット信
号を出力する第2のアンド回路と、 を含むことを特徴とするウオッチドックタイマ装置。
1. An n-stage binary counter , which counts a predetermined clock and is reset by a count reset signal input almost regularly, the count value of which is a predetermined system reset execution. its when it reaches the value
From the n-th stage output terminals of the top-level and the binary counter for outputting a system reset signal, the remaining except for the n-th stage output terminals of said binary counter
Among the output terminals, it is commonly connected to the predetermined m output terminals,
Values indicated by m signals output from the m output terminals
However, it is necessary to judge the abnormality that the count reset interval becomes short
Signal within the judgment period until the judgment value set for
The first AND circuit for outputting and the signal within the determination period are input, and the count reset
System reset signal when a reset signal is input.
A second AND circuit for outputting a signal, and a watchdog timer device.
JP3051051A 1991-03-15 1991-03-15 Watchdog timer device Expired - Fee Related JP2516711B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3051051A JP2516711B2 (en) 1991-03-15 1991-03-15 Watchdog timer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3051051A JP2516711B2 (en) 1991-03-15 1991-03-15 Watchdog timer device

Publications (2)

Publication Number Publication Date
JPH04286036A JPH04286036A (en) 1992-10-12
JP2516711B2 true JP2516711B2 (en) 1996-07-24

Family

ID=12876006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3051051A Expired - Fee Related JP2516711B2 (en) 1991-03-15 1991-03-15 Watchdog timer device

Country Status (1)

Country Link
JP (1) JP2516711B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0277948A (en) * 1988-09-14 1990-03-19 Toshiba Corp Watchdog timer
JPH0337738A (en) * 1989-07-05 1991-02-19 Nec Corp Runaway detection system for cpu circuit

Also Published As

Publication number Publication date
JPH04286036A (en) 1992-10-12

Similar Documents

Publication Publication Date Title
US4956807A (en) Watchdog timer
US4837702A (en) Electronic postage meter having an infinite loop lockout arrangement
JP2516711B2 (en) Watchdog timer device
JP2864663B2 (en) Watchdog timer
JP3145937B2 (en) Runaway detection method for microcomputer
JP2693885B2 (en) Microcomputer
JPH0581080A (en) Runaway supervisory device for micro processor
JPH0573360A (en) Watchdog timer
JP3090069B2 (en) Control device
JPS5835291B2 (en) Automatic reset device for microprocessor runaway
JP2731386B2 (en) Control device
JPS5983438A (en) Program failure detecting system
JPH04332056A (en) Microcomputer
JPS6349855A (en) Detecting device for interruption cycle abnormality of cpu
JPS63291137A (en) Supervising timer for program run-away
JPS5845054B2 (en) Watchdog timer error relief method
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JPH0277854A (en) Resetting system for microprocessor
JPS6327930A (en) Interruption control circuit
JPH033020A (en) Recognizing/preventing circuit for hit of control line
JPH0320775B2 (en)
JPH02176947A (en) Cpu monitoring device
JPH04241636A (en) Time monitoring circuit
JPH01199242A (en) Abnormality detector of microcomputer system
JPS5827559B2 (en) Ijiyou Kanshi Cairo

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees