JP2012230637A - Program group - Google Patents

Program group Download PDF

Info

Publication number
JP2012230637A
JP2012230637A JP2011099921A JP2011099921A JP2012230637A JP 2012230637 A JP2012230637 A JP 2012230637A JP 2011099921 A JP2011099921 A JP 2011099921A JP 2011099921 A JP2011099921 A JP 2011099921A JP 2012230637 A JP2012230637 A JP 2012230637A
Authority
JP
Japan
Prior art keywords
signal
program
monitoring
time
boot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011099921A
Other languages
Japanese (ja)
Other versions
JP5533777B2 (en
Inventor
Ryoma Niihara
竜馬 新原
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 JP2011099921A priority Critical patent/JP5533777B2/en
Publication of JP2012230637A publication Critical patent/JP2012230637A/en
Application granted granted Critical
Publication of JP5533777B2 publication Critical patent/JP5533777B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To reliably supply a defined watchdog signal when switching from a boot program to a basic program takes place.SOLUTION: While boot processing is being executed, the signal level of a WD signal is reversed each time a WD count value reaches a WD threshold THw1 (i.e. a WD period elapses), and while normal processing is being executed, the signal level of the WD signal is reversed each time the WD count value reaches a WD threshold THw2 (i.e. the WD period elapses). At the timing of switching from boot processing to normal processing, the initial value of the WD count value is set to such a value that reaches the WD threshold THw2 when an initial offset time elapses, on the basis of inherited information.

Description

本発明は、ウォッチドッグ機能での監視対象となる制御装置にて実行されるプログラム群に関する。   The present invention relates to a program group executed by a control device to be monitored by a watchdog function.

従来、プログラムの暴走等を監視する技術として、ウォッチドッグタイマ(WDT)が知られている(例えば、特許文献1参照。)。
ウォッチドッグタイマは、一定時間(上限許容時間)が経過するとタイムアップするように構成されたタイマであり、監視対象となる制御装置からのウォッチドッグ(WD)信号によってタイマがリセットされ、ウォッチドッグ信号が途絶えてタイマがタイムアップすると、外部にその旨を出力する。
Conventionally, a watchdog timer (WDT) is known as a technique for monitoring program runaway (see, for example, Patent Document 1).
The watchdog timer is configured to be timed up when a certain time (upper limit allowable time) elapses. The timer is reset by a watchdog (WD) signal from a control device to be monitored, and the watchdog signal When the timer stops and the timer expires, a message to that effect is output to the outside.

また、近年、マイクロコンピュータに搭載するソフトウェアとして、各種アプリケーションプログラムと、そのアプリケーションプログラムの実行を制御する基本プログラム(OS等)とを分離した構造を有するものが知られている。   In recent years, software having a structure in which various application programs and a basic program (such as an OS) that controls execution of the application programs are separated is known as software installed in a microcomputer.

例えば、車載プログラムの分野では、自動車のソフトウェアを部品化して共通化するために、AUTOSAR(AUTomotive Open System ARchitecture )によってAUTOSARソフトウェアプラットフォームが提案されている。   For example, in the field of in-vehicle programs, an AUTOSAR software platform has been proposed by AUTOSAR (AUTomotive Open System ARchitecture) in order to standardize automobile software as parts.

このAUTOSARソフトウェアプラットフォームでは、ハードウェアに依存しないアプリケーションプログラム(AUTOSAR Software)は、アプリケーションプログラムに対して各種機能(OS,通信,メモリ管理,診断,ECU状態管理等)を提供するBSW(Basic Software )上で動作するように構成されている。このようなシステムにおいて、WD信号を出力する処理は、通常、基本プログラム(BSW等)の一機能として実現される。   In this AUTOSAR software platform, a hardware-independent application program (AUTOSAR Software) is provided on BSW (Basic Software) which provides various functions (OS, communication, memory management, diagnosis, ECU state management, etc.) to the application program. It is configured to work with. In such a system, the process of outputting a WD signal is usually realized as a function of a basic program (BSW or the like).

特開平4−190433号公報JP-A-4-190433

ところで、このような基本プログラム上でアプリケーションプログラムが動作するシステムでは、基本プログラムを起動する前に、基本プログラムを前提とすることなく動作し、ハードウェアの初期化やBSWの起動等を実行するブートプログラムを動作させる必要がある。   By the way, in a system in which an application program operates on such a basic program, before starting the basic program, the system operates without assuming the basic program, and boots that execute hardware initialization, BSW startup, and the like. You need to run the program.

そして、ブートプログラムの実行時間が、ウォッチドッグタイマの上限許容時間を超えるような場合は、ブートプログラムにおいても、WD信号を出力する処理を実行する必要がある。   If the execution time of the boot program exceeds the upper limit allowable time of the watchdog timer, it is necessary to execute processing for outputting the WD signal also in the boot program.

しかし、ブートプログラムが提供するWD処理は、基本プログラムが提供するWD処理から独立したものとなるため、ブートプログラムから基本プログラムに切り替わる時に、監視装置に対して、継続的なWD信号を送出することができないという問題があった。   However, since the WD process provided by the boot program is independent of the WD process provided by the basic program, a continuous WD signal is sent to the monitoring device when switching from the boot program to the basic program. There was a problem that could not.

特に、WD信号の送出間隔について下限許容時間が規定されている場合には、下限許容時間以下の間隔でWD信号を送出すると、そのWD信号が無視されることによって、上限許容時間内の間隔でWD信号を送出しているにも拘わらず、ウォッチドッグタイマがタイムアウトしてしまう可能性があった。   In particular, when the lower limit allowable time is defined for the transmission interval of the WD signal, if the WD signal is transmitted at an interval equal to or lower than the lower limit allowable time, the WD signal is ignored, and the interval is within the upper allowable time. There is a possibility that the watchdog timer may time out despite sending the WD signal.

なお、特許文献1に記載の従来装置は、基本プログラムの存在を想定していないため、その技術を適用しても、上述の問題を解決することはできなかった。
本発明は、上記問題点を解決するために、ブートプログラムから基本プログラムに切り替わる時にも、規定されたウォッチドッグ信号を確実に供給できるようにすることを目的とする。
In addition, since the conventional apparatus described in Patent Document 1 does not assume the existence of a basic program, even if the technique is applied, the above-described problem cannot be solved.
In order to solve the above problems, an object of the present invention is to ensure that a specified watchdog signal can be supplied even when a boot program is switched to a basic program.

上記目的を達成するためになされた本発明は、予め設定された監視許容期間内の間隔で入力されるウォッチドッグ信号が途切れた場合に異常検出信号を出力する装置を監視装置、この監視装置に対してウォッチドッグ信号を出力することで監視装置の監視対象となる装置を制御装置として、この制御装置にて実行されるプログラム群に関するものである。   In order to achieve the above object, the present invention provides a monitoring device that outputs an abnormality detection signal when a watchdog signal input at an interval within a preset allowable monitoring period is interrupted. On the other hand, the present invention relates to a program group executed by the control device, with a device to be monitored by the monitoring device as a control device by outputting a watchdog signal.

本発明のプログラム群は、各種アプリケーションプログラムの実行を制御する機能を少なくとも有する基本プログラムと、制御装置の起動時に、基本プログラムを起動する処理を実行するブートプログラムとからなり、いずれも、監視許容期間内の間隔でウォッチドッグ信号を送信する処理を少なくとも実行する。   The program group of the present invention includes a basic program having at least a function for controlling the execution of various application programs, and a boot program for executing a process for starting the basic program when the control device is started. At least a process of transmitting a watchdog signal at an interval of is performed.

そして、基本プログラムは、起動時に、少なくともウォッチドッグ信号の次回の送信タイミングに関わるタイミング情報をブートプログラムから引き継ぐように構成されている。   The basic program is configured to take over at least timing information related to the next transmission timing of the watchdog signal from the boot program at the time of activation.

このように構成された本発明のプログラム群によれば、基本プログラムは、ブートプログラムから引き継いだタイミング情報に基づいて、最初に出力するウォッチドッグ信号の出力タイミング決定することにより、ブートプログラムの処理によって最後に出力されたウォッチドッグ信号から、監視許容期間内の間隔で、ウォッチドッグ信号を出力することができる。   According to the program group of the present invention configured as described above, the basic program determines the output timing of the watchdog signal to be output first based on the timing information inherited from the boot program. The watchdog signal can be output at intervals within the monitoring allowable period from the watchdog signal output last.

なお、タイミング情報は、具体的には、ウォッチドッグ信号を最後に送信してからの経過時間を表す情報であってもよいし、次回送信するまでの残り時間を表す情報であってもよい。   Note that the timing information may specifically be information representing an elapsed time since the last transmission of the watchdog signal, or information representing a remaining time until the next transmission.

また、基本プログラムは、任意の監視許容期間に対応可能であるように構成されている場合、ブートプログラムから基本プログラムに引き継ぐ情報には、監視許容期間を特定する情報が含まれていてもよい。   In addition, when the basic program is configured so as to be able to cope with an arbitrary monitoring allowable period, the information handed over from the boot program to the basic program may include information for specifying the monitoring allowable period.

更に、監視装置が、ウォッチドッグ信号の信号レベルが監視許容期間以上継続して同一レベルである場合に、ウォッチドッグ信号が途切れたものと判断するように構成されている場合、ブートプログラムが基本プログラムに引き継ぐ情報には、ウォッチドッグ信号の信号レベルを表す情報が含まれていてもよい。   Further, when the monitoring device is configured to determine that the watchdog signal is interrupted when the signal level of the watchdog signal is the same level continuously for the monitoring allowable period or longer, the boot program is a basic program. The information to be taken over may include information indicating the signal level of the watchdog signal.

車載制御装置の主要部の構成を示すブロック図。The block diagram which shows the structure of the principal part of a vehicle-mounted control apparatus. ダウンカウンタのカウント値と各種パラメータとの関係を示す説明図。Explanatory drawing which shows the relationship between the count value of a down counter, and various parameters. RAMに確保される領域の内容を示す説明図。Explanatory drawing which shows the content of the area | region ensured in RAM. ウォッチドッグ処理の内容を示すフローチャート。The flowchart which shows the content of the watchdog process. ブート処理の内容を示すフローチャート。The flowchart which shows the content of a boot process. ブート処理から通常処理への切替時におけるWD信号およびタイマ割込の状態を示す説明図。Explanatory drawing which shows the state of the WD signal and timer interruption at the time of the switch from a boot process to a normal process. ブート処理から通常処理への切替時におけるWDカウント値の変化を示す説明図。Explanatory drawing which shows the change of the WD count value at the time of switching from a boot process to a normal process. 変形例におけるブート処理から通常処理への切替タイミングとWD信号の波形との関係を示す説明図。Explanatory drawing which shows the relationship between the switching timing from the boot process in a modification to a normal process, and the waveform of a WD signal. 変形例におけるブート処理の内容を示すフローチャート。The flowchart which shows the content of the boot process in a modification.

以下に本発明の実施形態を図面と共に説明する。
<全体構成>
図1は、本発明が適用された車載制御装置1の主要部の構成を示すブロック図である。
Embodiments of the present invention will be described below with reference to the drawings.
<Overall configuration>
FIG. 1 is a block diagram showing a configuration of a main part of an in-vehicle control device 1 to which the present invention is applied.

図1に示すように、車載制御装置1は、当該装置に割り当てられた各種処理を実行する制御部3と、制御部3から供給されるウォッチドッグ信号(以下「WD信号」という)に基づいて制御部3の動作状態を監視する監視部5とを備えている。   As shown in FIG. 1, the in-vehicle control device 1 is based on a control unit 3 that executes various processes assigned to the device and a watchdog signal (hereinafter referred to as “WD signal”) supplied from the control unit 3. And a monitoring unit 5 that monitors the operation state of the control unit 3.

<監視部>
監視部5は、自走するダウンカウンタで構成されたウォッチドッグタイマからなる。
ここで、図2は、ダウンカウンタのカウント値と、各種パラメータとの関係を示す説明図である。以下、図2を参照して、監視部5の動作を説明する。
<Monitoring unit>
The monitoring unit 5 is composed of a watchdog timer composed of a self-running down counter.
Here, FIG. 2 is an explanatory diagram showing the relationship between the count value of the down counter and various parameters. Hereinafter, the operation of the monitoring unit 5 will be described with reference to FIG.

監視部5(ウォッチドッグタイマ)にWD信号が入力されると、ダウンカウンタのカウント値が、予め設定された上限許容時間Tuに対応する値M(M=Tu/Tcy,Tcyはダウンカウンタのクロック周期)にプリセットされると共に、ダウンカウンタのカウント値がゼロになると、即ち、ウォッチドッグタイマがタイムアウトすると、異常検出信号(警告通知)を出力するように構成された周知のものである。   When a WD signal is input to the monitoring unit 5 (watchdog timer), the count value of the down counter is a value M (M = Tu / Tcy, Tcy corresponding to the preset upper limit allowable time Tu). In addition, when the count value of the down counter becomes zero, that is, when the watchdog timer times out, the abnormality detection signal (warning notification) is output.

但し、本実施形態では、予め設定された下限許容時間Tl(<Tu)より短い間隔で入力されたWD信号を無視する、即ち、そのWD信号によるカウント値のプリセットを禁止するように構成されている。   However, in the present embodiment, the WD signal input at an interval shorter than the preset lower limit allowable time Tl (<Tu) is ignored, that is, the presetting of the count value by the WD signal is prohibited. Yes.

つまり、下限許容時間Tlから上限許容時間Tuまでの期間を監視許容期間として、WD信号の入力間隔が監視許容期間内である場合だけ、ダウンカウンタはプリセットされる。   In other words, the down counter is preset only when the interval from the lower limit allowable time Tl to the upper limit allowable time Tu is the monitoring allowable period and the input interval of the WD signal is within the monitoring allowable period.

また、下限許容時間Tlと上限許容時間Tuとの中間値が、制御部3から送出されるWD信号の送出間隔を規定するWD周期Tw(=(Tl+Tu)/2)となるように設定されている。   Further, an intermediate value between the lower limit allowable time Tl and the upper limit allowable time Tu is set to be a WD cycle Tw (= (Tl + Tu) / 2) that defines a transmission interval of the WD signal transmitted from the control unit 3. Yes.

<制御部>
次に、制御部3は、CPU,ROM,RAMを中心に構成された周知のマイクロコンピュータからなり、CPUに対するタイマ割込を発生させるための割込用タイマを少なくとも備えている。
<Control unit>
Next, the control unit 3 includes a known microcomputer mainly composed of a CPU, a ROM, and a RAM, and includes at least an interrupt timer for generating a timer interrupt for the CPU.

また、制御部3において実行されるソフトウェアは、図1に示すように、AUTOSAR(AUTomotive Open System ARchitecture )ソフトウェアプラットフォームとして標準化された、BSW(Basic Software ),RTE(Run Time Environment)上で各種アプリケーションプログラム(AUTOSAR Software)を動作させるように構成されている。   As shown in FIG. 1, the software executed in the control unit 3 includes various application programs on BSW (Basic Software) and RTE (Run Time Environment) standardized as an AUTOSAR (AUTomotive Open System ARchitecture) software platform. (AUTOSAR Software) is configured to operate.

また、制御部3の起動時(車載制御装置1への電源投入時)には、ハードウェアの初期化等を行うブートプログラムが起動し、このブートプログラムによってBSWを起動するように構成されている。   Further, when the control unit 3 is activated (when the power to the vehicle-mounted control device 1 is turned on), a boot program for initializing hardware is activated, and the BSW is activated by this boot program. .

なお、RAMには、図3に示すように、ブートプログラムからBSWに引き継ぐ引継情報を格納する領域(以下「引継情報格納領域」という)、およびWD信号送信用のカウント値(以下「WDカウント値」という)を格納する領域(以下「WDカウント値格納領域」という)が少なくとも確保される。更に、引継情報格納領域には、WD信号の送信周期を指定するWD周期、WD信号の信号レベルの初期値を指定する初期信号レベル、初回のWD信号を送信するタイミングを指定する初期オフセット時間を格納する領域が少なくとも存在する。   As shown in FIG. 3, the RAM stores an area for storing takeover information transferred from the boot program to the BSW (hereinafter referred to as “takeover information storage area”), and a count value for transmitting a WD signal (hereinafter referred to as “WD count value”). ”) Is stored at least (hereinafter referred to as“ WD count value storage area ”). Further, the takeover information storage area includes a WD cycle for specifying the transmission cycle of the WD signal, an initial signal level for specifying the initial value of the signal level of the WD signal, and an initial offset time for specifying the timing for transmitting the first WD signal. There is at least an area to store.

