JPS60214051A - Detecting circuit for microcomputer runaway - Google Patents

Detecting circuit for microcomputer runaway

Info

Publication number
JPS60214051A
JPS60214051A JP59069924A JP6992484A JPS60214051A JP S60214051 A JPS60214051 A JP S60214051A JP 59069924 A JP59069924 A JP 59069924A JP 6992484 A JP6992484 A JP 6992484A JP S60214051 A JPS60214051 A JP S60214051A
Authority
JP
Japan
Prior art keywords
signal
counter
basic clock
circuit
detection
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
JP59069924A
Other languages
Japanese (ja)
Inventor
Takeshi Sakata
武司 坂田
Yoshibumi Uchise
義文 内勢
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.)
Hanshin Electric Co Ltd
Original Assignee
Hanshin Electric Co 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 Hanshin Electric Co Ltd filed Critical Hanshin Electric Co Ltd
Priority to JP59069924A priority Critical patent/JPS60214051A/en
Publication of JPS60214051A publication Critical patent/JPS60214051A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Abstract

PURPOSE:To detect securely whether a basic clock is long or short and an oscillation stop by generating a counter reset signal, abnormal detection timing signal, and counter enable signal according to the timing of the basic clock, and controlling the counter. CONSTITUTION:The basic clock is inputted from a microcomputer 1 to a control signal generating circuit 3 to generate a counter reset signal, abnormality detection timing signal, and counter enable signal corresponding to the leading edge and trailing edge of the basic clock, and those are inputted to a counter 8 and the abnormal amplitude detecting circuit 8. An abnormal oscillation detecting circuit 5 monitors abnormality of the output of the counter 4 to detect abnormal oscillation and an oscillation stop detecting circuit 6 detects an oscillation stop. Outputs of those detecting circuits 5 and 6 are inputted to a signal composing circuit 7, which outputs a total abnormality detection signal.

Description

【発明の詳細な説明】 本発明はマイクロコンピュータの発振する基本クロック
の長短周期異常及び発振の停止を検出し、もって当該マ
イクロコンピュータの暴走を検知するマイクロコンピュ
ータ暴走検知回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a microcomputer runaway detection circuit that detects an abnormality in the long or short cycle of a basic clock oscillated by a microcomputer and a stoppage of oscillation, thereby detecting runaway of the microcomputer.

マイクロコンピュータの暴走を検知し、速やかに復旧を
図るためには、当該マイクロコンピュータの発振する基
本クロックの周期を監視し、それが常に正しい範囲内に
あるか否かを検出する必要がある。
In order to detect runaway in a microcomputer and promptly recover it, it is necessary to monitor the cycle of the basic clock oscillated by the microcomputer and detect whether it is always within the correct range.

このために従来用いられている基本クロック周期の異常
検出回路としてはウォッチドッグタイマと呼ばれるもの
がある。
For this purpose, there is a circuit called a watchdog timer as a basic clock cycle abnormality detection circuit conventionally used.

これは被検査対象としての基本クロックによりコンデン
サを充電し、その両端電位を監視するもので、当該基本
クロックが正常に出ている間はコンデンサ両端電位も成
る一定範囲内に落ち着いているが基本クロックの周期が
異常に長くなるとコンデンサ両端電位が閾値を下回って
低下することを利用し、当該基本クロックの長周期化異
常を検出するものである。
This charges a capacitor using the basic clock as the object to be inspected, and monitors the potential across it.While the basic clock is outputting normally, the potential across the capacitor also remains within a certain range, but the basic clock When the period of the basic clock becomes abnormally long, the potential across the capacitor drops below a threshold value, which is used to detect an abnormality in the period of the basic clock.

然し、こうした原理による従来の暴走検出回路乃至基本
クロック周期の異常検出回路は、基本クロック周期が異
常に短くなった場合、即ち短周期化異常はこれを検出す
ることができないという欠点を有していた。
However, conventional runaway detection circuits or basic clock cycle abnormality detection circuits based on this principle have the drawback that they cannot detect when the basic clock cycle becomes abnormally short, that is, short cycle abnormalities. Ta.

本発明はこの点に鑑みて成されたもので、マイクロコン
ピュータの発振する基本クロック周期が正常動作状態と
看做せる許容周期(乃至間接的にはパルス幅)範囲を越
え異常に長くなった場合はもとより、異常に短くなった
場合、更には長周期化異常の一典型としての発振の停止
をも同様にこれを検出できるマイクロコンピュータ暴走
検知回路を提供せんとするものである。
The present invention has been made in view of this point, and is intended to be used when the basic clock period oscillated by a microcomputer becomes abnormally long beyond the permissible period (or indirectly, pulse width) range that can be considered to be in a normal operating state. In addition, it is an object of the present invention to provide a microcomputer runaway detection circuit that can similarly detect when the period becomes abnormally short, and furthermore, when the oscillation stops as a typical example of a long period abnormality.

以下、添附図面に示す本発明の実施例を通じて本発明の
構成及び作用、効果に就き説明するか、先づ第1図は本
発明のマイクロコンピュータ暴走検知回路の原理的乃至
基本的一実施例を示している。
Hereinafter, the structure, operation, and effects of the present invention will be explained through embodiments of the present invention shown in the accompanying drawings. First, FIG. 1 shows a principle or basic embodiment of the microcomputer runaway detection circuit of the present invention. It shows.

