JP2012137920A - Electronic control device and start control method - Google Patents

Electronic control device and start control method Download PDF

Info

Publication number
JP2012137920A
JP2012137920A JP2010289655A JP2010289655A JP2012137920A JP 2012137920 A JP2012137920 A JP 2012137920A JP 2010289655 A JP2010289655 A JP 2010289655A JP 2010289655 A JP2010289655 A JP 2010289655A JP 2012137920 A JP2012137920 A JP 2012137920A
Authority
JP
Japan
Prior art keywords
application
microcomputer
abnormality
activation
electronic control
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
JP2010289655A
Other languages
Japanese (ja)
Other versions
JP5652198B2 (en
Inventor
Kazumi Yamada
一美 山田
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2010289655A priority Critical patent/JP5652198B2/en
Publication of JP2012137920A publication Critical patent/JP2012137920A/en
Application granted granted Critical
Publication of JP5652198B2 publication Critical patent/JP5652198B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Retry When Errors Occur (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an electronic control device capable of performing start management for each application according to priority of application in which abnormality is detected.SOLUTION: An electronic control device 100 has a microcomputer 80 comprising a processor 12 executing a plurality of applications and a monitoring circuit comprising reset means 21 for resetting the microcomputer 80. The monitoring circuit has: start request means 24 for repeatedly outputting a start request of each application to the microcomputer 80 at start timing predetermined for each application; and abnormality detection means 22 for detecting abnormality in each application. When priority of an application in which abnormality is detected by the abnormality detection means 22 is equal to or less than a threshold, the start request means 24 stops outputting a start request of the application.

Description

本発明は、複数のアプリの実行する電子制御装置に関し、特に、各アプリの異常を検出することができる電子制御装置に関する。   The present invention relates to an electronic control apparatus that is executed by a plurality of applications, and more particularly, to an electronic control apparatus that can detect an abnormality of each application.

1つのマイコンが複数のアプリケーションを実行した場合、各アプリケーションにはまれに異常が生じることがある。アプリケーションの異常は、WDT(Watch Dog Timer)などで検出されるが、異常を解消するにはマイコンをリセットすることが有効であることが知られている。   When one microcomputer executes a plurality of applications, abnormalities may occur in each application. An application abnormality is detected by a WDT (Watch Dog Timer) or the like, but it is known that resetting the microcomputer is effective in eliminating the abnormality.

しかしながら、マイコンがリセットされると、異常を生じたアプリケーションが1つでも、リセットから再起動までの間、全てのアプリケーションが停止してしまう。ここで、アプリケーションには、例えば車載装置の制御に必要な優先度の高いもの以外にも、割込み待ちのようなアプリケーションなど優先度の低いものがあり、優先度の低いアプリケーションの異常に起因して優先度の高いアプリケーションが停止してしまうことは好ましくない。   However, when the microcomputer is reset, even if one application has an abnormality, all the applications are stopped from the reset to the restart. Here, there are applications with low priority other than those with high priority required for control of in-vehicle devices, for example, applications such as waiting for interrupts. It is not preferable that an application with high priority stops.

障害発生時にアプリケーションの優先度の高低を考慮して、アプリケーションの実行を制御する技術が考案されている(例えば、特許文献1参照。)。特許文献1には、実行優先度の高いジョブの実行中に、ジョブを停止しなければならない障害が発生したことを検出してそのジョブを一時停止させると共に、その障害に影響を受けない実行優先度の低いジョブの実行を開始させる画像形成装置が開示されている。   A technique has been devised for controlling the execution of an application in consideration of the priority of the application when a failure occurs (see, for example, Patent Document 1). In Patent Document 1, during execution of a job having a high execution priority, it is detected that a failure that requires the job to stop is detected, the job is temporarily stopped, and execution priority is not affected by the failure. An image forming apparatus that starts execution of a low-frequency job is disclosed.

特開平10−190897号公報Japanese Patent Laid-Open No. 10-190897

しかしながら、特許文献1に開示された考案には、優先度の低いジョブの異常が検出された場合の処理について開示されていない。このため、画像形成装置が優先度の低いジョブの異常を検出した場合、マイコンをリセットしたとすると、優先度の高いジョブまで実行できなくなるという上記の課題が解決できない。   However, the device disclosed in Patent Document 1 does not disclose processing when a job abnormality with a low priority is detected. For this reason, when the image forming apparatus detects an abnormality of a job with a low priority, if the microcomputer is reset, the above-described problem that a job with a high priority cannot be executed cannot be solved.

また、組み込み機器では定期的にアプリケーションを起動させることが多いが、一度、異常が生じたアプリケーションは、起動されても再度異常を生じさせるおそれが高いので、定期的な起動を禁止すべきである。しかし、従来、優先度の低いアプリケーションの異常が検出された場合に、優先度の高いアプリケーションは起動しながら、優先度の低いアプリケーションの起動を選択的に停止することは考慮されてこなかった。   In addition, in embedded devices, applications are usually started regularly, but once an application has failed, there is a high possibility that it will cause an abnormality again, so it should be prohibited from starting periodically. . Conventionally, however, it has not been considered to selectively stop activation of an application with a low priority while an application with a high priority is activated when an abnormality of an application with a low priority is detected.

本発明は、上記課題に鑑み、異常が検出されたアプリケーションの優先度に応じてアプリケーション毎に起動管理が可能な電子制御装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide an electronic control device that can perform activation management for each application in accordance with the priority of an application in which an abnormality is detected.

上記課題に鑑み、本発明は、複数のアプリケーションを実行するプロセッサを備えたマイコン及びマイコンをリセットするリセット手段を備えた監視回路を有する電子制御装置であって、前記監視回路は、アプリケーション毎に定められた起動タイミングで前記マイコンに繰り返し各アプリケーションの起動要求を出力する起動要求手段と、各アプリケーション毎に異常を検出する異常検出手段と、を有し、前記異常検出手段が異常を検出したアプリケーションの優先度が閾値以下の場合、前記起動要求手段が該アプリケーションの起動要求を停止する、ことを特徴とする。   In view of the above problems, the present invention is an electronic control device having a microcomputer provided with a processor for executing a plurality of applications and a monitoring circuit provided with reset means for resetting the microcomputer, wherein the monitoring circuit is determined for each application. A startup request unit that repeatedly outputs a startup request for each application to the microcomputer at a given startup timing; and an abnormality detection unit that detects an abnormality for each application; and When the priority is equal to or lower than the threshold, the activation request unit stops the activation request for the application.

異常が検出されたアプリケーションの優先度に応じてアプリケーション毎に起動管理が可能な電子制御装置を提供することができる。   It is possible to provide an electronic control device that can perform activation management for each application according to the priority of the application in which an abnormality is detected.

電子制御装置を説明する図の一例である。It is an example of the figure explaining an electronic controller. 電子制御装置の概略構成図の一例である。It is an example of the schematic block diagram of an electronic controller. 電子制御装置の動作を模式的に説明する図の一例である。It is an example of the figure which illustrates operation | movement of an electronic control apparatus typically. 起動・監視回路が動作する手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the procedure in which a starting and monitoring circuit operate | moves. 電子制御装置の別の一例を説明する図である。It is a figure explaining another example of an electronic controller. 電子制御装置を説明する図の一例である(実施例2)。(Example 2) which is an example of the figure explaining an electronic controller. 電子制御装置の概略構成図の一例である。It is an example of the schematic block diagram of an electronic controller. 電子制御装置の動作を模式的に説明する図の一例である。It is an example of the figure which illustrates operation | movement of an electronic control apparatus typically. スケジュール手段の動作を説明するフローチャート図の一例である。It is an example of the flowchart figure explaining operation | movement of a schedule means. マイコンと起動・監視回路の動作手順を示すシーケンス図の一例である。It is an example of the sequence diagram which shows the operation | movement procedure of a microcomputer and a starting and monitoring circuit. 電子制御装置の別の一例を説明する図である。It is a figure explaining another example of an electronic controller.

以下、本発明を実施するための形態について図面を参照しながら説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

図1は、本実施例の電子制御装置100を説明する図の一例である。電子制御装置100は、マイコンと起動・監視回路を有する。起動・監視回路はマイコンにアプリケーション(以下、単にアプリという)を実行させる起動制御という機能と、アプリの異常監視という機能を有する。従来、起動制御という機能はマイコン側が有していたが、マイコン外部の起動・監視回路が有することでアプリに異常が生じた場合に、異常が検出されたアプリの影響を受けずに他のアプリを起動制御することができる。   FIG. 1 is an example of a diagram illustrating an electronic control device 100 according to the present embodiment. The electronic control device 100 includes a microcomputer and a start / monitor circuit. The activation / monitoring circuit has a function of activation control for causing a microcomputer to execute an application (hereinafter simply referred to as an application) and a function of application abnormality monitoring. Conventionally, a function called start control has been provided on the microcomputer side, but when an abnormality occurs in the application due to the activation / monitoring circuit outside the microcomputer, other applications are not affected by the application in which the abnormality is detected. Can be controlled.

また、起動・監視回路はアプリAがクリアするWDT(Watch Dog Timer)1、アプリBがクリアするWDT2を有し、WDT1又はWDT2がオーバーフローすることで対応するアプリA又はアプリBの異常を監視している。起動・監視回路にとって、アプリA又はアプリBのうち優先度の高いアプリがクリアするWDT1又は2は既知になっている。   The activation / monitoring circuit has a WDT (Watch Dog Timer) 1 cleared by the app A and a WDT 2 cleared by the app B, and monitors the abnormality of the corresponding app A or app B when the WDT 1 or WDT 2 overflows. ing. For the activation / monitoring circuit, WDT 1 or 2 that is cleared by an app A or app B having a higher priority is known.

以上の構成に基づき、起動・監視回路とリセット回路21は以下のように動作する。
(1)起動・監視回路は定期的にアプリA、アプリBをそれぞれ起動する。
(2)優先度の低いアプリBがWDT2をオーバーフローさせた場合(図1左下)、起動回路はアプリBのみ起動を停止する。この場合、リセット回路はマイコンをリセットしない。
(3)優先度の高いアプリAがWDT1をオーバーフローさせた場合(図1右下)、リセット回路21はマイコンをリセットする。
Based on the above configuration, the start / monitor circuit and the reset circuit 21 operate as follows.
(1) The activation / monitoring circuit periodically activates application A and application B, respectively.
(2) When the application B with low priority overflows WDT 2 (lower left in FIG. 1), the activation circuit stops activation of only the application B. In this case, the reset circuit does not reset the microcomputer.
(3) When the application A having a high priority overflows WDT 1 (lower right in FIG. 1), the reset circuit 21 resets the microcomputer.

このように、優先度の低いアプリBに異常が検出されても、リセット回路21はマイコンをリセットしないので優先度の低いアプリAが優先度の高いアプリBの異常により停止してしまうことを防止できる。また、優先度の低いアプリBに異常が検出された場合、起動回路がアプリBを起動させないので、アプリBに何度も異常が生じてアプリAに異常が伝達することを防止できる。   In this way, even if an abnormality is detected in the low priority application B, the reset circuit 21 does not reset the microcomputer, so that the low priority application A is prevented from being stopped due to an abnormality in the high priority application B. it can. In addition, when an abnormality is detected in the application B having a low priority, the activation circuit does not activate the application B. Therefore, it is possible to prevent the abnormality from being repeatedly generated in the application B and the abnormality being transmitted to the application A.

〔電子制御装置の構成例〕
図2は、電子制御装置100の概略構成図の一例を示す。電子制御装置(ECU:Electronic Control Unit)100は、例えばエンジン、駆動用モータ、ホイルシリンダ圧など、各種の車載装置を制御するために用いられる。
[Configuration example of electronic control unit]
FIG. 2 shows an example of a schematic configuration diagram of the electronic control device 100. An electronic control unit (ECU) 100 is used to control various in-vehicle devices such as an engine, a drive motor, and wheel cylinder pressure.

電子制御装置100は、マイコン80と起動・監視回路90とを有する。マイコン80は、システムバス10に接続されたCPU12、ROM14、RAM11、BRG16及びINTC(割込みコントローラ)15を有する。   The electronic control device 100 includes a microcomputer 80 and a start / monitor circuit 90. The microcomputer 80 includes a CPU 12, a ROM 14, a RAM 11, a BRG 16, and an INTC (interrupt controller) 15 connected to the system bus 10.

ROM14には、電子制御装置100が制御のために実行するアプリ17(区別する場合、アプリA、Bという)が記憶されている。この他、OS(例えば、OSEK OS、ITRONなど)、ドライバ、CANプロトコルなどの通信ソフトが記憶されていてもよい。アプリA、Bは、アプリAの方が優先度が高いとし、例えばOSは各アプリの優先度を管理している。なお、マイコン80が3つ以上のアプリを実行する場合については後述する。   The ROM 14 stores an application 17 (referred to as applications A and B when distinguished) executed by the electronic control apparatus 100 for control. In addition, communication software such as an OS (for example, OSEK OS, ITRON, etc.), a driver, and a CAN protocol may be stored. For the apps A and B, the app A has a higher priority. For example, the OS manages the priority of each app. A case where the microcomputer 80 executes three or more applications will be described later.

例えば、アプリAは、エンジンやモータ、ブレーキ油圧の制御量を演算するプログラムであり、アプリBは、レジスタチェック、フェールセーフ処理、又は、無限ループによる待ち状態等を提供するプログラムである。   For example, the application A is a program that calculates the control amounts of the engine, the motor, and the brake hydraulic pressure, and the application B is a program that provides a register check, fail-safe processing, a waiting state by an infinite loop, and the like.

CPU12はローカルRAM122を有し、これとRAM11を作業メモリとして、時分割方式で複数のアプリ17を実行する。CPU12は、複数のコア121を有するマルチコア型でもよいし、複数のCPU12を有していてもよい。この場合、コア毎にアプリA,Bを割り当てることもできる。   The CPU 12 includes a local RAM 122, and executes the plurality of applications 17 in a time-sharing manner using this and the RAM 11 as a working memory. The CPU 12 may be a multi-core type having a plurality of cores 121 or may have a plurality of CPUs 12. In this case, the apps A and B can be assigned for each core.

INTC15は、アプリ17の数と同じ数の制御線で起動回路24と接続されている。INTC15は、起動回路24や他の周辺機器(タイマ、センサ、他のECU等)からの割込み要因を調停して、CPU12に割込み要求する。例えば、INTC15は起動回路24からの割込みに対しアプリA又はアプリBをCPU12に実行させる。   The INTC 15 is connected to the activation circuit 24 by the same number of control lines as the number of applications 17. The INTC 15 arbitrates interrupt factors from the activation circuit 24 and other peripheral devices (such as a timer, a sensor, and other ECUs) and issues an interrupt request to the CPU 12. For example, the INTC 15 causes the CPU 12 to execute the application A or the application B in response to the interruption from the activation circuit 24.

BRG16は、I/Oバス9を介してI/O161と接続されている。BRG16は各種のI/O23との間で相互にバス周波数や電圧値などを変換する。I/O161は電子制御装置100と外部の機器を接続するインタフェースであり、例えば、各種のアクチュエータ、センサ、スイッチ等が接続される。   The BRG 16 is connected to the I / O 161 via the I / O bus 9. The BRG 16 mutually converts bus frequencies, voltage values, and the like with various I / Os 23. The I / O 161 is an interface for connecting the electronic control device 100 and an external device. For example, various actuators, sensors, switches, and the like are connected.

リセット端子13は、リセット端子13に入力する信号がLow→Highになるとマイコン80をリセットする端子である。   The reset terminal 13 is a terminal that resets the microcomputer 80 when a signal input to the reset terminal 13 changes from Low → High.

起動・監視回路90は、リセット回路21、WDT(以下区別する場合WDT1、WDT2という)22、及び、起動回路24を有する。まず、WDT1は、クロックジェネレータなど何らかのクロックソースに基づきカウントアップ又はカウントダウンするタイマーであり、ある一定値に到達した時又はカウンタがゼロになった時に(以下、いずれの場合も単に「オーバーフロー」という)、起動回路24及びリセット回路21に通知する。   The activation / monitoring circuit 90 includes a reset circuit 21, a WDT (hereinafter referred to as WDT 1 and WDT 2) 22, and an activation circuit 24. First, WDT1 is a timer that counts up or counts down based on some clock source such as a clock generator. When a certain value is reached or the counter reaches zero (hereinafter, simply referred to as “overflow” in any case). The start circuit 24 and the reset circuit 21 are notified.

CPU12とWDT1、2は制御線でそれぞれ接続されており、CPU12がアプリAを実行することでWDT1を、アプリBを実行することでWDT2をそれぞれオーバーフローする前にクリアするように設計されている。すなわち、アプリAが暴走した場合、WDT1がクリアされず、アプリBが暴走した場合、WDT2がクリアされないと仮定して、起動・監視回路90はWDT1がオーバーフローしないことでアプリAが正常であること、WDT2がオーバーフローしないことでアプリBが正常であることをそれぞれ検出している。   The CPU 12 and the WDTs 1 and 2 are respectively connected by control lines, and are designed to clear WDT1 when the CPU 12 executes the application A and before overflowing WDT2 when the application B is executed. That is, if app A runs away, WDT1 is not cleared, and if app B runs away, WDT2 is not cleared. , WDT2 is detected not to overflow, and app B is detected to be normal.

なお、WDT22は1つでもよい。この場合、WDT22は2つのタイマーを独立にカウントして、それぞれのカウント値のオーバーフローを監視する。   Note that there may be one WDT 22. In this case, the WDT 22 counts two timers independently and monitors the overflow of each count value.

このように、起動回路24は、WDT1又は2からの通知により異常のあるアプリA又はアプリBを検出している。起動回路24は、WDT1、2がオーバーフローしない場合には、INTC15に、アプリA及びBの起動要求を定期的に出力している。アプリ17には、サイクル時間毎に繰り返す処理や、サイクル時間毎に制御量を演算する処理など、定期的に起動されるものが少なくない。起動回路24は、クロックソースに基づきアプリA又はアプリB毎に決まっている定期的な時間の経過をカウントし、起動要求を出力する。また、アプリ17には、ほぼ定期的に入力される外部からの信号を契機に実行されるものがある。例えば、エンジン回転数は、クランク角が15度変化する毎にNEセンサがマイコン80に割込みして実行させるアプリが演算する。このようなアプリに対し起動回路24は、外部からの定期的な割込みを検出して起動要求を出力する。   As described above, the activation circuit 24 detects the abnormal application A or application B based on the notification from the WDT 1 or 2. The activation circuit 24 periodically outputs activation requests for the apps A and B to the INTC 15 when the WDTs 1 and 2 do not overflow. There are many applications 17 that are periodically activated, such as a process that repeats every cycle time and a process that calculates a control amount every cycle time. The activation circuit 24 counts the elapse of a regular time determined for each of the applications A and B based on the clock source, and outputs an activation request. Some applications 17 are triggered by external signals that are input almost regularly. For example, the engine speed is calculated by an application that the NE sensor interrupts and executes the microcomputer 80 every time the crank angle changes by 15 degrees. For such an application, the activation circuit 24 detects a periodic interrupt from the outside and outputs an activation request.

そして、起動回路24は、WDT2がオーバーフローするとアプリBの起動要求を停止する。これにより、マイコン80が、異常が検出されたアプリBを再度、起動することを防止できる。また、起動回路24は、WDT1がオーバーフローすると、マイコン80の再起動後にアプリAとアプリBの起動要求を再開する。こうすることでアプリAに対しては常に復帰と再開が優先される。   Then, the activation circuit 24 stops the activation request for the application B when WDT2 overflows. Thereby, the microcomputer 80 can prevent starting the application B from which abnormality was detected again. In addition, when the WDT 1 overflows, the activation circuit 24 resumes the activation request for the application A and the application B after the microcomputer 80 is restarted. By doing so, return and restart are always given priority to the application A.

リセット回路21は、予め定められたWDT1又は2のいずれかがオーバーフローすると、リセット端子13にLow信号を出力する。予め定められたWDT22は優先度の高いアプリAがクリアするWDT22である。   The reset circuit 21 outputs a Low signal to the reset terminal 13 when either predetermined WDT 1 or 2 overflows. The predetermined WDT 22 is a WDT 22 that is cleared by the application A having a high priority.

なお、図2では、起動・監視回路90をハード的なIC(例えば、ASIC等)で実現しているが、CPUがプログラムを実行することでソフト的に実現することもできる。   In FIG. 2, the activation / monitoring circuit 90 is realized by a hardware IC (for example, an ASIC). However, the activation / monitoring circuit 90 may be realized by software by the CPU executing a program.

〔動作手順〕
図3は、電子制御装置100の動作を模式的に説明する図の一例である。起動回路24は、アプリAの起動タイミングになると、アプリA起動要求(Highアクティブ)を起動手段31に出力し、アプリBの起動タイミングになると、アプリB起動要求(Highアクティブ)を起動手段31に出力する。
[Operation procedure]
FIG. 3 is an example of a diagram for schematically explaining the operation of the electronic control device 100. The activation circuit 24 outputs an application A activation request (High active) to the activation unit 31 when the activation timing of the application A is reached. Output.

図3(b)に示すように、アプリA起動要求及びアプリB起動要求が定期的に起動・監視回路90からマイコン80に出力される。図ではアプリAとアプリBの起動間隔は同程度だが、異なっていてもよい。また、実行頻度が異なっていてもよい。   As shown in FIG. 3B, the application A activation request and the application B activation request are periodically output from the activation / monitoring circuit 90 to the microcomputer 80. In the figure, the activation intervals of application A and application B are similar, but may be different. Further, the execution frequency may be different.

マイコン80の起動手段31は、例えばINTC15が起動要求に応じてCPU12に割り込むことで実現される。INTC15は起動要求を割り込みの一種として受け付け、アプリの優先順位を調停する。例えば、アプリAの実行中にアプリBの起動要求がINTC15に入力されても、INTC15はアプリAが終了するまでCPU12に割り込まない。逆に、アプリBの実行中にアプリAの起動要求が入力された場合、INTC15はCPU12に割り込むので、CPU12はアプリBの実行状態を退避してアプリAを起動する。なお、このようなコンテキストスイッチが発生するかどうかは、アプリA、Bの起動サイクル及び実行時間に依存するので、オーバーヘッドが抑制されるようにアプリA、Bの起動サイクルを最適化することもできる。また、CPU12がマルチコアで各コアにアプリA,Bが割り当てられている場合、アプリA、Bの実行時間が重複しても、優先度の高低に応じたコンテキストスイッチは発生しない。   The activation means 31 of the microcomputer 80 is realized, for example, when the INTC 15 interrupts the CPU 12 in response to the activation request. The INTC 15 accepts the activation request as a kind of interrupt, and arbitrates the priority order of the applications. For example, even if an application B activation request is input to the INTC 15 during the execution of the application A, the INTC 15 does not interrupt the CPU 12 until the application A ends. On the other hand, if the application A activation request is input during the execution of the application B, the INTC 15 interrupts the CPU 12, so the CPU 12 saves the execution state of the application B and activates the application A. Note that whether or not such a context switch occurs depends on the activation cycle and execution time of the apps A and B. Therefore, the activation cycle of the apps A and B can be optimized so that overhead is suppressed. . Further, when the CPU 12 is multi-core and the apps A and B are assigned to the respective cores, even if the execution times of the apps A and B are overlapped, a context switch corresponding to the priority level does not occur.

CPU12は、ROM14又はRAM11に設定されているベクターテーブルからINTC15が通知する割り込み番号に対応した割り込みベクター(アドレス)の命令を実行する。本実施例では、割り込みベクターに対応した割り込みハンドラがアプリA又はアプリBを起動させる。   The CPU 12 executes the instruction of the interrupt vector (address) corresponding to the interrupt number notified by the INTC 15 from the vector table set in the ROM 14 or RAM 11. In this embodiment, the interrupt handler corresponding to the interrupt vector activates application A or application B.

このようにして起動手段31は、起動回路24からのアプリA起動要求に対しアプリAを起動し、起動回路24からのアプリB起動要求に対しアプリBを起動する。アプリA及びアプリBはそれぞれ実行状態更新部32(区別する場合、実行状態更新部A,Bという)を有する。実行状態更新部AはアプリAの実行状態を起動・監視回路90に通知し、実行状態更新部BはアプリBの実行状態を起動・監視回路90に通知する。具体的には、図3(b)に示すように、実行状態更新部Aは、アプリAが起動すると終了までの間にWDT1に1回以上、実行履歴を通知する。実行状態更新部Bについても同様である。実行履歴の通知は、WDT1、2のリセットである。起動・監視回路90はアプリA,Bに異常が生じたことを実行状態更新部A,BがWDT1、2をリセットしないことで検出する。この場合、WDT1,2は、実行間隔(アプリA、Bの最後の起動から次の起動まで)の時間よりも長い時間(例えば、実行間隔のn(>1)倍)が経過すると、オーバーフローするように設定される。   In this way, the activation unit 31 activates the application A in response to the application A activation request from the activation circuit 24 and activates the application B in response to the application B activation request from the activation circuit 24. Application A and application B each have an execution state update unit 32 (referred to as execution state update units A and B when distinguished). The execution state update unit A notifies the activation state of the application A to the activation / monitoring circuit 90, and the execution state update unit B notifies the execution state of the application B to the activation / monitoring circuit 90. Specifically, as shown in FIG. 3B, the execution state update unit A notifies the execution history to the WDT 1 at least once before the application A starts up. The same applies to the execution state update unit B. The notification of the execution history is a reset of WDT 1 and 2. The activation / monitoring circuit 90 detects that an abnormality has occurred in the applications A and B by the execution state update units A and B not resetting the WDTs 1 and 2. In this case, the WDTs 1 and 2 overflow when a time (for example, n (> 1) times the execution interval) longer than the execution interval (from the last activation of the applications A and B to the next activation) elapses. Is set as follows.

また、起動・監視回路90のWDT1,2のカウントを、アプリA、Bが停止・再開できる場合、実行状態更新部A,Bは実行開始の通知でWDT1、2のカウントを開始し、実行終了の通知でリセットすることもできる。この場合、WDT1,2は、実行時間(アプリA、Bの起動から終了まで)の時間よりも長い時間(例えば、実行時間のn(>1)倍)が経過すると、オーバーフローするように設定される。なお、この場合、各アプリの実行時間を計測することができる。   In addition, when the apps A and B can stop / restart the counts of the WDTs 1 and 2 of the activation / monitoring circuit 90, the execution state update units A and B start counting the WDTs 1 and 2 with the execution start notification and end the execution It can also be reset by notification. In this case, the WDTs 1 and 2 are set to overflow when a time (for example, n (> 1) times the execution time) that is longer than the execution time (from the start to the end of the applications A and B) elapses. The In this case, the execution time of each application can be measured.

図3(b)に示すように、時刻t4で起動したアプリBの実行状態更新部Bは、実行履歴又は実行終了をWDT2に通知できなかった。これはアプリBの異常を意味するので、WDT2は起動回路24とリセット回路21にアプリBの異常を通知する。これにより、起動回路24はアプリB起動要求を起動手段31に出力することを停止する。   As shown in FIG. 3B, the execution state update unit B of the application B started at time t4 could not notify the WDT 2 of the execution history or the end of execution. Since this means an abnormality in the application B, the WDT 2 notifies the activation circuit 24 and the reset circuit 21 of the abnormality in the application B. As a result, the activation circuit 24 stops outputting the application B activation request to the activation unit 31.

次に、時刻t6で起動したアプリAの実行状態更新部Aは、実行履歴又は実行終了をWDT1に通知できなかった。これはアプリAの異常を意味するので、WDT1は起動回路24とリセット回路21にアプリAの異常を通知する。これにより、リセット回路21はリセット端子13にリセット信号を出力する(図では時刻t7)。また、マイコンの再起動までの間、起動回路24はアプリA起動要求を起動手段31に出力することを停止する。   Next, the execution state update unit A of the application A activated at time t6 has not been able to notify the WDT 1 of the execution history or the end of execution. Since this means an abnormality of the application A, the WDT 1 notifies the activation circuit 24 and the reset circuit 21 of the abnormality of the application A. As a result, the reset circuit 21 outputs a reset signal to the reset terminal 13 (time t7 in the figure). Further, the activation circuit 24 stops outputting the application A activation request to the activation unit 31 until the microcomputer is restarted.

マイコン80はリセットされるとROM14のリセットベクタをプログラムカウンタに設定するので起動用のプログラムが実行され、起動用のプログラムがマイコン80だけでなく起動・監視回路90を初期化して、起動回路24、WDT1,2も起動を開始する。これにより、時刻t8に示すように、起動回路24が異常の検出前と同様に、アプリアプリA起動要求及びアプリB起動要求の定期的な出力を再開する。よって、マイコン80はアプリA及びアプリBを再度、定期的に実行するようになる。   When the microcomputer 80 is reset, the reset vector of the ROM 14 is set in the program counter, so that the startup program is executed. The startup program initializes not only the microcomputer 80 but also the startup / monitoring circuit 90, and the startup circuit 24, WDT1 and WDT2 also start activation. As a result, as shown at time t8, the activation circuit 24 resumes the periodic output of the application application A activation request and the application B activation request in the same manner as before the abnormality is detected. Therefore, the microcomputer 80 periodically executes the app A and the app B again.

〔動作手順〕
図4は、本実施例の起動・監視回路90が動作する手順を示すフローチャート図の一例である。図4の手順は、アプリA又はアプリBの起動タイミングになると実行される。
[Operation procedure]
FIG. 4 is an example of a flowchart showing a procedure for operating the activation / monitoring circuit 90 of the present embodiment. The procedure in FIG. 4 is executed when the application A or application B is activated.

まず、起動回路24は、タイマーを参照する(S10)。このタイマーは、アプリA又はアプリBの起動タイミングを検出する時計であり、起動回路24は、最後にアプリA起動要求及びアプリB起動要求を出力した時刻を記憶しておき、それからの経過時間を監視している。または、アプリA及びアプリBの起動タイミング毎に、タイマがーHigh信号を起動回路24に出力してもよい。   First, the activation circuit 24 refers to a timer (S10). This timer is a clock that detects the activation timing of the application A or the application B, and the activation circuit 24 stores the time when the application A activation request and the application B activation request were last output and stores the elapsed time from that time. Monitoring. Alternatively, the timer may output a -High signal to the activation circuit 24 at each activation timing of the application A and the application B.

起動回路24はアプリAの起動タイミングか否かを判定する(S20)。アプリAの起動タイミングでない場合(S20のNo)、処理はステップS60に進む。   The activation circuit 24 determines whether it is the activation timing of the application A (S20). When it is not the activation timing of the application A (No in S20), the process proceeds to step S60.

アプリAの起動タイミングである場合(S20のYes)、起動回路24は前回起動したアプリAが正常に終了したか否かを判定する(S30)。正常に終了したか否かはWDT1がオーバーフローしたか否かにより判定されるので、WDT1がオーバーフローしていなければステップS30の判定はNoになる。   When it is the activation timing of the application A (Yes in S20), the activation circuit 24 determines whether or not the application A that was activated last time has ended normally (S30). Whether or not the process has ended normally is determined by whether or not WDT1 has overflowed. Therefore, if WDT1 has not overflowed, the determination in step S30 is No.

前回起動したアプリAが正常に終了した場合(S30のYes)、起動回路24はアプリA起動要求をマイコン80に出力する(S40)。これにより、マイコン80はアプリAを起動することができる。   When the application A that was activated last time is completed normally (Yes in S30), the activation circuit 24 outputs an application A activation request to the microcomputer 80 (S40). Thereby, the microcomputer 80 can start the application A.

前回起動したアプリAが正常に終了していない場合(S30のNo)、WDT1がオーバーフローしたことになるので、リセット回路21はリセット信号をマイコン80に出力する(S50)。これにより、マイコン80はリセットされ、アプリA、アプリBが再度実行される。   If the previously activated application A has not ended normally (No in S30), WDT1 has overflowed, so the reset circuit 21 outputs a reset signal to the microcomputer 80 (S50). Thereby, the microcomputer 80 is reset, and the application A and the application B are executed again.

次に、ステップS60において、起動回路24はアプリBの起動タイミングか否かを判定する(S60)。アプリBの起動タイミングでない場合(S20のNo)、図4の処理は終了する。   Next, in step S60, the activation circuit 24 determines whether it is the activation timing of the application B (S60). When it is not the activation timing of the application B (No in S20), the process of FIG. 4 ends.

アプリBの起動タイミングである場合(S60のYes)、起動回路24は前回起動したアプリBが正常に終了したか否かを判定する(S70)。正常に終了したか否かはWDT2がオーバーフローしたか否かにより判定されるので、WDT2がオーバーフローしていなければステップS70の判定はNoになる。   When it is the activation timing of the application B (Yes in S60), the activation circuit 24 determines whether or not the application B that was activated last time has ended normally (S70). Whether or not the process has ended normally is determined by whether or not WDT2 has overflowed. Therefore, if WDT2 has not overflowed, the determination in step S70 is No.

前回起動したアプリBが正常に終了した場合(S70のYes)、起動回路24はアプリB起動要求をマイコン80に出力する(S80)。これにより、マイコン80はアプリBを起動することができる。   When the application B that was activated last time has ended normally (Yes in S70), the activation circuit 24 outputs an application B activation request to the microcomputer 80 (S80). Thereby, the microcomputer 80 can start the application B.

前回起動したアプリBが正常に終了していない場合(S70のNo)、WDT2がオーバーフローしたことになるので、アプリBを再度起動しないように、起動回路24はアプリB起動要求を出力しない。これにより、アプリBの再起動を防止できる。なお、WDT2から起動回路24へのオーバーフローの通知は、1度のオーバーフローにつき1回だけなので、起動回路24はWDT2がオーバーフローしたことをフラグなどで記憶しておく。これにより、次回の図4の手順が実行される際に、アプリBの起動タイミングが到来しても(S60のYes)、起動回路24がアプリB起動要求を出力することを防止できる。   If the application B that was activated last time has not ended normally (No in S70), the WDT2 has overflowed, so that the activation circuit 24 does not output an application B activation request so that the application B is not activated again. Thereby, the restart of the application B can be prevented. Since the overflow notification from the WDT 2 to the activation circuit 24 is only once per overflow, the activation circuit 24 stores the fact that the WDT 2 has overflowed with a flag or the like. Thereby, when the activation timing of the application B arrives (Yes in S60) when the next procedure of FIG. 4 is executed, the activation circuit 24 can be prevented from outputting an application B activation request.

〔3つ以上のアプリがある場合〕
マイコン80が3つ以上のアプリを実行する場合も同様に軌道制御できる。
[When there are 3 or more apps]
Similarly, when the microcomputer 80 executes three or more applications, the trajectory can be controlled.

図5(a)は3つ以上のアプリを有する電子制御装置100の一例を示す。図ではマイコン80はn個のアプリを実行し、起動・監視回路90はn個のWDT22を有している。マイコン80が3つ以上のアプリを実行する場合、1つのアプリに異常が生じた際に他のアプリを停止してでもマイコン80をリセットすべきかどうかの観点から、設計者が3つ以上のアプリをある優先度(閾値)を基準に、低優先度アプリと高優先度アプリに分類しておく。   FIG. 5A shows an example of the electronic control device 100 having three or more applications. In the figure, the microcomputer 80 executes n applications, and the activation / monitoring circuit 90 has n WDTs 22. When the microcomputer 80 executes three or more applications, the designer can select three or more applications from the viewpoint of whether the microcomputer 80 should be reset even if other applications are stopped when an abnormality occurs in one application. Are classified into a low priority application and a high priority application based on a certain priority (threshold).

分類結果は、起動回路24やリセット回路21に記憶される。例えば、起動回路24には、オーバーフローにより起動要求を停止すべきWDT22の識別情報が起動時にレジスタなどに設定され、リセット回路21には、オーバーフローによりリセットすべきWDT22の識別情報が起動時にレジスタなどに設定される。   The classification result is stored in the activation circuit 24 and the reset circuit 21. For example, in the startup circuit 24, the identification information of the WDT 22 that should stop the startup request due to overflow is set in a register or the like at startup, and in the reset circuit 21, the identification information of the WDT 22 that should be reset due to overflow is stored in the register or the like at startup. Is set.

したがって、アプリが3つ以上でも、起動・監視回路90はアプリが2つの場合と同様に、低優先度のアプリの異常に対しては該アプリの起動を停止して高優先度のアプリの実行を継続し、高優先度のアプリの異常に対してはマイコン80をリセットすることができる。   Therefore, even when there are three or more applications, the activation / monitoring circuit 90 stops the activation of the application and executes the high-priority application in the case of an abnormality in the low-priority application, as in the case of two applications. The microcomputer 80 can be reset for abnormalities in high-priority apps.

また、起動・監視回路90は、リセット対象外の低優先度のアプリでも2つ以上の異常が検出された場合、マイコン80をリセットすることもできる。この場合、リセット回路21は、オーバーフローしたWDT22に対応したアプリを記憶しておき、予め定められた数の低優先度のアプリの異常が検出されると、リセット回路21がマイコン80をリセットする。   Further, the activation / monitoring circuit 90 can also reset the microcomputer 80 when two or more abnormalities are detected even in a low-priority application that is not a reset target. In this case, the reset circuit 21 stores an application corresponding to the overflowed WDT 22, and the reset circuit 21 resets the microcomputer 80 when a predetermined number of low-priority application abnormalities are detected.

低優先度のアプリでも2つ以上のアプリが異常を生じることは、高優先度のアプリに異常が生じる可能性が少なくないおそれがあるので、早期にマイコン80をリセットすることができる。   If two or more apps are abnormal even in a low-priority application, there is a possibility that abnormality may occur in the high-priority application, so the microcomputer 80 can be reset early.

図5(b)は、マイコン80と起動・監視回路90を別のECU1,2に搭載したECUシステムの一例を示す図である。図5(b)ではマイコン80と起動・監視回路90がいずれもCAN通信部33を有し、CANバス34を介して通信することができる。なお、通信プロトコルはFlexRayなどどのようなものでもよい。   FIG. 5B is a diagram illustrating an example of an ECU system in which the microcomputer 80 and the activation / monitoring circuit 90 are mounted in separate ECUs 1 and 2. In FIG. 5B, both the microcomputer 80 and the activation / monitoring circuit 90 have the CAN communication unit 33 and can communicate via the CAN bus 34. The communication protocol may be any type such as FlexRay.

この場合、起動・監視回路90にも通信のためのプログラムを実行するCPUが搭載される。起動回路24に相当する所定のプログラムはCANバス34を介してアプリA起動要求及びアプリB起動要求をECU1に送信する。CAN通信部1の受信割り込みをINTC15が処理することで、起動手段31は上述と同様にアプリA及びアプリBを起動することができる。   In this case, the activation / monitoring circuit 90 is also equipped with a CPU that executes a communication program. A predetermined program corresponding to the activation circuit 24 transmits an application A activation request and an application B activation request to the ECU 1 via the CAN bus 34. When the INTC 15 processes the reception interrupt of the CAN communication unit 1, the activation unit 31 can activate the application A and the application B as described above.

アプリAの実行状態更新部AとアプリBの実行状態更新部BはCANバス34を介して実行履歴又は実行終了をECU2に通知する。ECU2の所定のプログラムは実行終了を受信するとWDT1、2をクリアする。よって、アプリA、Bに異常がなければWDT1、2がオーバーフローすることはない。   The execution state update unit A of the application A and the execution state update unit B of the application B notify the ECU 2 of the execution history or the execution end via the CAN bus 34. The predetermined program of the ECU 2 clears the WDT 1 and 2 when the execution end is received. Therefore, WDT 1 and 2 do not overflow if there is no abnormality in apps A and B.

WDT2がオーバーフローした場合、起動回路24に相当するプログラムはアプリB起動要求の出力を停止する。また、WDT1がオーバーフローした場合、リセット回路21はリセット信号をリセット端子13に出力する。これにより、ECU1のマイコン80はリセットされる。   When WDT2 overflows, the program corresponding to the activation circuit 24 stops outputting the application B activation request. Further, when WDT 1 overflows, the reset circuit 21 outputs a reset signal to the reset terminal 13. Thereby, the microcomputer 80 of the ECU 1 is reset.

したがって、マイコン80と起動・監視回路90が別のECU1,2に搭載された場合でも、異常が検出されたアプリ17の優先度に応じて、マイコン80をリセットするかどうかを制御できる。図5(b)のような形態では、複数のマイコン80の起動・監視回路90を1つのECU2に集約可能な可能性があるので電子制御装置100の製造コストを低減することが期待できる。   Therefore, even when the microcomputer 80 and the activation / monitoring circuit 90 are mounted in different ECUs 1 and 2, it is possible to control whether to reset the microcomputer 80 according to the priority of the application 17 in which an abnormality is detected. In the form as shown in FIG. 5B, it is possible to consolidate the activation / monitoring circuits 90 of the plurality of microcomputers 80 into one ECU 2, so that the manufacturing cost of the electronic control device 100 can be expected to be reduced.

以上説明したように、本実施例の電子制御装置100は、マイコン80の外部の起動・監視回路90がアプリの起動を制御することで、異常が検出されたアプリの影響を受けない外部からアプリ毎に起動するか否かを制御することができる。また、異常が検出されたアプリ17の優先度に応じてマイコン80をリセットするか否かを制御できる。   As described above, the electronic control device 100 according to the present exemplary embodiment allows the external activation / monitoring circuit 90 of the microcomputer 80 to control the activation of the application so that the application is not affected by the application in which the abnormality is detected. Whether to start each time can be controlled. Further, whether to reset the microcomputer 80 can be controlled according to the priority of the application 17 in which an abnormality is detected.

実施例1では、アプリ17の数が増えるとマイコン80と起動・監視回路90の結線が増えてしまうおそれがある。そこで、本実施例ではマイコン80と起動・監視回路90の結線数を低減できる電子制御装置100について説明する。   In the first embodiment, when the number of applications 17 increases, the connection between the microcomputer 80 and the start / monitor circuit 90 may increase. Therefore, in this embodiment, an electronic control device 100 that can reduce the number of connections between the microcomputer 80 and the start / monitor circuit 90 will be described.

図6は、本実施例の電子制御装置100を説明する図の一例である。図6の電子制御装置100は、異常の生じたアプリ17を切り離す処理を起動・監視回路90からマイコン80に残した電子制御装置100である。   FIG. 6 is an example of a diagram illustrating the electronic control device 100 according to the present embodiment. The electronic control device 100 of FIG. 6 is an electronic control device 100 in which the process of separating the application 17 in which an abnormality has occurred is left in the microcomputer 80 from the activation / monitoring circuit 90.

本実施例のマイコン80はスケジュール手段36及びAND回路20を有し、起動・監視回路90は起動回路24を有する。スケジュール手段36は、アプリA、アプリBの起動をスケジューリングする。AND回路20は、アプリA、アプリBの両方が実行終了通知をそれぞれフラグF19(区別する場合、フラグFa、Fbという)に出力することでオンとなる回路であり、WDT22をクリアしている。よって、アプリA又はアプリBのいずれかに異常が生じると、WDT22はクリアされない。   The microcomputer 80 according to the present embodiment includes the schedule unit 36 and the AND circuit 20, and the activation / monitoring circuit 90 includes the activation circuit 24. The scheduling means 36 schedules activation of the application A and the application B. The AND circuit 20 is a circuit that is turned on when both the application A and the application B output execution end notifications to the flag F19 (referred to as flags Fa and Fb, respectively), and clears the WDT 22. Therefore, when an abnormality occurs in either app A or app B, WDT 22 is not cleared.

図6(b)に示すように、WDT22がオーバーフローすると、割り込み起動回路24は割り込み起動要求をスケジュール手段36に通知する。スケジュール手段36は、割り込み起動要求により、WDT22がオーバーフローしたこと(アプリA又はアプリBに異常が生じたこと)を検出する。なお、起動・監視回路90は割り込み起動要求したことを記憶しておく。   As shown in FIG. 6B, when the WDT 22 overflows, the interrupt activation circuit 24 notifies the scheduling means 36 of an interrupt activation request. The schedule unit 36 detects that the WDT 22 has overflowed due to the interrupt activation request (an abnormality has occurred in the application A or the application B). The activation / monitoring circuit 90 stores the request for interrupt activation.

図6(c)に示すように、割り込み起動要求を取得したスケジュール手段36は、アプリA又はアプリBのうち異常が生じたアプリ(図ではアプリBになっている)を推定し、当該アプリをスケジュール対象から除外する。これにより、異常の生じたアプリBを切り離すことができる。また、スケジュール手段36はアプリBが起動しなくてもAND回路20をオンにするため、フラグFbに“1”を設定する。なお、異常が生じたと推定されたアプリがアプリAであり優先度が高い場合、スケジュール手段36はフラグFaに“1”を設定しない。   As shown in FIG. 6 (c), the scheduling means 36 that has acquired the interrupt activation request estimates an app (app B in the figure) in which an abnormality has occurred in app A or app B, and Exclude from schedule. Thereby, the application B in which an abnormality has occurred can be separated. Further, the schedule means 36 sets “1” to the flag Fb in order to turn on the AND circuit 20 even if the application B is not activated. Note that when the app that is estimated to have an abnormality is app A and the priority is high, the scheduling unit 36 does not set “1” in the flag Fa.

図6(d)に示すように、アプリAに異常がある場合、フラグFaに“1”が設定されないのでWDT22は再度、オーバーフローする。この場合、起動・監視回路90は、WDT22がオーバーフローした際にすでに割り込み起動要求を出力した記録があることを検出して、リセット回路21によりマイコン80をリセットする。   As shown in FIG. 6D, when the application A is abnormal, the flag Fa is not set to “1”, so the WDT 22 overflows again. In this case, the activation / monitoring circuit 90 detects that there is already a record of outputting an interrupt activation request when the WDT 22 overflows, and resets the microcomputer 80 by the reset circuit 21.

したがって、マイコン80は優先度の低いアプリBについてはスケジュール対象から除外してアプリAを実行できるので、優先度の高いアプリAがアプリBの異常により停止することを抑制できる。また、マイコン80と起動・監視回路90の間の結線は、アプリの数に拘わらず図示する3本に抑制することができる。   Therefore, since the microcomputer 80 can execute the application A by excluding the application B having a low priority from the schedule target, the application A having a high priority can be suppressed from being stopped due to the abnormality of the application B. In addition, the number of connections between the microcomputer 80 and the activation / monitoring circuit 90 can be suppressed to three as illustrated regardless of the number of applications.

〔電子制御装置の構成例〕
図7は、電子制御装置100の概略構成図の一例を示す。図7において図2と同一部には同一の符号を付しその説明は省略する。
[Configuration example of electronic control unit]
FIG. 7 shows an example of a schematic configuration diagram of the electronic control device 100. 7, the same parts as those in FIG. 2 are denoted by the same reference numerals, and the description thereof is omitted.

本実施例のマイコン80は、上記のフラグ19及びAND回路20を有する。フラグFaはアプリAが操作するフラグであり、フラグFbはアプリBが操作するフラグである。また、フラグFa、Fbはスケジュール手段36により定期的にリセットされる。このタイミングは、例えば、アプリA,Bの実行の直前であり、アプリA、BがフラグFa、Gbに“1”を設定することで、各アプリA,Bが正常であることが確認できる。   The microcomputer 80 of this embodiment has the flag 19 and the AND circuit 20 described above. The flag Fa is a flag operated by the application A, and the flag Fb is a flag operated by the application B. Further, the flags Fa and Fb are periodically reset by the schedule means 36. This timing is, for example, immediately before the execution of the apps A and B. When the apps A and B set the flags Fa and Gb to “1”, it can be confirmed that the apps A and B are normal.

INTC15は、実施例1と異なり、起動回路24から割込みに対しアプリA又はアプリBをCPU12に実行させるのでなく、スケジュール手段36を実行させる。スケジュール手段36は主にOS18により提供されるが、OS18を利用することなくアプリの一種として実装することもできる。スケジュール手段36については次述する。   Unlike the first embodiment, the INTC 15 does not cause the CPU 12 to execute the application A or the application B in response to the interruption from the activation circuit 24 but causes the scheduling means 36 to execute. The schedule means 36 is mainly provided by the OS 18, but can be implemented as a kind of application without using the OS 18. The schedule means 36 will be described below.

起動・監視回路90の構成は実施例1と同様であるが、本実施例ではWDT22を1つしか有さない。WDT22は、AND回路20がオンになるとクリアされ、AND回路20がオンにならずオーバーフローすると、起動回路24に通知する。なお、AND回路20による実装は一例であって、何らかのソフト的な手段により置き換えてもよい。例えば、ソフト的な手段は、CPU12がアプリA、Bの最後の命令まで実行終了したことを検出してWDT22をクリアする機能を有すればよい。   The configuration of the activation / monitoring circuit 90 is the same as that of the first embodiment, but this embodiment has only one WDT 22. The WDT 22 is cleared when the AND circuit 20 is turned on, and notifies the activation circuit 24 when the AND circuit 20 is not turned on and overflows. The mounting by the AND circuit 20 is an example, and may be replaced by some software means. For example, the software means may have a function of clearing the WDT 22 by detecting that the CPU 12 has finished execution up to the last instruction of the apps A and B.

起動回路24は、WDT22がオーバーフローするとマイコン80がスケジュール手段36を起動するように、INTC15に割り込み起動要求を出力する。また、起動回路24は、割り込み起動要求したことをフラグなどで記憶しておく。こうすることで、次回、WDT22がオーバーフローした際に、2回目のオーバーフローであることを検出できる。2回目のオーバーフローに対し起動回路24はリセット回路21に対しリセットを要求する。リセット回路21はリセット端子13にLowを出力するので、マイコン80をリセットすることができる。   The activation circuit 24 outputs an interrupt activation request to the INTC 15 so that the microcomputer 80 activates the schedule means 36 when the WDT 22 overflows. In addition, the activation circuit 24 stores a request for interrupt activation as a flag or the like. By doing so, the next overflow can be detected when the WDT 22 overflows the next time. In response to the second overflow, the activation circuit 24 requests the reset circuit 21 to reset. Since the reset circuit 21 outputs Low to the reset terminal 13, the microcomputer 80 can be reset.

<スケジュール手段>
図8(a)は、電子制御装置100の動作を模式的に説明する図の一例である。上記のように、起動回路24が割り込み起動要求を起動手段31に出力することで、マイコン80はスケジュール手段36を起動させる。マイコン80の起動手段31については実施例1と同様に、例えばINTC15が割り込み起動要求に応じてCPU12に割り込むことで実現される。INTC15は割り込み起動要求を割り込みの一種として受け付け、CPU12はベクターテーブルから割り込み起動要求に対応した割り込みベクター(アドレス)の命令を実行する。本実施例では、割り込みベクターに対応した割り込みハンドラがスケジュール手段36を起動させる。
<Schedule means>
FIG. 8A is an example of a diagram for schematically explaining the operation of the electronic control device 100. As described above, when the activation circuit 24 outputs an interrupt activation request to the activation unit 31, the microcomputer 80 activates the schedule unit 36. The activation means 31 of the microcomputer 80 is realized by, for example, the INTC 15 interrupting the CPU 12 in response to an interrupt activation request, as in the first embodiment. The INTC 15 accepts an interrupt activation request as a kind of interrupt, and the CPU 12 executes an interrupt vector (address) instruction corresponding to the interrupt activation request from the vector table. In this embodiment, the interrupt handler corresponding to the interrupt vector activates the schedule means 36.

スケジュール手段36は、スケジュールテーブル37に従い、アプリA、Bを起動する(CPU12に割り当てる)。スケジュールテーブル37には、アプリA,Bの優先度が実行時間を考慮して、アプリA、Bの起動タイミングが登録されている。実施例1のようにアプリA、Bを定期的に起動する場合、スケジュール手段36はタイマーを監視しながら、それぞれの起動タイミングになるとアプリA又はアプリBを起動させる。   The schedule unit 36 activates the apps A and B according to the schedule table 37 (assigned to the CPU 12). In the schedule table 37, the activation timings of the applications A and B are registered in consideration of the execution time of the priorities of the applications A and B. When the applications A and B are periodically activated as in the first embodiment, the schedule unit 36 activates the application A or the application B at the respective activation timing while monitoring the timer.

また、スケジュール手段36は、アプリA,Bの状態(実行可能、実行中、実行待ち等)に応じて、実行可能なアプリのうち優先度の高いものほど優先的にCPU12に割り当てることもできる。アプリA,Bが相互に関連している場合(例えばアプリBがアプリAの処理結果を利用する場合、またはその逆等)、アプリA、Bが実行待ち状態になるので、スケジュール手段36はアプリA,Bの状態遷移を監視して、優先度を考慮しながらCPU12に割り当てるアプリA,Bをスケジューリングしていく。なお、スケジュール手段36は、起動回路24が割り込み起動要求を送信した場合だけでなく、アプリA又はBが実行完了する毎や定期的に起動する。   Further, the scheduling means 36 can also preferentially assign to the CPU 12 a higher priority application that can be executed according to the state of the applications A and B (executable, executing, waiting for execution, etc.). When the apps A and B are related to each other (for example, when the app B uses the processing result of the app A, or vice versa), the apps A and B are in an execution waiting state. The state transitions of A and B are monitored, and the apps A and B assigned to the CPU 12 are scheduled in consideration of the priority. The schedule means 36 is activated not only when the activation circuit 24 transmits an interrupt activation request, but also every time the application A or B is completed or periodically.

図9はスケジュール手段36の動作を説明するフローチャート図の一例である。   FIG. 9 is an example of a flowchart for explaining the operation of the schedule means 36.

ます、マイコン80が起動・監視回路90から割り込み起動要求を取得してスケジュール手段36が起動する(S110)。   First, the microcomputer 80 acquires an interrupt activation request from the activation / monitoring circuit 90, and the schedule means 36 is activated (S110).

スケジュール手段36は、異常を生じさせたアプリがアプリA又はアプリBのどちらなのかを推定する(S120)。推定方法はいくつかあるが、例えば、スケジュール手段36の実行により退避したプログラムカウンタのアドレスがアプリA又はBのどちらのアドレスに相当するかにより推定することができる。また、スケジュール手段36がプロセス間通信の機能を有する場合、アプリA及びBにメッセージを問い合わせその応答の有無から、異常のあるアプリを推定することもできる。また、スケジュール手段36はアプリA、Bをスケジューリングしているので、直前にCPU12に割り当てたアプリA又はBに異常があると推定することもできる。   The schedule means 36 estimates whether the app causing the abnormality is the app A or the app B (S120). There are several estimation methods. For example, the program counter address saved by the execution of the schedule means 36 can be estimated based on which address of the application A or B corresponds. In addition, when the scheduling means 36 has an inter-process communication function, it is also possible to estimate an abnormal application from the presence / absence of a response by inquiring a message to the applications A and B. Further, since the scheduling means 36 schedules the apps A and B, it can be estimated that the app A or B assigned to the CPU 12 immediately before is abnormal.

スケジュール手段36は、異常が検出されたアプリを推定すると、そのアプリが停止してよい低い優先度が否かを判定する(S130)。各アプリA、Bの優先度はスケジュール手段36にとって既知であるので、スケジュール手段36は異常があると推定したアプリの優先度が閾値以下か否かに基づき停止可能か否かを判定する(アプリが2つの場合は高又は低のどちらであるかを判定する)。   When the scheduling means 36 estimates an application in which an abnormality is detected, the scheduling means 36 determines whether there is a low priority at which the application may be stopped (S130). Since the priority of each application A and B is known to the scheduling means 36, the scheduling means 36 determines whether or not the application can be stopped based on whether or not the priority of the application estimated to be abnormal is equal to or less than a threshold (applications). If there are two, determine whether it is high or low).

アプリBが停止してよい低い優先度の場合(S130のYes)、スケジュール手段36は異常を生じさせたアプリBをスケジュールテーブル37から削除する(S140)。これにより、アプリBは強制的に終了され、アプリBが占有していたローカルRAM122やRAM11の領域が開放される。また、削除されたアプリBはスケジュール手段36に記録される。記録することで、再度アプリBが生成されても実行を禁止したり、スケジュール手段36がフラグFbの操作を替わって実行することができる。   When the priority is low enough that the application B may be stopped (Yes in S130), the schedule unit 36 deletes the application B causing the abnormality from the schedule table 37 (S140). Thereby, the application B is forcibly terminated, and the areas of the local RAM 122 and the RAM 11 occupied by the application B are released. Further, the deleted application B is recorded in the schedule means 36. By recording, even if the application B is generated again, the execution can be prohibited, or the schedule unit 36 can execute the operation by changing the operation of the flag Fb.

そして、スケジュール手段36はアプリAの実行を再開する(S150)。こうすることで、優先度の低いアプリBだけを停止し、優先度の高いアプリAだけを継続することができる。なお、停止したアプリBに変わってスケジュール手段36はフラグFbを操作するがこの処理については後述する。   Then, the schedule unit 36 resumes the execution of the application A (S150). By doing so, it is possible to stop only the app B with a low priority and continue only the app A with a high priority. The schedule means 36 operates the flag Fb instead of the stopped application B, and this process will be described later.

また、アプリAが停止してよい低い優先度でない場合(S130のNo)、スケジュール手段36は異常を生じさせたアプリAを停止することなく、アプリの実行を再開する(S150)。こうすることで、優先度の高いアプリAに異常が生じていれば、再度、WDT22がオーバーフローするので、リセット回路21がマイコン80をリセットすることができる。   If the priority is not low enough to stop the application A (No in S130), the schedule unit 36 resumes the execution of the application without stopping the application A that caused the abnormality (S150). By doing so, if there is an abnormality in the high-priority application A, the WDT 22 overflows again, and the reset circuit 21 can reset the microcomputer 80.

図8(b)は、マイコン80と起動・監視回路90が出力する信号を模式的に説明する図の一例である。WDC(Watch Dog timer Clear)パルスは、AND回路20から出力されるパルスであり、1つのパルス毎にWDT22をクリアする。したがって、WDCパルスが停止すると、WDT22がクリアされないので起動回路24が割り込み起動要求をマイコン80に出力する。   FIG. 8B is an example of a diagram schematically illustrating signals output from the microcomputer 80 and the start / monitor circuit 90. A WDC (Watch Dog timer Clear) pulse is a pulse output from the AND circuit 20 and clears the WDT 22 for each pulse. Therefore, when the WDC pulse is stopped, the WDT 22 is not cleared and the activation circuit 24 outputs an interrupt activation request to the microcomputer 80.

これにより、スケジュール手段36が図9にて説明した処理を行うが、優先度の高いアプリAに異常が生じている場合、割り込み起動要求が出力されても、図示するようにWDCパルスは再開されないので、WDT22が再度オーバーフローする。これにより、リセット回路21がリセット信号を出力する。   As a result, the scheduling unit 36 performs the processing described with reference to FIG. 9. However, when an abnormality occurs in the high-priority application A, the WDC pulse is not resumed as illustrated even if an interrupt activation request is output. Therefore, the WDT 22 overflows again. Thereby, the reset circuit 21 outputs a reset signal.

不図示であるが、優先度の低いアプリBに異常が生じている場合、WDCパルスは割り込み起動要求の後、再開されるためリセット回路21はリセット信号を出力しない。   Although not shown, when an abnormality occurs in the application B with a low priority, the WDC pulse is resumed after an interrupt activation request, and therefore the reset circuit 21 does not output a reset signal.

〔動作手順〕
図10は、マイコン80と起動・監視回路90の動作手順を示すシーケンス図の一例である。
アプリA、Bに異常が生じていなければ、スケジュール手段36は定期的に起動してスケジュールに従ってアプリA、Bをそれぞれ起動する。
[Operation procedure]
FIG. 10 is an example of a sequence diagram showing an operation procedure of the microcomputer 80 and the start / monitor circuit 90.
If there is no abnormality in the applications A and B, the schedule means 36 is activated periodically and activates the applications A and B according to the schedule.

起動・監視回路90から割り込み起動要求が出力されず、スケジュールが変更されていない場合(S210のNo)、スケジュール手段36は起動するアプリAに対応したフラグFaをクリアする(S220)。   When no interrupt activation request is output from the activation / monitoring circuit 90 and the schedule has not been changed (No in S210), the scheduling unit 36 clears the flag Fa corresponding to the application A to be activated (S220).

次に、スケジュール手段36はアプリAを起動するので(S230)、実行状態更新部AがフラグFaに“1”を設定する(S310)。   Next, since the schedule means 36 starts the application A (S230), the execution state update part A sets "1" to the flag Fa (S310).

同様に、スケジュール手段36はアプリBの起動タイミングになると、アプリBに対応したフラグFbをクリアし(S240)、アプリBを起動するので(S250)、実行状態更新部BがフラグFbに“1”を設定する(S320)。   Similarly, the schedule means 36 clears the flag Fb corresponding to the application B at the activation timing of the application B (S240) and activates the application B (S250), so that the execution state update unit B sets “1” to the flag Fb. "Is set (S320).

これにより、AND回路20がWDCパルスをWDT22に出力することができる(S330)。   Thereby, the AND circuit 20 can output the WDC pulse to the WDT 22 (S330).

そして、ステップS210〜250において、アプリA又はアプリBに異常が生じると、AND回路20がWDCパルスを出力しないので、WDT22がオーバーフローする。 WDT22がオーバーフローした場合(S410のYes)、起動回路24がそれを検出し、すでに割り込み起動要求を出力したか否かを判定する(S420)。なお、WDT22がオーバーフローしていなければ(S410のNo)、起動・監視回路90は処理を行わない。   In steps S210 to S250, when an abnormality occurs in the application A or the application B, the AND circuit 20 does not output a WDC pulse, so that the WDT 22 overflows. When the WDT 22 overflows (Yes in S410), the activation circuit 24 detects it and determines whether an interrupt activation request has already been output (S420). If the WDT 22 has not overflowed (No in S410), the activation / monitoring circuit 90 does not perform processing.

割り込み起動要求が出力されていない場合(S420のNo)、マイコン80のリセット後、最初のオーバーフローなので、起動回路24は割り込み起動要求をマイコン80に出力する(S430)。この際、起動回路24は割り込み起動要求を出力したことをフラグなどで記録する。   If no interrupt activation request has been output (No in S420), the activation circuit 24 outputs an interrupt activation request to the microcomputer 80 because it is the first overflow after resetting the microcomputer 80 (S430). At this time, the activation circuit 24 records the output of the interrupt activation request with a flag or the like.

スケジュール手段36は割り込み起動要求を取得したことで図9の手順を実行し、優先度の低いアプリBに異常が検出された場合にはスケジュールを変更し、優先度の高いアプリAに異常が検出された場合にはスケジュールを変更しない。   The schedule means 36 executes the procedure of FIG. 9 by acquiring the interrupt activation request, and when an abnormality is detected in the application B with a low priority, the schedule is changed, and an abnormality is detected in the application A with a high priority. If this happens, do not change the schedule.

例えば、スケジュールを変更した場合(S210のYes)、同様に、スケジュール手段36はアプリAの起動タイミングになると、アプリAに対応したフラグFaをクリアし(S260)、アプリBを起動するので(S270)、実行状態更新部AがフラグFaに“1”を設定する(S320)。   For example, when the schedule is changed (Yes in S210), similarly, the schedule means 36 clears the flag Fa corresponding to the application A at the activation timing of the application A (S260), and activates the application B (S270). ), The execution state update unit A sets “1” in the flag Fa (S320).

