JPH0535541A - Watchdog timer - Google Patents

Watchdog timer

Info

Publication number
JPH0535541A
JPH0535541A JP3186627A JP18662791A JPH0535541A JP H0535541 A JPH0535541 A JP H0535541A JP 3186627 A JP3186627 A JP 3186627A JP 18662791 A JP18662791 A JP 18662791A JP H0535541 A JPH0535541 A JP H0535541A
Authority
JP
Japan
Prior art keywords
reset signal
timer counter
time
type
timer
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.)
Withdrawn
Application number
JP3186627A
Other languages
Japanese (ja)
Inventor
Takeshi Omori
猛司 大森
Masahiko Kitamura
昌彦 北村
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP3186627A priority Critical patent/JPH0535541A/en
Publication of JPH0535541A publication Critical patent/JPH0535541A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To reduce the burden of the software with reduction of the reset processing frequency and at the same time to detect the operating abnormality in a short time with respect to the processing that is completed in a comparatively short time. CONSTITUTION:The 1st and 2nd timer counters 2a and 2b have different limit times. When one of both counters 2a and 2b is counted up, an OR circuit 3 outputs an abnormality detecting signal. Then the counter 2a having a short limit time has a time limit operation when a processor 1 outputs a 1st type reset signal rs1 having a comparatively short generating interval. Meanwhile the counter 2b having a long limit time has a time limit operation when the processor 1 outputs a 2nd type reset signal rs2 having a comparatively long generating interval respectively.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、CPU等の処理装置の
動作異常を時間監視によって検出するウォッチドッグタ
イマに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a watchdog timer for detecting an abnormal operation of a processing device such as a CPU by time monitoring.

【0002】[0002]

【従来の技術】従来より、CPU等を処理装置として用
いた機器では、処理装置の動作異常を検出する方法とし
て、ウォッチドッグタイマを用いた時間監視による方法
が知られている。すなわち、ウォッチドッグタイマは、
プログラムにより設定された発生間隔で処理装置から出
力されるリセット信号によってリセットされ、リセット
された後に限時動作を行うことによって限時時間が終了
するまでに次のリセット信号が処理装置から出力されな
いとタイムアップして異常検知信号を出力するように構
成されているのであって、異常検知信号が出力されない
間は、処理装置の動作が正常であるとみなすものであ
る。また、処理装置に暴走などの異常が生じたときに
は、プログラムによるリセット信号が発生しないから、
異常検知信号が出力されて処理装置の異常が報知される
のである。
2. Description of the Related Art Conventionally, in a device using a CPU or the like as a processing device, a method based on time monitoring using a watchdog timer has been known as a method for detecting an abnormal operation of the processing device. That is, the watchdog timer is
It is reset by the reset signal output from the processing unit at the generation interval set by the program, and after resetting, the time-out operation is performed and the time-up will occur if the next reset signal is not output from the processing unit by the end of the time limit time. Then, the abnormality detection signal is output and the operation of the processing device is considered to be normal while the abnormality detection signal is not output. Also, when an abnormality such as runaway occurs in the processing device, the reset signal by the program is not generated,
The abnormality detection signal is output to inform the abnormality of the processing device.

【0003】[0003]

【発明が解決しようとする課題】ところで、処理装置の
動作異常を検出するまでに要する時間を短縮しようとす
れば、ウォッチドッグタイマの限時時間を短く設定する
ことが考えられるが、処理装置が比較的長時間を要する
一連の処理を行う場合には、一連の処理の中にリセット
信号を発生させる処理(以後、リセット処理と呼称す
る)を挿入することが必要になり、ソフトウェアの負担
が大きくなるという問題が生じる。
By the way, in order to shorten the time required to detect the operation abnormality of the processing device, it is conceivable to set the time limit time of the watchdog timer to be short. When performing a series of processes that require a relatively long time, it is necessary to insert a process for generating a reset signal (hereinafter referred to as reset process) in the series of processes, which increases the load on software. The problem arises.

【0004】一方、ウォッチドッグタイマの限時時間を
長く設定すると、一連の処理の中にリセット処理を挿入
する頻度が減少して、ソフトウェアの負担が小さくなる
が、比較的短時間で終了する一連の処理に対しても、動
作異常を検出するまでに要する時間が長くなるという問
題が生じる。本発明は上記問題点の解決を目的とするも
のであり、リセット処理の頻度を低減してソフトウェア
の負担を軽減し、かつ、比較的短時間で終了する処理に
対しては短時間で動作異常が検出できるようにしたウォ
ッチドッグタイマを提供しようとするものである。
On the other hand, if the time limit of the watchdog timer is set to be long, the frequency of inserting the reset process into the series of processes is reduced and the load on the software is reduced, but the series of processes that are completed in a relatively short period of time is reduced. Also for the processing, there is a problem that the time required to detect the operation abnormality increases. The present invention is intended to solve the above problems, reduces the frequency of reset processing to reduce the load on software, and causes abnormal operation in a short time for processing that ends in a relatively short time. It is intended to provide a watchdog timer that can be detected by.

【0005】[0005]

