JP2007226527A - Controller and watchdog timer - Google Patents

Controller and watchdog timer Download PDF

Info

Publication number
JP2007226527A
JP2007226527A JP2006046691A JP2006046691A JP2007226527A JP 2007226527 A JP2007226527 A JP 2007226527A JP 2006046691 A JP2006046691 A JP 2006046691A JP 2006046691 A JP2006046691 A JP 2006046691A JP 2007226527 A JP2007226527 A JP 2007226527A
Authority
JP
Japan
Prior art keywords
timer
watchdog
control means
normal operation
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006046691A
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2006046691A priority Critical patent/JP2007226527A/en
Publication of JP2007226527A publication Critical patent/JP2007226527A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately reset a CPU even when abnormality occurs while a CPU is performing start processing. <P>SOLUTION: The watchdog timer performs timekeeping by a start processing timer separately from timekeeping by a normal operation timer. When the abnormality occurs while the CPU is performing the normal operation and, due to an occurrence of the abnormality, it is detected that the normal operation timer monitoring time has passed before a next watchdog kick signal is inputted, a reset signal is outputted to the CPU. Also, when the abnormality occurs while the CPU is performing the start processing and, due to an occurrence of the abnormality, it is detected that the start processing timer monitoring time has passed before the CPU normally completes the start processing, the reset signal is outputted to the CPU again. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、制御手段がウォッチドッグキック信号をウォッチドッグタイマに出力すると共にウォッチドッグタイマがリセット信号を当該制御手段に出力して当該制御手段をリセットさせるように構成されてなる制御装置及びウォッチドッグタイマに関する。   The present invention relates to a control device and a watchdog configured such that the control means outputs a watchdog kick signal to the watchdog timer and the watchdog timer outputs a reset signal to the control means to reset the control means. Regarding timers.

CPUが通常動作を実行しているときに異常が発生したか否かを判定する構成としては、CPUにおいて、ウォッチドッグキック信号をウォッチドッグタイマに出力し、ウォッチドッグタイマにおいて、CPUからウォッチドッグキック信号を入力した旨を検出する毎にタイマによる計時を終了・再開し、CPUから次のウォッチドッグキック信号を入力する前にタイマ監視時間が経過した(タイマがタイムアップした)旨を検出すると、CPUが通常動作を実行しているときに異常が発生したと判定し、リセット信号をCPUに出力してCPUをリセット(ハードウェアリセット)させるものが一般的である(例えば特許文献1参照)。
特開2005−151032号公報
As a configuration for determining whether or not an abnormality has occurred while the CPU is performing normal operation, the CPU outputs a watchdog kick signal to the watchdog timer. Every time it detects that a signal has been input, it stops and restarts the time counting by the timer, and when it detects that the timer monitoring time has passed before the next watchdog kick signal is input from the CPU (timer has timed up), In general, it is determined that an abnormality has occurred when the CPU is performing normal operation, and a reset signal is output to the CPU to reset the CPU (hardware reset) (see, for example, Patent Document 1).
JP 2005-151032 A

ところで、このリセット信号の出力タイミングを決定するタイマ監視時間は、CPUが通常動作を実行している状態を考慮し、図6に示すように、通常動作における1単位の処理が正常に終了すると推測される時間よりも長い時間(例えば1単位の処理が正常に終了すると推測される時間の1.5〜2倍の時間)が通常動作用タイマ監視時間として決定されるのが一般的である。一方、CPUでは、電源投入またはリセットされると、その電源投入またはリセットされてから通常動作に移行するまでに起動処理を実行するものであるが、その起動処理の時間が長いと、CPUが本来はウォッチドッグキック信号を出力する必要がない起動処理を実行しているときであってもウォッチドッグキック信号をウォッチドッグタイマに出力することになる。   By the way, the timer monitoring time for determining the output timing of the reset signal is assumed that the processing of one unit in the normal operation ends normally as shown in FIG. 6 in consideration of the state in which the CPU is executing the normal operation. In general, a longer time (for example, a time that is 1.5 to 2 times longer than a time when one unit of processing is estimated to end normally) is determined as the normal operation timer monitoring time. On the other hand, when the power is turned on or reset, the CPU executes a start-up process from when the power is turned on or reset until the normal operation is started. Outputs a watchdog kick signal to the watchdog timer even when a startup process that does not require outputting a watchdog kick signal is being executed.

しかしながら、CPUが起動処理を実行しているときにウォッチドッグキック信号をウォッチドッグタイマに出力する構成では、CPUが起動処理を実行中に異常が発生した場合であっても、CPUがウォッチドッグキック信号の出力を継続してしまうので、ウォッチドッグタイマがリセット信号をCPUに出力することが困難になり、CPUをリセットさせることが困難になる。このような問題に対しては、CPUが通常動作を実行している状態とは無関係にタイマ監視時間を決定することで解消することが可能となるが、そうすると、CPUが通常動作を実行中に異常が発生した場合に、CPUを適切にリセットさせることが困難になるという新たな問題が発生する。   However, in the configuration in which the watchdog kick signal is output to the watchdog timer when the CPU is executing the startup process, even if an abnormality occurs while the CPU is executing the startup process, the CPU Since the signal output continues, it becomes difficult for the watchdog timer to output a reset signal to the CPU, and it becomes difficult to reset the CPU. Such a problem can be solved by determining the timer monitoring time regardless of the state in which the CPU is performing the normal operation. When an abnormality occurs, a new problem arises that it is difficult to properly reset the CPU.