しかし、スケジュールを変更した場合(S210のYes)、スケジュール手段36は、アプリBの起動タイミングでアプリBを起動せず、フラグFbに“1”を設定する(S280)。これにより、アプリBが起動されなくても、AND回路20がWDCパルスをWDT22に出力することができる(S330)。   However, when the schedule is changed (Yes in S210), the schedule unit 36 does not activate the application B at the activation timing of the application B, and sets “1” in the flag Fb (S280). Thereby, even if the application B is not activated, the AND circuit 20 can output the WDC pulse to the WDT 22 (S330).

一方、優先度の高いアプリAに異常が検出された場合にはスケジュールが変更されないので(S210のNo)、アプリAが起動されるが、異常が検出されたアプリAはフラグFaに“1”を設定しないと考えられる。このため、WDT22が2回目のオーバーフローをする。   On the other hand, since the schedule is not changed when the abnormality is detected in the application A having a high priority (No in S210), the application A is activated, but the application A in which the abnormality is detected has “1” in the flag Fa. Is not considered to be set. For this reason, the WDT 22 overflows for the second time.

WDT22がオーバーフローした場合(S410のYes)、起動回路24がそれを検出し、すでに割り込み起動要求を出力したか否かを判定するが(S420)、起動回路24はすでに割り込み起動要求を出力しているので、割り込み起動要求を出力することなくリセット回路21にリセットを要求する(S440)。これにより、リセット回路21がマイコン80をリセットすることができる。なお、起動回路24は割り込み起動要求の出力回数をカウントしておき、所定回数に到達した場合にリセット回路21にリセットさせることもできる。   When the WDT 22 overflows (Yes in S410), the activation circuit 24 detects it and determines whether or not an interrupt activation request has already been output (S420). The activation circuit 24 has already output an interrupt activation request. Therefore, the reset circuit 21 is requested to reset without outputting an interrupt activation request (S440). Thereby, the reset circuit 21 can reset the microcomputer 80. The activation circuit 24 can count the output number of interrupt activation requests, and can reset the reset circuit 21 when the predetermined number is reached.

