JPH10228397A - Watchdog timer - Google Patents

Watchdog timer

Info

Publication number
JPH10228397A
JPH10228397A JP9029103A JP2910397A JPH10228397A JP H10228397 A JPH10228397 A JP H10228397A JP 9029103 A JP9029103 A JP 9029103A JP 2910397 A JP2910397 A JP 2910397A JP H10228397 A JPH10228397 A JP H10228397A
Authority
JP
Japan
Prior art keywords
watchdog timer
counter
time
timeout
signal
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
JP9029103A
Other languages
Japanese (ja)
Inventor
Masao Inoue
昌男 井上
Hirotaka Shikada
洋孝 鹿田
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.)
NEC Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP9029103A priority Critical patent/JPH10228397A/en
Publication of JPH10228397A publication Critical patent/JPH10228397A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain a watchdog timer possible to freely set up the time up to time-out from the external and can be stopped from the external. SOLUTION: When a PRT input and an EN input are at high levels, a counter 1 to be an 8-bit counter is returned to '0' after counting up 0 to 255. When 8Eh is set up in a time-out value setting latch 2, a WDT time-out signal is outputted from a comparator 3 when the counter 1 becomes 8Eh. When 00h is set up in the latch 2, a decoder 5 outputs a low level independently of the state of a WDT stop input terminal 4 and stops the counter 1. When the terminal 4 is connected to a low level in order to execute the debugging or the like of a program, the counter 1 can be stopped independently of the output of the decoder 5.

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, and more particularly to a watchdog timer with a software stop function for monitoring runaway of a CPU.

【0002】[0002]

【従来の技術】ウオッチドッグタイマ(WDT)は、ク
ロックを計数して時間経過を監視する一種のタイマで、
コンピュータプログラムが正常に動作しておれば、CP
Uはプログラムリセット信号(PRT)を発生し、例え
ば5.12秒ごとにウオッチドッグタイマをリセットす
る。CPUが停止、あるいは暴走等の異常状態になると
プログラムリセット信号(PRT)が発生しないので、
ウオッチドッグタイマは計数を続け、例えば7.68秒
が経過するとタイムアウトとなりCPUの異常を警報す
る。
2. Description of the Related Art A watchdog timer (WDT) is a type of timer that counts clocks and monitors the passage of time.
If the computer program is running properly,
U generates a program reset signal (PRT) and resets the watchdog timer, for example, every 5.12 seconds. If the CPU stops or goes into an abnormal state such as runaway, the program reset signal (PRT) is not generated.
The watchdog timer keeps counting and, for example, when 7.68 seconds elapse, a timeout occurs and an alarm is issued for the CPU abnormality.

【0003】今日、CPUはあらゆるシステムや制御手
段の中枢にあり、その停止、暴走等の異常状態をウオッ
チする時間間隔も、システムや制御の目的に応じて異な
っている。そこで、各種CPU制御システムの多様な時
間間隔をウオッチする必要が生じる。
[0003] Today, the CPU is at the center of all systems and control means, and the time intervals for monitoring abnormal conditions such as stoppage and runaway also differ depending on the purpose of the system and control. Therefore, it is necessary to watch various time intervals of various CPU control systems.

【0004】特開平5−61725号公報には図3に示
すようなウオッチドッグタイマ回路が提案されている。
図3において、入力の時間情報Tを計数情報CDに変換
するデコーダ11と、デコーダ11の計数情報CDに従
って対応する時間を計数するタイマ回路12とを備え、
外部より時間情報Tを設定可能に構成する。好ましく
は、計数情報CDは、カウンタ回路に対するプリセット
数情報または分周回路に対する分周数情報である。
Japanese Patent Laid-Open Publication No. Hei 5-61725 proposes a watchdog timer circuit as shown in FIG.
3, a decoder 11 for converting input time information T into count information CD, and a timer circuit 12 for counting a corresponding time according to the count information CD of the decoder 11 are provided.
The time information T can be set from outside. Preferably, the count information CD is preset number information for a counter circuit or frequency division number information for a frequency division circuit.

【0005】プログラムリセット信号(PRT)が来な
い場合、タイマ回路12は計数情報CDにより定められ
る数(時間経過)までクロックを計数して、タイムアウ
ト情報(CPU警報)を出す。
When the program reset signal (PRT) does not arrive, the timer circuit 12 counts clocks up to the number (time elapsed) determined by the count information CD and issues time-out information (CPU alarm).

【0006】[0006]

