JPH0573360A - Watchdog timer - Google Patents

Watchdog timer

Info

Publication number
JPH0573360A
JPH0573360A JP3235779A JP23577991A JPH0573360A JP H0573360 A JPH0573360 A JP H0573360A JP 3235779 A JP3235779 A JP 3235779A JP 23577991 A JP23577991 A JP 23577991A JP H0573360 A JPH0573360 A JP H0573360A
Authority
JP
Japan
Prior art keywords
watchdog timer
signal
clock
microcomputer
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.)
Granted
Application number
JP3235779A
Other languages
Japanese (ja)
Other versions
JP2734243B2 (en
Inventor
Toshihiro Noma
敏弘 野間
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP3235779A priority Critical patent/JP2734243B2/en
Publication of JPH0573360A publication Critical patent/JPH0573360A/en
Application granted granted Critical
Publication of JP2734243B2 publication Critical patent/JP2734243B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the reliability for the fault detecting operations of a watchdog timer which detects the fault detecting operations of a microcomputer. CONSTITUTION:A means containing a switching circuit 108 is provided to input an external clock phiO which is never affected by a system clock phiI of a microcomputer 103 as a count clock phiW to be applied to a counter 104. Thus a watchdog timer 101 can carry out the normal operation even if the microcomputer 103 has a fault owing to its clock phiI. Thus the reliability is improved to the fault detecting operations of the timer 101.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はウォッチドッグ・タイマ
に関し、特にマイクロコンピュータのウォッチドッグ・
タイマのカウンタ動作クロック回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a watchdog timer, and more particularly to a watchdog timer for a microcomputer.
The present invention relates to a counter operation clock circuit of a timer.

【0002】[0002]

【従来の技術】マイクロコンピュータにおいて、プログ
ラムの暴走やシステムの異常等を検出する手段として、
ウォッチドッグ・タイマが用いられる。
2. Description of the Related Art In a microcomputer, as means for detecting program runaway or system abnormality,
A watchdog timer is used.

【0003】このウォッチドッグ・タイマは、プログラ
ムの暴走やデッドロック等を検出するための機能で、プ
ログラムの各モジュールごとにウォッチドッグ・タイマ
をクリアする命令を入れてプログラムを設計し、ウォッ
チドック・タイマ割込みが発生することでプログラムま
たはシステムが異常動作していることを検出するもので
ある。
This watchdog timer is a function for detecting runaway or deadlock of a program. A program is designed by inserting an instruction to clear the watchdog timer for each module of the program, and a watchdog When a timer interrupt occurs, it detects that a program or system is operating abnormally.

【0004】従来のこの種のウォッチドッグ・タイマを
含むマイクロコンピュータは、図5に示すような構成と
なっており、ウォッチドッグ・タイマ501、発振回路
(以下OSCと記す)102、中央処理装置(以下CP
Uと記す)103、内部発振制御端子X1,X2、外部
出力端子WDTOで構成される。ウォッチドッグ・タイ
マ501は、タイマーカウンタ104、AND論理ゲー
ト105、OR論理ゲート106、モードレジスタ10
7で構成される。
A conventional microcomputer including this type of watchdog timer has a structure as shown in FIG. 5, and includes a watchdog timer 501, an oscillation circuit (hereinafter referred to as OSC) 102, and a central processing unit ( Below CP
U) 103, internal oscillation control terminals X1 and X2, and external output terminal WDTO. The watchdog timer 501 includes a timer counter 104, an AND logic gate 105, an OR logic gate 106, and a mode register 10.
It is composed of 7.

【0005】OSC102は、図2に示すように、イン
バータ30,31と抵抗32とを有する構成となってお
り、内部発振制御端子X1,X2に水晶発振器201を
接続することで、端子X1,X2より入力される信号に
従って、内部システムクロックφI を作成している。C
PU103は、OSC102より出力される内部システ
ムクロックφI により動作し、ウォッチドッグ・タイマ
501に対し、タイマカウンタ104のクリア信号CL
Rと、ウォッチドッグ・タイマ501の動作を許可する
動作セット信号RUNを出力する。
As shown in FIG. 2, the OSC 102 has inverters 30 and 31 and a resistor 32. By connecting a crystal oscillator 201 to internal oscillation control terminals X1 and X2, terminals OS1 and X2 are connected. Internal system clock φI according to the input signal Are being created. C
The PU 103 operates by the internal system clock φ I output from the OSC 102, and sends the clear signal CL of the timer counter 104 to the watchdog timer 501.
It outputs R and an operation set signal RUN that permits the operation of the watchdog timer 501.

【0006】次に、ウォッチドック・タイマ501の内
部の動作について説明する。タイマーカウンタ104は
マイクロコンピュータの内部システムクロック信号φI
によりカウントアップされ、CPU103より出力され
るクリア信号CLRまたはウォッチドッグ・タイマ50
1の動作を許可する動作セット信号RUNによりクリア
されるが、カウントアップしオーバーフローするまでク
リア信号CLRまたは動作セット信号RUNによるクリ
ア操作が行なわれなかった時に、オーバーフロー信号O
VFを出力する。
Next, the internal operation of the watchdog timer 501 will be described. The timer counter 104 is the internal system clock signal φI of the microcomputer.
By the clear signal CLR or the watchdog timer 50, which is counted up by the CPU 103 and output from the CPU 103.
Although it is cleared by the operation set signal RUN which permits the operation of No. 1, when the clear operation by the clear signal CLR or the operation set signal RUN is not performed until the count-up and overflow, the overflow signal O
Output VF.

【0007】モードレジスタ107はフリップフロップ
回路で構成され、マイクロコンピュータ内のシステムリ
セット信号RESETによりリセットされ、CPU10
3より出力される動作セット信号RUNによりセットさ
れる。モードレジスタ107がセットされるとモードレ
ジスタ107のデータ出力によりタイマーカウンタ10
4のオーバーフロー信号OVFを外部出力端子WDTO
に出力することで、プログラムまたはシステムの異常を
外部に出力する構成になっている。
The mode register 107 is composed of a flip-flop circuit and is reset by a system reset signal RESET in the microcomputer, and the CPU 10
It is set by the operation set signal RUN output from the device 3. When the mode register 107 is set, the timer counter 10 is activated by the data output of the mode register 107.
4 overflow signal OVF to external output terminal WDTO
By outputting to, the program or system abnormality is output to the outside.

【0008】[0008]

【発明が解決しようとする課題】前述した従来のウォッ
チドッグ・タイマ501は、プログラムの暴走やデッド
ロックを検出するが、プログラムの暴走やデッドロック
は内部システムクロックの異常により引起こされること
がある。このように、プログラムの異常動作が内部シス
テムクロックにより引起こされた場合には、ウォッチド
ッグ・タイマ501の動作にも異常が起こることが考え
られ、マイクロコンピュータの動作異常の検出が正確に
行なわれないという問題点があった。
The above-mentioned conventional watchdog timer 501 detects a program runaway or deadlock, but the program runaway or deadlock may be caused by an abnormality in the internal system clock. .. As described above, when the abnormal operation of the program is caused by the internal system clock, the operation of the watchdog timer 501 may be abnormal, and the abnormal operation of the microcomputer is accurately detected. There was a problem that it did not exist.

【0009】本発明の目的は、従来の問題点を解決し、
動作に対する高信頼性を確保するようにしたウォッチド
ッグ・タイマを提供することにある。
The object of the present invention is to solve the conventional problems,
It is to provide a watchdog timer that ensures high reliability for operation.

【0010】[0010]

【課題を解決するための手段】本発明の構成は、発振器
の発振出力を動作クロックとするマイクロコンピュータ
のウォッチドッグ・タイマにおいて、周期信号を計数し
入力信号によりクリアされるカウンタと、セット・リセ
ット可能なフリップフロップ回路を内蔵し、前記フリッ
プフロップ回路の出力信号と前記カウンタのオーバーフ
ロー信号とを入力とする論理回路を備え、前記カウンタ
は前記発振器の発振出力より作成したタイミング信号と
は異なる外部よりの周期入力信号により動作する手段を
具備することを特徴とする。
SUMMARY OF THE INVENTION According to the structure of the present invention, in a watchdog timer of a microcomputer that uses an oscillation output of an oscillator as an operation clock, a counter that counts a periodic signal and is cleared by an input signal, and a set / reset A logic circuit which incorporates a flip-flop circuit capable of inputting an output signal of the flip-flop circuit and an overflow signal of the counter, and the counter is externally different from the timing signal generated from the oscillation output of the oscillator. It is characterized by comprising means for operating with the periodic input signal of.

【0011】[0011]

【実施例】図1は本発明の第1の実施例のウォッチドッ
グ・タイマを示すブロック図である。
1 is a block diagram showing a watchdog timer according to a first embodiment of the present invention.

【0012】図1において、本実施例のマイクロコンピ
ュータは、ウォッチドッグ・タイマ101、OSC10
2、CPU103、内部発振制御端子X1,X2、外部
クロック入力端子CKIN、外部出力端子WDTOを含
み、構成される。
Referring to FIG. 1, the microcomputer of this embodiment comprises a watchdog timer 101 and an OSC 10.
2, CPU 103, internal oscillation control terminals X1 and X2, external clock input terminal CKIN, and external output terminal WDTO.

【0013】ここで、ウォッチドッグ・タイマ101
は、タイマーカウンタ104、AND論理ゲート10
5、OR論理ゲート106、モードレジスタ107、動
作クロック切換え回路108を有する。
Here, the watchdog timer 101
Is a timer counter 104, an AND logic gate 10
5, an OR logic gate 106, a mode register 107, and an operation clock switching circuit 108.

【0014】OSC102は、図2に示すような構成と
なっており、内部発振制御端子X1,X2に水晶発振器
201を接続することで端子X1,X2より入力される
信号に従って、内部システムクロックφI を作成してい
る。CPU103は、OSC102より出力される内部
システムクロックφI により動作し、ウォッチドッグ・
タイマ101に対し、タイマーカウンタ104のクリア
信号CLRと、ウォッチドッグ・タイマ101の動作を
許可する動作セット信号RUNと、クロック切換え信号
110を出力する。
The OSC 102 has a structure as shown in FIG. 2, and by connecting the crystal oscillator 201 to the internal oscillation control terminals X1 and X2, the internal system clock φ I is generated according to the signals input from the terminals X1 and X2. Are being created. The CPU 103 operates by the internal system clock φ I output from the OSC 102,
To the timer 101, the clear signal CLR of the timer counter 104, the operation set signal RUN that permits the operation of the watchdog timer 101, and the clock switching signal 110 are output.

【0015】次に、ウォッチドッグ・タイマ101の内
部の動作について説明する。タイマーカウンタ104は
ウォッチドッグ・タイマ内部クロック信号φw によりカ
ウントアップされ、CPU103より出力されるクリア
信号CLRまたはウォッチドッグ・タイマ101の動作
を許可する動作セット信号RUNによりクリアされる
が、カウントアップしオーバーフローするまでクリア信
号CLRまたは動作セット信号RUNによるクリア操作
が行なわれなかった時に、オーバーフロー信号OVFを
出力する。
Next, the internal operation of the watchdog timer 101 will be described. The timer counter 104 is counted up by the watchdog timer internal clock signal φ w , and is cleared by the clear signal CLR output from the CPU 103 or the operation set signal RUN which permits the operation of the watchdog timer 101, but it is counted up. When the clear operation by the clear signal CLR or the operation set signal RUN is not performed until the overflow, the overflow signal OVF is output.

【0016】モードレジスタ107は、フリップフロッ
プ回路で構成され、マイクロコンピュータ内のシステム
リセット信号RESETによりリセットされ、CPU1
03より出力される動作セット信号RUNによりセット
される。モードレジスタ107がセットされると、モー
ドレジスタ107のデータ出力により、タイマーカウン
タ104のオーバーフロー信号OVFを外部出力端子W
DTOに出力することで、プログラムまたはシステムの
異常を外部に出力する構成になっている。
The mode register 107 is composed of a flip-flop circuit and is reset by a system reset signal RESET in the microcomputer, and the CPU 1
It is set by the operation set signal RUN output from 03. When the mode register 107 is set, the overflow signal OVF of the timer counter 104 is output to the external output terminal W by the data output of the mode register 107.
By outputting to the DTO, a program or system abnormality is output to the outside.

【0017】本ウォッチドッグ・タイマ101は、ウォ
ッチドッグ・タイマ内部クロック信号φw のタイミング
に従い動作しており、ウォッチドッグ・タイマ内部クロ
ック信号φw は動作クロック切換え回路108により出
力される。動作クロック切換え回路108は、外部クロ
ック入力端子CKINより入力された外部クロックφo
とマイクロコンピュータ内の内部システムクロックφI
とが入力され、ウォッチドッグ・タイマ内部クロック信
号φw を出力する図3に示すようなスイッチ回路となっ
ている。
The watchdog timer 101 operates in accordance with the timing of the watchdog timer internal clock signal φ w , and the watchdog timer internal clock signal φ w is output by the operation clock switching circuit 108. The operation clock switching circuit 108 uses the external clock φ o input from the external clock input terminal CKIN.
And internal system clock in microcomputer φ I
Is inputted to output a watchdog timer internal clock signal φ w , which is a switch circuit as shown in FIG.

【0018】本スイッチ回路は、CPU103より出力
されたクロック切換え信号110によりウォッチドッグ
・タイマ内部クロック信号φw を、外部クロック入力端
子CKINより入力された外部クロックφo にするか、
マイクロコンピュータ内の内部システムクロックφI
するか選択することができる構成となっている。
This switch circuit uses the clock switching signal 110 output from the CPU 103 to set the watchdog timer internal clock signal φ w to the external clock φ o input from the external clock input terminal CKIN.
The internal system clock φ I in the microcomputer can be selected to be selected.

【0019】図4は本発明の第2の実施例を示すブロッ
ク図である。
FIG. 4 is a block diagram showing a second embodiment of the present invention.

【0020】図4において、本マイクロコンピュータ
は、ウォッチドッグ・タイマ401、OSC102、C
PU103、内部発振制御端子X1,X2、外部出力端
子WDTOを含み、構成される。
In FIG. 4, the present microcomputer comprises a watchdog timer 401, OSC 102, C
It is configured to include a PU 103, internal oscillation control terminals X1 and X2, and an external output terminal WDTO.

【0021】ウォッチドッグ・タイマ101は、タイマ
ーカウンタ104、AND論理ゲート105、OR論理
ゲート106、モードレジスタ107、動作クロック切
換え回路108を有する。以降、前述した第1の実施例
で示したのと同等な部分の説明は省略する。
The watchdog timer 101 has a timer counter 104, an AND logic gate 105, an OR logic gate 106, a mode register 107, and an operation clock switching circuit 108. Hereinafter, description of the same parts as those shown in the first embodiment will be omitted.

【0022】本実施例のウォッチドッグ・タイマ401
は、マイクロコンピュータ内の内部システムクロックφ
I をウォッチドッグ・タイマ内部クロックφw とする
か、内部発信制御端子X1の入力信号をウォッチドッグ
・タイマ内部クロック信号φw としてウォッチドッグ・
タイマを動作させるかを選択する構成になっている。
Watchdog timer 401 of this embodiment
Is the internal system clock φ in the microcomputer
I is set as the watchdog timer internal clock φ w , or the input signal of the internal oscillation control terminal X1 is set as the watchdog timer internal clock signal φ w.
It is configured to select whether to operate the timer.

【0023】[0023]

【発明の効果】以上説明した様に、本発明のウォッチド
ッグ・タイマの構成は、マイクロコンピュータ内部のシ
ステムクロックとは別の、より信頼性の高い動作クロッ
クによりマイクロコンピュータ内部の他の部分とは全く
別個に動作する手段を有することにより、ウォッチドッ
グ・タイマがマイクロコンピュータ内のウォッチドッグ
・タイマ以外の部分の動作には全く影響されずに動作す
ることが可能になり、マイクロコンピュータの暴走やシ
ステムの異常等の検出に対する信頼性が向上し、従来以
上の高信頼性を有することができるという効果を有す
る。
As described above, the configuration of the watchdog timer of the present invention is different from that of the other parts inside the microcomputer due to the more reliable operation clock different from the system clock inside the microcomputer. By having a means to operate completely separately, it becomes possible for the watchdog timer to operate without being affected by the operation of parts other than the watchdog timer in the microcomputer at all. The reliability with respect to the detection of abnormalities and the like is improved, and it is possible to have higher reliability than ever.

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

【図1】本発明の第1の実施例のウォッチドッグ・タイ
マを示すブロック図である。
FIG. 1 is a block diagram showing a watchdog timer according to a first embodiment of the present invention.

【図2】図1の発振回路を示す回路図である。FIG. 2 is a circuit diagram showing the oscillator circuit of FIG.

【図3】図1の切換え回路を示す回路図である。FIG. 3 is a circuit diagram showing a switching circuit of FIG.

【図4】本発明の第2の実施例のウォッチドッグ・タイ
マを示すブロック図である。
FIG. 4 is a block diagram showing a watchdog timer according to a second embodiment of the present invention.

【図5】従来のマイクロコンピュータを示すブロック図
である。
FIG. 5 is a block diagram showing a conventional microcomputer.

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

101 ウォッチドッグ・タイマ 102 発振回路 103 CPU 104 タイマーカウンタ 105 AND論理ゲート 106 OR論理ゲート 107 動作モードレジスタ 108 切換え回路 φI ,φo ,φw クロック信号 CLR ウォッチドッグ・タイマクリア信号 RUN ウォッチドッグ・タイマ動作セット信号 RESET システムリセット信号 WDTO 外部出力端子 X1,X2 内部発振制御端子 CKIN 外部クロック入力端子101 watchdog timer 102 oscillator circuit 103 CPU 104 timer counter 105 AND logic gate 106 OR logic gate 107 operation mode register 108 switching circuit φ I , φ o , φ w clock signal CLR watchdog timer clear signal RUN watchdog timer Operation set signal RESET System reset signal WDTO External output terminal X1, X2 Internal oscillation control terminal CKIN External clock input terminal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 発振器の発振出力を動作クロックとする
マイクロコンピュータのウォッチドッグ・タイマにおい
て、周期信号を計数し入力信号によりクリアされるカウ
ンタと、セット・リセット可能なフリップフロップ回路
とを内蔵し、前記フリップフロップ回路の出力信号と前
記カウンタのオーバーフロー信号とを入力とする論理回
路を備え、前記カウンタは前記発振器の発振出力より作
成したタイミング信号とは異なる外部よりの周期入力信
号により動作する手段を具備することを特徴とするウォ
ッチドッグ・タイマ。
1. A watchdog timer of a microcomputer using an oscillation output of an oscillator as an operation clock, comprising a counter that counts a periodic signal and is cleared by an input signal, and a flip-flop circuit that can be set and reset. A logic circuit that receives the output signal of the flip-flop circuit and the overflow signal of the counter is provided, and the counter operates by means of an external periodic input signal different from the timing signal created from the oscillation output of the oscillator. A watchdog timer characterized by being provided.
JP3235779A 1991-09-17 1991-09-17 Watchdog timer Expired - Lifetime JP2734243B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3235779A JP2734243B2 (en) 1991-09-17 1991-09-17 Watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3235779A JP2734243B2 (en) 1991-09-17 1991-09-17 Watchdog timer

Publications (2)

Publication Number Publication Date
JPH0573360A true JPH0573360A (en) 1993-03-26
JP2734243B2 JP2734243B2 (en) 1998-03-30

Family

ID=16991119

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3235779A Expired - Lifetime JP2734243B2 (en) 1991-09-17 1991-09-17 Watchdog timer

Country Status (1)

Country Link
JP (1) JP2734243B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011070655A (en) * 2009-08-24 2011-04-07 Toshiba Corp Information processing apparatus, memory dump system and memory dump method
CN111309508A (en) * 2020-02-18 2020-06-19 西安微电子技术研究所 Embedded type satellite-borne computer watchdog circuit and working method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5014423U (en) * 1973-06-04 1975-02-15
JPS6027038A (en) * 1983-07-22 1985-02-12 Fujitsu Ltd Detecting system for program runaway
JPS6277658A (en) * 1985-09-30 1987-04-09 Nec Corp Runaway preventing circuit for central processing unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5014423U (en) * 1973-06-04 1975-02-15
JPS6027038A (en) * 1983-07-22 1985-02-12 Fujitsu Ltd Detecting system for program runaway
JPS6277658A (en) * 1985-09-30 1987-04-09 Nec Corp Runaway preventing circuit for central processing unit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011070655A (en) * 2009-08-24 2011-04-07 Toshiba Corp Information processing apparatus, memory dump system and memory dump method
CN111309508A (en) * 2020-02-18 2020-06-19 西安微电子技术研究所 Embedded type satellite-borne computer watchdog circuit and working method thereof
CN111309508B (en) * 2020-02-18 2023-06-13 西安微电子技术研究所 Embedded type satellite-borne computer watchdog circuit and working method thereof

Also Published As

Publication number Publication date
JP2734243B2 (en) 1998-03-30

Similar Documents

Publication Publication Date Title
US4956807A (en) Watchdog timer
US5440603A (en) Watch-dog timer circuit and a microcomputer equipped therewith
US7149915B2 (en) Microcomputer using a shared counter
JPH0792764B2 (en) Microprocessor
US6321289B1 (en) Apparatus for automatically notifying operating system level applications of the occurrence of system management events
US6463492B1 (en) Technique to automatically notify an operating system level application of a system management event
JP2734243B2 (en) Watchdog timer
JP3080785B2 (en) System clock selection circuit
JP2830522B2 (en) Watchdog timer
KR20000010094U (en) CPI Reset Device
JP2899610B2 (en) Malfunction protection circuit of CPU clock selection supply circuit
JP2000035903A (en) Runaway monitoring device for microcomputer
JPH0719187B2 (en) Logic circuit
JPH0371234A (en) Status change detector
JP2516711B2 (en) Watchdog timer device
KR960003096B1 (en) Error detecting circuit
JP2906881B2 (en) Microcomputer
JPH0292014A (en) Signal output circuit
JPH09212201A (en) Control circuit for production equipment
JPH0934751A (en) Watchdog timer circuit for microcomputer
JPH01230135A (en) Run-away preventing circuit
JP3144811B2 (en) Monitoring timer circuit
JPH0676083A (en) Timer circuit
JP2000057021A (en) How to stop watchdog timer
JPH10143393A (en) Diagnosis and processing device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19971125