JPH04256038A - Watchdog timer inspecting device - Google Patents

Watchdog timer inspecting device

Info

Publication number
JPH04256038A
JPH04256038A JP3016356A JP1635691A JPH04256038A JP H04256038 A JPH04256038 A JP H04256038A JP 3016356 A JP3016356 A JP 3016356A JP 1635691 A JP1635691 A JP 1635691A JP H04256038 A JPH04256038 A JP H04256038A
Authority
JP
Japan
Prior art keywords
watchdog timer
reset
power
cpu
signal
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
JP3016356A
Other languages
Japanese (ja)
Inventor
Kenichi Kinoshita
健一 木下
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP3016356A priority Critical patent/JPH04256038A/en
Publication of JPH04256038A publication Critical patent/JPH04256038A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To inspect specially whether a watchdog time itself operates normally or not in respect of the watchdog time of a microcomputer to detect the abnormality of the operation of a central processing unit. CONSTITUTION:The central processing unit is provided with a pumping pulse stopping part 5 which detects that power supply 1 is supplied by a power switch 2 and instructs to stop the sending of a pumping pulse from the central processing unit 3 to the watchdog timer 4, and a fault detecting part 6 which decides that the watchdog timer is faulty if a reset signal is not received from the watchdog timer when prescribed time elapses after the stop of the sending of the pumping pulse.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はマイクロコンピュータの
ウオッチドックタイマであってプログラムによりポート
に一定の周期ごとにポンピング信号を出し、CPUの暴
走、無限ループ等によりポート信号が停止するのを検出
して、CPUの動作異常を検出するものに関する。
[Industrial Application Field] The present invention is a microcomputer watchdog timer that outputs a pumping signal to a port at regular intervals according to a program, and detects when the port signal stops due to CPU runaway, infinite loop, etc. The present invention relates to detecting an abnormality in the operation of a CPU.

【0002】特に本発明では、ウオッチドックタイマ自
身が正常に動作するかを検査するウオッチドックタイマ
の検査装置に言及する。
In particular, the present invention refers to a watchdog timer inspection device that inspects whether the watchdog timer itself operates normally.

【0003】0003

【従来の技術】図6はCPUとWDTの関係を示す図で
ある。なお全図を通じて同様の構成要素について同一参
照番号または記号をもって表す。本図に示すマイコンを
構成するCPU 3には、電源投入時の初期化を行うた
めに、リセット信号が、必要である。一般には、リセッ
ト信号は電源投入時毎に1回でよいが、CPU 3が、
外来ノイズやプログラムの設計不良などから、本来の働
き以外の動作を行い、無限ループへ入ったり、まったく
動作しなくなったりすることが生じてくる。
2. Description of the Related Art FIG. 6 is a diagram showing the relationship between a CPU and a WDT. Note that similar components are represented by the same reference numbers or symbols throughout the drawings. The CPU 3 constituting the microcomputer shown in this figure requires a reset signal in order to perform initialization when the power is turned on. Generally, the reset signal only needs to be sent once each time the power is turned on, but when the CPU 3
Due to external noise, poor program design, etc., the program may perform operations other than its intended function, enter into an infinite loop, or stop operating at all.

【0004】これに対する対策として、ウオッチドック
タイマ4(WDT)という手段が使われる。一定時間毎
に、CPU 3からパルスを出しCPU 3が正常であ
ることをW.D.T.4に知らせる。WDT 4はCP
U 3からのパルスが来なくなるとCPU 3が異常と
判断して予め決められた動作を行う。この予め決められ
た動作はそのCPU 3が使われる用途により異るし、
WDT 4自身が、予め決められた動作をするのではな
く、そういう動作をする回路に動作の指示を行うのがW
DT 4の仕事である。
As a countermeasure against this problem, a means called a watchdog timer 4 (WDT) is used. At regular intervals, the CPU 3 outputs a pulse to indicate that the CPU 3 is normal. D. T. Let 4 know. WDT 4 is CP
When the pulse from U 3 stops coming, the CPU 3 determines that there is an abnormality and performs a predetermined operation. This predetermined operation varies depending on the purpose for which the CPU 3 is used,
WDT 4 itself does not perform a predetermined operation, but rather instructs the circuit that performs such operation.
This is DT 4's job.

【0005】しかしながらCPU 3の異常な動作は、
CPU 3の一部が電気的に永久破壊することはまれで
あり、リセット信号を与えると正常に戻る事が多い。W
DT 4は予備回路30へ切替ると同時又は以前に、ま
ず、マイコンにリセット信号を与えるように設計するの
が、一般的である。WDT 4自体は、もう一つのCP
U 3を使う(WDT 4+予備回路30)高級タイプ
から、コンデンサの充放電により、CPU 3より出力
されるパルス時間を測るローコストタイプまであるが、
WDT 4と図示しないレギュレータを一体化したIC
が市販されており、多用される。またWDT 4のタイ
マ(CR)はWDT 4がCPU 3と同じ電源を共用
しているため、CPU 3のパワーオンリセット信号の
発生回路も兼用される。
[0005] However, the abnormal operation of the CPU 3 is
It is rare for a part of the CPU 3 to be electrically permanently damaged, and it often returns to normal when a reset signal is applied. W
Generally, the DT 4 is designed to first give a reset signal to the microcomputer at the same time or before switching to the backup circuit 30. WDT 4 itself is another CP
There are high-end types that use U3 (WDT 4 + 30 spare circuits) to low-cost types that measure the pulse time output from CPU 3 by charging and discharging a capacitor.
IC that integrates WDT 4 and regulator (not shown)
are commercially available and widely used. Furthermore, since the WDT 4 and the CPU 3 share the same power supply, the timer (CR) of the WDT 4 also serves as a power-on reset signal generation circuit for the CPU 3.