【発明が解決しようとする課題】例えばソフトウエア
(プログラム)のデバグ中など、ウオッチドッグタイマ
を停止させる必要が生じる。特開平5−61725号公
報記載の提案の場合、タイムアウトまでの時間経過は自
由に外部から設定できるが、ウオッチドッグタイマを停
止させることはできない問題が残る。
For example, during debugging of software (program), it is necessary to stop the watchdog timer. In the case of the proposal described in Japanese Patent Application Laid-Open No. Hei 5-61725, the elapse of time until timeout can be freely set from the outside, but there remains a problem that the watchdog timer cannot be stopped.

【0007】本発明の目的は、タイムアウトまでの時間
経過は自由に外部から設定できるとともに、外部から停
止可能なウオッチドッグタイマを提供することである。
[0007] It is an object of the present invention to provide a watchdog timer in which the time elapsed until timeout can be set freely from the outside and can be stopped from the outside.

【0008】[0008]

【課題を解決するための手段】本発明によるCPUの暴
走等の異常を監視し、コンピュータプログラムが正常に
動作しているときはプログラムリセット信号によるリセ
ット動作を受け、あらかじめ定められたタイムアウト値
に達すると警報信号であるタイムアウト信号を出力する
クロックのカウンタ回路を有するウオッチドッグタイマ
は、外部からデータを入力することによって前記タイム
アウト値を設定するタイムアウト値設定手段と、前記カ
ウンタ回路を停止させるカウント停止手段とを含むこと
を特徴とする。
According to the present invention, an abnormality such as a runaway of a CPU according to the present invention is monitored, and when a computer program is operating normally, a reset operation is performed by a program reset signal and a predetermined timeout value is reached. Then, a watchdog timer having a clock counter circuit for outputting a time-out signal as an alarm signal is provided with a time-out value setting means for setting the time-out value by externally inputting data, and a count stopping means for stopping the counter circuit. And characterized in that:

【0009】また、前記カウント停止手段が、特定のデ
ータを前記タイムアウト値設定手段に入力する特定デー
タ入力手段を含むことを特徴とする。
Further, the count stop means includes a specific data input means for inputting specific data to the timeout value setting means.

【0010】さらに、前記カウント停止手段が、前記カ
ウント回路のイネーブル端子に強制的にローレベルを与
える端子接地手段を含むことを特徴とする。
Further, the count stop means includes a terminal ground means for forcibly applying a low level to an enable terminal of the count circuit.

【0011】本発明の作用は次の通りである。タイムア
ウト値(タイムアウトまでの時間経過)設定ラッチを設
けるとともに、タイマ回路(カウンタ)に外部からのウ
オッチドッグタイマ停止入力端子を設ける。
The operation of the present invention is as follows. A time-out value (elapsed time until time-out) setting latch is provided, and an external watchdog timer stop input terminal is provided in the timer circuit (counter).

【0012】[0012]

【発明の実施の形態】以下に、本発明の実施例について
図面を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0013】図1は本発明によるウオッチドッグタイマ
の実施例の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment of a watchdog timer according to the present invention.

【0014】図1において、本発明によるウオッチドッ
グタイマは、PST(プログラムリセット)入力がロー
レベルになるとリセットされ、EN(イネーブル)端子
がローレベル(接地)になるとカウントを停止する、C
LK(クロック)を計数する例えば8ビットのカウンタ
1、CLR(クリア)入力がローレベルになると出力が
すべてハイ(ffh )に設定され、ラッチ信号がローレ
ベルのときCLK入力の立ち上がりで、例えば8ビット
のタイムアウトデータ(外部からのタイムアウト希望値
を設定しようとするデータ)を、ラッチする例えば8ビ
ットのラッチ素子であるタイムアウト値設定ラッチ2、
カウンタ1の出力とタイムアウト値設定ラッチ2の出力
を比較し、両者が等しい期間ハイレベルを出力する比較
器3、タイムアウト値設定ラッチ2の出力の例えば8ビ
ットのデータが、00h のときにのみローレベルを出力
するデコーダ5で構成される。
In FIG. 1, a watchdog timer according to the present invention is reset when a PST (program reset) input goes low, and stops counting when an EN (enable) terminal goes low (ground).
For example, an 8-bit counter 1 for counting LK (clock), when the CLR (clear) input goes low, the outputs are all set to high (ffh). Timeout value setting latch 2, which is, for example, an 8-bit latch element, for latching bit timeout data (data for setting a desired timeout value from the outside);
The comparator 3 compares the output of the counter 1 with the output of the timeout value setting latch 2 and outputs a high level during a period in which both are equal. The decoder 5 outputs a level.

