JP2659067B2 - Microcomputer reset circuit - Google Patents

Microcomputer reset circuit

Info

Publication number
JP2659067B2
JP2659067B2 JP63140726A JP14072688A JP2659067B2 JP 2659067 B2 JP2659067 B2 JP 2659067B2 JP 63140726 A JP63140726 A JP 63140726A JP 14072688 A JP14072688 A JP 14072688A JP 2659067 B2 JP2659067 B2 JP 2659067B2
Authority
JP
Japan
Prior art keywords
reset
microcomputer
watchdog timer
circuit
timer circuit
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.)
Expired - Lifetime
Application number
JP63140726A
Other languages
Japanese (ja)
Other versions
JPH01310422A (en
Inventor
昌弘 徳永
文雄 牧野
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 JP63140726A priority Critical patent/JP2659067B2/en
Publication of JPH01310422A publication Critical patent/JPH01310422A/en
Application granted granted Critical
Publication of JP2659067B2 publication Critical patent/JP2659067B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、マイクロコンピュータ(以下、マイコン
とも呼称する)に関し、特にマイクロコンピュータのリ
セット回路に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer (hereinafter, also referred to as a microcomputer), and particularly to a reset circuit of the microcomputer.

〔従来の技術〕[Conventional technology]

従来、マイクロコンピュータにおいては、いわゆるウ
ォッチドッグタイマを用いてソフトウェアの暴走やハー
ドウェアの異常等を検出することが行われている。これ
は、マイコンの動作が正常であれば、そのことを示すパ
ルス(ウォッチドッグパルス)Wを所定周期で出力し、
これによってタイマ(ウォッチドッグタイマ)をその所
定周期毎にリセットし、このウォッチドッグパルスWが
欠落するかまたは周期が所定値を超えると、ウォッチド
ッグタイマがタイムアップすることによりマイコンにリ
セット信号を出力して、マイコンにリセット/再起動、
あるいは警報出力等、リセット割込みによる所定の動作
(例外処理)を行わせるようにしたものである。
Conventionally, microcomputers have used a so-called watchdog timer to detect runaway of software, abnormality of hardware, and the like. This means that if the operation of the microcomputer is normal, a pulse (watchdog pulse) W indicating this is output at a predetermined cycle,
As a result, the timer (watchdog timer) is reset every predetermined period, and when the watchdog pulse W is lost or the period exceeds the predetermined value, the watchdog timer times out and outputs a reset signal to the microcomputer. Then reset / restart the microcontroller,
Alternatively, a predetermined operation (exception processing) by a reset interrupt such as an alarm output is performed.

上記のようなマイクロコンピュータにおいては、第4
図(a)に示すように、ウォッチドッグパルスWを監視
するウォッチドッグタイマ回路41からのリセット信号
は、電源オン時にリセット信号を出力し、また電源電圧
異常時にリセット信号を出力する機能を合わせ持つパワ
ーオンリセット回路42のリセット信号出力とワイヤード
オア接続されてマイコンCPU)40▲▼入力端
子に入力されるか、または第4図(b)に示すように、
CPU40の▲▼入力端子に入力されるパワーオ
ンリセット回路42リセット信号出力と分離して、▲
▼(マスク不能割込み)入力端子に入力される。
In the microcomputer as described above, the fourth
As shown in FIG. 7A, the reset signal from the watchdog timer circuit 41 for monitoring the watchdog pulse W has a function of outputting a reset signal when the power is turned on and outputting a reset signal when the power voltage is abnormal. The reset signal output of the power-on reset circuit 42 is wired-OR connected and input to the microcomputer CPU 40) input terminal, or as shown in FIG.
The power-on reset circuit 42 input to the ▲ ▼ input terminal of the CPU 40 is separated from the reset signal output, and
▼ (non-maskable interrupt) Input to the input terminal.

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

上記のようなウォッチドッグタイマ回路を有するマイ
クロコンピュータにあって、ウォッチドッグタイマ回路
の故障発生率は必ずしも低くないのにかかわらず、ウォ
ッチドッグタイマ回路の故障検知は今までなされていな
かった。このようにウォッチドッグタイマ回路に故障が
発生しても検知されないとすると、他の回路で故障が発
生したり、あるいはノイズ等でマイコンが暴走した時
等、そのマイコンを用いたシステムにとって不具合な出
力が長時間出力される事態を招く危険性がある。
In the microcomputer having the watchdog timer circuit as described above, the failure detection rate of the watchdog timer circuit has not been detected even though the failure occurrence rate of the watchdog timer circuit is not always low. If a failure occurs in the watchdog timer circuit but is not detected in this way, if a failure occurs in another circuit or the microcomputer runs away due to noise or the like, an output that is defective for the system using that microcomputer May be output for a long time.

そのため、ウォッチドッグタイマ回路の故障検知は極
めて望ましいが、上記の第4図(a)に示すようなウォ
ッチドッグタイマ回路41のリセット信号をパワーオンリ
セット回路42の出力と共にワイヤードオア接続して、マ
イコン40の▲▼入力端子に入力するリセット
回路では、ウォッチドッグタイマ回路41の故障検出は不
可能である。
Therefore, it is highly desirable to detect the failure of the watchdog timer circuit. However, the reset signal of the watchdog timer circuit 41 as shown in FIG. In the reset circuit input to the input terminal 40, the failure of the watchdog timer circuit 41 cannot be detected.

即ち、第4図(a)の回路では、ウォッチドッグタイ
マ回路41の故障検出を行うために、例えばウォッチドッ
グタイマ回路41に異常なウォッチドッグパルスまたはテ
スト信号を入力する等により強制的にリセット信号を出
力させると、CPU40にリセットが掛かり、内部の初期化
が行われるため、ウォッチドッグタイマ回路41の故障検
出はできなくなる。また、この回路ではウォッチドッグ
タイマ回路41からのリセット信号と他の回路からのリセ
ット信号との識別が不可能である。
That is, in the circuit of FIG. 4A, in order to detect a failure of the watchdog timer circuit 41, for example, an abnormal watchdog pulse or a test signal is input to the watchdog timer circuit 41, and the reset signal is forcibly applied. Is output, the CPU 40 is reset and internal initialization is performed, so that the failure of the watchdog timer circuit 41 cannot be detected. Further, in this circuit, it is impossible to distinguish between a reset signal from the watchdog timer circuit 41 and a reset signal from another circuit.

他方、第4図(b)の回路では、ウォッチドッグタイ
マ回路41の故障検出は可能であるが、NMI動作はマイク
ロプログラムレベルの暴走の場合、割込みが効かない場
合もあり得るし、さらには、NMI動作は一般的にマイコ
ン内部のハードウェアを完全にはリセットしないため、
NMI動作の直後にマイコンが異常出力をしてしまうこと
があり得る等の問題がある。
On the other hand, in the circuit of FIG. 4 (b), the failure of the watchdog timer circuit 41 can be detected, but in the case of runaway at the microprogram level, the interrupt may not be effective in the case of the NMI operation. Since NMI operation generally does not completely reset the hardware inside the microcomputer,
There is a problem that the microcomputer may output abnormally immediately after the NMI operation.

この発明は、上記の事情に鑑みなされたもので、その
目的は、ウォッチドッグタイマ回路の故障検出が可能で
マイクロコンピュータの信頼性を向上させ得るマイクロ
コンピュータのリセット回路を提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a microcomputer reset circuit capable of detecting a failure of a watchdog timer circuit and improving the reliability of the microcomputer.

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

上記目的達成のため、この発明は、ウォッチドッグタ
イマ回路を有するマイクロコンピュータのリセット回路
において、互いに相異なる割込みベクトルが割り当てら
れたリセット割込み用の2つのリセット入力信号線を設
け、これら2つのリセット入力信号線にウォッチドッグ
タイマ回路のリセット信号出力とウォッチドッグタイマ
回路以外のリセット信号出力をそれぞれ互いに独立に入
力するようにしたものである。
In order to achieve the above object, the present invention provides a reset circuit of a microcomputer having a watchdog timer circuit, wherein two reset input signal lines for reset interrupts to which different interrupt vectors are assigned are provided. The reset signal output of the watchdog timer circuit and the reset signal output other than the watchdog timer circuit are input to the signal lines independently of each other.

なお、ウォッチドッグタイマ回路をマイクロコンピュ
ータに内蔵されたものでも外付けされたものでも良い。
Note that the watchdog timer circuit may be built in the microcomputer or externally provided.

〔作用〕[Action]

上記の構成を有するこの発明のマイクロコンピュータ
のリセット回路にあって、ウォッチドッグタイマ回路か
らのリセット信号はウォッチドッグタイマ回路以外の回
路からのリセット信号と異なるリセット入力信号線に入
力されるので、ウォッチドッグタイマ回路からのリセッ
ト信号と他の回路からのリセット信号とを識別すること
ができる。この場合、ウォッチドッグタイマ回路用のリ
セット入力信号線には他の回路用のリセット入力信号線
とは異なる割込みベクトルが与えられており、ウォッチ
ドッグタイマ回路からリセット信号が入力されると、そ
のベクトルへのジャンプによって独特のリセット割込み
処理が実行される。また、どちらのリセット入力信号線
にリセット信号が入力されてもマイコン内部が初期化さ
れるので、▲▼入力端子にリセット信号を入力す
る場合のように、暴走の種類次第で割込みが効かないと
いうような事態は解消される。
In the microcomputer reset circuit of the present invention having the above-described configuration, the reset signal from the watchdog timer circuit is input to a reset input signal line different from the reset signal from a circuit other than the watchdog timer circuit. The reset signal from the dog timer circuit and the reset signal from another circuit can be distinguished. In this case, an interrupt vector different from the reset input signal lines for other circuits is given to the reset input signal line for the watchdog timer circuit, and when a reset signal is input from the watchdog timer circuit, the vector is reset. A unique reset interrupt process is executed by jumping to. Also, since the microcomputer is initialized regardless of which reset input signal line is input, the interrupt does not work depending on the type of runaway, such as when a reset signal is input to the ▲ ▼ input terminal. Such a situation is resolved.

ウォッチドッグタイマ回路の故障検出を行うには、例
えば電源オン時、パワーオンリセットが解除された後の
イニシャルチェック時にマイコンの指定されたポートか
ら異常なウォッチドッグパルス信号をウォッチドッグタ
イマ回路へ入力し、ウォッチドッグタイマ回路からマイ
コンのウォッチドッグタイマ回路用のリセット入力信号
線へリセット信号を強制的に入力させ、マイコンがリセ
ットされるかどうかをチェックする。このリセット入力
によってマイコン内部は初期化され、レジスタ類がクリ
アされると共に、所定のベクトルへのジャンプが行わ
れ、そのベクトルの命令が実行される。
To detect a failure of the watchdog timer circuit, for example, input an abnormal watchdog pulse signal to the watchdog timer circuit from the specified port of the microcomputer at the time of power-on, initial check after the power-on reset is released, and so on. Then, a reset signal is forcibly input from the watchdog timer circuit to the reset input signal line for the watchdog timer circuit of the microcomputer to check whether the microcomputer is reset. The reset input initializes the inside of the microcomputer, clears the registers, jumps to a predetermined vector, and executes the instruction of the vector.

〔実施例〕〔Example〕

以下、この発明によるマイクロコンピュータのリセッ
ト回路の一実施例について第1図乃至第3図を参照しつ
つ説明する。
An embodiment of a reset circuit of a microcomputer according to the present invention will be described below with reference to FIGS.

第1図はこの発明のマイクロコンピュータのリセット
回路を組み込んだマイコンシステムの一実施例を示し、
図示実施例のシステムは、マイクロコンピュータ(CP
U)10、電源オン時にリセット信号を出力し、また電源
電圧を常時監視して電源電圧異常時にはリセット信号を
出力する機能を合わせ持つパワーオンリセット回路11、
CPU10のウォッチドッグパルスWを監視して、その異常
検出時にリセット信号を出力するウォッチドッグタイマ
回路12、プログラム記憶用のROM(リードオンリーメモ
リ)13、データ記憶用のRAM(ランダムアクセスメモ
リ)14、各種センサや制御対象機器に接続されたI/O
(入出力)インターフェース15等で構成されている。
FIG. 1 shows an embodiment of a microcomputer system incorporating a microcomputer reset circuit according to the present invention.
The system of the illustrated embodiment is a microcomputer (CP
U) 10, a power-on reset circuit 11, which has a function of outputting a reset signal when the power is turned on, constantly monitoring the power supply voltage and outputting a reset signal when the power supply voltage is abnormal,
A watchdog timer circuit 12 that monitors a watchdog pulse W of the CPU 10 and outputs a reset signal when an abnormality is detected, a ROM (read only memory) 13 for program storage, a RAM (random access memory) 14 for data storage, I / O connected to various sensors and controlled devices
It comprises an (input / output) interface 15 and the like.

ウォッチドッグタイマ回路のリセット信号出力は、ベ
クトル0が割り当てられたパワーオンリセット回路11の
リセット入力端子▲▼とは別個に設けら
れ、割込みベクトル1が割り当てられたリセット入力端
子▲▼に接続されている。
The reset signal output of the watchdog timer circuit is provided separately from the reset input terminal ▲ ▼ of the power-on reset circuit 11 to which the vector 0 is assigned, and is connected to the reset input terminal ▲ ▼ to which the interrupt vector 1 is assigned. I have.

この実施例のマイコンシステムは、まず電源オンによ
ってパワーオンリセット回路11からのリセット信号出力
により▲▼(第3図のフローチャートのス
テップ300)の割込みが行われ、ベクトル0の命令によ
りτ(第2図)においてマイコンが初期設定され、立
ち上がる。次に、マイコンの特定のポート(例えばポー
トW)が設定され(ステップ301)、ウォッチドッグタ
イマをリセットするためのウォッチドッグパルスWがウ
ォッチドッグタイマ回路12へ出力される(τ)。
Microcomputer system of this embodiment, the first power-on by the reset signal output from the power-on reset circuit 11 ▲ ▼ interrupt (third step 300 of the flowchart in Figure) is performed, 0 tau by a command vector 0 (first In FIG. 2), the microcomputer is initialized and started up. Next, a specific port (for example, port W) of the microcomputer is set (step 301), and a watchdog pulse W for resetting the watchdog timer is output to the watchdog timer circuit 12 (τ 1 ).

次に、CPU10側でプログラムによりウォッチドッグパ
ルスWを上記タイムアップ時間t以上に亘って出力しな
いことによって、つまり第2図のτのタイミングでの
ウォッチドッグパルスWを禁止することでウォッチドッ
グタイマ回路12が正常であれば、ウォッチドッグタイマ
回路12のリセット信号がCPU10の▲▼の入
力端子に出力され(τ)、割込みベクトル1の処理を
実行し(τ4;ステップ304)、イニシャルチェックルー
チンが実行される(ステップ305)。一方、ステップ302
から上記タイムアップ時間tを経過してもウォッチドッ
グタイム回路12よりCPU10の▲▼にリセッ
ト信号が入力されないと、CPU10はウォッチドッグタイ
マ回路12の機能が異常と判定して、システムダウンモー
ドに入る(ステップ303)。
Next, the watchdog timer by prohibiting by the watchdog pulse W does not output for more than the time-up time t by a program in the CPU10 side, that the watchdog pulse W in tau 2 of the timing of the second view If the circuit 12 is normal, the reset signal of the watchdog timer circuit 12 is output to the input terminal of ▲ ▼ of the CPU 10 (τ 3 ), executes the processing of the interrupt vector 1 (τ 4 ; step 304), and performs an initial check. The routine is executed (Step 305). Step 302
If the reset signal is not input from the watchdog time circuit 12 to the ▲ ▼ of the CPU 10 even after the time-up time t has elapsed, the CPU 10 determines that the function of the watchdog timer circuit 12 is abnormal and enters the system down mode. (Step 303).