本発明は、上記した事情に鑑みてなされたものであり、その目的は、制御手段が通常動作を実行中に異常が発生した場合に当該制御手段を適切にリセットさせることは勿論のこと、制御手段が起動処理を実行中に異常が発生した場合にも当該制御手段を適切にリセットさせることができ、リセットの精度を高めることができる制御装置及びウォッチドッグタイマを提供することにある。   The present invention has been made in view of the above-described circumstances, and its purpose is to appropriately reset the control means when an abnormality occurs while the control means is performing normal operation. An object of the present invention is to provide a control device and a watchdog timer which can appropriately reset the control means even when an abnormality occurs while the means is executing the startup process, and can improve the reset accuracy.

請求項1に記載した制御装置によれば、制御手段は、電源投入またはリセットさせると、その電源投入またはリセットした時点から通常動作に移行するまでの起動処理を実行中では、ウォッチドッグキック信号のウォッチドッグタイマへの出力を停止し、通常動作に移行して通常動作を実行中では、ウォッチドッグキック信号をウォッチドッグタイマに出力する。ウォッチドッグタイマは、電源投入またはリセット信号を制御手段に出力した時点から起動処理用タイマによる計時を開始し、起動処理用タイマ監視時間が経過する前に制御手段が起動処理を正常に終了した旨を検出すると、制御手段が通常動作に移行するタイミングで起動処理用タイマによる計時を終了して通常動作用タイマによる計時を開始し、これ以降、制御手段が通常動作を実行中では、制御手段からウォッチドッグキック信号を入力した旨を検出する毎に通常動作用タイマによる計時を終了・再開し、制御手段から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出すると、リセット信号を制御手段に出力する。また、ウォッチドッグタイマは、制御手段が起動処理を正常に終了する前に起動処理用タイマ監視時間が経過した旨を検出すると、この場合も、リセット信号を制御手段に出力する。   According to the control device of the first aspect, when the power is turned on or reset, the control means performs a start-up process from the time when the power is turned on or reset until the transition to the normal operation. The output to the watchdog timer is stopped, and when the normal operation is executed after shifting to the normal operation, the watchdog kick signal is output to the watchdog timer. The watchdog timer starts timing by the activation process timer from the time when the power is turned on or a reset signal is output to the control means, and the control means has successfully completed the activation process before the activation process timer monitoring time elapses Is detected at the timing when the control means shifts to the normal operation, the time measurement by the start processing timer is terminated and the time measurement by the normal operation timer is started. Thereafter, the control means is executing the normal operation from the control means. Every time it is detected that the watchdog kick signal has been input, the time measurement by the normal operation timer is terminated and restarted, and the normal operation timer monitoring time has elapsed before the next watchdog kick signal is input from the control means. When detected, a reset signal is output to the control means. In addition, when the watchdog timer detects that the activation process timer monitoring time has elapsed before the control means normally ends the activation process, it outputs a reset signal to the control means.

したがって、起動処理用タイマによる計時と通常動作用タイマによる計時とを別々に行い、制御手段が通常動作を実行中に異常が発生し、その異常が発生したことに起因して制御手段から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出すると、リセット信号を制御手段に出力するように構成したので、制御手段が通常動作を実行中に異常が発生した場合であっても、制御手段を適切にリセットさせることができる。   Therefore, the time measured by the activation processing timer and the time measured by the normal operation timer are separately performed, and an abnormality occurs while the control means is executing the normal operation. When it is detected that the normal operation timer monitoring time has elapsed before the watchdog kick signal is input, the reset signal is output to the control means. Even in this case, the control means can be appropriately reset.

また、制御手段が電源投入またはリセットした時点から通常動作に移行するまでの起動処理を実行中に異常が発生し、その異常が発生したことに起因して制御手段が起動処理を正常に終了する前に起動処理用タイマ監視時間が経過した旨を検出すると、この場合も、リセット信号を制御手段に出力するように構成したので、制御手段が起動処理を実行中に異常が発生した場合であっても、制御手段を適切にリセットさせることができる。   In addition, an abnormality occurs during execution of the startup process from when the control unit is turned on or reset to the transition to normal operation, and the control unit normally ends the startup process due to the occurrence of the abnormality. In this case, since it is configured to output the reset signal to the control means when it is detected that the start processing timer monitoring time has passed before, the control means is in the case where an abnormality occurs while executing the start processing. However, the control means can be appropriately reset.

これにより、制御手段が通常動作を実行中に異常が発生した場合に制御手段を適切にリセットさせることは勿論のこと、制御手段が起動処理を実行中に異常が発生した場合にも制御手段を適切にリセットさせることができ、リセットの精度を高めることができる。   As a result, when the abnormality occurs during the normal operation of the control means, the control means is reset appropriately, as well as the control means when the abnormality occurs while the control means is executing the startup process. It is possible to appropriately reset, and the accuracy of reset can be increased.

請求項2に記載した制御装置によれば、制御手段は、起動処理を正常に終了して通常動作に移行するタイミングで、これ以降の通常動作でウォッチドッグタイマに出力するウォッチドッグキック信号と同じウォッチドッグキック信号をウォッチドッグタイマに出力し、ウォッチドッグタイマは、電源投入またはリセット信号を制御手段に出力した後で制御手段から最初のウォッチドッグキック信号を入力して制御手段が起動処理を正常に終了した旨を検出する。   According to the control device described in claim 2, the control means is the same as the watch dog kick signal output to the watch dog timer in the subsequent normal operation at the timing when the startup process is normally terminated and the normal operation is started. The watchdog kick signal is output to the watchdog timer. After the power is turned on or the reset signal is output to the control means, the control means normally inputs the first watchdog kick signal from the control means, and the control means normally starts. It detects that it was finished.

