JPH08115235A - Abnormality detector for controller and method therefor - Google Patents

Abnormality detector for controller and method therefor

Info

Publication number
JPH08115235A
JPH08115235A JP24912494A JP24912494A JPH08115235A JP H08115235 A JPH08115235 A JP H08115235A JP 24912494 A JP24912494 A JP 24912494A JP 24912494 A JP24912494 A JP 24912494A JP H08115235 A JPH08115235 A JP H08115235A
Authority
JP
Japan
Prior art keywords
processing
processing unit
program
start flag
microprocessor
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
JP24912494A
Other languages
Japanese (ja)
Inventor
Tsutomu Fukui
努 福井
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor 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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP24912494A priority Critical patent/JPH08115235A/en
Publication of JPH08115235A publication Critical patent/JPH08115235A/en
Pending legal-status Critical Current

Links

Landscapes

  • Air Bags (AREA)
  • Debugging And Monitoring (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

PURPOSE: To monitor the processing speed and processing order of its own microcomputer without using the microcomputer on an outside. CONSTITUTION: By an interval timer 25, the prescribed number of reference clocks RCK are counted and interruption request signals 30 are supplied to a microprocessor 21 at each stipulated cycle (1ms, for instance.) By an event counter 41, clocks CCK for comparison counting are counted during the stipulated cycle. Whether or not the counted value is present within a predetermined set value range is discriminated by the microprocessor 21 and the processing speed is monitored. Also, a program is divided into the respective processing units of a desired operating order, one processing start flag is provided, the processing start flag is set at the head part at the time of executing the program for the respective processing units and the processing order is monitored depending on whether or not the processing start flag is set at the end part.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、例えば、車両用エア
バッグシステムに適用して好適な制御装置の異常検出装
置およびその方法に関し、一層詳細には、マイクロプロ
セッサを使用した制御装置におけるそのマイクロプロセ
ッサの処理速度の異常および(または)プログラムの処
理順序の異常をそのマイクロプロセッサ自身で自己診断
できるようにした制御装置の異常検出装置およびその方
法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control device abnormality detection apparatus and method suitable for application to, for example, a vehicle airbag system, and more particularly to a micro controller in a control apparatus using a microprocessor. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an abnormality detection device for a control device and a method thereof, which enables the microprocessor itself to self-diagnose an abnormality in the processing speed of a processor and / or an abnormality in the processing sequence of programs.

【0002】[0002]

【従来の技術】近時、車両、特に、4輪自動車には、制
御装置としてのマイクロコンピュータが搭載されてい
る。
2. Description of the Related Art Recently, vehicles, particularly four-wheeled vehicles, are equipped with a microcomputer as a control device.

【0003】このマイクロコンピュータは、周知のよう
に、中央処理装置(CPU)に対応するマイクロプロセ
ッサ{MPU(micro processor unit)}と、このマイ
クロプロセッサに接続される入出力装置としてのA/D
変換回路やD/A変換回路、I/Oポート、システムプ
ログラム等が書き込まれる読み出し専用メモリ(RO
M)、処理データを一時的に保存等するランダムアクセ
スメモリ(RAMであり、書き込み読み出しメモリ)、
タイマ回路および割り込み処理回路等を1チップ内に集
積したLSIデバイスとして提供されている。
As is well known, this microcomputer is a microprocessor {MPU (micro processor unit)} corresponding to a central processing unit (CPU) and an A / D as an input / output device connected to this microprocessor.
A read-only memory (RO) into which a conversion circuit, a D / A conversion circuit, an I / O port, a system program, etc. are written.
M), a random access memory (RAM, which is a write / read memory) for temporarily storing processed data,
It is provided as an LSI device in which a timer circuit, an interrupt processing circuit and the like are integrated in one chip.

【0004】マイクロコンピュータは、前記ROMに書
き込まれたシステムプログラムに基づいてマイクロプロ
セッサが所定の処理を、順次、行うように構成されてい
る。
The microcomputer is configured so that the microprocessor sequentially performs a predetermined process based on the system program written in the ROM.

【0005】ところが、前記マイクロプロセッサの処理
速度や、処理順番に異常が発生した場合、所定の処理と
は異なる処理が実行される場合がある。
However, when an abnormality occurs in the processing speed or processing order of the microprocessor, a process different from the predetermined process may be executed.

【0006】そこで、車両用の制御装置においては、こ
のマイクロプロセッサの(動作)異常を検出するため
に、従来から、一般的に、ウォッチドッグタイマ(また
はデッドマンタイマ)が設けられている。
Therefore, in order to detect the (operation) abnormality of the microprocessor, a control device for a vehicle has conventionally been generally provided with a watchdog timer (or a deadman timer).

【0007】このウォッチドッグタイマは、正常な処理
ルーチンでは、タイマが一定時間内の命令によってリセ
ットされるようにしておき、一定時間を経過してもタイ
マがリセットされていない場合には割り込みを発生し、
プログラムが異常な処理ルーチンに入ったことを検出す
るためのタイマである。
In a normal processing routine, this watchdog timer is designed so that the timer is reset by an instruction within a fixed time, and if the timer is not reset even after the fixed time elapses, an interrupt is generated. Then
This is a timer for detecting that the program has entered an abnormal processing routine.

【0008】車両用エアバッグシステム等、車両用制御
装置の中で、より高い信頼性を要求される制御装置にお
いては、上述のウォッチドッグタイマの他に、前記マイ
クロプロセッサの動作状態を、常時、モニタするため
の、前記マイクロコンピュータとは別のマイクロコンピ
ュータを設け、マイクロコンピュータ相互間を通信回路
で接続し、この通信回路内を伝達する通信信号の送受信
間隔または送受信データの内容により前記マイクロプロ
セッサの動作状態を前記別のマイクロコンピュータで監
視するようになっていた。
In a vehicle control device such as an air bag system, which requires a higher reliability, in addition to the watchdog timer described above, the operating state of the microprocessor is always For monitoring, a microcomputer different from the microcomputer is provided, the microcomputers are connected to each other by a communication circuit, and the microprocessor is operated according to a transmission / reception interval of communication signals transmitted in the communication circuit or contents of transmission / reception data. The operating condition has been monitored by the other microcomputer.

【0009】以下、このモニタ用のマイクロコンピュー
タを設けた従来の技術について車両用エアバッグシステ
ムを例として図面を参照しながら詳しく説明する。
A conventional technique provided with this monitor microcomputer will now be described in detail with reference to the drawings by taking a vehicle airbag system as an example.

【0010】図8は、車両用エアバッグシステムが搭載
された車両の前席部を含む構成を示している。
FIG. 8 shows a configuration including a front seat portion of a vehicle on which the vehicle airbag system is mounted.

【0011】車両用エアバッグシステムは、エアバッグ
制御装置1を有し、このエアバッグ制御装置1には、後
述する加速度センサ(Gセンサ)が搭載されている。し
たがって、エアバッグ制御装置1は、車両の衝突時の加
速度、すなわち、衝突加速度が検出し易い位置に配置さ
れている。
The vehicle airbag system has an airbag control device 1, and the airbag control device 1 is equipped with an acceleration sensor (G sensor) described later. Therefore, the airbag control device 1 is arranged at a position where the acceleration upon collision of the vehicle, that is, the collision acceleration can be easily detected.

【0012】エアバッグ制御装置1には、ハーネス5を
通じて、運転席エアバッグアセンブリ2aと助手席アセ
ンブリ2bとが接続されている。運転席エアバッグアセ
ンブリ2aは、運転者を衝突時の衝撃から保護するため
のものであり、助手席エアバッグアセンブリ2bは、助
手席の搭乗者を衝突時の衝撃から保護するためのもので
ある。各エアバッグアセンブリ2a、2bには、エアバ
ッグ制御装置1の衝突判定結果により、そのエアバッグ
制御装置1からハーネス5を通じて動作に必要な電流が
供給された場合に、内蔵されたエアバッグを膨張させる
ためのガス発生装置が組み込まれている。
A driver seat airbag assembly 2a and a passenger seat assembly 2b are connected to the airbag control device 1 through a harness 5. The driver airbag assembly 2a is for protecting the driver from the impact at the time of a collision, and the passenger airbag assembly 2b is for protecting the passenger in the passenger seat from the impact at the time of the collision. . When a current required for operation is supplied from the airbag control device 1 to the airbag assemblies 2a and 2b through the harness 5 according to the collision determination result of the airbag control device 1, the built-in airbag is inflated. A gas generator for the purpose is incorporated.

【0013】エアバッグ制御装置1は、また、ハーネス
5を通じて、当該エアバッグシステムの正常状態または
異常状態を表示する警報ランプ3に接続されている。警
報ランプ3は、インストルメンタルパネル中の、視認し
やすい位置に取り付けられている。なお、エアバッグ制
御装置1には、図示していない車両用バッテリからフュ
ーズボックス4およびハーネス5を通じて電源が供給さ
れている。
The airbag control device 1 is also connected through a harness 5 to an alarm lamp 3 for displaying a normal state or an abnormal state of the airbag system. The alarm lamp 3 is attached to a position in the instrument panel where it is easily visible. Power is supplied to the airbag control device 1 from a vehicle battery (not shown) through the fuse box 4 and the harness 5.

【0014】図9は、エアバッグ制御装置1の詳しい構
成を示している。
FIG. 9 shows the detailed construction of the airbag control device 1.

【0015】このエアバッグ制御装置1は、電源回路1
1を有している。この電源回路11は、フューズボック
ス4を通じて車両バッテリから供給される電源を安定化
し、このエアバッグ制御装置1の各構成要素に電源を供
給する。また、電源回路11には、衝突時のバッテリ破
壊時に動作電源を確保するためのバックアップ回路と、
車両バッテリから供給される電源の電圧が何らかの原因
により低下した場合に動作電圧を確保するための昇圧回
路を含んでいる。
The airbag control device 1 includes a power supply circuit 1
One. The power supply circuit 11 stabilizes the power supplied from the vehicle battery through the fuse box 4 and supplies the power to each component of the airbag control device 1. Further, the power supply circuit 11 includes a backup circuit for ensuring an operating power supply when the battery is destroyed in the event of a collision,
It includes a booster circuit for ensuring an operating voltage when the voltage of the power supply supplied from the vehicle battery drops for some reason.

【0016】半導体Gセンサ12は、車両にかかる加速
度(必要に応じて加速度信号または加速度データともい
う。)Gを検出しこれを電気信号に変換してマイクロコ
ンピュータ17に供給する。
The semiconductor G sensor 12 detects an acceleration (also called an acceleration signal or acceleration data) G applied to the vehicle, converts it into an electric signal, and supplies it to the microcomputer 17.

【0017】故障診断入力回路13は、エアバッグシス
テムが正常かどうかをマイクロコンピュータ17により
診断するために、各部(例えば、エアバッグアセンブリ
2a、2b)から電気信号を取り込む。
The failure diagnosis input circuit 13 takes in an electric signal from each part (for example, the air bag assembly 2a, 2b) in order to diagnose by the microcomputer 17 whether or not the air bag system is normal.

【0018】警報ランプ駆動回路14は、マイクロコン
ピュータ17から出力される信号に基づいて警報ランプ
3を点灯または消灯する。
The alarm lamp drive circuit 14 turns on or off the alarm lamp 3 based on a signal output from the microcomputer 17.

【0019】電源回路11とエアバッグアセンブリ2
a、2b間に配されている機械式Gセンサ15は、マイ
クロコンピュータ17が、万一、誤動作した場合または
半導体Gセンサ12が故障した場合にエアバッグの暴発
を防止するためのものであり、衝突の際の加速度Gが一
定値以上のときに接点を閉じるようになっている。
Power circuit 11 and airbag assembly 2
The mechanical G sensor 15 arranged between a and 2b is for preventing the airbag 17 from exploding in the event that the microcomputer 17 malfunctions or the semiconductor G sensor 12 fails. The contact point is closed when the acceleration G at the time of collision exceeds a certain value.

【0020】点火電流供給回路16は、マイクロコンピ
ュータ17から供給される衝突判定信号に基づいて、規
定点火電流以上の電流をエアバッグアセンブリ2a、2
bに供給する。
The ignition current supply circuit 16 supplies a current higher than a specified ignition current to the air bag assemblies 2a, 2 based on the collision determination signal supplied from the microcomputer 17.
supply to b.

【0021】マイクロコンピュータ17は、半導体Gセ
ンサ12を通じて取り込まれる電気信号である加速度信
号に基づき衝突であるかどうか(衝突か非衝突か)を判
断し、衝突と判断した場合には、点火電流供給回路16
に衝突判定信号としての一定時間点火信号を出力する。
また、マイクロコンピュータ17は、故障診断入力回路
13を通じて電気信号を取り込み、故障であるかどうか
を判断し、故障と判断した場合には、警報ランプ駆動回
路14を通じて警報ランプ3を点灯する。
The microcomputer 17 determines whether it is a collision (collision or non-collision) on the basis of an acceleration signal which is an electric signal taken in through the semiconductor G sensor 12, and when it judges that it is a collision, it supplies an ignition current. Circuit 16
An ignition signal is output as a collision determination signal for a certain period of time.
Further, the microcomputer 17 takes in an electric signal through the failure diagnosis input circuit 13, judges whether or not there is a failure, and when it judges that there is a failure, the warning lamp drive circuit 14 turns on the warning lamp 3.

【0022】マイクロコンピュータ17には、同じくマ
イクロコンピュータであるモニタ回路18が接続され、
このモニタ回路18は、マイクロコンピュータ17の動
作状態を監視し、動作状態が異常であると判断したとき
には、マイクロコンピュータ17に対してリセット信号
121を送出してマイクロコンピュータ17の動作を停
止させる。
A monitor circuit 18, which is also a microcomputer, is connected to the microcomputer 17,
The monitor circuit 18 monitors the operating state of the microcomputer 17, and when it determines that the operating state is abnormal, it sends a reset signal 121 to the microcomputer 17 to stop the operation of the microcomputer 17.

【0023】マイクロコンピュータ17としては、高速
かつ複雑な処理が要求されるために、例えば、16ビッ
トのマイクロコンピュータが使用されるが、それほどの
高速性、複雑な処理を要求されないモニタ回路18は、
4ビットまたは8ビット等のマイクロコンピュータで構
成される。マイクロコンピュータ17とモニタ回路18
とは、それぞれに内蔵されている通信手段によりデータ
の送受が可能である。
A high-speed and complicated process is required for the microcomputer 17, and therefore, for example, a 16-bit microcomputer is used, but the monitor circuit 18 which does not require such high-speed and complicated process is
It is composed of a 4-bit or 8-bit microcomputer. Microcomputer 17 and monitor circuit 18
Is capable of sending and receiving data by the communication means incorporated in each.

