JPH02176947A - Cpu monitoring device - Google Patents

Cpu monitoring device

Info

Publication number
JPH02176947A
JPH02176947A JP63332231A JP33223188A JPH02176947A JP H02176947 A JPH02176947 A JP H02176947A JP 63332231 A JP63332231 A JP 63332231A JP 33223188 A JP33223188 A JP 33223188A JP H02176947 A JPH02176947 A JP H02176947A
Authority
JP
Japan
Prior art keywords
cpu
counter circuit
signal
abnormality
counter
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
JP63332231A
Other languages
Japanese (ja)
Inventor
Chiemi Inamori
稲森 千栄美
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63332231A priority Critical patent/JPH02176947A/en
Publication of JPH02176947A publication Critical patent/JPH02176947A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To easily investigate the cause of abnormality occurrence by proceeding to interruption processing if abnormality occurs to a CPU and storing processing data at the time of the abnormality occurrence. CONSTITUTION:An oscillator 1 outputs a pulse signal periodically and a counter circuit 2 counts the supplied pulse signal. The CPU 3, on the other hand, outputs a counter control signal which clears the counted value of the counter circuit 2 at a proper period which is longer than the period of the pulse signal. If operation abnormality occurs to a module of application, the CPU 3 does not supply the counter control signal for initialization to the counter circuit 2 any more and an interruption signal is supplied to the CPU 3 when the counted value of the counter circuit 2 reaches a prescribed counted number, thereby proceeding to the interruption processing. In this interruption processing, register contents, periphery information on the CPU 3, etc., at the time of the abnormality occurrence are stored in a memory. Consequently, the cause of the abnormality occurrence is easily investigated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、CPUでの異常発生を検出して割込み処理へ
移行させるCPU監視装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a CPU monitoring device that detects the occurrence of an abnormality in a CPU and shifts to interrupt processing.

〔従来の技術) 一般的に、マイクロコンピュータは、CPUへ周期的に
信号を与え、この信号に応じてCPUが周期的に出力す
る信号に基づきCPUでの異常発生を検出する、所謂ウ
ォッチドッグタイマをハードウェアとして設けている。
[Prior Art] Generally, a microcomputer uses a so-called watchdog timer that periodically supplies a signal to the CPU and detects the occurrence of an abnormality in the CPU based on the signal that the CPU periodically outputs in response to the signal. is installed as hardware.

第4図は、ウォッチドッグタイマの概略的な構成を示す
ブロック図である0図中1はパルス信号を周期的に発振
する発振器であって、発振器lはパルス信号を計数する
カウンタ回路2と接続される。カウンタ回路2のカウン
タ出力端子C10はCPU3のリセット端子R3Tと接
続され、CPU3の出力端子0はカウンタ回路2のクリ
ア端子CLと接続される。
FIG. 4 is a block diagram showing a schematic configuration of a watchdog timer. In the figure, 1 is an oscillator that periodically oscillates a pulse signal, and the oscillator L is connected to a counter circuit 2 that counts the pulse signal. be done. The counter output terminal C10 of the counter circuit 2 is connected to the reset terminal R3T of the CPU 3, and the output terminal 0 of the CPU 3 is connected to the clear terminal CL of the counter circuit 2.

次に、ウォッチドッグタイマがCPU3を監視する動作
について説明する。
Next, the operation of the watchdog timer monitoring the CPU 3 will be explained.

発振器1はカウンタ回路2ヘパルス信号を周期的に出力
し、カウンタ回路2は与えられたパルス信号を計数する
。一方、CPU3は、前記パルス信号の周期より長い適
宜の周期で、出力端子0からカウンタ回路2のクリア端
子CLへクリア信号を出力し、カウンタ回路2は計数値
をクリアする。
The oscillator 1 periodically outputs pulse signals to the counter circuit 2, and the counter circuit 2 counts the applied pulse signals. On the other hand, the CPU 3 outputs a clear signal from the output terminal 0 to the clear terminal CL of the counter circuit 2 at an appropriate period longer than the period of the pulse signal, and the counter circuit 2 clears the count value.

また、カウンタ回路2は、CPU3に異常が発生してク
リア信号が出力されず、計数値が所定値を超えた場合、
カウント出力端子C10からCPU3のリセット端子R
3Tヘリセント信号を出力し、CPU3を初期化する。
In addition, if an abnormality occurs in the CPU 3 and the clear signal is not output and the count value exceeds a predetermined value, the counter circuit 2
From count output terminal C10 to reset terminal R of CPU3
A 3T helicent signal is output and the CPU 3 is initialized.

即ち、CPU3が正常に動作している間は、クリア信号
を定期的に出力し得るため、カウンタ回路2の計数値は
所定値に達する前にクリアされ、リセ・ノド信号が出力
されることはない。
That is, while the CPU 3 is operating normally, the clear signal can be output periodically, so the count value of the counter circuit 2 is cleared before it reaches a predetermined value, and the reset/node signal is not output. do not have.

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