【課題を解決するための手段】請求項1の発明では、上
記目的を達成するために、プログラムにより設定された
発生間隔でCPU等の処理装置から出力されるリセット
信号によってリセットされ、リセットされた後に限時動
作を行うことによって限時時間が終了するまでに次のリ
セット信号が処理装置から出力されないとタイムアップ
して異常検知信号を出力するウォッチドッグタイマにお
いて、限時時間が比較的短い第1のタイマカウンタと、
限時時間が第1のタイマカウンタよりも長い第2のタイ
マカウンタと、第1のタイマカウンタと第2のタイマカ
ウンタとのいずれか一方がタイムアップすると異常検知
信号を出力する出力回路とを備え、処理装置は、第1の
タイマカウンタの限時時間よりも発生間隔が短い第1種
リセット信号を出力するときには、第1種リセット信号
によって第1のタイマカウンタおよび第2のタイマカウ
ンタをリセットして限時動作が開始されるようにし、発
生間隔が第1のタイマカウンタの限時時間よりも長くか
つ第2のタイマカウンタの限時時間よりも短い第2種リ
セット信号を出力するときには、第2種リセット信号の
発生していない期間に第1のタイマカウンタの動作を停
止させるとともに第2種リセット信号によって第2のタ
イマカウンタをリセットした後に限時動作が開始される
ようにしているのである。
In order to achieve the above object, the invention is reset and reset by a reset signal output from a processing device such as a CPU at an occurrence interval set by a program. In the watchdog timer that outputs the abnormality detection signal when the next reset signal is not output from the processing device before the time limit time ends by performing the time limit operation, the first timer having a relatively short time limit A counter,
A second timer counter having a time limit time longer than the first timer counter; and an output circuit that outputs an abnormality detection signal when either the first timer counter or the second timer counter times out, The processing device resets the first timer counter and the second timer counter by the first-type reset signal when outputting the first-type reset signal whose generation interval is shorter than the time-limit time of the first timer counter. When the operation is started and the second type reset signal whose generation interval is longer than the time limit time of the first timer counter and shorter than the time limit time of the second timer counter is output, The operation of the first timer counter is stopped during the period when it is not generated, and the second timer counter is reset by the second type reset signal. With each other to so limit the time of operation is started after the Tsu door.

【0006】請求項2ないし請求項5の発明は、望まし
い実施態様である。請求項2の発明では、第1種リセッ
ト信号および第2種リセット信号は、論理値が互いに反
対であるとともにプログラムにより設定された発生間隔
ごとに発生するパルス信号であって、第1のタイマカウ
ンタは、第1種リセット信号が発生している期間の論理
値によってリセットされその反対の論理値によって限時
動作を行うように構成され、第2のタイマカウンタは、
第2種リセット信号が終了するときの論理値の変化によ
りリセットされリセットされた直後に限時動作を行うよ
うに構成されているのである。
The inventions of claims 2 to 5 are preferred embodiments. In the invention of claim 2, the first-type reset signal and the second-type reset signal are pulse signals whose logical values are opposite to each other and which are generated at every generation interval set by the program, and are the first timer counter. Is configured to be reset by a logical value during the period in which the first-type reset signal is generated and perform a timed operation by a logical value opposite thereto, and the second timer counter is
The second type reset signal is reset by the change in the logical value when the second type reset signal ends, and the time-delayed operation is performed immediately after the reset.

【0007】請求項3の発明では、第1種リセット信号
および第2種リセット信号は、論理値が互いに反対であ
るとともにプログラムにより設定された発生間隔ごとに
発生するパルス信号であって、第1のタイマカウンタ
は、第1種リセット信号が発生している期間の論理値に
よってリセットされその反対の論理値によって限時動作
を行うように構成され、第2のタイマカウンタは、第2
種リセット信号が発生している期間の論理値によってリ
セットされその反対の論理値で限時動作を行うように構
成されているのである。
According to another aspect of the present invention, the first-type reset signal and the second-type reset signal are pulse signals having logical values opposite to each other and generated at every generation interval set by the program. Of the second timer counter is configured to be reset by a logical value during the period in which the first-type reset signal is generated and perform a time-delayed operation by an opposite logical value.
The seed reset signal is reset by the logic value during the period in which the seed reset signal is generated, and the time delay operation is performed by the opposite logic value.

【0008】請求項4の発明では、第1種リセット信号
および第2種リセット信号は、論理値が互いに反対であ
るとともにプログラムにより設定された発生間隔ごとに
発生するパルス信号であって、第1のタイマカウンタ
は、第1種リセット信号が発生している期間の論理値に
よってリセットされその反対の論理値によって限時動作
を行うように構成され、第2のタイマカウンタは、第2
種リセット信号が終了するときの論理値の変化によりリ
セットされリセットされた直後に限時動作を行うように
構成され、処理装置は、第1種リセット信号および第2
種リセット信号を第1のタイマカウンタに対して出力す
るとともに、第1種リセット信号が開始する時点および
第2種リセット信号が終了する時点に同期した所定幅の
パルス信号を第2のタイマカウンタに対して出力するの
である。
According to another aspect of the present invention, the first-type reset signal and the second-type reset signal are pulse signals whose logical values are opposite to each other and which are generated at every generation interval set by the program. Of the second timer counter is configured to be reset by a logical value during the period in which the first-type reset signal is generated and perform a time-delayed operation by an opposite logical value.
The processing device is configured to perform the timed operation immediately after resetting and resetting due to the change in the logical value when the seed reset signal ends, and the processing device includes the first seed reset signal and the second reset signal.
The seed reset signal is output to the first timer counter, and the second timer counter receives a pulse signal having a predetermined width in synchronization with the start time of the first reset signal and the end time of the second reset signal. It outputs to.

【0009】請求項5の発明では、第1種リセット信号
および第2種リセット信号は、論理値が互いに反対であ
るとともにプログラムにより設定された発生間隔ごとに
発生するパルス信号であって、第1のタイマカウンタ
は、第1種リセット信号が発生している期間の論理値に
よってリセットされその反対の論理値によって限時動作
を行うように構成され、第2のタイマカウンタは、第2
種リセット信号が発生している期間の論理値によってリ
セットされその反対の論理値で限時動作を行うように構
成され、処理装置は、第1種リセット信号および第2種
リセット信号を第1のタイマカウンタに対して出力する
とともに、第1種リセット信号が開始する時点および第
2種リセット信号が終了する時点に同期した所定幅のパ
ルス信号を第2のタイマカウンタに対して出力するので
ある。
According to a fifth aspect of the invention, the first-type reset signal and the second-type reset signal are pulse signals having logical values opposite to each other and generated at every generation interval set by the program, Of the second timer counter is configured to be reset by a logical value during the period in which the first-type reset signal is generated and perform a time-delayed operation by an opposite logical value.
The processing device is configured to be reset by a logic value during a period in which the seed reset signal is generated and perform a timed operation at an opposite logic value, and the processing device sends the first seed reset signal and the second seed reset signal to the first timer. The pulse signal having a predetermined width is output to the second timer counter in synchronization with the time when the first type reset signal starts and the time when the second type reset signal ends, in addition to the output to the counter.

【0010】[0010]