【0024】ウォッチドッグタイマ19は、マイクロコ
ンピュータ17の動作状態を監視する。マイクロコンピ
ュータ17は、予め設定された時間内にウォッチドッグ
タイマ19にウォッチドッグクリア信号20を送出す
る。ウォッチドッグタイマ19は、このウォッチドッグ
クリア信号20が規定時間内に供給されなかった場合、
マイクロコンピュータ17が、例えば、暴走したものと
判断してリセット信号122を送出して、マイクロコン
ピュータ17の動作を停止する。なお、ウォッチドッグ
クリア信号20は、所定の(所望の)処理を行わせるた
めのプログラム中の適当な箇所に予め書き込んでおく。
The watchdog timer 19 monitors the operating state of the microcomputer 17. The microcomputer 17 sends a watchdog clear signal 20 to the watchdog timer 19 within a preset time. If the watchdog clear signal 20 is not supplied within the specified time, the watchdog timer 19
For example, the microcomputer 17 determines that it has run out of control and sends a reset signal 122 to stop the operation of the microcomputer 17. The watchdog clear signal 20 is written in advance at an appropriate place in the program for performing a predetermined (desired) process.

【0025】図10は、マイクロコンピュータ17の詳
しい構成を示している。
FIG. 10 shows a detailed structure of the microcomputer 17.

【0026】マイクロコンピュータ17は、中央処理装
置(CPU)の機能を有するマイクロプロセッサ21を
有している。このマイクロプロセッサ21は、予めRO
M22に書き込まれた動作用プログラムに基づいて、入
出力動作に係る種々の演算処理を実行する。RAM23
には、プログラムまたは制御上必要となるデータが一時
的に格納される。水晶発振子等を有する発振器(水晶発
振器)から構成される基準クロック発生器24から出力
される基準クロックRCKがマイクロプロセッサ21と
インターバルタイマ25に供給される。
The microcomputer 17 has a microprocessor 21 having the function of a central processing unit (CPU). This microprocessor 21 has a RO
Based on the operation program written in M22, various arithmetic processes related to input / output operations are executed. RAM23
In the area, a program or data necessary for control is temporarily stored. A reference clock RCK output from a reference clock generator 24 including an oscillator (crystal oscillator) having a crystal oscillator or the like is supplied to the microprocessor 21 and the interval timer 25.

【0027】インターバルタイマ25は、基準クロック
RCKを計数して規定時間間隔でマイクロプロセッサ2
1に対して割り込み要求信号30を供給する。
The interval timer 25 counts the reference clock RCK and sets the microprocessor 2 at a specified time interval.
The interrupt request signal 30 is supplied to 1.

【0028】この場合、インターバルタイマ25は、基
準クロックRCKを計数し、この計数値を保持するカウ
ントレジスタ26と、マイクロプロセッサ21から送出
されるカウント設定レジスタ書き込み値(以下、カウン
トレジスタ設定値という。)27を保持するカウント設
定レジスタ28と、カウントレジスタ26の計数値と保
持されたカウントレジスタ設定値27とを比較する比較
回路29とから構成されている。
In this case, the interval timer 25 counts the reference clock RCK and holds the count value and the count setting register write value (hereinafter referred to as the count register setting value) sent from the microprocessor 21. ) 27 for holding a count setting register 28, and a comparison circuit 29 for comparing the count value of the count register 26 with the held count register setting value 27.

【0029】比較回路29は、その計数値とカウントレ
ジスタ設定値27とが一致した場合に、マイクロプロセ
ッサ21に割り込み要求信号30を出力するとともに、
カウントレジスタ26の計数値をリセットするカウント
レジスタクリア信号31をカウントレジスタ26に出力
する。
The comparison circuit 29 outputs an interrupt request signal 30 to the microprocessor 21 when the count value and the count register set value 27 match, and
A count register clear signal 31 for resetting the count value of the count register 26 is output to the count register 26.

【0030】次に上述の図8例〜図10例の動作につい
て図11〜図13のフローチャートを参照して説明す
る。
Next, the operation of the above-described examples of FIGS. 8 to 10 will be described with reference to the flowcharts of FIGS. 11 to 13.

【0031】図11は、マイクロコンピュータ17の電
源投入時以降の概略の動作説明に供されるフローチャー
トである。
FIG. 11 is a flow chart provided for explaining a general operation after the microcomputer 17 is powered on.

【0032】図12は、マイクロコンピュータ17の割
り込み処理の説明に供されるフローチャートである。
FIG. 12 is a flow chart for explaining the interrupt processing of the microcomputer 17.

【0033】図13は、モニタ回路18の電源投入時以
降の概略の動作説明に供されるフローチャートである。
FIG. 13 is a flow chart provided for explaining the general operation of the monitor circuit 18 after the power is turned on.

【0034】まず、図11を参照して説明する。First, a description will be given with reference to FIG.

【0035】電源投入直後、実際には、イグニッション
スイッチをON(オン)状態にした直後に、マイクロコ
ンピュータ17は、内部回路で所望の動作が行えるよう
な初期化を行う(ステップS1(1))。ここでは、マ
イクロプロセッサ21によりROM22からカウントレ
ジスタ設定値27が読み出され、これが、カウント設定
レジスタ28に書き込まれるものとする。
Immediately after the power is turned on, in fact, immediately after the ignition switch is turned on, the microcomputer 17 performs initialization so that the internal circuit can perform a desired operation (step S1 (1)). . Here, it is assumed that the microprocessor 21 reads the count register set value 27 from the ROM 22 and writes it in the count set register 28.

【0036】次に、マイクロコンピュータ17は、エア
バッグシステムが所望の動作が可能な状態にあるかどう
かを予め初期診断するため、半導体Gセンサ12からの
加速度信号Gおよび故障診断入力回路13からの診断信
号を取り込む(ステップS1(2))。
Next, the microcomputer 17 pre-diagnoses whether or not the desired operation of the airbag system is possible, so that the acceleration signal G from the semiconductor G sensor 12 and the fault diagnosis input circuit 13 are inputted from the microcomputer 17. A diagnostic signal is fetched (step S1 (2)).

【0037】次に、初期診断結果を判定する(ステップ
S1(3))。例えば、タイヤの回転数の微分信号(加
速度信号)がゼロ値であるのに、加速度信号Gが一定値
以上であった場合や診断信号、例えば、エアバッグアセ
ンブリ2a、2bの抵抗値が所定範囲外であった場合に
は、故障有りと判断する。
Next, the initial diagnosis result is determined (step S1 (3)). For example, when the differential signal (acceleration signal) of the rotation speed of the tire has a zero value, but the acceleration signal G is a certain value or more, or a diagnostic signal, for example, the resistance value of the airbag assemblies 2a and 2b is within a predetermined range. If it is outside, it is determined that there is a failure.

【0038】故障有りと判断した場合には、警報ランプ
点灯信号を警報ランプ駆動回路14に供給する(ステッ
プS1(4))。これにより、警報ランプ3が点灯す
る。
If it is determined that there is a failure, an alarm lamp lighting signal is supplied to the alarm lamp drive circuit 14 (step S1 (4)). As a result, the alarm lamp 3 is turned on.

【0039】次いで、(ステップS1(3))の初期診
断結果での故障内容が、衝突判定性能に影響があるかど
うかを判定する(ステップS1(5))。
Then, it is determined whether or not the failure content in the initial diagnosis result of (step S1 (3)) has an influence on the collision determination performance (step S1 (5)).

【0040】故障内容が衝突判定性能に影響があると判
定した場合、例えば、上述のように、タイヤの回転数の
微分信号がゼロ値であるのに、加速度信号Gが一定値以
上であるような場合には、衝突判定動作やエアバッグ点
火動作を中断するために衝突判定処理の停止処理を行う
(ステップS1(6))。
When it is determined that the content of the failure affects the collision determination performance, for example, as described above, the acceleration signal G is equal to or more than a certain value although the differential signal of the rotation speed of the tire has a zero value. In this case, the collision determination process is stopped to suspend the collision determination operation and the airbag ignition operation (step S1 (6)).

【0041】この場合、マイクロコンピュータ17は、
モニタ回路18に対して衝突判定動作を行うことができ
ないことを表すデータを送信する(ステップS1
(7))。
In this case, the microcomputer 17
Data indicating that the collision determination operation cannot be performed is transmitted to the monitor circuit 18 (step S1).
(7)).

【0042】そして、マイクロコンピュータ17は、自
らエアバッグシステムの制御プログラムの実行を停止す
る(ステップS1(8))。
Then, the microcomputer 17 itself stops the execution of the control program of the airbag system (step S1 (8)).

【0043】一方、ステップS1(3)での診断結果が
正常、またはステップS1(5)で衝突判定動作が可能
とされたときには、衝突判定処理を開始するとともに、
マイクロコンピュータ17は、モニタ回路18に対して
衝突判定処理の開始を通知する(ステップS1
(9))。
On the other hand, when the diagnosis result in step S1 (3) is normal or the collision determination operation is enabled in step S1 (5), the collision determination process is started and
The microcomputer 17 notifies the monitor circuit 18 of the start of the collision determination process (step S1).
(9)).

【0044】次に、マイクロコンピュータ17は、エア
バッグシステムの各部の状態が正常であるかどうかを判
断するために、故障診断入力回路13より診断電圧、例
えば、エアバッグアセンブリ2a、2bの各端子の電圧
を読み取り(ステップS1(10))、この読み取りの
終了をモニタ回路18に通知する(ステップS1(1
1))。
Next, the microcomputer 17 uses a diagnostic voltage from the fault diagnostic input circuit 13, for example, each terminal of the airbag assemblies 2a and 2b, in order to determine whether the state of each part of the airbag system is normal. Is read (step S1 (10)), and the monitor circuit 18 is notified of the completion of the reading (step S1 (1)).
1)).

【0045】マイクロコンピュータ17は、ステップS
1(11)で読み取った診断電圧に基づいてエアバッグ
システムが異常であるかどうかを判断する(ステップS
1(12))。例えば、診断電圧が所定範囲外の場合に
は、異常と判定する。
The microcomputer 17 executes step S
It is determined whether or not the airbag system is abnormal based on the diagnostic voltage read in step 1 (11) (step S
1 (12)). For example, when the diagnostic voltage is out of the predetermined range, it is determined to be abnormal.

【0046】異常と判定した場合には、警報ランプ駆動
回路14を通じて警報ランプ3を点灯させる(ステップ
S1(13))。
If it is determined to be abnormal, the alarm lamp 3 is turned on through the alarm lamp drive circuit 14 (step S1 (13)).

【0047】マイクロコンピュータ17は、ステップS
1(12)の判断結果において、故障の有無にかかわら
ず、モニタ回路18に対して、故障診断データおよびそ
の結果を送信する(ステップS1(14))。
The microcomputer 17 executes step S
In the judgment result of 1 (12), the failure diagnosis data and the result thereof are transmitted to the monitor circuit 18 regardless of the presence or absence of a failure (step S1 (14)).

【0048】次に、マイクロコンピュータ17は、電源
回路11から電源が供給されているかどうか、言い換え
れば、通電されているかどうかを判断する(ステップS
1(15))。
Next, the microcomputer 17 determines whether power is being supplied from the power supply circuit 11, in other words, whether power is being supplied (step S).
1 (15)).

【0049】電源が供給されていなかった場合には、モ
ニタ回路18に対して電源が非通電状態になっているこ
とを通知し(ステップS1(16))、その後に、マイ
クロコンピュータ17は、自らエアバッグシステムの制
御プログラムの実行を停止する(ステップS1(1
7))。
If the power is not supplied, the monitor circuit 18 is informed that the power is not energized (step S1 (16)), and then the microcomputer 17 itself. The execution of the control program of the airbag system is stopped (step S1 (1
7)).

【0050】ステップS1(15)の判定において、電
源が供給されていた場合には、モニタ回路18に対して
それを通知する(ステップS1(18))。
When the power is supplied in the determination in step S1 (15), the monitor circuit 18 is notified of it (step S1 (18)).

【0051】以上の処理動作が終了した場合、マイクロ
コンピュータ17は、ステップS1(10)以降の処理
に戻り、電源の供給が停止されるまで、ステップS1
(10)からステップS1(18)までの処理を繰り返
す。
When the above processing operation is completed, the microcomputer 17 returns to the processing of step S1 (10) and thereafter, and continues to step S1 until the power supply is stopped.
The processing from (10) to step S1 (18) is repeated.

【0052】次に、図12を参照して説明する。なお、
図12は割り込み処理の内容を示しており、その意味
で、図11は、バックグラウンド処理を示しているとい
える。
Next, description will be made with reference to FIG. In addition,
FIG. 12 shows the contents of the interrupt processing, and in that sense, FIG. 11 can be said to show the background processing.

【0053】マイクロプロセッサ21がインターバルタ
イマ25を構成する比較回路29から割り込み要求信号
30を受け付けると、図12に示す割り込み処理ルーチ
ンの実行が開始される(ステップS2(1))。
When the microprocessor 21 receives the interrupt request signal 30 from the comparison circuit 29 constituting the interval timer 25, the execution of the interrupt processing routine shown in FIG. 12 is started (step S2 (1)).

【0054】この場合、まず、この割り込み要求信号3
0を受け付けた時点において、衝突判定処理を行うかど
うかを判定する(ステップS2(2))。例えば、図1
1中の、ステップS1(8)やステップS1(17)の
制御停止処理中である場合には、ステップS2(3)以
降の衝突判定処理を開始することなく、ステップS2
(7)へ移行し、割り込み要求信号30を受け付けたと
きの、言い換えれば、割り込みの発生を受け付けたとき
の処理に戻る(ステップS2(7))。
In this case, first, the interrupt request signal 3
When 0 is accepted, it is determined whether or not the collision determination process is performed (step S2 (2)). For example, FIG.
If the control stop processing of step S1 (8) or step S1 (17) in 1 is being performed, the collision determination processing of step S2 (3) and subsequent steps is not started and step S2 is performed.
The process proceeds to (7) and returns to the process when the interrupt request signal 30 is received, in other words, when the interrupt is received (step S2 (7)).

【0055】ステップS2(2)において、衝突判定処
理を開始しても有効である処理状態にあると判断したと
き、マイクロコンピュータ17は、半導体Gセンサ12
から加速度信号Gを取り込む(ステップS2(3))。
なお、取り込んだ加速度信号Gは、マイクロコンピュー
タ17中のA/D変換器によりデジタル信号である加速
度データGに変換されてRAM23に記憶される。
When it is determined in step S2 (2) that the collision determination process is started, the microcomputer 17 determines that the semiconductor G sensor 12 is effective.
The acceleration signal G is taken from (step S2 (3)).
The acquired acceleration signal G is converted into acceleration data G which is a digital signal by an A / D converter in the microcomputer 17 and stored in the RAM 23.

【0056】次に、マイクロコンピュータ17は、加速
度データGをもとに衝突か非衝突かの判定演算を行う
(ステップS2(4))。
Next, the microcomputer 17 carries out a judgment operation of collision or non-collision based on the acceleration data G (step S2 (4)).