【0015】本発明の実施例の動作は、PRT入力及び
EN入力をハイレベル(ノンアクティブ)とすると、カ
ウンタ1は入力されるCLKにより、カウントアップし
ていく。カウンタ1は、例えば8ビットカウンタである
とすると0〜255(ffh)までカウントアップした
後0に戻る。
In the operation of the embodiment of the present invention, when the PRT input and the EN input are set to a high level (non-active), the counter 1 counts up by the input CLK. If the counter 1 is, for example, an 8-bit counter, the counter 1 counts up from 0 to 255 (ffh) and returns to 0.

【0016】今、タイムアウト値設定ラッチ2に255
(ffh )が設定されていた場合、カウンタ1が255
になったときにタイムアウト値設定ラッチ2とカウンタ
1の出力が一致し、比較器3より1CLK分の幅のハイ
レベルのパルス(WDTタイムアウト信号)が出力され
る。この場合、PRT信号がハイレベルになってから、
WDTタイムアウト信号が出力されるまでの時間間隔
は、CLK周波数を例えば8MHzとすると、約32μ
sとなる。
Now, 255 is set in the timeout value setting latch 2.
If (ffh) is set, the counter 1 is set to 255
, The output of the timeout value setting latch 2 matches the output of the counter 1, and the comparator 3 outputs a high-level pulse (WDT timeout signal) having a width of 1 CLK. In this case, after the PRT signal becomes high level,
The time interval until the WDT timeout signal is output is about 32 μm when the CLK frequency is, for example, 8 MHz.
s.

【0017】また、例えばタイムアウト設定ラッチ2に
8Eh を設定すると、図2(a)のタイミングチャート
に示すように、カウンタ1が8Eh までカウントした時
点で、WDTタイムアウト信号が出力される。この場
合、PRT信号がハイレベルになってから、WDTタイ
ムアウト信号が出力されるまでの時間間隔は、CLK周
波数を例えば8MHzとすると、約17.75μsとな
る。
If 8Eh is set in the timeout setting latch 2, for example, as shown in the timing chart of FIG. 2A, the WDT timeout signal is output when the counter 1 counts up to 8Eh. In this case, the time interval from when the PRT signal goes high to when the WDT timeout signal is output is about 17.75 μs when the CLK frequency is 8 MHz, for example.

【0018】さらに、タイムアウト設定ラッチに00h
を設定すると、デコーダ5はローレベルを出力する。A
NDゲート6は負論理で考えるとOR回路となるので、
WDT停止入力端子4の状態に関わらず、ローレベルを
出力してカウンタ1を停止させる。この状態は、タイム
アウト設定ラッチ2のラッチされた値を更新するまで保
持される。このときのタイミングチャートを図2(b)
に示す。
Further, 00h is set in the timeout setting latch.
Is set, the decoder 5 outputs a low level. A
Since the ND gate 6 becomes an OR circuit when considered with negative logic,
Regardless of the state of the WDT stop input terminal 4, the counter 1 is stopped by outputting a low level. This state is maintained until the value latched in the timeout setting latch 2 is updated. The timing chart at this time is shown in FIG.
Shown in

【0019】さらにまた、例えばプログラム(ソフトウ
エア)のデバグ等の目的の場合、WDT停止入力端子4
をローレベル(接地)に接続すると、同様にデコーダ5
の出力の如何に関わらず、カウンタ1を停止させること
ができる。
Further, for the purpose of, for example, debugging a program (software), the WDT stop input terminal 4
Is connected to a low level (ground), the decoder 5
, The counter 1 can be stopped.

【0020】[0020]

【発明の効果】以上説明したように本発明は、タイムア
ウトデータとして特定値(例えば、00h )を与える
か、WDT停止入力端子にローレベル(接地)を与える
ことによって、ウオッチドッグタイマの主体をなすカウ
ンタを停止させ、WDTタイムアウト信号の発生を防ぎ
ながら、プログラム(ソフトウエア)のデバグ等の作業
を可能とする効果がある。
As described above, according to the present invention, a watchdog timer is formed by giving a specific value (for example, 00h) as timeout data or by giving a low level (ground) to a WDT stop input terminal. There is an effect that the operation of debugging a program (software) can be performed while stopping the counter and preventing generation of a WDT timeout signal.

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

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】本発明の実施例のタイミングチャートである。FIG. 2 is a timing chart of the embodiment of the present invention.

【図3】従来のウオッチドッグタイマの一例のブロック
図である。
FIG. 3 is a block diagram illustrating an example of a conventional watchdog timer.

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

1 カウンタ 2 タイムアウト値設定ラッチ 3 比較器 4 WDT停止入力端子 5 デコーダ 6 ANDゲート DESCRIPTION OF SYMBOLS 1 Counter 2 Timeout value setting latch 3 Comparator 4 WDT stop input terminal 5 Decoder 6 AND gate

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 CPUの暴走等の異常を監視し、コンピ
ュータプログラムが正常に動作しているときはプログラ
ムリセット信号によるリセット動作を受け、あらかじめ
定められたタイムアウト値に達すると警報信号であるタ
イムアウト信号を出力するクロックのカウンタ回路を有
するウオッチドッグタイマであって、外部からデータを
入力することによって前記タイムアウト値を設定するタ
イムアウト値設定手段と、前記カウンタ回路を停止させ
るカウント停止手段とを含むことを特徴とするウオッチ
ドッグタイマ。
An abnormal condition such as a runaway of a CPU is monitored. When a computer program is operating normally, a reset operation by a program reset signal is received. When a predetermined timeout value is reached, a timeout signal as an alarm signal is issued. A watchdog timer having a clock counter circuit that outputs a clock signal, comprising: a timeout value setting unit configured to set the timeout value by inputting data from outside; and a count stop unit configured to stop the counter circuit. Features a watchdog timer.
【請求項2】 前記カウント停止手段が、特定のデータ
を前記タイムアウト値設定手段に入力する特定データ入
力手段を含むことを特徴とする請求項1記載のウオッチ
ドッグタイマ。
2. The watchdog timer according to claim 1, wherein said counting stop means includes specific data input means for inputting specific data to said timeout value setting means.
【請求項3】 前記カウント停止手段が、前記カウント
回路のイネーブル端子に強制的にローレベルを与える端
子接地手段を含むことを特徴とする請求項2記載のウオ
ッチドッグタイマ。
3. The watchdog timer according to claim 2, wherein said count stop means includes a terminal grounding means for forcibly applying a low level to an enable terminal of said count circuit.
JP9029103A 1997-02-13 1997-02-13 Watchdog timer Withdrawn JPH10228397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9029103A JPH10228397A (en) 1997-02-13 1997-02-13 Watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9029103A JPH10228397A (en) 1997-02-13 1997-02-13 Watchdog timer

Publications (1)

Publication Number Publication Date
JPH10228397A true JPH10228397A (en) 1998-08-25

Family

ID=12267017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9029103A Withdrawn JPH10228397A (en) 1997-02-13 1997-02-13 Watchdog timer

Country Status (1)

Country Link
JP (1) JPH10228397A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009238233A (en) * 2000-12-28 2009-10-15 Coroware Inc Versatile robot control system
JP2018126617A (en) * 2018-05-24 2018-08-16 株式会社三共 Game machine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009238233A (en) * 2000-12-28 2009-10-15 Coroware Inc Versatile robot control system
US8761932B2 (en) 2000-12-28 2014-06-24 C.H.I. Development Mgmt. Ltd. Xxiv, Llc Automation equipment control system
JP2018126617A (en) * 2018-05-24 2018-08-16 株式会社三共 Game machine

Similar Documents

Publication Publication Date Title
US5848281A (en) Method and apparatus for powder management in a multifunction controller with an embedded microprocessor
US20040003027A1 (en) Debug interface for an event timer apparatus
US20160335149A1 (en) Peripheral Watchdog Timer
JP2593915B2 (en) Double microcomputer system runaway prevention circuit
US6996732B2 (en) Method of and apparatus for achieving “watch dog” functions in microcontrollers and microcomputers and the like, required to shut down for extended periods of time for energy-conservation purposes
JPH10228397A (en) Watchdog timer
US7475295B2 (en) Intelligent watchdog circuit
JPH11259340A (en) Reactivation control circuit for computer
GB2310514A (en) Watchdog circuit
US11764771B2 (en) Event detection control device and method for circuit system controlled by pulse wave modulation signal
JPS60132221A (en) Abnormality detecting method of clock pulse
JP2698260B2 (en) Watchdog timer device
CN114696809A (en) Signal generation circuit and operating system
JP2000035903A (en) Runaway monitoring device for microcomputer
JPS622685Y2 (en)
JPH0215320A (en) Clock mechanism control system
JPS60262252A (en) Monitor system for runaway of microprocessor
JP2853342B2 (en) Abnormal oscillation detection circuit
JPS61109127A (en) Timer counter
US20030149868A1 (en) Method and circuit arrangement for monitoring the operation of a processor
JPH0973404A (en) Watchdog timer circuit
SU1693609A1 (en) Device for program execution time check
JPH03105514A (en) Detecting/resetting circuit for cut-off of power supply
JP3144811B2 (en) Monitoring timer circuit
JPH0520129A (en) Microprocessor monitoring system

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: 20040511