【作用】上記構成によれば、限時時間が異なる2種のタ
イマカウンタを設け、両タイマカウンタの一方がタイム
アップしたときに異常検知信号が出力する出力回路を設
け、リセット信号の発生間隔が両タイマカウンタの限時
時間の間の時間であるような処理を処理装置で行うとき
には、限時時間の短いほうのタイマカウンタの限時動作
を停止した状態で、限時時間の長いほうのタイマカウン
タのみが限時動作を行うのである。すなわち、リセット
信号の発生間隔が短いときには、両タイマカウンタがリ
セットされて限時動作を行うが、限時時間の短いほうの
タイマカウンタが先にタイムアップして異常検知信号が
出力されるから、リセット信号の発生間隔が比較的短い
ときには、動作異常の検出までの時間を短くすることが
できるのである。また、リセット信号の発生間隔が長い
ときには、処理回路の出力によって限時時間の短いほう
のタイマカウンタの限時動作が停止されるから、限時時
間の長いほうのタイマカウンタのみが動作することにな
り、比較的長時間を要する処理の場合であってもリセッ
ト処理の頻度を低減することができるのである。要する
に、比較的長時間を要する一連の処理を行う場合に、リ
セット処理の頻度を低減してソフトウェアの負担を軽減
することができ、一方、比較的短時間で終了する処理に
対しては短時間で動作異常が検出できるのである。
According to the above construction, two types of timer counters having different time delays are provided, an output circuit for outputting an abnormality detection signal when one of the timer counters times out, and the reset signal generation intervals are both set. When the processing device performs processing that is between the time-delay times of the timer counter, only the timer-counter with the longer time-delay time starts the time-delay operation with the timer-timer with the shorter time-delay time stopped. To do. That is, when the reset signal generation interval is short, both timer counters are reset to perform the time-delayed operation, but the timer counter with the shorter time-delayed time expires first and the abnormality detection signal is output. When the occurrence interval of is relatively short, the time until the detection of the operation abnormality can be shortened. Also, when the reset signal generation interval is long, the timer circuit with the shorter time limit time stops its operation due to the output of the processing circuit, so only the timer counter with the longer time limit operates. The frequency of reset processing can be reduced even in the case of processing that requires a relatively long time. In short, when performing a series of processing that requires a relatively long time, it is possible to reduce the frequency of reset processing and reduce the load on the software. On the other hand, for processing that finishes in a relatively short time, a short time is required. The abnormal operation can be detected by.

【0011】[0011]

【実施例】【Example】

(実施例1)本実施例では、図1(a)に示すように、
CPU等の処理装置1の一つのリセット信号端子RSか
ら出力される信号が共通に入力される2個のタイマカウ
ンタ2a,2bを設けた例を示す。両タイマカウンタ2
a,2bは、リセットされた後に限時動作を行い、限時
時間が終了するまでに再びリセットされなければタイム
アップして出力をHレベルにする。両タイマカウンタ2
a,2bの出力は出力回路であるオア回路3を通して、
いずれか一方のタイマカウンタ2a,2bの出力がHレ
ベルになると、オア回路3の出力がHレベルになって異
常検知信号が出力されるようになっている。
(Example 1) In this example, as shown in FIG.
An example in which two timer counters 2a and 2b to which a signal output from one reset signal terminal RS of the processing device 1 such as a CPU is commonly input is shown. Both timer counter 2
After being reset, a and 2b perform a time-delaying operation, and if they are not reset again by the end of the time-delay, the time is up and the output becomes H level. Both timer counter 2
The outputs of a and 2b are passed through an OR circuit 3 which is an output circuit,
When the output of either one of the timer counters 2a and 2b becomes H level, the output of the OR circuit 3 becomes H level and the abnormality detection signal is output.

【0012】第1のタイマカウンタ2aは、入力端子R
1 への入力が、Lレベルのときにリセットされ、Hレベ
ルの間に限時動作を行うように構成される。第2のタイ
マカウンタ2bは、入力端子R2 への入力が、Hレベル
からLレベルに立ち下がるときにリセットされ、その
後、ただちに限時動作を行うように構成される。各タイ
マカウンタ2a,2bは、たとえば図2に示すように、
限時動作を開始するとクロック端子CKに入力されるシ
ステムクロック信号clkを計数し、計数値が所定値に
達するとタイムアップして出力をHレベルにするように
n進カウンタ4a,4bなどを用いて構成される。ま
た、第2のタイマカウンタ2bは、入力信号を微分して
入力信号の立ち下がりに対応したトリガ信号を発生して
n進カウンタ4bをリセットするように、微分回路5を
備えている。n進カウンタ4a,4bは、クリア端子C
LEARへの入力がHレベルのときにクロック端子CK
に入力されるシステムクロック信号clkを計数し、計
数値が所定値に達すると出力端子Qの出力をHレベルに
する。微分回路5は、立ち下がりを検出するように、信
号経路に挿入されたコンデンサCと、プルアップされた
抵抗Rとにより構成される。ここに、第2のタイマカウ
ンタ2bの限時時間t2 は、第1のタイマカウンタ2a
の限時時間t1 よりも長くなるように設定されている
(t1 <t2 )。しかるに、上述のような微分回路5を
設けることにより、両n進カウンタ4a,4bとして限
時時間(カウントアップ時の計数値)のみが異なる同一
構成のものを用いることができるのである。また、微分
回路5に代えて、入力信号の立ち下がりでトリガされ、
短時間だけ出力をLレベルにするワンショットマルチバ
イブレータを用いてもよい。
The first timer counter 2a has an input terminal R
The input to 1 is reset when it is at the L level, and is configured to perform the timed operation during the H level. The second timer counter 2b is configured to be reset when the input to the input terminal R 2 falls from the H level to the L level, and then immediately perform the timed operation. Each timer counter 2a, 2b is, for example, as shown in FIG.
When the timed operation is started, the system clock signal clk input to the clock terminal CK is counted, and when the counted value reaches a predetermined value, the n-ary counters 4a and 4b are used to time up and set the output to the H level. Composed. The second timer counter 2b is provided with a differentiating circuit 5 so as to differentiate the input signal and generate a trigger signal corresponding to the fall of the input signal to reset the n-ary counter 4b. The n-ary counters 4a and 4b have clear terminals C
Clock terminal CK when input to LEAR is at H level
The system clock signal clk input to is counted, and when the count value reaches a predetermined value, the output of the output terminal Q is set to H level. The differentiating circuit 5 is composed of a capacitor C inserted in the signal path and a resistor R pulled up so as to detect the fall. Here, the time limit t 2 of the second timer counter 2b is the same as the first timer counter 2a.
The time is set to be longer than the time limit t 1 (t 1 <t 2 ). However, by providing the differentiating circuit 5 as described above, it is possible to use, as the both n-ary counters 4a and 4b, those having the same structure except for the time limit (count value at the time of counting up). Also, instead of the differentiating circuit 5, it is triggered by the falling edge of the input signal,
You may use the one-shot multivibrator which makes an output L level for a short time.