【0057】衝突と判定した場合には、点火電流供給回
路16に点火信号を一定時間送出する(ステップS2
(6))。これにより、エアバッグアセンブリ2a、2
b中のエアバッグが膨張する。その後、割り込み前の処
理に戻る((ステップS2(7))。
When it is determined that a collision has occurred, an ignition signal is sent to the ignition current supply circuit 16 for a certain period of time (step S2).
(6)). Thereby, the airbag assemblies 2a, 2
The airbag in b is inflated. After that, the process returns to the process before the interruption ((step S2 (7)).

【0058】ステップS2(5)において、非衝突と判
定した場合には、点火信号を送出することなく、割り込
み前の処理に戻る(ステップS2(7))。
If it is determined in step S2 (5) that there is no collision, the process returns to the process before interruption without sending the ignition signal (step S2 (7)).

【0059】次に、図13を参照してモニタ回路18の
動作について説明する。
Next, the operation of the monitor circuit 18 will be described with reference to FIG.

【0060】電源が投入されたときに、モニタ回路18
が起動され、このモニタ回路18中に内蔵された図示し
ないインターバルタイマが初期化される(ステップS3
(1))。なお、モニタ回路18の構成は、マイクロコ
ンピュータ17と同様の構成である。ただし、上述した
ように、マイクロコンピュータ17が16ビットのマイ
クロコンピュータであるときには、例えば、4ビットの
マイクロコンピュータで構成されている。したがって、
基準クロック発生器も内蔵されている。
When the power is turned on, the monitor circuit 18
Is started, and an interval timer (not shown) built in the monitor circuit 18 is initialized (step S3).
(1)). The monitor circuit 18 has the same configuration as the microcomputer 17. However, as described above, when the microcomputer 17 is a 16-bit microcomputer, it is composed of, for example, a 4-bit microcomputer. Therefore,
A reference clock generator is also built-in.

【0061】次に、モニタ回路18の内蔵インターバル
タイマにより内蔵基準クロックを計数し、初期設定され
た規定時間(設定時間ともいう。)に対応する計数値に
達するまで、マイクロコンピュータ17からの通知、す
なわち、受信データがあるかどうかを判定し、規定時間
内にデータを受信できなかった場合には、ステップS3
(3)の処理に移行し、受信できた場合には、ステップ
S3(5)の処理に移行する(ステップS3(2))。
Next, the built-in interval timer of the monitor circuit 18 counts the built-in reference clock, and a notification from the microcomputer 17 is sent until the count value corresponding to the initially set specified time (also called set time) is reached. That is, it is determined whether there is received data, and if the data cannot be received within the specified time, step S3
If it is possible to proceed to the process of (3) and receive, the process proceeds to step S3 (5) (step S3 (2)).

【0062】ステップS3(3)では、モニタ回路18
が、マイクロコンピュータ17に異常があると判断し、
そのマイクロコンピュータ17用のリセット信号121
(図9参照)を送出し(ステップ(S3))、その後、
自らの制御プログラムによる処理を停止する(ステップ
S3(4))。
In step S3 (3), the monitor circuit 18
However, it is determined that the microcomputer 17 has an abnormality,
Reset signal 121 for the microcomputer 17
(See FIG. 9) (step (S3)), and then
The processing by its own control program is stopped (step S3 (4)).

【0063】ステップS3(2)の判定が成立した場
合、言い換えれば、規定時間内にデータを受信した場合
には、この受信データが衝突判定開始を表すデータ(図
4中、ステップS1(9)に係るデータであって、単
に、衝突判定開始データともいう。)であるか、衝突判
定不可を表すデータ(同、ステップS1(7)に係るデ
ータであって、単に、衝突判定不可データともいう。)
であるか、またはそれら以外のデータであるかどうかを
判定する(ステップS3(5))。受信データがそれら
以外のデータであった場合には、上述のステップS3
(3)およびステップS3(4)の処理を行って処理を
停止する。衝突判定停止データであった場合には、マイ
クロコンピュータ17が動作を自己停止しているので、
ステップS3(3)の処理によるリセット信号121の
送出が不要であるので、結合子で示すように、モニタ
回路18も自己の制御プログラムによる処理を停止する
ために、ステップS3(4)の制御停止処理を行う。
When the determination in step S3 (2) is established, in other words, when the data is received within the specified time, the received data is data indicating the start of collision determination (step S1 (9) in FIG. 4). Which is data related to step S1 (7) and is also simply referred to as collision determination impossible data. .)
Or it is data other than those (step S3 (5)). If the received data is data other than the above, the above-described step S3
The process of (3) and step S3 (4) is performed and the process is stopped. If it is the collision determination stop data, since the microcomputer 17 has stopped its operation,
Since it is unnecessary to send the reset signal 121 by the processing of step S3 (3), the monitor circuit 18 also stops the processing of its own control program as shown by the connector, so that the control of step S3 (4) is stopped. Perform processing.

【0064】一方、受信データが衝突判定開始データで
あった場合には、内蔵インターバルタイマをリセットす
る(ステップS3(6))。
On the other hand, when the received data is the collision determination start data, the built-in interval timer is reset (step S3 (6)).

【0065】そして、モニタ回路18は、再び、規定時
間までマイクロコンピュータ17からの通知(データ)
を待ち、規定時間までにデータを受信できなかった場合
にはステップS3(3)に移行し、受信できた場合に
は、ステップS3(8)へ移行する(ステップS3
(7))。
Then, the monitor circuit 18 again sends a notification (data) from the microcomputer 17 until the specified time.
Waiting, and if the data cannot be received by the specified time, the process proceeds to step S3 (3), and if the data can be received, the process proceeds to step S3 (8) (step S3).
(7)).

【0066】ステップS3(8)では、受信データが診
断電圧の読み取り終了を表すデータ(図11中、ステッ
プS1(11)に係るデータ)であるかどうかを判定
し、そうでなかった場合には、ステップS3(3)に移
行し、そうであった場合には、ステップS3(9)に移
行する。
In step S3 (8), it is judged whether or not the received data is data indicating the end of reading the diagnostic voltage (data in step S1 (11) in FIG. 11). , S3 (3), and if so, move to S3 (9).

【0067】ステップS3(9)では、内蔵インターバ
ルタイマをリセットする。
In step S3 (9), the built-in interval timer is reset.

【0068】次に、モニタ回路18は、再び、規定時間
までマイクロコンピュータ17からの通知(データ)を
待ち、規定時間までにデータを受信できなかった場合に
はステップS3(3)に移行し、受信できた場合には、
ステップS3(11)へ移行する(ステップS3(1
0))。
Next, the monitor circuit 18 again waits for the notification (data) from the microcomputer 17 until the prescribed time, and if the data cannot be received by the prescribed time, the process proceeds to step S3 (3), If you can receive it,
The process proceeds to step S3 (11) (step S3 (1
0)).

【0069】ステップS3(11)では、受信データが
診断結果を表すデータ(図11中、ステップS1(1
4)に係るデータ)であるかどうかを判定し、そうでな
かった場合には、ステップS3(3)に移行し、そうで
あった場合には、ステップS3(12)に移行する。
In step S3 (11), the received data represents the diagnostic result (step S1 (1
4)). If not, the process proceeds to step S3 (3), and if not, the process proceeds to step S3 (12).

【0070】ステップS3(12)では、内蔵インター
バルタイマをリセットする。
In step S3 (12), the built-in interval timer is reset.

【0071】次に、モニタ回路18は、再び、規定時間
までマイクロコンピュータ17からの通知(データ)を
待ち、規定時間までにデータを受信できなかった場合に
はステップS3(3)に移行し、受信できた場合には、
ステップS3(14)へ移行する(ステップS3(1
3))。
Next, the monitor circuit 18 again waits for the notification (data) from the microcomputer 17 until the specified time, and if the data cannot be received by the specified time, moves to step S3 (3), If you can receive it,
The process proceeds to step S3 (14) (step S3 (1
3)).

