JPH07114490A - Runaway monitoring device - Google Patents

Runaway monitoring device

Info

Publication number
JPH07114490A
JPH07114490A JP5260802A JP26080293A JPH07114490A JP H07114490 A JPH07114490 A JP H07114490A JP 5260802 A JP5260802 A JP 5260802A JP 26080293 A JP26080293 A JP 26080293A JP H07114490 A JPH07114490 A JP H07114490A
Authority
JP
Japan
Prior art keywords
task
watchdog timer
interrupt
reset
executed
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.)
Granted
Application number
JP5260802A
Other languages
Japanese (ja)
Other versions
JP2795140B2 (en
Inventor
Hiroshi Ogawa
浩 小川
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5260802A priority Critical patent/JP2795140B2/en
Publication of JPH07114490A publication Critical patent/JPH07114490A/en
Application granted granted Critical
Publication of JP2795140B2 publication Critical patent/JP2795140B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To provide a runaway monitoring device capable of surely detecting runaway without making the hardware constitution a large scale as the runaway monitoring device which monitors the runaway of a microcomputer. CONSTITUTION:When a watchdog timer 20 counts a clock signal a prescribed number of times, a CPU 10 is reset. The CPU 10 resets the watchdog timer 20 by executing interruption processing at every prescribed time. however, when a task with the lowest priority is not executed while the interruption processing is being performed the prescribed number of times, the watchdog timer 20 is not reset. In this way, the microcomputer 10 can be surely reset when abnormality occurs in the microcomputer.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロコンピュータ
の暴走時にマイクロコンピュータをリセットする暴走監
視装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a runaway monitoring device for resetting a microcomputer when it runs out of control.

【0002】[0002]

【従来の技術】図1は車載用の走行位置表示装置の概要
を示している。図1において、1は方位センサであり、
この方位センサ1は自動車の絶対走行方位を検出する地
磁気センサ及び自動車の相対走行方位を検出する光ジャ
イロが使用される。2は車輪の回転数に応じたパルスを
発生する距離センサ、3はブレーキスイッチ、パーキン
グスイッチなどのオン・オフ信号、電源電圧監視用信号
などの各種センサ信号である。4は方位センサ1,距離
センサ2などのセンサ信号を処理するセンサ信号処理
部、5はGPS(Global Positioning System)レシー
バであり、このGPSレシーバ5は複数の衛星から送信
される電波を受信し演算することにより受信点の位置
(緯度、経度)を求めることができるものである。6は
CDーROMドライブであり、このCDーROMドライ
ブ6は、地図データが記録されたCDーROM7から地
図データを読出すものである。8は車室内に設置される
表示・操作部であり、この表示・操作部8は、地図及び
自動車の現在走行位置、方位等を表示する液晶ディスプ
レイ8A、この液晶ディスプレイ8Aの前面に設けられ
たタッチパネル8Bとからなり、タッチパネル8Bには
表示地図の拡大、縮小などを指示するためのスイッチ、
径路探索を指示するスイッチ、液晶ディスプレイ8Aに
表示された地名の中から目的地を選択するスイッチなど
が具備されている。9は装置本体であり、この装置本体
9はトランクルームなどに設置される。
2. Description of the Related Art FIG. 1 shows an outline of an on-vehicle traveling position display device. In FIG. 1, 1 is a direction sensor,
The direction sensor 1 uses a geomagnetic sensor for detecting the absolute traveling direction of the automobile and an optical gyro for detecting the relative traveling direction of the automobile. Reference numeral 2 is a distance sensor that generates a pulse according to the number of rotations of the wheel, and 3 is various sensor signals such as an ON / OFF signal of a brake switch and a parking switch, and a power supply voltage monitoring signal. Reference numeral 4 is a sensor signal processing unit that processes sensor signals from the azimuth sensor 1, the distance sensor 2, and the like, and 5 is a GPS (Global Positioning System) receiver. The GPS receiver 5 receives radio waves transmitted from a plurality of satellites and performs calculation. By doing so, the position (latitude, longitude) of the receiving point can be obtained. Reference numeral 6 denotes a CD-ROM drive, and this CD-ROM drive 6 reads map data from a CD-ROM 7 in which map data is recorded. Reference numeral 8 denotes a display / operation unit installed in the vehicle interior. The display / operation unit 8 is provided on a liquid crystal display 8A for displaying a map and the current traveling position, direction, etc. of the automobile, and is provided in front of the liquid crystal display 8A. The touch panel 8B includes a switch for instructing enlargement or reduction of the display map,
A switch for instructing a route search, a switch for selecting a destination from the place names displayed on the liquid crystal display 8A, and the like are provided. Reference numeral 9 denotes an apparatus main body, and the apparatus main body 9 is installed in a trunk room or the like.

【0003】次に装置本体9の構成について説明する。
10は各種の演算を行うCPU(中央処理装置)、11
はCPU9で行う各種の演算のプログラムが記憶された
ROM(リードオンリーメモリ)、12は方位センサ
1、距離センサ2、GPSレシーバ5、CDーROMド
ライブ6等からのデータやCPU10での演算結果等を
記憶するメモリ(DRAM)、13は装置本体9への電
源供給が停止した際にも必要なデータを保持しておくた
めのバックアップ用メモリ(SRAM)、14は液晶デ
ィスプレイ8Aに表示する文字、記号などのパターンが
記憶されたメモリ(漢字、フォントROM)、15は地
図データや自車の現在位置データなどに基づいて表示画
像を形成するための画像プロセッサ、16はCPU10
から出力される地図データ、現在位置データ及び漢字、
フォントROM14から出力される町名、道路名などの
漢字、フォントを合成して液晶ディスプレイ8Aに表示
する画像を記憶するメモリ(VRAM)、17はVRA
M16の出力データを色信号に変換するためのRGB変
換回路であり、色信号はRGB変換回路17から液晶デ
ィスプレイ8Aに出力される。18は通信インターフェ
ースである。19は暴走監視部であり、この暴走監視部
19はCPU10の暴走を監視し、CPU10が暴走し
た際にCPU10をリセットするものである。
Next, the structure of the apparatus main body 9 will be described.
Reference numeral 10 denotes a CPU (central processing unit) for performing various calculations, 11
Is a ROM (read only memory) in which programs for various calculations performed by the CPU 9 are stored, 12 is data from the direction sensor 1, distance sensor 2, GPS receiver 5, CD-ROM drive 6 and the like, calculation results by the CPU 10, etc. Is a memory (DRAM) for storing data, 13 is a backup memory (SRAM) for holding necessary data even when power supply to the apparatus body 9 is stopped, and 14 is a character displayed on the liquid crystal display 8A. A memory (kanji, font ROM) in which patterns such as symbols are stored, 15 is an image processor for forming a display image based on map data, current position data of the vehicle, and 16 is a CPU 10
Map data, current position data and kanji output from
A memory (VRAM) for memorizing an image to be displayed on the liquid crystal display 8A by synthesizing Chinese characters such as a town name and a road name output from the font ROM 14 and a font, and 17 is a VRA
This is an RGB conversion circuit for converting the output data of M16 into a color signal, and the color signal is output from the RGB conversion circuit 17 to the liquid crystal display 8A. Reference numeral 18 is a communication interface. Reference numeral 19 denotes a runaway monitoring unit, which monitors the runaway of the CPU 10 and resets the CPU 10 when the CPU 10 runs out of control.

【0004】図1において、方位センサ1の出力及び距
離センサ2の出力がセンサ処理部4を介してCPU10
に送られる。CPU10では自車の現在位置の演算が行
われ、現在位置の緯度、経度が求められる。またGPS
レシーバ5からのデータに基づき現在位置の補正が行わ
れる。このようにして求められた現在位置に基づき現在
位置に対応するユニットの地図データがCDーROMド
ライブ6によってCDーROM7から読出され、この地
図データが通信インターフェース18を介してメモリ
(DRAM)12に格納される。DRAM12に格納さ
れた地図データの一部分はCPU10により読出され、
画像プロセッサ15で画像データに変換され画像メモリ
16に書き込まれる。画像メモリ16に格納された画像
データはRGB変換回路17で色信号に変換され液晶デ
ィスプレ8Aに送られ、現在位置を中心として所定範囲
の地図が表示される。またDRAM12から読出された
地図データに文字コード、記号コードが含まれている
と、これら文字コード、記号コードに対応するパターン
が漢字、フォントROM14から読出され、液晶ディス
プレイ8Aに地図とともに地名などの文字、学校などの
記号が表示されるものである。また自動車の走行に伴っ
て順次求められる走行速度、走行方位に基づき、液晶デ
ィスプレイ8Aに表示される現在位置が順次変更されて
いくものである。
In FIG. 1, the output of the azimuth sensor 1 and the output of the distance sensor 2 are sent to the CPU 10 via the sensor processing unit 4.
Sent to. The CPU 10 calculates the current position of the vehicle and obtains the latitude and longitude of the current position. Also GPS
The current position is corrected based on the data from the receiver 5. Based on the present position thus obtained, the map data of the unit corresponding to the present position is read from the CD-ROM 7 by the CD-ROM drive 6, and this map data is stored in the memory (DRAM) 12 via the communication interface 18. Is stored. A part of the map data stored in the DRAM 12 is read by the CPU 10,
It is converted into image data by the image processor 15 and written in the image memory 16. The image data stored in the image memory 16 is converted into a color signal by the RGB conversion circuit 17 and sent to the liquid crystal display 8A, and a map of a predetermined range centering on the current position is displayed. Further, if the map data read from the DRAM 12 includes character codes and symbol codes, patterns corresponding to these character codes and symbol codes are read from the kanji and font ROM 14, and the liquid crystal display 8A displays characters such as place names together with the map. , Symbols such as school are displayed. In addition, the current position displayed on the liquid crystal display 8A is sequentially changed based on the traveling speed and traveling direction that are sequentially obtained as the automobile travels.

【0005】図2は図1の暴走監視部19の回路構成を
示している。図2において、10は前記CPUであり、
このCPU10はOSにより制御されて優先度の異なる
タスクを順次起動して種々の処理を実行するものであ
る。20は前記暴走監視部19を構成するウォッチドッ
グタイマーであり、このウォッチドッグタイマー20は
複数段のフリップフロップから構成され、最終段のフリ
ップフロップの出力がCPU10のリセット端子22に
接続されている。またウォッチドッグタイマー20のリ
セット端子23はCPU10のポート24に接続され、
このポートから出力されるリセット信号によりウォッチ
ドッグタイマー20はリセットされるものである。21
はクロック発生器であり、このクロック発生器21から
出力されるクロック信号がウォッチドッグタイマー20
の初段のフリップフロップに入力される。
FIG. 2 shows the circuit configuration of the runaway monitoring section 19 of FIG. In FIG. 2, 10 is the CPU,
The CPU 10 is controlled by the OS and sequentially activates tasks having different priorities to execute various processes. Reference numeral 20 is a watchdog timer which constitutes the runaway monitoring section 19. The watchdog timer 20 is composed of a plurality of stages of flip-flops, and the output of the final stage flip-flop is connected to the reset terminal 22 of the CPU 10. The reset terminal 23 of the watchdog timer 20 is connected to the port 24 of the CPU 10,
The watchdog timer 20 is reset by a reset signal output from this port. 21
Is a clock generator, and the clock signal output from the clock generator 21 is a watchdog timer 20.
Is input to the first stage flip-flop.

【0006】次に従来の暴走監視装置の動作について、
図9〜図13とともに説明する。図9は従来例における
アイドルタスク(優先度が最も低いタスク)処理を示し
ている。図9において、ステップS1において、CPU
10のポート24よりHIGHを出力する。次にステッ
プS2において一定時間待ってステップS3でCPU1
0のポート24よりLOWを出力する。上記ステップS
1〜S3でリセット信号が生成され、このリセット信号
によりウォッチドッグタイマー20はリセットされる。
次にステップS4で一定時間待ちステップS1に戻る。
Next, regarding the operation of the conventional runaway monitoring device,
This will be described with reference to FIGS. 9 to 13. FIG. 9 shows an idle task (task with the lowest priority) processing in the conventional example. In FIG. 9, in step S1, the CPU
HIGH is output from the port 24 of 10. Next, in step S2, the CPU 1 waits for a fixed time and in step S3, the CPU 1
LOW is output from the port 24 of 0. Step S above
A reset signal is generated in 1 to S3, and the watchdog timer 20 is reset by this reset signal.
Next, in step S4, the process returns to step S1 after waiting for a fixed time.

【0007】図10は従来の暴走監視装置の時間経過に
伴うタスク処理を示し、図11は図10に示す動作にお
けるウォッチドッグタイマー20のカウント値を示して
いる。図10に示すように、CPU10はOSの制御に
よってタスクA、タスクB、タスクC、タスクD(アイ
ドルタスク)を実行するものである。タスクA〜Dの内
でタスクAが最も優先度が高く、タスクB、タスクC、
タスクDほど優先度が低くなり、タスクDが最も優先度
が低いものである。図9に示すリセット信号の生成はタ
スクDで行われるものである。なお前記走行位置表示装
置におけるタスクAは、例えば地図などの描画を行うタ
スクであり、タスクBはCD−ROM7からデータを読
込むタスク、タスクCはタッチパネルのスイッチのオ
ン、オフを判定するタスク等である。
FIG. 10 shows the task processing of the conventional runaway monitoring apparatus with the passage of time, and FIG. 11 shows the count value of the watchdog timer 20 in the operation shown in FIG. As shown in FIG. 10, the CPU 10 executes task A, task B, task C, and task D (idle task) under the control of the OS. Among the tasks A to D, the task A has the highest priority, and the tasks B, C,
The task D has a lower priority, and the task D has the lowest priority. The generation of the reset signal shown in FIG. 9 is performed in task D. Task A in the traveling position display device is, for example, a task of drawing a map, task B is a task of reading data from the CD-ROM 7, task C is a task of determining whether the touch panel switch is on or off, and the like. Is.

【0008】図10に示すように、アイドルタスク(タ
スクD)を実行している途中のタイミング(#1)(図
9におけるステップS1のタイミング)でウォッチドッ
グタイマー20にリセット信号が印加されると、ウォッ
チドッグタイマー20はリセットされる。その後図9の
ステップS2,S3,S4が実行され、ステップS4で
一定時間経過した時点でシステムコールがOSに通知さ
れると、アイドルタスクの処理は中断し、タスクCが起
動される。タスクCの実行途中で、より優先度の高いタ
スクのシステムコールがOSに通知されると、より優先
度の高いタスクAが起動される。タスクAが終了する
と、実行途中にあったタスクCの処理が再開される。タ
スクCの処理が終了すると、アイドルタスクDの処理が
再開され、タイミング(#2)でウォッチドッグタイマ
ー20にリセット信号が印加される。以後図10に示す
ように、より優先度の高いタスクが優先的に実行され、
タスクA〜Cの処理が無い期間にタスクDが実行され、
このタスクDの実行期間中で所定時間経過毎にウォッチ
ドッグタイマー20にリセット信号が印加されるもので
ある。
As shown in FIG. 10, when a reset signal is applied to the watchdog timer 20 at the timing (# 1) (the timing of step S1 in FIG. 9) during the execution of the idle task (task D). The watchdog timer 20 is reset. After that, steps S2, S3 and S4 of FIG. 9 are executed, and when the system call is notified to the OS at the time when a certain time has passed in step S4, the processing of the idle task is interrupted and the task C is started. When the OS is notified of the system call of the task with the higher priority during the execution of the task C, the task A with the higher priority is activated. When task A ends, the processing of task C that was in the middle of execution is restarted. When the processing of the task C is completed, the processing of the idle task D is restarted, and the reset signal is applied to the watchdog timer 20 at the timing (# 2). Thereafter, as shown in FIG. 10, a task with a higher priority is preferentially executed,
Task D is executed during the period when tasks A to C are not processed,
A reset signal is applied to the watchdog timer 20 every time a predetermined time elapses during the execution period of the task D.

【0009】図11は、ウォッチドッグタイマー20の
クロック計数値を示しており、タスクDにおけるタイミ
ング(#1)でウォッチドッグタイマー20はリセット
されるため、クロック計数値は0となり、次のリセット
信号が印加されるまで、ウォッチドッグタイマー20の
クロック計数値は増加していくものである。図10、図
11に示すようにアイドルタスクが適当な頻度で実行さ
れている場合には、ウォッチドッグタイマー20からC
PU10にリセット信号が出力される前にウォッチドッ
グタイマー20がリセットされるため、CPU10がリ
セットされることがない。
FIG. 11 shows the clock count value of the watchdog timer 20. Since the watchdog timer 20 is reset at the timing (# 1) in task D, the clock count value becomes 0 and the next reset signal The clock count value of the watchdog timer 20 increases until is applied. When the idle task is executed at an appropriate frequency as shown in FIGS. 10 and 11, the watchdog timer 20 to C
Since the watchdog timer 20 is reset before the reset signal is output to the PU 10, the CPU 10 is never reset.

【0010】図12,図13は、上記従来例において、
優先度が高いタスクが継続的に実行され、アイドルタス
クが適当な頻度で実行されなくなった場合の動作を示し
ている。図12のタイミング(#1)でリセット信号が
発生し、ウォッチドッグタイマー20がリセットされた
後、タスクC,B,Aが実行され続け、タスクDが所定
時間(tR)以上実行されなかった場合を示している。
タイミング(#1)でウォッチドッグタイマー20がリ
セットされた後、ウォッチドッグタイマー20の計数値
が増加して所定の計数値(TR)に達すると、ウォッチ
ドッグタイマー20よりCPU10のリセット端子22
にリセット信号が出力され、CPU10がリセットされ
イニシャルタスクが起動され初期化の処理が実行され、
その後タスクBが実行され、タスクBが終了すると、タ
スクDが実行されタスクD実行中のタイミング(#2)
でウォッチドッグタイマー20にリセット信号が印加さ
れるものである。
FIGS. 12 and 13 show the above-mentioned conventional example.
The operation when a high-priority task is continuously executed and an idle task is not executed at an appropriate frequency is shown. After the reset signal is generated at the timing (# 1) in FIG. 12 and the watchdog timer 20 is reset, the tasks C, B, and A are continuously executed, and the task D is not executed for a predetermined time (t R ) or more. The case is shown.
After the watchdog timer 20 is reset at the timing (# 1) and the count value of the watchdog timer 20 increases and reaches a predetermined count value (T R ), the watchdog timer 20 resets the reset terminal 22 of the CPU 10.
A reset signal is output to the CPU 10, the CPU 10 is reset, the initial task is activated, and the initialization process is executed.
After that, task B is executed, and when task B ends, task D is executed and the timing when task D is being executed (# 2)
Then, the reset signal is applied to the watchdog timer 20.

【0011】以上のように、従来の暴走監視装置では、
優先度が最も低いタスクでウォッチドッグタイマー20
をリセットするリセット信号を生成していたため、優先
度の高いタスクが継続されると、CPU10が頻繁にリ
セットされることになり、その都度イニシャルタスクを
実行するため、処理が中断される問題があった。例え
ば、図1に示す走行位置表示装置の場合、タスクA、
B、Cが継続して実行された場合、CPU10が頻繁リ
セットされるため、リセットの都度イニシャルタスクが
実行されるため、地図などの描画を行うタスク(タスク
A)、CD−ROM7からデータを読込むタスク(タス
クB)、タッチパネルのスイッチのオン、オフを判定す
るタスク(タスクC)等が中断されるものであった。
As described above, in the conventional runaway monitoring device,
Watchdog timer 20 for tasks with the lowest priority
Since the reset signal for resetting the CPU is generated, the CPU 10 is frequently reset when the high-priority task is continued, and the initial task is executed each time, so there is a problem that the processing is interrupted. It was For example, in the case of the traveling position display device shown in FIG. 1, task A,
When B and C are continuously executed, the CPU 10 is frequently reset, and the initial task is executed each time the reset is performed. Therefore, a task for drawing a map (task A) and reading data from the CD-ROM 7 are performed. The task to be inserted (task B), the task to determine the on / off of the switch of the touch panel (task C), and the like are interrupted.

【0012】従来のこのような問題を解決するために
は、ウォッチドッグタイマー20の設定時間(tR)を
長くすればよいが、ウォッチドッグタイマー20の設定
時間(tR)を長くするためには、ウォッチドッグタイ
マー20のフリップフロップの段数を増加したり、また
はクロック発生器21で発生するクロックを分周してウ
ォッチドッグタイマー20に印加するようにしなければ
ならず、ハード構成が大きくなり、コストが高くなるも
のであった。
In order to solve such a conventional problem, the set time (t R ) of the watchdog timer 20 may be lengthened, but in order to lengthen the set time (t R ) of the watchdog timer 20. Must increase the number of flip-flops of the watchdog timer 20 or divide the clock generated by the clock generator 21 and apply the divided clock to the watchdog timer 20, which increases the hardware configuration. The cost was high.

【0013】[0013]

【発明が解決しようとする課題】以上のように、上記従
来例においては、優先度の高いタスクが継続的に実行さ
れた場合に、ウォッチドッグタイマーがリセットされな
くなるため、CPU10に頻繁にリセットがかかり、結
果としてその度に処理が中断される問題があり、この問
題を解決するために、ウォッチドッグタイマーの設定時
間を長くすると、ハードの構成が大きくなる(例えばウ
ォッチドッグタイマーのフリップフロップの段数が大き
くなったり、クロックを分周する分周器を別途追加しな
ければならない等ハード構成が大きくなる)ものであっ
た。
As described above, in the above-mentioned conventional example, the watchdog timer is not reset when the high-priority task is continuously executed, so that the CPU 10 is frequently reset. As a result, there is a problem that processing is interrupted each time, and if the set time of the watchdog timer is increased to solve this problem, the hardware configuration becomes large (for example, the number of flip-flop stages of the watchdog timer). Is large, or the hardware configuration is large, such as the need to add a separate divider to divide the clock) was.

【0014】本発明は、上記従来の問題点を解決するも
のであり、ハード構成が大きくなることなく、優先度の
高いタスクが継続的に実行される場合でも、処理が中断
されることのない暴走監視装置をを提供することを目的
とするものである。
The present invention solves the above-mentioned conventional problems, and the processing is not interrupted even when a task with a high priority is continuously executed without increasing the hardware configuration. It is intended to provide a runaway monitoring device.

【0015】[0015]

【課題を解決するための手段】本発明は、上記目的を達
成するために、複数の処理を優先度に応じて実行すると
ともに、所定時間毎に最優先の割込処理を実行する処理
手段と、クロック発生器から出力されるクロック信号を
計数し計数値が所定値に達した際に上記処理手段をリセ
ットするウォッチドッグタイマーと、上記割込処理の回
数を計数する割込カウンターと、上記割込カウンターが
所定値計数する間に上記複数の処理の内で最も優先度の
低い処理が実行されたか否かを判定する判定手段と、上
記割込カウンターが所定値になるまでは上記割込処理毎
に上記ウォッチドッグタイマーにリセット信号を出力す
る手段と、上記割込カウンターが所定値に達した時に上
記最も優先度の低い処理が実行されていると判断された
場合に上記割込カウンターをリセットする手段と、上記
割込カウンターが所定値に達した時に上記最も優先度の
低い処理が実行されていないと判断された場合に上記ウ
ォッチドッグタイマーにリセット信号を出力することを
禁止する手段とを具備したことを特徴とするものであ
る。
In order to achieve the above object, the present invention provides a processing means for executing a plurality of processings according to priority and executing a highest priority interrupt processing at every predetermined time. A watchdog timer that counts the clock signals output from the clock generator and resets the processing means when the count value reaches a predetermined value; an interrupt counter that counts the number of interrupt processes; Determination means for determining whether or not the process having the lowest priority among the plurality of processes is executed while the interrupt counter counts a predetermined value, and the interrupt process until the interrupt counter reaches a predetermined value. A means for outputting a reset signal to the watchdog timer every time, and the interrupt timer when it is determined that the process with the lowest priority is being executed when the interrupt counter reaches a predetermined value. Resetting the input counter and prohibiting the reset signal from being output to the watchdog timer when it is determined that the process with the lowest priority is not being executed when the interrupt counter reaches a predetermined value. Means and means are provided.

【0016】[0016]

【作用】本発明は上記のような構成であり、クロック発
生器から出力されるクロック信号をウォッチドッグタイ
マーで計数し、このウォッチドッグタイマーの計数値が
所定値に達した際に処理手段をリセットすることにより
暴走を防止する暴走監視装置において、割込カウンター
で割込処理の回数を計数するとともに、最も優先度の低
い処理が実行されたか否かを判定手段で判定し、割込カ
ウンターの割込処理回数が所定値に達するまでは、割込
処理毎にウォッチドッグタイマーをリセットし、割込処
理回数が所定値に達した際には上記判定手段により最も
優先度の低い処理が実行された場合にのみ割込カウンタ
ーをリセットするとともに、ウォッチドッグタイマーを
リセットするものである。
According to the present invention, which has the above-mentioned structure, the clock signal output from the clock generator is counted by the watchdog timer, and the processing means is reset when the count value of the watchdog timer reaches a predetermined value. In a runaway monitoring device that prevents runaway by doing so, the interrupt counter counts the number of interrupt processes, and the determining means determines whether or not the process with the lowest priority has been executed. Until the number of interrupt processing reaches a predetermined value, the watchdog timer is reset for each interrupt processing, and when the number of interrupt processing reaches a predetermined value, the determination means executes the process with the lowest priority. Only if it resets the interrupt counter, the watchdog timer is reset.

【0017】[0017]

【実施例】以下に本発明の一実施例について図3〜図8
とともに説明する。本実施例のハード構成は従来例と同
様であり、図1、図2に示す通りである。図3は本実施
例の処理を示している。本実施例は、タスクA,B,
C,Dより更に優先度の高い一定時間毎の割込処理でリ
セット信号を生成しウォッチドッグタイマーをリセット
するものである。図3に示すように、一定時間毎に割込
が発生すると、ステップS1で割込カウンタの計数値が
n以上か否か判定される(nは正の整数)。ステップS
1でイエスと判定されると、ステップS2でアイドルフ
ラグに“1”が立っているか判定される。ステップS2
でイエスと判定されると、ステップS3に進み、アイド
ルフラグに“0”を設定する。ステップS3でアイドル
フラグが“0”に設定され、ステップS4で割込カウン
タを“0”にし、次のステップS5に進む。一方ステッ
プS1で割込カウンタのカウント値がn以上でないと判
定された場合には、ステップS8に進み、割込カウンタ
をインクリメントしステップS5に進む。ステップS5
では、CPU10のポートよりHIGHを出力し、次の
ステップ6で一定時間待った後ステップS7でCPU1
0のポートをLOWにする。上記ステップS5,S6,
S7でウォッチドッグタイマー20へのリセット信号が
生成されることになる。
EXAMPLE An example of the present invention will be described below with reference to FIGS.
Will be explained together. The hardware configuration of this embodiment is the same as that of the conventional example, and is as shown in FIGS. FIG. 3 shows the processing of this embodiment. In this embodiment, tasks A, B,
The watchdog timer is reset by generating a reset signal by an interrupt process having a higher priority than C and D at regular time intervals. As shown in FIG. 3, when an interrupt occurs at regular intervals, it is determined in step S1 whether the count value of the interrupt counter is n or more (n is a positive integer). Step S
If YES is determined in step 1, it is determined in step S2 whether "1" is set in the idle flag. Step S2
If YES is determined in step S3, the process proceeds to step S3, and "0" is set in the idle flag. The idle flag is set to "0" in step S3, the interrupt counter is set to "0" in step S4, and the process proceeds to the next step S5. On the other hand, when it is determined in step S1 that the count value of the interrupt counter is not greater than or equal to n, the process proceeds to step S8, the interrupt counter is incremented, and the process proceeds to step S5. Step S5
Then, HIGH is output from the port of the CPU 10, and after waiting for a certain time in the next step 6, the CPU 1 is output in step S7.
Set port 0 to LOW. Steps S5, S6 above
In S7, the reset signal to the watchdog timer 20 is generated.

【0018】図4は優先度の最も低いアイドルタスク
(タスクD)の処理を示しており、タスクDが実行され
ると、アイドルフラグ“1”を立てるものである。
FIG. 4 shows the processing of the idle task (task D) having the lowest priority. When the task D is executed, the idle flag "1" is set.

【0019】次に本実施例の動作について図5〜図8と
ともに説明する。図5に示すように、アイドルタスク
(タスクD)を実行している途中において、一定時間毎
の割込要求が発生すると、図3に示す処理が実行され、
ステップS1で割込カウンタのカウント値が設定値n
(設定値n=6とする)より大きいか判定される。上記
割込の前の段階で割込カウント値が5であった場合、ス
テップS1の判定はノーとなり、ステップS8に進み割
込カウント値をインクリメントする。このため割込カウ
ント値は5+1=6となる。ステップS8が終了する
と、ステップS5,S6,S7と進み、ウォッチドッグ
タイマー20にリセット信号を出し、ウォッチドッグタ
イマー20をリセットする。以上の割込処理が終了する
と、図5に示すようにタスクCが実行され、タスクCの
途中で優先度の高いタスクAが起動し、タスクAが終了
した段階で2回目の割込処理が開始される。1回目の割
込処理で割込カウント値が6になっていたため、2回目
の割込処理のステップS1の判定はイエスとなり、ステ
ップS2に進む。ステップS2ではアイドルフラグが1
か否か判定されるが、1回目の割込処理前にアイドルタ
スクが実行されていたためステップS2の判定はイエス
となり、ステップS3,S4に進み、アイドルフラグを
1→0に変更し、割込カウント値を6→0に変更する。
次にステップS5,S6,S7と進み、ウォッチドッグ
タイマー20にリセット信号を出力し、ウォッチドッグ
タイマー20をリセットする。このためウォッチドッグ
タイマー20のカウント値は0となる。2回目の割込処
理が終了すると、中断していたタスクCの処理が再開さ
れ、タスクCが終了すると、タスクBが起動される。タ
スクBの実行途中で3回目の割込処理が行われる。3回
目の割込処理ではステップS1の判定はノーとなりステ
ップS8で割込カウンタがインクリメントされ、割込カ
ウント値が0→1になる。ステップS8が終了するとス
テップS5,S6,S7に進みウォッチドッグタイマー
20をリセットし3回目の割込処理が終了する。同様に
4回目の割込ではステップS8に進み、割込カウント値
が1→2にインクリメントされ、さらにS5,S6,S
7に進みウォッチドッグタイマー20をリセットする。
次の5回目の割込処理ではステップS8で割込カウント
値が2→3にインクリメントされ、続くステップS5,
S6,S7でウォッチドッグタイマー20がリセットさ
れる。次の6回目の割込処理では、ステップS8で割込
カウント値が3→4にインクリメントされ、ステップS
5,S6,S7でウォッチドッグタイマー20がリセッ
トされる。6回目の割込処理が終了すると、アイドルタ
スクが実行されるため、図4に示すようにアイドルフラ
グが0→1に変更される。その後の7回目の割込処理で
は割込カウント値が4→5、また8回目の割込処理では
割込カウント値が5→6にインクリメントされる。次の
9回目の割込処理のステップS1の判定はイエスとな
る。これは8回目の割込処理で割込カウント値が6にな
っていたために、9回目の割込処理のステップS1でイ
エスと判定されるものである。次のステップS3ではア
イドルフラグが1か判定されるが、前記の通り6回目の
割込処理後にアイドルタスクが実行されて、アイドルフ
ラグが1になっているため、ステップS3の判定はイエ
スとなり、次のステップS3でアイドルフラグが1→0
に変更され、ステップS4で割込カウント値が6→0に
変更されるものである。以上のように一定時間毎の割込
処理が複数回(本実施例では6回)行われる間にアイド
ルタスクが実行されている場合には、図6に示すように
ウォッチドッグタイマー20のカウント値が設定値(T
R)に達しないため、CPU10がリセットされること
はない。
Next, the operation of this embodiment will be described with reference to FIGS. As shown in FIG. 5, when an idle request (task D) is being executed and an interrupt request is generated at regular intervals, the processing shown in FIG. 3 is executed.
In step S1, the count value of the interrupt counter is the set value n
It is determined whether it is larger than (set value n = 6). If the interrupt count value is 5 at the stage before the interrupt, the determination in step S1 is NO, and the process proceeds to step S8 to increment the interrupt count value. Therefore, the interrupt count value is 5 + 1 = 6. When step S8 ends, the process proceeds to steps S5, S6, and S7 to output a reset signal to the watchdog timer 20 and reset the watchdog timer 20. When the above interrupt processing is completed, task C is executed as shown in FIG. 5, task A with a high priority is activated in the middle of task C, and the second interrupt processing is executed when task A ends. Be started. Since the interrupt count value was 6 in the first interrupt process, the determination in step S1 of the second interrupt process is YES, and the process proceeds to step S2. In step S2, the idle flag is 1
Whether or not it is determined, but since the idle task was being executed before the first interrupt processing, the determination in step S2 is YES, the process proceeds to steps S3 and S4, the idle flag is changed from 1 to 0, and the interrupt is performed. Change the count value from 6 to 0.
Next, in steps S5, S6 and S7, a reset signal is output to the watchdog timer 20 to reset the watchdog timer 20. Therefore, the count value of the watchdog timer 20 becomes zero. When the second interrupt process is completed, the interrupted process of task C is restarted, and when task C is completed, task B is activated. During the execution of task B, the third interrupt process is performed. In the third interrupt processing, the determination in step S1 is NO, and the interrupt counter is incremented in step S8, and the interrupt count value becomes 0 → 1. When step S8 ends, the process proceeds to steps S5, S6 and S7, the watchdog timer 20 is reset, and the third interrupt processing ends. Similarly, in the fourth interruption, the process proceeds to step S8, the interruption count value is incremented from 1 to 2, and further S5, S6, S
Go to 7 and reset the watchdog timer 20.
In the next fifth interrupt processing, the interrupt count value is incremented from 2 to 3 in step S8, and the subsequent step S5.
The watchdog timer 20 is reset in S6 and S7. In the next sixth interrupt processing, the interrupt count value is incremented from 3 to 4 in step S8,
The watchdog timer 20 is reset in 5, S6 and S7. When the sixth interrupt process is completed, the idle task is executed, so the idle flag is changed from 0 to 1 as shown in FIG. In the subsequent 7th interrupt processing, the interrupt count value is incremented from 4 → 5, and in the 8th interrupt processing, the interrupt count value is incremented from 5 → 6. The determination in step S1 of the next 9th interrupt processing is YES. This is because the interrupt count value was 6 in the eighth interrupt process, so that the answer is YES in step S1 of the ninth interrupt process. In the next step S3, it is determined whether the idle flag is 1, but as described above, the idle task is executed after the sixth interrupt processing and the idle flag is 1, so the determination in step S3 is YES, In the next step S3, the idle flag is changed from 1 to 0.
And the interrupt count value is changed from 6 to 0 in step S4. As described above, when the idle task is being executed while the interrupt processing at fixed time intervals is performed a plurality of times (six times in this embodiment), the count value of the watchdog timer 20 as shown in FIG. Is the set value (T
Since R ) is not reached, the CPU 10 will not be reset.

【0020】図7,図8はタイミング(#2)で割込処
理が行われた後の複数回の割込処理を行う間にアイドル
タスクが実行されない場合を示しており、アイドルタス
クが実行されないため、アイドルフラグに1が立たず、
各割込処理では図3においてステップS1→S2を繰り
返すのみである。このように複数回の割込処理が繰り返
し行われてもステップS5〜S7が実行されず、ウォッ
チドッグタイマー20にリセット信号を出力できない。
このため図8に示すようにウォッチドッグタイマー20
のカウント値が増加し設定値(TR)に達し、CPU1
0にリセット信号が出力されCPU10がリセットされ
るものである。
7 and 8 show the case where the idle task is not executed while the interrupt processing is performed a plurality of times after the interrupt processing is performed at the timing (# 2), and the idle task is not executed. Therefore, 1 does not stand in the idle flag,
In each interrupt process, only steps S1 → S2 in FIG. 3 are repeated. Even if the interrupt process is repeated a plurality of times in this way, steps S5 to S7 are not executed and the reset signal cannot be output to the watchdog timer 20.
Therefore, as shown in FIG.
The count value is increased set value reached (T R), CPU1
A reset signal is output to 0 and the CPU 10 is reset.

【0021】以上のように、上記実施例によれば、ウォ
ッチドッグタイマー20のリセット信号を、最優先の割
込処理で発生させるため、優先度の高いタスクが継続的
に実行されてもCPU10が頻繁にリセットされること
がなくなるものである。また上記実施例では、割込処理
が所定の回数行われる間にアイドルタスクが実行されな
い場合にCPU10をリセットさせる構成であるため、
ウォッチドッグタイマーの段数を増大したり、分周器を
別途設ける等ハード構成を大きくする必要がないもので
ある。
As described above, according to the above-described embodiment, since the reset signal of the watchdog timer 20 is generated in the interrupt processing of the highest priority, the CPU 10 can be executed even if the high priority task is continuously executed. It will not be reset frequently. Further, in the above embodiment, since the CPU 10 is reset when the idle task is not executed while the interrupt processing is performed a predetermined number of times,
There is no need to increase the hardware configuration such as increasing the number of stages of the watchdog timer or providing a frequency divider separately.

【0022】[0022]

【発明の効果】本発明は、上記のような構成であり、本
発明によれば、ハード構成を大きくすることなく、CP
Uが異常になった際にCPUを確実にリセットできる利
点を有するものである。
The present invention has the above-described structure. According to the present invention, the CP can be used without increasing the hardware structure.
This has the advantage that the CPU can be reliably reset when U becomes abnormal.

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

【図1】本発明の暴走監視装置を具備した走行位置表示
装置のブロック図
FIG. 1 is a block diagram of a traveling position display device including a runaway monitoring device of the present invention.

【図2】本発明の一実施例における暴走監視装置の電気
回路図
FIG. 2 is an electric circuit diagram of a runaway monitoring device according to an embodiment of the present invention.

【図3】同実施例の流れ図FIG. 3 is a flow chart of the same embodiment.

【図4】同実施例の流れ図FIG. 4 is a flowchart of the embodiment.

【図5】同実施例の動作説明図FIG. 5 is an operation explanatory diagram of the embodiment.

【図6】同実施例のウォッチドッグタイマーの計数値を
示す図
FIG. 6 is a diagram showing a count value of the watchdog timer of the embodiment.

【図7】同実施例の動作説明図FIG. 7 is an operation explanatory diagram of the embodiment.

【図8】同実施例のウォッチドッグタイマーの計数値を
示す図
FIG. 8 is a diagram showing a count value of the watchdog timer of the embodiment.

【図9】従来の暴走監視装置の流れ図FIG. 9 is a flowchart of a conventional runaway monitoring device.

【図10】従来例の動作説明図FIG. 10 is an operation explanatory diagram of a conventional example.

【図11】同従来例のウォッチドッグタイマーの計数値
を示す図
FIG. 11 is a diagram showing a count value of the watchdog timer of the conventional example.

【図12】同従来例の動作説明図FIG. 12 is an operation explanatory diagram of the conventional example.

【図13】同従来例のウォッチドッグタイマーの計数値
を示す図
FIG. 13 is a diagram showing a count value of the watchdog timer of the conventional example.

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

10 中央処理装置 19 暴走監視回路 20 ウォッチドッグタイマー 21 クロック発生器 10 central processing unit 19 runaway monitoring circuit 20 watchdog timer 21 clock generator

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の処理を優先度に応じて実行すると
ともに、所定時間毎に最優先の割込処理を実行する処理
手段と、クロック発生器から出力されるクロック信号を
計数し計数値が所定値に達した際に上記処理手段をリセ
ットするウォッチドッグタイマーと、上記割込処理の回
数を計数する割込カウンターと、上記割込カウンターが
所定値計数する間に上記複数の処理の内で最も優先度の
低い処理が実行されたか否かを判定する判定手段と、上
記割込カウンターが所定値になるまでは上記割込処理毎
に上記ウォッチドッグタイマーにリセット信号を出力す
る手段と、上記割込カウンターが所定値に達した時に上
記最も優先度の低い処理が実行されていると判断された
場合に上記割込カウンターをリセットする手段と、上記
割込カウンターが所定値に達した時に上記最も優先度の
低い処理が実行されていないと判断された場合に上記ウ
ォッチドッグタイマーにリセット信号を出力することを
禁止する手段とを具備したことを特徴とする暴走監視装
置。
1. A processing means for executing a plurality of processes according to a priority and executing a highest priority interrupt process at every predetermined time, and a clock signal output from a clock generator. A watchdog timer that resets the processing means when reaching a predetermined value, an interrupt counter that counts the number of times of the interrupt processing, and among the plurality of processing while the interrupt counter counts a predetermined value. Determining means for determining whether or not the processing with the lowest priority has been executed, means for outputting a reset signal to the watchdog timer for each interrupt processing until the interrupt counter reaches a predetermined value, and A means for resetting the interrupt counter when it is determined that the process with the lowest priority is being executed when the interrupt counter reaches a predetermined value, and the interrupt counter are provided. A runaway monitoring apparatus comprising: means for prohibiting output of a reset signal to the watchdog timer when it is determined that the process with the lowest priority is not executed when the fixed value is reached. .
JP5260802A 1993-10-19 1993-10-19 Runaway monitoring device Expired - Fee Related JP2795140B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5260802A JP2795140B2 (en) 1993-10-19 1993-10-19 Runaway monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5260802A JP2795140B2 (en) 1993-10-19 1993-10-19 Runaway monitoring device

Publications (2)

Publication Number Publication Date
JPH07114490A true JPH07114490A (en) 1995-05-02
JP2795140B2 JP2795140B2 (en) 1998-09-10

Family

ID=17352954

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5260802A Expired - Fee Related JP2795140B2 (en) 1993-10-19 1993-10-19 Runaway monitoring device

Country Status (1)

Country Link
JP (1) JP2795140B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007264856A (en) * 2006-03-28 2007-10-11 Kyocera Corp Cpu monitoring system, device and method
US7496800B2 (en) 2005-06-06 2009-02-24 Denso Corporation Malfunction monitoring method and system
US7996732B2 (en) 2006-06-14 2011-08-09 Denso Corporation Program-execution monitoring method, system, and program
JP6049961B1 (en) * 2015-06-16 2016-12-21 オリンパス株式会社 CPU monitoring device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7496800B2 (en) 2005-06-06 2009-02-24 Denso Corporation Malfunction monitoring method and system
JP2007264856A (en) * 2006-03-28 2007-10-11 Kyocera Corp Cpu monitoring system, device and method
US7996732B2 (en) 2006-06-14 2011-08-09 Denso Corporation Program-execution monitoring method, system, and program
JP6049961B1 (en) * 2015-06-16 2016-12-21 オリンパス株式会社 CPU monitoring device
WO2016204070A1 (en) * 2015-06-16 2016-12-22 オリンパス株式会社 Cpu monitoring device

Also Published As

Publication number Publication date
JP2795140B2 (en) 1998-09-10

Similar Documents

Publication Publication Date Title
US8639439B2 (en) Electronic device and transportion information management method utilized thereby
US20180299281A1 (en) Navigation system
US10760924B2 (en) POI information providing server, POI information providing device, POI information providing system and program
JPH09325042A (en) Apparatus for displaying running position
JP2006003215A (en) Route search method for navigation system, and navigation system
JP2795140B2 (en) Runaway monitoring device
JPH09284365A (en) Portable telephone set
JP2003186392A (en) Map display device
JP3353472B2 (en) Road information display device
JP2002297025A (en) Method, device, and software for map display
JPH08136271A (en) Car navigation apparatus
JP2001027531A (en) Present position transducer and navigation system
US9858812B2 (en) Traffic signal state detection apparatus
JPH0962997A (en) Running position display device
JP3477226B2 (en) Navigation system for moving objects
US20150350420A1 (en) Call Control Device, Server, and Program
JPH1137768A (en) Navigation system for mobile body
JPH07286856A (en) Current location calculating device
JP2578723Y2 (en) Car navigation system
JPH09159468A (en) Display device for running position
JP3541050B2 (en) Navigation system
JPH09126789A (en) Running position display device
JPH06294663A (en) Map display processing method for mobile navigation system
JP2007323079A (en) Map display device and program
JPH11142173A (en) Navigation system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080626

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090626

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees