JP2007264856A - Cpu monitoring system, device and method - Google Patents

Cpu monitoring system, device and method Download PDF

Info

Publication number
JP2007264856A
JP2007264856A JP2006086785A JP2006086785A JP2007264856A JP 2007264856 A JP2007264856 A JP 2007264856A JP 2006086785 A JP2006086785 A JP 2006086785A JP 2006086785 A JP2006086785 A JP 2006086785A JP 2007264856 A JP2007264856 A JP 2007264856A
Authority
JP
Japan
Prior art keywords
cpu
task
executed
count value
reset
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
JP2006086785A
Other languages
Japanese (ja)
Inventor
Hiroshi Sakai
博司 酒井
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.)
Kyocera Corp
Original Assignee
Kyocera Corp
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 Kyocera Corp filed Critical Kyocera Corp
Priority to JP2006086785A priority Critical patent/JP2007264856A/en
Publication of JP2007264856A publication Critical patent/JP2007264856A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a CPU monitoring system, device and method that can implement circuit simplification and cost reduction and facilitate the investigation of the cause of failures. <P>SOLUTION: An interrupt routine R is executed at constant time intervals to increment a counter and to clear a watchdog timer implemented in a CPU 20 if the count value is within a predetermined threshold. A reset task TS3 is executed at time intervals longer than the time intervals of execution of the interrupt routine R to clear the counter. The interrupt routine R can be executed irrespective of the priority of tasks executed by the CPU 20, and the reset task TS3 is set to the lowest priority of all the tasks executed by the CPU 20. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、CPU(中央処理装置)の実行状況を監視するCPU監視システム、装置、及び方法に関する。   The present invention relates to a CPU monitoring system, apparatus, and method for monitoring the execution status of a CPU (central processing unit).

従来から、CPUの実行状況を監視するためにウォッチドッグタイマが用いられている。ここで、ウォッチドッグタイマとは、一定時間毎に計時のためのカウンタをリセットする機能を備え、所定の期間内にカウンタがリセットされないときにはCPUをリセットするものである。かかるウォッチドックタイマを用いてCPUを常時監視することにより、暴走した状態にあるCPUを復帰させることが可能となる。   Conventionally, a watchdog timer is used to monitor the execution status of the CPU. Here, the watchdog timer has a function of resetting a counter for counting at regular intervals, and resets the CPU when the counter is not reset within a predetermined period. By constantly monitoring the CPU using such a watchdog timer, it is possible to restore the CPU in a runaway state.

図3は、ウォッチドッグタイマを用いた従来のCPU監視方法の一例を示すタイミングチャートである。図3に示す通り、従来は、監視対象であるCPU100の外部に外付けウォッチドッグタイマ(以下、WDTという)101を設け、この外付けWDT101を用いてCPU100の実行状況を監視している。いま、CPU100にて、AタスクTS11及びBタスクTS12の2つのタスクと、外付けWDT101を定期的にクリアするためのタスク(WDTタスクTS13)とが実行される場合を考える。尚、これらのタスクのうち、AタスクTS11の優先度が最も高く、次にBタスクTS12の優先度が高く、WDTタスクTS13の優先度が最も低いとする。   FIG. 3 is a timing chart showing an example of a conventional CPU monitoring method using a watchdog timer. As shown in FIG. 3, conventionally, an external watchdog timer (hereinafter referred to as WDT) 101 is provided outside the CPU 100 to be monitored, and the execution status of the CPU 100 is monitored using this external WDT 101. Consider a case where the CPU 100 executes two tasks, an A task TS11 and a B task TS12, and a task (WDT task TS13) for periodically clearing the external WDT 101. Of these tasks, the A task TS11 has the highest priority, the B task TS12 has the next highest priority, and the WDT task TS13 has the lowest priority.

図3に示す通り、CPU100は、AタスクTS11及びBタスクTS12並びにWDTタスクTS13を時分割で実行する。ここで、AタスクTS11及びBタスクTS12は、WDTタスクTS13よりも優先度が高いため、WDTタスクTS13に優先して実行される。WDTタスクTS13は一定時間毎に実行され、WDTタスクTS13の実行により外付けWDT101のカウンタがクリアされる。WDTタスクTS13は、例えば3秒程度の時間間隔で実行される。よって、外付けWDT101のカウンタがクリアされる時間間隔T11,T12は3秒程度である。   As shown in FIG. 3, the CPU 100 executes the A task TS11, the B task TS12, and the WDT task TS13 in a time division manner. Here, since the A task TS11 and the B task TS12 have a higher priority than the WDT task TS13, they are executed with priority over the WDT task TS13. The WDT task TS13 is executed at regular intervals, and the counter of the external WDT 101 is cleared by executing the WDT task TS13. The WDT task TS13 is executed at a time interval of about 3 seconds, for example. Therefore, the time intervals T11 and T12 for clearing the counter of the external WDT 101 are about 3 seconds.

いま、外付けWDT101のカウンタがクリアされた後にAタスクTS11が実行され、このAタスクTS11が何らかの原因で暴走した場合を考える。前述の通り、AタスクTS11は最も優先度が高いため、AタスクTS11が暴走してしまうとAタスクTS11がCPU100を占有してしまう。このため、WDTタスクTS13が実行されず、外付けWDT101のカウンタはクリアされず外付けWDT101のカウンタがカウントアップされ続ける。そして、外付けWDT101のカウンタをクリアしてから所定期間T13(例えば、10秒程度)が経過すると、外付けWDT101はタイムアウトとなり、CPU100に対してリセット信号を出力する。これにより、CPU100がリセットされる。   Assume that the A task TS11 is executed after the counter of the external WDT 101 is cleared, and the A task TS11 runs away for some reason. As described above, since the A task TS11 has the highest priority, if the A task TS11 runs away, the A task TS11 occupies the CPU 100. For this reason, the WDT task TS13 is not executed, the counter of the external WDT 101 is not cleared, and the counter of the external WDT 101 is continuously incremented. When a predetermined period T13 (for example, about 10 seconds) elapses after the counter of the external WDT 101 is cleared, the external WDT 101 times out and outputs a reset signal to the CPU 100. As a result, the CPU 100 is reset.

また、以下の特許文献1には、実行対象となるタスクの切替えの際に退避・保存、復帰・設定していた各タスクのコンテキスト情報に加えて暴走検出用タイマーカウント値・情報を合わせて退避・復帰することで、タスクの暴走検出を行う方法及び装置が提案されている。
特開2005−107757号公報
Patent Document 1 below saves the runaway detection timer count value and information in addition to the context information of each task that was saved / saved and restored / set when switching the task to be executed. A method and apparatus for detecting task runaway by returning is proposed.
JP-A-2005-107757