【0072】ステップS3(14)では、受信データが
電源継続(通電継続)を表すデータ(図11中、ステッ
プS1(18)に係るデータであるか、電源断を表すデ
ータ(図11中、ステップS1(16)に係るデータ)
であるかどうかを判定し、いずれのデータでもなかった
場合には、ステップS3(3)に移行し、電源断を表す
データであった場合には、結合子の経路を通じてステ
ップS3(4)に移行し、電源継続(通電中)を表すデ
ータであった場合には、ステップS3(15)に移行す
る。
In step S3 (14), the received data is data indicating continuation of power supply (continuing energization) (data related to step S1 (18) in FIG. 11) or data indicating power failure (step in FIG. 11). (Data related to S1 (16))
If it is not any data, the process proceeds to step S3 (3), and if it is data indicating power failure, the process proceeds to step S3 (4) through the path of the connector. If the data indicates that the power supply continues (energized), the process proceeds to step S3 (15).

【0073】ステップS3(15)では、内蔵インター
バルタイマをリセットする。
In step S3 (15), the built-in interval timer is reset.

【0074】そして、上述の動作を繰り返すために、結
合子の経路を通じてステップS3(7)に戻る。
Then, in order to repeat the above operation, the process returns to step S3 (7) through the path of the connector.

【0075】このように上述の従来の技術によれば、マ
イクロコンピュータ17の動作異常を、同様にマイクロ
コンピュータであるモニタ回路18により監視し、エア
バッグシステムの信頼性を確保している。
As described above, according to the above-mentioned conventional technique, the abnormal operation of the microcomputer 17 is monitored by the monitor circuit 18 which is also a microcomputer, and the reliability of the airbag system is ensured.

【0076】[0076]

【発明が解決しようとする課題】しかしながら、上述し
た従来の技術では、マイクロコンピュータ17を監視す
るために、別のマイクロコンピュータであるモニタ回路
18が必要であり、コストがかかるという問題があっ
た。
However, the above-mentioned conventional technique has a problem that the monitor circuit 18 which is another microcomputer is required to monitor the microcomputer 17, which causes a cost increase.

【0077】また、マイクロコンピュータ17とモニタ
回路18との間では、データ通信を一定の処理速度を確
保して行うために相当高速の処理が必要であり、その
分、それらを構成するマイクロプロセッサに高速のもの
を用いる必要があり、これもコストアップ要因になって
いる。
Further, between the microcomputer 17 and the monitor circuit 18, a considerably high-speed processing is required to perform data communication while ensuring a constant processing speed. It is necessary to use a high-speed one, which also causes a cost increase.

【0078】また、より一層処理速度を上げたい、言い
換えれば、高速の処理を行いたいという要求もある。
There is also a demand to further increase the processing speed, in other words, to perform high-speed processing.

【0079】さらに、マイクロプロセッサが2つあるた
めに、例えば、電源投入時、あるいは、電源瞬断時に、
それぞれの動作手順・動作タイミングを同期させること
を保証するために、ソフトウエア開発時の対策期間と実
車による検証期間が相当長期間に渡るという問題があ
り、結局、開発に多大な工数がかかっていた。
Further, since there are two microprocessors, for example, when the power is turned on or when the power is momentarily cut off,
In order to guarantee that each operation procedure and operation timing are synchronized, there is a problem that the countermeasure period during software development and the verification period with the actual vehicle take a considerably long time, and in the end, a lot of man-hours are required for development. It was

【0080】この発明はこのような課題を考慮してなさ
れたものであり、簡単な構成でより高速の処理が可能と
なり、かつ電源投入時・瞬断時における問題をも解決す
ることを可能とする制御装置の異常検出装置およびその
方法を提供することを目的とする。
The present invention has been made in consideration of the above problems, and enables higher-speed processing with a simple structure, and can solve the problems at the time of power-on / interruption. It is an object of the present invention to provide an abnormality detecting device for a control device and a method thereof.

【0081】[0081]

【課題を解決するための手段】この装置発明は、例え
ば、図1に示すように、マイクロプロセッサ21に基準
クロックRCKを供給する基準クロック発生手段24
と、基準クロックRCKを計数し、計数値が設定値27
に達する毎に計数終了信号30を出力し、この計数終了
信号30をマイクロプロセッサ21に対する規定周期を
有する割り込み信号30として出力する第1の計数手段
25と、割り込み信号30の規定周期よりも短い周期の
比較計数用クロックCCKを発生する比較計数用クロッ
ク発生手段40と、割り込み信号30の規定周期の間、
比較計数用クロックCCKを計数し、計数値を出力する
第2の計数手段41と、この第2の計数手段41の計数
値が、予め定めた設定値範囲内にあるかどうかを比較判
別する比較判別手段21と、を備えることを特徴とす
る。
According to the present invention, for example, as shown in FIG. 1, reference clock generating means 24 for supplying a reference clock RCK to a microprocessor 21.
And the reference clock RCK is counted, and the count value is the set value 27.
The first counting means 25, which outputs the counting end signal 30 each time, and outputs the counting end signal 30 as the interrupt signal 30 having a specified cycle to the microprocessor 21, and a cycle shorter than the specified cycle of the interrupt signal 30. Of the comparison counting clock generating means 40 for generating the comparison counting clock CCK of
A second counting means 41 that counts the comparative counting clock CCK and outputs a count value, and a comparison that determines whether or not the count value of the second counting means 41 is within a predetermined set value range. And a discriminating means 21.

【0082】また、この装置発明は、前記比較判別手段
の比較判別結果により、前記第2の計数手段の計数値が
前記予め定めた設定値範囲内であるときには、前記マイ
クロプロセッサの処理速度が正常であると判断して、前
記第2の計数手段による計数をリセットするとともに、
前記第2の計数手段の計数値が前記予め定めた設定値範
囲外であるときには、前記マイクロプロセッサの処理速
度が異常であると判断することを特徴とする。
Further, according to the present invention, the processing speed of the microprocessor is normal when the count value of the second counting means is within the predetermined set value range according to the comparison and determination result of the comparison and determination means. And reset the count by the second counting means,
When the count value of the second counting means is out of the predetermined set value range, it is determined that the processing speed of the microprocessor is abnormal.

【0083】この方法発明は、マイクロプロセッサ用の
プログラムを所望の動作順位の処理単位毎に分割し、前
記処理単位毎のプログラムを実行するときに、その先頭
部で当該処理の開始を表す処理開始フラグをセットし、
前記処理単位毎のプログラムの終了部で、前記処理開始
フラグがセットされているかどうかを確認することを特
徴とする。
According to the method invention, the program for the microprocessor is divided for each processing unit having a desired operation order, and when the program for each processing unit is executed, the processing start at the head portion thereof indicates the start of the processing. Set flags,
At the end of the program for each processing unit, it is confirmed whether or not the processing start flag is set.

【0084】また、この方法発明は、前記処理開始フラ
グがセットされているかどうかを確認した際に、セット
されていた場合には、当該処理単位のプログラムが正常
に実行されたと判断して前記処理開始フラグをリセット
し、一方、前記処理開始フラグがリセットされていた場
合には、当該処理単位のプログラムが異常に実行された
と判断することを特徴とする。
Further, according to the method invention, when it is confirmed whether or not the processing start flag is set, if it is set, it is judged that the program of the processing unit is normally executed, and the processing is executed. The start flag is reset, and if the process start flag is reset, it is determined that the program of the processing unit is abnormally executed.

【0085】さらに、この方法発明は、マイクロプロセ
ッサ用のプログラムを所望の動作順位の処理単位毎に分
割し、この分割した処理単位毎に個別の処理開始フラグ
を設け、前記処理単位毎のプログラムを実行するとき
に、その先頭部で前記処理単位毎の処理開始フラグをセ
ットし、前記処理単位毎のプログラムの終了部で、前記
処理開始フラグがセットされているかどうかを確認し、
さらに、前記所望の動作順位で実行される前記各処理単
位毎のプログラム間の少なくとも1箇所で、前記各処理
単位毎に設けられている個別の処理開始フラグが全てセ
ットされているかどうかを確認することを特徴とする。
Further, according to the method invention, the program for the microprocessor is divided for each processing unit having a desired operation order, an individual processing start flag is provided for each divided processing unit, and the program for each processing unit is provided. At the time of execution, the processing start flag for each processing unit is set at the beginning thereof, and at the end of the program for each processing unit, it is confirmed whether the processing start flag is set,
Further, it is confirmed whether or not all individual processing start flags provided for each processing unit are set at at least one place between the programs for each processing unit executed in the desired operation order. It is characterized by

【0086】さらにまた、この方法発明は、前記処理単
位毎のプログラムの終了部で、前記処理開始フラグがセ
ットされているかどうかを確認した際に、処理開始フラ
グがセットされており、かつ前記所望の動作順位で実行
される前記各処理単位毎のプログラムの間の少なくとも
1箇所で、前記各処理単位毎に設けられている個別の処
理開始フラグが全てセットされているかどうかを確認し
た際に、前記個別の処理開始フラグが全てセットされて
いた場合には、前記処理単位のプログラムが全て正常に
実行されたと判断して前記処理開始フラグを全てリセッ
トし、一方、前記処理単位毎のプログラムの終了部で、
前記処理開始フラグがリセットされていた場合、また
は、前記所望の動作順位で実行される前記各処理単位毎
のプログラムの間の少なくとも1箇所で、前記各処理単
位毎に設けられている個別の処理開始フラグが全てセッ
トされているかどうかを確認した際に、前記個別の処理
開始フラグの少なくとも1個がリセットされていた場合
には、前記処理単位のプログラムが異常に実行されたと
判断することを特徴とする。
Furthermore, according to the method invention, when it is confirmed whether or not the processing start flag is set at the end portion of the program for each processing unit, the processing start flag is set, and When it is confirmed whether or not all the individual process start flags provided for each of the processing units are set at at least one place between the programs for each of the processing units executed in the operation order of If all the individual processing start flags are set, it is determined that all the processing unit programs have been executed normally, and all the processing start flags are reset, while the processing unit program ends. In the department
Individual processing provided for each processing unit when the processing start flag is reset, or at least at one place between programs for each processing unit executed in the desired operation order. When it is confirmed whether all the start flags are set, if at least one of the individual process start flags is reset, it is determined that the program of the processing unit is abnormally executed. And

【0087】さらにまた、この方法発明は、割り込み処
理用のプログラムを有し、この割り込み処理用のプログ
ラムを実行するときに、その先頭部で当該割り込み処理
の開始を表す割り込み処理開始フラグをセットし、前記
割り込み処理用のプログラムの終了部で、前記割り込み
処理開始フラグがセットされているかどうかを確認する
ことを特徴とする。
Furthermore, the method invention has a program for interrupt processing, and when the program for interrupt processing is executed, an interrupt processing start flag indicating the start of the interrupt processing is set at the head of the program. At the end of the interrupt processing program, it is confirmed whether or not the interrupt processing start flag is set.

【0088】さらにまた、この方法発明は、マイクロプ
ロセッサに基準クロックを供給する基準クロック発生手
段と、前記基準クロックを計数し、計数値が設定値に達
する毎に計数終了信号を出力し、この計数終了信号を前
記マイクロプロセッサに対する規定周期を有する割り込
み信号として出力する第1の計数手段と、前記割り込み
信号の規定周期よりも短い周期の比較計数用クロックを
発生する比較計数用クロック発生手段と、前記割り込み
信号の規定周期の間、前記比較計数用クロックを計数
し、計数値を出力する第2の計数手段と、この第2の計
数手段の計数値が、予め定めた設定値範囲内にあるかど
うかを比較判別する比較判別手段とを備える制御装置の
異常検出方法であって、前記マイクロプロセッサ用のプ
ログラムを所望の動作順位の処理単位毎に分割し、前記
処理単位毎のプログラムを実行するときに、その先頭部
で当該処理の開始を表す処理開始フラグをセットし、前
記処理単位毎のプログラムの終了部で、前記処理開始フ
ラグがセットされているかどうかを確認することを特徴
とする。
Further, according to the present invention, the reference clock generating means for supplying the reference clock to the microprocessor and the reference clock are counted, and a count end signal is output each time the count value reaches a set value. First counting means for outputting an end signal as an interrupt signal having a specified cycle to the microprocessor; comparison counting clock generation means for generating a comparison counting clock having a cycle shorter than the specified cycle of the interrupt signal; Second counting means that counts the comparison counting clock and outputs the count value during a specified period of the interrupt signal, and whether the count value of the second counting means is within a predetermined set value range. A method for detecting an abnormality in a control device, comprising: a comparison / determination means for performing comparison / determination to determine whether or not a program for the microprocessor is operated in a desired manner. When the program for each processing unit is divided, the processing start flag indicating the start of the processing is set at the head of the program when the program for each processing unit is executed, and at the end of the program for each processing unit, It is characterized by confirming whether the processing start flag is set.

【0089】[0089]

【作用】この発明によれば、基準クロックを発生する基
準クロック発生手段と比較計数用クロックを発生する比
較計数用クロック発生手段とを有し、第1の計数手段に
より、基準クロックを所定数計数して、規定周期毎にマ
イクロプロセッサに割り込み信号を供給し、第2の計数
手段により、前記規定周期の間、比較計数用クロックを
計数する。そして、この比較計数用クロックの規定周期
間の計数値が、予め定めた設定値範囲内にあるかどうか
を比較判別手段により判別するようにしている。
According to the present invention, it has the reference clock generating means for generating the reference clock and the comparison counting clock generating means for generating the comparison counting clock, and the first counting means counts a predetermined number of the reference clocks. Then, an interrupt signal is supplied to the microprocessor every prescribed period, and the second counting means counts the comparison counting clock during the prescribed period. Then, the comparison / determination means determines whether or not the count value of the comparison / counting clock for the specified period is within a predetermined set value range.

【0090】そして、設定値範囲内であるときには、マ
イクロプロセッサの処理速度が正常であると判断して第
2の計数手段による計数をリセットして再び第2の計数
手段による計数を開始し、設定値範囲外であるときに
は、マイクロプロセッサの処理速度が異常であると判断
している。
When it is within the set value range, it is judged that the processing speed of the microprocessor is normal, the counting by the second counting means is reset, and the counting by the second counting means is started again, and the setting is made. When the value is out of the value range, it is determined that the processing speed of the microprocessor is abnormal.

【0091】また、この発明によれば、マイクロプロセ
ッサ用のプログラムを所望の動作順位の処理単位毎に分
割し、かつ1個の処理開始フラグを設け、各処理単位毎
のプログラムを実行する際にその先頭部で前記処理開始
フラグをセットし、その終了部で前記処理開始フラグが
セットされたままになっているかどうかを確認するよう
にしている。
Further, according to the present invention, the program for the microprocessor is divided for each processing unit having a desired operation order, and one processing start flag is provided to execute the program for each processing unit. The processing start flag is set at the head portion, and it is confirmed at the end portion whether the processing start flag remains set.

【0092】そして、セットされたままになっていた場
合には、当該処理単位のプログラムが正常に実行された
と判断して処理開始フラグをリセットし、一方、その終
了部における確認時にリセットされていた場合には、当
該処理単位のプログラムが正常に実行されなかったと判
断するようにしている。
If it remains set, it is determined that the program of the processing unit is normally executed, and the processing start flag is reset. On the other hand, the processing start flag is reset at the time of confirmation at the end portion. In this case, it is determined that the program of the processing unit is not normally executed.

【0093】また、この発明によれば、マイクロプロセ
ッサ用のプログラムを所望の動作順位の処理単位毎に分
割し、この分割した処理単位毎に個別の処理開始フラグ
を設け、各処理単位毎のプログラムを実行する際にその
先頭部で前記処理開始フラグをセットし、その終了部で
前記処理開始フラグがセットされたままになっているか
どうかを確認し、さらに、前記所望の動作順位で実行さ
れる前記各処理単位毎のプログラム間の少なくとも1箇
所で、前記個別の処理開始フラグが全てセットされてい
るかどうかを確認するようにしている。
Further, according to the present invention, the program for the microprocessor is divided for each processing unit having a desired operation order, an individual processing start flag is provided for each divided processing unit, and the program for each processing unit is provided. When the process is executed, the process start flag is set at the head part thereof, and at the end part thereof, it is confirmed whether or not the process start flag remains set, and further, the process is executed in the desired operation order. At least one location between the programs for each processing unit is checked to see if all the individual processing start flags are set.

【0094】そして、前記処理単位毎のプログラムの終
了部で動作開始フラグがセットされていることが確認さ
れ、かつ各処理単位毎のプログラム間の少なくとも1箇
所で個別の処理開始フラグが全てセットされていること
が確認された場合には、前記処理単位のプログラムが全
て正常に実行されたと判断して全ての処理開始フラグを
リセットし、一方、前記処理単位毎のプログラムの終了
部で動作開始フラグがセットされていることが確認され
ず、または、各処理単位毎のプログラム間の少なくとも
1箇所で個別の処理開始フラグが全てセットされている
ことが確認されなかった場合には、前記処理単位のプロ
グラムが正常に実行されなかったと判断するようにして
いる。
Then, it is confirmed that the operation start flag is set at the end of the program for each processing unit, and all individual processing start flags are set at at least one place between the programs for each processing unit. If it is confirmed that all the programs of the processing unit have been executed normally, all the processing start flags are reset, while the operation start flag is set at the end of the program of each processing unit. Is not set, or if it is not confirmed that all individual processing start flags are set at at least one place between programs for each processing unit, I try to determine that the program did not run properly.

【0095】また、この発明は、割り込み処理用のプロ
グラムを実行するとき、その先頭部で当該割り込み処理
の処理開始フラグをセットし、その終了部で、割り込み
処理開始フラグがセットされているかどうかを確認して
いる。
Further, according to the present invention, when the program for interrupt processing is executed, the processing start flag of the interrupt processing is set at the head portion thereof, and whether the interrupt processing start flag is set at the end portion thereof or not is determined. I'm confirming.

【0096】さらにこの発明によれば、第1の計数手段
により、基準クロックを所定数計数して、規定周期毎に
マイクロプロセッサに割り込み信号を供給し、第2の計
数手段により、前記規定周期の間、比較計数用クロック
を計数する。そして、この比較計数用クロックの規定周
期間の計数値が、予め定めた設定値範囲内にあるかどう
かを比較判別手段により判別するとともに、マイクロプ
ロセッサ用のプログラムを所望の動作順位の処理単位毎
に分割し、かつ1個の処理開始フラグを設け、各処理単
位毎のプログラムを実行する際にその先頭部で前記処理
開始フラグをセットし、その終了部で前記処理開始フラ
グがセットされたままになっているかどうかを確認する
ようにしている。
Further, according to the present invention, the first counting means counts a predetermined number of reference clocks and supplies an interrupt signal to the microprocessor at every specified cycle, and the second counting means makes the specified cycle of the specified cycle. In the meantime, the comparison counting clock is counted. Then, whether or not the count value of the comparison counting clock during the specified period is within a predetermined set value range is determined by the comparison determining means, and the program for the microprocessor is processed for each processing unit having a desired operation order. And one processing start flag is provided, and when the program for each processing unit is executed, the processing start flag is set at the head portion and the processing start flag remains set at the end portion. I try to check if it is.

【0097】[0097]

【実施例】以下、この発明の一実施例について図面を参
照して説明する。なお、以下に参照する図面において、
上記図8〜図13に示したものと対応するものには同一
の符号を付け、その詳細な説明は、重複を避けるため、
適宜省略する。また、この発明が適用されるエアバッグ
システムは、図8に示した構成と同様であるので、必要
に応じて、図8および図9をも参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. In the drawings referred to below,
Components corresponding to those shown in FIGS. 8 to 13 are designated by the same reference numerals, and detailed description thereof will be omitted to avoid duplication.
Omitted as appropriate. Since the airbag system to which the present invention is applied has the same configuration as that shown in FIG. 8, it will be described with reference to FIGS. 8 and 9 as necessary.

【0098】図1は、制御装置としてのマイクロコンピ
ュータ17の詳しい構成を示している。
FIG. 1 shows the detailed structure of the microcomputer 17 as a control device.

【0099】マイクロコンピュータ17は、中央処理装
置(CPU)の機能を有するマイクロプロセッサ21を
有している。このマイクロプロセッサ21は、予めRO
M22に書き込まれた動作用プログラムに基づいて、入
出力動作に係る種々の演算処理を実行する。RAM23
には、プログラムまたは制御上必要となるデータが一時
的に格納される。水晶発振子等を有する発振器(水晶発
振器)から構成される、たとえば、周波数20MHz
(50ns)の基準クロック発生器24から出力される
基準クロックRCKがマイクロプロセッサ21とインタ
ーバルタイマ25に供給される。
The microcomputer 17 has a microprocessor 21 having the function of a central processing unit (CPU). This microprocessor 21 has a RO
Based on the operation program written in M22, various arithmetic processes related to input / output operations are executed. RAM23
In the area, a program or data necessary for control is temporarily stored. An oscillator (crystal oscillator) having a crystal oscillator or the like, for example, a frequency of 20 MHz
The reference clock RCK output from the reference clock generator 24 of (50 ns) is supplied to the microprocessor 21 and the interval timer 25.

【0100】インターバルタイマ25は、基準クロック
RCKを計数して規定時間間隔でマイクロプロセッサ2
1に対して割り込み要求信号30を供給する。
The interval timer 25 counts the reference clock RCK and sets the microprocessor 2 at a specified time interval.
The interrupt request signal 30 is supplied to 1.

【0101】この場合、インターバルタイマ25は、基
準クロックRCKを計数し、この計数値を保持するカウ
ントレジスタ26と、マイクロプロセッサ21から送出
されるカウントレジスタ設定値(規定周期)27を保持
するカウント設定レジスタ28と、カウントレジスタ2
6の計数値と保持されたカウントレジスタ設定値27と
を比較する比較回路29とから構成されている。
In this case, the interval timer 25 counts the reference clock RCK and holds the count value of the count register 26 and the count register set value (regular period) 27 sent from the microprocessor 21. Register 28 and count register 2
It is composed of a comparison circuit 29 for comparing the count value of 6 and the held count register set value 27.

【0102】比較回路29は、その計数値とカウントレ
ジスタ設定値27とが一致した場合に、マイクロプロセ
ッサ21に割り込み要求信号30を出力するとともに、
カウントレジスタ26の計数値をリセットするカウント
レジスタクリア信号31をカウントレジスタ26に出力
する。
The comparison circuit 29 outputs an interrupt request signal 30 to the microprocessor 21 when the count value and the count register set value 27 match, and
A count register clear signal 31 for resetting the count value of the count register 26 is output to the count register 26.

【0103】比較計数用クロック発生器40は、マイク
ロプロセッサ21の処理速度をモニタする、言い換えれ
ば、監視するための基準クロックである、例えば、周波
数1MHz(1μs)の比較計数用クロックCCKを発
生する。
The comparative counting clock generator 40 monitors the processing speed of the microprocessor 21, in other words, generates a comparative counting clock CCK having a frequency of 1 MHz (1 μs), which is a reference clock for monitoring. .

【0104】イベントカウンタ41は、カウントレジス
タ42を有し、このカウントレジスタ42は、比較計数
用クロックCCKを計数して、その計数値を保持する。
この計数値は、マイクロプロセッサ21によりカウント
レジスタ読み込み値43として読み取られ、かつマイク
ロプロセッサ21から出力されるカウントレジスタクリ
ア信号44によりリセットされる。
The event counter 41 has a count register 42, and this count register 42 counts the comparison counting clock CCK and holds the count value.
This count value is read by the microprocessor 21 as the count register read value 43, and is reset by the count register clear signal 44 output from the microprocessor 21.

【0105】次に上記図1例の動作についてフローチャ
ートを参照して説明する。
Next, the operation of the example of FIG. 1 will be described with reference to the flowchart.

【0106】図2は、マイクロコンピュータ17の電源
投入時以降の概略の動作説明に供されるフローチャート
である。
FIG. 2 is a flow chart provided for explaining the general operation after the microcomputer 17 is powered on.

【0107】図3は、図2中の処理単位1〜処理単位N
に係る処理順序の診断の説明に供されるフローチャート
である。
FIG. 3 shows processing unit 1 to processing unit N in FIG.
7 is a flowchart provided for explanation of diagnosis of a processing order according to the above.

【0108】図4は、マイクロコンピュータ17の割り
込み処理(処理順序診断中と処理速度診断中における割
り込み処理)の説明に供されるフローチャートである。
FIG. 4 is a flow chart provided for explaining the interrupt processing (interrupt processing during processing sequence diagnosis and processing speed diagnosis) of the microcomputer 17.

【0109】なお、この実施例では、処理内容を特に限
定しないで、一般的な制御手順について説明する。
In this embodiment, a general control procedure will be described without particularly limiting the processing content.

【0110】まず、図2を参照して説明する。First, description will be made with reference to FIG.

【0111】電源投入直後に、マイクロコンピュータ1
7は、内部回路で所望の動作が行えるような初期化を行
う(ステップS4(1))。ここでは、マイクロプロセ
ッサ21によりROM22からカウントレジスタ設定値
27が読み出され、これが、カウント設定レジスタ28
に書き込まれる。なお、この時、図4に示す後述する割
り込み処理が一定時間間隔で起動される。
Immediately after the power is turned on, the microcomputer 1
In step S4 (1), the internal circuit performs initialization so that desired operation can be performed. Here, the count register set value 27 is read from the ROM 22 by the microprocessor 21, and this is set as the count set register 28.
Is written to. At this time, the interrupt process described later and shown in FIG. 4 is activated at regular time intervals.

【0112】次に、マイクロコンピュータ17は、自身
が組み込まれているシステム、例えば、エアバッグシス
テムが所望の動作が可能なようにシステムの初期化を行
う(ステップS4(2))。
Next, the microcomputer 17 initializes the system in which it is incorporated, for example, an airbag system, so that the system can perform a desired operation (step S4 (2)).

【0113】その後、処理単位1(ステップS4
(3))、処理単位2(ステップS4(4))、……処
理単位N(ステップS4(M))を実行する。そして、
例えば、電源が遮断される等の状態の変化が発生するま
で、ステップS4(3)〜ステップS4(M)を繰り返
し実行する。
Thereafter, the processing unit 1 (step S4
(3)), processing unit 2 (step S4 (4)), ... Processing unit N (step S4 (M)) is executed. And
For example, step S4 (3) to step S4 (M) are repeatedly executed until a change in state occurs such as the power being cut off.

【0114】次に、図3を用いて、各処理単位n(n=
1、2、…N)の処理が正常に実行されたかどうかを診
断(監視)する仕方について説明する。
Next, with reference to FIG. 3, each processing unit n (n =
A method of diagnosing (monitoring) whether or not the processes 1, 2, ... N) are normally executed will be described.

【0115】まず、処理単位nの処理先頭部分で、当該
処理の開始を示す処理開始フラグ(処理n開始フラグと
もいう。)をセットする(ステップS5(1))。
First, a process start flag (also called a process n start flag) indicating the start of the process is set at the process head portion of the process unit n (step S5 (1)).

【0116】次に、その処理単位nの本来の目的とする
処理である通常の処理ルーチンを実行する(ステップS
5(2))。
Next, a normal processing routine which is the original intended processing of the processing unit n is executed (step S
5 (2)).

【0117】処理単位nの処理の実行後に、前記処理開
始フラグがセットされているかどうかを判定する(ステ
ップS5(3))。正常な場合、処理単位nの処理はそ
の先頭から実行される筈であるから、この時点におい
て、前記処理開始フラグがセットされていなかった場合
には、当該処理単位n、言い換えれば、処理ルーチンn
は、その先頭から実行されずにマイクロプロセッサ21
の暴走等により途中から実行されたものと判断してステ
ップS5(4)に移行する。
After the processing of the processing unit n is executed, it is judged whether or not the processing start flag is set (step S5 (3)). If it is normal, the processing of the processing unit n should be executed from the beginning thereof. Therefore, if the processing start flag is not set at this point, the processing unit n, in other words, the processing routine n.
Is not executed from the beginning of the
It is determined that the process has been executed halfway due to the runaway of the process No., and the process proceeds to step S5 (4).

【0118】ステップS5(4)では、処理順序が異常
と判定された場合の処理、例えば、警報ランプの点灯等
の処理順序の異常処理を実行し、マイクロプロセッサ1
7は、自ら制御プログラムの動作を停止する((ステッ
プS5(5))。
In step S5 (4), the processing in the case where the processing order is determined to be abnormal, for example, abnormal processing in the processing order such as lighting of an alarm lamp is executed, and the microprocessor 1
7 itself stops the operation of the control program ((step S5 (5)).

【0119】ステップS5(3)の判定の結果、処理開
始フラグがセットされている正常な場合には、その処理
開始フラグをリセットして処理単位nの処理を終了し、
次の処理単位n+1の自己診断に備える(ステップS5
(6))。
If the result of determination in step S5 (3) is that the processing start flag has been set normally, that processing start flag is reset and processing of processing unit n is terminated,
Prepare for the self-diagnosis of the next processing unit n + 1 (step S5)
(6)).

【0120】次に、図4を用いて、マイクロコンピュー
タ17における割り込み処理について説明する。
Next, the interrupt processing in the microcomputer 17 will be described with reference to FIG.

【0121】マイクロプロセッサ21が、インターバル
タイマ25を構成する比較回路29から割り込み要求信
号30を受け付けたとき、図2に示したバックグラウン
ド処理(メインフロー処理)中、ステップS4(3)〜
ステップS4(M)の任意の処理位置からこの割り込み
処理ルーチンへジャンプする(ステップS6(1))。
When the microprocessor 21 receives the interrupt request signal 30 from the comparison circuit 29 constituting the interval timer 25, during the background processing (main flow processing) shown in FIG.
The process jumps from this arbitrary processing position in step S4 (M) to this interrupt processing routine (step S6 (1)).

【0122】そして、この割り込み処理ルーチンの処理
先頭部分で、当該処理の開始を示す割り込み処理開始フ
ラグをセットする(ステップS6(2))。
Then, at the processing head portion of this interrupt processing routine, an interrupt processing start flag indicating the start of the processing is set (step S6 (2)).

【0123】次に、この割り込み処理が、制御システム
の初期化処理(図2中、ステップS4(2))後の1回
目の処理であるかどうかを判断する(ステップS6
(3))。この判断を行う目的は、後に説明する処理速
度診断ステップ(ステップS6(4)とステップS6
(5))において、割り込み処理の1回目については、
イベントカウンタ41のカウントレジスタ読み込み値
(以下、カウントレジスタ計数値という。)43が、こ
の1回目に限って、カウントレジスタクリア信号44
(パルス信号)が出ないため、割り込み処理ルーチンの
タイミングと同期しないからである。したがって、割り
込み処理の1回目はステップS6(8)にジャンプし、
割り込み処理の2回目以降は、ステップS6(4)以降
の処理を行う。
Next, it is determined whether or not this interrupt process is the first process after the control system initialization process (step S4 (2) in FIG. 2) (step S6).
(3)). The purpose of making this determination is to perform a processing speed diagnosis step (step S6 (4) and step S6) described later.
In (5)), for the first interrupt processing,
The count register read value (hereinafter referred to as the count register count value) 43 of the event counter 41 is limited to the count register clear signal 44 only for the first time.
This is because the (pulse signal) is not output and is not synchronized with the timing of the interrupt processing routine. Therefore, the first interrupt processing jumps to step S6 (8),
After the second interrupt processing, the processing from step S6 (4) is performed.