従来のウォッチドッグタイマは、CPUでの異常発生を
検出した隙、リセット信号を出力してCPUを初期化さ
せるだけであって、異常発生時のレジスタ内容等の処理
データが保存されず、異常を生ぜしめたアプリケーショ
ンプログラムの誤りを究明する手掛りがなくなるという
問題があった。
Conventional watchdog timers only output a reset signal to initialize the CPU when an abnormality is detected in the CPU, and processing data such as register contents at the time of the abnormality is not saved and the abnormality is detected. There was a problem in that there was no clue to find out the error in the application program that caused the error.

本発明はこのような問題を解決するためになされたもの
であって、CPUにて発生した異常の原因究明を容易に
するCPU監視装置の提供を目的とする。
The present invention was made to solve such problems, and an object of the present invention is to provide a CPU monitoring device that facilitates investigation of the cause of an abnormality occurring in a CPU.

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

本発明のCPU監視装置は、CPUでの異常発生を検出
した隙、割込み処理へ移行させ、異常発生時の処理デー
タを記憶させる手段を備えたことを特徴とする。
The CPU monitoring device of the present invention is characterized in that it is equipped with a means for transitioning to interrupt processing when an abnormality in the CPU is detected, and storing processing data at the time of the abnormality.

〔作用) 本発明のCPU監視装置は、CPUに異常が発生した隙
、割込み処理へ移行させ、異常発生時の処理データを記
憶させた後、プログラムを強制終了させてcpuを初期
化し、異常発生の原因究明を容易にする。
[Function] The CPU monitoring device of the present invention transitions to interrupt processing when an abnormality occurs in the CPU, stores processing data at the time of the abnormality, and then forcibly terminates the program and initializes the CPU. Make it easier to investigate the cause.

〔実施例〕〔Example〕

以下、本発明をその実施例を示す図面に基づき詳述する
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below based on drawings showing embodiments thereof.

第1図は、本発明に係るウォッチドッグタイマの概略的
な構成を示すブロック図である0図中1はパルス信号を
周期的に発振する発振器であって、発振器1はパルス信
号を針数するカウンタ回路2と接続される。CPU3へ
の割込み信号を出力するカウンタ回路2の割り込み出力
端子I NT10はCPU3の割り込み端子INTと接
続され、カウンタ回路2の制御信号を出力するCPU3
の出力端子0は、カウンタ回路2のカウンタ制御端子C
Oと接続される。
FIG. 1 is a block diagram showing a schematic configuration of a watchdog timer according to the present invention. In the figure, 1 is an oscillator that periodically oscillates a pulse signal, and the oscillator 1 oscillates the pulse signal by the number of stitches. It is connected to the counter circuit 2. The interrupt output terminal INT10 of the counter circuit 2 that outputs an interrupt signal to the CPU3 is connected to the interrupt terminal INT of the CPU3, and the interrupt output terminal INT10 of the counter circuit 2 outputs an interrupt signal to the CPU3.
The output terminal 0 of is the counter control terminal C of the counter circuit 2.
Connected to O.

次に、CPU3を監視する動作及び異常発生を検出した
際の動作につき第2図及び第3図に示すフローチャート
に基づき説明する。
Next, the operation of monitoring the CPU 3 and the operation when an abnormality is detected will be explained based on the flowcharts shown in FIGS. 2 and 3.

発振器1はカウンタ回路2ヘパルス信号を周期的に出力
し、カウンタ回路2は与えられたパルス信号を計数する
。一方、CPU3は、前記パルス信号の周期より長い適
宜の周期で、出力端子0からカウンタ回路2のカウンタ
制御端子COへ計数値をクリアさせるカウンタ制御信号
を出力し、カウンタ回路2は計数値をクリアする。計数
値をクリアする都度、又はモジュール化したプログラム
の開始時及び終了時に計数値を加算して記憶しておく、
即ち、周期的に出力されるパルス信号の計数値からプロ
グラムの処理時間を検出することができる。
The oscillator 1 periodically outputs pulse signals to the counter circuit 2, and the counter circuit 2 counts the applied pulse signals. On the other hand, the CPU 3 outputs a counter control signal for clearing the counted value from the output terminal 0 to the counter control terminal CO of the counter circuit 2 at an appropriate period longer than the period of the pulse signal, and the counter circuit 2 clears the counted value. do. Add and store the counted value each time you clear the counted value or at the start and end of a modularized program.
That is, the processing time of the program can be detected from the count value of the pulse signal that is periodically output.

アプリケーションのモジュールに何らかの動作異常が発
生すると、CPU3からカウンタ回路2に対して初期化
のカウンタ制御信号が供給されなくなる。従って、カウ
ンタ回路2の計数値が所定カウント数に達すると同時に
CPU3に対して割込み信号を出力し、割込み処理へ移
行する0割込み処理では、異常発生時のレジスタ内容等
、cpu3の周辺情報をメモリに記憶させて保存し、モ
ジュールを強制終了させる。
If some operational abnormality occurs in the application module, the counter control signal for initialization is no longer supplied from the CPU 3 to the counter circuit 2. Therefore, at the same time as the count value of the counter circuit 2 reaches a predetermined count number, an interrupt signal is output to the CPU 3, and in the 0 interrupt processing that moves to the interrupt processing, peripheral information of the CPU 3, such as register contents at the time of abnormality occurrence, is stored in the memory. Save it and force quit the module.

CPU3のプログラム実行が正常に行われている間は、
カウンタ回路2の計数値が所定カウンタ数に達する前に
カウンタ制御信号がカウンタ回路2へ出力され、カウン
タ回路2の計数値が初期化されるので割込み信号が出力
されることはない。
While the CPU3 program is being executed normally,
A counter control signal is output to the counter circuit 2 before the count value of the counter circuit 2 reaches a predetermined counter number, and the count value of the counter circuit 2 is initialized, so that no interrupt signal is output.

(発明の効果) 本発明のCPU監視装置は、CPUでの異常発生が検出
された隙、リセットする前に割込み処理へ移行し、異常
発生時のレジスタ内容等のCPU周辺情報を記憶させた
後、CPUを初期化する構成であって、異常発生原因の
究明を容易にするという優れた効果を奏する。
(Effects of the Invention) The CPU monitoring device of the present invention transitions to interrupt processing when an abnormality is detected in the CPU, before resetting, and stores CPU peripheral information such as register contents at the time of the abnormality. This configuration initializes the CPU, and has the excellent effect of facilitating investigation of the cause of abnormality occurrence.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明に係るウォッチドッグタイマの概略構成
を示すブロック図、第2図及び第3図はプログラムのデ
バッグの手順を説明するフローチャート、第4図は従来
のウォッチドッグタイマの概略構成を示すブロック図で
ある。 1・・・発振器 2・・・カウンタ回路 3・・・CP
Uなお11図中、同一符号は同一、又は相当部分を示す
FIG. 1 is a block diagram showing a schematic configuration of a watchdog timer according to the present invention, FIGS. 2 and 3 are flowcharts explaining a program debugging procedure, and FIG. 4 is a block diagram showing a schematic configuration of a conventional watchdog timer. FIG. 1... Oscillator 2... Counter circuit 3... CP
Note that in Figure 11, the same reference numerals indicate the same or equivalent parts.

Claims (1)

【特許請求の範囲】[Claims] (1)CPUへ周期的に信号を与え、該信号に応じて、
プログラム実行中のCPUが周期的に出力する第1信号
を計数する一方、CPUが定期的に出力する第2信号に
よって計数値をクリアするとともに、該計数値に基づい
てCPUでの異常発生を検出するCPU監視装置におい
て、 CPUでの異常発生を検出した隙、割込み 処理へ移行させ、異常発生時の処理データを記憶させる
手段を備えたことを特徴とするCPU監視装置。
(1) Periodically give a signal to the CPU, and according to the signal,
While counting the first signal periodically output by the CPU while the program is running, the count value is cleared by the second signal output periodically by the CPU, and the occurrence of an abnormality in the CPU is detected based on the count value. A CPU monitoring device characterized in that the CPU monitoring device is equipped with a means for transitioning to interrupt processing when an abnormality occurs in the CPU and storing processing data at the time of occurrence of the abnormality.
JP63332231A 1988-12-28 1988-12-28 Cpu monitoring device Pending JPH02176947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63332231A JPH02176947A (en) 1988-12-28 1988-12-28 Cpu monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63332231A JPH02176947A (en) 1988-12-28 1988-12-28 Cpu monitoring device

Publications (1)

Publication Number Publication Date
JPH02176947A true JPH02176947A (en) 1990-07-10

Family

ID=18252641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63332231A Pending JPH02176947A (en) 1988-12-28 1988-12-28 Cpu monitoring device

Country Status (1)

Country Link
JP (1) JPH02176947A (en)

Similar Documents

Publication Publication Date Title
US4956807A (en) Watchdog timer
US5961622A (en) System and method for recovering a microprocessor from a locked bus state
KR980004041A (en) System Recovery Device
JPH03175537A (en) Error controller for debugging microprocessor
JPH02176947A (en) Cpu monitoring device
JP2870250B2 (en) Microprocessor runaway monitor
JP3144811B2 (en) Monitoring timer circuit
JP2516711B2 (en) Watchdog timer device
JP3035937B2 (en) Multifunctional telephone
JPS60140440A (en) Central processing unit
US5497481A (en) Microcomputer computer system having plural programmable timers and preventing memory access operations from interfering with timer start requests
JP2731386B2 (en) Control device
JPH04148246A (en) Watchdog timer
JPH01199242A (en) Abnormality detector of microcomputer system
JPH0573360A (en) Watchdog timer
JPH04182842A (en) Timer monitor system
JPS61241848A (en) Fault detecting circuit for electronic computer
JPH02259845A (en) Processor
JPS60544A (en) Controlling system of electric power supply
JPH04236637A (en) Microprocessor fault detecting circuit
JPH0520129A (en) Microprocessor monitoring system
JPS6368941A (en) Operation monitoring device for cpu
JPH09237205A (en) Program runaway detection device
JPH01263709A (en) Resetting control device
JPH0465410B2 (en)