ところで、図3を用いて説明した従来のCPU監視方法では、外付けWDT101を用いてCPU100の監視を行っている。ここで、WDTを内蔵したCPUも存在するが、内蔵のWDTは定期的に行われるリセット(カウンタのリセット)の時間間隔が1.5秒程度と短かく、暴走に至るような状況でなくとも一時的な負荷によりリセットが実施できないことがある。このため、図3に示す例では、定期的に行われるリセットの時間間隔がより長い外付けWDTを設けている。しかしながら、外付けWDTを設けると、回路が複雑になるとともにコストが上昇してしまうという問題があった。   Incidentally, in the conventional CPU monitoring method described with reference to FIG. 3, the CPU 100 is monitored using the external WDT 101. Here, some CPUs have a built-in WDT, but the built-in WDT has a short time interval of reset (counter reset) of about 1.5 seconds, even if it does not lead to a runaway. The reset may not be performed due to a temporary load. For this reason, in the example shown in FIG. 3, an external WDT having a longer reset time interval is provided. However, when the external WDT is provided, there is a problem that the circuit becomes complicated and the cost increases.

また、従来は、外付けWDT101のタイムアウトによりCPU100をリセットしているが、CPU100がリセットされた時点で待避・保存されるタスクに関する情報はほとんどない。このため、CPU100がリセットされた後でリセットが生じた原因を追求するのに時間を要し、デバッグを行うのが困難であるという問題があった。   Conventionally, the CPU 100 is reset due to the time-out of the external WDT 101, but there is almost no information regarding tasks saved and saved when the CPU 100 is reset. For this reason, it takes time to pursue the cause of the reset after the CPU 100 is reset, and it is difficult to perform debugging.

本発明は、上記事情に鑑みてなされたものであり、回路の簡略化及びコスト削減を図れるとともに容易に障害の発生原因を追求することができるCPU監視システム、装置、及び方法を提供することを目的とする。   The present invention has been made in view of the above circumstances, and provides a CPU monitoring system, apparatus, and method capable of simplifying the circuit and reducing the cost and easily pursuing the cause of the failure. Objective.

上記課題を解決するために、本発明のCPU監視システムは、ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視システムにおいて、カウントを行うカウント手段と、第1の所定時間毎に、前記カウント手段にカウントさせるとともに前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込み手段と、前記第1の所定期間よりも長い第2の所定時間毎に、前記カウント手段のカウント値をクリアするリセット手段とを備えることを特徴としている。
上記課題を解決するために、本発明のCPU監視システムは、ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視システムにおいて、カウントを行うカウント手段と、前記カウント手段にカウントさせ、前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込みルーチンを第1の所定時間毎に実行させるとともに、前記カウント手段のカウント値をクリアするリセットタスクを前記第1の所定期間よりも長い第2の所定時間毎に実行させるタスク制御手段とを備えることを特徴としている。
ここで、本発明のCPU監視システムは、前記割り込みルーチンが、前記CPUで実行されるタスクの優先度に拘わらず実行可能であり、前記リセットタスクは、前記CPUで実行されるタスクのうちで最も低い優先度が設定されていることを特徴としている。
また、本発明のCPU監視システムは、前記タスク制御手段が、前記リセットタスク以外のタスクを実行させる場合には、実行開始時にフラグをセットし、実行終了時にセットしたフラグをクリアする制御を行うことを特徴としている。
更に、本発明のCPU監視システムは、前記割り込みルーチンが、前記カウント手段のカウント値が前記所定値よりも大である場合には、前記フラグがセットされているタスクに関する情報を待避することを特徴としている。
上記課題を解決するために、本発明のCPU監視装置は、ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視装置において、カウントを行うカウント手段と、第1の所定時間毎に、前記カウント手段にカウントさせるとともに前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込み手段と、前記第1の所定期間よりも長い第2の所定時間毎に、前記カウント手段のカウント値をクリアするリセット手段とを備えることを特徴としている。
また、本発明のCPU監視装置は、ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視装置において、カウントを行うカウント手段と、前記カウント手段にカウントさせ、前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込みルーチンを第1の所定時間毎に実行させるとともに、前記カウント手段のカウント値をクリアするリセットタスクを前記第1の所定期間よりも長い第2の所定時間毎に実行させるタスク制御手段とを備えることを特徴としている。
更に、本発明のCPU監視装置は、前記割り込みルーチンは、前記CPUで実行されるタスクの優先度に拘わらず実行可能であり、前記リセットタスクは、前記CPUで実行されるタスクのうちで最も低い優先度が設定されていることを特徴としている。
上記課題を解決するために、本発明のCPU監視方法は、ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視方法において、第1の所定時間毎にカウント手段によりカウントを行う第1ステップと、前記第1の所定期間よりも長い第2の所定時間毎に前記カウント手段のカウント値をクリアする第2ステップと、前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする第3ステップとを含むことを特徴としている。
また、本発明のCPU監視方法は、前記第1ステップが、前記CPUで実行されるタスクの優先度に拘わらず実行され、前記第2ステップは、前記CPUで実行されるタスクのうちで最も低い優先度が設定されて実行されることを特徴としている。
また、本発明のCPU監視方法は、前記CPUでタスクを実行させるときに実行開始時にフラグをセットするステップと、前記タスクの実行終了時にセットしたフラグをクリアするステップとを含むことを特徴としている。
更に、本発明のCPU監視方法は、前記カウント手段のカウント値が前記所定値よりも大である場合には、前記フラグがセットされているタスクに関する情報を待避する第4ステップを含むことを特徴としている。
In order to solve the above-described problem, a CPU monitoring system according to the present invention is a CPU monitoring system that monitors the execution status of a CPU having a watchdog timer. Means for counting and interrupting means for clearing the watchdog timer when the count value of the counting means is within a predetermined value, and for each second predetermined time longer than the first predetermined period, the count And reset means for clearing the count value of the means.
In order to solve the above problems, a CPU monitoring system according to the present invention is a CPU monitoring system that monitors the execution status of a CPU including a watchdog timer. When the count value is within a predetermined value, an interrupt routine for clearing the watchdog timer is executed every first predetermined time, and a reset task for clearing the count value of the counting means is executed in the first predetermined value. And a task control unit that is executed every second predetermined time longer than the period.
Here, in the CPU monitoring system of the present invention, the interrupt routine can be executed regardless of the priority of the task executed by the CPU, and the reset task is the most of the tasks executed by the CPU. It is characterized by a low priority.
In the CPU monitoring system of the present invention, when the task control means causes a task other than the reset task to be executed, a control is performed to set a flag at the start of execution and clear the flag set at the end of execution. It is characterized by.
Furthermore, the CPU monitoring system of the present invention is characterized in that, when the count value of the counting means is larger than the predetermined value, the interrupt routine saves information on a task for which the flag is set. It is said.
In order to solve the above-described problem, a CPU monitoring device according to the present invention is a CPU monitoring device that monitors the execution status of a CPU including a watchdog timer. The CPU monitoring device counts the counting unit for each first predetermined time. Means for counting and interrupting means for clearing the watchdog timer when the count value of the counting means is within a predetermined value, and for each second predetermined time longer than the first predetermined period, the count And reset means for clearing the count value of the means.
The CPU monitoring device of the present invention is a CPU monitoring device that monitors the execution status of a CPU having a watchdog timer. The CPU monitoring device counts the counting means, and the counting means counts the count value of the counting means. If not, an interrupt routine for clearing the watchdog timer is executed every first predetermined time, and a reset task for clearing the count value of the counting means is set to a second time longer than the first predetermined period. And a task control unit that is executed every predetermined time.
Furthermore, in the CPU monitoring device of the present invention, the interrupt routine can be executed regardless of the priority of the task executed by the CPU, and the reset task is the lowest of the tasks executed by the CPU. It is characterized in that priority is set.
In order to solve the above-mentioned problem, a CPU monitoring method of the present invention is a CPU monitoring method for monitoring an execution status of a CPU including a watchdog timer, wherein a first step of performing counting by a counting means every first predetermined time; A second step of clearing the count value of the counting means every second predetermined time longer than the first predetermined period, and the watchdog timer if the count value of the counting means is within a predetermined value And a third step of clearing.
In the CPU monitoring method of the present invention, the first step is executed regardless of the priority of the task executed by the CPU, and the second step is the lowest task among the tasks executed by the CPU. It is characterized in that the priority is set and executed.
The CPU monitoring method of the present invention includes a step of setting a flag at the start of execution when the CPU executes a task, and a step of clearing the flag set at the end of execution of the task. .
Furthermore, the CPU monitoring method of the present invention includes a fourth step of evacuating information relating to the task for which the flag is set when the count value of the counting means is larger than the predetermined value. It is said.