【0013】一方、処理装置1は、2種類のリセット信
号を出力する。すなわち、一連の処理に要する時間が比
較的短い通常の処理を行うときには、発生間隔tを第1
のタイマカウンタ2aの限時時間t1 よりも短く設定し
た(すなわち、t<t1 )、図1(b)の左半部に示す
ような負論理のパルス信号による第1種リセット信号r
1 を発生する。また、一連の処理に要する時間が比較
的長い処理を行うときには、発生間隔tを第1のタイマ
カウンタ2aの限時時間t1 よりは長く、第2のタイマ
カウンタ2bの限時時間t2 よりは短く設定した(すな
わち、t1 ≦t<t2 )、図1(b)の右半部に示すよ
うな正論理のパルス信号による第2種リセット信号rs
2 を発生する。
On the other hand, the processing device 1 outputs two types of reset signals. That is, when performing normal processing in which the time required for a series of processing is relatively short, the occurrence interval t is set to the first
The timer counter 2a is set to be shorter than the time limit t 1 (that is, t <t 1 ), and the first-type reset signal r is a negative logic pulse signal as shown in the left half of FIG. 1B.
generate s 1 . When performing a process in which the time required for a series of processes is relatively long, the occurrence interval t is longer than the time limit t 1 of the first timer counter 2a and shorter than the time limit t 2 of the second timer counter 2b. Set (that is, t 1 ≦ t <t 2 ), the second-type reset signal rs by the positive logic pulse signal as shown in the right half of FIG. 1B.
Raises 2 .

【0014】第1種リセット信号rs1 は、発生してい
る期間にのみLレベルになる信号であるから、第1のタ
イマカウンタ2aは、第1種リセット信号rs1 が発生
している期間にリセットされ、第1種リセットrs1
終了と同時に限時動作を開始することになる。第2のタ
イマカウンタ2bは、第1種リセット信号rs1 が開始
する時点でリセットされ、以後、限時動作を開始するこ
とになる。ここにおいて、第1種リセット信号rs1
発生期間は、第1のタイマカウンタ2aの限時時間t1
と第2のタイマカウンタ2bの限時時間t2 との差(=
2 −t1 )よりも十分に小さく設定される。したがっ
て、処理装置1が、発生間隔tの比較的短い第1種リセ
ット信号rs1 が出力されるような処理を行っていると
きに、処理装置1の動作が異常になり、前の第1種リセ
ット信号rs1 が終了した時点から第1のタイマカウン
タ2aの限時時間t1 を越えても次の第1種リセット信
号rs1 が出力されないときには、第1のタイマカウン
タ2aの限時時間t1 が終了してタイムアップする。そ
の結果、第1のタイマカウンタ2aの出力がHレベルに
なり、オア回路3から異常検知信号が出力されることに
なる。第2のタイマカウンタ2bの限時時間t2 は、第
1のタイマカウンタ2aの限時時間t1 よりも長く設定
されているから、第1種リセット信号rs1 の発生時に
第2のタイマカウンタ2bがタイムアップする条件が成
立するときには、第1のタイマカウンタ2aが先にタイ
ムアップしていることになる。すなわち、第2のタイマ
カウンタ2bの動作は実質的に停止していることにな
る。
Since the first-type reset signal rs 1 is an L-level signal only during the period in which the first-type reset signal rs 1 is generated, the first timer counter 2a operates in the period during which the first-type reset signal rs 1 is generated. After the reset, the first-type reset rs 1 ends, and the time-delay operation starts. Second timer counter 2b is reset upon the first type reset signal rs 1 is started, and thereafter will start the time limiting operation. Here, the generation period of the first type reset signal rs 1 is the time limit t 1 of the first timer counter 2 a.
And the difference between the time limit time t 2 of the second timer counter 2b (=
It is set to be sufficiently smaller than t 2 −t 1 ). Therefore, when the processing device 1 is performing a process in which the first-type reset signal rs 1 having a relatively short generation interval t is output, the operation of the processing device 1 becomes abnormal, and the first type from when the reset signal rs 1 has been completed when the first even beyond the limit when the time t 1 of the timer counter 2a not output the first type reset signal rs 1 the next time limiting the time t 1 of the first timer counter 2a is Finish and time up. As a result, the output of the first timer counter 2a becomes H level, and the OR circuit 3 outputs an abnormality detection signal. Since the time limit time t 2 of the second timer counter 2b is set longer than the time limit time t 1 of the first timer counter 2a, when the first type reset signal rs 1 is generated, the second timer counter 2b When the time-up condition is satisfied, the first timer counter 2a has timed out first. That is, the operation of the second timer counter 2b is substantially stopped.