被検査対象はマイクロコンピュータ1の発振する基本ク
ロックCPであるが、この基本クロックCPはマイクロ
コンピュータ1に外付けの外部発振器2の発振するマス
タクロックPOを適宜分周して得られ、正規にプログラ
ムが実行されている場合、一般にデユーティ50%のパ
ルス列となる。
The object to be tested is the basic clock CP oscillated by the microcomputer 1. This basic clock CP is obtained by appropriately dividing the master clock PO oscillated by the external oscillator 2 attached to the microcomputer 1, and is not properly programmed. is executed, the pulse train generally has a duty of 50%.

従って当該基本クロックCPは、論理的に゛H′″レベ
ル、“°L°“レベルいづれにある時もそのパルス幅は
共に等しくToである。本実施例では先づ、発振はして
いるがその周期が異常であることを検出するためにこの
パルス幅乃至半周期Toを監視する。
Therefore, when the basic clock CP is logically at the "H'" level and the "°L°" level, its pulse width is the same, To.In this embodiment, first, although it oscillates, This pulse width or half cycle To is monitored to detect that the cycle is abnormal.

そして、長周期化異常の一典型としての発振の停止検出
は、例えば基本クロックCPの一周期2・T。
The detection of oscillation stop as a typical example of a long-period abnormality is, for example, one period of 2·T of the basic clock CP.

に成る程度の余裕時間δを加えて考え、この時間に亘っ
て基本クロ・ンクCPに論理の反転が見られるか否かを
判断して為す。
This is done by adding a margin time δ to the extent that .

面して、本発明においてはこうした基本クロックCPは
先づ制御信号発生回路3に与えられる。この制御信号発
生回路3は、当該基本クロックCPの正方向または負方
向への立ち上がり縁、立ち下がり縁を各検出し、立ち上
がり縁に対応させてはカウンタリセット信号Srを、立
ち下がり縁に対応させてはゲート信号乃至異常検出タイ
ミング信号Sgを各発生するもので、これら両信号Sr
、Sgのいづれをも発生させることがない時にはカウン
タイネーブル信号S!!を発生する。
On the other hand, in the present invention, such basic clock CP is first given to the control signal generation circuit 3. This control signal generation circuit 3 detects each rising edge and falling edge in the positive or negative direction of the basic clock CP, and generates a counter reset signal Sr corresponding to the rising edge and a counter reset signal Sr corresponding to the falling edge. generates a gate signal or an abnormality detection timing signal Sg, and these signals Sr
, Sg is not generated, the counter enable signal S! ! occurs.

カウンタリセッ)・信号Sr及びカウンタイネーブル信
号Seは共にカウンタ8に与えられ、当該カウンタ8で
はカウンタイネーブル信号Seを受けている時にマスタ
クロックPaをカウントし、逐次その結果をカウント出
力Scとして出力する。勿論、カウンタリセット信号S
rが与えられた時にはカウント内容Scを帰零する。
Both the counter reset signal Sr and the counter enable signal Se are applied to a counter 8, which counts the master clock Pa while receiving the counter enable signal Se and sequentially outputs the result as a count output Sc. Of course, the counter reset signal S
When r is given, the count content Sc is reset to zero.

異常発振検出回路5では上記カウンタ8のカウント出力
Scを常時監視しており、カウンタイネーブル信号Se
の発生後、マスタクロックPoをカウント内容て所定の
数値範囲に至った時点が検出タイミング信号Sgの発生
時点に合致するか否か、乃至はハード的に設定した所定
の数値範囲内にこのカウント出力Scがあるか否かを弁
別する。
The abnormal oscillation detection circuit 5 constantly monitors the count output Sc of the counter 8 and outputs a counter enable signal Se.
After the generation of , check whether the time when the master clock Po reaches a predetermined numerical range coincides with the generation time of the detection timing signal Sg, or whether this count output is within a predetermined numerical range set by hardware. It is determined whether Sc is present or not.

従って、制御信号発生回路3から検出タイミング信号S
gが与えられた時に当該異常発振検出回路5においてカ
ウント出力Scが所定範囲内から外れていれば、乃至所
定の数値範囲をカウントした時点が検出タイミング信号
Sgの発生タイミングと狂っていれば、それは基本クロ
ックCPに長短いづれかの周期異常が生した結果であり
、当該異常発振検出回路5から異常発振検出信号Saが
出力され、信号合成回路7を介して総合的な異常検出信
号Soか出力される。
Therefore, the detection timing signal S from the control signal generation circuit 3
If the count output Sc of the abnormal oscillation detection circuit 5 is outside the predetermined range when g is given, or if the time point at which the predetermined numerical range is counted is out of line with the generation timing of the detection timing signal Sg, then This is the result of either a long or short cycle abnormality occurring in the basic clock CP, and the abnormal oscillation detection circuit 5 outputs an abnormal oscillation detection signal Sa, and the signal synthesis circuit 7 outputs a comprehensive abnormality detection signal So. .

カウント出力Scはまた、発振停止検出回路6にも与え
られ、当該発振停止検出回路6では、カウンタリセット
信号Srが立ち下がった後、既述した時間(2・To+
δ)から当該カウンタリセット信号Srのパルス幅αを
差し引いた曲間T2を経過したに相当するカウント値情
報が与えられた時に発振停止検出信号Ssを出力し、先
の異常発振検出信号Saと同様に信号合成回路7を介し
て総合的な異常検出信号Soとして出力する。
The count output Sc is also given to the oscillation stop detection circuit 6, and in the oscillation stop detection circuit 6, after the counter reset signal Sr falls, the above-mentioned time (2・To+
When the count value information corresponding to the elapse of the song interval T2 obtained by subtracting the pulse width α of the counter reset signal Sr from δ) is given, the oscillation stop detection signal Ss is output, similar to the previous abnormal oscillation detection signal Sa. It is then output as a comprehensive abnormality detection signal So via the signal synthesis circuit 7.