【0006】図7は従来のウオッチドックタイマの構成
を示す図である。本図のWDT 4の構成には、後述す
るCPU 3のポートよりポンピング信号を受信するス
イッチング用npn形のトランジスタ41と、その反転
端子が該トランジスタ41のコレクタに接続され、その
出力がCPU 3のポートに接続される比較器42と、
電源Vccにその一端が接続されかつその他端が前記比
較器の反転端子に接続される抵抗43と、その一端が該
抵抗43の他端に接続されかつその他端が接地されるコ
ンデンサ44と、前記比較器42の非反転端子に接続さ
れる基準電圧形成部(Vref1)45 と、該比較器
42の出力が遅延されて前記トランジスタ41のベース
に接続される反転遅延器46と、その出力が前記比較器
42の出力に接続される比較器47と、その一端が該比
較器47の反転端子に接続されかつその他端が電源Vc
cへ接続される抵抗48と、該比較器47の非反転端子
に接続される基準電圧形成部(Vref2)49 とが
含まれる。
FIG. 7 is a diagram showing the configuration of a conventional watchdog timer. The configuration of the WDT 4 in this figure includes a switching NPN type transistor 41 that receives a pumping signal from a port of the CPU 3, which will be described later, and its inverting terminal is connected to the collector of the transistor 41, and its output is connected to the collector of the transistor 41. a comparator 42 connected to the port;
a resistor 43 whose one end is connected to the power supply Vcc and whose other end is connected to the inverting terminal of the comparator; a capacitor 44 whose one end is connected to the other end of the resistor 43 and whose other end is grounded; a reference voltage forming section (Vref1) 45 connected to the non-inverting terminal of the comparator 42; an inverting delay device 46 in which the output of the comparator 42 is delayed and connected to the base of the transistor 41; A comparator 47 is connected to the output of the comparator 42, and one end thereof is connected to the inverting terminal of the comparator 47, and the other end is connected to the power supply Vc.
The reference voltage forming section (Vref2) 49 is connected to the non-inverting terminal of the comparator 47.

【0007】次に動作を説明する。図8はウオッチドッ
クタイマの動作を説明するタイムチャートである。本図
(a)は電源の電圧であり、(b)は比較器47の出力
Vr1を示す。この比較器47は電源投入時Vref2
を越えた時点からΔT1 時間後だけ負の“L(Low
)”信号を出力し、その後に0Vの“H(High)”
信号を出力する。このVref2は定格電圧の85%程
度に設定されている。電源電圧が変動してVref2以
下に降下する場合にも上記“L”信号が比較器47から
発生する。本図(c)は比較器42の反転端子の電圧V
C を示す。比較器47の出力Vr1の“L”信号が反
転遅延器46を介してトランジスタ41をON状態にし
コンデンサ44を放電させる。本図(d)はCPU 3
からのポンピング信号である。本図(e)は比較器47
および42の合成出力Vr2を示す。電圧VC が基準
電圧Vref1以下では、比較器42は出力として“H
”信号を出力するが、電源投入時からΔT1 内では比
較器47との出力と合成されCPU 3には“L”信号
を送出する。ΔT1 経過後には比較器47の出力が“
H”信号(0V)になって、合成出力Vr2は比較器4
2からの“H”信号になる。 この“H”信号であるVr2は反転遅延器46を介して
トランジスタ41をOFF状態にする。このためコンデ
ンサ44が充電され、電圧VC が上昇し、電圧VC 
がVref1を越えると比較器42から“L”信号が出
力され、反転遅延器46を介してトランジスタ41がO
Nになりコンデンサ44が放電し、図(c)のようにコ
ンデンサ44が充電、放電を繰り返し、図(d)のよう
に合成信号Vr2はリセット信号を発生する。CPU 
3では、このリセット信号を受けて、スタートし、ポン
ピング信号を図(d)に示すようにW.D.T.4へ送
出する。ポンピング信号によってトランジスタ41を介
してコンデンサ44が放電するのでコンデンサ44の充
電圧VC はVref1以下になり合成出力Vr2は“
H”信号を維持する。図(d)のようにCPU3からポ
ンピング信号がないと、コンデンサ44の充電圧VC 
が増加しVref1に達すると図(e)のようにリセッ
ト信号をCPU 3へ送出しCPU 3の異常が検出さ
れる。
Next, the operation will be explained. FIG. 8 is a time chart explaining the operation of the watchdog timer. In this figure, (a) shows the voltage of the power supply, and (b) shows the output Vr1 of the comparator 47. This comparator 47 is set at Vref2 when the power is turned on.
Negative “L” (Low
)” signal, and then 0V “H (High)”
Output a signal. This Vref2 is set to about 85% of the rated voltage. The "L" signal is also generated from the comparator 47 when the power supply voltage fluctuates and drops below Vref2. This figure (c) shows the voltage V at the inverting terminal of the comparator 42.
Indicates C. The "L" signal of the output Vr1 of the comparator 47 turns on the transistor 41 via the inverting delay device 46 and discharges the capacitor 44. This figure (d) shows CPU 3
This is the pumping signal from. This figure (e) shows the comparator 47
and 42 combined output Vr2 is shown. When the voltage VC is below the reference voltage Vref1, the comparator 42 outputs “H”.
However, within ΔT1 from the time the power is turned on, it is combined with the output from the comparator 47 and sends an "L" signal to the CPU 3. After ΔT1 has elapsed, the output of the comparator 47 becomes "
H” signal (0V), and the composite output Vr2 is sent to the comparator 4.
It becomes the "H" signal from 2. This "H" signal Vr2 turns off the transistor 41 via the inverting delay device 46. Therefore, the capacitor 44 is charged, the voltage VC increases, and the voltage VC
When exceeds Vref1, the comparator 42 outputs an “L” signal, and the transistor 41 is turned off via the inverting delay device 46.
N, the capacitor 44 is discharged, and the capacitor 44 repeats charging and discharging as shown in Figure (c), and the composite signal Vr2 generates a reset signal as shown in Figure (d). CPU
3 starts upon receiving this reset signal, and outputs a pumping signal as shown in Figure (d). D. T. Send to 4. Since the capacitor 44 is discharged via the transistor 41 by the pumping signal, the charging voltage VC of the capacitor 44 becomes less than Vref1, and the combined output Vr2 becomes “
H" signal is maintained. If there is no pumping signal from the CPU 3 as shown in figure (d), the charging voltage VC of the capacitor 44
When the voltage increases and reaches Vref1, a reset signal is sent to the CPU 3 as shown in Figure (e), and an abnormality in the CPU 3 is detected.