本発明によれば、第1の所定時間毎にカウント手段によりカウントを行い、第1の所定期間よりも長い第2の所定時間毎にカウント手段のカウント値をクリアし、カウント手段のカウント値が所定値以内である場合にはウォッチドッグタイマをクリアし、カウント値が所定値よりも大きい場合にはウォッチドッグタイマをクリアしていないため、外付けのウォッチドックタイマが無くともCPUの監視を行うことができる。これにより、回路の簡略化及びコスト削減を図ることができる。
また、CPUでタスクを実行させるときに実行開始時にフラグをセットし、タスクの実行終了時にセットしたフラグをクリアしているため、暴走等によりフラグがセットされたままのタスクを容易に特定することができる。また、フラグがセットされたままのタスクに関する情報を待避することにより、容易に障害の発生原因を追求することができる。
According to the present invention, the counting means counts every first predetermined time, the count value of the counting means is cleared every second predetermined time longer than the first predetermined period, and the count value of the counting means is The watchdog timer is cleared when it is within the predetermined value, and the watchdog timer is not cleared when the count value is larger than the predetermined value, so the CPU is monitored even without an external watchdog timer. be able to. As a result, the circuit can be simplified and the cost can be reduced.
In addition, when a task is executed by the CPU, a flag is set at the start of execution, and the flag set at the end of execution of the task is cleared. Therefore, it is easy to identify a task whose flag is set due to runaway or the like. Can do. In addition, the cause of the failure can be easily pursued by saving the information on the task with the flag set.

以下、図面を参照して本発明の一実施形態によるCPU監視システム、装置、及び方法について詳細に説明する。図1は、本発明のCPU監視システムを備えるPHS基地局の要部構成を示すブロック図である。尚、本実施形態では、本発明のCPU監視システムをPHS基地局に適用する場合を例に挙げて説明するが、本発明のCPU監視システムはPHS基地局に設けられたCPUの監視を行う場合に制限されず、任意のCPUの監視に適用することが可能である。   Hereinafter, a CPU monitoring system, apparatus, and method according to an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a main configuration of a PHS base station including a CPU monitoring system according to the present invention. In this embodiment, a case where the CPU monitoring system of the present invention is applied to a PHS base station will be described as an example. However, the CPU monitoring system of the present invention performs monitoring of a CPU provided in a PHS base station. However, the present invention can be applied to monitoring of any CPU.

図1に示す通り、PHS基地局10は、第1,第2送受信装置11,12、モデム部13、制御部14、及びDSU(Digital Service Unit)15を備えている。第1,第2送受信装置11,12は、PHS端末(通信端末装置)と無線通信を行う高周波回路(アンテナも含む)であって、PHS端末から受信した受信信号をモデム部13に出力すると共に、モデム部13から入力された送信信号をPHS端末に送信する。   As shown in FIG. 1, the PHS base station 10 includes first and second transmission / reception devices 11 and 12, a modem unit 13, a control unit 14, and a DSU (Digital Service Unit) 15. The first and second transmission / reception devices 11 and 12 are high-frequency circuits (including antennas) that perform wireless communication with a PHS terminal (communication terminal device), and output a reception signal received from the PHS terminal to the modem unit 13. The transmission signal input from the modem unit 13 is transmitted to the PHS terminal.

モデム部13は、上記受信信号の復号化又は送信信号の生成(符号化)を行うものであり、受信信号を復調して得られた信号(復号化音声信号や復号化画像信号)を制御部14に出力する。また、制御部14から出力された送信用の音声信号や画像信号を符号化して符号化音声信号や符号化画像信号を生成して第1送受信装置11又は第2送受信装置12に出力する。   The modem unit 13 decodes the reception signal or generates (encodes) the transmission signal, and controls a signal (decoded audio signal or decoded image signal) obtained by demodulating the reception signal. 14 for output. Also, the audio signal and image signal for transmission output from the control unit 14 are encoded to generate an encoded audio signal and an encoded image signal, which are output to the first transmission / reception device 11 or the second transmission / reception device 12.

制御部14は、CPU20、音声・画像変換部21、SDRAM(Synchronous DRAM(Dynamic Random Access Memory))22、SRAM(Static RandomAccess Memory)23、FlashROM(Flash Read Only Memory)24、BOOTROM(Boot Read Only Memory)25、FPGA(Field Programmable Gate Array)26、及びUSB部27を備えている。   The control unit 14 includes a CPU 20, an audio / image conversion unit 21, an SDRAM (Synchronous DRAM (Dynamic Random Access Memory)) 22, an SRAM (Static Random Access Memory) 23, a Flash ROM (Flash Read Only Memory) 24, a BOOTROM (Boot Read Only Memory). ) 25, an FPGA (Field Programmable Gate Array) 26, and a USB unit 27.

図1に示す通り、制御部14は、CPU20、音声・画像変換部21、SDRAM22、SRAM23、FlashROM24、BOOTROM25、FPGA26、及びUSB部27がバスラインBによって接続されたものであり、SDRAM22に記憶された制御プログラムに基づいてモデム部13とDSU15との間でのデータの授受を制御する。   As shown in FIG. 1, the control unit 14 includes a CPU 20, an audio / image conversion unit 21, an SDRAM 22, an SRAM 23, a FlashROM 24, a BOOTROM 25, an FPGA 26, and a USB unit 27 connected by a bus line B, and is stored in the SDRAM 22. Data transmission / reception between the modem unit 13 and the DSU 15 is controlled based on the control program.