逆にカウント出力Scが相当時間に亘って上記の値に至
ることがなければ、それは上記時間12以内にカウンタ
リセット信号Srが発生していること、即ち基本クロッ
クが立ち上がりを持つ発振をしていることを意味するか
ら、勿論、発振停止検出信号Ssは出力しない。
Conversely, if the count output Sc does not reach the above value for a considerable period of time, this means that the counter reset signal Sr has been generated within the above time 12, that is, the basic clock is oscillating with a rising edge. Therefore, of course, the oscillation stop detection signal Ss is not output.

」1記の異常発振検出信号Saと発振停止検出信号Ss
を合成した総合的な異常検出信号SOをどのように利用
するかは本発明が直接にこれを規定するものではないが
、一般的に考えられる用途としてはこれをマイクロコン
ピュータ1のりセット信号として利用することである。
”1 abnormal oscillation detection signal Sa and oscillation stop detection signal Ss
Although the present invention does not directly specify how to use the comprehensive abnormality detection signal SO synthesized from the It is to be.

基本クロックCPに何等かの異常が生じた時には当該マ
イクロコンピュータlを初期状態に戻すのが一番安全だ
からである。
This is because when some abnormality occurs in the basic clock CP, it is safest to return the microcomputer l to its initial state.

第2,3図は」1記第1図示の原理的な実施例に即して
構成しためや具体的な実施例及びその各部波形図を示し
ている。
2 and 3 show a construction and a specific embodiment based on the principle embodiment shown in FIG. 1, and waveform diagrams of each part thereof.

第2図における被検査対象基本クロックcpの発振器と
してのマイクロコンピュータ1は、リセット入力が電源
電位乃至論理°“H”に引き上げられている時に稼動可
能な状態にあり、略ぐ接地電位乃至論理” L ”に引
き落とされると少なくとも一旦はりセントされるものと
する。即ち、総合的異常検出信号乃至マイクロコンピュ
ータリセット信号SOは論理” L ”において有意で
ある。但し勿論、これに限′らず、マイクロコンピュー
タリセット信号Soの形態は対象となるマイクロコンピ
ュータのリセット態様に合致させれば良い。また、本実
施例では、カウンタ8としてイネーブル入力付きのバイ
ナリカウンタを用いているが、その容量乃至出力ビツト
数に就いては下記説明を満足するように適宜のものを選
べば良い。
The microcomputer 1 as an oscillator of the basic clock CP to be tested in FIG. 2 is in an operable state when the reset input is pulled up to the power supply potential or logic "H", which is approximately ground potential or logic "H". When the amount is withdrawn to "L", it shall be credited at least once. That is, the comprehensive abnormality detection signal or microcomputer reset signal SO is significant at logic "L". However, the present invention is not limited to this, and the form of the microcomputer reset signal So may be matched to the reset mode of the target microcomputer. Further, in this embodiment, a binary counter with an enable input is used as the counter 8, but its capacity and number of output bits may be appropriately selected so as to satisfy the following explanation.

マイクロコンピュータ1からの基本クロックCPは制御
信号発生回路3内のインバータ31を介して反転された
後、積分回路32に与えられる。従って第2図中、0点
の信号波形は第3図中、三段目に示すように、その立ち
上がり、立ち下がりの各縁部が積分回路32を構成する
抵抗RとキャパシタCとで定ま゛る時定数に従って鈍っ
たものとなる。この過渡期の波形部分は図中では簡単の
ため、直線近似して示している。
The basic clock CP from the microcomputer 1 is inverted via the inverter 31 in the control signal generating circuit 3 and then applied to the integrating circuit 32. Therefore, as shown in the third row of FIG. 3, the signal waveform at point 0 in FIG. It becomes dull depending on the time constant. The waveform portion during this transitional period is shown as a straight line approximation for simplicity in the figure.

而して先づカウンタリセット信号Srは、上記0点の信
号と基本クロックCPとのアンドをアンドゲート33で
採ることによって作られる。即ち、当該アントゲ−1・
33の入力における高低遷移闇値や抵抗Rとキャパシタ
Cによる時定数を適当に定めれば、第3図中、0点に示
すように、基本クロックCPの各周期の各正方向への立
ち上がりから所定時間αに亘って論理“H”に立ち上が
るカウンタリセット信号Srか得られる。従ってカウン
タ8は基本クロックCPの各周期の各正方向への立ち上
かりに伴って一旦、リセットされる。
First, the counter reset signal Sr is generated by ANDing the 0 point signal and the basic clock CP using an AND gate 33. That is, the anime game 1.
If the high/low transition dark value at the input of 33 and the time constant by the resistor R and capacitor C are appropriately determined, as shown at point 0 in Fig. 3, from the rising edge of each period of the basic clock CP in the positive direction. A counter reset signal Sr that rises to logic "H" over a predetermined time α is obtained. Therefore, the counter 8 is once reset with each rising edge in the positive direction of each period of the basic clock CP.

