JPH01312638A - Retry controller for abnormality supervisory of micro processor - Google Patents

Retry controller for abnormality supervisory of micro processor

Info

Publication number
JPH01312638A
JPH01312638A JP63145463A JP14546388A JPH01312638A JP H01312638 A JPH01312638 A JP H01312638A JP 63145463 A JP63145463 A JP 63145463A JP 14546388 A JP14546388 A JP 14546388A JP H01312638 A JPH01312638 A JP H01312638A
Authority
JP
Japan
Prior art keywords
signal
program
count
runaway
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.)
Pending
Application number
JP63145463A
Other languages
Japanese (ja)
Inventor
Mitsuki Fukuzumi
福住 光記
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.)
Fuji Electric Co Ltd
Fuji Facom Corp
Original Assignee
Fuji Electric Co Ltd
Fuji Facom 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 Fuji Electric Co Ltd, Fuji Facom Corp filed Critical Fuji Electric Co Ltd
Priority to JP63145463A priority Critical patent/JPH01312638A/en
Publication of JPH01312638A publication Critical patent/JPH01312638A/en
Pending legal-status Critical Current

Links

Landscapes

  • Retry When Errors Occur (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To discriminate the runaway of a program by means of a cause which cannot immediately be restored and the runaway of the program by means of the temporary cause of noise and the like by continuously stopping a system when the count value of re-start has exceeded a set point. CONSTITUTION:Since the output of a watch dog timer reset signal WDTR is again stopped in the process of program execution when the runaway of the program is due to the cause which cannot immediately be restored such as the fault of hardware, bug of software or the like, a micro processor system 2 executes an abnormality processing. A counter circuit 5 adds one to the count value, and the micro processor system 2 stops and initializes the system. Since said action is repeated at the runaway time of the program, the count value of the counter circuit 5 reaches the number of setting times N, and the counter circuit 5 outputs a circuit output signal CTUP. Thus, the runaway of the program can be discriminated whether it is the temporary one or the unrestorable one.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、マイクロプロセッサを使用するシステムにお
いて、プログラムの暴走が生じた際にシステムを初期化
して再起動するためのマイクロプロセッサの異常監視リ
トライ制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a system using a microprocessor, which uses a microprocessor for abnormality monitoring and retry to initialize and restart the system when a runaway program occurs. Regarding a control device.

(従来の技術) マイクロプロセッサ応用システムにおいては、ハードウ
ェアの故障、ソフトウェアのバグ等のシステム自体が有
する修復不可能な原因により、或いはノイズ等の一過性
の外乱等によりプログラムが暴走することがある。この
ようなプログラムの暴走は、誤出力の発生、これに原因
する周辺ハードウェアの誤動作、暴走等を招き、システ
ム全体に悪影響を与える。このため、プログラム暴走時
のシステム保護対策として、従来からウォッチドッグタ
イマ監視装置が知られている。第2図は上記ウォッチド
ッグタイマ監視装置の原理を説明するためのタイムチャ
ート(同図(a))及びフローチャート(同図(b))
であり、この監視装置は、処理プログラムの実行周期(
同図(a)参照)をタイマ等を用いて常時監視するもの
である。
(Prior Art) In microprocessor application systems, programs may run out of control due to unrepairable causes of the system itself such as hardware failures or software bugs, or due to temporary disturbances such as noise. be. Such program runaway causes erroneous output, resulting in malfunction and runaway of peripheral hardware, and adversely affects the entire system. For this reason, watchdog timer monitoring devices have been known as a system protection measure against program runaway. Figure 2 shows a time chart ((a) in the same figure) and a flow chart ((b) in the same figure) for explaining the principle of the watchdog timer monitoring device.
, and this monitoring device monitors the processing program execution cycle (
(see (a) in the same figure) is constantly monitored using a timer or the like.

すなわち、正常な状態では一定の監視期間Twより短い
プログラム実行周期でタイマリセット信号WDTRを出
力し、タイマを繰返しリセットするので、ウォッチドッ
グタイマ監視装置はプログラムに異常が発生したとは判
断しない。これに対し、監視期間Tvをオーバーしても
前記タイマがリセットされないときには、ウォッチドッ
グタイマ監視装置はマイクロプロセッサシステムのソフ
トウェア或いはハードウェアに異常が生じたちのと判断
し、マイクロプロセッサシステムにプログラムの割込を
かけ、異常処理(例えば、異常が生じた原因を調査し、
デイスプレィ等において警告する)を行う(ステップS
 101)一方、ソフト的にマイクロプロセッサを停止
させる(ステップS 102)。
That is, in a normal state, the timer reset signal WDTR is output at a program execution cycle shorter than the fixed monitoring period Tw, and the timer is reset repeatedly, so the watchdog timer monitoring device does not determine that an abnormality has occurred in the program. On the other hand, if the timer is not reset even after the monitoring period Tv has elapsed, the watchdog timer monitoring device determines that an abnormality has occurred in the software or hardware of the microprocessor system, and assigns a program to the microprocessor system. to handle the abnormality (for example, investigate the cause of the abnormality,
give a warning on the display, etc.) (step S)
101) Meanwhile, the microprocessor is stopped using software (step S102).

ところで、前記異常処理プログラムそのものが暴走によ
り既に破壊されてしまっている場合やアドレスバス、メ
モリ、レジスタなどの障害等、各種のハードウェアに生
じた異常により異常処理プログラム自体が正常に機能で
きない場合も生じ得るので、上記原理に基づくウォッチ
ドッグタイマ監視装置では適確な監視を行うことができ
ない。
By the way, there are cases where the abnormality processing program itself has already been destroyed due to runaway, or the abnormality processing program itself cannot function normally due to abnormalities that occur in various hardware such as failures in the address bus, memory, registers, etc. Therefore, the watchdog timer monitoring device based on the above principle cannot perform accurate monitoring.

このような事態に対処するための監視装置の構成及び動
作を、第3図〜第5図により説明する。
The configuration and operation of a monitoring device for dealing with such a situation will be explained with reference to FIGS. 3 to 5.

第3図において、マイクロプロセッサシステム21に対
し監視期間がそれぞれTwA、TVs(TwA<Twa
)であるウォッチドッグタイマ(以下rWDT回路」と
いう)22A、22Bを使用し、各VDT回路22A。
In FIG. 3, the monitoring periods for the microprocessor system 21 are TwA and TVs (TwA<Twa
), each VDT circuit 22A uses a watchdog timer (hereinafter referred to as rWDT circuit) 22A, 22B.

22Bの出力である割込信号iRT及び停止信号μ5T
OPをそれぞれマイクロプロセッサシステム21の割込
入力、停止入力とする構成となっている。
Interrupt signal iRT and stop signal μ5T which are the output of 22B
The configuration is such that OP is used as an interrupt input and a stop input of the microprocessor system 21, respectively.

この監視装置の動作を第4図により説明すると。The operation of this monitoring device will be explained with reference to FIG.

まず、正常時においては、プログラム実行周期ごとにマ
イクロプロセッサシステム21はタイマリセット信号W
DTRを出力しているので、VDT回路22A、22B
のいずれも割込信号iRT或いは停止信号μ5TOPを
出力しない。
First, under normal conditions, the microprocessor system 21 sends a timer reset signal W every program execution cycle.
Since it outputs DTR, VDT circuits 22A and 22B
None of them outputs the interrupt signal iRT or the stop signal μ5TOP.

一方、マイクロプロセッサシステム21に異常が生じて
プログラムが暴走すると、マイクロプロセッサシステム
21はWDTRを出力しなくなる(第4図参照。但し、
同図においてはWDTRとして示しである)。このため
、VDT回路22Aのタイマ(図示せず)はリセットさ
れないので、カウント開始から予め設定されている一定
時間Tw^経過後に第1のカウントアツプ信号である割
込信号iRTを出力する。このiRTの入力によりマイ
クロプロセッサシステム21内部では異常処理が行われ
る。 この動作と並行してVDT回路22Bはカウント
開始から時間Twsを経過するとマイクロプロセッサシ
ステム21に第2のカウントアツプ信号である停止信号
μ5TOPを出力し、ハード的にマイクロプロセッサシ
ステム21の動作を停止させる。
On the other hand, if an abnormality occurs in the microprocessor system 21 and the program goes out of control, the microprocessor system 21 will no longer output WDTR (see Figure 4. However,
In the figure, it is shown as WDTR). Therefore, since the timer (not shown) of the VDT circuit 22A is not reset, the interrupt signal iRT, which is the first count-up signal, is output after a preset fixed time Tw has elapsed since the start of counting. Abnormal processing is performed inside the microprocessor system 21 by inputting this iRT. In parallel with this operation, the VDT circuit 22B outputs a stop signal μ5TOP, which is a second count-up signal, to the microprocessor system 21 when the time Tws has elapsed since the start of counting, and hardware stops the operation of the microprocessor system 21. .

第5図は、第3図のプログラム異常監視装置を具体的に
示す回路図である。正常時においては、マイクロプロセ
ッサシステム2(第3図におけるマイクロプロセッサシ
ステム21に相当する)は−定の処理プログラム実行周
期でVDT回路1(第3図におけるWDT回路22A、
22Bに相当する)に対してWDTRを出力しており、
このWDTRはNORゲート3を介してVDT回路1の
リセット端子R3Tにリセット信号として入力される。
FIG. 5 is a circuit diagram specifically showing the program abnormality monitoring device of FIG. 3. Under normal conditions, the microprocessor system 2 (corresponding to the microprocessor system 21 in FIG. 3) runs the VDT circuit 1 (WDT circuit 22A in FIG. 3,
22B) is outputting WDTR,
This WDTR is input as a reset signal to the reset terminal R3T of the VDT circuit 1 via the NOR gate 3.

WDT回路1内部の図示しないタイマは、WDTRの反
転信号であるR8Tが入力されるとタイマのカウントを
解除し、カウントをゼロから再開する。このとき、R3
Tは監視期間TvA、TwB(第4図参照)より短い周
期で入力されるので、VDT回路1はマイクロプロセッ
サシステム2に対しiRT或いはμ5TOPを出力する
こともない。
A timer (not shown) inside the WDT circuit 1 cancels counting when R8T, which is an inverted signal of the WDTR, is input, and restarts counting from zero. At this time, R3
Since T is input at a cycle shorter than the monitoring periods TvA and TwB (see FIG. 4), the VDT circuit 1 does not output iRT or μ5TOP to the microprocessor system 2.

一方、プログラム暴走時においては、マイクロプロセッ
サシステム2はWDTRを出力しないので、WDT回路
1にはR8Tが入力されない。このため、WDT回路1
はその内部のタイマが監視期間Tw^を経過するとプロ
グラムが暴走したと判断し、第1のカウントアツプ信号
iRTをマイクロプロセッサシステム2の割込端子iR
Tに出力し、監視期間Tvsを経過するとμ5TOPに
よりマイクロプロセッサシステム2のシステムリセット
端子R5TにNORゲート8を介し第2のカウントアツ
プ信号である内部リセット信号1RSTを出力する。
On the other hand, when the program runs out of control, the microprocessor system 2 does not output WDTR, so R8T is not input to the WDT circuit 1. Therefore, WDT circuit 1
determines that the program has gone out of control when its internal timer passes the monitoring period Tw^, and sends the first count-up signal iRT to the interrupt terminal iR of the microprocessor system 2.
When the monitoring period Tvs has elapsed, μ5TOP outputs an internal reset signal 1RST, which is a second count-up signal, to the system reset terminal R5T of the microprocessor system 2 via the NOR gate 8.

これにより、マイクロプロセッサシステム2は監視期間
Tw^の経過後であって監視期間TνBの経過前に異常
処理を行い、監視期間TwBを経過後にシステムをハー
ド的に停止させる。
As a result, the microprocessor system 2 performs abnormality processing after the monitoring period Tw^ has elapsed and before the monitoring period TvB has elapsed, and after the monitoring period TwB has elapsed, the system is hardware-stopped.

なお、第5図において、NORゲート3,8の一端子に
入力されるeR3Tはシステムの起動時等に使用する外
部リセット信号である。
In FIG. 5, eR3T input to one terminal of the NOR gates 3 and 8 is an external reset signal used when starting up the system.

(発明が解決しようとする課題) ところで、マイクロプロセッサシステムによっては、プ
ログラムの暴走等の異常により一時的にシステムが停止
状態になったとしても、システムの再起動時に全体の動
作に致命的な影響を与えないときには再起動した方が好
ましい場合もある。
(Problem to be solved by the invention) By the way, depending on the microprocessor system, even if the system is temporarily stopped due to an abnormality such as a runaway program, it may have a fatal effect on the overall operation when the system is restarted. In some cases, it may be preferable to reboot if the

例えば、プログラムの暴走の原因がノイズなどの一過性
の外乱によるものである場合においては、CRT表示部
の機能が一時停止し、或いはキーボード処理部の機能が
一時停止しても、システムを再度初期化して再起動した
場合においては、画面表示が一時的に乱れ、停止するだ
けで、或いは一時的にキー人力が不能になるだけでシス
テム全体としては致命的な影響を受けないので、システ
ムの停止を回避することが好ましい。
For example, if the cause of a runaway program is due to a temporary disturbance such as noise, the system must be restarted even if the CRT display section or keyboard processing section function is temporarily stopped. When restarting after initialization, the screen display will be temporarily disrupted, the screen will only stop, or the keypad will be temporarily disabled, but the system as a whole will not be fatally affected. It is preferable to avoid outages.

一方、プログラムの暴走の異常の原因がハードウェアの
故障、ソフトウェアのバグなどの復旧不可能なものにつ
いては、システムを停止させてシステム全体を保護する
必要がある。
On the other hand, if the cause of the runaway program abnormality is something that cannot be recovered, such as a hardware failure or a software bug, it is necessary to stop the system to protect the entire system.

しかし、従来のシステム保護装置においては、プログラ
ムに暴走が生じた場合におけるシステム保護を、暴走の
原因が一過性のものであろうと復旧不可能なものであろ
うと、これらを俊別することなく基本的にシステムの停
止によって行うこととしているので、上記要請に応えら
れないという不都合があった。
However, with conventional system protection devices, system protection in the event of a runaway program is not performed without distinguishing whether the cause of the runaway is temporary or unrecoverable. Since this is basically done by stopping the system, there is an inconvenience that the above request cannot be met.

更に、第2図に動作原理を示した監視装置では、異常処
理のためのプログラム自体が破壊されると該装置の保護
機能が正常に働かず、また、プログラムの暴走により周
辺ハードウェアが誤モードに陥ったときには、ハードウ
ェアのリセット以外に復旧の手段がない場合にはシステ
ムは上記暴走に対応できない。更に、第3図及び第5図
に示した監視装置では、一過性の異常によりプログラム
が暴走した場合においてもハードウェアの停止信号を自
動的に解除する手段がなかった。
Furthermore, in the monitoring device whose operating principle is shown in Figure 2, if the program itself for handling abnormalities is destroyed, the protection function of the device will not work properly, and peripheral hardware may be put into an incorrect mode due to the program running out of control. When this happens, the system cannot cope with the runaway unless there is a means of recovery other than resetting the hardware. Furthermore, in the monitoring devices shown in FIGS. 3 and 5, there was no means for automatically canceling the hardware stop signal even if the program went out of control due to a temporary abnormality.

本発明は、上記問題点を解決するために提案されたもの
であって、プログラムの暴走時において、マイクロプロ
セッサ停止信号を発生させてシステムをハード的に停止
させて前記暴走によるシステムへの悪影響を最小限とす
ると共に、前記停止から一定時間経過後にマイクロプロ
セッサ停止信号を解除してシステムをハード的、ソフト
的に初期化し再起動することによりシステムの継続運転
を可能とし、更にプログラムの暴走が復旧不可能な原因
に基づく場合には、マイクロプロセッサ停止信号を解除
せずにシステムの停止状態を継続させることで、プログ
ラム暴走による障害の波及を防止するようにしたマイク
ロプロセッサの異常監視リトライ制御装置を提供するこ
とを目的とする。
The present invention was proposed in order to solve the above-mentioned problems, and when a program runs out of control, a microprocessor stop signal is generated to stop the system hardware, thereby preventing the adverse effects on the system due to the runaway. At the same time, after a certain period of time has elapsed since the stop, the microprocessor stop signal is released, the system is initialized by both hardware and software, and the system is restarted, allowing the system to continue operating, and furthermore, preventing the program from running out of control. If the cause is impossible, the microprocessor abnormality monitoring retry control device is designed to prevent the spread of failures due to program runaway by keeping the system in a stopped state without releasing the microprocessor stop signal. The purpose is to provide.

(課題を解決するための手段) 上記目的を達成するために、本発明は、マイクロプロセ
ッサシステムのプログラム実行周期ごとのリセット信号
を入力とし、該リセット信号の入力時点からの時間をタ
イマによりカウントし、このカウント値が予め設定した
第1の監視期間または第2の監視期間を超える前に前記
リセット信号が入力されたときは前記タイマのカウント
を解除して新たにカウントをゼロから再開し、前記カウ
ント値が前記第1の監視期間を超えたときは前記システ
ムに異常処理を行わせるための割込信号としての第1の
カウントアツプ信号を出力し、更に。
(Means for Solving the Problems) In order to achieve the above object, the present invention inputs a reset signal for each program execution cycle of a microprocessor system, and counts the time from the input point of the reset signal using a timer. , if the reset signal is input before the count value exceeds a preset first monitoring period or second monitoring period, the timer is de-counted and the count is restarted from zero, When the count value exceeds the first monitoring period, outputting a first count-up signal as an interrupt signal for causing the system to perform abnormality processing;

前記カウント値が前記第2の監視期間を超えたときは第
2のカウントアツプ信号を出力するウオッチドッグタイ
マの如きプログラム異常検出手段と、前記第2のカウン
トアツプ信号により前記システムのハードウェアの動作
を停止する信号を出力して前記システムを停止させ、こ
の後一定時間経過後に該停止信号を解除して前記システ
ムを初期化。
program abnormality detection means such as a watchdog timer that outputs a second count-up signal when the count value exceeds the second monitoring period; The system is stopped by outputting a signal to stop the system, and after a certain period of time has elapsed, the stop signal is released to initialize the system.

再起動させる微分回路等のシステム停止・再起動手段と
、前記再起動回数が予め設定した回数を超えたときに前
記停止信号の解除を阻止して前記システムの停止を継続
させるカウンタ回路等の再起動回数計数手段とからなる
ものである。
A system stop/restart means such as a differential circuit that restarts the system, and a restart means such as a counter circuit that prevents release of the stop signal and continues stopping the system when the number of restarts exceeds a preset number of times. It consists of a means for counting the number of activations.

(作用) 本発明においては、プログラム実行周期ごとのリセット
信号をプログラム異常検出手段に入力してその入力時点
からの時間をタイマによりカウントシ、カウント値が予
め設定した第1の監視期間を超える前にリセット信号が
入力されたとき及び該カウント値が予め設定した第2の
監視期間を超える前にリセット信号が入力されたときは
、タイマのカウントをゼロから再開する。
(Function) In the present invention, a reset signal for each program execution cycle is input to the program abnormality detection means, the time from the time of input is counted by a timer, and the count value exceeds a preset first monitoring period. When the reset signal is input and when the reset signal is input before the count value exceeds the preset second monitoring period, the timer restarts counting from zero.

プログラム異常検出手段は、前記カウント値が第1の監
視期間を超えたときはマイクロプロセッサシステムに割
込信号を出力し、前記カウント値が第2の監視期間を超
えてなされたときはシステム停止・再起動手段に第2の
カウントアツプ信号を出力する。この信号を受けたシス
テム停止・再起動手段はマイクロプロセッサシステムに
ハードウェア停止信号を出力し、一定時間後に該停止信
号を解除する。
The program abnormality detection means outputs an interrupt signal to the microprocessor system when the count value exceeds a first monitoring period, and outputs an interrupt signal to the microprocessor system when the count value exceeds a second monitoring period. A second count-up signal is output to the restart means. Upon receiving this signal, the system stop/restart means outputs a hardware stop signal to the microprocessor system, and cancels the stop signal after a certain period of time.

そして、マイクロプロセッサシステムは前記割込信号の
入力により異常処理を行い、ハードウェア停止信号及び
その解除信号によってシステムの停止及び初期化、再起
動を行い、前記リセット信号の出力を再開する。また、
再起動回数計数手段は、前記再起動回数が設定値を超え
るときは前記解除信号の駆動を停止して、前記システム
の停止を継続させる。
Then, the microprocessor system performs abnormal processing in response to the input of the interrupt signal, stops, initializes, and restarts the system in response to the hardware stop signal and its release signal, and resumes outputting the reset signal. Also,
When the number of restarts exceeds a set value, the restart number counting means stops driving the release signal to continue stopping the system.

これにより、本発明ではプログラムの暴走が一過性のも
のか復旧不可能なものかを俊別し、一過性のものである
ときはシステムの継続運転を行い、復旧不可能なもので
ある場合にはソフト的、ハード的にシステムを停止させ
ることができる。
As a result, the present invention distinguishes whether a program runaway is temporary or unrecoverable, and if it is temporary, the system continues to operate, and the program is unrecoverable. In such cases, the system can be stopped either through software or hardware.

(実施例) 以下、本発明の一実施例を第1図の回路図により説明す
る。同図において、マイクロプロセッサシステム2から
出力されるウォッチドッグタイマリセット信号WDTR
は、 NORゲート3を介してプログラム異常検出手段
としてのウォッチドッグタイマ(VDT回路)1のリセ
ット端子R3Tにリセット信号R5Tとして入力される
ように接続されている。 NORゲート3には上記VD
THの他、マイクロプロセッサシステム2の起動時等に
おいて外部リセット信号eRSTが入力されており、こ
のeR8Tが低レベルとなると低レベル信号を出力して
VDT回路1をリセットするものである。
(Embodiment) An embodiment of the present invention will be described below with reference to the circuit diagram of FIG. In the figure, the watchdog timer reset signal WDTR output from the microprocessor system 2
is connected to a reset terminal R3T of a watchdog timer (VDT circuit) 1 as a program abnormality detection means via a NOR gate 3 so as to be input as a reset signal R5T. The above VD is applied to NOR gate 3.
In addition to TH, an external reset signal eRST is input at the time of starting up the microprocessor system 2, etc. When eR8T becomes low level, a low level signal is output to reset the VDT circuit 1.

WDT回路1は、R5Tにより、内部の図示しないタイ
マのカウントを解除してカウントをゼロから再開する一
方、前記タイマによるカウントが予め設定された監視期
間TwA(第4図参照)を超えてなされると出力端子i
RTから第1のカウントアツプ信号である割込信号iR
Tを出力し、前記カウントが予め設定された監視期間T
ws(同図参照)を超えてなされると、出力端子μ5T
OPから第2のカウントアツプ信号であるマイクロプロ
セッサシステム停止信号μ5TOPを出力するように構
成されている。
In the WDT circuit 1, R5T cancels the counting of an internal timer (not shown) and restarts the counting from zero, while the counting by the timer exceeds a preset monitoring period TwA (see FIG. 4). and output terminal i
Interrupt signal iR which is the first count up signal from RT
T, and the monitoring period T during which the count is set in advance.
ws (see the same figure), the output terminal μ5T
It is configured to output a microprocessor system stop signal μ5TOP, which is a second count-up signal, from OP.

また、前記出力端子iRTはマイクロプロセッサシステ
ム2の入力端子iRTに接続され、前記出力端子μ5T
OPは、システム停止・再起動手段としての微分回路4
の入力端子及び再起動回数計数手段としてのカウンタ回
路5のクロック端子CKに接続されている他、ANDゲ
ート7の一入力端子にも接続されている。
Further, the output terminal iRT is connected to the input terminal iRT of the microprocessor system 2, and the output terminal μ5T
OP is the differential circuit 4 as a system stop/restart means.
In addition to being connected to the input terminal of , and the clock terminal CK of a counter circuit 5 serving as means for counting the number of restarts, it is also connected to one input terminal of an AND gate 7 .

微分回路4はμ5TOPを微分してパルス信号DEFを
出力するものであり、その出力側はNORゲート6の一
入力端子に接続されている。
The differentiating circuit 4 differentiates μ5TOP and outputs a pulse signal DEF, and its output side is connected to one input terminal of the NOR gate 6.

カウンタ回路5はμ5TOPの立上りをカウントし、該
カウントが予め設定したカウント数Nとなったときは高
レベル信号CTUPを出力するように構成されており、
その出力端子はANDゲート7の他の入力端子に接続さ
れている。また、カウンタ回路5にはリセット端子R3
Tが設けられており、該端子R3Tには前記eR3Tが
入力され、このeR8Tが低レベルとなるとカウンタ回
路5はリセットされる。
The counter circuit 5 is configured to count the rising edge of μ5TOP, and output a high level signal CTUP when the count reaches a preset count number N.
Its output terminal is connected to the other input terminal of AND gate 7. The counter circuit 5 also has a reset terminal R3.
The eR3T is input to the terminal R3T, and when the eR8T becomes low level, the counter circuit 5 is reset.

また、ANDゲート7の出力端子はNORゲート6の一
入力端子に接続されており、NORゲート6の入力端子
には上述したようにANDゲート7の出力信号及び微分
回路4の出力信号が入力される他、前記eR3Tが入力
され、このeR3Tが低レベルになると低レベルの信号
を出力するようになっている。更に、NORゲート6の
出力端子はマイクロプロセッサシステム2の内部リセッ
ト端子R3Tに接続されている。
Further, the output terminal of the AND gate 7 is connected to one input terminal of the NOR gate 6, and the output signal of the AND gate 7 and the output signal of the differentiating circuit 4 are inputted to the input terminal of the NOR gate 6 as described above. In addition, the eR3T is input, and when this eR3T becomes low level, a low level signal is output. Furthermore, the output terminal of the NOR gate 6 is connected to the internal reset terminal R3T of the microprocessor system 2.

以下、本実施例の作用を説明する。The operation of this embodiment will be explained below.

プログラム正常時においては、マイクロプロセッサシス
テム2はプログラム実行周期でWDTRを出力する。こ
のWDTRはNORゲート3を介して反転され、VDT
回路1のリセット端子R3Tに1百了として出力される
When the program is normal, the microprocessor system 2 outputs WDTR at the program execution cycle. This WDTR is inverted via NOR gate 3 and VDT
It is output to the reset terminal R3T of circuit 1 as 100 completions.

VDT回路1はRSTが入力されると内部タイマのカウ
ントを解除し、カウントをゼロから再開する。このとき
、RSTは監視期間T MA 、 T usより短い周
期ごとに内部タイマをリセットするので、VDT回路1
はマイクロプロセッサシステム2に対しiRTを出力す
ることがなく、また、微分回路4.カウンタ回路5.A
NDゲート7の何れにもμ5TOPを出力することもな
い。
When RST is input, the VDT circuit 1 cancels the count of the internal timer and restarts counting from zero. At this time, since RST resets the internal timer every cycle shorter than the monitoring period T MA , T us , the VDT circuit 1
does not output iRT to the microprocessor system 2, and the differentiating circuit 4. Counter circuit 5. A
μ5TOP is not output to any of the ND gates 7.

一方、プログラム暴走時においては、マイクロプロセッ
サシステム2はWDTRを出力しないのでWDT回路上
にはRSTが入力されない。このため、VDT回路1は
その内部のタイマが監視期間Tw^を経過するとプログ
ラムが暴走したと判断してiRTをマイクロプロセッサ
システム2に出力し、監視期間TすBを経過するとμ5
TOPを微分回路4.カウンタ回路5及びANDゲート
7に出力する。
On the other hand, when the program runs out of control, the microprocessor system 2 does not output WDTR, so RST is not input to the WDT circuit. Therefore, when the internal timer of the VDT circuit 1 passes the monitoring period Tw^, it determines that the program has gone out of control and outputs iRT to the microprocessor system 2, and when the monitoring period TSB passes, μ5
Differentiating circuit 4. It is output to the counter circuit 5 and AND gate 7.

カウンタ回路5は、入力したμ5TOPの立上りでμ5
TOPの回数をカウントし、カウント値が設定回数Nと
なるとCTUPを出力するが、いま前記カウンタ値がま
だ前記設定回数Nになっていないものとすると、AND
ゲート7は低レベルの信号を出力している。
The counter circuit 5 starts μ5 at the rising edge of the input μ5TOP.
The number of TOP is counted, and when the count value reaches the set number of times N, CTUP is output. However, assuming that the counter value has not yet reached the set number of times N, AND
Gate 7 outputs a low level signal.

微分回路4は、入力したμ5TOPを微分し、マイクロ
プロセッサシステム2をリセットするために十分な時間
幅のパルスDEFを生成してNORゲート6に出力する
。 NORゲート6は、μ5TOPを反転し、1R3T
としてマイクロプロセッサシステム2の内部リセット端
子箱に出力する。
The differentiating circuit 4 differentiates the input μ5TOP, generates a pulse DEF having a time width sufficient to reset the microprocessor system 2, and outputs it to the NOR gate 6. NOR gate 6 inverts μ5TOP and 1R3T
It is output to the internal reset terminal box of the microprocessor system 2 as .

これによりマイクロプロセッサシステム2は1R5Tの
立上りでシステムをハード的に停止し、1R3Tの立下
がりでシステムを初期化して再起動する。この再起動に
より、マイクロプロセッサシステム2は再びWDTRを
出力し始め、WDT回路1の出力iRT、μ5TOPを
解除する。
As a result, the microprocessor system 2 hardware stops the system at the rising edge of 1R5T, and initializes and restarts the system at the falling edge of 1R3T. By this restart, the microprocessor system 2 starts outputting WDTR again and releases the outputs iRT and μ5TOP of the WDT circuit 1.

ここで、プログラムの暴走がノイズ等の一過性の原因に
よるものである場合には、マイクロプロ (セッサシス
テム2はこの後、正常な運転を再開することがができる
Here, if the runaway of the program is due to a temporary cause such as noise, the microprocessor system 2 can resume normal operation after this.

一方、プログラムの暴走がハードウェアの故障、ソフト
ウェアのバグ等による即時復旧可能な原因によるもので
ある場合には、プログラム実行の過程においてWDTR
の出力が再度停止されるので。
On the other hand, if the program runaway is due to a cause that can be immediately recovered, such as a hardware failure or software bug, the WDTR is
so the output will be stopped again.

マイクロプロセッサシステム2は異常処理を行い。Microprocessor system 2 performs abnormality processing.

カウンタ回路5はカウント値に1を加算し、マイクロプ
ロセッサシステム2は前記のシステムの停止・初期化を
行う。プログラム暴走時においては上記動作が繰り返さ
れるので、カウンタ回路5のカウント値はやがて設定回
数Nに達し、カウンタ回路5はCTUPを出力する。
The counter circuit 5 adds 1 to the count value, and the microprocessor system 2 stops and initializes the system. Since the above operation is repeated during program runaway, the count value of the counter circuit 5 eventually reaches the set number N, and the counter circuit 5 outputs CTUP.

これにより、ANDゲート7は高レベルの信号を出力し
、NORゲート6は低レベル1R3Tを継続して出力す
るので、マイクロプロセッサシステム2は停止状態を維
持することとなり、この停止状態は外部リセット信号e
R5Tが入力されるまで続くこととなる。
As a result, the AND gate 7 outputs a high level signal and the NOR gate 6 continues to output a low level 1R3T, so the microprocessor system 2 maintains a stopped state, and this stopped state is caused by an external reset signal. e
This continues until R5T is input.

;発明の効果) 以上のように本発明によれば、プログラムの暴走が生じ
た場合において、その異常をプログラム異常検出手段に
より検出しマイクロプロセッサシステムに割込みをかけ
て異常処理を行わせると共に、システムの停止及び再起
動をシステム停止・再起動手段により行う一方、再起動
の回数を再起動回数計数手段によりカウントし、カウン
ト値が設定値を超えたときはシステムを継続的に停止さ
せるようにしたので、即時復旧不能な原因によるプログ
ラムの暴走とノイズなどの一過性の原因によるプログラ
ムの暴走とを俊別することでき、後者に対しては自動的
にシステムをハード的、ソフト的に初期化して再起動す
ることにより、システムを継続して運転することができ
る。
(Effects of the Invention) As described above, according to the present invention, when a program runaway occurs, the abnormality is detected by the program abnormality detection means, the microprocessor system is interrupted to perform abnormal processing, and the system The system is stopped and restarted by a system stop/restart means, while the number of restarts is counted by a restart count means, and when the count value exceeds a set value, the system is stopped continuously. Therefore, it is possible to distinguish between program runaways due to causes that cannot be recovered immediately from program runaways due to temporary causes such as noise, and in the case of the latter, the system is automatically initialized both hardware and software. By restarting the system, you can continue operating the system.

また、再起動回数の上限値を任意に設定することができ
、異常多発時に再起動回数が前記上限値を超えると復旧
不可能な原因によるプログラム暴走であると判断し、自
動的にマイクロプロセッサシステムを停止状態にするこ
とでハード故障やプログラムのバグ等の復旧不可能な障
害にも適切に対応することができる。
In addition, an upper limit value for the number of restarts can be set arbitrarily, and if the number of restarts exceeds the upper limit value when abnormalities occur frequently, it is determined that the program has gone out of control due to an unrecoverable cause, and the microprocessor system automatically By stopping the system, it is possible to appropriately respond to unrecoverable failures such as hardware failures and program bugs.

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

第1図は本発明の一実施例を説明するための回路図、第
2図(a)は従来技術を説明するためのタイムチャート
、同図(b)は同じくフローチャート、第3図は従来技
術の構成を説明するためのブロック図、第4図は本発明
の一実施例及び従来技術を説明するためのタイムチャー
ト、第5図は第3図のブロック図に対応する回路図であ
る。 1・・・ウォッチドッグタイマ 2・・・マイクロプロセッサシステム 3.6・・・NORゲート    4・・・微分回路5
・・・カウンタ回路    7・・・ANDゲートWD
TR・・・ウォッチドッグタイマリセット信号iRT・
・・割込信号(第1のカウントアツプ信号)μ5TOP
・・・マイクロプロセッサシステム停止信号(第2のカ
ウントアツプ信号) DEF・・・微分回路出力信号 CTUP・・・カウンタ回路出力信号 1R8T・・・内部リセット信号 eR8T・・・外部リセット信号
FIG. 1 is a circuit diagram for explaining one embodiment of the present invention, FIG. 2(a) is a time chart for explaining the prior art, FIG. 2(b) is a flowchart, and FIG. 3 is the prior art. FIG. 4 is a time chart for explaining an embodiment of the present invention and the prior art, and FIG. 5 is a circuit diagram corresponding to the block diagram of FIG. 3. 1...Watchdog timer 2...Microprocessor system 3.6...NOR gate 4...Differential circuit 5
...Counter circuit 7...AND gate WD
TR...Watchdog timer reset signal iRT.
...Interrupt signal (first count up signal) μ5TOP
... Microprocessor system stop signal (second count up signal) DEF ... Differentiation circuit output signal CTUP ... Counter circuit output signal 1R8T ... Internal reset signal eR8T ... External reset signal

Claims (1)

【特許請求の範囲】  マイクロプロセッサシステムのプログラム実行周期ご
とのリセット信号を入力とし、該リセット信号の入力時
点からの時間をタイマによりカウントし、このカウント
値が予め設定した第1の監視期間または第2の監視期間
を超える前に前記リセット信号が入力されたときは前記
タイマのカウントを解除して新たにカウントをゼロから
再開し、前記カウント値が前記第1の監視期間を超えた
ときは前記システムに異常処理を行わせるための割込信
号としての第1のカウントアップ信号を出力し、更に、
前記カウント値が前記第2の監視期間を超えたときは第
2のカウントアップ信号を出力するプログラム異常検出
手段と、 前記第2のカウントアップ信号により前記システムのハ
ードウエアの動作を停止する信号を出力して前記システ
ムを停止させ、この後一定時間経過後に該停止信号を解
除して前記システムを初期化、再起動させるシステム停
止・再起動手段と、前記再起動回数が予め設定した回数
を超えたときに前記停止信号の解除を阻止して前記シス
テムの停止を継続させる再起動回数計数手段と、からな
ることを特徴とするマイクロプロセッサの異常監視リト
ライ制御装置。
[Claims] A reset signal for each program execution cycle of the microprocessor system is input, and a timer counts the time from the input point of the reset signal, and this count value is set in a preset first monitoring period or first monitoring period. When the reset signal is input before the second monitoring period has passed, the timer is deactivated and the count is restarted from zero, and when the count value exceeds the first monitoring period, the timer is reset. outputting a first count-up signal as an interrupt signal for causing the system to perform abnormal processing;
program abnormality detection means for outputting a second count-up signal when the count value exceeds the second monitoring period; and a signal for stopping the operation of hardware of the system by the second count-up signal. a system stop/restart means for outputting an output to stop the system, and then canceling the stop signal after a certain period of time has passed to initialize and restart the system; 1. An abnormality monitoring retry control device for a microprocessor, comprising restart count means for preventing cancellation of the stop signal and causing the system to continue stopping when the system is stopped.
JP63145463A 1988-06-13 1988-06-13 Retry controller for abnormality supervisory of micro processor Pending JPH01312638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63145463A JPH01312638A (en) 1988-06-13 1988-06-13 Retry controller for abnormality supervisory of micro processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63145463A JPH01312638A (en) 1988-06-13 1988-06-13 Retry controller for abnormality supervisory of micro processor

Publications (1)

Publication Number Publication Date
JPH01312638A true JPH01312638A (en) 1989-12-18

Family

ID=15385821

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63145463A Pending JPH01312638A (en) 1988-06-13 1988-06-13 Retry controller for abnormality supervisory of micro processor

Country Status (1)

Country Link
JP (1) JPH01312638A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07129425A (en) * 1993-10-29 1995-05-19 Hitachi Ltd Reboot processing method
JPH07334381A (en) * 1994-06-03 1995-12-22 Brother Ind Ltd Abnormality detector for equipment
JPH0991171A (en) * 1995-09-20 1997-04-04 Sharp Corp Runaway detection and recovery system
JPH11149303A (en) * 1997-09-10 1999-06-02 Omron Corp Controller and its control method
JP2000207252A (en) * 1999-01-19 2000-07-28 Nec Eng Ltd Remote controller, fault information processing method therefor and recording medium recorded with control program therefor
JP2012073900A (en) * 2010-09-29 2012-04-12 Denso Corp Monitoring device and electronic control system
JP2018132976A (en) * 2017-02-16 2018-08-23 株式会社デンソー On-vehicle electronic control device
JP2019128817A (en) * 2018-01-25 2019-08-01 株式会社デンソー Electronic control device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6123202A (en) * 1984-07-10 1986-01-31 Nippon Denso Co Ltd Fault monitor device of electronic circuit
JPS6267645A (en) * 1985-09-20 1987-03-27 Canon Inc Processor controller
JPS63111549A (en) * 1986-10-28 1988-05-16 Mitsubishi Electric Corp Preventing circuit for abnormal working of microcomputer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6123202A (en) * 1984-07-10 1986-01-31 Nippon Denso Co Ltd Fault monitor device of electronic circuit
JPS6267645A (en) * 1985-09-20 1987-03-27 Canon Inc Processor controller
JPS63111549A (en) * 1986-10-28 1988-05-16 Mitsubishi Electric Corp Preventing circuit for abnormal working of microcomputer

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07129425A (en) * 1993-10-29 1995-05-19 Hitachi Ltd Reboot processing method
JPH07334381A (en) * 1994-06-03 1995-12-22 Brother Ind Ltd Abnormality detector for equipment
JPH0991171A (en) * 1995-09-20 1997-04-04 Sharp Corp Runaway detection and recovery system
JPH11149303A (en) * 1997-09-10 1999-06-02 Omron Corp Controller and its control method
JP2000207252A (en) * 1999-01-19 2000-07-28 Nec Eng Ltd Remote controller, fault information processing method therefor and recording medium recorded with control program therefor
JP2012073900A (en) * 2010-09-29 2012-04-12 Denso Corp Monitoring device and electronic control system
JP2018132976A (en) * 2017-02-16 2018-08-23 株式会社デンソー On-vehicle electronic control device
JP2019128817A (en) * 2018-01-25 2019-08-01 株式会社デンソー Electronic control device

Similar Documents

Publication Publication Date Title
JP3633092B2 (en) Microcomputer failure monitoring device
JPH01312638A (en) Retry controller for abnormality supervisory of micro processor
JP2870250B2 (en) Microprocessor runaway monitor
JPH11259340A (en) Reactivation control circuit for computer
WO2014112039A1 (en) Information processing device, method for controlling information processing device and information processing device control program
US6934893B1 (en) Method of monitoring the activation of programmed sequences of a programmed system and computer program and apparatus for implementing same
JPH02293939A (en) Stack overflow detection time processing system
JPH04195437A (en) Program runaway monitoring device
US20230236914A1 (en) Watchdog timer device
JPH04148246A (en) Watchdog timer
JPH05233374A (en) Watchdog timer device
JPH05158750A (en) Malfunction preventing circuit for microcomputer
JPH08123704A (en) Controller
JPH04369046A (en) Test system for active check circuit
JPH06103467B2 (en) Preventing malfunction of automobile computer
JPH03246638A (en) Program runaway detecting system
JPH0218633A (en) Runaway monitor/restart circuit for microprocessor
JPH0433138A (en) Cpu runaway monitoring system
JPH0736161B2 (en) CPU abnormality detection device
JPH05257748A (en) Microprocessor device
JPH0469744A (en) Runaway detector for microcomputer
JPH01310422A (en) Resetting circuit for microcomputer
JPH0612294A (en) Monitor device
JPH0293738A (en) Interruption processing system
JPS63280345A (en) Detection of program abnormality