これにより、制御手段からウォッチドッグキック信号をウォッチドッグタイマに出力すると共にウォッチドッグタイマからリセット信号を制御手段に出力する構成を何ら改良することなく、制御手段が起動処理を正常に終了した旨をウォッチドッグタイマが検出することができる。   As a result, the control means has successfully completed the start-up process without any improvement in the configuration of outputting the watchdog kick signal from the control means to the watchdog timer and outputting the reset signal from the watchdog timer to the control means. A watchdog timer can detect.

請求項3に記載した制御装置によれば、制御手段は、起動処理を正常に終了して通常動作に移行するタイミングで、これ以降の通常動作でウォッチドッグタイマに出力するウォッチドッグキック信号とは異なる正常起動信号をウォッチドッグタイマに出力し、ウォッチドッグタイマは、電源投入またはリセット信号を制御手段に出力した後で制御手段から正常起動信号を入力して制御手段が起動処理を正常に終了した旨を検出する。   According to the control device of the third aspect, the control means is a timing at which the startup process is normally terminated and the normal operation is started, and the watchdog kick signal output to the watchdog timer in the normal operation thereafter A different normal start signal is output to the watchdog timer. After the power-on or reset signal is output to the control means, the watchdog timer inputs the normal start signal from the control means, and the control means ends the start processing normally. Detect the effect.

これにより、制御手段が起動処理を正常に終了して通常動作に移行するタイミングで出力する正常起動信号をウォッチドッグキック信号と区別することにより、制御手段が起動処理を正常に終了した旨をウォッチドッグタイマが確実に検出することができる。   As a result, the control means distinguishes from the watchdog kick signal the normal start signal that is output when the control means normally ends the start process and shifts to the normal operation, thereby confirming that the control means has normally ended the start process. The dog timer can be reliably detected.

請求項4に記載したウォッチドッグタイマによれば、電源投入またはリセット信号を制御手段に出力した時点から起動処理用タイマによる計時を開始し、起動処理用タイマ監視時間が経過する前に制御手段が起動処理を正常に終了すると、制御手段が通常動作に移行するタイミングで起動処理用タイマによる計時を終了して通常動作用タイマによる計時を開始し、制御手段が通常動作を実行中では、制御手段からウォッチドッグキック信号を入力した旨を検出する毎に通常動作用タイマによる計時を終了・再開し、制御手段から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出すると、リセット信号を制御手段に出力する。また、制御手段が起動処理を正常に終了する前に起動処理用タイマ監視時間が経過した旨を検出すると、この場合も、リセット信号を制御手段に出力する。   According to the watchdog timer of the fourth aspect, the clocking by the activation process timer is started from the time when the power is turned on or the reset signal is output to the control means, and the control means is activated before the activation process timer monitoring time elapses. When the startup process is completed normally, the timing by the startup process timer is terminated at the timing when the control means shifts to the normal operation, the time measurement by the normal operation timer is started, and the control means is executing the normal operation. Each time it is detected that the watchdog kick signal has been input from the timer, the clocking by the normal operation timer is stopped and restarted, and the normal operation timer monitoring time has elapsed before the next watchdog kick signal is input from the control means. Is detected, a reset signal is output to the control means. Further, when the control means detects that the start process timer monitoring time has passed before the start process is normally completed, a reset signal is also output to the control means in this case.

これにより、上記した請求項1に記載したものと同様にして、制御手段が通常動作を実行中に異常が発生した場合に制御手段を適切にリセットさせることは勿論のこと、制御手段が起動処理を実行中に異常が発生した場合にも制御手段を適切にリセットさせることができ、リセットの精度を高めることができる。   As a result, in the same manner as described in claim 1, the control means can appropriately reset the control means when an abnormality occurs while the control means is performing normal operation. Even when an abnormality occurs during execution, the control means can be appropriately reset, and the reset accuracy can be improved.

(第1の実施形態)
以下、本発明を、車載緊急通報装置に搭載される制御装置に適用した第1の実施形態について、図1ないし図3を参照して説明する。制御装置1は、図3に示すように、CPU(本発明でいう制御手段)2とウォッチドッグタイマ(WDタイマ)3とを備えて構成されている。CPU2は、ウォッチドッグキック信号(WDキック信号)をウォッチドッグタイマ3に出力可能に構成されており、ウォッチドッグタイマ3は、リセット信号をCPU2に出力してCPU2をリセット可能に構成されている。また、制御装置1は、車載緊急通報装置に搭載されることから、車載バッテリから供給される電力を動作電力として動作するように構成されている。
(First embodiment)
Hereinafter, a first embodiment in which the present invention is applied to a control device mounted on an in-vehicle emergency call device will be described with reference to FIGS. 1 to 3. As shown in FIG. 3, the control device 1 includes a CPU (control means in the present invention) 2 and a watchdog timer (WD timer) 3. The CPU 2 is configured to be able to output a watchdog kick signal (WD kick signal) to the watchdog timer 3, and the watchdog timer 3 is configured to be able to reset the CPU 2 by outputting a reset signal to the CPU 2. Moreover, since the control apparatus 1 is mounted in a vehicle-mounted emergency call apparatus, it is comprised so that the electric power supplied from a vehicle-mounted battery may operate | move as operating power.

