JPS62296247A - Watch dog timer - Google Patents
Watch dog timerInfo
- Publication number
- JPS62296247A JPS62296247A JP61140557A JP14055786A JPS62296247A JP S62296247 A JPS62296247 A JP S62296247A JP 61140557 A JP61140557 A JP 61140557A JP 14055786 A JP14055786 A JP 14055786A JP S62296247 A JPS62296247 A JP S62296247A
- Authority
- JP
- Japan
- Prior art keywords
- data
- count
- timer
- register
- generates
- 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
Links
- 241000238876 Acari Species 0.000 abstract 1
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】
3、発明の詳細な説明
〔産業上の利用分野〕
本発明は、マイクロコンピュータの暴走検出を行うウォ
ッチドッグ・タイマに関する。Detailed Description of the Invention 3. Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a watchdog timer for detecting runaway of a microcomputer.
〔従来の技術)
従来、マイクロコンピュータの暴走検出手段として、ソ
フトウェアではカウント値のクリアのみ可能で停止させ
ることのできないタイマを用いる方法がある。この夕・
イマをウォッチドッグ・タイマと呼んでいる。[Prior Art] Conventionally, as a means for detecting runaway of a microcomputer, there is a method of using a timer whose count value can only be cleared and cannot be stopped using software. This evening...
I now call it the watchdog timer.
ウォッチドッグ・タイマを用いた暴走検出は、ウォッチ
ドッグ・タイマのカラン(・値がオーバー・フローする
以前にカウント値がクリアされるようにプログラミング
しておき、もしプログラムが 。Runaway detection using a watchdog timer is possible by programming the watchdog timer so that the count value is cleared before it overflows.
暴走した場合にはウォッチドッグ・タイマのクリアの操
作が一定時間以上行われないためウォッチドッグ・タイ
マがオーバーフローして割込みを発生させ、その割込み
により暴走を検出することによって行っている。In the event of a runaway, the watchdog timer is not cleared for a certain period of time, so the watchdog timer overflows and generates an interrupt, and this interrupt is used to detect the runaway.
上述した従来のウォッチドッグ・タイマは、ウォッチド
ッグ・クリア命令が、特定の一命令であったり、あるい
は一般的なデータ書き込み命令の流用であるなめ、プロ
グラムの暴走により、偶然に上記のような命令の自分コ
ードが発生した場合にはウォッチドッグ・タイマのカウ
ント・クリアが誤って行われるので、暴走検出機能が全
く果たせなくなるという問題点がある。In the conventional watchdog timer described above, the watchdog clear instruction is a specific instruction or a general data write instruction, and the above instruction is accidentally generated due to program runaway. If the own code occurs, the watchdog timer is erroneously counted and cleared, so there is a problem that the runaway detection function cannot be performed at all.
本発明のウォッチドッグ・タイマは、カウント値のオー
バー・フローにより割込み要求を発生するタイマと、デ
ータの保持を行うしジスタと、このレジスタの保持デー
タと中央処理装置から送られるデータとの一致を検出し
たとき、上記タイマのカウント・クリアを行いかつ上記
レジスタのデータを変更するカウント・クリア信号を発
生するコンパレータとを有している。The watchdog timer of the present invention includes a timer that generates an interrupt request when the count value overflows, a register that holds data, and a register that checks whether the data held in this register matches the data sent from the central processing unit. and a comparator that generates a count/clear signal that, when detected, counts and clears the timer and changes the data in the register.
次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は本発明の一実施例のプロ・ツク図である。FIG. 1 is a block diagram of one embodiment of the present invention.
タイマ1は時を刻んでおり、そのカラン1〜値がオーバ
ー・20−すると割込み要求信号2を発生する。コンパ
レータ3は中央処理装置4がら送られてくるデータとレ
ジスタ5の保持データを比較し、両データが一致したと
きカラン1〜・クリア信号6を発生する。カウント・ク
リア信号6によりタイマlのカウント値はクリアされ、
またレジスタ5の保持データが変更される。Timer 1 is keeping time, and when the count 1 to 20 exceeds 20, it generates an interrupt request signal 2. The comparator 3 compares the data sent from the central processing unit 4 with the data held in the register 5, and generates a clear signal 6 when both data match. The count value of timer l is cleared by count clear signal 6,
Also, the data held in register 5 is changed.
以上の構成により、タイマ1は中央処理装置4からレジ
スタ5と等しいデータがコンパレータ3に転送されたと
きのみカランI・・クリアされる。With the above configuration, the timer 1 is cleared only when data equal to the register 5 is transferred from the central processing unit 4 to the comparator 3.
また、クリアされる毎にレジスタ5の保持データは変更
される。Furthermore, the data held in the register 5 is changed each time it is cleared.
レジスタ5の保持データは、たとえば“0”と“1”と
が交互に入れ替るように変換されてもよいし、2ビツト
構成のカウント値であってもよい。The data held in the register 5 may be converted so that, for example, "0" and "1" are alternately exchanged, or may be a 2-bit count value.
中央処理装置4は、レジスタ5における保持データのこ
のような変更を認識しているので、一定の時間ごとにそ
の変更に従ったデータをコンパレータ3に送出する。Since the central processing unit 4 recognizes this change in the data held in the register 5, it sends data according to the change to the comparator 3 at regular intervals.
プログラムが正常に実行されている場合には、コンパレ
ータ3においては、このデータとレジスタ5の保持デー
タとが一致するためカウント・クリア信号6を発生し、
タイマ1はオーバー・フロー前にクリアされるので、割
込み要求信号2を発生しない。When the program is executed normally, the comparator 3 generates a count clear signal 6 because this data matches the data held in the register 5.
Since timer 1 is cleared before overflow, it does not generate interrupt request signal 2.
プログラムの暴走が起れば、中央処理装置4は一般には
レジスタ5の保持データと同値のデータを送出しなくな
り、タイマlは割込み要求信号2を発生し、これにより
プログラムの暴走を検出することができる。If a runaway program occurs, the central processing unit 4 generally does not send out the same data as the data held in the register 5, and the timer l generates an interrupt request signal 2, which makes it possible to detect the program runaway. can.
しかしながら、中央処理装置4は暴走中であっても偶然
に、正値をコンパレータ3に送出することはあり得るこ
とである。このような偶然の一致を回避するため、レジ
スタ5の保持データを次々に変更するようにした。その
結果、中央処理装置4が正値な送出するには、この変更
に追随しなければならなくなるが、このことはプログラ
ム暴走中においては困難である。However, even if the central processing unit 4 is running out of control, it is possible that the central processing unit 4 may accidentally send a positive value to the comparator 3. In order to avoid such a coincidence, the data held in the register 5 is changed one after another. As a result, in order for the central processing unit 4 to send out a positive value, it must follow this change, but this is difficult during a runaway program.
以上説明したように本発明は、ある特定データの書き込
みによりウォッチドッグ・タイマのカラン・ト値がクリ
アされるようにし、かつクリアされるごとにその特定デ
ータが変更されるようにすることにより、プログラムの
暴走により誤ってウォッチドッグ・タイマのカウント・
クリアが行われる確率を大幅に低減化できるという効果
がある。As explained above, the present invention clears the current value of the watchdog timer by writing certain specific data, and changes the specific data each time it is cleared. The watchdog timer may be incorrectly counted due to a runaway program.
This has the effect of greatly reducing the probability of clearing.
第1図は、本発明の一実施例をブロック図である。
1・・・・・・タイマ、2・・・・・・割込み要求信号
、3・・・・・・コンパレータ、4・・・・・・中央処
理装置、5・・・・・・レジスタ、6・・・・・・カウ
ント・クリア信号。FIG. 1 is a block diagram of an embodiment of the present invention. 1...Timer, 2...Interrupt request signal, 3...Comparator, 4...Central processing unit, 5...Register, 6 ...Count/clear signal.
Claims (1)
するタイマと、データの保持を行うレジスタと、該レジ
スタの保持データと中央処理装置から送られるデータと
の一致を検出したとき前記タイマのカウント・クリアを
行いかつ前記レジスタのデータを変更するカウント・ク
リア信号を発生するコンパレータとを有することを特徴
とするウォッチドッグ・タイマ。A timer that generates an interrupt request due to an overflow of the count value, a register that holds data, and clearing the count of the timer when a match is detected between the data held in the register and the data sent from the central processing unit. and a comparator that generates a count/clear signal that changes data in the register.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61140557A JPS62296247A (en) | 1986-06-16 | 1986-06-16 | Watch dog timer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61140557A JPS62296247A (en) | 1986-06-16 | 1986-06-16 | Watch dog timer |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS62296247A true JPS62296247A (en) | 1987-12-23 |
Family
ID=15271449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61140557A Pending JPS62296247A (en) | 1986-06-16 | 1986-06-16 | Watch dog timer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS62296247A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05274189A (en) * | 1991-12-17 | 1993-10-22 | Siemens Ag | Monitor and protection circuit device for controller |
-
1986
- 1986-06-16 JP JP61140557A patent/JPS62296247A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05274189A (en) * | 1991-12-17 | 1993-10-22 | Siemens Ag | Monitor and protection circuit device for controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS63238630A (en) | Interruption controller for microprocessor | |
JPS62296247A (en) | Watch dog timer | |
JPS6240735B2 (en) | ||
JPH0675819A (en) | Microprocessor | |
SU1084795A1 (en) | Interruption device | |
JPH01154258A (en) | Malfunction detecting device using watchdog timer | |
JPS6148178B2 (en) | ||
JPS6051141B2 (en) | Program runaway detection method | |
JPH04182842A (en) | Timer monitor system | |
SU1218385A1 (en) | Device for interrupting redundant computer system | |
JPH0778123A (en) | I/o interruption processing system | |
JPH02297629A (en) | Microcomputer | |
JPH053016B2 (en) | ||
JPH03156659A (en) | Direct memory access controller | |
JPH02171909A (en) | Reset system for microprocessor | |
JPH04130933A (en) | Device for initializing watchdog timer | |
JPH10161908A (en) | Detection of run-away of microcomputer | |
JPS6320633A (en) | Information processor | |
JPH0330030A (en) | Program runaway detecting method | |
JPS6376053A (en) | Multicomputer equipment | |
JPH0469755A (en) | Information processor | |
JPH10161887A (en) | Method and device for interruption signal synchronization | |
JPH04199207A (en) | Clock correcting system | |
JPS6167150A (en) | Runaway detector of microcomputer | |
JPS62241043A (en) | History information collecting device |