【0015】第2種リセット信号rs2 は、発生してい
る期間にのみHレベルになる信号であるから、第1のタ
イマカウンタ2aは、第2種リセット信号rs2 が発生
している期間にのみ限時動作を行い、通常はリセットさ
れている。また、第2のタイマカウンタ2bは、第2種
リセット信号rs2 が終了した時点でリセットされ、以
後、限時動作を開始することになる。第2種リセット信
号rs2 の発生期間は、第1のタイマカウンタ2aの限
時時間t1 よりも短く設定される。したがって、処理装
置1が、発生間隔tの比較的長い第2種リセット信号r
2 が出力されるような処理を行っているときに、処理
装置1の動作が異常になると、前の第2種リセット信号
rs2 が終了した時点から第2のタイマカウンタ2bの
限時時間t2 を越えても次の第2種リセット信号rs2
が終了していないときには、第2のタイマカウンタ2b
がタイムアップして出力をHレベルにする。その結果、
オア回路3から異常検知信号が出力されることになる。
このとき、第1のタイマカウンタ2aについては、第2
種リセット信号rs2 に対しては発生期間でのみ限時動
作を行うから、実質的には動作を停止していることにな
る。
Since the second-type reset signal rs 2 is a signal which becomes the H level only during the period in which the second-type reset signal rs 2 is generated, the first timer counter 2a operates during the period in which the second-type reset signal rs 2 is generated. Only performs a timed operation and is normally reset. The second timer counter 2b is reset upon the two reset signal rs 2 is finished, thereafter, it will initiate the time limit operation. The generation period of the second type reset signal rs 2 is set shorter than the time limit t 1 of the first timer counter 2a. Therefore, the processing device 1 causes the second type reset signal r having a relatively long generation interval t to be generated.
If the operation of the processing device 1 becomes abnormal during the process of outputting s 2, the second timer counter 2b has the time limit t from the time when the previous second-type reset signal rs 2 ends. Even if it exceeds 2 , the next type 2 reset signal rs 2
Is not completed, the second timer counter 2b
Will time out and set the output to H level. as a result,
The abnormality detection signal is output from the OR circuit 3.
At this time, regarding the first timer counter 2a,
For the seed reset signal rs 2 , the timed operation is performed only during the generation period, so that the operation is substantially stopped.

【0016】処理装置1から上述したような2種類のリ
セット信号rs1 ,rs2 を出力するとともに、2種の
タイマカウンタ2a,2bを用いているから、発生間隔
の比較的短い第1種リセット信号rs1 を発生させる時
には、処理装置1の動作異常によって第1のタイマカウ
ンタ2aがタイムアップし、比較的長時間を要する一連
の処理を行うために発生間隔の比較的長い第2種リセッ
ト信号rs2 を発生させる時には、処理装置1の動作異
常によって第2のタイマカウンタ2bがタイムアップす
る。その結果、通常の処理においては第1種リセット信
号rs1 を短い間隔で発生させるようにし、動作異常の
検出が短時間で行えるようにすることができるのであ
り、一方、比較的長い時間を要する一連の処理において
は第2種リセット信号rs2 を長い間隔で発生させるよ
うにすれば、リセット処理を頻繁に行う必要がなく、ソ
フトウェアの負担が軽減されるのである。
Since the processing device 1 outputs the two types of reset signals rs 1 and rs 2 as described above and uses the two types of timer counters 2a and 2b, the first type reset having a relatively short generation interval is performed. When the signal rs 1 is generated, the first timer counter 2 a times up due to an abnormal operation of the processing device 1, and a second type reset signal having a relatively long generation interval for performing a series of processing requiring a relatively long time. When rs 2 is generated, the second timer counter 2b times up due to an abnormal operation of the processing device 1. As a result, in the normal process, the first-type reset signal rs 1 can be generated at short intervals, and the abnormal operation can be detected in a short time. On the other hand, a relatively long time is required. In the series of processes, if the second-type reset signal rs 2 is generated at long intervals, it is not necessary to perform the reset process frequently, and the load on the software is reduced.

【0017】(実施例2)本実施例は、基本構成は図1
(a)に示した実施例1と同様であるが、第2のタイマ
カウンタ2bが、入力端子R1 に入力される信号の立ち
下がりではなく、第1のタイマカウンタ2aとは逆に、
信号がHレベルのときにリセットされ、信号がLレベル
のときに限時動作を行うように構成されている点で実施
例1と相違している。すなわち、図3に示すように、第
1のタイマカウンタ2aおよび第2のタイマカウンタ2
bは、n進カウンタ4a,4bを用いて構成されるが、
微分回路5は省略されている。また、n進カウンタ4b
のクリア端子CLEARは実施例1では負論理で用いら
れていたが、本実施例では正論理で用いられる。要する
に、第2のタイマカウンタ2bが、入力信号の変化点で
リセットされるのではなく、入力信号がHレベルである
ときにリセットされる点を除けば、実施例1と同様の動
作を行うものである。
(Embodiment 2) In this embodiment, the basic structure is shown in FIG.
Same as the first embodiment shown in (a), but the second timer counter 2b is not the falling edge of the signal input to the input terminal R 1 , but is the opposite of the first timer counter 2a.
This is different from the first embodiment in that the signal is reset when the signal is at the H level and the timed operation is performed when the signal is at the L level. That is, as shown in FIG. 3, the first timer counter 2a and the second timer counter 2
b is composed of n-ary counters 4a and 4b,
The differentiating circuit 5 is omitted. Also, the n-ary counter 4b
The clear terminal CLEAR was used in negative logic in the first embodiment, but is used in positive logic in this embodiment. In short, the same operation as that of the first embodiment is performed except that the second timer counter 2b is not reset at the change point of the input signal but is reset when the input signal is at the H level. Is.

【0018】(実施例3)本実施例では、図4に示すよ
うに、処理装置1が2つのリセット信号端子RSa,R
Sbを備え、各リセット信号端子RSa,RSbから、
第1のタイマカウンタ2aと第2のタイマカウンタ2b
とに対応してそれぞれリセット信号が出力されるように
なっている。第1のリセット信号端子RSaから出力さ
れる信号は、図4(b)に示すように実施例1における
リセット信号端子RSから出力される信号と同じ信号で
あって、処理装置1での処理に応じて第1種リセット信
号rs1 と第2種リセット信号rs2 とが発生する。ま
た、第2のリセット信号端子RSbから出力される信号
は、第1のリセット信号端子RSaから出力される第1
種リセット信号rs1 ,rs2 の立ち下がりに同期して
短時間だけLレベルになる信号である。すなわち、第1
のリセット信号端子RSaから出力される信号の立ち下
がりを微分したり、第1のリセット信号端子RSaから
出力されるリセット信号の立ち下がりでトリガされるワ
ンショットマルチバイブレータを用いたりすることによ
ってこの信号が得られる。
(Embodiment 3) In this embodiment, as shown in FIG. 4, the processor 1 has two reset signal terminals RSa and R.
Sb, from each reset signal terminal RSa, RSb,
First timer counter 2a and second timer counter 2b
A reset signal is output for each of the. The signal output from the first reset signal terminal RSa is the same signal output from the reset signal terminal RS in the first embodiment as shown in FIG. Accordingly, the first type reset signal rs 1 and the second type reset signal rs 2 are generated. The signal output from the second reset signal terminal RSb is the first signal output from the first reset signal terminal RSa.
It is a signal which becomes L level for a short time in synchronization with the fall of the seed reset signals rs 1 and rs 2 . That is, the first
This signal can be obtained by differentiating the trailing edge of the signal output from the reset signal terminal RSa or by using a one-shot multivibrator triggered by the trailing edge of the reset signal output from the first reset signal terminal RSa. Is obtained.