CPU20は、タスク制御部20aとウォッチドッグタイマ(WDT)20bとを備えている。尚、ここでは説明の便宜上、CPU20がタスク制御部20aを備えているとして説明を進めるが、このタスク制御部20aは、CPU20がSDRAM22に記憶された制御プログラムを実行することでソフトウェア的に実現されるものであっても良い。タスク制御部20aは、CPU20で実行される各種タスクの実行を制御する。また、詳細は後述するが、本実施形態ではCPU20で割り込みルーチンが実行される。タスク制御部20aはこの割り込みルーチンの実行も制御する。   The CPU 20 includes a task control unit 20a and a watch dog timer (WDT) 20b. Here, for the sake of convenience of explanation, the description will be made assuming that the CPU 20 includes the task control unit 20a. However, the task control unit 20a is realized by software by the CPU 20 executing a control program stored in the SDRAM 22. It may be a thing. The task control unit 20a controls the execution of various tasks executed by the CPU 20. Although details will be described later, in this embodiment, the CPU 20 executes an interrupt routine. The task control unit 20a also controls the execution of this interrupt routine.

更に、タスク制御部20aはCPU20でタスクを実行させる場合には、実行開始時にフラグをセットし、実行終了時(タスクの一時的な停止時を含む)にセットしたフラグをクリアする制御を行う。この制御は、CPU20で実行されるタスク毎に行われる。つまり、タスク毎にそれぞれ異なるフラグが設定され、あるタスクの実行が開始された場合にはそのタスクのフラグがセットされ、そのタスクが終了して異なるタスクの実行が開始される場合には、終了されるタスクのフラグがクリアされるとともに、実行が開始されるタスクのフラグがセットされる。   Furthermore, when the task is executed by the CPU 20, the task control unit 20a sets a flag at the start of execution and performs control to clear the flag set at the end of execution (including when the task is temporarily stopped). This control is performed for each task executed by the CPU 20. In other words, a different flag is set for each task, and when the execution of a certain task is started, the flag of that task is set, and when the task ends and execution of a different task starts, the end The flag of the task to be executed is cleared, and the flag of the task to be executed is set.

WDT20bは、計時のためのカウンタを備えており、カウンタがリセットされずにある値をカウントしきってしまうとCPU20をリセットする。このWDT20bはCPU20内に内蔵されている。尚、詳細は後述するが、WDT20bは、CPU20で実行される割り込みルーチンにより所定の時間間隔でリセットされる。   The WDT 20b is provided with a counter for measuring time, and resets the CPU 20 when the counter counts a certain value without being reset. The WDT 20b is built in the CPU 20. Although details will be described later, the WDT 20b is reset at predetermined time intervals by an interrupt routine executed by the CPU 20.

音声・画像変換部21は、CPU20による制御の下で、前述した復号化音声信号や復号化画像信号を回線網への送信に適した音声信号や画像信号に信号変換してCPU20に出力する。また、CPU20から入力された回線網からの音声信号や画像信号をPHS端末用の音声信号や画像信号に変換してモデム部13に出力する。   Under the control of the CPU 20, the audio / image conversion unit 21 converts the above-described decoded audio signal and decoded image signal into an audio signal and an image signal suitable for transmission to the network, and outputs them to the CPU 20. Also, the audio signal and image signal from the line network input from the CPU 20 are converted into an audio signal and image signal for the PHS terminal and output to the modem unit 13.

SDRAM22は、CPU20が実行する制御プログラムを記憶する。また、SDRAM22には、記憶領域22a,22bが設けられている。記憶領域22aには、CPU20での割り込みルーチンの実行によりインクリメントされ、リセットタスク(詳細は後述する)の実行によりクリアされるカウント値が記憶される。尚、詳細は後述するが、この記憶領域22aはカウンタとして用いられる。また、記憶領域22bは、CPU20でのタスクの実行開始によりセットされ、実行終了によりクリアされるフラグが記憶される。   The SDRAM 22 stores a control program executed by the CPU 20. The SDRAM 22 is provided with storage areas 22a and 22b. The storage area 22a stores a count value that is incremented by execution of the interrupt routine in the CPU 20 and cleared by execution of a reset task (details will be described later). Although details will be described later, the storage area 22a is used as a counter. The storage area 22b stores a flag that is set when the CPU 20 starts executing the task and is cleared when the execution is completed.

SRAM23は、CPU20の処理結果等を一時的に記憶するものである。FlashROM24は、例えばDSU15を介して上位制御系からダウンロードした展開前の制御プログラムを記憶するものである。BOOTROM25は、PHS基地局10の起動時にCPU20に実行されるブートプログラム(起動プログラム)を記憶するものである。FPGA26は、モデム部13やDSU15等のハードウェアを制御するために設けられたプログラマブルロジック回路である。USB部27は、メンテナンス用のコンピュータ等の外部装置とデータの授受を行うためのインタフェース回路である。   The SRAM 23 temporarily stores processing results of the CPU 20 and the like. The flash ROM 24 stores, for example, a control program before deployment downloaded from the host control system via the DSU 15. The BOOTROM 25 stores a boot program (startup program) executed by the CPU 20 when the PHS base station 10 is started. The FPGA 26 is a programmable logic circuit provided for controlling hardware such as the modem unit 13 and the DSU 15. The USB unit 27 is an interface circuit for exchanging data with an external device such as a maintenance computer.

次に、以上説明したPHS基地局10に適用される本発明のCPU監視システムの動作について説明する。図2は、本発明の一実施形態によるCPU監視方法を示すタイミングチャートである。図2に示す通り、本実施形態においては、CPU20で割り込みルーチンRとリセットタスクTS3とが実行され、これらによりCPU20の実行状況を監視している。また、ここでは、CPU20にて、上記の割り込みルーチンRとリセットタスクTS3以外に、AタスクTS1及びBタスクTS2の2つのタスクが実行される場合を考える。   Next, the operation of the CPU monitoring system of the present invention applied to the PHS base station 10 described above will be described. FIG. 2 is a timing chart showing a CPU monitoring method according to an embodiment of the present invention. As shown in FIG. 2, in the present embodiment, the CPU 20 executes the interrupt routine R and the reset task TS3, and the execution status of the CPU 20 is monitored by these. Here, let us consider a case where the CPU 20 executes two tasks, the A task TS1 and the B task TS2, in addition to the interrupt routine R and the reset task TS3.