<WD処理>
ここでタイマ割込によって起動するWD処理の内容を、図4に示すフローチャートに沿って説明する。以下では、タイマ割込の割込周期をTpで表す。但し、ブートプログラムによって設定されるタイマ割込と、BSWによって設定されるタイマ割込とでは、割込周期Tpが異なっていてもよい。また、WD処理を起動するためのタイマ割込を発生させる割込用タイマは、ブートプログラムの時とBSWの時とで異なっていてもよい。
<WD processing>
Here, the contents of the WD process activated by the timer interruption will be described with reference to the flowchart shown in FIG. Hereinafter, the interrupt period of the timer interrupt is represented by Tp. However, the interrupt cycle Tp may be different between the timer interrupt set by the boot program and the timer interrupt set by the BSW. Further, the interrupt timer for generating a timer interrupt for starting the WD process may be different between the boot program and the BSW.

本処理が起動すると、まず、S110では、WDカウント値をインクリメントし、続くS120では、WDカウント値が、WD周期Twに対応した閾値(WD閾値)THw(=Tw/Tp)より大きいか否かを判断し、WDカウント値がWD閾値THw以下であれば、そのまま本処理を終了する。   When this processing starts, first, in S110, the WD count value is incremented, and in subsequent S120, whether or not the WD count value is greater than a threshold (WD threshold) THw (= Tw / Tp) corresponding to the WD cycle Tw. If the WD count value is equal to or less than the WD threshold value THw, the present process is terminated.