【0019】第1のタイマカウンタ2aおよび第2のタ
イマカウンタ2bの動作は実施例1と同じであって、第
1のタイマカウンタ2aは、入力端子R1 への入力信号
が、Lレベルであるときにリセットされ、Hレベルであ
るときに限時動作を行い、また、第2のタイマカウンタ
2bは、入力端子R1 への入力信号が、HレベルからL
レベルに立ち下がるときにリセットされ、その後、限時
動作を行うようになっている。
The operations of the first timer counter 2a and the second timer counter 2b are the same as in the first embodiment, and the input signal to the input terminal R 1 of the first timer counter 2a is at the L level. When it is reset to H level, the timed operation is performed, and when the input signal to the input terminal R 1 is changed from H level to L level, the second timer counter 2b operates.
It is reset when it falls to the level, and after that, the timed operation is performed.

【0020】したがって、本実施例は、実施例1におけ
る微分回路5を処理装置1内に設けたことに相当するも
のであって、図5に示すように、第2のタイマカウンタ
2bからは微分回路5が省略されているが、基本的な動
作は図2に示した実施例1の構成の動作と同じである。 (実施例4)本実施例は、図6に示すように、基本的に
は実施例3と同様の構成を有しているのであって、処理
装置1が2つのリセット信号端子RSa,RSbを備
え、各リセット信号端子RSa,RSbから、第1のタ
イマカウンタ2aと第2のタイマカウンタ2bとに対応
してそれぞれリセット信号が出力されるようになってい
る。また、各リセット信号端子RSa,RSbから出力
される信号は実施例3と同じものである。
Therefore, the present embodiment corresponds to the provision of the differentiating circuit 5 in the first embodiment in the processing device 1, and as shown in FIG. 5, the differentiating from the second timer counter 2b. Although the circuit 5 is omitted, the basic operation is the same as the operation of the configuration of the first embodiment shown in FIG. (Embodiment 4) As shown in FIG. 6, this embodiment basically has the same configuration as that of the third embodiment, and the processor 1 has two reset signal terminals RSa and RSb. The reset signal terminals RSa and RSb are adapted to output reset signals corresponding to the first timer counter 2a and the second timer counter 2b, respectively. The signals output from the reset signal terminals RSa and RSb are the same as those in the third embodiment.

【0021】第1のタイマカウンタ2aは、実施例1と
同様に、入力端子R1 への入力信号が、Lレベルである
ときにリセットされ、Hレベルになると限時動作を行
う。また、第2のタイマカウンタ2bも第1のタイマカ
ウンタ2aと同様に、入力端子R2 への入力信号が、L
レベルであるときにリセットされ、Hレベルになると限
時動作を行うのである。要するに、図6(b)に示すよ
うに、第2のタイマカウンタ2bの限時動作が、リセッ
ト信号端子RSbから出力される信号の立ち下がり時か
ら開始されるのではなく、立ち上がり後に開始される点
を除けば実施例3と同様の動作を行うことになる。ただ
し、第1のタイマカウンタ2aと第2のタイマカウンタ
2bとは同じ動作をするから、図7に示すように、どち
らも負論理で動作することになる。他の構成および動作
は実施例1と同様である。
Similar to the first embodiment, the first timer counter 2a is reset when the input signal to the input terminal R 1 is at L level, and performs the time delay operation when it is at H level. In addition, the second timer counter 2b, like the first timer counter 2a, has an L-level input signal to the input terminal R 2 .
When it is at the level, it is reset, and when it goes to the H level, the time delay operation is performed. In short, as shown in FIG. 6B, the time-delay operation of the second timer counter 2b does not start at the falling edge of the signal output from the reset signal terminal RSb but at the rising edge thereof. Except for the above, the same operation as in the third embodiment is performed. However, since the first timer counter 2a and the second timer counter 2b operate in the same manner, as shown in FIG. 7, both operate in negative logic. Other configurations and operations are similar to those of the first embodiment.

【0022】なお、上記各実施例では、第1種リセット
信号rs1 が負論理であり、第2種リセット信号rs2
が正論理であるが、逆であっても同様の技術思想が適用
できるのはもちろんのことである。
In each of the above embodiments, the first-type reset signal rs 1 has a negative logic and the second-type reset signal rs 2 has a negative logic.
Is a positive logic, but it is needless to say that the same technical idea can be applied to the opposite case.

【0023】[0023]