〔3つ以上のアプリがある場合〕
本実施例の電子制御装置100は、実施例1と同様にマイコン80が3つ以上のアプリを実行する場合も好適に適用できる。
[When there are 3 or more apps]
The electronic control device 100 according to the present embodiment can also be suitably applied when the microcomputer 80 executes three or more applications as in the first embodiment.

図11(a)は3つ以上のアプリを有する電子制御装置100の一例を示す。マイコン80はn個のアプリA〜nに対応してn個のフラグFa〜Fnを有している。起動・監視回路90には変更がない。   FIG. 11A shows an example of an electronic control device 100 having three or more applications. The microcomputer 80 has n flags Fa to Fn corresponding to n applications A to n. There is no change in the start / monitor circuit 90.

設計者は、異常が生じた際に他のアプリを停止してもマイコン80をリセットすべきかどうかの観点から、3つ以上のアプリをある優先度(閾値)を基準に、低優先度アプリと高優先度アプリに分類してスケジュール手段36に登録しておく。または、スケジュール手段36に、閾値となる優先度を登録しておけば、異常があると推定したアプリ17が高優先度か低優先度かを判定できる。   From the viewpoint of whether or not the microcomputer 80 should be reset even if other apps are stopped when an abnormality occurs, the designer defines three or more apps as low priority apps based on a certain priority (threshold). The high priority application is classified and registered in the schedule means 36. Alternatively, if a priority level that is a threshold value is registered in the schedule unit 36, it can be determined whether the app 17 estimated to have an abnormality is a high priority level or a low priority level.