一方、WDカウント値が閾値より大きければ、S130にてエラーチェックを実行する。
このエラーチェックでは、具体的には、記憶装置(ROMやRAM)の異常(記憶装置に保存する情報を異常確認のために冗長化していて、その整合が取れない場合等)、CPUの異常(未定義命令によるCPU暴走等)、負荷の異常(CPUの処理負荷を計測できる機構を持ち、負荷が想定を超えている場合等)、シーケンス異常(正常動作とは異なる処理順序で命令が実施された場合等)などを行う。
On the other hand, if the WD count value is larger than the threshold value, an error check is executed in S130.
Specifically, in this error check, an abnormality of the storage device (ROM or RAM) (when information stored in the storage device is made redundant for abnormality confirmation and cannot be matched), an abnormality of the CPU ( CPU runaway due to undefined instructions, etc.), load abnormalities (with a mechanism that can measure the CPU processing load, etc., when the load exceeds the expected value), sequence abnormalities (instructions executed in a processing order different from normal operation) Etc.).

S140では、エラーチェックの結果、エラーが検出されたか否かを判断し、エラーが検出されなければ、S150にてWD信号の信号レベルを反転させる(WD信号を送出する)と共に、S160にてWD信号の信号レベルを記憶して、S170に進む。一方、S140にて、エラーが検出されたと判断した場合は、S150,S160を実行することなくS170に移行する。   In S140, it is determined whether or not an error is detected as a result of the error check. If no error is detected, the signal level of the WD signal is inverted (a WD signal is transmitted) in S150, and WD is transmitted in S160. The signal level of the signal is stored, and the process proceeds to S170. On the other hand, if it is determined in S140 that an error has been detected, the process proceeds to S170 without executing S150 and S160.