CPU2は、電源投入またはリセットされると、その電源投入またはリセットされた時点から通常動作に移行するまでに起動処理を実行し、起動処理を正常に終了すると、起動処理から通常動作に移行し、通常動作を実行するように構成されている。ここで、起動処理とは、例えば通常動作を実行するときに使用するメモリ領域のチェックなど通常動作を実行するにあたっての準備に相当する処理であり、また、通常動作とは、例えば車載緊急通報装置の場合であればエアバッグECUからエアバッグ検出信号の入力を待機する動作などである。   When the power is turned on or reset, the CPU 2 executes a startup process from the time when the power is turned on or reset to the transition to the normal operation. When the startup process ends normally, the CPU 2 shifts from the startup process to the normal operation. It is configured to perform normal operations. Here, the startup process is a process corresponding to preparation for executing a normal operation such as a check of a memory area used when executing a normal operation, and the normal operation is, for example, an in-vehicle emergency call device. In such a case, the operation waits for the input of an airbag detection signal from the airbag ECU.

また、ウォッチドッグタイマ3は、起動処理用タイマと通常動作用タイマとの2つのタイマにより別々に計時可能に構成されている。この場合、起動処理用タイマがタイムアップするまでの起動処理用タイマ監視時間は、起動処理が正常に終了すると推測される時間よりも長い時間(例えば起動処理が正常に終了すると推測される時間の1.5〜2倍の時間)であり、通常動作用タイマ監視時間よりも長い時間である。また、通常動作用タイマがタイムアップするまでの通常動作用タイマ監視時間は、通常動作における1単位の処理が正常に終了すると推測される時間よりも長い時間(例えば1単位の処理が正常に終了すると推測される時間の1.5〜2倍の時間)である。   The watchdog timer 3 is configured to be able to measure time separately by two timers, a start processing timer and a normal operation timer. In this case, the startup process timer monitoring time until the startup process timer expires is longer than the time that the startup process is expected to end normally (for example, the time that the startup process is expected to end normally). 1.5 to 2 times longer) than the normal operation timer monitoring time. Also, the normal operation timer monitoring time until the normal operation timer expires is longer than the time that one unit of processing in normal operation is expected to end normally (for example, one unit of processing ends normally). Then, the estimated time is 1.5 to 2 times the estimated time.

次に、上記した構成の作用について、図1及び図2を参照して説明する。ここで、図1は、CPU2及びウォッチドッグタイマ3の動作をタイムチャートとして示しており、図2は、ウォッチドッグタイマ3の動作をフローチャートとして示している。
CPU2は、車載バッテリから動作電力が供給されて電源オンすると(電源投入されると)、起動処理を実行する。ウォッチドッグタイマ3は、同じく車載バッテリから動作電力が供給されて電源オンすると(電源投入されると)、起動処理用タイマによる計時を開始し(ステップS1)、CPU2からウォッチドッグキック信号を入力したか否かを監視すると共に(ステップS2)、起動処理用タイマ監視時間が経過したか否かを監視する(ステップS3)。
Next, the operation of the above configuration will be described with reference to FIG. 1 and FIG. Here, FIG. 1 shows the operations of the CPU 2 and the watchdog timer 3 as a time chart, and FIG. 2 shows the operations of the watchdog timer 3 as a flowchart.
When the operating power is supplied from the in-vehicle battery and the power is turned on (when the power is turned on), the CPU 2 executes a startup process. When the watchdog timer 3 is supplied with operating power from the on-board battery and is turned on (when the power is turned on), the watchdog timer 3 starts timing by the activation processing timer (step S1) and receives a watchdog kick signal from the CPU 2 (Step S2) and whether or not the activation processing timer monitoring time has elapsed (step S3).

ここで、CPU2は、起動処理を正常に終了すると、起動処理から通常動作に移行するタイミングでウォッチドッグキック信号をウォッチドッグタイマ3に出力するので、ウォッチドッグタイマ3は、起動処理用タイマ監視時間が経過する前にCPU2からウォッチドッグキック信号を入力した旨を検出すると(ステップS2にて「YES」)、起動処理用タイマによる計時を終了し(ステップS4)、通常動作用タイマによる計時を開始する(ステップS5)。そして、ウォッチドッグタイマ3は、CPU2から次のウォッチドッグキック信号を入力したか否かを監視すると共に(ステップS6)、通常動作用タイマ監視時間が経過したか否かを監視する(ステップS7)。   Here, when the startup process is normally completed, the CPU 2 outputs a watchdog kick signal to the watchdog timer 3 at the timing of shifting from the startup process to the normal operation. If it is detected that the watchdog kick signal has been input from the CPU 2 before the elapse of time ("YES" in step S2), the clocking by the start processing timer is terminated (step S4), and the clocking by the normal operation timer is started. (Step S5). The watchdog timer 3 monitors whether or not the next watchdog kick signal is input from the CPU 2 (step S6) and monitors whether or not the normal operation timer monitoring time has elapsed (step S7). .

