JP2017214912A - Vehicular electronic control device and timer diagnostic method - Google Patents

Vehicular electronic control device and timer diagnostic method Download PDF

Info

Publication number
JP2017214912A
JP2017214912A JP2016110901A JP2016110901A JP2017214912A JP 2017214912 A JP2017214912 A JP 2017214912A JP 2016110901 A JP2016110901 A JP 2016110901A JP 2016110901 A JP2016110901 A JP 2016110901A JP 2017214912 A JP2017214912 A JP 2017214912A
Authority
JP
Japan
Prior art keywords
timer
microcomputer
period
timers
pulse signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016110901A
Other languages
Japanese (ja)
Other versions
JP6757182B2 (en
Inventor
賢史 山▲崎▼
Kenshi Yamazaki
賢史 山▲崎▼
寛 富沢
Hiroshi Tomizawa
寛 富沢
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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2016110901A priority Critical patent/JP6757182B2/en
Publication of JP2017214912A publication Critical patent/JP2017214912A/en
Application granted granted Critical
Publication of JP6757182B2 publication Critical patent/JP6757182B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

PROBLEM TO BE SOLVED: To provide a vehicular electronic control device including a microcomputer having a plurality of timers, which device is enabled to diagnose the presence of abnormality on each of the timers while an input terminal capable of being assigned for control is suppressed to decrease at a timer diagnostic time.SOLUTION: A microcomputer of an electronic control device for a vehicle causes a first timer to measure the period of a reference pulse signal SP inputted from the outside, and acquires the measurement times of second and third timers by a fixed period treatment, when the measured period is within a predetermined range. An interruption period of a fixed period treatment and a time period determined from the measurement times of second and third timers are compared to diagnose the presence of the abnormalities of the second and third timers.SELECTED DRAWING: Figure 3

Description

本発明は、車両用電子制御装置及びタイマ診断方法に関し、詳しくは、複数のタイマを備えた車両用電子制御装置においてタイマの異常の有無を検出するための技術に関する。   The present invention relates to a vehicle electronic control device and a timer diagnosis method, and more particularly, to a technique for detecting the presence or absence of an abnormality in a timer in a vehicle electronic control device including a plurality of timers.

特許文献1には、マイコンの外部の監視回路に所定周期のパルス信号を発生するパルス信号発生源を設け、マイコン側で前記パルス信号の周期を計測し、計測された周期が所定範囲外となったときにタイマ機能の異常を診断する、車両用電子制御システムの故障検出装置が開示されている。   In Patent Document 1, a pulse signal generation source for generating a pulse signal having a predetermined period is provided in a monitoring circuit outside the microcomputer, and the period of the pulse signal is measured on the microcomputer side, and the measured period is out of the predetermined range. A failure detection device for an electronic control system for a vehicle that diagnoses an abnormality in a timer function when the timer is activated is disclosed.

特開2002−089336号公報JP 2002-089336 A

ところで、外部から入力したパルス信号の周期計測を行う機能などを有する複数のタイマを備えたマイクロコンピュータを含む車両用電子制御装置において、外部から入力した基準パルス信号の周期計測を複数のタイマそれぞれで行わせ、係る周期計測値が基準パルス信号の設定周期に一致するか否かを検出することで、それぞれのタイマが正常であるか否かを検出することが可能である。
しかし、各タイマで基準パルス信号の周期計測を行わせるためには、マイクロコンピュータの複数の入力端子を、基準パルス信号を入力するために割り当てる必要が生じ、これによって、診断時には制御用として割り当てることができる入力端子が減り、車両の制御機能が損なわれる可能性があった。
By the way, in a vehicle electronic control device including a microcomputer having a plurality of timers having a function of measuring the period of a pulse signal input from the outside, the period of a reference pulse signal input from the outside is measured by each of the plurality of timers. It is possible to detect whether each timer is normal or not by detecting whether or not the cycle measurement value matches the set cycle of the reference pulse signal.
However, in order to allow each timer to measure the period of the reference pulse signal, it is necessary to assign a plurality of input terminals of the microcomputer to input the reference pulse signal. The number of input terminals that can be reduced is reduced, and the control function of the vehicle may be impaired.

本発明は上記問題点に鑑みなされたものであり、複数のタイマを有するマイクロコンピュータを含む車両用電子制御装置において、制御用として割り当てることができる入力端子(ハードウェア資源)がタイマ診断時に減ることを抑制しつつ、複数のタイマそれぞれについて異常の有無を診断できる、車両用電子制御装置及びタイマ診断方法を提供することを目的とする。   The present invention has been made in view of the above problems, and in a vehicle electronic control device including a microcomputer having a plurality of timers, the number of input terminals (hardware resources) that can be allocated for control is reduced during timer diagnosis. An object of the present invention is to provide a vehicle electronic control device and a timer diagnosis method capable of diagnosing the presence or absence of an abnormality for each of a plurality of timers while suppressing the above.

そのため、本願発明に係る車両用電子制御装置は、複数のタイマを有するマイクロコンピュータを含む車両用電子制御装置であって、前記マイクロコンピュータは、外部から入力した基準パルス信号の周期を前記複数のタイマのうちの一部を用いて計測し、周期計測値が所定範囲内であるときに、定周期処理にて他のタイマによる計測時刻を監視して前記他のタイマの異常の有無を検出する診断手段を備える。   Therefore, an electronic control device for a vehicle according to the present invention is an electronic control device for a vehicle including a microcomputer having a plurality of timers, and the microcomputer determines a cycle of a reference pulse signal input from the outside. Diagnosis of measuring the presence of an abnormality in the other timer by monitoring the time measured by the other timer in the periodic processing when the period measurement value is within a predetermined range. Means.

また、本願発明に係る車両用電子制御装置のタイマ診断方法は、車両用電子制御装置を構成する複数のタイマを備えたマイクロコンピュータにおいて、外部から入力した基準パルス信号の周期を前記複数のタイマのうちの一部を用いて計測するステップと、前記基準パルス信号の周期計測値が所定範囲内であるか否かを検出するステップと、前記基準パルス信号の周期計測値が所定範囲内であるときに、定周期処理にて他のタイマによる計測時刻を監視するステップと、前記計測時刻に基づき前記他のタイマの異常の有無を検出するステップと、を含む。   Further, the timer diagnosis method for a vehicle electronic control device according to the present invention is a microcomputer including a plurality of timers constituting the vehicle electronic control device, wherein a cycle of a reference pulse signal input from the outside is determined by the plurality of timers. A step of measuring using a part of them, a step of detecting whether or not a period measurement value of the reference pulse signal is within a predetermined range, and a period measurement value of the reference pulse signal being within a predetermined range In addition, there are a step of monitoring the measurement time by another timer in the periodic processing, and a step of detecting the presence or absence of abnormality of the other timer based on the measurement time.

上記発明によると、マイクロコンピュータに外部から入力した基準パルス信号の周期を計測するタイマは複数のタイマのうちの一部であり、残るタイマについては基準パルス信号の周期を計測することなく異常の有無が検出されるので、制御用として割り当てることができる入力端子がタイマ診断に伴って減ることを抑制できる。   According to the above invention, the timer for measuring the period of the reference pulse signal input from the outside to the microcomputer is a part of the plurality of timers, and the remaining timers are not abnormal without measuring the period of the reference pulse signal. Therefore, it is possible to suppress a decrease in the number of input terminals that can be assigned for control accompanying timer diagnosis.

本発明の実施形態における車両用電子制御装置の構成ブロック図である。1 is a configuration block diagram of a vehicle electronic control device according to an embodiment of the present invention. 本発明の実施形態におけるハードウェアタイマの構成ブロック図である。It is a block diagram of the hardware timer in the embodiment of the present invention. 本発明の実施形態におけるタイマ診断処理の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the timer diagnosis process in embodiment of this invention. 本発明の実施形態における第1タイマの診断処理を示すフローチャートである。It is a flowchart which shows the diagnostic process of the 1st timer in embodiment of this invention. 本発明の実施形態における第2タイマの診断処理を示すフローチャートである。It is a flowchart which shows the diagnostic process of the 2nd timer in embodiment of this invention. 本発明の実施形態における時間周期TIとタイマ割込み周期との相関を示す図である。It is a figure which shows the correlation with the time period TI and the timer interruption period in embodiment of this invention. 本発明の実施形態におけるタイマ異常発生時における時間周期TIとタイマ割込み周期との相関を示す図である。It is a figure which shows the correlation with the time period TI at the time of timer abnormality generation in the embodiment of this invention, and a timer interruption period. 本発明の実施形態における第2タイマの診断処理を示すフローチャートである。It is a flowchart which shows the diagnostic process of the 2nd timer in embodiment of this invention.

以下に本発明の実施の形態を説明する。
図1は、本発明に係る車両用電子制御装置の一態様を示すブロック図である。
図1の車両用電子制御装置100は、各種センサからの信号を入力し、車両に搭載されるエンジンなどの制御対象に操作量を出力する装置である。
Embodiments of the present invention will be described below.
FIG. 1 is a block diagram showing an aspect of a vehicle electronic control device according to the present invention.
The vehicle electronic control device 100 in FIG. 1 is a device that inputs signals from various sensors and outputs an operation amount to a control target such as an engine mounted on the vehicle.

車両用電子制御装置100は、マイクロコンピュータ(主マイコン)200と、監視回路300とを含んで構成される。
マイクロコンピュータ200は、CPU,RAM,ROM,インターフェースなどを含んで構成され、更に、各種センサなどの外部機器から入力端子213A−213Cに入力されるパルス信号の周期計測などに用いる複数のハードウェアタイマ210A−210Cを内蔵する。
The vehicle electronic control device 100 includes a microcomputer (main microcomputer) 200 and a monitoring circuit 300.
The microcomputer 200 includes a CPU, a RAM, a ROM, an interface, and the like, and further includes a plurality of hardware timers used for measuring the period of a pulse signal input to the input terminals 213A-213C from external devices such as various sensors. 210A-210C is built in.

タイマ210A−210Cは、その一態様として、図2に示すような回路構成のものであり、内部又は外部の基準クロックの入力数を計数するタイマカウンタ211、タイマカウンタ211のカウント周期を調整するためにクロックを分周する分周器212、マイクロコンピュータ200の入力端子213A−213Cに入力される外部からのパルス信号のエッジ(立ち上がり及び/又は立ち下がり)を検出するエッジ検出回路214、外部からのエッジ入力に応じてタイマカウンタ211の値を取り込むキャプチャレジスタ215などを含んで構成される。   The timer 210A-210C has a circuit configuration as shown in FIG. 2 as one aspect thereof, and adjusts the count cycle of the timer counter 211 and the timer counter 211 that count the number of inputs of the internal or external reference clock. A frequency divider 212 that divides the clock signal, an edge detection circuit 214 that detects an edge (rising edge and / or falling edge) of an external pulse signal input to the input terminals 213A to 213C of the microcomputer 200, A capture register 215 that captures the value of the timer counter 211 in response to an edge input is included.

マイクロコンピュータ200の外部回路である監視回路(ウォッチドッグタイマ)300は、マイクロコンピュータ200の監視機能を有するマイクロコンピュータ(副マイコン)又はICにより構成される。
監視回路300は、マイクロコンピュータ200がソフトウェア処理によって生成して出力するプログラムラン信号P-RUNを入力し、プログラムラン信号P-RUNが正常であるか否かをチェックし、プログラムラン信号P-RUNに異常が発生したときにマイクロコンピュータ200にリセット信号を出力する機能を有する。
A monitoring circuit (watchdog timer) 300 that is an external circuit of the microcomputer 200 is configured by a microcomputer (sub-microcomputer) or an IC having a monitoring function of the microcomputer 200.
The monitoring circuit 300 receives the program run signal P-RUN generated and output by the microcomputer 200 through software processing, checks whether the program run signal P-RUN is normal, and executes the program run signal P-RUN. A function of outputting a reset signal to the microcomputer 200 when an abnormality occurs.

また、監視回路300は、予め決められた周期の基準パルス信号SPを発生するパルス信号発生源310を備え、このパルス信号発生源310が発生した基準パルス信号SPをマイクロコンピュータ200に出力する。
前記基準パルス信号SPは、マイクロコンピュータ200におけるタイマ機能の診断に用いられ、マイクロコンピュータ200は、タイマ210A−210Cの異常の有無を検出する機能(診断手段220)をソフトウェアとして備えている。
The monitoring circuit 300 includes a pulse signal generation source 310 that generates a reference pulse signal SP having a predetermined period, and outputs the reference pulse signal SP generated by the pulse signal generation source 310 to the microcomputer 200.
The reference pulse signal SP is used for diagnosis of a timer function in the microcomputer 200, and the microcomputer 200 has a function (diagnostic means 220) for detecting whether or not the timer 210A-210C is abnormal as software.

以下では、マイクロコンピュータ200(診断手段220)によるタイマ機能の診断処理を詳細に説明する。
図3のフローチャートは、マイクロコンピュータ200(診断手段220)によるタイマ機能の診断処理の手順を概略的に示す図である。
Hereinafter, the timer function diagnosis process by the microcomputer 200 (diagnostic means 220) will be described in detail.
The flowchart of FIG. 3 is a diagram schematically showing the procedure of timer function diagnosis processing by the microcomputer 200 (diagnostic means 220).

マイクロコンピュータ200は、ステップS500で、第1タイマ210A(メインタイマ)の機能診断、つまり、第1タイマ210Aが正常であるか異常であるかを判別する処理を行う。
第1タイマ210Aの機能診断において、マイクロコンピュータ200は、第1タイマ210Aのエッジ検出回路に入力端子213Aを経由して基準パルス信号SPを入力させ、基準パルス信号SPのエッジ検出時刻の情報をキャプチャレジスタに格納させる。
In step S500, the microcomputer 200 performs a function diagnosis of the first timer 210A (main timer), that is, a process of determining whether the first timer 210A is normal or abnormal.
In the function diagnosis of the first timer 210A, the microcomputer 200 causes the edge detection circuit of the first timer 210A to input the reference pulse signal SP via the input terminal 213A and captures information on the edge detection time of the reference pulse signal SP. Store in a register.

そして、マイクロコンピュータ200は、図示しないインターバルタイマにより起動される定周期処理(タイマ割込み処理)にて、第1タイマ210Aのキャプチャレジスタに格納されている基準パルス信号SPのエッジ検出時刻の情報を取り込んで、基準パルス信号SPの周期を算出し、係る第1タイマ210Aによる周期計測値と所定範囲(正常範囲)とを比較する。   Then, the microcomputer 200 takes in the information of the edge detection time of the reference pulse signal SP stored in the capture register of the first timer 210A by fixed cycle processing (timer interrupt processing) started by an interval timer (not shown). Thus, the period of the reference pulse signal SP is calculated, and the period measurement value by the first timer 210A is compared with a predetermined range (normal range).

次いで、マイクロコンピュータ200は、ステップS600に進み、第1タイマ210Aによる基準パルス信号SPの周期計測値が所定範囲内であって第1タイマ210Aの正常状態が検出されたか否かを判別する。
第1タイマ210Aの正常状態であることを検出したとき、マイクロコンピュータ200は、ステップS700に進み、定周期処理にて第2タイマ210B及び第3タイマ210Cによる計測時刻を監視して、第2タイマ210B及び第3タイマ210Cの異常の有無を検出する。
Next, the microcomputer 200 proceeds to step S600, and determines whether or not the period measurement value of the reference pulse signal SP by the first timer 210A is within a predetermined range and the normal state of the first timer 210A is detected.
When the microcomputer 200 detects that the first timer 210A is in the normal state, the microcomputer 200 proceeds to step S700, monitors the time measured by the second timer 210B and the third timer 210C in the periodic processing, and then performs the second timer. The presence or absence of abnormality of 210B and the 3rd timer 210C is detected.

つまり、マイクロコンピュータ200は、第1タイマ210Aの機能診断においては、第1タイマ210Aで基準パルス信号SPの周期計測を行わせるが、他のタイマ210B,210Cについては、基準パルス信号SPの周期計測を行わせず(基準パルス信号SPを入力させず)、定周期処理の実行周期が保証されているものとして、係る定周期処理の実行周期と他のタイマ210B,210Cによる計測時刻との相関に基づき、第2タイマ210B及び第3タイマ210Cの異常の有無をそれぞれに検出する。   That is, in the function diagnosis of the first timer 210A, the microcomputer 200 causes the first timer 210A to measure the period of the reference pulse signal SP, but the other timers 210B and 210C measure the period of the reference pulse signal SP. (The reference pulse signal SP is not input) and the execution cycle of the fixed cycle processing is guaranteed, and the correlation between the execution cycle of the fixed cycle processing and the measurement times by the other timers 210B and 210C Based on this, the presence or absence of abnormality in the second timer 210B and the third timer 210C is detected.

第1タイマ210Aによる基準パルス信号SPの周期計測値が正常値を示したということは、第1タイマ210Aの各構成回路(タイマカウンタ211、分周器212など)が正常であると共に基準クロックが正常であることになり、更に、定周期処理の実行周期は、監視回路300によるプログラムラン信号P-RUNの監視で保証されることになり、定周期処理の実行周期は設定周期に一致しているものと見做すことができる。
したがって、定周期処理の実行周期毎の第2タイマ210B,第3タイマ210Cによる計測時刻が、定周期処理の実行周期に対応して変化しない場合は、基準クロックは正常であるものの、第2タイマ210B,第3タイマ210Cを構成する回路のいずれかに異常が発生していることになる。
That the period measurement value of the reference pulse signal SP by the first timer 210A indicates a normal value means that each component circuit (the timer counter 211, the frequency divider 212, etc.) of the first timer 210A is normal and the reference clock is In addition, the execution cycle of the fixed cycle processing is guaranteed by monitoring the program run signal P-RUN by the monitoring circuit 300, and the execution cycle of the fixed cycle processing matches the set cycle. Can be considered as being.
Therefore, when the time measured by the second timer 210B and the third timer 210C for each execution cycle of the fixed cycle processing does not change corresponding to the execution cycle of the fixed cycle processing, the reference clock is normal, but the second timer An abnormality has occurred in any of the circuits constituting 210B and the third timer 210C.

一方、第1タイマ210Aを用いた基準パルス信号SPの周期計測値が所定範囲外であって第1タイマ210Aの異常状態を検出したとき、マイクロコンピュータ200は、ステップS800に進み、第1タイマ210Aの異常を検知したときの異常時処理を実施する。
前記異常時処理として、マイクロコンピュータ200は、第1タイマ210Aの異常状態を示すフラグを立てるなどして第1タイマ210Aの異常状態を記憶保持する一方、第2タイマ210B及び第3タイマ210Cの機能診断を行うことができる。
On the other hand, when the period measurement value of the reference pulse signal SP using the first timer 210A is outside the predetermined range and the abnormal state of the first timer 210A is detected, the microcomputer 200 proceeds to step S800, and the first timer 210A Execute the process at the time of abnormality when an abnormality is detected.
As the abnormal time process, the microcomputer 200 stores and holds the abnormal state of the first timer 210A by setting a flag indicating the abnormal state of the first timer 210A, while the functions of the second timer 210B and the third timer 210C. Diagnosis can be made.

具体的には、第2タイマ210B及び第3タイマ210Cの診断において、マイクロコンピュータ200は、基準パルス信号SPを第2タイマ210Bに入力させて基準パルス信号SPの周期計測を行わせることで第2タイマ210Bの診断を行い、第2タイマ210Bによる周期計測値が所定範囲内である場合(第2タイマ210B及びクロックが正常である場合)、定周期処理にて第3タイマ210Cの計測時刻を監視して、第3タイマ210Cの異常の有無を検出する。
なお、定周期処理にて第2タイマ210B,第3タイマ210Cの計測時刻を監視して異常の有無を検出する診断処理については、後で詳細に説明する。
Specifically, in the diagnosis of the second timer 210B and the third timer 210C, the microcomputer 200 inputs the reference pulse signal SP to the second timer 210B to perform the period measurement of the reference pulse signal SP. Diagnose the timer 210B and monitor the measurement time of the third timer 210C by the periodic processing when the period measurement value by the second timer 210B is within a predetermined range (when the second timer 210B and the clock are normal). Then, the presence or absence of abnormality of the third timer 210C is detected.
The diagnostic process for monitoring the measurement times of the second timer 210B and the third timer 210C and detecting the presence / absence of abnormality in the periodic process will be described in detail later.

一方、マイクロコンピュータ200は、第1タイマ210Aに続き、第2タイマ210Bについても周期計測値に基づき異常を検出すると、クロックの異常状態である可能性があるので、制御動作(制御出力)の停止などのフェイルセーフ動作を実施することができる。
また、第1タイマ210Aによる周期計測値が異常であったときの異常時処理として、マイクロコンピュータ200は、第2タイマ210B,第3タイマ210Cの診断を行うことなく、制御動作(制御出力)の停止、制御対象へのフェイルセーフ信号の出力、制御対象の電源リレーのオフ操作などのフェイルセーフ動作を実施することができる。
On the other hand, if the microcomputer 200 detects an abnormality based on the period measurement value for the second timer 210B following the first timer 210A, the microcomputer 200 may be in an abnormal state of the clock, and therefore the control operation (control output) is stopped. Fail-safe operation such as can be performed.
In addition, as an abnormal process when the period measurement value by the first timer 210A is abnormal, the microcomputer 200 performs the control operation (control output) without performing diagnosis of the second timer 210B and the third timer 210C. Fail-safe operations such as stopping, outputting a fail-safe signal to the controlled object, and turning off the power relay to be controlled can be performed.

更に、マイクロコンピュータ200は、第1タイマ210A及びクロックが正常であるときに、第2タイマ210B及び/又は第3タイマ210Cの異常を検出した場合は、異常検出したタイマ210B,210Cを使用する制御を禁止し、正常なタイマを用いた制御を継続させることができる。   Further, when the microcomputer 200 detects an abnormality in the second timer 210B and / or the third timer 210C when the first timer 210A and the clock are normal, the microcomputer 200 uses the timers 210B and 210C that have detected the abnormality. Can be prohibited and control using a normal timer can be continued.

ここで、ステップS500におけるマイクロコンピュータ200による第1タイマ210Aの診断処理を詳細に説明する。
マイクロコンピュータ200は、第1タイマ210Aの機能診断を実施するときに、第1タイマ210Aに基準パルス信号SPを入力させる。これにより、第1タイマ210Aは、基準パルス信号SPのエッジ入力時に、タイマカウンタ211の値(エッジ検出時刻)をキャプチャレジスタ215に格納し、その後、タイマカウンタ211をクリアする。
Here, the diagnosis process of the first timer 210A by the microcomputer 200 in step S500 will be described in detail.
When the microcomputer 200 performs the function diagnosis of the first timer 210A, the microcomputer 200A inputs the reference pulse signal SP to the first timer 210A. Thus, the first timer 210A stores the value of the timer counter 211 (edge detection time) in the capture register 215 when the edge of the reference pulse signal SP is input, and then clears the timer counter 211.

一方、マイクロコンピュータ200は、図4のフローチャートに示した定周期処理(タイマ割込み処理)で、第1タイマ210Aの診断を実行する。なお、図4のフローチャートに示した定周期処理は、図示しないインターバルタイマによって一定時間間隔で起動される。
マイクロコンピュータ200は、ステップS531で、第1タイマ210Aのキャプチャレジスタ215に格納されているタイマカウンタ211の値(エッジ検出時刻)を取得する。
On the other hand, the microcomputer 200 executes diagnosis of the first timer 210A by the periodic processing (timer interrupt processing) shown in the flowchart of FIG. Note that the periodic processing shown in the flowchart of FIG. 4 is started at regular time intervals by an interval timer (not shown).
In step S531, the microcomputer 200 acquires the value (edge detection time) of the timer counter 211 stored in the capture register 215 of the first timer 210A.

ここで、タイマカウンタ211は、基準パルス信号SPのエッジ入力時にクリアされるから、クリア直前でのタイマカウンタ211の値は、前回のエッジ入力時から今回のエッジ入力時までの時間を表すことになる。換言すれば、第1タイマ210Aのキャプチャレジスタ215に格納されているタイマカウンタ211の値は、基準パルス信号SPの周期計測値TSPに相当することになる。   Here, since the timer counter 211 is cleared when the edge of the reference pulse signal SP is input, the value of the timer counter 211 immediately before the clear represents the time from the previous edge input to the current edge input. Become. In other words, the value of the timer counter 211 stored in the capture register 215 of the first timer 210A corresponds to the period measurement value TSP of the reference pulse signal SP.

次いで、マイクロコンピュータ200は、ステップS532に進み、第1タイマ210Aを用いて計測された周期計測値TSPが所定範囲内の値であるか否かを判別する。
なお、前記所定範囲は、既知である基準パルス信号SPの周期を含む範囲であって、分周設定などに因る計測ばらつきの許容範囲を規定する下限値TMIN(最小周期計測値)と上限値TMAX(最大周期計測値)とで挟まれる範囲である。
Next, the microcomputer 200 proceeds to step S532, and determines whether or not the period measurement value TSP measured using the first timer 210A is within a predetermined range.
The predetermined range is a range including a known cycle of the reference pulse signal SP, and a lower limit value TMIN (minimum cycle measurement value) and an upper limit value that define an allowable range of measurement variation due to a frequency division setting or the like. This is a range between TMAX (maximum cycle measurement value).

つまり、前記所定範囲は、第1タイマ210A及び基準クロックが正常状態であるときに、基準パルス信号SPの周期計測値TSPが含まれる範囲であって、第1タイマ210A及び/又は基準クロックが異常状態になって周期計測値TSPが所定以上の誤差が発生したときに基準パルス信号SPの周期計測値TSPが外れる範囲である。
そして、マイクロコンピュータ200は、ステップS532で、TMIN≦TSP≦TMAXが成立しているか否かを判別する。
That is, the predetermined range is a range including the period measurement value TSP of the reference pulse signal SP when the first timer 210A and the reference clock are in a normal state, and the first timer 210A and / or the reference clock is abnormal. This is a range in which the period measurement value TSP of the reference pulse signal SP deviates when an error of a predetermined value or more occurs in the period measurement value TSP.
In step S532, the microcomputer 200 determines whether TMIN ≦ TSP ≦ TMAX is satisfied.

TMIN≦TSP≦TMAXが成立している場合、第1タイマ210Aは、基準パルス信号SPの周期を正しく計測したことになるので、マイクロコンピュータ200は、ステップS533に進み、第1タイマ210Aの異常状態の検出回数を計数するための異常検知カウンタCTを零にリセットし、次のステップS534では、第1タイマ210Aの正常状態を判定する。   When TMIN ≦ TSP ≦ TMAX is established, the first timer 210A has correctly measured the cycle of the reference pulse signal SP, so the microcomputer 200 proceeds to step S533 and the abnormal state of the first timer 210A is reached. The abnormality detection counter CT for counting the number of detections is reset to zero, and in the next step S534, the normal state of the first timer 210A is determined.

一方、TMIN>TSP又はTSP>TMAXが成立する場合、第1タイマ210Aは、基準パルス信号SPの周期を正しく計測できなかったことになるので、マイクロコンピュータ200は、ステップS535に進み、異常検知カウンタCTの値をインクリメントし、次のステップS536では、異常検知カウンタCTの値が閾値以上であるか否かを判別する。
異常検知カウンタCTの値が閾値未満であるときは、マイクロコンピュータ200は、ステップS534に進み、第1タイマ210Aの正常判定を維持する。
On the other hand, if TMIN> TSP or TSP> TMAX is established, the first timer 210A has not been able to correctly measure the cycle of the reference pulse signal SP, so the microcomputer 200 proceeds to step S535 and proceeds to step S535. The value of CT is incremented, and in the next step S536, it is determined whether or not the value of the abnormality detection counter CT is equal to or greater than a threshold value.
When the value of the abnormality detection counter CT is less than the threshold value, the microcomputer 200 proceeds to step S534 and maintains the normal determination of the first timer 210A.

一方、異常検知カウンタCTの値が閾値以上であるとき、マイクロコンピュータ200は、周期計測値TSPの異常が第1タイマ210A及び/又は基準クロックの異常に因って発生したものと見做し、ステップS537に進み、第1タイマ210Aの異常状態を判定する。
ここで、閾値≧2とすれば、マイクロコンピュータ200は、複数回連続して周期計測値TSPの異常を検知したときに第1タイマ210Aの異常を判定することになり、ノイズなどに因る一時的な周期計測値TSPの異常を第1タイマ210Aの異常として誤検出することを抑制できる。
On the other hand, when the value of the abnormality detection counter CT is equal to or greater than the threshold, the microcomputer 200 considers that the abnormality of the period measurement value TSP has occurred due to the abnormality of the first timer 210A and / or the reference clock, Proceeding to step S537, the abnormal state of first timer 210A is determined.
Here, if the threshold value ≧ 2, the microcomputer 200 determines the abnormality of the first timer 210A when detecting the abnormality of the periodic measurement value TSP continuously for a plurality of times, and temporarily causes noise or the like. It is possible to suppress erroneous detection of an abnormal abnormality of the periodic measurement value TSP as an abnormality of the first timer 210A.

但し、閾値=1として、マイクロコンピュータ200は、周期計測値TSPの異常を検知したときに直ちに第1タイマ210Aの異常を判定することができる。
なお、図4のフローチャートに示した定周期処理の起動は、監視回路300によるプログラムラン信号P-RUNの監視などによって保証される。
However, with the threshold value = 1, the microcomputer 200 can immediately determine the abnormality of the first timer 210A when detecting the abnormality of the period measurement value TSP.
The start of the periodic processing shown in the flowchart of FIG. 4 is guaranteed by monitoring the program run signal P-RUN by the monitoring circuit 300.

また、第1タイマ210Aのタイマカウンタ211がフリーランカウンタである場合、マイクロコンピュータ200は、基準パルス信号SPのエッジ検出に基づく割込み処理(外部割込み処理)で、第1タイマ210Aのキャプチャレジスタ215に格納されているタイマカウンタ211の値を取得し、前回の割込み処理で取得したタイマカウンタ211の値と、今回の割込み処理で取得したタイマカウンタ211の値との差として、基準パルス信号SPの周期計測値を求め、係る周期計測値と所定範囲とを比較して第1タイマ210Aの異常の有無を診断することができる。   When the timer counter 211 of the first timer 210A is a free-run counter, the microcomputer 200 stores the capture register 215 of the first timer 210A in interrupt processing (external interrupt processing) based on edge detection of the reference pulse signal SP. The stored value of the timer counter 211 is acquired, and the period of the reference pulse signal SP is calculated as a difference between the value of the timer counter 211 acquired in the previous interrupt process and the value of the timer counter 211 acquired in the current interrupt process. A measurement value can be obtained, and the period measurement value can be compared with a predetermined range to diagnose the presence or absence of abnormality in the first timer 210A.

次に、図4のフローチャートのステップS700における第2タイマ210Bの異常診断の手順を、図5のフローチャートにしたがって説明する。
図5のフローチャートに示すルーチンは、インターバルタイマによって一定時間間隔で起動される定周期処理(タイマ割込み処理)である。
Next, the abnormality diagnosis procedure of the second timer 210B in step S700 of the flowchart of FIG. 4 will be described according to the flowchart of FIG.
The routine shown in the flowchart of FIG. 5 is a periodic processing (timer interrupt processing) that is started at regular time intervals by an interval timer.

マイクロコンピュータ200は、ステップS711で、本ルーチンの前回の実行時に読んだ第2タイマ210Bのタイマカウンタ211の値CL2N(第2タイマ210Bによる計測時刻)を前回値CL2Oにセットし、次のステップS712では、今回の割込み起動時点における第2タイマ210Bのタイマカウンタ211の値(第2タイマ210Bによる計測時刻)を読んで今回値CL2Nにセットする。
なお、マイクロコンピュータ200は、割込み処理プログラムの中でタイマカウンタ211の値をソフトウェア処理によって読み出すことができ、また、例えば、定周期処理の割込み要求パルスに基づきタイマカウンタ211の値をレジスタに格納させることができる。
In step S711, the microcomputer 200 sets the value CL2N (measurement time by the second timer 210B) of the timer counter 211 of the second timer 210B read at the previous execution of this routine to the previous value CL2O, and next step S712. Then, the value (time measured by the second timer 210B) of the timer counter 211 of the second timer 210B at the time of the current interrupt activation is read and set to the current value CL2N.
The microcomputer 200 can read the value of the timer counter 211 in the interrupt processing program by software processing, and stores the value of the timer counter 211 in a register based on, for example, an interrupt request pulse for periodic processing. be able to.

そして、次のステップS713で、マイクロコンピュータ200は、今回値CL2Nと前回値CL2Oとの差分を求めて、時間周期TI2にセットする。
ここで、図5のフローチャートに示すルーチンは定周期処理であり、基準クロックが正常でしかも定周期処理の実行周期が監視回路300によるプログラムラン信号P-RUNの監視で保証されているので、図5のフローチャートに示すルーチンの起動周期の正確性は保証される。つまり、図5のフローチャートに示すルーチンは、設定時間間隔で正確に割込み実行されているものと見なすことができる。
In the next step S713, the microcomputer 200 obtains the difference between the current value CL2N and the previous value CL2O and sets it to the time period TI2.
Here, the routine shown in the flowchart of FIG. 5 is fixed cycle processing, and the reference clock is normal and the execution cycle of the fixed cycle processing is guaranteed by monitoring the program run signal P-RUN by the monitoring circuit 300. The accuracy of the startup cycle of the routine shown in the flowchart of FIG. That is, the routine shown in the flowchart of FIG. 5 can be regarded as being accurately interrupted at set time intervals.

したがって、第2タイマ210Bが正常であれば、第2タイマ210Bを用いて計測した時間周期TI2は、本ルーチンの割込み周期の設定値に相当する値になり(図6参照)、第2タイマ210Bを用いて計測した時間周期TI2が、本ルーチンの割込み周期の設定値に相当する値から許容される誤差以上にずれている場合は、第2タイマ210Bに何らかの異常が発生し、計時誤差が発生していることになる。
そこで、マイクロコンピュータ200は、次のステップS714で、第2タイマ210Bを用いて計測した時間周期TI2が所定範囲(第2の所定範囲)内であるか否かを判別する。
Therefore, if the second timer 210B is normal, the time period TI2 measured using the second timer 210B becomes a value corresponding to the set value of the interrupt period of this routine (see FIG. 6), and the second timer 210B When the time period TI2 measured using is deviated more than an allowable error from the value corresponding to the interrupt period setting value of this routine, some abnormality occurs in the second timer 210B, and a timing error occurs. Will be.
Therefore, in the next step S714, the microcomputer 200 determines whether or not the time period TI2 measured using the second timer 210B is within a predetermined range (second predetermined range).

ステップS714における所定範囲とは、本ルーチンの割込み周期の設定値に相当する値を含み、分周設定などに因る計測ばらつきの許容範囲を規定する下限値TI2MIN(最小時間周期)と上限値TI2MAX(最大時間周期)とで挟まれる範囲である。
マイクロコンピュータ200は、ステップS714において、TI2MIN≦TI2≦TI2MAXが成立するか否かを判別する。換言すれば、マイクロコンピュータ200は、ステップS714にて、時間周期TI2と本ルーチンの割込み周期の設定値との差分が許容値以下であるか否かを判別する。
The predetermined range in step S714 includes a value corresponding to the set value of the interrupt cycle of this routine, and includes a lower limit value TI2MIN (minimum time cycle) and an upper limit value TI2MAX that define an allowable range of measurement variation due to frequency division settings and the like. (Maximum time period).
In step S714, the microcomputer 200 determines whether TI2MIN ≦ TI2 ≦ TI2MAX is satisfied. In other words, in step S714, the microcomputer 200 determines whether or not the difference between the time period TI2 and the set value of the interrupt period of this routine is equal to or less than an allowable value.

ここで、TI2MIN≦TI2≦TI2MAXが成立する場合、第2タイマ210Bは、図5のフローチャートに示すルーチンの割込み周期(起動周期)を正しく計測したことになるので、マイクロコンピュータ200は、ステップS715に進み、第2タイマ210Bの異常状態の検出回数を計数するための異常検知カウンタCT2を零にリセットし、次のステップS716では、第2タイマ210Bの正常状態を判定する。   Here, if TI2MIN ≦ TI2 ≦ TI2MAX is satisfied, the second timer 210B has correctly measured the interrupt cycle (start cycle) of the routine shown in the flowchart of FIG. 5, and therefore the microcomputer 200 proceeds to step S715. Then, the abnormality detection counter CT2 for counting the number of times of detection of the abnormal state of the second timer 210B is reset to zero, and in the next step S716, the normal state of the second timer 210B is determined.

一方、TI2MIN>TI2又はTI2>TI2MAXが成立する場合、第2タイマ210Bは、図5のフローチャートに示すルーチンの割込み周期(起動周期)を誤って計測したことになるので、マイクロコンピュータ200は、ステップS717に進み、異常検知カウンタCT2の値をインクリメントし、次のステップS718では、異常検知カウンタCT2の値が閾値(閾値≧1)以上であるか否かを判別する。   On the other hand, if TI2MIN> TI2 or TI2> TI2MAX is satisfied, the second timer 210B has erroneously measured the interrupt cycle (start cycle) of the routine shown in the flowchart of FIG. Proceeding to S717, the value of the abnormality detection counter CT2 is incremented, and in the next step S718, it is determined whether or not the value of the abnormality detection counter CT2 is greater than or equal to a threshold value (threshold value ≧ 1).

異常検知カウンタCT2の値が閾値未満であるときは、マイクロコンピュータ200は、ステップS716に進み、第2タイマ210Bの正常判定を維持する。
一方、異常検知カウンタCT2の値が閾値以上になったとき、マイクロコンピュータ200は、ステップS719に進み、第2タイマ210Bの異常状態を判定する。
When the value of the abnormality detection counter CT2 is less than the threshold value, the microcomputer 200 proceeds to step S716 and maintains the normal determination of the second timer 210B.
On the other hand, when the value of the abnormality detection counter CT2 becomes equal to or greater than the threshold value, the microcomputer 200 proceeds to step S719 and determines the abnormal state of the second timer 210B.

第2タイマ210Bの異常としては、分周器212による分周後のクロックの周期異常や、タイマカウンタ211のカウンタ動作の停止などがある。
そして、図7に示すように、分周後のクロックの周期が設定よりも短くなると時間周期TI2は割込み周期よりも長くなり、分周後のクロックの周期が設定よりも長くなると時間周期TI2は割込み周期よりも短くなり、更に、カウンタ動作が停止すると時間周期TI2≠0になって、いずれの場合もマイクロコンピュータ200は、第2タイマ210Bの異常を判定することになる。
The abnormality of the second timer 210B includes an abnormality of the clock cycle after frequency division by the frequency divider 212, stop of the counter operation of the timer counter 211, and the like.
As shown in FIG. 7, the time period TI2 becomes longer than the interrupt period when the divided clock period becomes shorter than the set period, and the time period TI2 becomes longer when the divided clock period becomes longer than the set period. If the counter operation is stopped and the counter operation is stopped, the time period TI2 ≠ 0, and in any case, the microcomputer 200 determines the abnormality of the second timer 210B.

次に、図3のフローチャートのステップS700における第3タイマ210Cの異常診断の手順を、図8のフローチャートにしたがって説明する。
図8のフローチャートに示すルーチンは、インターバルタイマによって一定時間間隔で起動される定周期処理(タイマ割込み処理)であり、図5のフローチャートに示した第2タイマ210Bの異常診断の手順と同様にして、第3タイマ210Cの異常診断を行う。
Next, the procedure for abnormality diagnosis of the third timer 210C in step S700 of the flowchart of FIG. 3 will be described with reference to the flowchart of FIG.
The routine shown in the flowchart of FIG. 8 is a fixed-cycle process (timer interrupt process) that is activated at regular time intervals by an interval timer, and is similar to the procedure for abnormality diagnosis of the second timer 210B shown in the flowchart of FIG. Then, abnormality diagnosis of the third timer 210C is performed.

マイクロコンピュータ200は、ステップS751で、本ルーチンの前回の実行時に読んだ第3タイマ210Cのタイマカウンタ211の値CL3N(第3タイマ210Cによる計測時刻)を前回値CL3Oにセットし、次のステップS752では、今回の割込み起動時点における第3タイマ210Cのタイマカウンタ211の値(第3タイマ210Cによる計測時刻)を読んで今回値CL3Nにセットする。
そして、次のステップS753で、マイクロコンピュータ200は、今回値CL3Nと前回値CL3Oとの差分を、時間周期TI3にセットする。
In step S751, the microcomputer 200 sets the value CL3N (measurement time by the third timer 210C) of the timer counter 211 of the third timer 210C read at the previous execution of this routine to the previous value CL3O, and the next step S752 Then, the value (time measured by the third timer 210C) of the timer counter 211 of the third timer 210C at the time of the current interrupt activation is read and set to the current value CL3N.
In the next step S753, the microcomputer 200 sets the difference between the current value CL3N and the previous value CL3O in the time period TI3.

ここで、図8のフローチャートに示すルーチンは定周期処理であり、クロックが正常でしかも定周期処理の実行周期が監視回路300によるプログラムラン信号P-RUNの監視で保証されているので、図8のフローチャートに示すルーチンの起動周期の正確性は保証される。つまり、図8のフローチャートに示すルーチンは、設定時間間隔で正確に割込み実行されているものと見なすことができる。   Here, the routine shown in the flowchart of FIG. 8 is fixed cycle processing, and since the clock is normal and the execution cycle of the fixed cycle processing is guaranteed by monitoring the program run signal P-RUN by the monitoring circuit 300, FIG. The accuracy of the startup cycle of the routine shown in the flowchart is guaranteed. That is, the routine shown in the flowchart of FIG. 8 can be regarded as being accurately interrupted at set time intervals.

したがって、第3タイマ210Cが正常であれば、第3タイマ210Cを用いて計測した時間周期TI3は、本ルーチンの割込み周期の設定値に相当する値になり、第3タイマ210Cを用いて計測した時間周期TI3が、本ルーチンの割込み周期の設定値に相当する値から許容される誤差以上にずれている場合は、第3タイマ210Cに何らかの異常が発生し、計時誤差が発生していることになる。   Therefore, if the third timer 210C is normal, the time period TI3 measured using the third timer 210C becomes a value corresponding to the set value of the interrupt period of this routine, and is measured using the third timer 210C. If the time period TI3 deviates more than the allowable error from the value corresponding to the interrupt period setting value of this routine, it means that some abnormality has occurred in the third timer 210C and a time measurement error has occurred. Become.

そこで、マイクロコンピュータ200は、次のステップS754で、第3タイマ210Cを用いて計測した時間周期TI3が所定範囲内であるか否かを判別する。
ステップS754における所定範囲とは、本ルーチンの割込み周期の設定値に相当する値を含み、分周設定などに因る計測ばらつきの許容範囲を規定する下限値TI3MIN(最小時間周期)と上限値TI3MAX(最大時間周期)とで挟まれる範囲である。
Therefore, in the next step S754, the microcomputer 200 determines whether or not the time period TI3 measured using the third timer 210C is within a predetermined range.
The predetermined range in step S754 includes a value corresponding to the set value of the interrupt cycle of this routine, and includes a lower limit value TI3MIN (minimum time cycle) and an upper limit value TI3MAX that define an allowable range of measurement variation due to frequency division settings and the like. (Maximum time period).

マイクロコンピュータ200は、ステップS754において、TI3MIN≦TI3≦TI3MAXが成立するか否かを判別する。換言すれば、マイクロコンピュータ200は、ステップS754にて、時間周期TI3と本ルーチンの割込み周期の設定値との差分が許容値以下であるか否かを判別する。
ここで、TI3MIN≦TI3≦TI3MAXが成立する場合、第3タイマ210Cは、図8のフローチャートに示すルーチンの割込み周期(起動周期)を正しく計測したことになるので、マイクロコンピュータ200は、ステップS755に進み、第3タイマ210Cの異常状態の検出回数を計数するための異常検知カウンタCT3を零にリセットし、次のステップS756では、第3タイマ210Cの正常状態を判定する。
In step S754, the microcomputer 200 determines whether TI3MIN ≦ TI3 ≦ TI3MAX is satisfied. In other words, in step S754, the microcomputer 200 determines whether or not the difference between the time period TI3 and the interrupt period setting value of this routine is equal to or less than an allowable value.
Here, when TI3MIN ≦ TI3 ≦ TI3MAX is satisfied, the third timer 210C has correctly measured the interrupt cycle (start cycle) of the routine shown in the flowchart of FIG. 8, and therefore the microcomputer 200 proceeds to step S755. Then, the abnormality detection counter CT3 for counting the number of times of detection of the abnormal state of the third timer 210C is reset to zero, and in the next step S756, the normal state of the third timer 210C is determined.

一方、TI3MIN>TI3又はTI3>TI3MAXが成立する場合、第3タイマ210Cは、図8のフローチャートに示すルーチンの割込み周期(起動周期)を誤って計測したことになるので、マイクロコンピュータ200は、ステップS757に進み、異常検知カウンタCT3の値をインクリメントし、次のステップS758では、異常検知カウンタCT3の値が閾値(閾値≧1)以上であるか否かを判別する。   On the other hand, if TI3MIN> TI3 or TI3> TI3MAX is established, the third timer 210C erroneously measures the interrupt cycle (start cycle) of the routine shown in the flowchart of FIG. Proceeding to S757, the value of the abnormality detection counter CT3 is incremented, and in the next step S758, it is determined whether or not the value of the abnormality detection counter CT3 is greater than or equal to a threshold value (threshold ≧ 1).

異常検知カウンタCT3の値が閾値未満であるときは、マイクロコンピュータ200は、ステップS756に進み、第3タイマ210Cの正常判定を維持する。
一方、異常検知カウンタCT3の値が閾値以上になったとき、マイクロコンピュータ200は、ステップS759に進み、第3タイマ210Cの異常状態を判定する。
When the value of the abnormality detection counter CT3 is less than the threshold value, the microcomputer 200 proceeds to step S756 and maintains the normal determination of the third timer 210C.
On the other hand, when the value of the abnormality detection counter CT3 becomes equal to or greater than the threshold value, the microcomputer 200 proceeds to step S759 and determines the abnormal state of the third timer 210C.

上記で説明した第1タイマ210A−第3タイマ210Cの診断において、基準パルス信号SPを入力させて周期計測させるのは第1タイマ210Aに限定され、他の第2タイマ210B及び第3タイマ210Cについては、基準パルス信号SPの周期計測は行わず、診断中もセンサからのパルス信号の周期計測などを第2タイマ210B及び第3タイマ210Cで行わせることができる。   In the diagnosis of the first timer 210A to the third timer 210C described above, the reference pulse signal SP is input and the period measurement is limited to the first timer 210A, and the other second timer 210B and the third timer 210C are measured. The period measurement of the reference pulse signal SP is not performed, and the period measurement of the pulse signal from the sensor can be performed by the second timer 210B and the third timer 210C even during diagnosis.

このため、タイマ210A−210Cの診断中に制御用として割り当てることができる入力端子が減ることを抑制でき、診断中における制御性の低下を抑制できる。
また、各タイマ210A−210Cの診断処理は、定周期処理(タイマ割込み)で実施されるから、診断処理に伴って外部割込み処理が発生してマイクロコンピュータ200の処理負荷が増えることを抑制できる。
For this reason, it can suppress that the input terminal which can be allocated for control during diagnosis of timer 210A-210C can be suppressed, and the controllability fall during diagnosis can be suppressed.
In addition, since the diagnostic processing of each timer 210A-210C is performed by fixed cycle processing (timer interrupt), it is possible to suppress an increase in processing load on the microcomputer 200 due to external interrupt processing accompanying the diagnostic processing.

以上、好ましい実施形態を参照して本発明の内容を具体的に説明したが、本発明の基本的技術思想及び教示に基づいて、当業者であれば種々の変形態様を採り得ることは自明である。
例えば、上記実施形態では、診断対象とするタイマが3個であるが、タイマの数は3個に限定されないことは明らかである。
Although the contents of the present invention have been specifically described above with reference to the preferred embodiments, it is obvious that those skilled in the art can take various modifications based on the basic technical idea and teachings of the present invention. is there.
For example, in the above embodiment, there are three timers to be diagnosed, but it is clear that the number of timers is not limited to three.

また、診断対象とするタイマがn個(n≧3)以上であるときに、基準パルス信号SPの周期計測を行わせて診断するタイマの数を2個以上n個未満とすることができる。
また、基準パルス信号SPの周期計測を行わせて診断するタイマの数を2個以上とするときに、基準パルス信号SPの周期計測に基づき異常を検出したタイマが複数になったときに、定周期処理で計測時刻を監視しての他のタイマの異常診断をキャンセルし、基準パルス信号SPの周期計測に基づき異常を検出したタイマと正常を検出したタイマとがあるときに、定周期処理で計測時刻を監視しての他のタイマの異常診断を実施する構成とすることができる。
In addition, when the number of timers to be diagnosed is n (n ≧ 3) or more, the number of timers to be diagnosed by performing the period measurement of the reference pulse signal SP can be set to 2 or more and less than n.
Further, when the number of timers to be diagnosed by performing the period measurement of the reference pulse signal SP is two or more, the number of timers that have detected an abnormality based on the period measurement of the reference pulse signal SP becomes plural. When there is a timer that detects an abnormality based on the period measurement of the reference pulse signal SP and a timer that detects a normality, it monitors the measurement time in the periodic process and cancels the abnormality diagnosis of other timers. It can be set as the structure which monitors the measurement time and performs abnormality diagnosis of the other timer.

ここで、上述した実施形態から把握し得る技術的思想について、以下に記載する。
車両用電子制御装置は、その一態様として、複数のタイマを有するマイクロコンピュータを含む車両用電子制御装置であって、前記マイクロコンピュータは、外部から入力した基準パルス信号の周期を前記複数のタイマのうちの一部を用いて計測し、周期計測値が所定範囲内であるときに、定周期処理にて他のタイマによる計測時刻を監視して前記他のタイマの異常の有無を検出する診断手段を備える。
Here, the technical idea that can be understood from the above-described embodiment will be described below.
The vehicle electronic control device, as one aspect thereof, is a vehicle electronic control device including a microcomputer having a plurality of timers, and the microcomputer determines the period of the reference pulse signal input from the outside of the plurality of timers. Diagnostic means for measuring by using a part of them and monitoring the time measured by the other timer in the periodic processing to detect the presence / absence of the other timer when the periodic measurement value is within a predetermined range Is provided.

前記車両用電子制御装置の好ましい態様において、前記診断手段は、定周期処理において前記他のタイマによる計測時刻を取得し、取得した計測時刻から定周期処理の時間間隔を求め、前記時間間隔が第2の所定範囲内であるときに前記他のタイマの正常状態を検出し、前記時間間隔が前記第2の所定範囲外であるときに前記他のタイマの異常状態を検出する。
別の好ましい態様では、前記複数のタイマは、外部から前記マイクロコンピュータの入力端子に入力されるパルス信号のエッジを検出するエッジ検出回路を含むハードウェアタイマである。
In a preferred aspect of the vehicle electronic control device, the diagnostic means obtains a measurement time by the other timer in the periodic processing, obtains a time interval of the periodic processing from the acquired measurement time, and the time interval is the first time interval. The normal state of the other timer is detected when it is within a predetermined range of 2, and the abnormal state of the other timer is detected when the time interval is outside the second predetermined range.
In another preferred aspect, the plurality of timers are hardware timers including an edge detection circuit that detects an edge of a pulse signal input to the input terminal of the microcomputer from the outside.

また、車両用電子制御装置のタイマ診断方法は、車両用電子制御装置を構成する複数のタイマを備えたマイクロコンピュータにおいて、外部から入力した基準パルス信号の周期を前記複数のタイマのうちの一部を用いて計測するステップと、前記基準パルス信号の周期計測値が所定範囲内であるか否かを検出するステップと、前記基準パルス信号の周期計測値が所定範囲内であるときに、定周期処理にて他のタイマによる計測時刻を監視するステップと、前記計測時刻に基づき前記他のタイマの異常の有無を検出するステップと、を含む。   In addition, a timer diagnosis method for a vehicle electronic control device includes: a microcomputer including a plurality of timers constituting the vehicle electronic control device, wherein a period of a reference pulse signal input from the outside is a part of the plurality of timers. A step of measuring using a step, a step of detecting whether or not a period measurement value of the reference pulse signal is within a predetermined range, and a period when the period measurement value of the reference pulse signal is within a predetermined range. Monitoring the time measured by another timer in the process, and detecting whether or not the other timer is abnormal based on the time measured.

前記タイマ診断方法の好ましい態様において、前記計測時刻を監視するステップは、定周期処理で前記他のタイマによる計測時刻を取得するステップと、前記取得した計測時刻について定周期処理の時間間隔を求めるステップと、を含む。
別の好ましい態様では、前記他のタイマの異常の有無を検出するステップは、前記時間間隔と第2の所定範囲とを比較するステップと、前記時間間隔が前記第2の所定範囲内であるときに前記他のタイマの正常状態を検出するステップと、前記時間間隔が前記第2の所定範囲外であるときに前記他のタイマの異常状態を検出するステップと、を含む。
In a preferred aspect of the timer diagnosis method, the step of monitoring the measurement time includes a step of acquiring a measurement time by the other timer in a fixed cycle process, and a step of obtaining a time interval of the fixed cycle process for the acquired measurement time And including.
In another preferred aspect, the step of detecting the presence or absence of an abnormality of the other timer includes the step of comparing the time interval with a second predetermined range, and when the time interval is within the second predetermined range. Detecting a normal state of the other timer, and detecting an abnormal state of the other timer when the time interval is outside the second predetermined range.

100…車両用電子制御装置、200…マイクロコンピュータ、210A…第1タイマ、210B…第2タイマ、210C…第3タイマ、211…タイマカウンタ、212…分周器、220…診断手段、300…監視回路、310…パルス信号発生源   DESCRIPTION OF SYMBOLS 100 ... Electronic control apparatus for vehicles, 200 ... Microcomputer, 210A ... 1st timer, 210B ... 2nd timer, 210C ... 3rd timer, 211 ... Timer counter, 212 ... Frequency divider, 220 ... Diagnosis means, 300 ... Monitoring Circuit 310 ... Pulse signal generation source

Claims (6)

複数のタイマを有するマイクロコンピュータを含む車両用電子制御装置であって、
前記マイクロコンピュータは、外部から入力した基準パルス信号の周期を前記複数のタイマのうちの一部を用いて計測し、周期計測値が所定範囲内であるときに、定周期処理にて他のタイマによる計測時刻を監視して前記他のタイマの異常の有無を検出する診断手段を備える、車両用電子制御装置。
An electronic control device for a vehicle including a microcomputer having a plurality of timers,
The microcomputer measures the period of the reference pulse signal input from the outside using a part of the plurality of timers, and when the period measurement value is within a predetermined range, the other timer is used in the periodic process. An electronic control device for a vehicle, comprising diagnostic means for monitoring the measurement time by detecting whether or not the other timer is abnormal.
前記診断手段は、定周期処理において前記他のタイマによる計測時刻を取得し、取得した計測時刻から定周期処理の時間間隔を求め、前記時間間隔が第2の所定範囲内であるときに前記他のタイマの正常状態を検出し、前記時間間隔が前記第2の所定範囲外であるときに前記他のタイマの異常状態を検出する、請求項1記載の車両用電子制御装置。   The diagnostic means acquires a measurement time by the other timer in the periodic processing, obtains a time interval of the periodic processing from the acquired measurement time, and when the time interval is within a second predetermined range, The vehicle electronic control device according to claim 1, wherein a normal state of the timer is detected, and an abnormal state of the other timer is detected when the time interval is outside the second predetermined range. 前記複数のタイマは、前記マイクロコンピュータの入力端子に外部から入力されるパルス信号のエッジを検出するエッジ検出回路を含むハードウェアタイマである、請求項1又は2記載の車両用電子制御装置。   3. The vehicle electronic control device according to claim 1, wherein the plurality of timers are hardware timers including an edge detection circuit that detects an edge of a pulse signal input from the outside to an input terminal of the microcomputer. 車両用電子制御装置を構成する複数のタイマを備えたマイクロコンピュータにおいて、
外部から入力した基準パルス信号の周期を前記複数のタイマのうちの一部を用いて計測するステップと、
前記基準パルス信号の周期計測値が所定範囲内であるか否かを検出するステップと、
前記基準パルス信号の周期計測値が所定範囲内であるときに、定周期処理にて他のタイマによる計測時刻を監視するステップと、
前記計測時刻に基づき前記他のタイマの異常の有無を検出するステップと、
を含む、タイマ診断方法。
In a microcomputer provided with a plurality of timers constituting an electronic control device for a vehicle,
Measuring a period of a reference pulse signal input from the outside using a part of the plurality of timers;
Detecting whether the period measurement value of the reference pulse signal is within a predetermined range;
When the period measurement value of the reference pulse signal is within a predetermined range, monitoring the measurement time by another timer in a periodic process;
Detecting the presence or absence of an abnormality of the other timer based on the measurement time;
Including a timer diagnostic method.
前記計測時刻を監視するステップは、
定周期処理で前記他のタイマによる計測時刻を取得するステップと、
前記取得した計測時刻について定周期処理の時間間隔を求めるステップと、
を含む、請求項4記載のタイマ診断方法。
The step of monitoring the measurement time includes:
Obtaining a measurement time by the other timer in a periodic process;
Obtaining a time interval of the periodic processing for the acquired measurement time;
The timer diagnosis method according to claim 4, comprising:
前記他のタイマの異常の有無を検出するステップは、
前記時間間隔と第2の所定範囲とを比較するステップと、
前記時間間隔が前記第2の所定範囲内であるときに前記他のタイマの正常状態を検出するステップと、
前記時間間隔が前記第2の所定範囲外であるときに前記他のタイマの異常状態を検出するステップと、
を含む、請求項5記載のタイマ診断方法。
Detecting the presence or absence of an abnormality of the other timer,
Comparing the time interval with a second predetermined range;
Detecting a normal state of the other timer when the time interval is within the second predetermined range;
Detecting an abnormal state of the other timer when the time interval is outside the second predetermined range;
The timer diagnosis method according to claim 5, comprising:
JP2016110901A 2016-06-02 2016-06-02 Vehicle electronic control unit and timer diagnostic method Active JP6757182B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016110901A JP6757182B2 (en) 2016-06-02 2016-06-02 Vehicle electronic control unit and timer diagnostic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016110901A JP6757182B2 (en) 2016-06-02 2016-06-02 Vehicle electronic control unit and timer diagnostic method

Publications (2)

Publication Number Publication Date
JP2017214912A true JP2017214912A (en) 2017-12-07
JP6757182B2 JP6757182B2 (en) 2020-09-16

Family

ID=60575504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016110901A Active JP6757182B2 (en) 2016-06-02 2016-06-02 Vehicle electronic control unit and timer diagnostic method

Country Status (1)

Country Link
JP (1) JP6757182B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02297226A (en) * 1989-05-10 1990-12-07 Fujitsu Ltd Timer fault detecting system
JPH09204239A (en) * 1996-01-25 1997-08-05 Hitachi Ltd Digital processor
JP2002089336A (en) * 2000-09-19 2002-03-27 Nissan Motor Co Ltd Failure detection device for electronic control system of vehicle
JP2010113544A (en) * 2008-11-06 2010-05-20 Fujitsu Ten Ltd Timer value generation device and timer value generation method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02297226A (en) * 1989-05-10 1990-12-07 Fujitsu Ltd Timer fault detecting system
JPH09204239A (en) * 1996-01-25 1997-08-05 Hitachi Ltd Digital processor
JP2002089336A (en) * 2000-09-19 2002-03-27 Nissan Motor Co Ltd Failure detection device for electronic control system of vehicle
JP2010113544A (en) * 2008-11-06 2010-05-20 Fujitsu Ten Ltd Timer value generation device and timer value generation method

Also Published As

Publication number Publication date
JP6757182B2 (en) 2020-09-16

Similar Documents

Publication Publication Date Title
US7359776B2 (en) Apparatus for correcting and diagnosing angular rate sensors installed in an automotive vehicle
US10006455B2 (en) Drive control apparatus
JP6382882B2 (en) Brake inspection device and brake inspection method
JP5476238B2 (en) Semiconductor device
JP5987997B2 (en) Midway failure diagnosis system and electric power steering device equipped with the same
EP1154237A1 (en) Fault monitoring system
EP3349003B1 (en) Rotating machine abnormality detection device, rotating machine abnormality detection method, and rotating machine
US8311169B2 (en) Automatic frequency monitoring circuit, electronic device, automatic frequency monitoring method, and automatic frequency monitoring program
US8825446B2 (en) Independently based diagnostic monitoring
KR20160035337A (en) Motor control system for considering functional safety
JP5927865B2 (en) Control device having sensor failure diagnosis function
JP6757182B2 (en) Vehicle electronic control unit and timer diagnostic method
JPWO2018193508A1 (en) Failure diagnosis device and failure diagnosis method
JP5731141B2 (en) Analog signal input device
JP5879214B2 (en) Abnormality diagnosis method, abnormality diagnosis device, and passenger conveyor equipped with abnormality diagnosis device
US9574925B2 (en) Fluid measurement device having a circuit for precise flow measurement
JP6329648B2 (en) Failure detection device
JP2007026028A (en) Device for detecting abnormality in microcomputer
JP6081239B2 (en) Control device abnormality monitoring apparatus and abnormality monitoring method
JP5299312B2 (en) Inertial force sensor device
JP4777875B2 (en) Method and device for detecting rotational speed, in particular vehicle wheel rotational speed
US9123188B2 (en) Acceleration sensor fault detection apparatus
JP2018189619A (en) Abnormality diagnostic device of rotation angle sensor information
KR20110136993A (en) Sensing logic of voltage variation of accelerator pedal sensor
JP4308624B2 (en) Engine control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190520

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200407

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200608

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200828

R150 Certificate of patent or registration of utility model

Ref document number: 6757182

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250