JPH027135A - Watch dog timer circuit - Google Patents

Watch dog timer circuit

Info

Publication number
JPH027135A
JPH027135A JP63157278A JP15727888A JPH027135A JP H027135 A JPH027135 A JP H027135A JP 63157278 A JP63157278 A JP 63157278A JP 15727888 A JP15727888 A JP 15727888A JP H027135 A JPH027135 A JP H027135A
Authority
JP
Japan
Prior art keywords
time
watchdog
circuit
pulse
output
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
JP63157278A
Other languages
Japanese (ja)
Inventor
Hirobumi Kumamoto
熊本 博文
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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries 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 Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Priority to JP63157278A priority Critical patent/JPH027135A/en
Publication of JPH027135A publication Critical patent/JPH027135A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To secure strict monitoring capacity for a watch dot pulse abnormality by setting a periodical monitoring period T1 for a peak watch dog pulse longer than a monitoring period T2 for the watch dog pulse except it. CONSTITUTION:After a CPU 10 is reset, a peak watch dog pulse 12 generated by the CPU 10 through a time-up time variable setting circuit 13, set a time-up time T of a watch dog timer circuit II to T1. For this reason, even when the circuit 11 passes through from t0, the circuit does not generate the resetting signal, a peak watch dog pulse is inputted by t1, and then, it is reset by this and a counting action for the next watch dog pulse is started. This depends on the fact that a deciding circuit 12 makes the time-up time variable setting circuit 13 reset the time-up time T of the watch dog timer circuit 11 to the T2 shorter than the T1.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、マイクロコンピュータ(以下、マイコンと
も呼称する)に関し、特にマイクロコンピュータのウォ
ッチドッグタイマ回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer (hereinafter also referred to as a microcomputer), and particularly to a watchdog timer circuit for a microcomputer.

〔従来の技術〕[Conventional technology]

従来、マイクロ、コンピュータにおいては、いわゆるウ
ォッチドッグタイマを用いてソフトウェアやハードウェ
アの暴走、異常等を検出することが行われている。これ
は、マイコンの動作が正常であれば、そのことを示すパ
ルス(ウォッチドッグパルス)を所定の最大周期T。以
下の周期で繰返し出力し、これによってタイマ(ウオ・
ツチド・ノブタイマ)を繰返しリセットし、このウオ・
ツチド・ラグパルスが欠落するかまたは周期が所定の設
定タイムアツプ時間(監視期間)Tを超えると、ウオ・
ノチドッグタイマがタイムアツプすることによりマイコ
ンにリセット信号を出力して、マイコンにリセット/再
起動、あるいは警報出力等、リセ・ット割込みによる所
定の動作(例外処理)を行わせるようにしたものである
Conventionally, in micro and computers, so-called watchdog timers have been used to detect runaways, abnormalities, etc. in software or hardware. This means that if the microcomputer is operating normally, a pulse (watchdog pulse) indicating this is sent at a predetermined maximum cycle T. The output is repeated at the following intervals, and the timer
(Tsuchido knob timer) repeatedly to reset the
If the output lag pulse is missing or the period exceeds the predetermined set time-up time (monitoring period) T, the
When the Nochidog timer times up, a reset signal is output to the microcontroller, causing the microcontroller to perform a predetermined operation (exception processing) such as resetting/restarting or outputting an alarm using a reset/reset interrupt. be.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記のようなウォッチドッグタイマを有するマイクロコ
ンピュータは、パワーオンリセ・ット等、各リセット動
作の直後から上記最大周期T。以内でウォ・ツチドッグ
パルスを出力しなければならない。それは、電源電圧が
立ち上がった状態で、マイコンがリセット後T。を過ぎ
ても最初のウオ・ツチドッグパルスが出力されないまま
ウオッチド・ノブタイマの設定タイムアツプ時間(監視
期間)Tに達すると、ウォッチドッグタイマからリセ・
ット信号が出力されてマイコンが再度リセットされ、こ
のリセット後のウォッチドッグパルスも上記T。では出
力されずにタイムアツプとなり、ウォッチドッグタイマ
からリセット信号がマイコンへ出力されることによりリ
セット動作が繰返される結果、マイコンが安定動作状態
へ移行することができないからである。
A microcomputer having the above-mentioned watchdog timer has the above-mentioned maximum period T immediately after each reset operation such as a power-on reset. The war dog pulse must be output within the following range. It is T after the microcontroller is reset with the power supply voltage rising. If the watchdog timer's set time-up time (monitoring period) T is reached without the first watchdog pulse being output even after the watchdog timer is reset.
The microcomputer is reset again by outputting the reset signal, and the watchdog pulse after this reset is also T. This is because the reset signal is output from the watchdog timer to the microcomputer and the reset operation is repeated, making it impossible for the microcomputer to enter a stable operating state.

しかしながら、マイコンは、一般に、リセット直後はこ
れを含むシステム全体の初期化や初期の自己診断等を実
行し、その後周期的制御を開始してその動作の確認のた
めにウォッチドッグパルスを出力する。特に、このよう
な初期の処理に要する時間はその後の安定動作における
制御周期より長いことも多いため、リセット直後から上
記の最大周期T。以内でウォッチドッグパルスを出力す
るのは簡単ではなく、これを可能にするためにはプログ
ラムの複雑化が避けられないという事情がある。
However, immediately after a microcomputer is reset, it generally initializes the entire system including the microcomputer, performs initial self-diagnosis, etc., and then starts periodic control and outputs a watchdog pulse to confirm its operation. In particular, since the time required for such initial processing is often longer than the control cycle for subsequent stable operation, the maximum cycle T described above starts immediately after reset. It is not easy to output a watchdog pulse within the range of 200 to 3000, and the program must become more complex to make this possible.

