JP2899237B2 - CPU monitoring device - Google Patents
CPU monitoring deviceInfo
- Publication number
- JP2899237B2 JP2899237B2 JP7270685A JP27068595A JP2899237B2 JP 2899237 B2 JP2899237 B2 JP 2899237B2 JP 7270685 A JP7270685 A JP 7270685A JP 27068595 A JP27068595 A JP 27068595A JP 2899237 B2 JP2899237 B2 JP 2899237B2
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- program
- output
- value
- monitoring device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Debugging And Monitoring (AREA)
Description
【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION
【0001】[0001]
【発明の属する技術分野】本発明は、CPUの停止や異
常動作などの暴走を監視するCPU監視装置に関する。[0001] 1. Field of the Invention [0002] The present invention relates to a CPU monitoring device for monitoring runaway such as CPU stoppage or abnormal operation.
【0002】[0002]
【従来の技術】CPUが突然停止したり異常動作を起こ
した場合、そのCPUで制御されている機器が破壊され
たり、処理中のデータが破壊されたりする恐れがある。
従ってCPUの動作状態を常時監視するCPU監視装置
が開発されている。図3は、従来のCPU監視装置を説
明するための図であり、図において、1はCPU、4は
フリップフロップ、5は単安定マルチバイブレータ、5
0はその時定数回路を示す。2. Description of the Related Art When a CPU suddenly stops or abnormally operates, there is a possibility that a device controlled by the CPU is destroyed or data being processed is destroyed.
Therefore, a CPU monitoring device that constantly monitors the operation state of the CPU has been developed. FIG. 3 is a diagram for explaining a conventional CPU monitoring device. In the figure, 1 is a CPU, 4 is a flip-flop, 5 is a monostable multivibrator,
0 indicates the time constant circuit.
【0003】次に図4を用いて従来の装置の動作につい
て説明する。CPU1が正常に動作している場合、内蔵
されているプログラムにより定期的にCPU動作パルス
15が出力されており、このパルスが単安定マルチバイ
ブレータ5に入力されている。この単安定マルチバイブ
レータ5には、抵抗RとコンデンサCとにより構成され
た時定数回路50が設けられており、CPU動作パルス
15の立ち上がりエッジをトリガとして、抵抗Rとコン
デンサCとで決定される時定数α(CPU動作パルスの
周期<α)の間、その出力信号を論理Lに保つように構
成されている。Next, the operation of the conventional apparatus will be described with reference to FIG. When the CPU 1 is operating normally, a CPU operation pulse 15 is periodically output by a built-in program, and this pulse is input to the monostable multivibrator 5. The monostable multivibrator 5 is provided with a time constant circuit 50 composed of a resistor R and a capacitor C, and is determined by the resistor R and the capacitor C with a rising edge of the CPU operation pulse 15 as a trigger. During the time constant α (the period of the CPU operation pulse <α), the output signal is maintained at logic L.
【0004】従って、CPU動作パルス15が定期的に
出力されている正常時には時定数αが経過する前にCP
U動作パルス15が入力されるので、単安定マルチバイ
ブレータ5からの出力は論理Lの状態を保ち、フリップ
フロップ4からはアラーム信号16は出力されない。こ
こで、CPU1に何らかの異常が発生し、CPU動作パ
ルス15が出力されなくなった場合、時定数αが経過す
ると、単安定マルチバイブレータ5の出力が論理Hとな
り、これがフリップフロップ4の出力トリガとなってフ
リップフロップ4から+5vのアラーム信号16が出力
され、この信号により警報器(図示せず)がCPU1の
異常を警報する。図4は上述のような、CPU動作パル
ス15,単安定マルチバイブレータ5の出力,およびフ
リップフロップ4から出力されるアラーム信号16の相
互の動作タイミングを示す。Accordingly, when the CPU operation pulse 15 is output periodically, the CP is not activated before the time constant α elapses in a normal state.
Since the U operation pulse 15 is input, the output from the monostable multivibrator 5 maintains the logic L state, and the alarm signal 16 is not output from the flip-flop 4. Here, when some abnormality occurs in the CPU 1 and the CPU operation pulse 15 is not output, when the time constant α elapses, the output of the monostable multivibrator 5 becomes logic H, and this becomes the output trigger of the flip-flop 4. As a result, an alarm signal 16 of +5 V is output from the flip-flop 4, and an alarm (not shown) warns of an abnormality of the CPU 1 based on this signal. FIG. 4 shows the mutual operation timings of the CPU operation pulse 15, the output of the monostable multivibrator 5, and the alarm signal 16 output from the flip-flop 4, as described above.
【0005】[0005]
【発明が解決しようとする課題】上記のような従来のC
PU監視回路は以上のように構成され、単安定マルチバ
イブレータの時定数は、抵抗とコンデンサで構成された
時定数回路を利用しており、監視周期を変更するために
は、時定数回路の抵抗やコンデンサを変更する必要があ
る。また、長時間の時定数を得るためには、電解コンデ
ンサを用いる必要があるが、電解コンデンサを用いる場
合には経時変化による容量抜けを考慮して設計する必要
がある。さらに、コンデンサの充放電の変動をマージン
として予め盛り込んでおく必要がある等の問題点があっ
た。SUMMARY OF THE INVENTION As described above, the conventional C
The PU monitoring circuit is configured as described above. The time constant of the monostable multivibrator uses a time constant circuit composed of a resistor and a capacitor. And the capacitors need to be changed. Further, in order to obtain a long time constant, it is necessary to use an electrolytic capacitor. However, when using an electrolytic capacitor, it is necessary to design in consideration of a capacity loss due to a change with time. Further, there is a problem that it is necessary to incorporate fluctuations in charge and discharge of the capacitor as a margin in advance.
【0006】本発明はかかる問題点を解決するためにな
されたものであり、監視周期の変更が容易に行え、且つ
その回路も小型化,単純化できるCPU監視装置を提供
することを目的としている。The present invention has been made to solve such a problem, and an object of the present invention is to provide a CPU monitoring apparatus which can easily change a monitoring cycle and can also downsize and simplify its circuit. .
【0007】[0007]
【課題を解決するための手段】本発明に係わるCPU監
視装置は、CPUに、当該CPUが正常に動作している
間は、当該CPUに内蔵されているハードウェアタイマ
およびカウンタから出力されるカウント値が設定値に達
した場合このカウント値を常時リセットする動作と、こ
のカウント値が設定値を超えてタイムアウト基準値に達
した場合、信号を出力する動作とを行わせるプログラム
を内蔵させたことを特徴とする。According to the present invention, there is provided a CPU monitoring apparatus, comprising: a CPU for counting a clock output from a hardware timer and a counter incorporated in the CPU while the CPU is operating normally; A built-in program that performs an operation that constantly resets this count value when the value reaches a set value and that outputs a signal when the count value exceeds the set value and reaches a timeout reference value It is characterized by.
【0008】また、プログラムの変更により上記設定値
または(及び)上記タイムアウト基準値の設定を変更す
る手段を備えたことを特徴とする。[0008] Further, there is provided a means for changing the setting of the set value and / or the timeout reference value by changing a program.
【0009】[0009]
【発明の実施の形態】以下、本発明の実施形態を図面に
基づき説明する。図1は、本発明の一実施形態を示すブ
ロック図であり、図において、1はCPU、2はCPU
1に内蔵されているタイマおよびカウンタ、4はフリッ
プフロップである。CPU1にはハードウェアで構成さ
れたタイマおよびカウンタ2が内蔵されており、このタ
イマおよびカウンタ2はプログラム制御が可能であるの
で、カウント値でCPU1が正常に動作しているか否か
を判断するプログラムをCPU1に設定する。すなわ
ち、CPUが正常に動作している間は、そのカウント値
が設定値に達した場合カウンタをリセットする動作と、
カウント値が設定値を超えてタイムアウト基準値に達し
た場合、論理Hの信号を出力するプログラムを設定す
る。このプログラムは、従来のCPU動作パルス15を
発生させるプログラムに多少の変更を加えるだけで容易
に実現できることは言うまでもない。Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention. In FIG.
A timer and a counter built in 1 are flip-flops. The CPU 1 has a built-in timer and counter 2 composed of hardware. Since the timer and the counter 2 can be controlled by a program, a program for determining whether the CPU 1 is operating normally based on the count value is provided. Is set in the CPU 1. That is, while the CPU is operating normally, an operation of resetting the counter when the count value reaches a set value,
When the count value exceeds the set value and reaches the timeout reference value, a program for outputting a signal of logic H is set. Needless to say, this program can be easily realized by slightly modifying the conventional program for generating the CPU operation pulse 15.
【0010】図2は、本実施形態の動作タイミングを示
す図であり、定期的にリセットされているカウンタ値
が、リセットが遅れたり行われなくなりタイムアウト基
準値(これが監視周期11となる)を超えた場合、タイ
ムアウト10を出力する。このタイムアウト10はフリ
ップフロップ4の出力トリガとして入力され、フリップ
フロップ4から+5vのアラーム信号16が出力され、
この信号により警報器(図示せず)がCPU1の異常を
警報する。FIG. 2 is a diagram showing the operation timing of this embodiment. The counter value which is periodically reset exceeds the timeout reference value (this becomes the monitoring period 11) because the reset is delayed or not performed. Timeout 10 is output. The timeout 10 is input as an output trigger of the flip-flop 4, and the flip-flop 4 outputs a + 5v alarm signal 16,
With this signal, an alarm (not shown) alerts the CPU 1 of an abnormality.
【0011】なお、組み込み用途に用いられるワンチッ
プCPUには、一般的にタイムアウト出力機能を有する
ハードウェアタイマおよびカウンタを内蔵しており、そ
のタイムアウト基準値もプログラムで制御できるように
なっているため、プログラム制御によりCPUが正常に
動作している場合、カウンタを定期的に設定値(設定値
<タイムアウト基準値)でリセットする手段を付加すれ
ば監視周期11の変更が容易に行える装置を構成でき
る。また、フリップフロップ4を省略することも可能で
ある。Note that a one-chip CPU used for an embedded application generally has a built-in hardware timer and counter having a time-out output function, and the time-out reference value can be controlled by a program. In addition, when the CPU is operating normally under program control, a device that can easily change the monitoring cycle 11 can be configured by adding a means for periodically resetting the counter with a set value (set value <time-out reference value). . Further, the flip-flop 4 can be omitted.
【0012】[0012]
【発明の効果】以上説明したように本発明のCPU監視
装置は、プログラム制御が行えるCPUに内蔵されたハ
ードウェアタイマを用いて構成することにより、プログ
ラムの変更で監視周期の変更が容易に行える装置が構成
できる。また、従来の装置のようにCR時定数設定回路
を用いた単安定マルチバイブレータを使用してないの
で、コンデンサの容量抜けや時定数の変動に対するマー
ジンを一切必要とせず、回路構成も小型化,単純化でき
る等の効果がある。As described above, the CPU monitoring device of the present invention is configured by using the hardware timer built in the CPU capable of controlling the program, so that the monitoring cycle can be easily changed by changing the program. The device can be configured. In addition, since a monostable multivibrator using a CR time constant setting circuit is not used unlike the conventional device, no margin is required for the loss of the capacitance of the capacitor or the fluctuation of the time constant, and the circuit configuration is downsized. There are effects such as simplification.
【図1】本発明の一実施形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.
【図2】本実施形態の動作タイミングを示す図である。FIG. 2 is a diagram showing operation timing of the embodiment.
【図3】従来の装置構成例を示すブロック図である。FIG. 3 is a block diagram showing a configuration example of a conventional apparatus.
【図4】従来の装置の動作タイミングを示す図である。FIG. 4 is a diagram showing operation timing of a conventional device.
1 CPU 2 CPU1に内蔵されているハードウェアタイマおよ
びカウンタ 4 フリップフロップ 10 タイムアウト出力 16 アラーム信号DESCRIPTION OF SYMBOLS 1 CPU 2 Hardware timer and counter built in CPU1 4 Flip-flop 10 Timeout output 16 Alarm signal
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 11/30 310 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 11/30 310
Claims (2)
視するCPU監視装置において、 上記CPUに、当該CPUが正常に動作している間は、
当該CPUに内蔵されているハードウェアタイマおよび
カウンタから出力されるカウント値が設定値に達した場
合このカウント値を常時リセットする動作と、 このカウント値が設定値を超えてタイムアウト基準値に
達した場合、信号を出力する動作とを行わせるプログラ
ムを内蔵させたことを特徴とするCPU監視装置。1. A CPU monitoring device for monitoring a runaway such as a stop or an abnormal operation of a CPU, wherein the CPU is provided with a CPU while the CPU is operating normally.
When the count value output from the hardware timer and counter incorporated in the CPU reaches a set value, the count value is constantly reset, and the count value exceeds the set value and reaches a timeout reference value. And a program for performing a signal output operation.
または(及び)上記タイムアウト基準値の設定を変更す
る手段を備えたことを特徴とする請求項第1項記載のC
PU監視装置。2. The apparatus according to claim 1, further comprising means for changing the setting value and / or the setting of the timeout reference value by changing the program.
PU monitoring device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7270685A JP2899237B2 (en) | 1995-09-26 | 1995-09-26 | CPU monitoring device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7270685A JP2899237B2 (en) | 1995-09-26 | 1995-09-26 | CPU monitoring device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0992111A JPH0992111A (en) | 1997-04-04 |
JP2899237B2 true JP2899237B2 (en) | 1999-06-02 |
Family
ID=17489530
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP7270685A Expired - Lifetime JP2899237B2 (en) | 1995-09-26 | 1995-09-26 | CPU monitoring device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2899237B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3870751B2 (en) * | 2001-10-30 | 2007-01-24 | 株式会社デンソー | Electronic control unit |
-
1995
- 1995-09-26 JP JP7270685A patent/JP2899237B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPH0992111A (en) | 1997-04-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0715259A2 (en) | Watchdog timer lock-up prevention circuit | |
JP2899237B2 (en) | CPU monitoring device | |
WO2004003714A2 (en) | Circuit for detection of internal microprocessor watchdog device execution and method for resetting microprocessor system | |
JPH11259340A (en) | Reactivation control circuit for computer | |
JP2005092430A (en) | Watchdog timer | |
JP3164360B2 (en) | Microprocessor circuit device having watchdog circuit and method of monitoring flow of processor program | |
JP2870250B2 (en) | Microprocessor runaway monitor | |
GB2310514A (en) | Watchdog circuit | |
TW486619B (en) | Embedded computer system and method with dual watchdog timer | |
JP2508976B2 (en) | Reset device | |
JP3035937B2 (en) | Multifunctional telephone | |
JPH0792793B2 (en) | Micro computer | |
JPH0520129A (en) | Microprocessor monitoring system | |
JP2731386B2 (en) | Control device | |
KR0155045B1 (en) | How to Implement Watchdog Timers in Unmanned Security Systems | |
US5497481A (en) | Microcomputer computer system having plural programmable timers and preventing memory access operations from interfering with timer start requests | |
JPS60238947A (en) | Malfunction detecting circuit of microprocessor | |
JPS6231452A (en) | Runaway preventing circuit for microcomputer | |
JP4063699B2 (en) | Program runaway detection circuit | |
JPH0419577B2 (en) | ||
JPS60262252A (en) | Monitor system for runaway of microprocessor | |
JPH0535892A (en) | Microcomputer | |
JPH0773073A (en) | Watchdog timer circuit | |
JPH0410036A (en) | Monitor circuit for arithmetic processor | |
JPH05266384A (en) | Alarm system cpu monitoring circuit |