【発明の効果】本発明は上述のように、限時時間が異な
る2種のタイマカウンタを設け、両タイマカウンタの一
方がタイムアップしたときに異常検知信号が出力する出
力回路を設け、リセット信号の発生間隔が両タイマカウ
ンタの限時時間の間の時間であるような処理を処理装置
で行うときには、限時時間の短いほうのタイマカウンタ
の限時動作を停止した状態で、限時時間の長いほうのタ
イマカウンタのみが限時動作を行うのである。すなわ
ち、リセット信号の発生間隔が短いときには、両タイマ
カウンタがリセットされて限時動作を行うが、限時時間
の短いほうのタイマカウンタが先にタイムアップして異
常検知信号が出力されるから、リセット信号の発生間隔
が比較的短いときには、動作異常の検出までの時間を短
くすることができるという利点がある。一方、リセット
信号の発生間隔が長いときには、処理回路の出力によっ
て限時時間の短いほうのタイマカウンタの限時動作が停
止されるから、限時時間の長いほうのタイマカウンタの
みが動作することになり、比較的長時間を要する処理の
場合であってもリセット処理の頻度を低減することがで
きるという利点がある。要するに、比較的長時間を要す
る一連の処理を行う場合に、リセット処理の頻度を低減
してソフトウェアの負担を軽減することができ、一方、
比較的短時間で終了する処理に対しては短時間で動作異
常が検出できるという効果を奏するのである。
As described above, the present invention is provided with two types of timer counters having different time limit times, and is provided with an output circuit that outputs an abnormality detection signal when one of the timer counters times out, and a reset signal When the processing device performs processing such that the generation interval is between the time limits of both timer counters, the timer counter with the longer time limit is stopped while the timer counter with the shorter time limit is stopped. Only do the timed operation. That is, when the reset signal generation interval is short, both timer counters are reset to perform the time-delayed operation, but the timer counter with the shorter time-delayed time expires first and the abnormality detection signal is output. When the occurrence interval of is relatively short, there is an advantage that the time until the detection of the operation abnormality can be shortened. On the other hand, when the generation interval of the reset signal is long, the timer circuit with the shorter time limit operation is stopped by the output of the processing circuit, so only the timer counter with the longer time limit operation operates. There is an advantage that the frequency of reset processing can be reduced even in the case of processing that requires a relatively long time. In short, when performing a series of processing that requires a relatively long time, it is possible to reduce the frequency of reset processing and reduce the load on software.
With respect to the processing that is completed in a relatively short time, it is possible to detect the operation abnormality in a short time.

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

【図1】実施例1を示し、(a)は回路図、(b)は動
作説明図である。
1A and 1B show a first embodiment, FIG. 1A is a circuit diagram, and FIG.

【図2】実施例1を示す要部の回路図である。FIG. 2 is a circuit diagram of a main part showing the first embodiment.

【図3】実施例2を示す要部の回路図である。FIG. 3 is a circuit diagram of a main part showing a second embodiment.

【図4】実施例3を示し、(a)は回路図、(b)は動
作説明図である。
4A and 4B show a third embodiment, FIG. 4A is a circuit diagram, and FIG.

【図5】実施例3を示す要部の回路図である。FIG. 5 is a circuit diagram of a main part showing a third embodiment.

【図6】実施例4を示し、(a)は回路図、(b)は動
作説明図である。
6A and 6B show a fourth embodiment, in which FIG. 6A is a circuit diagram and FIG.

【図7】実施例4を示す要部の回路図である。FIG. 7 is a circuit diagram of a main part showing a fourth embodiment.

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