さて、CPU2は、起動処理から通常動作に移行した後では、通常動作を正常に実行していると(異常が発生しなければ)、通常動作用タイマ監視時間が経過する前に次のウォッチドッグキック信号をウォッチドッグタイマ3に出力するので、ウォッチドッグタイマ3は、通常動作用タイマ監視時間が経過する前にCPUから次のウォッチドッグキック信号を入力した旨を検出すると(ステップS6にて「YES」)、通常動作用タイマによる計時を終了・再開(初期値に戻って最初から開始、いわゆるクリア)し(ステップS8)、上記したステップS6に戻り、ステップS6,S7を繰返して実行する。   Now, after the CPU 2 shifts from the startup process to the normal operation, if the normal operation is normally executed (if no abnormality occurs), the next watchdog is displayed before the normal operation timer monitoring time elapses. Since the kick signal is output to the watchdog timer 3, the watchdog timer 3 detects that the next watchdog kick signal is input from the CPU before the normal operation timer monitoring time elapses (" YES ”), the time measurement by the normal operation timer is terminated and restarted (returned to the initial value and started from the beginning, so-called clear) (step S8), the process returns to the above step S6, and steps S6 and S7 are repeated.

一方、CPU2は、通常動作を実行中に異常が発生すると、次のウォッチドッグキック信号をウォッチドッグタイマに出力することが不可能となり、ウォッチドッグタイマ3は、CPU2から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した(通常動作用タイマがタイムアップした)旨を検出すると(ステップS7にて「YES」)、リセット信号をCPU2に出力してCPU2をリセットさせる(ステップS9)。そして、ウォッチドッグタイマ3は、通常動作用タイマによる計時を終了し(ステップS10)、上記したステップS1に戻り、ステップS1以降を繰返して実行する。   On the other hand, if an abnormality occurs during the normal operation, the CPU 2 cannot output the next watchdog kick signal to the watchdog timer, and the watchdog timer 3 receives the next watchdog kick signal from the CPU 2. When it is detected that the normal operation timer monitoring time has elapsed before the input (the normal operation timer has expired) ("YES" in step S7), a reset signal is output to the CPU 2 to reset the CPU 2 ( Step S9). Then, the watchdog timer 3 finishes the time measurement by the normal operation timer (step S10), returns to the above step S1, and repeatedly executes step S1 and subsequent steps.

このような一連の処理により、CPU2が通常動作を実行中に異常が発生すると、ウォッチドッグタイマ3は、CPU2から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出し、リセット信号をCPU2に出力してCPU2をリセットさせる。   When an abnormality occurs during the normal operation of the CPU 2 by such a series of processes, the watchdog timer 3 indicates that the normal operation timer monitoring time has elapsed before the next watchdog kick signal is input from the CPU 2. And a reset signal is output to the CPU 2 to reset the CPU 2.

これに対して、CPU2は、起動処理を実行中に異常が発生して正常に終了しないと、起動処理から通常動作に移行することがなく、ウォッチドッグキック信号をウォッチドッグタイマに出力することがないので、ウォッチドッグタイマ3は、CPU2からウォッチドッグキック信号を入力する前に起動処理用タイマ監視時間が経過した(起動処理用タイマがタイムアップした)旨を検出すると(ステップS3にて「YES」)、この場合も、リセット信号をCPU2に出力してCPU2をリセットさせる(ステップS11)。そして、ウォッチドッグタイマ3は、起動処理用タイマによる計時を終了・再開(初期値に戻って最初から開始、いわゆるクリア)し(ステップS12)、上記したステップS2に戻り、ステップS2,S3を繰返して実行する。   On the other hand, the CPU 2 may output a watch dog kick signal to the watch dog timer without transitioning from the startup process to a normal operation if an abnormality occurs during the startup process and the process does not end normally. Therefore, the watchdog timer 3 detects that the activation process timer monitoring time has elapsed (the activation process timer has expired) before inputting the watchdog kick signal from the CPU 2 ("YES" in step S3). In this case as well, a reset signal is output to the CPU 2 to reset the CPU 2 (step S11). The watchdog timer 3 finishes and restarts the time counting by the activation processing timer (returns to the initial value and starts from the beginning, so-called clear) (step S12), returns to the above step S2, and repeats steps S2 and S3. And execute.

このような一連の処理により、CPU2が起動処理を実行中に異常が発生すると、ウォッチドッグタイマ3は、CPU2からウォッチドッグキック信号を入力する前に起動処理用タイマ監視時間が経過した旨を検出し、リセット信号をCPU2に出力してCPU2をリセットさせる。   By such a series of processing, when an abnormality occurs while the CPU 2 is executing the startup processing, the watchdog timer 3 detects that the startup processing timer monitoring time has elapsed before inputting the watchdog kick signal from the CPU 2. Then, a reset signal is output to the CPU 2 to reset the CPU 2.

以上に説明したように第1の実施形態によれば、ウォッチドッグタイマ3において、起動処理用タイマによる計時と通常動作用タイマによる計時とを別々に行い、CPU2が通常動作を実行中に異常が発生し、その異常が発生したことに起因してCPU2から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出すると、リセット信号をCPU2に出力し、また、CPU2が起動処理を実行中に異常が発生し、その異常が発生したことに起因してCPU2が起動処理を正常に終了する前に起動処理用タイマ監視時間が経過した旨を検出すると、この場合も、リセット信号をCPU2に出力するように構成したので、CPU2が通常動作を実行中に異常が発生した場合にCPU2を適切にリセットさせることは勿論のこと、CPU2が起動処理を実行中に異常が発生した場合にもCPU2を適切にリセットさせることができ、リセットの精度を高めることができる。   As described above, according to the first embodiment, in the watchdog timer 3, the time measurement by the activation processing timer and the time measurement by the normal operation timer are separately performed, and an abnormality occurs while the CPU 2 is executing the normal operation. When a normal operation timer monitoring time elapses before the next watchdog kick signal is input from the CPU 2 due to the occurrence of the abnormality, a reset signal is output to the CPU 2, and If an abnormality occurs while the CPU 2 is executing the startup process, and the CPU 2 detects that the startup process timer monitoring time has elapsed before the CPU 2 normally ends the startup process due to the occurrence of the abnormality, in this case However, since the reset signal is output to the CPU 2, the CPU 2 is appropriately reset when an abnormality occurs while the CPU 2 performs the normal operation. Of course the, CPU2 it is possible to appropriately reset the CPU2 even when an abnormality occurs during the startup process, it is possible to improve the accuracy of the reset.

特に、本実施形態のように車載緊急通報装置に搭載される制御装置1では、電力容量が有限である車載バッテリの電力を動作電力として動作するという事情及び通常動作に要する消費電力に比べて起動処理に要する消費電力の方が格段に大きいという事情を考慮すると、起動処理を実行中に異常が発生した場合にCPU2を適切にリセットさせることは、
制御装置1全体の低消費電力化及び車載バッテリの長寿命化という点で効果が大きい。
In particular, the control device 1 installed in the in-vehicle emergency call device as in the present embodiment is activated in comparison with the situation that the power of the in-vehicle battery having a finite power capacity operates as the operating power and the power consumption required for normal operation. Considering the fact that the power consumption required for processing is much larger, it is possible to properly reset the CPU 2 when an abnormality occurs during execution of the startup process.
The effect is great in terms of reducing the power consumption of the entire control device 1 and extending the life of the in-vehicle battery.

また、この場合は、ウォッチドッグタイマ3において、電源投入またはリセット信号をCPU2に出力した後でCPU2から最初のウォッチドッグキック信号を入力してCPU2が起動処理を正常に終了した旨を検出するように構成したので、CPU2からウォッチドッグキック信号をウォッチドッグタイマ3に出力すると共にウォッチドッグタイマ3からリセット信号をCPU2に出力する構成を何ら改良することなく、CPU2が起動処理を正常に終了した旨をウォッチドッグタイマ3が検出することができる。   In this case, the watchdog timer 3 detects that the CPU 2 has successfully completed the start-up process by inputting the first watchdog kick signal from the CPU 2 after outputting the power-on or reset signal to the CPU 2. Since the CPU 2 outputs the watch dog kick signal to the watch dog timer 3 and outputs the reset signal from the watch dog timer 3 to the CPU 2 without any improvement, the CPU 2 has successfully completed the startup process. Can be detected by the watchdog timer 3.

(第2の実施形態)
次に、本発明の第2の実施形態について、図4及び図5を参照して説明する。尚、上記した第1の実施形態と同一部分については説明を省略し、異なる部分について説明する。
上記した第1の実施形態は、CPU2において、起動処理を正常に終了すると、起動処理から通常動作に移行するタイミングでウォッチドッグキック信号をウォッチドッグタイマに出力する構成であるが、この第2の実施形態では、CPU12において、起動処理を正常に終了すると、起動処理から通常動作に移行するタイミングでウォッチドッグキック信号とは異なる正常起動信号をウォッチドッグタイマ13に出力する構成である。
(Second Embodiment)
Next, a second embodiment of the present invention will be described with reference to FIGS. In addition, description is abbreviate | omitted about the same part as above-mentioned 1st Embodiment, and a different part is demonstrated.
In the first embodiment described above, the CPU 2 is configured to output a watchdog kick signal to the watchdog timer at the timing of transition from the startup process to the normal operation when the startup process ends normally. In the embodiment, the CPU 12 outputs a normal activation signal, which is different from the watchdog kick signal, to the watchdog timer 13 when the activation process is normally terminated in the CPU 12 at a timing when the activation process shifts to the normal operation.

すなわち、制御装置11において、CPU12は、ウォッチドッグキック信号及び正常起動信号をウォッチドッグタイマ13に出力可能に構成されており、ウォッチドッグタイマ13は、リセット信号をCPU12に出力してCPU12をリセット可能に構成されている。この場合、CPU12は、起動処理を正常に終了すると、起動処理から通常動作に移行するタイミングで正常起動信号をウォッチドッグタイマ13に出力し、ウォッチドッグタイマ13は、起動処理用タイマ監視時間が経過する前にCPU12から正常起動信号を入力した旨を検出すると、起動処理用タイマによる計時を終了し、通常動作用タイマによる計時を開始する。   That is, in the control device 11, the CPU 12 is configured to be able to output a watchdog kick signal and a normal activation signal to the watchdog timer 13, and the watchdog timer 13 can reset the CPU 12 by outputting a reset signal to the CPU 12. It is configured. In this case, when the startup process ends normally, the CPU 12 outputs a normal startup signal to the watchdog timer 13 at the timing when the startup process shifts to the normal operation, and the watchdog timer 13 passes the startup process timer monitoring time. If it is detected that a normal activation signal has been input from the CPU 12 before the start, the timing by the activation processing timer is terminated and the timing by the normal operation timer is started.

以上に説明したように第2の実施形態によれば、ウォッチドッグタイマ13において、電源投入またはリセット信号をCPU12に出力した後でCPU12からウォッチドッグキック信号とは異なる正常起動信号を入力してCPU12が起動処理を正常に終了した旨を検出するように構成したので、CPU12が起動処理を正常に終了して通常動作に移行するタイミングで出力する正常起動信号をウォッチドッグキック信号と区別することにより、CPU12が起動処理を正常に終了した旨を確実に検出することができる。   As described above, according to the second embodiment, in the watchdog timer 13, after a power-on or reset signal is output to the CPU 12, a normal start signal different from the watchdog kick signal is input from the CPU 12. Since the CPU 12 is configured to detect that the startup process has been completed normally, by distinguishing the normal startup signal output at the timing when the CPU 12 ends the startup process normally and shifts to the normal operation from the watchdog kick signal, The CPU 12 can reliably detect that the startup process has been completed normally.

(その他の実施形態)
本発明は、上記した実施形態にのみ限定されるものではなく、以下のように変形または拡張することができる。
車載緊急通報装置に搭載される制御装置に適用する構成に限らず、例えば車載ナビゲーション装置や車載ハンズフリー装置などの他の車載装置に搭載される制御装置に適用する構成であっても良いし、車載装置以外の装置(例えば携帯電話機や通信機器など)に搭載される制御装置に適用する構成であっても良い。
ウォッチドッグタイマがCPUに内蔵されている構成に適用しても良い。
(Other embodiments)
The present invention is not limited to the above-described embodiment, and can be modified or expanded as follows.
The configuration is not limited to the configuration applied to the control device mounted on the in-vehicle emergency call device, but may be configured to be applied to a control device mounted in another in-vehicle device such as an in-vehicle navigation device or an in-vehicle hands-free device, The configuration may be applied to a control device mounted on a device other than the in-vehicle device (for example, a mobile phone or a communication device).
You may apply to the structure by which the watchdog timer is incorporated in CPU.

本発明の第1の実施形態を示すもので、CPUの動作及びウォッチドッグタイマの動作を示すタイムチャートThe time chart which shows the 1st Embodiment of this invention and shows operation | movement of CPU and operation | movement of a watchdog timer ウォッチドッグタイマの動作を示すフローチャートFlow chart showing operation of watchdog timer 機能ブロック図Functional block diagram 本発明の第2の実施形態を示すもので、CPUの動作及びウォッチドッグタイマの動作を示すタイムチャートThe time chart which shows the 2nd Embodiment of this invention and shows operation | movement of CPU and operation | movement of a watchdog timer. 図3相当図3 equivalent figure 従来を示すもので、CPUの動作及びウォッチドッグタイマの動作を示すタイムチャートTime chart showing the operation of the CPU and the watchdog timer

符号の説明Explanation of symbols

図面中、1は制御装置、2はCPU(制御手段)、3はウォッチドッグタイマ、11は制御装置、12はCPU(制御手段)、13はウォッチドッグタイマである。   In the drawings, 1 is a control device, 2 is a CPU (control means), 3 is a watchdog timer, 11 is a control device, 12 is a CPU (control means), and 13 is a watchdog timer.

Claims (4)

ウォッチドッグキック信号をウォッチドッグタイマに出力可能な制御手段と、リセット信号を前記制御手段に出力して当該制御手段をリセットさせることが可能なウォッチドッグタイマとを備えた制御装置であって、
前記制御手段は、電源投入またはリセットされてから通常動作に移行するまでの起動処理を実行中ではウォッチドッグキック信号の前記ウォッチドッグタイマへの出力を停止すると共に通常動作を実行中ではウォッチドッグキック信号を当該ウォッチドッグタイマに出力し、
前記ウォッチドッグタイマは、電源投入またはリセット信号を前記制御手段に出力した時点から起動処理用タイマによる計時を開始し、起動処理用タイマ監視時間が経過する前に当該制御手段が起動処理を正常に終了した旨を検出した場合には、当該制御手段が通常動作に移行するタイミングで起動処理用タイマによる計時を終了して通常動作用タイマによる計時を開始し、当該制御手段が通常動作を実行中に当該制御手段からウォッチドッグキック信号を入力した旨を検出する毎に通常動作用タイマによる計時を終了・再開し、当該制御手段から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出した場合にリセット信号を当該制御手段に出力すると共に、当該制御手段が起動処理を正常に終了する前に起動処理用タイマ監視時間が経過した旨を検出した場合にも、リセット信号を当該制御手段に出力することを特徴とする制御装置。
A control device comprising: control means capable of outputting a watchdog kick signal to a watchdog timer; and a watchdog timer capable of resetting the control means by outputting a reset signal to the control means,
The control means stops the output of the watchdog kick signal to the watchdog timer during execution of the start-up process from power-on or reset to transition to normal operation, and watchdog kick during normal operation. Signal to the watchdog timer
The watchdog timer starts timing by the activation process timer from the time when the power is turned on or the reset signal is output to the control means, and the control means normally starts the activation process before the activation process timer monitoring time elapses. When it is detected that the control unit has finished, the time measured by the activation processing timer is terminated at the timing when the control unit shifts to the normal operation, the time measurement by the normal operation timer is started, and the control unit is executing the normal operation. Each time it is detected that a watchdog kick signal has been input from the control means, the time measurement by the normal operation timer is ended and restarted, and the normal operation timer is monitored before the next watchdog kick signal is input from the control means. When it is detected that the time has elapsed, a reset signal is output to the control means, and the control means ends the startup process normally. Even when detecting that has elapsed starting process timer monitoring time ago, control unit and outputs a reset signal to the control unit.
請求項1に記載した制御装置において、
前記制御手段は、起動処理を正常に終了して通常動作に移行するタイミングで、これ以降の通常動作で前記ウォッチドッグタイマに出力するウォッチドッグキック信号と同じウォッチドッグキック信号を当該ウォッチドッグタイマに出力し、
前記ウォッチドッグタイマは、電源投入またはリセット信号を前記制御手段に出力した後で当該制御手段から最初のウォッチドッグキック信号を入力して当該制御手段が起動処理を正常に終了した旨を検出することを特徴とする制御装置。
The control device according to claim 1,
The control means sends the same watchdog kick signal as the watchdog kick signal output to the watchdog timer in the normal operation thereafter to the watchdog timer at a timing at which the startup process is normally terminated and the normal operation is started. Output,
The watchdog timer detects that the control means has successfully completed the start-up process by inputting a first watchdog kick signal from the control means after outputting a power-on or reset signal to the control means. A control device characterized by.
請求項1に記載した制御装置において、
前記制御手段は、起動処理を正常に終了して通常動作に移行するタイミングで、これ以降の通常動作で前記ウォッチドッグタイマに出力するウォッチドッグキック信号とは異なる正常起動信号を当該ウォッチドッグタイマに出力し、
前記ウォッチドッグタイマは、電源投入またはリセット信号を前記制御手段に出力した後で当該制御手段から正常起動信号を入力して当該制御手段が起動処理を正常に終了した旨を検出することを特徴とする制御装置。
The control device according to claim 1,
The control means sends a normal start signal to the watchdog timer that is different from the watchdog kick signal that is output to the watchdog timer in the subsequent normal operation at the timing when the start process ends normally and shifts to the normal operation. Output,
The watchdog timer is characterized in that after a power-on or reset signal is output to the control means, a normal activation signal is input from the control means to detect that the control means has successfully completed the activation process. Control device.
電源投入またはリセットされてから通常動作に移行するまでの起動処理を実行中ではウォッチドッグキック信号の出力を停止すると共に通常動作を実行中ではウォッチドッグキック信号を出力するように構成されてなる制御手段と共に制御装置を構成するウォッチドッグタイマであって、
電源投入またはリセット信号を前記制御手段に出力した時点から起動処理用タイマによる計時を開始し、起動処理用タイマ監視時間が経過する前に当該制御手段が起動処理を正常に終了した旨を検出した場合には、当該制御手段が通常動作に移行するタイミングで起動処理用タイマによる計時を終了して通常動作用タイマによる計時を開始し、当該制御手段が通常動作を実行中に当該制御手段からウォッチドッグキック信号を入力した旨を検出する毎に通常動作用タイマによる計時を終了・再開し、当該制御手段から次のウォッチドッグキック信号を入力する前に通常動作用タイマ監視時間が経過した旨を検出した場合にリセット信号を当該制御手段に出力すると共に、当該制御手段が起動処理を正常に終了する前に起動処理用タイマ監視時間が経過した旨を検出した場合にも、リセット信号を当該制御手段に出力することを特徴とするウォッチドッグタイマ。
Control that is configured to stop the output of the watchdog kick signal during execution of the startup process from when the power is turned on or reset to transition to normal operation, and to output the watchdog kick signal during execution of normal operation A watchdog timer constituting a control device together with means,
The timing by the activation process timer is started from the time when the power is turned on or the reset signal is output to the control means, and it is detected that the activation means has successfully completed the activation process before the activation process timer monitoring time elapses. In such a case, the timing by the activation processing timer is terminated at the timing when the control means shifts to the normal operation, and the time measurement by the normal operation timer is started. Every time it is detected that a dog kick signal has been input, the normal operation timer is stopped and restarted, and the normal operation timer monitoring time has elapsed before the next watch dog kick signal is input from the control means. When detected, a reset signal is output to the control means, and the start-up process timer is monitored before the control means ends the start-up process normally. Even if but it is detected that the elapsed, the watchdog timer and outputs a reset signal to the control unit.
JP2006046691A 2006-02-23 2006-02-23 Controller and watchdog timer Pending JP2007226527A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006046691A JP2007226527A (en) 2006-02-23 2006-02-23 Controller and watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006046691A JP2007226527A (en) 2006-02-23 2006-02-23 Controller and watchdog timer

Publications (1)

Publication Number Publication Date
JP2007226527A true JP2007226527A (en) 2007-09-06

Family

ID=38548292

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006046691A Pending JP2007226527A (en) 2006-02-23 2006-02-23 Controller and watchdog timer

Country Status (1)

Country Link
JP (1) JP2007226527A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8776071B2 (en) 2010-10-15 2014-07-08 Kabushiki Kaisha Toshiba Microprocessor operation monitoring system
WO2016194170A1 (en) * 2015-06-03 2016-12-08 株式会社日立製作所 Error detection device and error detection system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189615A (en) * 2000-12-22 2002-07-05 Canon Inc Watchdog timer, information processor, expansion board for watchdog timer, system initializing method, and storage medium
JP2005122424A (en) * 2003-10-16 2005-05-12 Canon Inc Watchdog timer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002189615A (en) * 2000-12-22 2002-07-05 Canon Inc Watchdog timer, information processor, expansion board for watchdog timer, system initializing method, and storage medium
JP2005122424A (en) * 2003-10-16 2005-05-12 Canon Inc Watchdog timer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8776071B2 (en) 2010-10-15 2014-07-08 Kabushiki Kaisha Toshiba Microprocessor operation monitoring system
WO2016194170A1 (en) * 2015-06-03 2016-12-08 株式会社日立製作所 Error detection device and error detection system

Similar Documents

Publication Publication Date Title
JP5244981B2 (en) Microcomputer and operation method thereof
JP4665846B2 (en) Microcomputer and electronic control device
JP2007334587A (en) Abnormality monitoring program, recording medium and electronic apparatus
JP2019057187A (en) On-vehicle electronic control unit and abnormality time treatment method for the same
JP5962697B2 (en) Electronic control unit
JP5555472B2 (en) Electronic control system for vehicles
JP2007226527A (en) Controller and watchdog timer
JP2008225807A (en) Control device, and program runaway monitoring method for the same
JP5796452B2 (en) Electronic control unit
JP5928358B2 (en) Information processing device, monitoring device, control device
JP2011123569A (en) Processor
JP6172040B2 (en) Electronic control unit
JP2016126692A (en) Electronic control device
JP2002041493A (en) Microcomputer
JP2008287643A (en) Monitoring device for electronic control unit
JP6140111B2 (en) Numerical control device with automatic setting restoration function and erroneous setting prevention function
JP2015112962A (en) Information processing apparatus
JP5392058B2 (en) Processing apparatus and control method
JP2005293164A (en) Task monitoring system
JP2009087133A (en) Image processing apparatus and memory diagnostic program
JP2007102511A (en) Information processor
JP2012069063A (en) P-run signal output device and incorporated control device
JP5906807B2 (en) Arithmetic processing device and stall monitoring method
JP2019012340A (en) Drive cycle control device
JP5985416B2 (en) Electronic control unit for automobile

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080407

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100720

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101207