S170では、WDカウント値をリセットして、本処理を終了する。
つまり、本処理によって、WD周期Tw毎にエラーチェックが実施され、エラーが検出されなかった場合にはWD信号が出力(信号レベルを反転)され、エラーが検出された場合、または何等かの原因でWD処理自体が実施さない状況に陥っている場合には、WD信号の出力が停止することになる。
In S170, the WD count value is reset, and this process ends.
That is, by this process, an error check is performed every WD cycle Tw, and when no error is detected, a WD signal is output (inverted signal level) and an error is detected, or for some reason When the WD process itself is not performed, the output of the WD signal is stopped.

<ブート処理>
次に、ブートプログラムによって実現される処理(ブート処理)の内容を、図5に示すフローチャートに沿って説明する。
<Boot process>
Next, the contents of the process (boot process) realized by the boot program will be described with reference to the flowchart shown in FIG.

図5に示すように、本処理が起動すると、まずS210では、制御部3を構成するハードウェアを初期化する初期化処理を実行する。この初期化処理では、メモリチェックの他、CPUや各種周辺機器(図示せず)の初期設定を行う。その初期設定の中には、WD信号を出力するポートの初期化(ここでは信号レベルをハイレベルに設定)、WDカウント値の初期化(ここではゼロクリア)、割込用タイマ(タイマ割込の割込周期Tp)の設定およびタイマ割込の許可が少なくとも含まれており、これらの初期設定により、WD処理が一定周期Tpで起動されることになる。   As shown in FIG. 5, when this process is started, first, in S210, an initialization process for initializing the hardware configuring the control unit 3 is executed. In this initialization process, in addition to the memory check, the CPU and various peripheral devices (not shown) are initialized. Among the initial settings are initialization of the port that outputs the WD signal (here, the signal level is set to high level), initialization of the WD count value (here, zero clear), interrupt timer (timer interrupt timer The setting of the interrupt period Tp) and the permission of the timer interrupt are included at least. By these initial settings, the WD process is started at a constant period Tp.