【0124】ステップS6(4)では、イベントカウン
タ41のカウントレジスタ計数値43を読み取る。
In step S6 (4), the count register count value 43 of the event counter 41 is read.

【0125】次に、読み取ったカウントレジスタ計数値
43が、予め定めた設定値範囲内、言い換えれば、規定
範囲内であるかどうかを判断する(ステップS6
(5))。
Next, it is judged whether or not the read count register count value 43 is within a predetermined set value range, in other words, within a specified range (step S6).
(5)).

【0126】ここで、処理速度診断ステップ(ステップ
S6(4)とステップS6(5))について具体的に説
明する。例えば、割り込み要求信号30(図5(a)参
照)の周期T0は、T0=1msに設定されている。こ
の場合、カウント設定レジスタ28に設定されるカウン
トレジスタ設定値27は、値=2×104 に設定されて
いる。したがって、カウントレジスタ26がこの値だ
け、周期50nsの基準クロックRCKを計数したとき
に、比較回路29から割り込み要求信号30としてパル
スが1個出力される。したがって、この割り込み要求信
号30の周期T0はT0=50×10-9×2×104
1msになる。
Here, the processing speed diagnosis step (steps S6 (4) and S6 (5)) will be specifically described. For example, the cycle T0 of the interrupt request signal 30 (see FIG. 5A) is set to T0 = 1 ms. In this case, the count register setting value 27 set in the count setting register 28 is set to value = 2 × 10 4 . Therefore, when the count register 26 counts the reference clock RCK having a period of 50 ns by this value, one pulse is output from the comparison circuit 29 as the interrupt request signal 30. Therefore, the cycle T0 of the interrupt request signal 30 is T0 = 50 × 10 −9 × 2 × 10 4 =
It will be 1 ms.

【0127】そこで、例えば、図5中、時点t2におけ
る割り込み要求信号30をマイクロプロセッサ21で受
け付けた場合、マイクロプロセッサ21は、カウントレ
ジスタ42が時点t1でカウントレジスタクリア信号4
4(図5(c)参照)でリセットされた後、時点t2ま
での期間T1(なお、ここでは、便宜上、この期間は1
msであって、周期T0と等しいものとする。)のイベ
ントカウンタ41の比較計数用クロックCCK(図5
(b)参照)の計数値、すなわち、カウントレジスタ計
数値43を取り込む(ステップS6(4)の処理)。比
較計数用クロックCCKの周期T2は、T2=1μs=
1×10-6であるので、期間T1の間では、処理速度が
正常である場合には、T1÷T2=1×109 個だけ比
較計数用クロックCCKを計数することになる。そこ
で、この値に余裕分、例えば、±5%の余裕分を見込ん
だ値を、上述の設定値範囲(規定範囲)とすればよい。
Therefore, for example, in FIG. 5, when the microprocessor 21 receives the interrupt request signal 30 at time t2, the microprocessor 21 causes the count register 42 to receive the count register clear signal 4 at time t1.
4 (see FIG. 5C), the period T1 until the time t2 (here, for convenience, this period is 1
ms, which is equal to the period T0. ) Event counting counter CCK (see FIG. 5).
The count value (see (b)), that is, the count register count value 43 is fetched (processing of step S6 (4)). The cycle T2 of the comparison counting clock CCK is T2 = 1 μs =
Since it is 1 × 10 −6 , during the period T1, when the processing speed is normal, the comparison counting clock CCK is counted by T1 ÷ T2 = 1 × 10 9 pieces. Therefore, a value that allows for a margin, for example, a margin of ± 5%, may be set as the above-mentioned set value range (specified range).

【0128】前記ステップS6(5)において、カウン
トレジスタ計数値43が所定の設定値範囲内でなかった
場合、すなわち、設定値範囲外であった場合には、マイ
クロプロセッサ21の処理速度を決定する基準クロック
発生器24から出力される基準クロックRCKの発生異
常、または、割り込み処理ルーチンの実行回数が異常で
あると判断して、例えば、警報ランプ3の点灯等の処理
速度異常処理を実行する(ステップS6(6))。
In step S6 (5), if the count register count value 43 is not within the predetermined set value range, that is, if it is outside the set value range, the processing speed of the microprocessor 21 is determined. When it is determined that the reference clock RCK output from the reference clock generator 24 is abnormal, or the number of times the interrupt processing routine is executed is abnormal, for example, processing speed abnormality processing such as lighting of the alarm lamp 3 is executed ( Step S6 (6)).

【0129】その後、自己の制御プログラムの動作を停
止する(ステップS6(7))。
Thereafter, the operation of its own control program is stopped (step S6 (7)).

【0130】一方、ステップS6(5)の判定におい
て、カウントレジスタ計数値43が設定値範囲内と判定
された場合、あるいは、ステップS6(3)の判定にお
いて、1回目の割り込み処理と判定された場合には、マ
イクロプロセッサ21は、イベントカウンタ41のカウ
ントレジスタ42を初期化するためカウントレジスタク
リア信号44を送出する(ステップS6(8))。
On the other hand, when it is determined in step S6 (5) that the count register count value 43 is within the set value range, or in step S6 (3), it is determined that it is the first interrupt process. In this case, the microprocessor 21 sends the count register clear signal 44 to initialize the count register 42 of the event counter 41 (step S6 (8)).

【0131】次に、割り込み処理ルーチンの本来の目的
とする通常の割り込み処理ルーチンを実行する(ステッ
プS6(9))。
Next, a normal interrupt processing routine, which is the original purpose of the interrupt processing routine, is executed (step S6 (9)).

【0132】この割り込み処理ルーチンの終了部分で、
ステップS6(2)でセットした割り込み処理開始フラ
グがセットされているかどうかを確認する(ステップS
6(10))。
At the end of this interrupt processing routine,
It is confirmed whether or not the interrupt process start flag set in step S6 (2) is set (step S6).
6 (10)).

【0133】正常な処理が行われている場合には、処理
は先頭から実行される筈であるから、本確認時点で、前
記割り込み処理開始フラグがセットされている筈であ
る。したがって、割り込み処理開始フラグがセットされ
ていない場合、すなわち、リセットされていた場合に
は、例えば、マイクロプロセッサ21の暴走等により、
割り込み処理ルーチンが途中から実行されたものと判断
してステップS6(11)の処理に移行する。
If normal processing is being performed, the processing should be executed from the beginning, so at the time of this confirmation, the interrupt processing start flag should have been set. Therefore, when the interrupt processing start flag is not set, that is, when it is reset, for example, due to a runaway of the microprocessor 21,
It is determined that the interrupt processing routine has been executed halfway, and the process proceeds to step S6 (11).

【0134】ステップS6(11)では、割り込み処理
ルーチンが異常な順序で実行されたことを表す、例え
ば、警報ランプ3の点灯等の処理順番異常処理を実行す
る。
In step S6 (11), processing order abnormality processing, for example, lighting of the alarm lamp 3, indicating that the interrupt processing routine has been executed in an abnormal order is executed.

【0135】その後、マイクロプロセッサ21は、自己
の制御プログラムの動作を停止する(ステップS6(1
2))。
After that, the microprocessor 21 stops the operation of its own control program (step S6 (1
2)).

【0136】一方、ステップS6(10)で、割り込み
処理ルーチンにおける処理順序が正常であると判断した
場合には、処理開始フラグをリセットし、次回の割り込
み処理順序の自己診断に備える(ステップS6(1
3))。
On the other hand, if it is determined in step S6 (10) that the processing order in the interrupt processing routine is normal, the processing start flag is reset to prepare for the self-diagnosis of the next interrupt processing order (step S6 ( 1
3)).

【0137】そこで、マイクロプロセッサ21は、割り
込み処理を終了し、割り込み前の処理ルーチンに戻る
(ステップS6(14))。
Then, the microprocessor 21 ends the interrupt processing and returns to the processing routine before the interrupt (step S6 (14)).

【0138】図6は、マイクロプロセッサ21用の制御
プログラムが所望の動作順位の処理単位毎に、例えば、
処理単位1〜処理単位Nに分割されており、この処理単
位1〜処理単位Nを一巡するループ内で処理単位nが所
定の順序でかつ過不足なく実行されたかどうかを自己診
断する方法の説明に供されるフローチャートを示してい
る。以下、図6および図7に基づいてマイクロコンピュ
ータ17の処理順序の自己診断方法について説明する。
FIG. 6 shows a control program for the microprocessor 21 for each processing unit having a desired operation order, for example,
Description of a method of self-diagnosing whether or not the processing unit n is divided into processing unit 1 to processing unit N, and the processing unit n is executed in a predetermined order and without excess or deficiency in a loop that goes round the processing unit 1 to processing unit N 3 shows a flow chart used for. The self-diagnosis method of the processing sequence of the microcomputer 17 will be described below with reference to FIGS. 6 and 7.

【0139】まず、マイクロコンピュータ17のメイン
フローチャートを示す図6に基づいて説明する。
First, description will be made with reference to FIG. 6 showing a main flowchart of the microcomputer 17.

【0140】電源投入直後に、マイクロコンピュータ1
7は、内部回路で所望の動作が行えるような初期化を行
う(ステップS7(1))。
Immediately after the power is turned on, the microcomputer 1
In step S7 (1), the internal circuit performs initialization so that desired operation can be performed.

【0141】次に、マイクロコンピュータ17は、自身
が組み込まれているシステム、例えば、エアバッグシス
テムが所望の動作が可能なようにシステムの初期化を行
う(ステップS7(2))。
Next, the microcomputer 17 initializes the system in which it is incorporated, for example, an airbag system, so that the system can perform a desired operation (step S7 (2)).

【0142】次いで、各処理単位の通過状態を監視する
ために、いわゆるパスカウンタを初期化する、すなわ
ち、パスカウンタをゼロ値にする(ステップS7
(3))。なお、パスカウンタは、例えば、RAM23
に設定される。
Next, in order to monitor the passing state of each processing unit, a so-called pass counter is initialized, that is, the pass counter is set to a zero value (step S7).
(3)). The pass counter is, for example, the RAM 23.
Is set to

【0143】続いて、処理単位1〜処理単位Nまで実行
する(ステップS7(3)〜(ステップS7(M))。
Subsequently, processing units 1 to N are executed (steps S7 (3) to (step S7 (M)).

【0144】次に、処理単位n=1の処理開始フラグが
セットされているかどうかを判断する(ステップS7
(6))。なお、処理単位nの各処理開始フラグは、後
に説明する図12のフローチャートに基づいてそれぞれ
セットされる。
Next, it is judged whether or not the processing start flag of the processing unit n = 1 is set (step S7).
(6)). Each processing start flag of the processing unit n is set based on the flowchart of FIG. 12 described later.

【0145】ステップS7(6)の判定において、処理
開始フラグがセットされていなかった場合には、実行さ
れていない処理単位が存在する。
When the processing start flag is not set in the determination in step S7 (6), there is a processing unit that has not been executed.

【0146】この場合には、マイクロプロセッサ21等
の暴走等によって処理順序が異常になっていると判定
し、例えば、警報ランプ3等の点灯等の処理順序の異常
処理を実行する(ステップS7(7))。
In this case, it is determined that the processing order is abnormal due to the runaway of the microprocessor 21 or the like, and the abnormal processing of the processing order such as lighting of the alarm lamp 3 or the like is executed (step S7 ( 7)).

【0147】その後、マイクロコンピュータ17は、自
ら制御プログラムの動作を停止する(ステップS7
(8))。
After that, the microcomputer 17 itself stops the operation of the control program (step S7).
(8)).

【0148】次に、ステップS7(9)では、処理単位
n=1〜Nの処理開始フラグの確認が全て終了したかど
うかを確認し、この場合、処理単位n=2の処理開始フ
ラグを確認する(再び(ステップS7(6))。同様に
して、処理単位n=3以降処理単位Nまでの各処理開始
フラグの点検確認を行う(ステップS7(6)、ステッ
プS7(9)を繰り返す。)。
Next, in step S7 (9), it is confirmed whether or not the confirmation of the processing start flags of the processing units n = 1 to N has been completed. In this case, the processing start flags of the processing unit n = 2 are confirmed. (Once again (step S7 (6)). Similarly, the inspection confirmation of each processing start flag from the processing unit n = 3 to the processing unit N is performed (step S7 (6) and step S7 (9) are repeated. ).

【0149】ステップS7(9)の処理において、すべ
ての処理開始フラグに係る処理順番診断が終了した場合
には、ステップS7(10)に進む。
In the processing of step S7 (9), when the processing order diagnosis relating to all the processing start flags is completed, the process proceeds to step S7 (10).

【0150】すなわち、処理単位1〜処理単位Nの処理
開始フラグを全てリセットし、次回の割り込み処理順序
の自己診断に備える(ステップS7(10))。そし
て、電源切断等の状態変化が発生するまで、上述のステ
ップS7(3)〜ステップS7(10)の処理を繰り返
す。
That is, all the processing start flags of the processing unit 1 to the processing unit N are reset to prepare for the next self-diagnosis of the interrupt processing sequence (step S7 (10)). Then, the above-described steps S7 (3) to S7 (10) are repeated until a state change such as power-off occurs.

【0151】次に、図6中、ステップS7(4)〜ステ
ップS7(M)までの各処理単位の内部動作について図
7のフローチャートを参照しながら説明する。
Next, the internal operation of each processing unit from step S7 (4) to step S7 (M) in FIG. 6 will be described with reference to the flowchart in FIG.

【0152】まず、処理単位nの処理先頭部分で、当該
処理単位nの開始を示す処理n開始フラグがリセットさ
れているかどうかを判断する(ステップS8(1))。
セットされていた場合には、図6のメインフローチャー
トにおいて前記処理n開始フラグが正常にリセットされ
ていないものと判断し、ステップS8(2)へ移行す
る。
First, it is determined whether or not the process n start flag indicating the start of the process unit n is reset at the process head portion of the process unit n (step S8 (1)).
If it is set, it is determined that the process n start flag is not normally reset in the main flowchart of FIG. 6, and the process proceeds to step S8 (2).

【0153】ステップS8(2)では、ステップS8
(1)における処理順序が異常であるとの判断に基づい
て、警報ランプ3の点灯等の処理順序の異常処理を実行
する。
In step S8 (2), step S8
Based on the judgment that the processing order in (1) is abnormal, abnormal processing of the processing order such as lighting of the alarm lamp 3 is executed.

【0154】その後、マイクロコンピュータ17は、自
ら制御プログラムによる処理を停止する(ステップS8
(3))。
After that, the microcomputer 17 itself stops the processing by the control program (step S8).
(3)).

【0155】一方、ステップS8(1)の判定におい
て、処理n開始フラグがリセットされていた場合には、
処理が正常に行われていると判定して、図6のメインフ
ローチャートで定義されている各処理単位nの通過状態
を監視するためのパスカウンタの値に+1を加算する
(ステップS8(4))。
On the other hand, if it is determined in step S8 (1) that the process n start flag has been reset,
It is determined that the processing is normally performed, and +1 is added to the value of the pass counter for monitoring the passing state of each processing unit n defined in the main flowchart of FIG. 6 (step S8 (4)). ).

【0156】そして、処理n開始フラグに前記パスカウ
ンタに設定された値、すなわち、値=1を代入する(ス
テップS8(5))。これにより、処理n開始フラグが
セットされる。
Then, the value set in the pass counter, that is, value = 1 is substituted into the process n start flag (step S8 (5)). As a result, the process n start flag is set.

【0157】次いで、処理単位nの本来の目的とする処
理を実行する(ステップS8(6))。
Then, the original intended processing of the processing unit n is executed (step S8 (6)).