一方、同じく正方向に関して基本クロックCPの各周期
の各立ち下がりにおいては、異常発振検出回路5へのゲ
ート信号乃至検出タイミング信号Sgが発生される。即
ち、0点の信号と基本クロックCPとはノアゲート34
に入力されており、従って第3図中、0点に示すように
、当該ノアゲート34の入力における高低遷移閾値の如
何や積分回路32の時定数の如何によってパルス幅βの
定まる検出タイミング信号Sgが発生される。逆に言え
ばこの実施例の場合、基本タロツクCPの一発宛の各立
ち下がり時点を後述の異常発振検出回路5から検出結果
を出力するタイミングとして選んでいる。尚、上記した
アンドゲート33及びノアゲート34の閾値は第3図中
、積分波形の過渡期部分に横断破線として模式的に示し
である。
On the other hand, at each falling edge of each period of the basic clock CP in the positive direction, a gate signal or a detection timing signal Sg to the abnormal oscillation detection circuit 5 is generated. That is, the 0 point signal and the basic clock CP are connected to the NOR gate 34.
Therefore, as shown at point 0 in FIG. 3, the detection timing signal Sg whose pulse width β is determined depends on the high/low transition threshold at the input of the NOR gate 34 and the time constant of the integrating circuit 32. generated. Conversely, in the case of this embodiment, each falling point of the basic tarokk CP for one shot is selected as the timing for outputting the detection result from the abnormal oscillation detection circuit 5, which will be described later. The threshold values of the AND gate 33 and the NOR gate 34 described above are schematically shown as broken lines across the transition period of the integral waveform in FIG.

カウンタイネーブル信号Seは上記したカウンタリセッ
ト信号Srと検出タイミング信号Sgとのノアをノアゲ
ート35で採ることによって作っている。
The counter enable signal Se is generated by taking the NOR gate 35 between the counter reset signal Sr and the detection timing signal Sg.

そのため、この実施例においては当該カウンタイネーブ
ル信号Seはカウンタリセット信号Sr及び検出タイミ
ング信号Sgが共に有意論理レベルにない時、即ち論理
″°L′”にある時に有意レベル“H゛となる。これは
第3図中、0点に示しである。
Therefore, in this embodiment, the counter enable signal Se becomes a significant level "H" when both the counter reset signal Sr and the detection timing signal Sg are not at a significant logic level, that is, when they are at a logic "°L'". is shown at point 0 in FIG.

カウンタ8は論理“′H′′で有意のカウンタイネーブ
ル信号Seが与えられている時にマスククロックPOを
カウントするが、当該カウント出力Scは異常発振検出
回路5内の遅延時間設定回路51に入力される、 第2図中■点で示す遅延時間設定回路51の出力信号波
形は、第3図中では下から四段目に示しであるが、カウ
ンタリセット信号Srの立ち下がりから時間T1経過後
に基本クロックcpの周期を正常と看做せる許容時間範
囲γに亘って論理” L ”に立ち下がるパルス波形と
して定義される。
The counter 8 counts the mask clock PO when a significant counter enable signal Se with logic “H” is applied, but the count output Sc is input to the delay time setting circuit 51 in the abnormal oscillation detection circuit 5. The output signal waveform of the delay time setting circuit 51, indicated by the point ■ in FIG. 2, is shown in the fourth row from the bottom in FIG. It is defined as a pulse waveform that falls to logic "L" over an allowable time range γ in which the period of the clock cp can be considered normal.

以上の各時間関係を見ると分かるように、基本クロック
CPが正常な周期範囲で発振している時には次の時間関
係が満たされる。但し■点信号のパルス幅γに対し既述
した検出タイミング信号Sgのパルス幅βは小さくなる
ように設定して置く。
As can be seen from the above-mentioned time relationships, the following time relationships are satisfied when the basic clock CP oscillates within a normal cycle range. However, the pulse width β of the detection timing signal Sg described above is set to be smaller than the pulse width γ of the point signal.

T1+α≦To≦71+a+y 、、、、、、、、■β
くγ ・・・・・・・・■ 遅延時間設定回路51の出力は検出タイミング信号Sg
とアンドゲート52にてアンドを採られるが、そのため
、検出タイミングにおいて遅延時間設定回路51の出力
が論理” H”であった場合には基本クロックCPに何
等かの発振周期異常が生じたことを表し、論理゛L”で
あれば発振周期異常の無いことを表すものとなる。この
点を更に詳しく説明する。
T1+α≦To≦71+a+y , , , , , ■β
γ・・・・・・・・・■ The output of the delay time setting circuit 51 is the detection timing signal Sg
Therefore, if the output of the delay time setting circuit 51 is logic "H" at the detection timing, it is determined that some kind of oscillation cycle abnormality has occurred in the basic clock CP. A logic "L" indicates that there is no abnormality in the oscillation cycle.This point will be explained in more detail.

第3図中、°゛正常′範囲に示すように、基本クロック
cpが上記0式を満足している限り、第3図から顕かな
通り、検出タイミング信号Sgが発せられた時には遅延
時間設定回路51の0点出力は必ず論理“L′′にあり
、従って検出タイミングであることを知らせる検出タイ
ミング信号Sgがアントゲ−1・52の個入力に与えら
れても当該アンドゲート52の出力Saは以前からの論
理“L“を保つ。即ち異常発振検出信号Saは非有意レ
ベル“L ”を示すことになる。
As shown in the °゛normal' range in Fig. 3, as long as the basic clock cp satisfies the above equation 0, as is clear from Fig. 3, when the detection timing signal Sg is emitted, the delay time setting circuit The 0 point output of the AND gate 51 is always at the logic "L", so even if the detection timing signal Sg indicating that it is the detection timing is applied to the inputs of the AND gate 52, the output Sa of the AND gate 52 will be the same as before. In other words, the abnormal oscillation detection signal Sa shows the non-significant level "L".