ここでは、S210で実行する初期化処理が全て終了するまでに、タイマ割込は1回以上発生し、これに伴ってWD処理も1回以上実行されているものとする。
続くS220では、ブートプログラムよって実行されるWD処理から、BSWによって実行されるWD処理に引き継ぐ情報を設定する引継情報設定処理を実行する。
Here, it is assumed that a timer interrupt occurs one or more times until the initialization process executed in S210 is completed, and accordingly, the WD process is also executed one or more times.
In subsequent S220, a takeover information setting process for setting information to be taken over from the WD process executed by the boot program to the WD process executed by the BSW is executed.

具体的には、WD周期Twとしては予め設定された固定値を、初期信号レベルとしてはWD処理のS160にて記憶された信号レベルを、初期オフセット時間としてはWDカウント値にタイマ割込周期を乗じることで求めた経過時間(最後にWD信号を送信してからの経過時間)をWD周期Twから減算することで求めた値を、それぞれ引継情報格納領域に格納する。   Specifically, a preset fixed value is set as the WD cycle Tw, the signal level stored in S160 of the WD process is set as the initial signal level, and the timer interrupt cycle is set to the WD count value as the initial offset time. The values obtained by subtracting the elapsed time obtained by multiplication (the elapsed time since the last transmission of the WD signal) from the WD cycle Tw are stored in the takeover information storage area.

最後にS230では、BSWを起動して本処理を終了する。
<BSW初期化処理>
次に、BSWの起動時に、実行されるBSW初期化処理について説明する。
Finally, in S230, the BSW is activated and this process is terminated.
<BSW initialization processing>
Next, a BSW initialization process executed when the BSW is activated will be described.

BSW初期化処理では、BSWの動作環境を設定する処理を行う。その処理の中には、割込用タイマ(タイマ割込の割込周期Tp)の再設定、引継情報格納領域に格納された引継情報に基づき、WD処理に必要な情報の初期設定が少なくとも含まれる。   In the BSW initialization process, a process for setting the operating environment of the BSW is performed. The processing includes at least initial setting of information necessary for the WD processing based on resetting of the interrupt timer (timer interrupt interval Tp) and the takeover information stored in the takeover information storage area. It is.

また、WD処理に必要な情報の初期設定では、初期オフセット時間と割込周期とに基づく、WDカウント値の初期値(=初期オフセット時間/割込周期)の設定、WD周期Twと割込周期Tpとに基づくWD閾値THw(=Tw/Tp)の設定や、初期信号レベルをWD信号の現在の信号レベルとして記憶すること等が行われる。   Also, in the initial setting of information necessary for the WD processing, the initial value of the WD count value (= initial offset time / interrupt cycle) is set based on the initial offset time and the interrupt cycle, and the WD cycle Tw and the interrupt cycle. Setting of the WD threshold value THw (= Tw / Tp) based on Tp, storing the initial signal level as the current signal level of the WD signal, and the like are performed.