上記ステップ305のイニシャルチェックでウォッチド
ッグタイマ回路12以外の部分に異常があれば、やはりシ
ステムダウンモードに入る(ステップ308)。このイニ
シャルチェックで異常がなければ、τにおいて通常制
御のルーチンへ移行する(ステップ307)。この通常制
御ルーチンの実行中、CPU10は、常時ウォッチドッグタ
イマ回路12からのリセット信号出力の有無を監視し、例
えばτにおいてマイコン側の何等かの異常によりウォ
ッチドッグパルスWが異常となり、▲▼に
リセット信号が入力されると(τ)、割込みベクトル
1の処理を再び行う(ステップ304)。
If there is any abnormality in the parts other than the watchdog timer circuit 12 in the initial check in step 305, the system also enters the system down mode (step 308). If there is no abnormality in this initial check, the process proceeds in the tau 5 to the normal control routine (step 307). During this normal control routine, CPU 10 monitors the presence or absence of the reset signal output from the always watchdog timer circuit 12 becomes a watchdog pulse W is abnormal by the abnormality of what like of the microcontroller, for example in tau 6, ▲ ▼ , A reset signal is input (τ 7 ), the processing of the interrupt vector 1 is performed again (step 304).

〔発明の効果〕〔The invention's effect〕

以上説明したように、この発明のマイクロコンピュー
タのリセット回路は、ウォッチドッグタイマ回路のリセ
ット信号用のリセット入力信号線をその他の回路用のリ
セット入力信号線と別個に設け、それぞれ互いに異なる
割込みベクトルを割り当てたため、このように僅かの回
路及びソフトウェアの追加するだけで、ウォッチドッグ
タイマ回路の故障検出が可能となり、マイクロコンピュ
ータあるいはマイコンシステムの信頼性向上に少なから
ず貢献し得る。
As described above, in the microcomputer reset circuit of the present invention, the reset input signal line for the reset signal of the watchdog timer circuit is provided separately from the reset input signal lines for the other circuits, and interrupt vectors different from each other are provided. Because of the assignment, the failure of the watchdog timer circuit can be detected by adding such a small number of circuits and software, which can contribute to the improvement of the reliability of the microcomputer or the microcomputer system.

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

第1図はこの発明によるマイクロコンピュータのリセッ
ト回路を適用したマイクロコンピュータシステムの一実
施例のブロック図、第2図及び第3図はそれぞれこの実
施例の動作を説明するためのタイミング図及びフローチ
ャート、第4図(a)及び(b)はそれぞれ従来技術に
よるマイクロコンピュータのリセット回路の一例を示す
ブロック図である。 10……マイクロコンピュータ(CPU)、 11……パワーオンリセット回路、 12……ウォッチドッグタイマ回路、 W……ウォッチドッグパルス、 ▲▼,▲▼……リセット入力
端子。
FIG. 1 is a block diagram of one embodiment of a microcomputer system to which a reset circuit of a microcomputer according to the present invention is applied. FIGS. 2 and 3 are timing diagrams and flowcharts for explaining the operation of this embodiment, respectively. FIGS. 4 (a) and 4 (b) are block diagrams each showing an example of a reset circuit of a microcomputer according to the prior art. 10: microcomputer (CPU), 11: power-on reset circuit, 12: watchdog timer circuit, W: watchdog pulse, ▲ ▼, ▲ ▼: reset input terminal.

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】マイクロコンピュータのリセット回路にお
いて、互いに相異なる割込みベクトルが割り当てられた
リセット割込み用の2つのリセット入力信号線を設け、
これら2つのリセット入力信号線にウォッチドッグタイ
マ回路のリセット信号出力とウォッチドッグタイマ回路
以外のリセット信号出力をそれぞれ互いに独立に入力す
るようにしたことを特徴とするマイクロコンピュータの
リセット回路。
In a reset circuit of a microcomputer, two reset input signal lines for a reset interrupt to which different interrupt vectors are assigned are provided.
A reset circuit for a microcomputer, wherein a reset signal output of a watchdog timer circuit and a reset signal output other than the watchdog timer circuit are input to these two reset input signal lines independently of each other.
【請求項2】ウォッチドッグタイマ回路をマイクロコン
ピュータ内部に有することを特徴とする請求項1記載の
マイクロコンピュータのリセット回路。
2. The reset circuit according to claim 1, wherein a watchdog timer circuit is provided inside the microcomputer.
【請求項3】ウォッチドッグタイマ回路をマイクロコン
ピュータに外付けしたことを特徴とする請求項1記載の
マイクロコンピュータのリセット回路。
3. The microcomputer reset circuit according to claim 1, wherein the watchdog timer circuit is externally connected to the microcomputer.
JP63140726A 1988-06-08 1988-06-08 Microcomputer reset circuit Expired - Lifetime JP2659067B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63140726A JP2659067B2 (en) 1988-06-08 1988-06-08 Microcomputer reset circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63140726A JP2659067B2 (en) 1988-06-08 1988-06-08 Microcomputer reset circuit

Publications (2)

Publication Number Publication Date
JPH01310422A JPH01310422A (en) 1989-12-14
JP2659067B2 true JP2659067B2 (en) 1997-09-30

Family

ID=15275280

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63140726A Expired - Lifetime JP2659067B2 (en) 1988-06-08 1988-06-08 Microcomputer reset circuit

Country Status (1)

Country Link
JP (1) JP2659067B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2638257B2 (en) * 1990-05-16 1997-08-06 株式会社ユアサコーポレーション Error handling circuit for control power supply
JP2616140B2 (en) * 1990-05-22 1997-06-04 日本電気株式会社 Microcomputer
JP2004259137A (en) 2003-02-27 2004-09-16 Denso Corp Electronic control device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62163151A (en) * 1986-01-14 1987-07-18 Matsushita Electric Ind Co Ltd Initialization method for standby memory

Also Published As

Publication number Publication date
JPH01310422A (en) 1989-12-14

Similar Documents

Publication Publication Date Title
US7010724B1 (en) Operating system hang detection and methods for handling hang conditions
US7103738B2 (en) Semiconductor integrated circuit having improving program recovery capabilities
US20020116670A1 (en) Failure supervising method and apparatus
US5541943A (en) Watchdog timer lock-up prevention circuit
US7137036B2 (en) Microcontroller having an error detector detecting errors in itself as well
JP2659067B2 (en) Microcomputer reset circuit
US6321289B1 (en) Apparatus for automatically notifying operating system level applications of the occurrence of system management events
JPH11259340A (en) Reactivation control circuit for computer
JP2967219B2 (en) External power supply for digital computer
JP2870250B2 (en) Microprocessor runaway monitor
JP3367379B2 (en) CPU output control circuit
JPS5855535B2 (en) Multi-computer device for vehicles
JPH02293939A (en) Stack overflow detection time processing system
JPH06131218A (en) Cpu control system
JPH01245322A (en) Power failure control circuit for microprocessor
JP2731386B2 (en) Control device
JPS6252647A (en) Monitoring system for run away of microprocessor
JPS61279940A (en) Fault detector for computer
JPH04236637A (en) Microprocessor fault detecting circuit
JPH03152637A (en) Abnormality diagnostic system
JPH0748198B2 (en) Multiprocessor system
JPH0588943A (en) Watchdog timer
JPH05120075A (en) Runaway detecting method for cpu
JPH0535892A (en) Microcomputer
JPS62217335A (en) Monitor circuit for cpu runaway