この実施例では各異常信号の信号合成回路7は簡単にナ
ントゲート71で構成されており、アンドゲート52の
出力Saはこのナントゲート71の一人力に加えられて
いるが、上記の時点で当該異常発振検出信号Saが非有
意論理レベル“L“である限り、後述のようにナントゲ
ート71の個入力に加えられている発振停止検出信号S
sもこの時点では非有意論理レベル゛L″にあるため、
信号合成回路7の出力としての総合的な異常検出信号乃
至マイクロコンピュータリセット信号Soはそれ迄と同
じ非有意論理レベル“Hパを維持する。即ち、マイクロ
」ンピュータ1はリセットされることなくそのまま稼動
を続けることができる。
In this embodiment, the signal synthesis circuit 7 for each abnormal signal is simply composed of a Nantes gate 71, and the output Sa of the AND gate 52 is added to the single power of this Nantes gate 71. As long as the abnormal oscillation detection signal Sa is at the non-significant logic level "L", the oscillation stop detection signal S applied to each input of the Nant gate 71 as described later
Since s is also at the non-significant logic level "L" at this point,
The overall abnormality detection signal or microcomputer reset signal So as the output of the signal synthesis circuit 7 maintains the same non-significant logic level "H" as before. In other words, the microcomputer 1 continues to operate without being reset. can continue.

が、例えば基本クロッ゛りCPの周期に乱れが生じ、上
記0式の一つの条件が狂って To<TI+α ・ ・・・ ・・■ となったとすると、第3図中の“短周期化異常°”範囲
で示すように、基本クロックCPの立ち下がりを検出タ
イミングとして知らせる検出タイミング信号Sgが点■
にて論理°“H”に立ち上がった蒔にも、カウンタリセ
ット信号Srの立ち下がりから所定時間Tlを経過して
いないがために点■と同時刻の点■において遅延時間設
定回路51の0点出力が未だ論理“H”である事態が生
ずる。
However, if, for example, a disturbance occurs in the period of the basic clock CP, and one of the conditions in the above equation 0 goes out of order, resulting in To<TI+α . . . As shown in the "°" range, the detection timing signal Sg, which indicates the falling edge of the basic clock CP as the detection timing, turns on.
Even though the logic level has risen to "H" at point 2, since the predetermined time Tl has not passed since the fall of the counter reset signal Sr, the 0 point of the delay time setting circuit 51 is set at point 2, which is the same time as point 2. A situation arises in which the output is still at logic "H".

すると、アンドゲート52の内入力がこの時点で共に論
理“H′”になるから、当該アントゲート52の出力と
しての異常発振検出信号Saは点ので示すように有意レ
ベル“H”となり、ナシトゲ−ドア】を介しての総合的
な異常検出信号Soは点■にて有意レベル“′L″′と
なってマイクロコンピュータlを所期通すリセットする
Then, since the inner inputs of the AND gate 52 both become logic "H'" at this point, the abnormal oscillation detection signal Sa as the output of the AND gate 52 becomes a significant level "H" as shown by the dots, and the AND gate 52 becomes logic "H". The overall abnormality detection signal So through the door] becomes a significant level "'L"' at point (3), and the microcomputer I is reset as expected.

次に基本クロック周期が所定範囲を越えて長くなる“長
周期化異常′”に就いて説明する。
Next, the "long cycle abnormality" in which the basic clock cycle becomes longer than a predetermined range will be explained.

既述した0式のもう一つの条件が損われ、To>TI+
α+γ 、、・・・・・・■となったとすると、第3図
中、“長周期化異常°゛範囲示すように、時点■で検出
タイミング信号Sgが発生しても最早遅く、遅延時間設
定回路51の(す)煮出力信号が既に所定の時間α+T
1+γを経過したため°L”からH′”に立ち戻ってい
る状態が生ずる(点■)。
Another condition of the 0 formula mentioned above is impaired, and To>TI+
Assuming that α + γ , ......■, as shown in Fig. 3, the range of "long cycle abnormality" indicates that even if the detection timing signal Sg is generated at time ■, it is already too late to set the delay time. The boiling output signal of the circuit 51 has already been maintained for a predetermined time α+T.
Since 1+γ has passed, a state occurs in which the temperature returns from °L" to H'" (point ■).

すると、この時点においては先の短周期化異常と同様、
点■、■にて示されるようにアンドゲート52における
アンドが採れ、従って異常発振検出信号Saは有意レベ
ル“H”となって信号合成回路7から論理”L”′で有
意の異常検出信号Soが出力され、先と同様にマイクロ
コンピュータlのり一セットが図られる。
Then, at this point, similar to the previous short cycle abnormality,
As shown by points ■ and ■, the AND gate 52 performs an AND operation, and therefore, the abnormal oscillation detection signal Sa becomes a significant level "H", and the signal synthesis circuit 7 outputs a significant abnormality detection signal So at logic "L"'. is output, and one set of microcomputer l glue is calculated in the same way as before.

また、発振停止検出回路6でもカウンタ8のマスタクロ
ックカウント値Scは監視しており、カウンタリセット
信号Srが立ち下がってから所定時間T2を経過したに
相当するカウント値5c(T2)が入力してきた時には
論理“H”で有意の発振停止検出信号Ssを出力する。
The oscillation stop detection circuit 6 also monitors the master clock count value Sc of the counter 8, and a count value 5c (T2) corresponding to the elapse of a predetermined time T2 after the fall of the counter reset signal Sr is input. At times, it outputs a significant oscillation stop detection signal Ss at logic "H".

所定時間T2は先にも少し触れたが、例えばこの実施例
の場合、次のように定められている。
The predetermined time T2 was briefly mentioned earlier, but in the case of this embodiment, for example, it is determined as follows.

T2−2・To十δ−α 99. ■ 即ち、基本クロックCPが停止することなく」二記時間
T2以内の周期で発振を続けていれば、当該時間T2の
経過以前に必ずカウンタリセット信号Srが発生するか
ら、カウンタ内容はその度にクリアされ、当該カウタ内
容が上記カウント値5c(T2)に至ることはないため
、発振停止検出経路6の出力Ssも常に論理” L ”
を保つ。
T2-2・To δ-α 99. In other words, if the basic clock CP continues to oscillate at a cycle within the time T2 without stopping, the counter reset signal Sr will always be generated before the time T2 elapses, so the counter contents will be changed each time. Since it is cleared and the content of the counter never reaches the count value 5c (T2), the output Ss of the oscillation stop detection path 6 is also always at the logic "L" level.
keep it.

従って、こうした状態下では先のナントゲート71のも
う一方の入力に印加されている異常発振検出信号Saの
論理値の如何が当該ナントゲート71の出力論理値を決
める要素となり、既述したように基本クロックに周期の
異常も認められなければ、マイクロコンピュータ1はリ
セットを掛けられることがない。
Therefore, under such conditions, the logical value of the abnormal oscillation detection signal Sa applied to the other input of the Nant's gate 71 becomes a factor that determines the output logical value of the Nand's gate 71, and as described above, If no cycle abnormality is found in the basic clock, the microcomputer 1 will not be reset.

然し一方、第3図中の長周期化異常範囲の“発振停止°
゛異常部分に示されるように、成る周期の始めにおいて
基本クロックCPが立ち上がったものの、そのまま、2
・To+δ時間を経過して尚、点■で示すように“H”
′のままであり続けると、発振停止回路へのカウント情
報Scが等測的に時間T2を表すに等しい値5c(T2
)となり、発振停止検出回路6からの出力信号Ssは点
[相]で示すように発振停止を表す有意レベル“Hパと
なる。
However, on the other hand, "oscillation stop °" in the long cycle abnormal range in Figure 3
゛As shown in the abnormal part, although the basic clock CP rose at the beginning of the cycle,
・Even after To+δ time has elapsed, “H” is reached as shown by the point ■.
', the count information Sc to the oscillation stop circuit isometrically equal to the value 5c (T2
), and the output signal Ss from the oscillation stop detection circuit 6 becomes a significant level "Hpa" indicating the stop of oscillation, as shown by the point [phase].

この発振停止検出信号Ssは単にレベルとして有意であ
れば良いが、例えば第3図中に示すように適当なパルス
幅εを持っていても良い。
This oscillation stop detection signal Ss only needs to be significant as a level, but it may have an appropriate pulse width ε as shown in FIG. 3, for example.

この°“H”レベル信号Ssが発せられると、信号合成
回路7中のナンドゲー)71はその出力SOを反転し、
第3図中、点■で示すように“L゛レベル異常検出信号
SOを発してマイクロコンピュータlをリセットする。
When this "H" level signal Ss is issued, the NAND game 71 in the signal synthesis circuit 7 inverts its output SO,
In FIG. 3, as indicated by a point (■), a "L" level abnormality detection signal SO is generated to reset the microcomputer 1.

同様に、図示していないが、基本クロックが立ち下がっ
た後そのまま発振が停止した場合にも、カウンタ8によ
るマスククロックPOのカウントが当該立ち下がりに伴
って発せられるパルス幅βの検出タイミング信号Sgの
発生時のみ一時中断するが、その後再開してやがて上記
12時間に相当するカウント値をカウントするから、や
はり発振停止検出信号Ssは発せられ、論理“L”で有
意の異常検出信号Soが出力される。
Similarly, although not shown, even if the oscillation stops immediately after the basic clock falls, the count of the mask clock PO by the counter 8 will be reflected by the detection timing signal Sg of the pulse width β that is emitted in conjunction with the falling of the basic clock. The oscillation stop detection signal Ss is still generated, and the abnormality detection signal So, which is significant at logic "L", is output as the oscillation stop detection signal Ss is outputted as well. be done.

以上で図示実施例の動作説明を終わるが、上記では異常
発振検出回路5中の遅延時間設定回路51はブラックボ
ックスで示すに留めている。これは、当業者であれば当
該遅延時間設定回路51に要求される機能を満たすにも
各種各様の構成を組めるからであり、本発明がこれを直
接に規定するものではないからである。
This concludes the explanation of the operation of the illustrated embodiment, but in the above, the delay time setting circuit 51 in the abnormal oscillation detection circuit 5 is only shown as a black box. This is because those skilled in the art can construct various configurations to satisfy the functions required of the delay time setting circuit 51, and the present invention does not directly specify this.

例えば、マスククロックPOをカウントするカウンタ8
が予め設定した所定数値範囲をカウントしている時点に
おいては最終段のゲート回路出力に論理“L″′が得ら
れるように、カウンタ8の各ビット出力ポートに対して
適当なゲートアレイを組んでも良いし、カウンタ出力ポ
ート群の中、カウンタリセット信号Srの入力後、71
時間を経過した時点で出力を反転する出力ポートの当該
反転により、これに接続した単安定マルチパイブレーク
を起動させ、その出力として所定時間γに亘るパルスを
得ても良い。勿論その他にも、先に述べたように各社の
構成が考えられる。
For example, the counter 8 that counts the mask clock PO
An appropriate gate array may be constructed for each bit output port of the counter 8 so that a logic "L"' is obtained at the final stage gate circuit output when the counter is counting a predetermined numerical range set in advance. 71 after inputting the counter reset signal Sr in the counter output port group.
The inversion of the output port that inverts the output after the elapse of time may activate a monostable multi-pie break connected thereto, and a pulse lasting for a predetermined time γ may be obtained as its output. Of course, there are other possible configurations of each company as mentioned above.

このことはまた、発振停止検出回路6に就いても言え、
12時間経過後に出力を反転するカウンタ出力ポートに
適当な単安定マルチ八イブレータを接続したり、或いは
当該出力ボートの信号線路を発振停止検出回路そのもの
として、これを直接に信号合成回路7に入力しても良い
This also applies to the oscillation stop detection circuit 6.
Connect an appropriate monostable multi-occurrator to the output port of the counter that inverts the output after 12 hours, or use the signal line of the output port as the oscillation stop detection circuit itself and input it directly to the signal synthesis circuit 7. It's okay.

また、この合成回路自体、異常発振検出回路5と発振停
止検出回路6の出力が例えばオーブンコレクタ型等であ
れば、ナントゲート71に代えて単なるワイアードオア
で済ますこともできる。
Further, in this synthesis circuit itself, if the outputs of the abnormal oscillation detection circuit 5 and the oscillation stop detection circuit 6 are of an oven collector type, for example, a simple wired OR can be used instead of the Nant gate 71.

勿論、上記論理動作において正論理と負論理の転換は自
明の範囲であり、例えば基本クロックCPの負方向への
立ち上がりでカウンタリセット信号Srを得、同じく基
本クロックCPの負方向に関する立ち下がりで(即ち論
理“L゛′から“H”への遷移で)検出タイミング信号
sgを得る等しても良い。
Of course, in the above logic operation, switching between positive logic and negative logic is obvious. For example, when the basic clock CP rises in the negative direction, the counter reset signal Sr is obtained, and when the basic clock CP falls in the negative direction, the counter reset signal Sr is obtained ( That is, the detection timing signal sg may be obtained at the transition from logic "L" to "H".

ともかくも以上説明したように、本発明によれば予期し
得ない外来ノイズ等によりプログラムが暴走しても、基
本クロックが正常な状態、における周期範囲を上下に越
えた双方に就き、そしてまた発振の停止に関し、確実に
これらを検出することができ、要すれば速やかに当該マ
イクロコンピュータのりセットを図り得るため、暴走に
伴う重大な事故はこれを避けることができる。
In any case, as explained above, according to the present invention, even if the program goes out of control due to unexpected external noise, etc., the basic clock will be able to operate both above and below the period range in the normal state, and will not oscillate again. With regard to the stoppage of the microcomputer, it is possible to reliably detect the stoppage of the microcomputer, and if necessary, the microcomputer can be quickly set, so that serious accidents caused by runaway can be avoided.

【図面の簡単な説明】 第1図は本発明のマイクロコンピュータ暴走検知回路の
原理的な一実施例の概略構成図、第2図はやや具体的な
実施例の概略構成図、第3図は第2図示実施例の要部信
号波形の説明図、である。 図中、1はマイクロコンピュータ、2はマスタクロック
発振器、3は制御信号発生回路、4はカウンタ、5は基
本クロックの異常発振検出回路、6は基本クロックの発
振停止検出回路、7は信号合成回路、Poはマスタクロ
ック、CPは基本クロック、Srはカウンタリセット信
号、Seはカウンタイネーブル信号、Sgは検出タイミ
ング信号、Saは異常発振検出信号、Ssは発振停止検
出信号、SOは総合的な異常検出信号、である。
[BRIEF DESCRIPTION OF THE DRAWINGS] FIG. 1 is a schematic diagram of an embodiment of the principle of a microcomputer runaway detection circuit according to the present invention, FIG. 2 is a schematic diagram of a slightly more specific embodiment, and FIG. FIG. 6 is an explanatory diagram of main part signal waveforms of the second illustrated embodiment. In the figure, 1 is a microcomputer, 2 is a master clock oscillator, 3 is a control signal generation circuit, 4 is a counter, 5 is a basic clock abnormal oscillation detection circuit, 6 is a basic clock oscillation stop detection circuit, and 7 is a signal synthesis circuit. , Po is the master clock, CP is the basic clock, Sr is the counter reset signal, Se is the counter enable signal, Sg is the detection timing signal, Sa is the abnormal oscillation detection signal, Ss is the oscillation stop detection signal, SO is the comprehensive abnormality detection It's a signal.

Claims (1)

【特許請求の範囲】 発振器の発振するマスタクロックを分周することにより
得られるマイクロコンピュータからの基本クロックの周
期異常を検出し、該マイクロコンピュータの暴走を検知
するマイクロコンピュータ暴走検知回路であって; 上記基本クロックの立ち上がり、立ち下がりに応じ、夫
々カウンタリセット信号及び異常検出タイミング信号を
発生すると共に、上記カウンタリセット信号の発生後、
少なくとも上記異常検出タイミング信号が発生される迄
の間にはカウンタイネーブル信号を発生する制御信号発
生回路と:上記カウンタリセット信号及びカウンタイネ
ーブル信号により制御され、該カウンタイネーブル信号
に伴って上記マスタクロックをカウントするカウンタと
; 上記カウンタのカウント出力に基いて上記基本クロック
の周期異常を検出し、上記異常検出タイミング信号によ
りその検出結果を出力する異常発振検出回路と; 所定の時間範囲に亘り、上記基本クロックに論理の反転
が見られないことを上記カウンタのカウント値に即して
検出し、発振停止検出信号を発生する発振停止検出回路
と; 上記異常発振検出回路及び発振停止検出回路の出力信号
を合成し、いづれか一方でも異常を表す有意の信号とな
った時には総合的な異常検出信号を発生する信号合成回
路と; から成ることを特徴とするマイクロコンピュータ暴走検
知回路。
[Scope of Claims] A microcomputer runaway detection circuit that detects a cycle abnormality in a basic clock from a microcomputer obtained by dividing a master clock oscillated by an oscillator, and detects runaway of the microcomputer; In response to the rise and fall of the basic clock, a counter reset signal and an abnormality detection timing signal are generated, respectively, and after the counter reset signal is generated,
a control signal generation circuit that generates a counter enable signal at least until the abnormality detection timing signal is generated; a counter that counts; an abnormal oscillation detection circuit that detects a cycle abnormality of the basic clock based on the count output of the counter and outputs the detection result using the abnormality detection timing signal; an oscillation stop detection circuit that detects that there is no logic inversion in the clock based on the count value of the counter and generates an oscillation stop detection signal; A microcomputer runaway detection circuit comprising: a signal synthesis circuit that generates a comprehensive abnormality detection signal when either signal becomes a significant signal representing an abnormality; and a signal synthesis circuit that generates a comprehensive abnormality detection signal.
JP59069924A 1984-04-10 1984-04-10 Detecting circuit for microcomputer runaway Pending JPS60214051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59069924A JPS60214051A (en) 1984-04-10 1984-04-10 Detecting circuit for microcomputer runaway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59069924A JPS60214051A (en) 1984-04-10 1984-04-10 Detecting circuit for microcomputer runaway

Publications (1)

Publication Number Publication Date
JPS60214051A true JPS60214051A (en) 1985-10-26

Family

ID=13416721

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59069924A Pending JPS60214051A (en) 1984-04-10 1984-04-10 Detecting circuit for microcomputer runaway

Country Status (1)

Country Link
JP (1) JPS60214051A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0395640A (en) * 1989-09-08 1991-04-22 Honda Motor Co Ltd Electronic controller

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56137450A (en) * 1980-03-28 1981-10-27 Nec Home Electronics Ltd Runaway detection and returning device of operation processor
JPS58105357A (en) * 1981-12-17 1983-06-23 Fuji Xerox Co Ltd Clock diagnosing device of copying machine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56137450A (en) * 1980-03-28 1981-10-27 Nec Home Electronics Ltd Runaway detection and returning device of operation processor
JPS58105357A (en) * 1981-12-17 1983-06-23 Fuji Xerox Co Ltd Clock diagnosing device of copying machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0395640A (en) * 1989-09-08 1991-04-22 Honda Motor Co Ltd Electronic controller

Similar Documents

Publication Publication Date Title
US5440603A (en) Watch-dog timer circuit and a microcomputer equipped therewith
JP5921913B2 (en) Oscillation circuit, integrated circuit, and abnormality detection method
EP0651517B1 (en) Clock signal generation circuit having detective circuit detecting loss of reference clock
US6943590B2 (en) Clock monitoring apparatus
JPS60214051A (en) Detecting circuit for microcomputer runaway
JPS60214050A (en) Detecting circuit for microcomputer runaway
JPS62262685A (en) Speed control system for ac motor
JPS6086627A (en) Detecting circuit of runaway of microcomputer
JPS60200328A (en) Clock fault detecting circuit
JPH01288934A (en) Double microcomputer system runaway preventing circuit
JP2698260B2 (en) Watchdog timer device
JP2571090Y2 (en) Watchdog circuit
JPH05218834A (en) Reset circuit
SU1124258A1 (en) Device for checking and control of deposition rate and film thickness in spraying
JP2516711B2 (en) Watchdog timer device
JPH05111166A (en) Phase difference detecting circuit for ac power supply
SU1399744A1 (en) Redundancy pulse shaper
JPH0320775B2 (en)
JPS60169222A (en) Error counter circuit
JP2003172762A (en) Abnormality detection circuit for microcomputer
SU1193689A1 (en) Device for checking system for automatic stabilizing of parameters
SU1239857A1 (en) Counting device with check
SU1285591A1 (en) Counting device with checking
JPH02246612A (en) Watchdog timer circuit
EP0273574B1 (en) Initial value setting system for an electronic device