これにより、スケジュール手段36は、異常があると推定したアプリ17が高優先度の場合はスケジュールを変更しないのでマイコン80をリセットすることができる。低優先度の場合は、スケジュールを変更してアプリ17に対応するフラグFに“1”を設定するので、高優先度のアプリ17を停止することなく低優先度のアプリ17のみ停止することができる。   Thereby, the schedule means 36 can reset the microcomputer 80 because the schedule is not changed when the application 17 estimated to have an abnormality has a high priority. In the case of low priority, the schedule is changed and “1” is set in the flag F corresponding to the application 17, so that only the low priority application 17 can be stopped without stopping the high priority application 17. it can.

また、スケジュール手段36は、リセット対象外の低優先度のアプリでも2つ以上の異常が検出された場合、スケジュールの変更を停止し、マイコン80をリセットするように誘導することができる。   Moreover, the schedule means 36 can be guided to stop the change of the schedule and reset the microcomputer 80 when two or more abnormalities are detected even in the low-priority application that is not the reset target.

図11(b)は、マイコン80と起動・監視回路90を別のECU1,2に搭載したECUシステムの一例を示す図である。図11(b)ではマイコン80と起動・監視回路90がいずれもCAN通信部33を有し、CANバス34を介して通信することができる。   FIG. 11B is a diagram showing an example of an ECU system in which the microcomputer 80 and the start / monitor circuit 90 are mounted in different ECUs 1 and 2. In FIG. 11B, both the microcomputer 80 and the activation / monitoring circuit 90 have the CAN communication unit 33 and can communicate via the CAN bus 34.

この場合、AND回路20のオンを検出した通信用アプリがCANバス34を介してECU2に通知するので、ECU2も所定のプログラムによりWDT22をクリアする。WDT22がオーバーフローした場合、起動回路24に相当する所定のプログラムがCANバス34を介して割り込み起動要求をECU1に送信する。WDT22が再度オーバーフローした場合、リセット回路21はリセット信号をリセット端子13に出力する。これにより、ECU1のマイコン80はリセットされる。   In this case, since the communication application that detects the ON state of the AND circuit 20 notifies the ECU 2 via the CAN bus 34, the ECU 2 also clears the WDT 22 by a predetermined program. When the WDT 22 overflows, a predetermined program corresponding to the activation circuit 24 transmits an interrupt activation request to the ECU 1 via the CAN bus 34. When the WDT 22 overflows again, the reset circuit 21 outputs a reset signal to the reset terminal 13. Thereby, the microcomputer 80 of the ECU 1 is reset.

したがって、マイコン80と起動・監視回路90が別のECUに搭載された場合でも、異常が検出されたアプリの優先度に応じて、マイコン80をリセットするかどうかを制御できる。   Therefore, even when the microcomputer 80 and the activation / monitoring circuit 90 are mounted in different ECUs, it is possible to control whether the microcomputer 80 is reset according to the priority of the application in which the abnormality is detected.

以上説明したように、本実施例の電子制御装置100は、実施例1と同様の効果に加え、マイコン80がアプリ17の起動制御をすることで、マイコン80と外部の起動・監視回路90の間の結線を少くすることができる。   As described above, the electronic control device 100 according to the present embodiment has the same effects as those of the first embodiment, and the microcomputer 80 controls the activation of the application 17 so that the microcomputer 80 and the external activation / monitoring circuit 90 can be controlled. The connection between them can be reduced.

11 RAM
12 CPU
13 リセット端子
14 ROM
15 INTC
21 リセット回路
22 WDT
23 I/O
24 起動回路
80 マイコン
90 起動・監視回路
100 電子制御装置

11 RAM
12 CPU
13 Reset terminal 14 ROM
15 INTC
21 Reset circuit 22 WDT
23 I / O
24 start-up circuit 80 microcomputer 90 start-up / monitoring circuit 100 electronic control unit

Claims (11)

複数のアプリケーションを実行するプロセッサを備えたマイコン及びマイコンをリセットするリセット手段を備えた監視回路を有する電子制御装置であって、
前記監視回路は、アプリケーション毎に定められた起動タイミングで前記マイコンに繰り返し各アプリケーションの起動要求を出力する起動要求手段と、
各アプリケーション毎に異常を検出する異常検出手段と、を有し、
前記異常検出手段が異常を検出したアプリケーションの優先度が閾値以下の場合、前記起動要求手段は該アプリケーションの起動要求を停止する、
ことを特徴とする電子制御装置。
An electronic control device having a monitoring circuit with a microcomputer having a processor for executing a plurality of applications and a reset means for resetting the microcomputer,
The monitoring circuit is a start request means for repeatedly outputting a start request for each application to the microcomputer at a start timing determined for each application;
An anomaly detecting means for detecting an anomaly for each application,
If the priority of the application in which the abnormality detection unit detects an abnormality is equal to or lower than a threshold, the activation request unit stops the activation request for the application.
An electronic control device characterized by that.
前記異常検出手段が異常を検出したアプリケーションの優先度が前記閾値より大きい場合にのみ、前記リセット手段がマイコンをリセットする、
ことを特徴とする請求項1記載の電子制御装置。
The reset unit resets the microcomputer only when the priority of the application in which the abnormality detection unit has detected an abnormality is greater than the threshold value.
The electronic control device according to claim 1.
前記異常検出手段が、優先度が前記閾値以下の複数のアプリケーションの異常を検出した場合、前記リセット手段がマイコンをリセットする、
ことを特徴とする請求項1記載の電子制御装置。
When the abnormality detection means detects an abnormality of a plurality of applications having a priority level equal to or lower than the threshold, the reset means resets the microcomputer.
The electronic control device according to claim 1.
複数のアプリケーションを実行するプロセッサを備えたマイコン及びマイコンをリセットするリセット手段を備えた監視回路を有する電子制御装置であって、
前記監視回路は、アプリケーション毎に定められた起動タイミングで前記マイコンに繰り返し各アプリケーションの起動要求を出力する起動要求手段と、
各アプリケーション毎に異常を検出する異常検出手段と、を有し、
前記異常検出手段が異常を検出したアプリケーションの優先度が閾値より大きい場合、前記リセット手段がマイコンをリセットする、
ことを特徴とする電子制御装置。
An electronic control device having a monitoring circuit with a microcomputer having a processor for executing a plurality of applications and a reset means for resetting the microcomputer,
The monitoring circuit is a start request means for repeatedly outputting a start request for each application to the microcomputer at a start timing determined for each application;
An anomaly detecting means for detecting an anomaly for each application,
If the priority of the application in which the abnormality detection unit has detected an abnormality is greater than a threshold, the reset unit resets the microcomputer.
An electronic control device characterized by that.
複数のアプリケーションを実行するプロセッサを備えたマイコン及びマイコンをリセットするリセット手段を備えた監視回路を有する電子制御装置であって、
前記マイコンは、スケジュールにしたがって各アプリケーションを繰り返し起動させるスケジュール制御手段と、
アプリケーションの全てが正常に動作していることを検出すると、前記監視回路に正常通知を出力する正常通知手段と、を有し、
前記監視回路は、前記正常通知の有無によりいずれかのアプリケーションの異常を検出する異常検出手段と、
前記異常検出手段がアプリケーションの異常を検出したことを前記マイコンに通知する異常通知手段と、を有し、
前記スケジュール制御手段は異常が生じたアプリケーションを推定し、該アプリケーションの優先度が閾値以下の場合、該アプリケーションを起動対象から除外して、異常が生じたアプリケーションが正常に動作していることを前記正常通知手段に通知する、
ことを特徴とする電子制御装置。
An electronic control device having a monitoring circuit with a microcomputer having a processor for executing a plurality of applications and a reset means for resetting the microcomputer,
The microcomputer is a schedule control means for repeatedly starting each application according to a schedule;
A normal notification means for outputting a normal notification to the monitoring circuit when detecting that all of the applications are operating normally,
The monitoring circuit includes an abnormality detection means for detecting an abnormality of any application depending on the presence / absence of the normal notification;
An abnormality notification means for notifying the microcomputer that the abnormality detection means has detected an application abnormality;
The schedule control means estimates an application in which an abnormality has occurred, and when the priority of the application is equal to or lower than a threshold, excludes the application from the activation target and Notify normal notification means,
An electronic control device characterized by that.
前記異常通知手段が前記マイコンにアプリケーションの異常を検出したことを通知した後、再度、前記異常検出手段がアプリケーションの異常を検出した場合、
前記リセット手段がマイコンをリセットする、
ことを特徴とする請求項5記載の電子制御装置。
After notifying that the abnormality notification means has detected an application abnormality to the microcomputer, again, when the abnormality detection means detects an application abnormality,
The reset means resets the microcomputer;
The electronic control device according to claim 5.
前記スケジュール制御手段は異常が生じたと推定したアプリケーションを強制的に終了する、
ことを特徴とする請求項5又は6記載の電子制御装置。
The schedule control means forcibly terminates the application presumed that an abnormality has occurred;
The electronic control device according to claim 5 or 6, wherein
前記スケジュール制御手段が推定した、優先度が閾値以下のアプリケーションの数が所定数以上になった場合、異常が生じたアプリケーションが正常に動作していることを前記正常通知手段に通知しない、
ことを特徴とする請求項5記載の電子制御装置。
When the number of applications whose priority is equal to or less than a threshold value estimated by the schedule control unit is equal to or greater than a predetermined number, the normal notification unit is not notified that an application in which an abnormality has occurred is operating normally.
The electronic control device according to claim 5.
前記異常検出手段はウォッチドッグタイマである、ことを特徴とする請求項1又は5記載の電子制御装置。   6. The electronic control device according to claim 1, wherein the abnormality detection means is a watch dog timer. 複数のアプリケーションを実行するプロセッサを備えたマイコン及びマイコンをリセットするリセット手段を備えた監視回路を有する電子制御装置の起動制御方法であって、
前記監視回路が、アプリケーション毎に定められた起動タイミングで前記マイコンに繰り返し各アプリケーションの起動要求を出力するステップと、
異常検出手段が各アプリケーション毎に異常を検出するステップと、
前記異常検出手段が異常を検出したアプリケーションの優先度が閾値以下の場合、前記起動要求手段は該アプリケーションの起動要求を停止するステップと、
を有することを特徴とする起動制御方法。
An activation control method for an electronic control device having a microcomputer having a processor for executing a plurality of applications and a monitoring circuit having a reset means for resetting the microcomputer,
The monitoring circuit repeatedly outputs a startup request for each application to the microcomputer at a startup timing determined for each application;
A step of detecting an abnormality for each application by the abnormality detection means;
If the priority of the application in which the abnormality detection unit has detected an abnormality is equal to or lower than a threshold, the activation request unit stops the activation request for the application;
An activation control method characterized by comprising:
複数のアプリケーションを実行するプロセッサを備えたマイコン及びマイコンをリセットするリセット手段を備えた監視回路を有する電子制御装置の起動制御方法であって、
前記マイコンのスケジュール制御手段が、スケジュールにしたがって各アプリケーションを繰り返し起動させるステップと、
正常通知手段が、アプリケーションの全てが正常に動作していることを検出すると、前記監視回路に正常通知を出力するステップと、
前記監視回路の異常検出手段が、前記正常通知の有無によりいずれかのアプリケーションの異常を検出するステップと、
異常通知手段が、前記異常検出手段がアプリケーションの異常を検出したことを前記マイコンに通知するステップと、
前記スケジュール制御手段が、異常が生じたアプリケーションを推定し、該アプリケーションの優先度が閾値以下の場合、該アプリケーションを起動対象から除外して、異常が生じたアプリケーションが正常に動作していることを前記正常通知手段に通知するステップと、
を有することを特徴とする起動制御方法。
An activation control method for an electronic control device having a microcomputer having a processor for executing a plurality of applications and a monitoring circuit having a reset means for resetting the microcomputer,
The microcomputer schedule control means repeatedly starts each application according to the schedule,
When the normal notification means detects that all of the applications are operating normally, outputting a normal notification to the monitoring circuit;
The abnormality detection means of the monitoring circuit detects an abnormality of any application depending on the presence or absence of the normal notification;
Anomaly notifying means notifying the microcomputer that the anomaly detecting means has detected an application anomaly;
The schedule control means estimates an application in which an abnormality has occurred, and if the priority of the application is equal to or lower than a threshold, excludes the application from the activation target and confirms that the application in which the abnormality has occurred is operating normally. Notifying the normal notification means;
An activation control method characterized by comprising:
JP2010289655A 2010-12-27 2010-12-27 Electronic control device, start control method Active JP5652198B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010289655A JP5652198B2 (en) 2010-12-27 2010-12-27 Electronic control device, start control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010289655A JP5652198B2 (en) 2010-12-27 2010-12-27 Electronic control device, start control method