【0158】次に、処理単位nの終了部で、前記処理n
開始フラグがセットされているかどうかを判断する(ス
テップS8(7))。通常、処理は先頭から実行されて
いる筈であるので、この時点で前記処理n開始フラグが
セットされていなかった場合には、処理単位(処理ルー
チン)nの途中から実行された(例えば、マイクロプロ
セッサ21が暴走している。)と判断し、ステップS8
(2)の処理を行い、その後、ステップS8(3)に移
行する。なお、このステップS8(7)では、処理n開
始フラグのセット状態のみを判定しているが、処理n開
始フラグと前記パスカウンタの値が等しいかどうかを判
定するようにしてもよい。
Next, at the end of the processing unit n, the processing n
It is determined whether the start flag is set (step S8 (7)). Normally, the process is supposed to be executed from the beginning, so if the process n start flag is not set at this point, the process is executed from the middle of the process unit (process routine) n (for example, micro It is determined that the processor 21 is out of control, and step S8 is performed.
The process of (2) is performed, and then the process proceeds to step S8 (3). Although only the set state of the process n start flag is determined in step S8 (7), it may be determined whether or not the process n start flag and the value of the pass counter are equal.

【0159】ステップS8(7)の判定において、処理
n開始フラグがセットされていた場合には、処理順序が
正常と判定されたことになるので、処理単位nのルーチ
ンを終了する(ステップS8(8))。
If the processing n start flag is set in the determination in step S8 (7), it means that the processing order is determined to be normal, so the routine of the processing unit n is ended (step S8 ( 8)).

【0160】以上説明したように、上述の実施例におい
ては、図9で説明したマイクロコンピュータであるモニ
タ回路18を必要とせず、これに代えて、外部のハード
ウエアとしては比較計数用クロック発生器40を新たに
準備するだけで、マイクロプロセッサ21の処理速度と
プログラムの処理順番との両方を監視することができる
という効果が達成される。言い換えれば、簡単な構成で
監視が可能となり、しかも、監視のためのデータ通信も
不要となるので、その分、マイクロコンピュータ17で
の高速処理が可能になる。その上、システム中にマイク
ロプロセッサが1個になるので、電源投入時等における
動作タイミングの確認作業もきわめて少なくてよくな
る。結局、開発工数を相当に低減することができる。
As described above, the above-described embodiment does not require the monitor circuit 18 which is the microcomputer described with reference to FIG. 9, and instead of this, the external counting hardware is a comparison counting clock generator. Only by newly preparing 40, the effect that both the processing speed of the microprocessor 21 and the processing order of the program can be monitored is achieved. In other words, monitoring can be performed with a simple configuration, and since data communication for monitoring is also unnecessary, the microcomputer 17 can perform high-speed processing correspondingly. Moreover, since there is only one microprocessor in the system, the work of confirming the operation timing when the power is turned on can be extremely reduced. After all, the development man-hours can be considerably reduced.

【0161】すなわち、上述の実施例では、マイクロコ
ンピュータ17自身で処理速度および処理順番の自己診
断が可能になっており、さらに、特に処理順番に関して
は処理単位を一巡する1ループ内で処理単位が所定の順
序で過不足なく実行されたかどうかを自己診断すること
も可能になっている。
That is, in the above-described embodiment, the microcomputer 17 itself can perform self-diagnosis of the processing speed and the processing order. Further, with respect to the processing order, in particular, the processing unit is set in one loop that goes around the processing unit. It is also possible to self-diagnose whether or not the processes have been executed in a predetermined order without excess or deficiency.

【0162】したがって、図9に示したエアバッグ制御
装置1をモニタ回路18なしで実現することができる。
Therefore, the airbag control device 1 shown in FIG. 9 can be realized without the monitor circuit 18.

【0163】なお、上述の実施例では、処理順番の診断
に関して、処理単位を特に限定していないが、この処理
単位は、一般にプログラムを構成するサブルーチン、イ
ンルーチンを処理内容に応じて分割したもの、ソフトウ
エア割り込み形式のもの、マクロ定義されたもの等にす
べて適用可能である。
In the above-mentioned embodiment, the processing unit is not particularly limited for the diagnosis of the processing order, but this processing unit is a sub-routine or an in-routine which generally constitutes a program divided according to the processing contents. , Software interrupt type, macro defined, etc. are all applicable.

【0164】また、割り込み処理ルーチンを用いた処理
速度診断に関しては、通常の制御で使用されるインター
バルタイマ25を利用しているが、一定時間間隔で生成
される割り込みルーチンであればこのような構成以外の
ものでもよく、その構成は限定されない。
Further, regarding the processing speed diagnosis using the interrupt processing routine, the interval timer 25 used in the normal control is used, but if the interrupt routine is generated at a constant time interval, such a configuration is adopted. Other than that, the configuration is not limited.

【0165】さらに、処理速度を比較するための比較計
数用クロックCCKの発生源として水晶発振器等を利用
する構成について説明しているが、抵抗器とコンデンサ
とICとを利用したアナログ回路による、いわゆるアク
ティブCR発振器でもよいことはもちろんである。な
お、この場合には、そのアクティブCR発振器の発振周
波数の精度を考慮して所定の設定値範囲の許容差を大き
くすればよい。
Further, the configuration using a crystal oscillator or the like as a generation source of the comparison / counting clock CCK for comparing the processing speeds has been described, but a so-called analog circuit using resistors, capacitors and ICs is used. Of course, an active CR oscillator may be used. In this case, the tolerance of the predetermined set value range may be increased in consideration of the accuracy of the oscillation frequency of the active CR oscillator.

【0166】さらにまた、処理順番の検出に関しては、
割り込み処理ルーチン内でセットされるフラグ等を設け
ることにより、メインフローチャート内で割り込み処理
が実行されているかどうかを判断することも可能であ
る。
Furthermore, regarding the detection of the processing order,
By providing a flag or the like set in the interrupt processing routine, it is possible to determine whether or not the interrupt processing is being executed in the main flowchart.

【0167】なお、この発明は上述の実施例に限らず、
この発明の要旨を逸脱することなく種々の構成を採り得
ることはもちろんである。
The present invention is not limited to the above embodiment,
It goes without saying that various configurations can be adopted without departing from the gist of the present invention.

【0168】[0168]

【発明の効果】この発明によれば、第1の計数手段によ
り、基準クロックを所定数計数して、規定周期毎にマイ
クロプロセッサに割り込み信号を供給し、第2の計数手
段により、前記規定周期の間、比較計数用クロックを計
数する。そして、この比較計数用クロックの規定周期間
の計数値が、予め定めた設定値範囲内にあるかどうかを
比較判別手段により判別するようにしている。このた
め、他のモニタ回路等を使用することなく、マイクロプ
ロセッサ自身により、自己の処理速度を監視することが
できる。すなわち、設定値範囲内であるときには、マイ
クロプロセッサの処理速度が正常であると判断して第2
の計数手段による計数をリセットし再び第2の計数手段
による計数を開始して処理を続行することが可能とな
り、設定値範囲外であるときには、マイクロプロセッサ
の処理速度が異常であると判断することが可能となると
いう効果が達成される。
According to the present invention, the first counting means counts a predetermined number of reference clocks, supplies an interrupt signal to the microprocessor at every specified cycle, and the second counting means makes the specified cycle. During this period, the comparison counting clock is counted. Then, the comparison / determination means determines whether or not the count value of the comparison / counting clock for the specified period is within a predetermined set value range. Therefore, the microprocessor itself can monitor its own processing speed without using another monitor circuit or the like. That is, when it is within the set value range, it is determined that the processing speed of the microprocessor is normal, and the second
It becomes possible to reset the counting by the counting means of 1, reset the counting by the second counting means and continue the processing, and when it is out of the set value range, it is judged that the processing speed of the microprocessor is abnormal. The effect that is possible is achieved.

【0169】また、この発明によれば、マイクロプロセ
ッサ用のプログラムを所望の動作順位の処理単位毎に分
割し、かつ1個の処理開始フラグを設け、各処理単位毎
のプログラムを実行する際にその先頭部で前記処理開始
フラグをセットし、その終了部で前記処理開始フラグが
セットされたままになっているかどうかを確認するよう
にしている。このため、他のモニタ回路等を使用するこ
となく、処理開始フラグの状態を監視することで、マイ
クロプロセッサ自身で、処理単位毎のプログラムが所望
の動作順序で正常に動作しているかどうかを監視するこ
とができる。すなわち、セットされたままになっていた
場合には、当該処理単位のプログラムが正常に実行され
たと判断して処理開始フラグをリセットして処理を続行
することが可能であり、一方、その終了部における確認
時にリセットされていた場合には、当該処理単位のプロ
グラムが正常に実行されなかったと判断できるという効
果が達成される。
Further, according to the present invention, the program for the microprocessor is divided for each processing unit having a desired operation order, and one processing start flag is provided to execute the program for each processing unit. The processing start flag is set at the head portion, and it is confirmed at the end portion whether the processing start flag remains set. Therefore, by monitoring the state of the processing start flag without using another monitor circuit or the like, the microprocessor itself monitors whether or not the program for each processing unit is operating normally in the desired operation sequence. can do. That is, if it remains set, it is possible to judge that the program of the processing unit has been normally executed and reset the processing start flag to continue the processing, while If it is reset at the time of confirmation in step 1, the effect that it can be determined that the program of the processing unit is not normally executed is achieved.

【0170】さらに、処理開始フラグを処理単位毎に個
別に設け、各処理単位毎のプログラムを実行する際にそ
の先頭部で前記処理開始フラグをセットし、その終了部
で前記処理開始フラグがセットされたままになっている
かどうかを確認し、かつ、処理単位毎のプログラム間の
少なくとも1箇所で、前記個別の処理開始フラグが全て
セットされているかどうかを確認するようにすれば、マ
イクロプロセッサ自身で、処理単位毎のプログラムが所
望の動作順序で正常に動作しているかどうかを、一層確
実に、監視することができる。すなわち、前記処理単位
毎のプログラムの終了部で動作開始フラグがセットされ
ていることが確認され、かつ各処理単位毎のプログラム
間の少なくとも1箇所で個別の処理開始フラグが全てセ
ットされていることが確認された場合には、前記処理単
位のプログラムが全て正常に実行されたと判断して全て
の処理開始フラグをリセットして処理を続行し、一方、
前記処理単位毎のプログラムの終了部で動作開始フラグ
がセットされていることが確認されず、または、各処理
単位毎のプログラム間の少なくとも1箇所で個別の処理
開始フラグが全てセットされていることが確認されなか
った場合には、前記処理単位のプログラムが正常に実行
されなかったと判断することができるという効果が達成
される。
Further, a processing start flag is provided for each processing unit, and when the program for each processing unit is executed, the processing start flag is set at the head portion thereof and the processing start flag is set at the end portion thereof. If it is confirmed whether all the individual processing start flags are set at at least one place between the programs for each processing unit, the microprocessor itself can be confirmed. Thus, it is possible to more reliably monitor whether or not the program for each processing unit is operating normally in a desired operation sequence. That is, it is confirmed that the operation start flag is set at the end of the program for each processing unit, and all individual process start flags are set at at least one place between the programs for each processing unit. If it is confirmed, it is determined that all the programs of the processing unit have been normally executed, all processing start flags are reset and the processing is continued, while
It is not confirmed that the operation start flag is set at the end of the program for each processing unit, or all individual processing start flags are set at at least one place between the programs for each processing unit. If is not confirmed, it is possible to determine that the program of the processing unit is not normally executed.

【0171】また、この発明は、割り込み処理用のプロ
グラムを実行するとき、その先頭部で当該割り込み処理
の処理開始フラグをセットし、その終了部で、割り込み
処理開始フラグがセットされているかどうかを確認して
いるので、割り込み処理についても、正常に実行されて
いるかどうかをマイクロプロセッサ自身で確認すること
ができるという効果が達成される。
Further, according to the present invention, when a program for interrupt processing is executed, the processing start flag of the interrupt processing is set at the head portion thereof, and whether the interrupt processing start flag is set at the end portion thereof or not is determined. Since the confirmation is performed, the effect that the microprocessor itself can confirm whether or not the interrupt processing is normally executed is achieved.

【0172】さらにこの発明によれば、第1の計数手段
により、基準クロックを所定数計数して、規定周期毎に
マイクロプロセッサに割り込み信号を供給し、第2の計
数手段により、前記規定周期の間、比較計数用クロック
を計数する。そして、この比較計数用クロックの規定周
期間の計数値が、予め定めた設定値範囲内にあるかどう
かを比較判別手段により判別するとともに、マイクロプ
ロセッサ用のプログラムを所望の動作順位の処理単位毎
に分割し、かつ1個の処理開始フラグを設け、各処理単
位毎のプログラムを実行する際にその先頭部で前記処理
開始フラグをセットし、その終了部で前記処理開始フラ
グがセットされたままになっているかどうかを確認する
ようにしている。このため、従来、他のモニタ回路によ
り行っていた、マイクロプロセッサの処理速度の管理と
処理単位のプログラムの実行順番管理とを、マイクロプ
ロセッサ自身で行うことが可能となるという効果が達成
される。この結果、別のモニタ回路が不要となり、コス
トを低減することができる。 また、マイクロプロセッ
サの処理速度や処理順番を監視するのに、別のモニタ回
路を必要とせず、比較計数用クロックの発生手段が余分
に必要となるだけであるので、データ通信を行う必要も
なくなり、より高速の処理が可能となる。したがって、
この発明をエアバッグシステムに適用することにより、
より一層、高信頼性を得ることができるという効果が達
成される。
Further, according to the present invention, the first counting means counts a predetermined number of reference clocks and supplies an interrupt signal to the microprocessor at every specified cycle, and the second counting means makes the specified cycle of the specified cycle. In the meantime, the comparison counting clock is counted. Then, whether or not the count value of the comparison counting clock during the specified period is within a predetermined set value range is determined by the comparison determining means, and the program for the microprocessor is processed for each processing unit having a desired operation order. And one processing start flag is provided, and when the program for each processing unit is executed, the processing start flag is set at the head portion and the processing start flag remains set at the end portion. I try to check if it is. Therefore, it is possible to achieve the effect that the microprocessor itself can perform the management of the processing speed of the microprocessor and the execution order management of the program of the processing unit, which has been conventionally performed by another monitor circuit. As a result, another monitor circuit becomes unnecessary, and the cost can be reduced. Further, in order to monitor the processing speed and processing order of the microprocessor, a separate monitor circuit is not required, and an additional means for generating a comparison / counting clock is only required, so there is no need for data communication. , Faster processing is possible. Therefore,
By applying this invention to an airbag system,
The effect that higher reliability can be obtained is achieved.

【0173】さらに、マイクロプロセッサを2個必要と
せず、1個ですむ簡単な構成になるため、例えば、電源
投入時、あるいは、電源瞬断時に、それぞれの動作手順
・動作タイミングを同期させることを保証するために、
ソフトウエア開発時の対策期間と実車による検証期間が
相当長期間に渡り、開発に多大な工数がかかるという問
題が一掃される。いわゆるデバッグのための開発工数を
相当程度削減できる。
Furthermore, since it is a simple structure that does not require two microprocessors and only one, it is possible to synchronize the respective operating procedures and timings when the power is turned on or when the power is momentarily cut off. To guarantee
It eliminates the problem that it takes a lot of man-hours for development because the period of measures during software development and the period of verification by an actual vehicle are considerably long. The development man-hours for so-called debugging can be considerably reduced.

【0174】さらにまた、処理速度の検出精度は、割り
込み信号を出力する規定周期と比較計数用クロックのク
ロック周波数に依存するので、これらを変更することに
より、検出精度を任意に変更することができるという利
点もある。
Furthermore, since the detection accuracy of the processing speed depends on the specified cycle for outputting the interrupt signal and the clock frequency of the comparison counting clock, the detection accuracy can be arbitrarily changed by changing these. There is also an advantage.

【0175】その上、処理順番の検出精度を決定する処
理開始フラグの数、また処理開始フラグのセット・リセ
ット時を、マイクロプロセッサの性能、ROM・RAM
等のメモリの容量、処理用プログラムの容量等に応じて
適宜選択することができるという効果も達成される。
In addition, the number of processing start flags that determine the detection accuracy of the processing order, and when the processing start flags are set / reset are determined by the performance of the microprocessor, ROM / RAM.
It is also possible to achieve the effect that it can be appropriately selected according to the memory capacity, the processing program capacity, and the like.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の一実施例の構成を示すブロック図で
ある。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】図1例の動作説明に供されるバックグランド処
理のフローチャートである。
FIG. 2 is a flowchart of background processing provided for explaining the operation of the example of FIG.

【図3】図2例のフローチャートのうち、各処理単位の
詳しい内容を示すフローチャートである。
FIG. 3 is a flowchart showing detailed contents of each processing unit in the flowchart of FIG. 2 example.

【図4】図2例のフローチャートに対する割り込み処理
用のフローチャートである。
FIG. 4 is a flowchart for interrupt processing with respect to the flowchart of FIG.

【図5】マイクロプロセッサの処理速度の監視動作の説
明に供されるタイミングチャートであり、(a)は割り
込み要求信号、(b)は比較計数用クロック、(c)は
カウントレジスタクリア信号の波形をそれぞれ示してい
る。
5A and 5B are timing charts provided for explaining a processing speed monitoring operation of a microprocessor, in which FIG. 5A is an interrupt request signal, FIG. 5B is a comparison counting clock, and FIG. 5C is a count register clear signal waveform. Are shown respectively.

【図6】図2例のフローチャートに対して、さらに一巡
処理中の処理順位監視処理を付加したフローチャートで
ある。
FIG. 6 is a flowchart in which a processing order monitoring process during a round is added to the flowchart of the example of FIG. 2;

【図7】図6例のフローチャート中の、各処理単位の詳
しい内容を示すフローチャートである。
FIG. 7 is a flowchart showing detailed contents of each processing unit in the flowchart of the example of FIG.

【図8】一般的なエアバッグ制御システムが組み込まれ
た車両の概略構成を示す線図である。
FIG. 8 is a diagram showing a schematic configuration of a vehicle in which a general airbag control system is incorporated.

【図9】図8中のエアバッグ制御装置の電気回路的構成
を示すブロック図である。
9 is a block diagram showing an electric circuit configuration of the airbag control device in FIG. 8. FIG.

【図10】図9中のマイクロコンピュータの詳細な構成
を示すブロック図である。
10 is a block diagram showing a detailed configuration of the microcomputer shown in FIG.

【図11】図9例、図10例の全体動作の説明に供され
るフローチャートである。
FIG. 11 is a flowchart provided for explaining the overall operation of the examples of FIGS. 9 and 10.

【図12】図11のフローチャートに対する割り込み処
理用のフローチャートである。
12 is a flowchart for interrupt processing with respect to the flowchart of FIG.

【図13】図9例中のモニタ回路によりマイクロコンピ
ュータの処理を監視するための動作の説明に供されるフ
ローチャートである。
FIG. 13 is a flowchart provided for explaining an operation for monitoring the processing of the microcomputer by the monitor circuit in the example of FIG.

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

1…エアバッグ制御装置 17…マイクロ
コンピュータ 21…マイクロプロセッサ 22…ROM 23…RAM 24…基準クロ
ック発生器 25…インターバルタイマ 26…カウント
レジスタ 27…カウント設定レジスタ書き込み値(カウントレジ
スタ設定値) 28…カウント設定レジスタ 29…比較回路 30…割り込み要求信号 31…カウント
レジスタクリア信号 40…比較計数用クロック発生器 41…イベント
カウンタ 42…カウントレジスタ 43…カウントレジスタ読み込み値(カウントレジスタ
計数値) 44…カウントレジスタクリア信号 CCK…比較計
数用クロック RCK…基準クロック
1 ... Airbag control device 17 ... Microcomputer 21 ... Microprocessor 22 ... ROM 23 ... RAM 24 ... Reference clock generator 25 ... Interval timer 26 ... Count register 27 ... Count setting register write value (count register setting value) 28 ... Count Setting register 29 ... Comparison circuit 30 ... Interrupt request signal 31 ... Count register clear signal 40 ... Comparison counting clock generator 41 ... Event counter 42 ... Count register 43 ... Count register read value (count register count value) 44 ... Count register clear Signal CCK ... Comparative counting clock RCK ... Reference clock

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】マイクロプロセッサに基準クロックを供給
する基準クロック発生手段と、 前記基準クロックを計数し、計数値が設定値に達する毎
に計数終了信号を出力し、この計数終了信号を前記マイ
クロプロセッサに対する規定周期を有する割り込み信号
として出力する第1の計数手段と、 前記割り込み信号の規定周期よりも短い周期の比較計数
用クロックを発生する比較計数用クロック発生手段と、 前記割り込み信号の規定周期の間、前記比較計数用クロ
ックを計数し、計数値を出力する第2の計数手段と、 この第2の計数手段の計数値が、予め定めた設定値範囲
内にあるかどうかを比較判別する比較判別手段と、 を備えることを特徴とする制御装置の異常検出装置。
1. A reference clock generating means for supplying a reference clock to a microprocessor, counting the reference clock, outputting a count end signal each time the count value reaches a set value, and outputting the count end signal to the microprocessor. A first counting means for outputting as an interrupt signal having a prescribed cycle for the above, a comparative counting clock generating means for generating a comparative counting clock for a shorter period than the prescribed cycle of the interrupt signal, During the period, the second counting means that counts the comparison counting clock and outputs the count value, and the comparison that determines whether or not the count value of the second counting means is within a predetermined set value range An abnormality detection device for a control device, comprising: a determination means.
【請求項2】前記比較判別手段の比較判別結果により、
前記第2の計数手段の計数値が前記予め定めた設定値範
囲内であるときには、前記マイクロプロセッサの処理速
度が正常であると判断して、前記第2の計数手段による
計数をリセットするとともに、前記第2の計数手段の計
数値が前記予め定めた設定値範囲外であるときには、前
記マイクロプロセッサの処理速度が異常であると判断す
ることを特徴とする請求項1記載の制御装置の異常検出
装置。
2. According to the comparison and determination result of the comparison and determination means,
When the count value of the second counting means is within the predetermined set value range, it is determined that the processing speed of the microprocessor is normal, and the count by the second counting means is reset. 2. The abnormality detection of the control device according to claim 1, wherein when the count value of the second counting means is out of the predetermined set value range, it is determined that the processing speed of the microprocessor is abnormal. apparatus.
【請求項3】マイクロプロセッサ用のプログラムを所望
の動作順位の処理単位毎に分割し、 前記処理単位毎のプログラムを実行するときに、その先
頭部で当該処理の開始を表す処理開始フラグをセット
し、 前記処理単位毎のプログラムの終了部で、前記処理開始
フラグがセットされているかどうかを確認することを特
徴とする制御装置の異常検出方法。
3. A program for a microprocessor is divided for each processing unit having a desired operation order, and when the program for each processing unit is executed, a processing start flag indicating the start of the processing is set at the head of the program. Then, the abnormality detection method of the control device, comprising checking whether or not the processing start flag is set at the end of the program for each processing unit.
【請求項4】前記処理開始フラグがセットされているか
どうかを確認した際に、セットされていた場合には、当
該処理単位のプログラムが正常に実行されたと判断して
前記処理開始フラグをリセットし、一方、前記処理開始
フラグがリセットされていた場合には、当該処理単位の
プログラムが異常に実行されたと判断することを特徴と
する請求項3記載の制御装置の異常検出方法。
4. When confirming whether or not the processing start flag is set, if it is set, it is judged that the program of the processing unit is normally executed, and the processing start flag is reset. On the other hand, when the processing start flag is reset, it is determined that the program of the processing unit is abnormally executed, and the abnormality detection method for the control device according to claim 3.
【請求項5】マイクロプロセッサ用のプログラムを所望
の動作順位の処理単位毎に分割し、この分割した処理単
位毎に個別の処理開始フラグを設け、 前記処理単位毎のプログラムを実行するときに、その先
頭部で前記処理単位毎の処理開始フラグをセットし、 前記処理単位毎のプログラムの終了部で、前記処理開始
フラグがセットされているかどうかを確認し、 さらに、前記所望の動作順位で実行される前記各処理単
位毎のプログラム間の少なくとも1箇所で、前記各処理
単位毎に設けられている個別の処理開始フラグが全てセ
ットされているかどうかを確認することを特徴とする制
御装置の異常検出方法。
5. A program for a microprocessor is divided for each processing unit having a desired operation order, an individual processing start flag is provided for each divided processing unit, and when the program for each processing unit is executed, A processing start flag for each processing unit is set at the head portion thereof, and it is confirmed whether the processing start flag is set at the end portion of the program for each processing unit, and further execution is performed in the desired operation order. Abnormality of the control device characterized by checking whether all the individual processing start flags provided for each processing unit are set in at least one place between the programs for each processing unit Detection method.
【請求項6】前記処理単位毎のプログラムの終了部で、
前記処理開始フラグがセットされているかどうかを確認
した際に、処理開始フラグがセットされており、かつ前
記所望の動作順位で実行される前記各処理単位毎のプロ
グラムの間の少なくとも1箇所で、前記各処理単位毎に
設けられている個別の処理開始フラグが全てセットされ
ているかどうかを確認した際に、前記個別の処理開始フ
ラグが全てセットされていた場合には、前記処理単位の
プログラムが全て正常に実行されたと判断して前記処理
開始フラグを全てリセットし、 一方、前記処理単位毎のプログラムの終了部で、前記処
理開始フラグがリセットされていた場合、または、前記
所望の動作順位で実行される前記各処理単位毎のプログ
ラムの間の少なくとも1箇所で、前記各処理単位毎に設
けられている個別の処理開始フラグが全てセットされて
いるかどうかを確認した際に、前記個別の処理開始フラ
グの少なくとも1個がリセットされていた場合には、前
記処理単位のプログラムが異常に実行されたと判断する
ことを特徴とする請求項5記載の制御装置の異常検出方
法。
6. At the end of the program for each processing unit,
When confirming whether or not the processing start flag is set, the processing start flag is set, and at least one place between the programs for each processing unit executed in the desired operation order, When it is confirmed whether all the individual processing start flags provided for each processing unit are set, if the individual processing start flags are all set, the program of the processing unit is If all the processing start flags are reset when it is determined that they have been normally executed, on the other hand, when the processing start flags are reset at the end of the program for each processing unit, or in the desired operation order. At least one place between programs to be executed for each processing unit, all individual processing start flags provided for each processing unit are 7. When it is confirmed whether or not it is set, if at least one of the individual processing start flags is reset, it is determined that the program of the processing unit is abnormally executed. 5. An abnormality detection method for a control device according to 5.
【請求項7】割り込み処理用のプログラムを有し、この
割り込み処理用のプログラムを実行するときに、その先
頭部で当該割り込み処理の開始を表す割り込み処理開始
フラグをセットし、 前記割り込み処理用のプログラムの終了部で、前記割り
込み処理開始フラグがセットされているかどうかを確認
することを特徴とする請求項3〜6のいずれか1項に記
載の制御装置の異常検出方法。
7. A program for interrupt processing is provided, and when the program for interrupt processing is executed, an interrupt processing start flag indicating the start of the interrupt processing is set at the head of the program for interrupt processing, 7. The abnormality detecting method for a control device according to claim 3, wherein whether or not the interrupt processing start flag is set is confirmed at a program end portion.
【請求項8】マイクロプロセッサに基準クロックを供給
する基準クロック発生手段と、 前記基準クロックを計数し、計数値が設定値に達する毎
に計数終了信号を出力し、この計数終了信号を前記マイ
クロプロセッサに対する規定周期を有する割り込み信号
として出力する第1の計数手段と、 前記割り込み信号の規定周期よりも短い周期の比較計数
用クロックを発生する比較計数用クロック発生手段と、 前記割り込み信号の規定周期の間、前記比較計数用クロ
ックを計数し、計数値を出力する第2の計数手段と、 この第2の計数手段の計数値が、予め定めた設定値範囲
内にあるかどうかを比較判別する比較判別手段とを備え
る制御装置の異常検出方法であって、 前記マイクロプロセッサ用のプログラムを所望の動作順
位の処理単位毎に分割し、 前記処理単位毎のプログラムを実行するときに、その先
頭部で当該処理の開始を表す処理開始フラグをセット
し、 前記処理単位毎のプログラムの終了部で、前記処理開始
フラグがセットされているかどうかを確認することを特
徴とする制御装置の異常検出方法。
8. A reference clock generating means for supplying a reference clock to a microprocessor, counting the reference clock, outputting a count end signal each time the count value reaches a set value, and outputting the count end signal to the microprocessor. A first counting means for outputting as an interrupt signal having a prescribed cycle for the above, a comparative counting clock generating means for generating a comparative counting clock for a shorter period than the prescribed cycle of the interrupt signal, During the period, the second counting means that counts the comparison counting clock and outputs the count value, and the comparison that determines whether or not the count value of the second counting means is within a predetermined set value range An abnormality detection method for a control device, comprising: a determining means, wherein the program for the microprocessor is divided into processing units having a desired operation order. When the program for each processing unit is executed, a processing start flag indicating the start of the processing is set at the beginning thereof, and the processing start flag is set at the end of the program for each processing unit. A method for detecting abnormality in a control device, which comprises checking whether or not the abnormality has occurred.
JP24912494A 1994-10-14 1994-10-14 Abnormality detector for controller and method therefor Pending JPH08115235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24912494A JPH08115235A (en) 1994-10-14 1994-10-14 Abnormality detector for controller and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24912494A JPH08115235A (en) 1994-10-14 1994-10-14 Abnormality detector for controller and method therefor

Publications (1)

Publication Number Publication Date
JPH08115235A true JPH08115235A (en) 1996-05-07

Family

ID=17188297

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24912494A Pending JPH08115235A (en) 1994-10-14 1994-10-14 Abnormality detector for controller and method therefor

Country Status (1)

Country Link
JP (1) JPH08115235A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001175497A (en) * 1999-12-14 2001-06-29 Hyundai Motor Co Ltd Logic diagnosing method
JP2006193050A (en) * 2005-01-13 2006-07-27 Favess Co Ltd Controller and electric power steering device
JP4745227B2 (en) * 2004-05-25 2011-08-10 三菱電機株式会社 Elevator control device
JP2011159114A (en) * 2010-02-01 2011-08-18 Fuji Electric Co Ltd Module arithmetic processing apparatus
JP2014035740A (en) * 2012-08-10 2014-02-24 Denso Corp Electronic control device
JP2014035741A (en) * 2012-08-10 2014-02-24 Denso Corp Electronic control device
KR20190045458A (en) * 2017-10-24 2019-05-03 현대모비스 주식회사 Apparatus for operating air-bag of vehicle and control method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60158248U (en) * 1984-03-28 1985-10-21 富士電機株式会社 Failure detection circuit for information processing equipment
JPS63221437A (en) * 1987-03-11 1988-09-14 Alps Electric Co Ltd Detecting system for cpu runaway
JPH03288942A (en) * 1990-04-05 1991-12-19 Zexel Corp Program run-away detecting method for microcomputer
JPH0573363A (en) * 1991-09-17 1993-03-26 Honda Motor Co Ltd Watchdog timer device
JPH05108415A (en) * 1991-10-11 1993-04-30 Sanyo Electric Co Ltd Abnormality processor for micro computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60158248U (en) * 1984-03-28 1985-10-21 富士電機株式会社 Failure detection circuit for information processing equipment
JPS63221437A (en) * 1987-03-11 1988-09-14 Alps Electric Co Ltd Detecting system for cpu runaway
JPH03288942A (en) * 1990-04-05 1991-12-19 Zexel Corp Program run-away detecting method for microcomputer
JPH0573363A (en) * 1991-09-17 1993-03-26 Honda Motor Co Ltd Watchdog timer device
JPH05108415A (en) * 1991-10-11 1993-04-30 Sanyo Electric Co Ltd Abnormality processor for micro computer

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001175497A (en) * 1999-12-14 2001-06-29 Hyundai Motor Co Ltd Logic diagnosing method
JP4745227B2 (en) * 2004-05-25 2011-08-10 三菱電機株式会社 Elevator control device
JP2006193050A (en) * 2005-01-13 2006-07-27 Favess Co Ltd Controller and electric power steering device
JP4678482B2 (en) * 2005-01-13 2011-04-27 株式会社ジェイテクト Control device and electric power steering device provided with the same
JP2011159114A (en) * 2010-02-01 2011-08-18 Fuji Electric Co Ltd Module arithmetic processing apparatus
JP2014035740A (en) * 2012-08-10 2014-02-24 Denso Corp Electronic control device
JP2014035741A (en) * 2012-08-10 2014-02-24 Denso Corp Electronic control device
KR20190045458A (en) * 2017-10-24 2019-05-03 현대모비스 주식회사 Apparatus for operating air-bag of vehicle and control method thereof

Similar Documents

Publication Publication Date Title
JP4149806B2 (en) Equipment for monitoring the processor
US6076172A (en) Monitoting system for electronic control unit
JP2861705B2 (en) Airbag device
JPH0858524A (en) Testing method for passive safety device of car
EP2113087B1 (en) System and computer program product for testing a logic circuit
US20100174448A1 (en) Method and device for operating a control unit
JPH08115235A (en) Abnormality detector for controller and method therefor
US8854049B2 (en) Timer unit, system, computer program product and method for testing a logic circuit
EP3629176B1 (en) Fault detection circuit with progress register and status register
WO2004010299A2 (en) Self-test system
JP4812699B2 (en) Power control device
EP0486222A2 (en) Improvements in and relating to microprocessor based systems
JPH08202589A (en) Information processor and fault diagnostic method
JP2002227662A (en) Electronic control device
CN109478160B (en) Circuit for detecting systematic and random faults
JP3251038B2 (en) Measuring device
JPH05274189A (en) Monitor and protection circuit device for controller
JP3732009B2 (en) Failure detection method during communication between electronic control units
JP3897859B2 (en) Diagnostic circuit for watchdog circuit
JPH04256038A (en) Watchdog timer inspecting device
JP2002002419A (en) Electronic control unit for vehicle
JPH0531663B2 (en)
JP2005257304A (en) Diagnostic method for acceleration detection unit
JP2990008B2 (en) Processor self-diagnosis method
JPH11184762A (en) Device for diagnosing backup ram system of controller for automobile