また、この点に関連して、初期処理時とその後の周期的
制御時とでは、ウォッチドッグパルスの周期の差が大き
く出易く、その誤差範囲内ではウォッチドッグタイマが
作動(リセット信号出力)しないようにするために、ウ
ォッチドッグタイマのタイムアツプ時間Tの公差を太き
((長めに)取る必要があり、その分ウォッチドッグパ
ルス異常の監視能力、あるいは異常検出感度が低くなら
ざるを得なかった。
Also, in relation to this point, there tends to be a large difference in the period of the watchdog pulse between the initial processing and the subsequent periodic control, and the watchdog timer does not operate (reset signal output) within this error range. In order to do this, it was necessary to increase the tolerance of the time-up time T of the watchdog timer, and the ability to monitor abnormalities in the watchdog pulse or the sensitivity to detect abnormalities had to be reduced accordingly. .

この発明は、上記の事情に鑑みなされたもので、その目
的はプログラムを複雑化させることな(高い異常検出感
度番確保することのできるマイクロコンピュータ用のウ
ォッチドッグタイマ回路を提供することにある。
The present invention was made in view of the above circumstances, and its purpose is to provide a watchdog timer circuit for a microcomputer that can ensure high abnormality detection sensitivity without complicating the program.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的達成のため、この発明は、正常に動作中のマイ
クロコンピュータから所定の最大周期T。以下の周期で
入力されるウォッチドッグパルスによりリセットされる
と共に、リセット後上記最大周期T0より長い設定タイ
ムアツプ時間(監視期間)Tを経、過しても次のウォッ
チドッグパルスが入力されない時は、ウォッチドッグパ
ルス周期異常としてマイクロコンピュータにリセット信
号を出力するウォッチドッグタイマ回路において、上記
タイムアツプ時間Tを、マイクロコンピュータがリセッ
トされた後最初に出力されるウォッチドッグパルス(先
頭ウォッチドッグパルス)についてはT=T、とし、そ
れ以後のウォッチドッグパルスについてはT=T2とし
て、TI>T2の関係に可変設定するようにしたもので
ある。
To achieve the above object, the present invention provides a predetermined maximum period T from a normally operating microcomputer. It is reset by a watchdog pulse that is input at the following cycles, and when the next watchdog pulse is not input even after a set time-up time (monitoring period) T that is longer than the maximum cycle T0 after the reset, In a watchdog timer circuit that outputs a reset signal to a microcomputer as a watchdog pulse period abnormality, the above time-up time T is set to T for the first watchdog pulse (first watchdog pulse) output after the microcomputer is reset. =T, and subsequent watchdog pulses are set to T=T2, and are variably set to the relationship TI>T2.

〔作用〕[Effect]

上記の構成を有するこの発明のウォッチドッグタイマ回
路は、マイコンがリセットされた後最初に出力される先
頭ウォッチドッグパルスについては、ウォッチドッグタ
イマ回路のタイムアツプ時間(監視期間)Tがそれ以後
のマイコンの安定動作時におけるウォッチドッグパルス
(最大周期T。)に対するタイムアツプ時間T2より長
いT。
In the watchdog timer circuit of the present invention having the above configuration, for the first watchdog pulse output after the microcomputer is reset, the time-up time (monitoring period) T of the watchdog timer circuit is the same as that of the subsequent microcomputer. T is longer than the time-up time T2 for the watchdog pulse (maximum period T) during stable operation.

に設定されるため、先頭ウォ、2チド、ッグ、<ルスが
このT。よりかなり遅くT2を越えて出力されても、ウ
ォッチドッグタイマ回路がリセット信号を出力すること
はな(、マイコンは円滑に通常制御動作に移行すること
ができる。従って、先頭ウオフチドッグパルスをリセッ
ト直後上記の最大周期T。以内の時間で出力させるため
に特別なプログラムを用意する必要はなく、プログラム
の複雑化を避けることができる。
Since it is set to , the first wo, 2nd, gu, and <rus are this T. Even if the watchdog timer circuit is output much later than T2, the watchdog timer circuit will not output a reset signal (the microcontroller can smoothly transition to normal control operation. Therefore, the first watchdog timer circuit will not output a reset signal. Immediately after, there is no need to prepare a special program to output within the above-mentioned maximum period T, and it is possible to avoid complicating the program.

また、先頭ウォッチドッグパルス以外の最大周期T。の
ウォッチドッグパルスに対するウォッチドッグタイマ回
路のタイムアツプ時間T2はT。
Also, the maximum period T other than the first watchdog pulse. The time-up time T2 of the watchdog timer circuit for the watchdog pulse is T.

に十分近づけることができるため、従来のようにタイム
アツプ時間の公差を大きく取る必要がなく、マイコン動
作の異常監視能力ないしは異常検出感度を改善すること
ができる。
Since the time-up time can be brought sufficiently close to , it is not necessary to take a large tolerance for time-up time as in the conventional case, and the abnormality monitoring ability or abnormality detection sensitivity of the microcomputer operation can be improved.

〔実施例〕〔Example〕

以下、この発明のウォッチドッグタイマ回路の実施例に
ついて図面を参照しつつ説明する。
Embodiments of the watchdog timer circuit of the present invention will be described below with reference to the drawings.

第1図は、この発明のウォッチドッグタイマ回路の一実
施例を適用したマイコンシステムの要部の構成を示し、
ウォッチドッグタイマ回路Ifは先頭ウォッチドッグパ
ルス判別回路12及びタイムアツプ時間可変設定回路1
3を具備している。マイクロコンピュータ(CPU)1
GのウォッチドッグパルスWを微分する微分回路14の
出力はウォッチドッグタイマ回路11と先頭ウォッチド
ッグパルス判別回路12に入力され、電源電圧監視回路
I5は電源電圧を監視してこれが所定値以下に下がった
時ウォッチドッグタイマ回路IIに信号を出力する。
FIG. 1 shows the configuration of the main parts of a microcomputer system to which an embodiment of the watchdog timer circuit of the present invention is applied.
The watchdog timer circuit If includes a leading watchdog pulse discrimination circuit 12 and a time-up time variable setting circuit 1.
It is equipped with 3. Microcomputer (CPU) 1
The output of the differentiating circuit 14 that differentiates the G watchdog pulse W is input to the watchdog timer circuit 11 and the first watchdog pulse discriminating circuit 12, and the power supply voltage monitoring circuit I5 monitors the power supply voltage and detects when the voltage falls below a predetermined value. A signal is output to the watchdog timer circuit II.

ウォッチドッグタイマ回路IIは、微分回路t4を介し
て入力されるウォッチドッグパルスWを監視し、その周
期が設定タイムアツプ時間(監視期間)T以内にない時
、リセット信号をCPU1口の■■丁端子へ出力する。
The watchdog timer circuit II monitors the watchdog pulse W input through the differentiator circuit t4, and when the period thereof is not within the set time-up time (monitoring period) T, a reset signal is sent to the terminal of the CPU 1. Output to.

ウォッチドッグタイマ回路11は、電源電圧監視回路1
5の出力信号が入力された時も同様にリセット信号を出
力する。ウォッチドッグタイマ回路!1のリセット信号
は先頭ウォッチドッグパルス判別回路12にも入力され
る。
The watchdog timer circuit 11 is a power supply voltage monitoring circuit 1.
Similarly, when the output signal No. 5 is input, a reset signal is output. Watchdog timer circuit! The reset signal 1 is also input to the leading watchdog pulse discrimination circuit 12.

ウォッチドッグタイマ回路11のタイムアツプ時間Tは
、マイコンIOの通常の安定制御動作時におけるウォッ
チドッグパルスの最大周期T。より所定の許容時間だけ
長く、タイムアツプ時間可変設定回路13によりT=T
、またはT=T2 (T、>T2>To)に可変設定さ
れる。先頭ウォッチドッグパルス判別回路12は、微分
回路14を介して入力されるウォッチドッグパルスWが
マイコン10のリセット後最初のウォッチドッグパルス
(先頭ウォッチドッグパルス)かどうかを判別し、先頭
ウォッチドッグパルスであれば、タイムアツプ時間設定
回路13をしてウォッチドッグタイマ回路!■のタイム
アツプ時間をT=T、に設定させ、それ以外の時はT=
T2に設定させる。
The time-up time T of the watchdog timer circuit 11 is the maximum cycle T of the watchdog pulse during normal stable control operation of the microcomputer IO. The time-up time variable setting circuit 13 makes T=T longer by a predetermined allowable time.
, or variably set to T=T2 (T,>T2>To). The leading watchdog pulse determination circuit 12 determines whether the watchdog pulse W inputted via the differentiating circuit 14 is the first watchdog pulse (leading watchdog pulse) after the microcomputer 10 is reset, and determines whether the leading watchdog pulse is the leading watchdog pulse. If there is, use the time-up time setting circuit 13 as a watchdog timer circuit! Set the time-up time of ■ to T=T, and at other times T=
Set it to T2.

今、第2図の1=1.でCPUl0のリセット動作が完
了したととすると、その直後にCPtJloが発生する
ウォッチドッグパルスは先頭ウォッチドッグパルスであ
るから、先頭ウォッチドッグパルス12はタイムアツプ
時間可変設定回路13にウォッチドッグタイマ回路11
のタイムア・ツブ時間TをT。
Now, 1=1 in Figure 2. Assuming that the reset operation of CPU10 is completed, the watchdog pulse generated by CPtJlo immediately after that is the first watchdog pulse, so the first watchdog pulse 12 is sent to the time-up time variable setting circuit 13 and the watchdog timer circuit 11.
The time of the time is T.

に設定させる。そのため、toからT2を経過してもウ
ォッチドッグタイマ回路11はリセット信号を出さず、
1.で先頭ウォッチドッグパルスが入力されると、これ
によりリセットされて(タイマ内容がゼロになる)次の
ウォッチドッグパルスに対する計時動作を開始する。も
ちろんT1を過ぎても先頭ウォッチドッグパルスが入力
されない時は、ウォ・ノチドッグタイマ回路11はCP
Ul0にリセット信号を出力する。
Set it to Therefore, even after T2 has elapsed from to, the watchdog timer circuit 11 does not issue a reset signal.
1. When the first watchdog pulse is input, the timer is reset (the timer contents become zero) and starts counting the time for the next watchdog pulse. Of course, if the first watchdog pulse is not input even after T1, the watchdog timer circuit 11
Outputs a reset signal to Ul0.

上記のように、1.からT、を経過する前に先頭ウォッ
チドッグパルスが入力されたならば、先頭ウォッチドッ
グパルス判別回路12はタイムアツプ時間可変設定回路
I3にウォッチドッグタイマ回路11のタイムアツプ時
間TをT1より短いT2設定し直させる。ただし、この
T2は先頭ウォッチドッグパルス以外のウォッチドッグ
パルス中量も周期の長いものの周期即ち最大周期T。よ
り長い(TI >T2 >To )。
As mentioned above, 1. If the first watchdog pulse is input before T, the first watchdog pulse determination circuit 12 sets the time-up time T of the watchdog timer circuit 11 to T2, which is shorter than T1, in the time-up time variable setting circuit I3. Let me fix it. However, this T2 is the period of watchdog pulses other than the first watchdog pulse, which have long periods, that is, the maximum period T. longer (TI > T2 > To).

以後ウォッチドッグタイマ回路Uは、T2をタイムアツ
プ時間即ち監視期間として、CPUIGからのウォッチ
ドッグパルスW(t2以後)により繰返しリセットされ
つつその周期を監視し続ける。
Thereafter, the watchdog timer circuit U continues to monitor the cycle while being repeatedly reset by the watchdog pulse W (after t2) from the CPUIG, with T2 as a time-up time, ie, a monitoring period.

そして、例えばt3におけるように、タイマ内容がT2
に達するまでウォッチドッグパルスが入力されないと、
ウォッチドッグタイマ回路11がリセット信号を出力1
.、CPUl0はリセットされる。このリセット後、ウ
ォッチドッグタイマ回路11はt4から計時動作を再開
するが、この場合も前記の18の場合同様先頭ウォッチ
ドッグパルス判別回路12はタイムアツプ時間可変設定
回路目にウォッチドッグタイマ回路11のタイムアツプ
時間TをT1に設定させ、t、の先頭ウォッチドッグパ
ルスでリセットされた後、即ちt6で示す以後のウォッ
チドッグパルスについてはTをT2に設定させる。
Then, for example at t3, the timer content is T2
If the watchdog pulse is not input until
Watchdog timer circuit 11 outputs reset signal 1
.. , CPU10 is reset. After this reset, the watchdog timer circuit 11 restarts the time measurement operation from t4, but in this case as well, as in the case of 18 above, the leading watchdog pulse discriminating circuit 12 detects the time-up of the watchdog timer circuit 11 in the time-up time variable setting circuit. The time T is set to T1, and after being reset by the first watchdog pulse at t, that is, for subsequent watchdog pulses indicated at t6, T is set to T2.

第3図は、第1図の実施例の要部における具体的回路構
成の一例を示す。第3図のウォッチドッグタイマ回路1
1は、基準電圧V ro、s Vr*f2がそれぞれ非
反転入力端子9反転入力端子に接続された第1コンパレ
ータIll 、 第2コンパレータ112.3つのS−
RラッチS輩Ll、 5RL2.5RL3.2つのオア
回路01!l 、 OR2、積分タイマ回路113、及
び出力回路114等で構成されている。積分タイマ回路
113はタイマコンデンサTC及びこのコンデンサの充
放電を切換えるためのトランジスタTrlを有し、出力
回路114は導通時1EsET信号をCPUI◎へ供給
するトランジスタTr2よりなる。
FIG. 3 shows an example of a specific circuit configuration of the main part of the embodiment shown in FIG. Watchdog timer circuit 1 in Figure 3
1 is a first comparator Ill, a second comparator 112, and three S-
R latch S LL, 5RL2.5RL3.2 OR circuit 01! 1, an integral timer circuit 113, an output circuit 114, and the like. The integral timer circuit 113 includes a timer capacitor TC and a transistor Trl for switching charging and discharging of this capacitor, and the output circuit 114 includes a transistor Tr2 that supplies a 1EsET signal to the CPUI◎ when conductive.

先頭ウォッチドッグパルス判別回路12はS−Rラッチ
5IL4よりなり、タイムアツプ時間可変設定回路13
は5tL4の状態により導通、非導通となり上記第1コ
ンパレータ111 、 !2コンパレータ112の基準
電圧V rafts Vr*(□を変化させるトランジ
スタTr4よりなる。微分回路14は通常のRC微分器
141.ダイオードクリッパI42、及び出力段トラン
ジスタTr5 、 Tr5等よりなり、CPUl0から
のウォッチドッグパルスWを微分してその前縁に同期し
たパルスを上記S−Rラッチ5ljL3のS入力端子に
供給する。電源電圧監視回路15は、システム各部に定
電圧を供給する定電圧電°源(安定化電源)の出力電圧
v11.をツェナーダイオード201の基準電圧V r
 @ t 3と比較してV rag <Vrsf3にな
ると出力がハイになるコンパレータ151よりなる。
The leading watchdog pulse discrimination circuit 12 includes an S-R latch 5IL4, and a time-up time variable setting circuit 13.
becomes conductive or non-conductive depending on the state of 5tL4, and the first comparator 111, ! 2 comparator 112 reference voltage V rafts Vr* (□). The differentiating circuit 14 consists of a normal RC differentiator 141, a diode clipper I42, output stage transistors Tr5, Tr5, etc., and a watch from CPU10. The dog pulse W is differentiated and a pulse synchronized with its leading edge is supplied to the S input terminal of the S-R latch 5ljL3.The power supply voltage monitoring circuit 15 is connected to a constant voltage power supply ( The output voltage v11. of the stabilized power supply) is set as the reference voltage V r of the Zener diode 201.
It consists of a comparator 151 whose output becomes high when V rag <Vrsf3 compared with @t3.

以下、第3図の実施例の回路動作についてその主要部に
おける動作タイミングを示す第4図を参照しつつ詳細に
説明する。
Hereinafter, the circuit operation of the embodiment shown in FIG. 3 will be explained in detail with reference to FIG. 4, which shows the operation timing of its main parts.

電源オン後τ。において安定化電源電圧V r @ g
が基準電圧V r @ f 3以上に立ち上がると、電
源電圧監視回路15のコンパレータ151の出力(■)
がローとなり、ウォッチドッグタイマ回路11の積分タ
イマ回路113でトランジスタTriのベース電圧(■
)がローとなってタイマコンデンサTCが充電を開始す
る。
τ after power on. The stabilized power supply voltage V r @ g
rises above the reference voltage V r @ f 3, the output (■) of the comparator 151 of the power supply voltage monitoring circuit 15
becomes low, and the integral timer circuit 113 of the watchdog timer circuit 11 lowers the base voltage of the transistor Tri (■
) goes low and the timer capacitor TC starts charging.

τ0以前においては、タイマコンデンサTCの充電電圧
Vtc(■)が第1コンパレータ111.第2コンパレ
ータ112の基準電圧V roll v、、、□より低
く、第1コンパレータ111の出力(■)は/%−イ、
第2コンパレータ112の出力(■)はローであるから
、S−RラッチSH,lの出力(■)はローである。こ
の時コンパレータ151の出力(■)はハイであるから
、S−Rラッチ5RL2の出力(■)はハイである。従
って、出力回路114のトランジスタTr2が導通して
おり、CPU1OへのRES ET信号出力(■)はロ
ーになっている。また、積分タイマ回路113のトラン
ジスタTrl も導通し、タイマコンデンサTCはほと
んど充電されない。
Before τ0, the charging voltage Vtc (■) of the timer capacitor TC is the first comparator 111. Lower than the reference voltage V roll v, , □ of the second comparator 112, the output (■) of the first comparator 111 is /%-i,
Since the output (■) of the second comparator 112 is low, the output (■) of the S-R latch SH,1 is low. At this time, the output (■) of the comparator 151 is high, so the output (■) of the SR latch 5RL2 is high. Therefore, the transistor Tr2 of the output circuit 114 is conductive, and the RESET signal output (■) to the CPU 1O is low. Further, the transistor Trl of the integral timer circuit 113 is also conductive, and the timer capacitor TC is hardly charged.

一方、先頭ウォッチドッグパルス判別回路12のS−R
ラッチ5IL4のR端子もハイであり(■)、S端子は
ローである(■)から、S−Rラッチ5tL4の出力(
@)がローで、タイムアツプ時間可変設定回路I3のト
ランジスタTr4が導通しており、第1コンパレータ1
11 、 第2コンパレータ112の基準電圧設定回路
の抵抗紀1が抵抗R4によって分路されるため、抵抗[
2,13の電流が増大し、第1コンパレータillの基
準電圧v r−t 1− 第2コンパレータ112の基
準電圧V r @ f 2は共にハイ(H)になってい
る(■)。
On the other hand, S-R of the leading watchdog pulse discrimination circuit 12
Since the R terminal of latch 5IL4 is also high (■) and the S terminal is low (■), the output of S-R latch 5tL4 (
@) is low, the transistor Tr4 of the time-up time variable setting circuit I3 is conductive, and the first comparator 1
11. Since the resistor No. 1 of the reference voltage setting circuit of the second comparator 112 is shunted by the resistor R4, the resistor [
The currents of 2 and 13 increase, and the reference voltage v r-t 1 of the first comparator 11-the reference voltage V r @ f 2 of the second comparator 112 are both high (H) (■).

上記のτ。で充電を開始したタイマコンデンサTCの電
圧(■)が第1コンパレータ111の基準電圧Vret
xHに達すると(τ、)、第1コンパレータ111の出
力(■)がローになる。ただし、S−Rラッチ5ttl
の出力(■)は変わらない。タイマコンデンサTCの充
電が進んで■の電圧が第2コンパレータ112の基準電
圧V、、、211に達すると(T2)、第2コンパレー
タ112の出力(■)カハイとなり、S−Rラッチ5R
LIの出力(■)及び積分タイマ回路■3のトランジス
タTrlのベース(■)がハイになるため、タイマコン
デンサTCがトランジスタTrlを介してほぼ瞬時に放
電される一方、距届出力(■)をロー、S−Rラッチ5
RL4のR端子(■)をハイに保ったままS−Rラッチ
sgt2の出力(■)がローとなる。
τ above. The voltage (■) of the timer capacitor TC that started charging at is the reference voltage Vret of the first comparator 111.
When xH is reached (τ,), the output (■) of the first comparator 111 becomes low. However, S-R latch 5ttl
The output (■) remains unchanged. When the charging of the timer capacitor TC progresses and the voltage (■) reaches the reference voltage V,...211 of the second comparator 112 (T2), the output (■) of the second comparator 112 becomes low, and the S-R latch 5R
Since the output of LI (■) and the base (■) of the transistor Trl of the integral timer circuit 3 become high, the timer capacitor TC is almost instantaneously discharged via the transistor Trl, while the distance report output (■) Low, S-R latch 5
The output (■) of the S-R latch sgt2 becomes low while the R terminal (■) of RL4 is kept high.

タイマコンデンサTCの放電によってvTCは瞬時にv
ref2■より低くなるため、第2コンパレータ112
の出力(■)も瞬時にローとなり、vTcがVr*t1
H以下となるまで放電されると(T3)、第1コンパレ
ータIllの出力(■)がノ1イになり、S−Rラッチ
5RLIの出力(■)及び積分タイマ回路113のトラ
ンジスタTrlのベース(■)がローとなる結果(ただ
し、S−Rラッチ5liL2の状態は変わらない)、出
力回路114のトランジスタTr2がオフとなってRE
SET出力が7%イになる(リセット完了)一方、積分
タイマ回路113のトランジスタTrlがカットオフさ
れてタイマコンデンサTCが再度充電を開始する。この
時点ではS−Rラッチ5RL4のR端子(■)もローと
なるが、S−Rラッチ5RL4の状態は変わらない。ま
た、タイマコンデンサTCの充電開始によってvTcが
直ぐにVr*fl■以上となるため、第1コンパレータ
111の出力(■)も直ぐにローに戻るが、S−Rラッ
チ5RL1の状態は変わらない(■の出力がローに保た
れる)。
By discharging the timer capacitor TC, vTC instantly becomes v
Since it is lower than ref2■, the second comparator 112
The output (■) also becomes low instantaneously, and vTc becomes Vr*t1.
When the voltage is discharged to below H (T3), the output (■) of the first comparator Ill becomes NO1, and the output (■) of the S-R latch 5RLI and the base (■) of the transistor Trl of the integral timer circuit 113 become (2) becomes low (however, the state of the S-R latch 5liL2 remains unchanged), the transistor Tr2 of the output circuit 114 is turned off, and the RE
While the SET output becomes 7% (reset complete), the transistor Trl of the integral timer circuit 113 is cut off and the timer capacitor TC starts charging again. At this point, the R terminal (■) of the SR latch 5RL4 also becomes low, but the state of the SR latch 5RL4 does not change. Furthermore, since vTc immediately becomes equal to or higher than Vr*fl■ by the start of charging of the timer capacitor TC, the output (■) of the first comparator 111 also returns to low immediately, but the state of the S-R latch 5RL1 remains unchanged (■). output is held low).

タイマコンデンサTCの充電によってvTcが増加し、
ウォッチドッグパルスWが入力されることなりvr、1
□■に達すると(T4)、T2におけるのとほぼ同じ動
作が繰返される。ただし、この場合はS−Rラッチ5R
L2の出力(■)は変わらず(ローに保たれる)、次に
タイマコンデンサTCの充電が開始されるT5までの間
S−RラッチS[,1の出力がハイとなることによって
ローの■丁n出力が(■)CPUIOに供給され、かつ
S−RラッチS 1jL4のR端子(■)がハイになる
(ただし状態は変わらない)。以後、ウォッチドッグパ
ルスWの入力されるかまたは安定化電源電圧の低下によ
って電源電圧監視回路15の出力(■)がハイにならな
い限りT3からT5までの動作が繰返される。この場合
、t 3  (Vtc= V rat +H)からT4
 (vTc=V r e f□■)までの時間T、かリ
セット直後の先頭ウォッチドッグパルスに対する監視期
間に相当しくT=T、)、ここではT1内に先頭ウォッ
チドッグパルスパルスが入力されないため、ウォッチド
ッグパルス周期異常としてCPUl0にローのRESE
T信号が出力される(T4)。
vTc increases by charging the timer capacitor TC,
Since the watchdog pulse W is input, vr, 1
When □■ is reached (T4), almost the same operation as at T2 is repeated. However, in this case, S-R latch 5R
The output of L2 (■) does not change (maintains low), and the output of S-R latch S[,1 goes high until the time T5 starts charging the timer capacitor TC, which keeps it low. ■The n output (■) is supplied to the CPUIO, and the R terminal (■) of the S-R latch S1jL4 becomes high (however, the state does not change). Thereafter, the operations from T3 to T5 are repeated unless the watchdog pulse W is input or the output (■) of the power supply voltage monitoring circuit 15 becomes high due to a drop in the stabilized power supply voltage. In this case, from t 3 (Vtc=V rat +H) to T4
The time T until (vTc=V r e f□■) corresponds to the monitoring period for the first watchdog pulse immediately after reset (T=T,), and since the first watchdog pulse is not input within T1 here, Low RESE to CPU10 as watchdog pulse cycle abnormality
A T signal is output (T4).

上記のT5でタイマコンデンサTCの充電が再開された
後vToがVt、、II gc:達する前にCPU1G
より最初のウォッチドッグパルスWが微分回路14に入
力されると(T6)、微分回路14の出力(■)即ちS
−Rラッチ5RL3のS端子がハイとなり、その出力(
[相])がハイとなるため(この時、リセット完了(I
jESET信号ロー)によりR,端子(■)ロー、V?
c> V r、t tHによりR2端子(■)ローの条
件)、積分タイマ回路113のトランジスタT「lが導
通し、タイマコンデンサTCがほぼ瞬時に放電される(
積分タイマ回路113のリセット)。
After charging of the timer capacitor TC is restarted at T5 above, vTo reaches Vt, II gc: CPU1G
When the first watchdog pulse W is input to the differentiating circuit 14 (T6), the output (■) of the differentiating circuit 14, that is, S
-The S terminal of R latch 5RL3 becomes high, and its output (
[phase]) becomes high (at this time, reset completion (I
jESET signal low) causes R, terminal (■) low, V?
c> V r, t tH causes the R2 terminal (■) low condition), the transistor T of the integral timer circuit 113 becomes conductive, and the timer capacitor TC is almost instantly discharged (
(Resetting the integral timer circuit 113).

また、S−RラッチSi3のS端子がノ\イになると同
時に、先頭ウォッチドッグパルス判別回路12のS−R
ラッチS Ii:L4のS端子もノ\イになってその出
力(@)がハイになるので、タイムアツプ時間可変設定
回路13のトランジスタTr4がカプトオフされ、第1
コンパレータ111の基準電圧V rafl及び第2コ
ンパレータ112の基準電圧V r * f 2がそれ
ぞれV r @ 11 L及びvref2Lに低下する
。この時、ウォッチドッグパルスの微分波形の消滅によ
りS端子がローになってもS−RラッチS RL4の状
態は変わらない。
Also, at the same time that the S terminal of the S-R latch Si3 becomes negative, the S-R of the leading watchdog pulse discriminating circuit 12 becomes
Since the S terminal of latch S Ii:L4 also becomes negative and its output (@) becomes high, the transistor Tr4 of the time-up time variable setting circuit 13 is cut off, and the first
The reference voltage V rafl of the comparator 111 and the reference voltage V r * f 2 of the second comparator 112 decrease to V r @ 11 L and vref2L, respectively. At this time, even if the S terminal becomes low due to disappearance of the differential waveform of the watchdog pulse, the state of the S-R latch SRL4 does not change.

なお、タイムアツプ時間可変設定回路13には例えばコ
ンデンサC131よりなる遅延回路が設けられており、
先頭ウォッチドッグパルスWの入力後僅かに遅延してか
らトランジスタTr4がカットオフされるようになって
いる。これによってT6で先頭ウォッチドッグパルスW
が入力された瞬間に第2コンパレータ112の基準電圧
がVref2Lとなり、Vtc> V r、tzL ニ
よすS −R5ッfsIjLl(D出力(■)がハイと
なることによる無用の画信号出力は防止される。
Note that the time-up time variable setting circuit 13 is provided with a delay circuit consisting of a capacitor C131, for example.
The transistor Tr4 is cut off after a slight delay after the input of the first watchdog pulse W. As a result, the first watchdog pulse W at T6
At the moment when is input, the reference voltage of the second comparator 112 becomes Vref2L, and Vtc>V r, tzL NiyosuS -R5ffsIjLl (Useless image signal output due to D output (■) becoming high is prevented. be done.

タイマコンデンサTCの放電によりvTcがV r *
 (IL以下となるまで降下すると、第1コンパレータ
111の出力(■)がハイとなり、S−Rラッチ5kL
3のR2端子がハイになってその出力([相])がロー
となるため、トランジスタTr4がカットオフとなり、
タイマコンデンサTCが充電を再開する。この充電によ
ってVtc>V、、t+Lとなり、R,端子(■)は直
ぐにローとなるが、S−Rラッチ5RL3の状態は変わ
らない。以後、τ7.τ8におけるように、一つ前のウ
ォッチドッグパルスWの入力による放電後タイマコンデ
ンサTCの充電電圧vTcがV r e f□Lに達す
るまでに次のウォッチドッグパルスWが入力されるかぎ
り、積分タイマ回路113は出力回路114よりCPU
l0へn丁「信号を出力させることなく上記τ6におけ
るのと同様のリセットを繰返しつつウォッチドッグパル
ス周期監視のための計時動作を続行する。
Due to the discharge of the timer capacitor TC, vTc becomes V r *
(When the voltage drops below IL, the output (■) of the first comparator 111 becomes high, and the S-R latch 5kL
Since the R2 terminal of 3 becomes high and its output ([phase]) becomes low, the transistor Tr4 becomes cut off,
Timer capacitor TC resumes charging. Due to this charging, Vtc>V, t+L, and the R terminal (■) immediately becomes low, but the state of the S-R latch 5RL3 remains unchanged. Hereafter, τ7. As in τ8, as long as the next watchdog pulse W is input before the charging voltage vTc of the timer capacitor TC reaches V r e f L after discharging due to the input of the previous watchdog pulse W, the integral timer The circuit 113 is connected to the CPU from the output circuit 114.
To l0, the clock operation for monitoring the watchdog pulse cycle is continued while repeating the same reset as in τ6 above without outputting the signal.

即ち、τ6以後、タイムアツプ時間可変設定回路13の
トランジスタTr4のカプトオフにより、ウォッチドッ
グタイマ回路11のウォッチドッグパルス周期監視期間
Tは、タイマコンデンサTCの充電電圧V?CがV、、
、、LからVr@f2Lに達するまでのT2に切換わる
。ここで、抵抗[2,[3の直列接続によりV r−t
2■V r−tzL > V r、t +HV r−t
 tLであるから、T、>72となる。
That is, after τ6, the cut-off of the transistor Tr4 of the time-up time variable setting circuit 13 causes the watchdog pulse cycle monitoring period T of the watchdog timer circuit 11 to become equal to the charging voltage V? of the timer capacitor TC. C is V,,
,, switches to T2 from L to Vr@f2L. Here, due to the series connection of resistors [2 and [3], V r-t
2■V r-tzL > V r,t +HV r-t
Since tL, T>72.

例えばτ9における積分タイマ回路113のリセット後
T2以内にウォッチドッグパルスWが入力されず、タイ
マコンデンサTCの充電電圧VtCがV−f2Lに達す
ると(τ10)、前述のτ5の場合同様に、第2コンパ
レータ112の出力(■)がハイとなり、S−Rラッチ
5RLIの出力(■)がハイになって出力回路1!4の
トランジスタ丁r2が導通し、CPUl0ヘローの■丁
ご信号が出力される。また、タイマコンデンサTCが瞬
時に放電すると同時に、S−Rラッチ5RL4のR端子
(■)がハイになるため、その出力(@)がローとなり
、トランジスタTr4が導通して第1コンパレータii
i 、第2コンパレータ112の基準電圧はそれぞれ再
びV、、、、II。
For example, if the watchdog pulse W is not input within T2 after resetting the integral timer circuit 113 at τ9 and the charging voltage VtC of the timer capacitor TC reaches V-f2L (τ10), the second The output (■) of the comparator 112 becomes high, the output (■) of the S-R latch 5RLI becomes high, the transistor R2 of the output circuit 1!4 becomes conductive, and the CPU10 low ■ signal is output. . Also, at the same time as the timer capacitor TC is discharged instantaneously, the R terminal (■) of the S-R latch 5RL4 becomes high, so its output (@) becomes low, the transistor Tr4 conducts, and the first comparator ii
i, the reference voltage of the second comparator 112 is again V, , , II.

Vrmt2”となるo 1:HテV1cがV、、lIH
以T4−c降下することによ、す■ηテ信号がハイとな
り(リセット完了)、タイマコンデンサTCの充電が再
開されるが、この時のウォッチドッグタイマ回路11の
監視期間Tはリセット直後であるからT、となる。
Vrmt2'' becomes o 1:HteV1c is V, , lIH
As the T4-c drops, the S - η signal goes high (reset is completed) and charging of the timer capacitor TC is restarted, but the monitoring period T of the watchdog timer circuit 11 at this time is immediately after the reset. Because there is, it becomes T.

そして、τ1□でCPUl0よりリセット後最初のウォ
ッチドッグパルス(先頭ウォッチドッグパルス)Wが入
力されると、監視期間が再度T2に切換えられ、前述の
τ6以後と全(同様の動作が繰返される。このような動
作の過程で、例えばτ、。
Then, when the first watchdog pulse (first watchdog pulse) W after reset is inputted from the CPU 10 at τ1□, the monitoring period is switched to T2 again, and all (the same operations as after τ6) are repeated. In the course of such an operation, for example τ,.

におけるように、安定化電源電圧V11.がV r e
 f 3以下に下がると、電源電圧監視回路15のコン
パレータtStの出力(■)がハイになってτ。以前の
状態に戻り、RES ET信号出力はローとなる。安定
化電源電圧V r * *が正常に復帰すれば(τ14
)、前述のτ。以後の動作が繰返される。
As in, the stabilized power supply voltage V11. is V r e
When f falls below 3, the output (■) of the comparator tSt of the power supply voltage monitoring circuit 15 becomes high and becomes τ. Returning to the previous state, the RESET signal output goes low. If the stabilized power supply voltage V r * * returns to normal (τ14
), the aforementioned τ. The subsequent operations are repeated.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明したように、この発明のウォッチドッグ
タイマ回路は、マイクロコンピュータがリセットされた
後最初に出力される先頭ウォッチドッグパルスに対する
周期監視期間T、をそれ以外のウォッチドッグパルスに
対する監視期間T2よりも長く設定されるよう、にした
ため、マイクロコンピュータのプログラムを複雑化する
ことな(また異常検出感度を犠牲にすることな(、ウォ
ッチドッグパルス異常に対する厳格な監視能力を確保す
ることができ、従って、ウォッチドッグタイマ回路を用
いたマイクロコンピュータの性能、信頼性の向上に少な
からず貢献し得るものである。
As described above in detail, the watchdog timer circuit of the present invention has a cycle monitoring period T for the first watchdog pulse output after the microcomputer is reset, and a monitoring period T2 for other watchdog pulses. This allows the watchdog pulse to be set for a longer period of time without complicating the microcomputer program (and without sacrificing abnormality detection sensitivity), ensuring strict monitoring ability for watchdog pulse abnormalities. Therefore, it can contribute to improving the performance and reliability of microcomputers using watchdog timer circuits.

【図面の簡単な説明】 第1図はこの発明のウォッチドッグタイマ回路の一実施
例の基本的構成を示すブロック図、第2図はその動作を
説明するためのタイミング図、第3図は第1図の実施例
の要部における具体的回路構成の一例を示すブロック図
、第4図はその動作を説明するためのタイミング図であ
る。 0・・・・マイクロコンピュータ、 ■・・・・ウォッチドッグタイマ回路、2・・・・先頭
ウォッチドッグパルス判別回路、3・・・・タイムアツ
プ時間可変設定回路、4・・・・微分回路、 5・・・・電源電圧監視回路、 111・・・第1コンパレータ、 112・・・第2コンパレータ、 113・・・積分タイマ回路、l14・・・出力回路、
TC・・・ タイマコンデンサ。 同
[Brief Description of the Drawings] Fig. 1 is a block diagram showing the basic configuration of an embodiment of the watchdog timer circuit of the present invention, Fig. 2 is a timing diagram for explaining its operation, and Fig. 3 is a block diagram showing the basic configuration of an embodiment of the watchdog timer circuit of the present invention. FIG. 4 is a block diagram showing an example of a specific circuit configuration of the main part of the embodiment shown in FIG. 1, and FIG. 4 is a timing diagram for explaining its operation. 0...Microcomputer, ■...Watchdog timer circuit, 2...Top watchdog pulse discrimination circuit, 3...Time-up time variable setting circuit, 4...Differentiating circuit, 5 ...Power supply voltage monitoring circuit, 111...First comparator, 112...Second comparator, 113... Integral timer circuit, l14... Output circuit,
TC... Timer capacitor. same

Claims (2)

【特許請求の範囲】[Claims] (1)正常に動作中のマイクロコンピュータから所定の
最大周期T_0以下の周期で入力されるウォッチドッグ
パルスによりリセットされると共に、リセット後上記最
大周期T_0より長い設定タイムアップ時間(監視期間
)Tを経過しても次のウォッチドッグパルスが入力され
ない時は、ウォッチドッグパルス周期異常としてマイク
ロコンピュータにリセット信号を出力するウォッチドッ
グタイマ回路において、上記タイムアップ時間を、マイ
クロコンピュータがリセットされた後最初に出力される
ウォッチドッグパルス(先頭ウォッチドッグパルス)に
ついてはT=T_1とし、それ以後のウォッチドッグパ
ルスについてはT=T_2として、T_1>T_2の関
係に設定するようにしたことを特徴とするウォッチドッ
グタイマ回路。
(1) It is reset by a watchdog pulse inputted from a normally operating microcomputer at a cycle less than or equal to a predetermined maximum cycle T_0, and after reset, a set time-up time (monitoring period) T longer than the maximum cycle T_0 is set. If the next watchdog pulse is not input even after the elapse of time, the watchdog timer circuit outputs a reset signal to the microcomputer as a watchdog pulse cycle error. A watchdog characterized in that the outputted watchdog pulse (first watchdog pulse) is set as T=T_1, and the subsequent watchdog pulses are set as T=T_2, so that the relationship of T_1>T_2 is established. timer circuit.
(2)前記先頭ウォッチドッグパルスとこれ以外のウォ
ッチドッグパルスとを判別する先頭ウォッチドッグパル
ス判別回路と、この先頭ウォッチドッグパルス判別回路
の出力に応動して前記ウォッチドッグタイマ回路のタイ
ムアップ時間TをT=T_1またはT=T_2のいずれ
かに可変設定するタイムアップ時間可変設定回路とを具
備したことを特徴とする請求項1記載のウォッチドッグ
タイマ回路。
(2) A leading watchdog pulse discrimination circuit that discriminates between the leading watchdog pulse and other watchdog pulses, and a time-up time T of the watchdog timer circuit in response to the output of this leading watchdog pulse discrimination circuit. 2. The watchdog timer circuit according to claim 1, further comprising a variable time-up time setting circuit for variably setting T=T_1 or T=T_2.
JP63157278A 1988-06-25 1988-06-25 Watch dog timer circuit Pending JPH027135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63157278A JPH027135A (en) 1988-06-25 1988-06-25 Watch dog timer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63157278A JPH027135A (en) 1988-06-25 1988-06-25 Watch dog timer circuit

Publications (1)

Publication Number Publication Date
JPH027135A true JPH027135A (en) 1990-01-11

Family

ID=15646161

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63157278A Pending JPH027135A (en) 1988-06-25 1988-06-25 Watch dog timer circuit

Country Status (1)

Country Link
JP (1) JPH027135A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0573363A (en) * 1991-09-17 1993-03-26 Honda Motor Co Ltd Watchdog timer device
JP2015215743A (en) * 2014-05-09 2015-12-03 株式会社デンソー Electronic control unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0573363A (en) * 1991-09-17 1993-03-26 Honda Motor Co Ltd Watchdog timer device
JP2015215743A (en) * 2014-05-09 2015-12-03 株式会社デンソー Electronic control unit

Similar Documents

Publication Publication Date Title
JP2753592B2 (en) 2-wire instrument
EP2376994B1 (en) Autonomous multi-device event synchronization and sequencing technique eliminating master and slave assignments
JPH0659769A (en) Clock generating circuit of digital computer and method therefor
JP3523225B2 (en) Clock monitoring apparatus and monitoring method
JPH027135A (en) Watch dog timer circuit
KR970004098B1 (en) Timer circuit having comparator comparing contents of counter and register
US6657501B1 (en) Instantaneous start up oscillator
JP2773546B2 (en) Pulse generation circuit
WO1997032282A1 (en) A watchdog circuit employing minimum and maximum interval detectors
US6731708B1 (en) Clock signal control device
JP2556156B2 (en) In-vehicle control device microcomputer runaway monitoring device
KR100302496B1 (en) Automatic initialization of central processing unit
US6177821B1 (en) Microcomputer with frequency multiplication circuit
JP2544224Y2 (en) Microcomputer time constant setting circuit
JPH0792793B2 (en) Micro computer
JPS5952324A (en) Detecting circuit for service interruption and its recovery
JP2653654B2 (en) Computer system runaway monitoring device
JPH07102275B2 (en) Washing machine operation control device
SU1358063A1 (en) Digital phase-frequency comparator
JP2555725Y2 (en) Digital relay
CA2112316A1 (en) Reset circuit
SU1399744A1 (en) Redundancy pulse shaper
JPH0749422Y2 (en) Voltage monitoring circuit
JPH021614Y2 (en)
JP3144811B2 (en) Monitoring timer circuit