このようなBSW初期化処理後に、各種アプリケーションプログラムの動作を制御する通常処理が開始されることになる。
<作用効果>
図6は、ブート処理から通常処理(BSWによる処理)への切替時におけるWD信号およびタイマ割込の状態を示す説明図、図7は、同じく処理の切替時におけるWDカウント値の変化を示す説明図である。
After such BSW initialization processing, normal processing for controlling the operation of various application programs is started.
<Effect>
FIG. 6 is an explanatory diagram showing a state of a WD signal and a timer interrupt at the time of switching from boot processing to normal processing (processing by BSW), and FIG. 7 is an explanation showing a change in the WD count value at the same time of processing switching. FIG.

なお、ここでは、ブートプログラムで設定されるタイマ割込の割込周期をTp1、BSW初期化処理で設定されるタイマ割込の割込周期をTp2で表し、また、割込周期Tp1に基づくWD閾値THwをTHw1(=Tw/Tp1)、割込周期Tp2に基づくWD閾値THwをTHw2(=Tw/Tp2)で表すものとする。   Here, the timer interrupt set by the boot program is represented by Tp1, the timer interrupt set by the BSW initialization process is represented by Tp2, and the WD based on the interrupt cycle Tp1 The threshold THw is represented by THw1 (= Tw / Tp1), and the WD threshold THw based on the interrupt period Tp2 is represented by THw2 (= Tw / Tp2).

図6,7に示すように、ブート処理が実行されている間は、WDカウント値がWD閾値THw1に達する(即ち、WD周期が経過する)毎にWD信号の信号レベルを反転させ、通常処理が実行されている間は、WDカウント値がWD閾値THw2に達する(即ち、WD周期が経過する)毎にWD信号の信号レベルを反転させている。   As shown in FIGS. 6 and 7, while the boot process is being executed, the signal level of the WD signal is inverted every time the WD count value reaches the WD threshold value THw1 (that is, the WD period elapses), and the normal process is performed. Is being executed, the signal level of the WD signal is inverted every time the WD count value reaches the WD threshold value THw2 (that is, the WD cycle elapses).

但し、ブート処理から通常処理に切り替わる時には、引継情報に基づいて、WDカウント値を、初期オフセット時間が経過するとWD閾値THw2に達するような値に再設定することで、処理の切替があっても、WDカウント値がWD閾値THw2に達した時点で、前回のWD信号の出力(信号レベルの反転)からWD周期が経過しているようにされている。   However, when switching from boot processing to normal processing, the WD count value is reset to a value that reaches the WD threshold value THw2 when the initial offset time elapses based on the takeover information. When the WD count value reaches the WD threshold value THw2, the WD cycle has elapsed since the previous output of the WD signal (inversion of the signal level).

従って、車載制御装置1によれば、ブート処理から通常処理に切り替わる時にも、規定されたWD周期でWD信号を出力することができる。
<発明との対応>
上記実施形態において、監視部5が監視装置、制御部3が制御装置、BSWが基本プログラム、初期オフセット時間がタイミング情報,WD周期が監視許容期間を特定する情報、初期信号レベルがウォッチドッグ信号の信号レベルを表す情報に相当する。
Therefore, according to the in-vehicle control device 1, it is possible to output the WD signal at the prescribed WD cycle even when the boot process is switched to the normal process.
<Correspondence with Invention>
In the above embodiment, the monitoring unit 5 is the monitoring device, the control unit 3 is the control device, the BSW is the basic program, the initial offset time is the timing information, the WD period is the information specifying the monitoring allowable period, and the initial signal level is the watchdog signal This corresponds to information indicating the signal level.

<他の実施形態>
以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において様々な態様にて実施することが可能である。
<Other embodiments>
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, In the range which does not deviate from the summary of this invention, it is possible to implement in various aspects.

例えば、本実施形態では、監視部5において上限許容時間Tuおよび下限許容時間Tlの両方が規定されているが、下限許容時間Tlの規定がない場合は、ブート処理から通常処理への切替後、直ちにWD信号を出力し、WDカウント値はリセットするように構成してもよい。この場合、引継情報から初期オフセット時間を省略することができる。なお、図8は、この場合における、処理の切替タイミングとWD信号の波形との関係を示す説明図である。   For example, in the present embodiment, both the upper limit allowable time Tu and the lower limit allowable time Tl are defined in the monitoring unit 5, but when the lower limit allowable time Tl is not defined, after switching from the boot process to the normal process, The WD signal may be output immediately and the WD count value may be reset. In this case, the initial offset time can be omitted from the takeover information. FIG. 8 is an explanatory diagram showing the relationship between the process switching timing and the waveform of the WD signal in this case.