【0008】また電源Vccの電圧異常(例えば85%
程度への降下)があると前述したように比較器47の出
力は“L”信号を出力し、CPU 3へ図(e)に示す
ようなリセット信号を出力し、電源変動からCPU 3
の正常動性を維持する。このときコンデンサ44が放電
される。このように、ウオッチドックタイマはCPU 
3の異常検出だけでなくCPU 3のパワーオンリセッ
ト、電源電圧異常時のリセットにも使用されている。
[0008] Also, voltage abnormality of power supply Vcc (for example, 85%
As mentioned above, when there is a drop in the power supply, the output of the comparator 47 outputs an "L" signal, and a reset signal as shown in Figure (e) is output to the CPU 3.
maintain normal motility. At this time, capacitor 44 is discharged. In this way, the watchdog timer is
It is used not only for abnormality detection of CPU 3 but also for power-on reset of CPU 3 and reset when power supply voltage is abnormal.

【0009】[0009]

【発明が解決しようとする課題】ところでWDT 4を
持っているシステムにおいて、CPU 3の異常は、ほ
とんどの場合(永久破壊を除く)WDT 4によるセッ
トで正常に戻るようになったが、WDT 4自身の故障
が問題となる。従来のWDT 4自体の異常チェックは
工場検査においてCPU 3からWDT 4へのポンピ
ング信号を強制的に止め、WDT4からCPU 3へリ
セット信号が送られているかで判断していた。
[Problem to be Solved by the Invention] By the way, in systems equipped with WDT 4, in most cases (excluding permanent destruction) abnormalities in CPU 3 are returned to normal after being set by WDT 4. Your own failure becomes a problem. Conventionally, abnormalities in the WDT 4 itself were checked by forcibly stopping the pumping signal from the CPU 3 to the WDT 4 during factory inspection, and determining whether a reset signal was being sent from the WDT 4 to the CPU 3.

【0010】しかしながらマイクロコンピュータが自動
車に搭載されるにつれ自動車の制御にも重要な役割を有
するようになると、高信頼性が期待されるため、WDT
 4自体も使用中に健全であることの確認が求められる
ようになってきた。したがって、本発明は、上記課題に
鑑みて、ウオッチドックタイマの検査が使用に際し容易
にできるウオッチドックタイマの検査装置を提供するこ
とを目的とする。
However, as microcomputers are installed in automobiles and play an important role in automobile control, high reliability is expected, so WDT
4 itself is also required to confirm that it is sound during use. Therefore, in view of the above-mentioned problems, an object of the present invention is to provide a watchdog timer inspection device that can easily inspect a watchdog timer during use.

【0011】[0011]

【課題を解決するための手段】本発明は前記課題を解決
するために、ウオッチドックタイマ検査装置において、
ポンピングパルス停止部および故障検出部とを有する。 ポンピングパルス停止部は電源を電源投入スイッチで投
入したことを検出して、中央演算処理装置からウオッチ
ドックタイマへのポンピングパルスの送出停止をする。
[Means for Solving the Problems] In order to solve the above problems, the present invention provides a watchdog timer inspection device that includes:
It has a pumping pulse stop section and a failure detection section. The pumping pulse stop section detects that the power is turned on with the power on switch, and stops sending pumping pulses from the central processing unit to the watchdog timer.

【0012】故障検出部は前記ポンピングパルスの送出
停止から所定時間経過後に前記ウオッチドックタイマか
らリセット信号を受けないときには該ウオッチドックタ
イマの故障と判断する。
[0012] The failure detection section determines that the watchdog timer has failed when it does not receive a reset signal from the watchdog timer after a predetermined period of time has elapsed since the sending of the pumping pulses stopped.

【0013】[0013]

【作用】本発明のウオッチドックタイマ検査装置によれ
ば前記ポンピングパルス停止部によって例えばリセット
フラッグを用い、電源投入のリセットが検出され、中央
演算処理装置にはウオッチドックタイマへのポンピング
パルスの送出停止が指示される。他方故障検出部によっ
てポンピングパルスの送出停止から所定時間経過後にウ
オッチドックタイマからリセット信号を受けないときに
はウオッチドックタイマの故障と判断する。このためウ
オッチドックタイマは故障でも電源変動によってリセッ
ト信号が発生しパワーオンリセットとみなされて、CP
Uをスタートさせるが故障を早期に発見して早期に修理
が可能になり、信頼性が向上する。
[Operation] According to the watchdog timer inspection device of the present invention, the pumping pulse stop section detects a power-on reset using, for example, a reset flag, and the central processing unit is instructed to stop sending pumping pulses to the watchdog timer. is instructed. On the other hand, when the failure detection section does not receive a reset signal from the watchdog timer after a predetermined period of time has elapsed since the pumping pulse stopped being sent out, it is determined that the watchdog timer has failed. Therefore, even if the watchdog timer malfunctions, a reset signal is generated due to power fluctuations, which is considered a power-on reset, and the CP
U starts, but failures can be discovered early and repairs can be made early, improving reliability.

【0014】[0014]

【実施例】以下、本発明の実施例について図面を参照し
て説明する。図1は本発明の第1の実施例に係るウオッ
チドックタイマの検査装置である。本図の構成を説明す
る。本図のウオッチドックタイマの検査装置は、自動車
のバッテリからなる電源1と、該電源1のオン/オフを
行うため例えばイグニッションスイッチで構成される電
源投入スイッチ2と、該電源投入スイッチ2により電源
1と接続、分離せしめられる中央演算処理装置 (CP
U)3と、該CPU 3の異常検出によるリセット、C
PU 3のパワーオンリセット、電源変動によるリセッ
ト機能を有するウオッチドックタイマ4と、前記電源1
を前記投入スイッチ2で投入したことを検出して前記C
PU 3からウオッチドックタイマ4へのポンピングパ
ルスの送出停止を指示するポンピングパルス停止部5と
、前記ポンピングパルスの送出停止から所定時間経過後
に前記ウオッチドックタイマ4からリセット信号を受け
ないときには該ウオッチドックタイマ4の故障と判断す
る故障検出部6とを含む。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a watchdog timer inspection device according to a first embodiment of the present invention. The configuration of this figure will be explained. The watchdog timer inspection device shown in this figure includes a power supply 1 consisting of a car battery, a power supply switch 2 composed of, for example, an ignition switch for turning on/off the power supply 1, and a power supply operated by the power supply switch 2. A central processing unit (CP
U) 3 and reset due to abnormality detection of the CPU 3, C
A watchdog timer 4 having a power-on reset function for the PU 3 and a reset function due to power fluctuations, and the power supply 1
Detecting that the input switch 2 has turned on the C
a pumping pulse stop section 5 that instructs the watchdog timer 4 to stop sending out pumping pulses from the PU 3; and a pumping pulse stop section 5 that instructs the watchdog timer 4 to stop sending pumping pulses; and a failure detection unit 6 that determines that the timer 4 has failed.

【0015】前記ポンピングパルス停止部5には例えば
RAM(RandomAccess Memory;図
示しない)が設けられている。さらに故障検出部6には
ポンピングパルス送出停止からの時間を計測するタイマ
(図示しない)が設けられている。次に本実施例の動作
を説明する。本発明は前記したようにウオッチドックタ
イマ4の異常を検査することを目的とするがその検査の
ための異常の対象は図6において、例えばトランジスタ
41の短絡、コンデンサ44の短絡、基準電圧形成部4
5の基準電圧Vref1が高くなる故障等がある。これ
らの故障等があれば、電源1が電源投入スイッチ2によ
って投入されたときに比較器42が“H”信号のままで
リセット信号を出力しないのでウオッチドックタイマ4
に故障があると容易に判断される。しかしウオッチドッ
クタイマ4が故障状態にあって電源1が投入され、電源
1に変動があると前述したようにリセット信号が発生す
る。これにより万一CPU 3がスタートし、当初ウオ
ッチドックタイマ4へポンピングパルス信号を送出しそ
の後ポンピングパルス信号が喪失してもウオッチドック
タイマ4は故障のためリセット信号を発生できずCPU
 3の暴走等を阻止できなくなるので以下のようにして
その故障の有無が検査される。
The pumping pulse stop section 5 is provided with, for example, a RAM (Random Access Memory; not shown). Furthermore, the failure detection section 6 is provided with a timer (not shown) that measures the time from the stop of pumping pulse transmission. Next, the operation of this embodiment will be explained. As described above, the purpose of the present invention is to test for abnormalities in the watchdog timer 4. In FIG. 4
There is a failure etc. in which the reference voltage Vref1 of No. 5 becomes high. If any of these failures occur, when the power source 1 is turned on by the power on switch 2, the comparator 42 will remain at the "H" signal and will not output the reset signal, so the watchdog timer 4 will not output the reset signal.
It is easily determined that there is a malfunction. However, if the watchdog timer 4 is in a faulty state and the power supply 1 is turned on and there is a fluctuation in the power supply 1, a reset signal is generated as described above. As a result, in the unlikely event that the CPU 3 starts and initially sends a pumping pulse signal to the watchdog timer 4, and then loses the pumping pulse signal, the watchdog timer 4 cannot generate a reset signal due to a failure and the CPU
3, runaway etc. cannot be prevented, so the presence or absence of such failure is checked as follows.

【0016】まずウオッチドックタイマ4の機能として
は、パワーオンリセット、ウオッチドックリセットがあ
り、CPU 3からこの機能が正常かどうかチェックし
なければならない。パワーオンリセットは、CPU 3
がチェックする必要はない。なぜなら、パワーオンリセ
ットが不良ならばCPU 3は動作していないからであ
る。
First, the functions of the watchdog timer 4 include power-on reset and watchdog reset, and the CPU 3 must check whether these functions are normal. Power-on reset is CPU 3
does not need to be checked. This is because if the power-on reset is defective, the CPU 3 is not operating.

【0017】ウオッチドックタイマ4をチェックするに
は、CPU 3からのパルス出力を止めて、ウオッチド
ックタイマ4の反応を調べる事になるが、それはCPU
 3にリセット信号が加わり、CPU 3は短時間リセ
ット状態になることになる。これには2つの問題を解決
する必要がある。 (1)図2はウオッチドックタイマチェックを単に挿入
した場合において説明するフロチャートである。図2の
ステップ32を挿入するだけではリセット解除がパワー
オンリセットからか、ウオッチドックタイマ4リセット
からかが判らないと、リセット解除→ウオッチドックタ
イマ4チェック→リセット→リセット解除のループにな
り、途中でリセットされ永久に本来の他の処理へ走らな
い。 (2)システムの動作途中にCPU 3のリセット状態
という不安定時間が存在する。
To check the watchdog timer 4, it is necessary to stop the pulse output from the CPU 3 and check the response of the watchdog timer 4.
A reset signal is applied to CPU 3, causing CPU 3 to enter a reset state for a short time. This requires solving two problems. (1) FIG. 2 is a flowchart illustrating the case where a watchdog timer check is simply inserted. If only inserting step 32 in Figure 2 does not determine whether the reset is canceled from a power-on reset or a watchdog timer 4 reset, a loop of reset cancellation → watchdog timer 4 check → reset → reset cancellation will occur, and the process will end in the middle. It will be reset and will not run to other processing forever. (2) During the operation of the system, there is an unstable time during which the CPU 3 is in a reset state.

【0018】対策としては、 (1)リセット解除が、パワーオンリセットからか、ウ
オッチドックリセットからかを判断する。 (2)システムへの影響が少ないタイミング、即ちパワ
ーオンリセット直後にウオッチドックチェックを行う(
システムから見れば、パワーオンリセットが長くなった
ように見えるだけである)。
Countermeasures include: (1) Determine whether the reset is canceled from a power-on reset or a watchdog reset. (2) Perform a watchdog check at a time when there is little impact on the system, that is, immediately after a power-on reset (
(From the system's point of view, it just looks like the power-on reset is taking longer).

【0019】この特許は、「システムへの影響が少ない
パワーオンリセット直後にウオッチドックタイマ4をチ
ェックする。」ことであり、「パワーオンリセットとウ
オッチドックタイマ4チェックのリセットを区別して、
無限ループへ入れない。」ことにある。図3は第1の実
施例の動作を説明するフローチャートであり、ポンピン
グパルス停止部5としてRAMを使用する場合について
説明する。本図において、電源1が電源投入スイッチ2
によってCPU 3およびウオッチドックタイマ4へ供
給される(ステップ1)。CPU 3はウオッチドック
タイマ4からパワーオンリセット信号が無ければ、スタ
ートできない。ユーザ等によってCPU 3を用いる制
御系が作動しないのでウオッチドックタイマ4を含む制
御系に故障があると判断される(ステップ2)。ウオッ
チドックタイマ4でパワーオンリセットが発生し、この
リセット解除後に、CPU 3はスタートしウオッチド
ックタイマ4へポンピングパルス信号を送出する(ステ
ップ3)。CPU 3のスタートにより前記ポンピング
パルス停止部5ではRAMに格納されているフラッグの
有無をチェックする(ステップ4)。ここにフラッグは
リセット信号が後述するポンピングパルスの強制的停止
によって発生したものかを識別するために使用される。 このフラッグについて説明する。RAM(RAMDOM
 ACCESS MEMORY)は、トランジスタ、M
OSのフリップフロップから構成され、電源投入直後は
“0”又は“1”のどちらであるかは不定であるが、I
C上で接近したフリップフロップは“0”又は“1”に
なりやすい傾向は共通であり隣どうしのフリップフロッ
プは同じ状態になる。
This patent states that ``the watchdog timer 4 is checked immediately after the power-on reset, which has little effect on the system,'' and that ``the power-on reset and the reset of the watchdog timer 4 check are distinguished,
Can't go into infinite loop. ”In particular. FIG. 3 is a flowchart for explaining the operation of the first embodiment, and a case where a RAM is used as the pumping pulse stop section 5 will be explained. In this diagram, power supply 1 is power on switch 2.
is supplied to the CPU 3 and watchdog timer 4 (step 1). The CPU 3 cannot start unless there is a power-on reset signal from the watchdog timer 4. Since the control system using the CPU 3 is not operated by the user or the like, it is determined that there is a failure in the control system including the watchdog timer 4 (step 2). A power-on reset occurs in the watchdog timer 4, and after this reset is released, the CPU 3 starts and sends a pumping pulse signal to the watchdog timer 4 (step 3). When the CPU 3 starts, the pumping pulse stop section 5 checks whether there is a flag stored in the RAM (step 4). Here, the flag is used to identify whether the reset signal is generated by forced stop of the pumping pulse, which will be described later. This flag will be explained. RAM
ACCESS MEMORY) is a transistor, M
It consists of an OS flip-flop, and it is uncertain whether it is "0" or "1" immediately after the power is turned on, but the I
Flip-flops that are close to each other on C have a common tendency to become "0" or "1", and adjacent flip-flops are in the same state.

【0020】8bit のRAMを例にすると、ほとん
どの場合“FF16”か“0016”になる。そこで、
パワーオンリセット後、RAMへ“0”と“1”が交互
に列んだ値を書き込み、その内容をパワーオンリセット
完了のフラッグとする。具体的には“10101010
”又は“01010101”の2つのRAMをウオッチ
ドックタイマチェック中のフラッグとして設定(ステッ
プ5)するとパワーオンリセット時はほとんどこの組合
せにはならない。
Taking an 8-bit RAM as an example, in most cases it will be "FF16" or "0016". Therefore,
After the power-on reset, a value in which "0" and "1" are alternately arranged is written into the RAM, and the contents are used as a flag indicating the completion of the power-on reset. Specifically, “10101010
” or “01010101” as flags during watchdog timer checking (step 5), this combination is almost never used at power-on reset.

【0021】このフラッグ設定後にCPU 3からウオ
ッチドックタイマ4へのポンピングパルスの送出を強制
的に停止する(ステップ6)。この停止と同時に故障検
出部6ではタイマの計測を開始する(ステップ7)。タ
イマの計測が予め定められた時間を越えたら(ステップ
8)、故障検出部6によってウオッチドックタイマ4が
動作しないこととなるため異常と判断し、表示等の警報
または故障したことを記憶する。ステップ8でオーバフ
ローに達しなければ計測が継続される(ステップ10,
7)が、オーバフロー前にリセット信号が発生されれば
、ステップ3へ戻りポンピングパルスを送出する。ウオ
ッチドックタイマ4は正常だからである。その後、RA
Mに格納されているフラッグをステップ4でチェックす
るが、例えば10101010に設定されていることは
明らかで、他の処理を行う(ステップ11)。
After setting this flag, the sending of pumping pulses from the CPU 3 to the watchdog timer 4 is forcibly stopped (step 6). Simultaneously with this stop, the failure detection unit 6 starts measuring with a timer (step 7). When the timer's measurement exceeds a predetermined time (step 8), the failure detection unit 6 determines that the watchdog timer 4 is not operating, so it is determined that there is an abnormality, and a warning is displayed or the fact that the failure has occurred is stored. If the overflow is not reached in step 8, the measurement continues (step 10,
7), if a reset signal is generated before overflow, the process returns to step 3 and a pumping pulse is sent out. This is because the watchdog timer 4 is normal. After that, R.A.
The flag stored in M is checked in step 4, but it is clear that it is set to, for example, 10101010, so other processing is performed (step 11).

【0022】このように本実施例によれば所期の目的が
達成されることが理解されよう。図4は本発明の第2の
実施例に係るウオッチドックタイマ検査装置である。本
図のポンピング停止部5は電源投入スイッチ2を介して
電源1に接続される抵抗5−1およびその一方が該抵抗
5−1に直列接続され他方が接地されるコンデンサ5−
2からなり、抵抗5−1およびコンデンサ5−2の接続
点がCPU 3のポートに接続され第1の実施例におけ
るRAMが装備されている場合に代るものである。
As described above, it will be understood that according to this embodiment, the intended purpose is achieved. FIG. 4 shows a watchdog timer inspection device according to a second embodiment of the present invention. The pumping stop section 5 in this figure includes a resistor 5-1 connected to the power supply 1 via the power-on switch 2, and a capacitor 5-1, one of which is connected in series to the resistor 5-1, and the other connected to the ground.
2, the connection point of the resistor 5-1 and the capacitor 5-2 is connected to the port of the CPU 3, and is an alternative to the case where the RAM is installed in the first embodiment.

【0023】図5は第2の実施例におけるフラッグを説
明する図である。図(a)は抵抗5−1およびコンデン
サ5−2間の電圧V5 を示し、パワーオンリセット時
にはコンデンサ5−2が放電されているので電源投入と
共に増加する。図(b)はCPU 3の信号処理を示し
、CPU 3ではV5 ≦Vref3ではポート“L”
信号を形成し、V>Vref3ではウオッチドックタイ
マをリセットすべくポート“H”信号を形成し、“L”
信号をフラッグ:0とし、“H”信号をフラッグ:1と
判断する。
FIG. 5 is a diagram illustrating flags in the second embodiment. Figure (a) shows the voltage V5 between the resistor 5-1 and the capacitor 5-2, which increases as the power is turned on because the capacitor 5-2 is discharged at the time of power-on reset. Figure (b) shows the signal processing of CPU 3. In CPU 3, when V5≦Vref3, the port is “L”.
When V>Vref3, a port “H” signal is formed to reset the watchdog timer, and “L”
The signal is determined to be a flag: 0, and the "H" signal is determined to be a flag: 1.

【0024】本実施例では図2の第1の実施例のフロー
チャートにおいてステップ4を「ポート“H”?」と置
き換えステップ5を省くことによって構成され、第1の
実施例と同様の効果が得られる。図(c)は電源投入後
の電源1の電圧(Vcc)であり、電源の電圧変動によ
るスタートを妨げるには、電源変動時にフラッグ:0と
してパワーオンリセットを遅らせることが有効である。 このためには抵抗5−1およびコンデンサ5−2で定ま
る時定数ができるだけ大きくすることが必要である。
This embodiment is constructed by replacing step 4 with "Port "H"?" in the flowchart of the first embodiment shown in FIG. 2 and omitting step 5, and the same effect as in the first embodiment is obtained. It will be done. Figure (c) shows the voltage (Vcc) of the power supply 1 after the power is turned on, and in order to prevent a start due to voltage fluctuations in the power supply, it is effective to delay the power-on reset by setting the flag to 0 when the power supply fluctuates. For this purpose, it is necessary to make the time constant determined by the resistor 5-1 and capacitor 5-2 as large as possible.

【0025】とくに自動車の衝突時に運転者を保護する
エアバックには、エアバックにガスを瞬時に注入するた
めにガス容器との間の栓を爆発するが、この爆発に使用
する点火には容量の大きいエネルギーリザーブ用のコン
デンサが使用されているので、電源投入後にコンデンサ
5−2にエアバック用コンデンサを用いると充電に数秒
かかるので有効である。
In particular, for airbags that protect the driver in the event of a car collision, a plug between the gas container and the gas container is detonated to instantly inject gas into the airbag, but the ignition used for this explosion is Since a capacitor with a large energy reserve is used, it is effective to use an airbag capacitor as the capacitor 5-2 after the power is turned on because charging takes several seconds.

【0026】第2の実施例の変形として種類によってC
PU 3が減電圧フラッグを持っているので、この場合
には減電圧フラッグ用のレジスタに記憶されている電源
電圧Vccを用いて第1の実施例のフローチャートにお
いてステップ4およびステップ5をステップ「Vcc下
ったか?」と置き換えることで構成されるものが考えら
れる。
As a modification of the second embodiment, C
Since the PU 3 has a reduced voltage flag, in this case, the power supply voltage Vcc stored in the register for the reduced voltage flag is used to perform steps 4 and 5 in the flowchart of the first embodiment. It could be constructed by replacing it with "Did it go down?"

【0027】[0027]

【発明の効果】以上説明したように本発明によれば、電
源投入を検出して中央演算処理装置からウオッチドック
タイマへのポンピングパルスの送出を停止所定時間内に
リセット信号がないときにはウオッチドックタイマの故
障と判断できるようにしたのでたとえ電源変動によって
パワーオンリセットが発生して中央演算処理装置がスタ
ートしたとしてもウオッチドックタイマの故障が容易に
検出することができる。
As described above, according to the present invention, when power is turned on, the sending of pumping pulses from the central processing unit to the watchdog timer is stopped, and when there is no reset signal within a predetermined time, the watchdog timer is stopped. Since the failure of the watchdog timer can be easily detected, even if a power-on reset occurs due to a power fluctuation and the central processing unit starts, a failure of the watchdog timer can be easily detected.

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

【図1】本発明の第1の実施例に係るウオッチドックタ
イマ検査装置を示す図である。
FIG. 1 is a diagram showing a watchdog timer inspection device according to a first embodiment of the present invention.

【図2】ウオッチドックタイマを単に挿入した場合につ
いて説明するフローチャートである。
FIG. 2 is a flowchart illustrating a case where a watchdog timer is simply inserted.

【図3】第1の実施例の動作を説明するフローチャート
である。
FIG. 3 is a flowchart illustrating the operation of the first embodiment.

【図4】本発明の第2の実施例に係るウオッチドックタ
イマ検査装置を示す図である。
FIG. 4 is a diagram showing a watchdog timer inspection device according to a second embodiment of the present invention.

【図5】第2の実施例におけるフラッグを説明する図で
ある。
FIG. 5 is a diagram illustrating flags in a second embodiment.

【図6】CPUとWDTの関係を示す図である。FIG. 6 is a diagram showing the relationship between a CPU and a WDT.

【図7】従来のウオッチドックタイマの構成を示す図で
ある。
FIG. 7 is a diagram showing the configuration of a conventional watchdog timer.

【図8】ウオッチドックタイマの動作を説明するタイム
チャートである。
FIG. 8 is a time chart explaining the operation of the watchdog timer.

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

1…電源 2…電源投入スイッチ 3…中央演算処理装置 4…ウオッチドックタイマ 5…ポンピングパルス停止指示部 6…故障検出部 1...Power supply 2...Power on switch 3...Central processing unit 4...Watchdog timer 5... Pumping pulse stop instruction section 6...Failure detection section

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  電源(1)を電源投入スイッチ(2)
で投入したときに中央演算処理装置(3)をスタートさ
せるパワーオンリセットを発生し、前記中央演算処理装
置(3)から出力されるポンピングパルスを受信しなく
なったときにリセット信号を発生するウオッチドックタ
イマ(4)において前記電源(1)を前記電源投入スイ
ッチ(2)で投入したことを検出して、前記中央演算処
理装置(3)からウオッチドックタイマ(4)へのポン
ピングパルスの送出停止を指示するポンピングパルス停
止部(5)と、前記ポンピングパルスの送出停止から所
定時間経過後に前記ウオッチドックタイマ(4)からリ
セット信号を受けないときには該ウオッチドックタイマ
(4)の故障と判断する故障検出部(6)とを備えるウ
オッチドックタイマ検査装置。
[Claim 1] The power supply (1) is connected to the power supply switch (2).
A watchdog that generates a power-on reset to start a central processing unit (3) when turned on, and generates a reset signal when it no longer receives pumping pulses output from the central processing unit (3). A timer (4) detects that the power supply (1) is turned on by the power-on switch (2) and stops sending the pumping pulse from the central processing unit (3) to the watchdog timer (4). A pumping pulse stop unit (5) for instructing, and a failure detection unit that determines that the watchdog timer (4) is malfunctioning when a reset signal is not received from the watchdog timer (4) after a predetermined period of time has elapsed since the sending of the pumping pulse was stopped. A watchdog timer inspection device comprising: (6).
JP3016356A 1991-02-07 1991-02-07 Watchdog timer inspecting device Pending JPH04256038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3016356A JPH04256038A (en) 1991-02-07 1991-02-07 Watchdog timer inspecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3016356A JPH04256038A (en) 1991-02-07 1991-02-07 Watchdog timer inspecting device

Publications (1)

Publication Number Publication Date
JPH04256038A true JPH04256038A (en) 1992-09-10

Family

ID=11914073

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3016356A Pending JPH04256038A (en) 1991-02-07 1991-02-07 Watchdog timer inspecting device

Country Status (1)

Country Link
JP (1) JPH04256038A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19735406A1 (en) * 1997-08-14 1999-02-18 Siemens Ag Semiconductor component and method for testing and operating a semiconductor component
JP2011250196A (en) * 2010-05-27 2011-12-08 Lapis Semiconductor Co Ltd Timer circuit
US8824623B2 (en) 2011-12-05 2014-09-02 Seiko Epson Corporation Timer device and electronic apparatus
JP2016222018A (en) * 2015-05-27 2016-12-28 富士通テン株式会社 Cpu monitoring device, vehicle control system, and cpu monitoring method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5456740A (en) * 1977-10-14 1979-05-08 Toyota Motor Co Ltd Method of monitoring malfunction of control system using computer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5456740A (en) * 1977-10-14 1979-05-08 Toyota Motor Co Ltd Method of monitoring malfunction of control system using computer

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19735406A1 (en) * 1997-08-14 1999-02-18 Siemens Ag Semiconductor component and method for testing and operating a semiconductor component
JP2011250196A (en) * 2010-05-27 2011-12-08 Lapis Semiconductor Co Ltd Timer circuit
US8824623B2 (en) 2011-12-05 2014-09-02 Seiko Epson Corporation Timer device and electronic apparatus
JP2016222018A (en) * 2015-05-27 2016-12-28 富士通テン株式会社 Cpu monitoring device, vehicle control system, and cpu monitoring method

Similar Documents

Publication Publication Date Title
US5107245A (en) Control arrangement for an occupant restraint system of an automobile
US8180520B2 (en) Electronic safing system
US6883123B2 (en) Microprocessor runaway monitoring control circuit
US5850514A (en) Malfunction monitoring circuit of microcomputer system
US6076172A (en) Monitoting system for electronic control unit
KR950003268B1 (en) Inflatable restraint firing circuit diagnostics
JPH0295952A (en) Operating condition recorder of crew protection device
US5602736A (en) Vehicle safety system equipped with microcomputer
JP2999016B2 (en) Vehicle safety device control system
US7707458B2 (en) Self-test system
JPH04256038A (en) Watchdog timer inspecting device
US6003140A (en) Method and device for monitoring an electronic computing unit
EP0486222B1 (en) Improvements in and relating to microprocessor based systems
JPH07115739A (en) Air-bag electronic controller
JPH08115235A (en) Abnormality detector for controller and method therefor
JP3251038B2 (en) Measuring device
JP3403836B2 (en) Microcomputer reset circuit
JPH01197848A (en) Runaway preventing circuit for cpu
KR100362251B1 (en) Diagnostic circuit of runaway detection circuit
JPH08202589A (en) Information processor and fault diagnostic method
JP3176415B2 (en) Airbag ignition monitor circuit
KR100775328B1 (en) Apparatus for resetting micoms
JP3325672B2 (en) Occupant protection device
JPH1076910A (en) Self-diagnostic device for system
JPH0880810A (en) Power cut-off detecting device in equipment with security mechanism

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19971209