1 処理装置 2a 第1のタイマカウンタ 2b 第2のタイマカウンタ 3 オア回路 rs1 第1種リセット信号 rs2 第2種リセット信号1 Processor 2a 1st timer counter 2b 2nd timer counter 3 OR circuit rs 1 1st type reset signal rs 2 2nd type reset signal

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 プログラムにより設定された発生間隔で
CPU等の処理装置から出力されるリセット信号によっ
てリセットされ、リセットされた後に限時動作を行うこ
とによって限時時間が終了するまでに次のリセット信号
が処理装置から出力されないとタイムアップして異常検
知信号を出力するウォッチドッグタイマにおいて、限時
時間が比較的短い第1のタイマカウンタと、限時時間が
第1のタイマカウンタよりも長い第2のタイマカウンタ
と、第1のタイマカウンタと第2のタイマカウンタとの
いずれか一方がタイムアップすると異常検知信号を出力
する出力回路とを備え、処理装置は、第1のタイマカウ
ンタの限時時間よりも発生間隔が短い第1種リセット信
号を出力するときには、第1種リセット信号によって第
1のタイマカウンタおよび第2のタイマカウンタをリセ
ットして限時動作が開始されるようにし、発生間隔が第
1のタイマカウンタの限時時間よりも長くかつ第2のタ
イマカウンタの限時時間よりも短い第2種リセット信号
を出力するときには、第2種リセット信号の発生してい
ない期間に第1のタイマカウンタの動作を停止させると
ともに第2種リセット信号によって第2のタイマカウン
タをリセットした後に限時動作が開始されるようにした
ことを特徴とするウォッチドッグタイマ。
1. A reset signal output from a processing device such as a CPU at a generation interval set by a program, and by performing a time-delaying operation after resetting, a next reset signal is output until the time-delay time ends. In a watchdog timer that outputs an abnormality detection signal when the processing device outputs no time, the first timer counter has a relatively short time limit and the second timer counter has a longer time limit than the first timer counter. And an output circuit that outputs an abnormality detection signal when either one of the first timer counter and the second timer counter times out, and the processing device generates an interval more than the time limit of the first timer counter. When outputting the short type 1 reset signal, the first type timer signal And a second timer counter for resetting the second timer counter so that the time-delay operation is started, and the generation interval is longer than the time-delay time of the first timer counter and shorter than the time-delay time of the second timer counter. When outputting, the operation of the first timer counter is stopped while the second type reset signal is not generated, and the timed operation is started after the second timer counter is reset by the second type reset signal. A watchdog timer that is characterized by
【請求項2】 第1種リセット信号および第2種リセッ
ト信号は、論理値が互いに反対であるとともにプログラ
ムにより設定された発生間隔ごとに発生するパルス信号
であって、第1のタイマカウンタは、第1種リセット信
号が発生している期間の論理値によってリセットされそ
の反対の論理値によって限時動作を行うように構成さ
れ、第2のタイマカウンタは、第2種リセット信号が終
了するときの論理値の変化によりリセットされリセット
された直後に限時動作を行うように構成されて成ること
を特徴とする請求項1記載のウォッチドッグタイマ。
2. The first-type reset signal and the second-type reset signal are pulse signals whose logical values are opposite to each other and are generated at every generation interval set by a program, and the first timer counter is The second timer counter is configured to be reset by a logical value during the period in which the first-type reset signal is generated and perform a timed operation by the opposite logical value, and the second timer counter is a logic when the second-type reset signal ends. The watchdog timer according to claim 1, wherein the watchdog timer is configured to perform a timed operation immediately after being reset by a change in a value and being reset.
【請求項3】 第1種リセット信号および第2種リセッ
ト信号は、論理値が互いに反対であるとともにプログラ
ムにより設定された発生間隔ごとに発生するパルス信号
であって、第1のタイマカウンタは、第1種リセット信
号が発生している期間の論理値によってリセットされそ
の反対の論理値によって限時動作を行うように構成さ
れ、第2のタイマカウンタは、第2種リセット信号が発
生している期間の論理値によってリセットされその反対
の論理値で限時動作を行うように構成されて成ることを
特徴とする請求項1記載のウォッチドッグタイマ。
3. The first-type reset signal and the second-type reset signal are pulse signals whose logical values are opposite to each other and are generated at every generation interval set by a program, and the first timer counter is The second timer counter is configured to be reset by a logical value during the period in which the first type reset signal is generated and perform a timed operation by the opposite logical value, and the second timer counter is configured to perform during the period in which the second type reset signal is generated. 2. The watchdog timer according to claim 1, wherein the watchdog timer is configured to be reset by the logical value of and to perform the timed operation with the opposite logical value.
【請求項4】 第1種リセット信号および第2種リセッ
ト信号は、論理値が互いに反対であるとともにプログラ
ムにより設定された発生間隔ごとに発生するパルス信号
であって、第1のタイマカウンタは、第1種リセット信
号が発生している期間の論理値によってリセットされそ
の反対の論理値によって限時動作を行うように構成さ
れ、第2のタイマカウンタは、第2種リセット信号が終
了するときの論理値の変化によりリセットされリセット
された直後に限時動作を行うように構成され、処理装置
は、第1種リセット信号および第2種リセット信号を第
1のタイマカウンタに対して出力するとともに、第1種
リセット信号が開始する時点および第2種リセット信号
が終了する時点に同期した所定幅のパルス信号を第2の
タイマカウンタに対して出力することを特徴とする請求
項1記載のウォッチドッグタイマ。
4. The first-type reset signal and the second-type reset signal are pulse signals whose logical values are opposite to each other and are generated at every generation interval set by a program, and the first timer counter is The second timer counter is configured to be reset by a logical value during the period in which the first-type reset signal is generated and perform a timed operation by the opposite logical value, and the second timer counter is a logic when the second-type reset signal ends. The processing device is configured to perform a timed operation immediately after being reset by a change in a value and being reset, and the processing device outputs a first type reset signal and a second type reset signal to the first timer counter, and A pulse signal of a predetermined width synchronized with the time when the seed reset signal starts and the time when the second type reset signal ends is sent to the second timer counter. The watchdog timer according to claim 1, wherein the watchdog timer is output.
【請求項5】 第1種リセット信号および第2種リセッ
ト信号は、論理値が互いに反対であるとともにプログラ
ムにより設定された発生間隔ごとに発生するパルス信号
であって、第1のタイマカウンタは、第1種リセット信
号が発生している期間の論理値によってリセットされそ
の反対の論理値によって限時動作を行うように構成さ
れ、第2のタイマカウンタは、第2種リセット信号が発
生している期間の論理値によってリセットされその反対
の論理値で限時動作を行うように構成され、処理装置
は、第1種リセット信号および第2種リセット信号を第
1のタイマカウンタに対して出力するとともに、第1種
リセット信号が開始する時点および第2種リセット信号
が終了する時点に同期した所定幅のパルス信号を第2の
タイマカウンタに対して出力することを特徴とする請求
項1記載のウォッチドッグタイマ。
5. The first-type reset signal and the second-type reset signal are pulse signals whose logical values are opposite to each other and are generated at every generation interval set by a program, and the first timer counter is The second timer counter is configured to be reset by a logical value during the period in which the first type reset signal is generated and perform a timed operation by the opposite logical value, and the second timer counter is configured to perform during the period in which the second type reset signal is generated. Is configured to perform a timed operation with a logic value of the first reset and a logic value of the opposite, the processing device outputs a first type reset signal and a second type reset signal to the first timer counter, and A pulse signal of a predetermined width synchronized with the time when the first-type reset signal starts and the time when the second-type reset signal ends is sent to the second timer counter. The watchdog timer according to claim 1, wherein the watchdog timer outputs.
JP3186627A 1991-07-25 1991-07-25 Watchdog timer Withdrawn JPH0535541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3186627A JPH0535541A (en) 1991-07-25 1991-07-25 Watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3186627A JPH0535541A (en) 1991-07-25 1991-07-25 Watchdog timer

Publications (1)

Publication Number Publication Date
JPH0535541A true JPH0535541A (en) 1993-02-12

Family

ID=16191893

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3186627A Withdrawn JPH0535541A (en) 1991-07-25 1991-07-25 Watchdog timer

Country Status (1)

Country Link
JP (1) JPH0535541A (en)

Similar Documents

Publication Publication Date Title
US4405982A (en) Arrangement for monitoring the function of a programmable electronic switching circuit
US5059834A (en) Circuit device for eliminating noise from an input signal independent of time of arrival of noise or noise width
JPH0535541A (en) Watchdog timer
JPH06348507A (en) Microcomputer
JP2819898B2 (en) Monitoring circuit for communication equipment
JP2689778B2 (en) Runaway detection device for electronic control unit
JP2002271427A (en) Noise removing circuit
US6072338A (en) Method of and device for determining pulse width
JPH07235831A (en) Frequency abnormality detection circuit
JP2944543B2 (en) Interrupt control device
JP2598547Y2 (en) Pattern generator for semiconductor test equipment
JPH04239340A (en) Method and device for detection of software processing abnormality
JPH03108013A (en) Clock break detecting circuit
JPS5911424A (en) Processing circuit of interruption signal
JPH06222961A (en) Watchdog timer
JP3144811B2 (en) Monitoring timer circuit
JP2605894B2 (en) Trigger signal generator
JPH0318773B2 (en)
JPH0583094A (en) Filter circuit
JPH11259182A (en) Reset device
JPH0894660A (en) Pulse measuring apparatus
JPH02205940A (en) Watchdog timer device
JPH09160809A (en) Cpu monitor circuit
JPH01163845A (en) Control circuit for microcomputer
JPH01293449A (en) Watch dog timer

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19981008