CPU20のタスク制御部20aは、図2に示す通り、AタスクTS1及びBタスクTS2並びにリセットタスクTS3の実行開始・終了を制御する。具体的に、タスク制御部20aは、タスクTS1,TS2及びリセットタスクTS3を時分割で実行させる。尚、これらのタスクのうち、AタスクTS1の優先度が最も高く、次にBタスクTS2の優先度が高いものとする。リセットタスクTS3は、CPU20で実行されるタスクのうち最も低い優先度に設定される。つまり、AタスクTS1及びBタスクTS2は、リセットタスクTS3よりも優先度が高いため、リセットタスクTS3に優先して実行される。また、割り込みルーチンRは、CPU20で実行されるタスクの優先度に拘わらず実行可能である。   The task control unit 20a of the CPU 20 controls the start / end of execution of the A task TS1, the B task TS2, and the reset task TS3 as shown in FIG. Specifically, the task control unit 20a causes the tasks TS1, TS2 and the reset task TS3 to be executed in a time division manner. Of these tasks, the A task TS1 has the highest priority, and the B task TS2 has the next highest priority. The reset task TS3 is set to the lowest priority among the tasks executed by the CPU 20. That is, the A task TS1 and the B task TS2 have higher priority than the reset task TS3, and therefore are executed with priority over the reset task TS3. The interrupt routine R can be executed regardless of the priority of the task executed by the CPU 20.

タスク制御部20は、割り込みルーチンRを一定時間毎(例えば、100ミリ秒毎)に実行させるとともに、リセットタスクTS3を割り込みルーチンRの時間間隔よりも長い一定期間毎(例えば、3秒毎)に実行させる制御を行う。また、リセットタスクTS3以外のタスクを実行させる場合には、実行開始時にタスクの実行が開始された旨を示すフラグをSDRAM22の記憶領域22bに記憶することによりフラグをセットし、実行終了時にそのフラグをクリアする制御を行う。尚、このフラグはタスク毎に用意される。   The task control unit 20 causes the interrupt routine R to be executed at regular intervals (for example, every 100 milliseconds), and the reset task TS3 is performed at regular intervals (for example, every 3 seconds) longer than the time interval of the interrupt routine R. Control to be executed. When a task other than the reset task TS3 is to be executed, a flag indicating that the execution of the task is started is stored in the storage area 22b of the SDRAM 22 at the start of execution, and the flag is set at the end of execution. Control to clear. This flag is prepared for each task.

割り込みルーチンRは、実行される度に、カウンタとして用いられるSDRAM22の記憶領域22aに記憶された値(カウント値)をインクリメントする処理を行うとともに、そのカウント値が予め設定された所定の閾値以内であるか否かを判断する。この閾値としては、例えば10秒の間に割り込みルーチンRが実行される回数に設定される。尚、以下の説明では、便宜的に、割り込みルーチンRが記憶領域22aに記憶されたカウント値をインクリメントする処理を「カウンタのインクリメント」という。   Each time the interrupt routine R is executed, the interrupt routine R performs a process of incrementing a value (count value) stored in the storage area 22a of the SDRAM 22 used as a counter, and the count value is within a predetermined threshold value set in advance. Judge whether there is. For example, the threshold is set to the number of times the interrupt routine R is executed in 10 seconds. In the following description, for convenience, the process in which the interrupt routine R increments the count value stored in the storage area 22a is referred to as “counter increment”.

また、割り込みルーチンRは、上記の判断により、記憶領域22aに記憶されたカウント値が所定の閾値以内である場合には、CPU20に設けられたWDT20bをクリアする処理を行う。これにより、カウント値が所定の閾値以内である場合には、WDT20bは、例えば100ミリ秒毎にクリアされることになる。これに対し、記憶領域22aに記憶されたカウント値が所定の閾値よりも大きい場合には、記憶領域22bにおいてフラグがセットされているタスクに関する情報を、例えばSDRAM22に待避する。   Further, the interrupt routine R performs a process of clearing the WDT 20b provided in the CPU 20 when the count value stored in the storage area 22a is within a predetermined threshold based on the above determination. Thereby, when the count value is within a predetermined threshold, the WDT 20b is cleared, for example, every 100 milliseconds. On the other hand, when the count value stored in the storage area 22a is larger than a predetermined threshold, information related to the task for which the flag is set in the storage area 22b is saved in the SDRAM 22, for example.

いま、基地局10の電源投入等により動作が開始されたとすると、SDRAM22に記憶された制御プログラムが読み出されてCPU20で実行される。CPU20のタスク制御部20aは、CPU20の動作が開始されてから所定の時間(例えば、100ミリ秒)経過すると割り込みルーチンRを実行させる。割り込みルーチンRが実行されると、カウンタのインクリメントが行われるとともに(ステップS1)、このカウント値が閾値以内であるかが判断される(ステップS2)。   Now, assuming that the operation is started by turning on the power of the base station 10 or the like, the control program stored in the SDRAM 22 is read out and executed by the CPU 20. The task control unit 20a of the CPU 20 causes the interrupt routine R to be executed when a predetermined time (for example, 100 milliseconds) elapses after the operation of the CPU 20 is started. When the interrupt routine R is executed, the counter is incremented (step S1), and it is determined whether the count value is within a threshold value (step S2).

ここで、初期状態においては、カウンタのカウント値が「0」に設定されているため、上記ステップS2における判断処理の判断結果は「YES」となる。これにより、割り込みルーチンRからWDT20bに対してリセット信号が出力され(ステップS3)、WDT20bがクリアされる(ステップS4)。   Here, in the initial state, since the count value of the counter is set to “0”, the determination result of the determination process in step S2 is “YES”. As a result, a reset signal is output from the interrupt routine R to the WDT 20b (step S3), and the WDT 20b is cleared (step S4).

次に、タスク制御部20aがAタスクTS1の実行を開始させたとする。AタスクTS1の実行を開始させるときに、タスク制御部20aは、AタスクTS1の実行が開始された旨を示すフラグをSDRAM22の記憶領域22bに記憶することによりAタスクTS1についてのフラグ(以下、Aフラグという)をセットする(ステップS5)。   Next, it is assumed that the task control unit 20a starts executing the A task TS1. When the execution of the A task TS1 is started, the task control unit 20a stores a flag indicating that the execution of the A task TS1 has started in the storage area 22b of the SDRAM 22 so that the flag for the A task TS1 (hereinafter, referred to as the A task TS1). A flag) is set (step S5).

次いで、AタスクTS1が実行されている間に、BタスクTS2の実行開始要求があったとする。このとき、タスク制御部20aは、まずAタスクTS1を終了させるとともにAフラグをクリアする(ステップS6)。次いで、BタスクTS2の実行を開始させるとともに、BタスクTS2の実行が開始された旨を示すフラグをSDRAM22の記憶領域22bに記憶することによりBタスクTS2についてのフラグ(以下、Bフラグという)をセットする(ステップS5)。   Next, it is assumed that there is a request to start execution of the B task TS2 while the A task TS1 is being executed. At this time, the task control unit 20a first ends the A task TS1 and clears the A flag (step S6). Next, the execution of the B task TS2 is started, and a flag indicating that the execution of the B task TS2 is started is stored in the storage area 22b of the SDRAM 22 to thereby set a flag for the B task TS2 (hereinafter referred to as B flag). Set (step S5).

次に、CPU20の動作が開始されてから所定の時間(例えば、3秒)が経過すると、タスク制御部20aは、リセットタスクTS3を実行させる。このとき、タスク制御部20aは、リセットタスクTS3の実行を開始する前に、BタスクTS2を終了させるとともにBフラグをクリアする(ステップS8)。リセットタスクTS3が実行されると、カウンタとして用いられるSDRAM22の記憶領域22aに記憶された値(カウント値)をクリアする処理が行われる(ステップS9)。かかる処理により、カウンタのカウント値が「0」に設定される。尚、以下の説明では、便宜的に、リセットタスクTS3が記憶領域22aに記憶されたカウント値をクリアする処理を「カウンタのクリア」という。   Next, when a predetermined time (for example, 3 seconds) elapses after the operation of the CPU 20 is started, the task control unit 20a causes the reset task TS3 to be executed. At this time, the task control unit 20a ends the B task TS2 and clears the B flag before starting the execution of the reset task TS3 (step S8). When the reset task TS3 is executed, a process of clearing the value (count value) stored in the storage area 22a of the SDRAM 22 used as a counter is performed (step S9). With this process, the count value of the counter is set to “0”. In the following description, for the sake of convenience, the process in which the reset task TS3 clears the count value stored in the storage area 22a is referred to as “counter clear”.

リセットタスクTS3が終了した後で、AタスクTS1が実行されるとするとタスク制御部20aはAフラグをセットする(ステップS10)。以下同様に、CPU20で正常に複数のタスクが実行されている場合には、タスク制御部20bによりタスクの実行及び終了が制御されるとともに、タスクについてのフラグのセット及びクリアが行われる。また、一定の時間間隔(例えば、100ミリ秒)で割り込みルーチンRが実行されてカウンタのインクリメント及びWDT20bのクリアが行われるとともに、所定の時間間隔(例えば、3秒)でリセットタスクTS3が実行されてカウンタのクリアが行われる。   If the A task TS1 is executed after the reset task TS3 is completed, the task control unit 20a sets the A flag (step S10). Similarly, when a plurality of tasks are normally executed by the CPU 20, the task control unit 20b controls the execution and termination of the task, and sets and clears a flag for the task. In addition, the interrupt routine R is executed at a constant time interval (for example, 100 milliseconds), the counter is incremented and the WDT 20b is cleared, and the reset task TS3 is executed at a predetermined time interval (for example, 3 seconds). The counter is cleared.

いま、BタスクTS2の実行が開始されてBフラグがセットされ(ステップS11)、その後にBタスクTS2が何らかの原因で暴走した場合を考える。BタスクTS2が暴走した場合であっても、割り込みルーチンRはCPU20で実行されるタスクの優先度に拘わらず実行可能である。従って、BタスクTS2が暴走した場合であっても、一定の時間間隔でカウンタのインクリメントが行われ、カウント値が閾値以内であれば、割り込みルーチンRからWDT20bに対してリセット信号が出力され(ステップS12)、WDT20bがクリアされる(ステップS13)。   Consider the case where the execution of the B task TS2 is started, the B flag is set (step S11), and then the B task TS2 runs away for some reason. Even when the B task TS2 runs away, the interrupt routine R can be executed regardless of the priority of the task executed by the CPU 20. Therefore, even when the B task TS2 runs out of control, the counter is incremented at regular time intervals, and if the count value is within the threshold value, a reset signal is output from the interrupt routine R to the WDT 20b (step S1). S12), the WDT 20b is cleared (step S13).

これに対し、リセットタスクTS3は、BタスクTS2よりも優先度が低いため、BタスクTS2が暴走してしまうと実行不可能になる。このため、BタスクTS2が暴走している間はカウンタのクリアは行われない。この結果として、割り込みルーチンRによるカウンタのインクリメントが継続されて、カウント値は次第に増加することになる。BタスクTS2が暴走してから所定時間経過した後(詳しくは、最後にリセットタスクTS3によりカウンタのクリアが行われてから20秒程度経過した後)に、割り込みルーチンRが実行されると、カウンタのインクリメントが行われるとともに(ステップS14)、このカウント値が閾値以内であるかが判断される(ステップS15)。ここで、カウント値が閾値を超えているとステップS15の判断結果は「NO」となる。   On the other hand, the reset task TS3 has a lower priority than the B task TS2, and therefore cannot be executed if the B task TS2 runs away. For this reason, the counter is not cleared while the B task TS2 runs out of control. As a result, the increment of the counter by the interrupt routine R is continued, and the count value gradually increases. When the interrupt routine R is executed after a predetermined time has elapsed since the B task TS2 has runaway (specifically, after about 20 seconds have elapsed since the counter was last cleared by the reset task TS3), the counter Is incremented (step S14), and it is determined whether the count value is within a threshold value (step S15). If the count value exceeds the threshold value, the determination result in step S15 is “NO”.

割り込みルーチンRで行われる判断処理の判断結果が「NO」になると、割り込みルーチンRは、まずSDRAM22の記憶領域22bにおいて、セットされているフラグ(クリアされていないフラグ)を検索し、クリアされていないフラグがある場合には、このフラグについてのタスクに関する情報をSDRAM22に待避する(ステップS16)。図2に示す例では、ステップS11でBフラグがセットされており、クリアが行われていないため、BタスクTS2に関する情報がSDRAM22に待避される。   When the determination result of the determination process performed in the interrupt routine R is “NO”, the interrupt routine R first searches the storage area 22b of the SDRAM 22 for a set flag (an uncleared flag) and is cleared. If there is a non-existing flag, information regarding the task regarding this flag is saved in the SDRAM 22 (step S16). In the example shown in FIG. 2, since the B flag is set in step S <b> 11 and clearing is not performed, information regarding the B task TS <b> 2 is saved in the SDRAM 22.

また、ステップS15の判断結果が「NO」である場合には、割り込みルーチンRからWDT20bにリセット信号が送信されない。このため、WDT20bがクリアされず、WDT20bでのカウントが継続されることになる。そして、WDT20bがクリアされなくなってから所定の時間が経過すると、WDT20bはタイムアウトとなり、CPU20がリセットされる。   If the determination result in step S15 is “NO”, no reset signal is transmitted from the interrupt routine R to the WDT 20b. For this reason, the WDT 20b is not cleared and the count in the WDT 20b is continued. When a predetermined time elapses after the WDT 20b is not cleared, the WDT 20b times out and the CPU 20 is reset.

以上説明した通り、本実施形態では、割り込みルーチンRを一定の時間間隔で実行させてカウンタのインクリメントを行うとともに、割り込みルーチンRが実行される時間間隔よりも長い時間間隔でリセットタスクTS3を実行させてカウンタのクリアを行っている。ここで、割り込みルーチンRはCPU20で行われるタスクの優先度に拘わらず実行可能であるが、リセットタスクTS3はCPU20で実行されるタスクのうちの最も低い優先度に設定されているため、タスクが暴走してしまうと実行不可能になる。カウンタのカウント値が所定の閾値以内であれば、WDT20bは割り込みルーチンRによりクリアされるが、カウンタのカウント値が所定の閾値よりも大きいとWDT20bはクリアされなくなってWDT20bによりCPU20がリセットされる。以上により、図3に示す外付けWDT101が無くとも、CPU20の実行状況を監視することができ、回路の簡略化及びコスト削減を図ることができる。   As described above, in this embodiment, the interrupt routine R is executed at regular time intervals to increment the counter, and the reset task TS3 is executed at a time interval longer than the time interval at which the interrupt routine R is executed. The counter is cleared. Here, the interrupt routine R can be executed regardless of the priority of the task executed by the CPU 20, but the reset task TS3 is set to the lowest priority among the tasks executed by the CPU 20, so It becomes impossible to run if runaway. If the count value of the counter is within a predetermined threshold, the WDT 20b is cleared by the interrupt routine R. However, if the count value of the counter is larger than the predetermined threshold, the WDT 20b is not cleared and the CPU 20 is reset by the WDT 20b. As described above, even without the external WDT 101 shown in FIG. 3, the execution status of the CPU 20 can be monitored, and the circuit can be simplified and the cost can be reduced.

また、本実施形態では、リセットタスクTS3以外のタスクを実行させる場合には、実行開始時にフラグをセットし、実行終了時にセットしたフラグをクリアしている。そして、カウンタのカウント値が所定の閾値よりも大きい場合には、割り込みルーチンRによって、フラグがセットされたままである(フラグがクリアされていない)タスクに関する情報を待避している。このため、暴走等の障害が発生したタスクを容易に特定することができ、これにより、容易に障害の発生原因を追求することができる。   In the present embodiment, when a task other than the reset task TS3 is executed, a flag is set at the start of execution, and the flag set at the end of execution is cleared. When the count value of the counter is larger than a predetermined threshold value, the interrupt routine R saves information related to the task for which the flag remains set (the flag is not cleared). For this reason, it is possible to easily identify a task in which a failure such as a runaway has occurred, thereby easily pursuing the cause of the failure.

以上、本発明の一実施形態によるCPU監視システム、装置、及び方法について説明したが、本発明は上記実施形態に制限されることなく、本発明の範囲内で自由に変更が可能である。例えば、以上説明した実施形態では、SDRAM22の記憶領域22aにカウント値を記憶させ、割り込みルーチンRがカウント値をインクリメントする場合を例に挙げて説明したが、割り込みルーチンRの指示に従ってインクリメントを行うカウンタを設けた構成であっても良い。   Although the CPU monitoring system, apparatus, and method according to the embodiment of the present invention have been described above, the present invention is not limited to the above-described embodiment, and can be freely changed within the scope of the present invention. For example, in the embodiment described above, the case where the count value is stored in the storage area 22a of the SDRAM 22 and the interrupt routine R increments the count value has been described as an example, but the counter that increments according to the instruction of the interrupt routine R has been described. The structure which provided this may be sufficient.

本発明のCPU監視システムを備えるPHS基地局の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of a PHS base station provided with the CPU monitoring system of this invention. 本発明の一実施形態によるCPU監視方法を示すタイミングチャートである。6 is a timing chart illustrating a CPU monitoring method according to an embodiment of the present invention. ウォッチドッグタイマを用いた従来のCPU監視方法の一例を示すタイミングチャートである。It is a timing chart which shows an example of the conventional CPU monitoring method using a watchdog timer.

符号の説明Explanation of symbols

20 CPU
20a タスク制御部
20b ウォッチドッグタイマ
22a,22b 記憶領域
R 割り込みルーチン
TS3 リセットタスク
20 CPU
20a Task control unit 20b Watchdog timer 22a, 22b Storage area R Interrupt routine TS3 Reset task