また、上記実施形態では、ブート処理によってタイマ割込を許可し、そのタイマ割込でWD処理を実行しているが、例えば、ブート処理の実行時間に変動がなく、常に一定時間で処理を実行することができるような場合には、タイマ割込を用いることなくブート処理の中でWD信号を出力するようにしてもよい。   In the above embodiment, the timer interrupt is permitted by the boot process and the WD process is executed by the timer interrupt. For example, there is no change in the execution time of the boot process, and the process is always executed at a fixed time. In such a case, the WD signal may be output during the boot process without using a timer interrupt.

この場合、図9に示すように、図5に示したブート処理におけるS210の代わりに、S211〜S213の処理を実行するように構成すればよい。
即ち、S211では、初期化処理Aを実行し、その後、S212ではWD信号を出力し、続くS213では、初期化処理Bを実行する。以下、S220、S230は、上記実施形態と同様である。
In this case, as illustrated in FIG. 9, the processing of S211 to S213 may be executed instead of S210 in the boot processing illustrated in FIG. 5.
That is, initialization processing A is executed in S211, and thereafter, a WD signal is output in S212, and initialization processing B is executed in subsequent S213. Hereinafter, S220 and S230 are the same as in the above embodiment.

但し、初期化処理A,Bは、S210の処理を分割したものであり、初期化処理Aは、その処理時間がWD周期Twとなるように設定される。ここでは、初期化処理Bの処理時間が、WD周期Twより短い場合を想定しているが、(K−1)×Tw<(初期化処理全体の処理時間)<K×Tw、(但し、Kは2以上の正整数)である場合は、初期化処理をK分割して、分割した各処理の間でWD信号を出力するように構成すればよい。   However, the initialization processes A and B are obtained by dividing the process of S210, and the initialization process A is set so that the processing time becomes the WD cycle Tw. Here, it is assumed that the processing time of the initialization process B is shorter than the WD cycle Tw, but (K−1) × Tw <(processing time of the entire initialization process) <K × Tw, If K is a positive integer greater than or equal to 2, the initialization process may be divided into K and a WD signal may be output between the divided processes.

上記実施形態では、次にWD信号を送信するタイミングを特定するための情報として、初期オフセット時間、即ち、次回送信するまでの残り時間を用いたが、WD信号を最後に送信してからの経過時間を用いるようにしてもよい。   In the above embodiment, the initial offset time, that is, the remaining time until the next transmission is used as information for specifying the timing for transmitting the WD signal next, but the time elapsed since the last transmission of the WD signal was used. You may make it use time.

1…車載制御装置 3…制御部 5…監視部   DESCRIPTION OF SYMBOLS 1 ... Vehicle-mounted control apparatus 3 ... Control part 5 ... Monitoring part

Claims (4)

予め設定された監視許容期間内の間隔で入力されるウォッチドッグ信号が途切れた場合に異常検出信号を出力する監視装置に対して前記ウォッチドッグ信号を出力し、前記監視装置の監視対象となる制御装置にて実行されるプログラム群であって、
各種アプリケーションプログラムの実行を制御する機能を少なくとも有する基本プログラムと、
前記制御装置の起動時に、前記基本プログラムを起動する処理を実行するブートプログラムと、
からなり、
前記ブートプログラムおよび前記基本プログラムは、いずれも、前記監視許容期間内の間隔で前記ウォッチドッグ信号を送信する処理を少なくとも実行し、
前記基本プログラムは、起動時に、少なくとも前記ウォッチドッグ信号の次回の送信タイミングに関わるタイミング情報を前記ブートプログラムから引き継ぐことを特徴とするプログラム群。
When the watchdog signal input at an interval within a preset allowable monitoring period is interrupted, the watchdog signal is output to the monitoring device that outputs an abnormality detection signal, and the control is the monitoring target of the monitoring device A group of programs executed by the device,
A basic program having at least a function of controlling execution of various application programs;
A boot program for executing processing for starting the basic program at the time of starting the control device;
Consists of
The boot program and the basic program both execute at least a process of transmitting the watchdog signal at intervals within the monitoring allowable period,
The group of programs, wherein the basic program takes over at least timing information related to the next transmission timing of the watchdog signal from the boot program at the time of startup.
前記タイミング情報は、前記ウォッチドッグ信号を最後に送信してからの経過時間、または次回送信するまでの残り時間のいずれかを表す情報であることを特徴とする請求項1に記載のプログラム群。   2. The program group according to claim 1, wherein the timing information is information indicating either an elapsed time since the last transmission of the watchdog signal or a remaining time until the next transmission. 3. 前記ブートプログラムから前記基本プログラムに引き継ぐ情報には、前記監視許容期間を特定する情報が含まれていることを特徴とする請求項1または請求項2に記載のプログラム群。   3. The program group according to claim 1, wherein the information inherited from the boot program to the basic program includes information for specifying the monitoring allowable period. 4. 前記監視装置は、前記ウォッチドッグ信号の信号レベルが前記監視許容期間以上継続して同一レベルである場合に、前記ウォッチドッグ信号が途切れたものと判断し、
前記ブートプログラムから前記基本プログラムに引き継ぐ情報には、前記ウォッチドッグ信号の信号レベルを表す情報が含まれていることを特徴とする請求項1乃至請求項3のいずれか一項に記載のプログラム群。
The monitoring device determines that the watchdog signal is interrupted when the signal level of the watchdog signal is the same level continuously for the monitoring allowable period or longer,
4. The program group according to claim 1, wherein the information inherited from the boot program to the basic program includes information indicating a signal level of the watchdog signal. 5. .
JP2011099921A 2011-04-27 2011-04-27 Program group Expired - Fee Related JP5533777B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011099921A JP5533777B2 (en) 2011-04-27 2011-04-27 Program group

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011099921A JP5533777B2 (en) 2011-04-27 2011-04-27 Program group