Publications (2)

Publication Number Publication Date
JP2012137920A true JP2012137920A (en) 2012-07-19
JP5652198B2 JP5652198B2 (en) 2015-01-14

Family

ID=46675287

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010289655A Active JP5652198B2 (en) 2010-12-27 2010-12-27 Electronic control device, start control method

Country Status (1)

Country Link
JP (1) JP5652198B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017037606A (en) * 2015-08-14 2017-02-16 富士電機株式会社 Drive control system and abnormality monitoring device
CN109992388A (en) * 2019-04-08 2019-07-09 中国核动力研究设计院 One kind being used for npp safety grade device software multiple task management system
KR20190091854A (en) * 2018-01-29 2019-08-07 주식회사 만도 Apparatus and method for monitoring program and electronic control system
JP2020135722A (en) * 2019-02-25 2020-08-31 株式会社デンソー Center device, data delivery system, and restriction implementation program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6129239A (en) * 1984-07-19 1986-02-10 Nec Corp Processor fault restart system
JPH02309429A (en) * 1989-05-25 1990-12-25 Japan Electron Control Syst Co Ltd Device for monitoring cpu runaway
JPH07134668A (en) * 1993-11-11 1995-05-23 Mitsubishi Electric Corp Abnormality detection circuit
JPH09120368A (en) * 1995-10-25 1997-05-06 Unisia Jecs Corp Cpu monitor device
JP2004326764A (en) * 2003-04-24 2004-11-18 Internatl Business Mach Corp <Ibm> Device and method for process recovery in built-in processor system
JP2006277062A (en) * 2005-03-28 2006-10-12 Mitsubishi Electric Corp Application management device and storage medium storing its software
JP2011008702A (en) * 2009-06-29 2011-01-13 Toyota Motor Corp Fault processor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6129239A (en) * 1984-07-19 1986-02-10 Nec Corp Processor fault restart system
JPH02309429A (en) * 1989-05-25 1990-12-25 Japan Electron Control Syst Co Ltd Device for monitoring cpu runaway
JPH07134668A (en) * 1993-11-11 1995-05-23 Mitsubishi Electric Corp Abnormality detection circuit
JPH09120368A (en) * 1995-10-25 1997-05-06 Unisia Jecs Corp Cpu monitor device
JP2004326764A (en) * 2003-04-24 2004-11-18 Internatl Business Mach Corp <Ibm> Device and method for process recovery in built-in processor system
JP2006277062A (en) * 2005-03-28 2006-10-12 Mitsubishi Electric Corp Application management device and storage medium storing its software
JP2011008702A (en) * 2009-06-29 2011-01-13 Toyota Motor Corp Fault processor

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017037606A (en) * 2015-08-14 2017-02-16 富士電機株式会社 Drive control system and abnormality monitoring device
KR20190091854A (en) * 2018-01-29 2019-08-07 주식회사 만도 Apparatus and method for monitoring program and electronic control system
KR102488980B1 (en) 2018-01-29 2023-01-17 주식회사 에이치엘클레무브 Apparatus and method for monitoring program and electronic control system
JP2020135722A (en) * 2019-02-25 2020-08-31 株式会社デンソー Center device, data delivery system, and restriction implementation program
WO2020174981A1 (en) * 2019-02-25 2020-09-03 株式会社デンソー Center device, data distribution system and restriction enforcement program
CN113767034A (en) * 2019-02-25 2021-12-07 株式会社电装 Center device, data distribution system, and restriction execution program
JP7419658B2 (en) 2019-02-25 2024-01-23 株式会社デンソー Center device, data distribution system, restriction enforcement program and restriction enforcement method
CN113767034B (en) * 2019-02-25 2024-06-14 株式会社电装 Center device, data distribution system, and recording medium for recording restriction implementation program
CN109992388A (en) * 2019-04-08 2019-07-09 中国核动力研究设计院 One kind being used for npp safety grade device software multiple task management system
CN109992388B (en) * 2019-04-08 2021-04-13 中核控制系统工程有限公司 Multi-task management system for safety-level equipment software of nuclear power plant

Also Published As

Publication number Publication date
JP5652198B2 (en) 2015-01-14

Similar Documents

Publication Publication Date Title
US8321065B2 (en) Method for controlling/regulating at least one task
JP4747307B2 (en) Network processing control device, program, and method
JP5861718B2 (en) Electronic control device for vehicle and data receiving method
JP5652198B2 (en) Electronic control device, start control method
JP5601127B2 (en) Control device
JP2011022934A (en) Electronic control unit and method for detecting failure
US20220055637A1 (en) Electronic control unit and computer readable medium
JP2013143093A (en) Information processing apparatus and information processing system
JP2013152636A (en) Information processing device and task scheduling method
JP5928358B2 (en) Information processing device, monitoring device, control device
JP6049961B1 (en) CPU monitoring device
US8726099B2 (en) Data processing system
US20050160425A1 (en) Limitation of the response time of a software process
JP6861275B2 (en) Vehicle control unit
JP2009151440A (en) Program hang-up detection method and computer device adopting the same method
JP5533777B2 (en) Program group
JP2006227962A (en) System and method for monitoring application task
JP2013084218A (en) Core monitoring device and information processor
JP6765874B2 (en) Electronic control device
JP2016184315A (en) Electronic controller
JP2005107757A (en) Method and device for detecting runaway of program
JP5299681B2 (en) Program inspection method
JP7278205B2 (en) Computing device and method for monitoring computing device
JP2017076294A (en) Processor, traffic signal device and information display device
JPH10269110A (en) Method for avoiding hang-up of computer system, and computer system using the same method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130618

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140217

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140401

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140507

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: 20141021

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141103

R151 Written notification of patent or utility model registration

Ref document number: 5652198

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151