Claims (12)

ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視システムにおいて、
カウントを行うカウント手段と、
第1の所定時間毎に、前記カウント手段にカウントさせるとともに前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込み手段と、
前記第1の所定期間よりも長い第2の所定時間毎に、前記カウント手段のカウント値をクリアするリセット手段と
を備えることを特徴とするCPU監視システム。
In a CPU monitoring system for monitoring the execution status of a CPU having a watchdog timer,
A counting means for counting,
Interrupt means for causing the counting means to count at each first predetermined time and clearing the watchdog timer when the count value of the counting means is within a predetermined value;
A CPU monitoring system comprising: a reset unit that clears a count value of the count unit every second predetermined time longer than the first predetermined period.
ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視システムにおいて、
カウントを行うカウント手段と、
前記カウント手段にカウントさせ、前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込みルーチンを第1の所定時間毎に実行させるとともに、前記カウント手段のカウント値をクリアするリセットタスクを前記第1の所定期間よりも長い第2の所定時間毎に実行させるタスク制御手段と
を備えることを特徴とするCPU監視システム。
In a CPU monitoring system for monitoring the execution status of a CPU having a watchdog timer,
A counting means for counting,
When the count value of the count means is within a predetermined value, an interrupt routine for clearing the watchdog timer is executed every first predetermined time, and the count value of the count means is set. And a task control unit that executes a reset task to be cleared every second predetermined time longer than the first predetermined period.
前記割り込みルーチンは、前記CPUで実行されるタスクの優先度に拘わらず実行可能であり、
前記リセットタスクは、前記CPUで実行されるタスクのうちで最も低い優先度が設定されている
ことを特徴とする請求項2記載のCPU監視システム。
The interrupt routine can be executed regardless of the priority of the task executed by the CPU,
The CPU monitoring system according to claim 2, wherein the reset task has a lowest priority among tasks executed by the CPU.
前記タスク制御手段は、前記リセットタスク以外のタスクを実行させる場合には、実行開始時にフラグをセットし、実行終了時にセットしたフラグをクリアする制御を行うことを特徴とする請求項2又は請求項3記載のCPU監視システム。   The said task control means performs the control which sets a flag at the time of execution start, and clears the flag set at the time of execution completion, when performing tasks other than the said reset task. 3. The CPU monitoring system according to 3. 前記割り込みルーチンは、前記カウント手段のカウント値が前記所定値よりも大である場合には、前記フラグがセットされているタスクに関する情報を待避することを特徴とする請求項4記載のCPU監視システム。   5. The CPU monitoring system according to claim 4, wherein when the count value of the counting means is larger than the predetermined value, the interrupt routine saves information on a task for which the flag is set. . ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視装置において、
カウントを行うカウント手段と、
第1の所定時間毎に、前記カウント手段にカウントさせるとともに前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込み手段と、
前記第1の所定期間よりも長い第2の所定時間毎に、前記カウント手段のカウント値をクリアするリセット手段と
を備えることを特徴とするCPU監視装置。
In a CPU monitoring device that monitors the execution status of a CPU having a watchdog timer,
A counting means for counting,
Interrupt means for causing the counting means to count at each first predetermined time and clearing the watchdog timer when the count value of the counting means is within a predetermined value;
A CPU monitoring device comprising: a reset unit that clears a count value of the count unit every second predetermined time longer than the first predetermined period.
ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視装置において、
カウントを行うカウント手段と、
前記カウント手段にカウントさせ、前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする割り込みルーチンを第1の所定時間毎に実行させるとともに、前記カウント手段のカウント値をクリアするリセットタスクを前記第1の所定期間よりも長い第2の所定時間毎に実行させるタスク制御手段と
を備えることを特徴とするCPU監視装置。
In a CPU monitoring device that monitors the execution status of a CPU having a watchdog timer,
A counting means for counting,
When the count value of the count means is within a predetermined value, an interrupt routine for clearing the watchdog timer is executed every first predetermined time, and the count value of the count means is set. A CPU monitoring device comprising: task control means for executing a reset task to be cleared every second predetermined time longer than the first predetermined period.
前記割り込みルーチンは、前記CPUで実行されるタスクの優先度に拘わらず実行可能であり、
前記リセットタスクは、前記CPUで実行されるタスクのうちで最も低い優先度が設定されている
ことを特徴とする請求項7記載のCPU監視装置。
The interrupt routine can be executed regardless of the priority of the task executed by the CPU,
The CPU monitoring device according to claim 7, wherein the reset task has a lowest priority among tasks executed by the CPU.
ウォッチドッグタイマを備えるCPUの実行状況を監視するCPU監視方法において、
第1の所定時間毎にカウント手段によりカウントを行う第1ステップと、
前記第1の所定期間よりも長い第2の所定時間毎に前記カウント手段のカウント値をクリアする第2ステップと、
前記カウント手段のカウント値が所定値以内である場合には前記ウォッチドッグタイマをクリアする第3ステップと
を含むことを特徴とするCPU監視方法。
In a CPU monitoring method for monitoring the execution status of a CPU having a watchdog timer,
A first step of counting by a counting means every first predetermined time;
A second step of clearing the count value of the counting means every second predetermined time longer than the first predetermined period;
And a third step of clearing the watchdog timer when the count value of the counting means is within a predetermined value.
前記第1ステップは、前記CPUで実行されるタスクの優先度に拘わらず実行され、
前記第2ステップは、前記CPUで実行されるタスクのうちで最も低い優先度が設定されて実行される
ことを特徴とする請求項9記載のCPU監視方法。
The first step is executed regardless of the priority of the task executed by the CPU,
The CPU monitoring method according to claim 9, wherein the second step is executed by setting a lowest priority among tasks executed by the CPU.
前記CPUでタスクを実行させるときに実行開始時にフラグをセットするステップと、
前記タスクの実行終了時にセットしたフラグをクリアするステップと
を含むことを特徴とする請求項9又は請求項10記載のCPU監視方法。
Setting a flag at the start of execution when the CPU executes a task;
The CPU monitoring method according to claim 9, further comprising: clearing a flag set at the end of execution of the task.
前記カウント手段のカウント値が前記所定値よりも大である場合には、前記フラグがセットされているタスクに関する情報を待避する第4ステップを含むことを特徴とする請求項9から請求項11の何れか一項に記載のCPU監視方法。
12. The method according to claim 9, further comprising a fourth step of saving information related to a task for which the flag is set when the count value of the counting means is larger than the predetermined value. The CPU monitoring method according to any one of the above.
JP2006086785A 2006-03-28 2006-03-28 Cpu monitoring system, device and method Pending JP2007264856A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006086785A JP2007264856A (en) 2006-03-28 2006-03-28 Cpu monitoring system, device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006086785A JP2007264856A (en) 2006-03-28 2006-03-28 Cpu monitoring system, device and method

Publications (1)

Publication Number Publication Date
JP2007264856A true JP2007264856A (en) 2007-10-11

Family

ID=38637808

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006086785A Pending JP2007264856A (en) 2006-03-28 2006-03-28 Cpu monitoring system, device and method

Country Status (1)

Country Link
JP (1) JP2007264856A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012230637A (en) * 2011-04-27 2012-11-22 Denso Corp Program group

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63280345A (en) * 1987-05-13 1988-11-17 Fujitsu Ltd Detection of program abnormality
JPH02207347A (en) * 1989-02-08 1990-08-17 Toshiba Corp Method for detecting fault of software
JPH02304640A (en) * 1989-05-19 1990-12-18 Nec Corp Memory dump collecting system
JPH07114490A (en) * 1993-10-19 1995-05-02 Matsushita Electric Ind Co Ltd Runaway monitoring device
JP2003196119A (en) * 2001-12-27 2003-07-11 Murata Mach Ltd Communication device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63280345A (en) * 1987-05-13 1988-11-17 Fujitsu Ltd Detection of program abnormality
JPH02207347A (en) * 1989-02-08 1990-08-17 Toshiba Corp Method for detecting fault of software
JPH02304640A (en) * 1989-05-19 1990-12-18 Nec Corp Memory dump collecting system
JPH07114490A (en) * 1993-10-19 1995-05-02 Matsushita Electric Ind Co Ltd Runaway monitoring device
JP2003196119A (en) * 2001-12-27 2003-07-11 Murata Mach Ltd Communication device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012230637A (en) * 2011-04-27 2012-11-22 Denso Corp Program group

Similar Documents

Publication Publication Date Title
US8032679B2 (en) Device and method for controlling network processing mode, and non-transitory computer-readable medium recording program for controlling network processing mode
JP5099090B2 (en) Multi-core system, multi-core system control method, and multi-processor
JP2007109238A (en) System and method for logging recoverable error
US9164823B2 (en) Resetting a peripheral driver and prohibiting writing into a register retaining data to be written into a peripheral on exceeding a predetermined time period
JP2009110156A (en) Log output device and log output program
JP4955585B2 (en) Computer system, information processing method and program
US9436627B2 (en) Detection of abnormal operation caused by interrupt processing
JP2007264856A (en) Cpu monitoring system, device and method
JP4675293B2 (en) Interrupt control circuit
JP2008225807A (en) Control device, and program runaway monitoring method for the same
JP2010128790A (en) Semiconductor device and its abnormality detecting method
JP2006011686A (en) Method for detecting abnormality of multi-task system
JP2010009258A (en) Fault detection device of software
JP2009151440A (en) Program hang-up detection method and computer device adopting the same method
JP6731179B2 (en) Control arithmetic unit
JP6049961B1 (en) CPU monitoring device
JP4567586B2 (en) Processing equipment
JP6004743B2 (en) COMMUNICATION DEVICE AND ITS CONTROL METHOD
JP2010258814A (en) Communication device
JP6859677B2 (en) Terminal equipment
JP2007122490A (en) Computer
CN115016977A (en) Hierarchical reset control method and system for heterogeneous multi-core power chip
JP5338356B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, POWER CONTROL METHOD, AND PROGRAM
JP2006163730A (en) Interrupt control method and controller using it
WO2017037863A1 (en) Computer device, control method, and control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080902

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100702

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101005

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110308