Publications (2)

Publication Number Publication Date
JP2012230637A true JP2012230637A (en) 2012-11-22
JP5533777B2 JP5533777B2 (en) 2014-06-25

Family

ID=47432109

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011099921A Expired - Fee Related JP5533777B2 (en) 2011-04-27 2011-04-27 Program group

Country Status (1)

Country Link
JP (1) JP5533777B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140125621A (en) * 2013-04-19 2014-10-29 콘티넨탈 오토모티브 시스템 주식회사 Apparatus and method for monitoring tcu in pcu
WO2016151964A1 (en) * 2015-03-23 2016-09-29 株式会社東芝 Information processing device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9721870B2 (en) 2014-12-05 2017-08-01 International Business Machines Corporation Cooling structure for electronic boards

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10171546A (en) * 1996-12-12 1998-06-26 Omron Corp Activation monitoring device
JP2005339297A (en) * 2004-05-28 2005-12-08 Fuji Xerox Co Ltd Controller, and control program
JP2007264856A (en) * 2006-03-28 2007-10-11 Kyocera Corp Cpu monitoring system, device and method
JP2009015435A (en) * 2007-07-02 2009-01-22 Nippon Telegr & Teleph Corp <Ntt> Abnormality detecting method and processor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10171546A (en) * 1996-12-12 1998-06-26 Omron Corp Activation monitoring device
JP2005339297A (en) * 2004-05-28 2005-12-08 Fuji Xerox Co Ltd Controller, and control program
JP2007264856A (en) * 2006-03-28 2007-10-11 Kyocera Corp Cpu monitoring system, device and method
JP2009015435A (en) * 2007-07-02 2009-01-22 Nippon Telegr & Teleph Corp <Ntt> Abnormality detecting method and processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140125621A (en) * 2013-04-19 2014-10-29 콘티넨탈 오토모티브 시스템 주식회사 Apparatus and method for monitoring tcu in pcu
KR102189779B1 (en) 2013-04-19 2020-12-11 콘티넨탈 오토모티브 시스템 주식회사 Apparatus and method for monitoring tcu in pcu
WO2016151964A1 (en) * 2015-03-23 2016-09-29 株式会社東芝 Information processing device
CN107111542A (en) * 2015-03-23 2017-08-29 株式会社东芝 Information processor

Also Published As

Publication number Publication date
JP5533777B2 (en) 2014-06-25

Similar Documents

Publication Publication Date Title
US8321065B2 (en) Method for controlling/regulating at least one task
CN111164577B (en) Vehicle-mounted electronic control device and abnormal time processing method thereof
JP5739290B2 (en) Electronic control unit
CN108427609B (en) Controller and control program update method
JP5244981B2 (en) Microcomputer and operation method thereof
JP2010285001A (en) Electronic control system and functional agency method
JP2016207002A (en) Drive control device
JP6242557B1 (en) Control device and control program
JP2011022934A (en) Electronic control unit and method for detecting failure
US7428660B2 (en) Starting control method, duplex platform system, and information processor
JP5533777B2 (en) Program group
JP6723941B2 (en) Control device and control program updating method
US20220055637A1 (en) Electronic control unit and computer readable medium
JP5960632B2 (en) Electronic control device for vehicle
TWI654561B (en) Information processing device and method for controlling time-intensive instructions
EP4115283A1 (en) Power management on a vehicle
JP2016071771A (en) Control device and monitoring device
JP2014146131A (en) Information processing apparatus, monitoring device, and control device
JP2013143093A (en) Information processing apparatus and information processing system
JP5683191B2 (en) Monitoring device and electronic control system
JP2012043315A (en) Data processing system
EP4115284A1 (en) Power management on a vehicle
JP2009282601A (en) Operation monitoring program, monitoring system, and monitoring method
KR102275869B1 (en) Apparatus and method of vehicle control
KR100728867B1 (en) Method for controlling state of a processor board

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130806

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140312

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140401

R151 Written notification of patent or utility model registration

Ref document number: 5533777

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140414

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees