JP6533489B2 - Vehicle controller - Google Patents

Vehicle controller Download PDF

Info

Publication number
JP6533489B2
JP6533489B2 JP2016104193A JP2016104193A JP6533489B2 JP 6533489 B2 JP6533489 B2 JP 6533489B2 JP 2016104193 A JP2016104193 A JP 2016104193A JP 2016104193 A JP2016104193 A JP 2016104193A JP 6533489 B2 JP6533489 B2 JP 6533489B2
Authority
JP
Japan
Prior art keywords
processing unit
register
value
config register
config
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.)
Active
Application number
JP2016104193A
Other languages
Japanese (ja)
Other versions
JP2017211812A (en
Inventor
悠貴 冨田
悠貴 冨田
淳一 渋澤
淳一 渋澤
政博 清水
政博 清水
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 JP2016104193A priority Critical patent/JP6533489B2/en
Publication of JP2017211812A publication Critical patent/JP2017211812A/en
Application granted granted Critical
Publication of JP6533489B2 publication Critical patent/JP6533489B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、車載用制御装置に関する。   The present invention relates to an on-vehicle control device.

機能安全に関する国際標準としてISO26262等が制定され、自動車の安全性能へのニーズが高まっている。安全性能へのニーズに対応すべく、車両に複数搭載されている車載用ECU(Electronic Control Unit)に関して、ECUの中のマイクロコンピュータ(以降、マイコンと呼ぶ)は、周辺機能を診断する機能を備える場合がある。   ISO26262 etc. are established as an international standard on functional safety, and the need for safety performance of cars is increasing. In order to meet needs for safety performance, a microcomputer (hereinafter referred to as a microcomputer) in the ECU has a function to diagnose peripheral functions with respect to a plurality of in-vehicle ECUs (Electronic Control Units) mounted on the vehicle. There is a case.

マイコンは、周辺機能(例えば、AD変換器やCANコントローラなど)の動作モード等を設定するコンフィグレーションレジスタ(以降、Configレジスタと呼ぶ)を備える。しかし、Configレジスタの設定が外来ノイズ等の様々な要因で異常をきたす場合がある。この場合、Configレジスタの設定により動作している周辺機能は正しく動作しなくなる。   The microcomputer is provided with a configuration register (hereinafter referred to as a Config register) for setting an operation mode or the like of a peripheral function (for example, an AD converter or a CAN controller). However, the setting of the Config register may cause an abnormality due to various factors such as external noise. In this case, the peripheral functions operating due to the setting of the Config register do not operate properly.

特許文献1は、Configレジスタが正しく設定されているか否かを判定し、否の場合にはConfigレジスタを再設定する技術を開示している。   Patent Document 1 discloses a technique of determining whether or not the Config register is correctly set, and resetting the Config register in the case of no.

特開2009−205528号公報JP, 2009-205528, A

特許文献1では、Configレジスタの格納値と周辺機能の動作開始時に設定される設定値との比較処理と、前記比較処理の結果にて設定値が異なるときにConfigレジスタに前記設定値を再設定する再設定処理(以降、レジスタ診断)とを所定時間毎に繰り返し実行している。   In Patent Document 1, the setting value is reset in the Config register when the setting value differs depending on the comparison processing between the stored value of the Config register and the setting value set at the start of the operation of the peripheral function. Resetting processing (hereinafter, register diagnosis) to be performed is repeatedly executed at predetermined time intervals.

しかし、車両に搭載されているConfigレジスタは数百〜数千あり、全てのレジスタを所定時間毎に繰り返し診断していると、演算負荷が増加し、車両制御に影響を与えてしまう可能性があった。   However, there are hundreds to thousands of Config registers installed in the vehicle, and if all registers are repeatedly diagnosed every predetermined time, the calculation load may increase, which may affect vehicle control. there were.

そこで、本発明は、上記課題に鑑みてなされたものであり、数百〜数千あるConfigレジスタの診断の演算負荷を低減し、車両制御への影響を従来に比べて低減する技術を提供する。   Therefore, the present invention has been made in view of the above problems, and provides a technology for reducing the calculation load of diagnosis of several hundreds to several thousands of Config registers and reducing the influence on vehicle control compared to the prior art. .

例えば、上記課題を解決するために、特許請求の範囲に記載の構成を採用する。本願は上記課題を解決する手段を複数含んでいるが、その一例をあげるならば、車載用制御装置であって、周辺機能の動作に関する設定値を格納するコンフィグレーションレジスタと、前記車載用制御装置の起動時に前記設定値の初期設定値を前記コンフィグレーションレジスタに設定する初期化処理部と、前記周辺機能が正常に動作しているか否かを診断する周辺機能診断処理部と、前記周辺機能診断処理部によって異常が検出されたときに、前記コンフィグレーションレジスタの現時点の値と前記初期設定値とを比較し、前記現時点の値が正常であるかを判定するレジスタ診断処理部とを備える車載用制御装置が提供される。   For example, in order to solve the above-mentioned subject, composition indicated in a claim is adopted. The present application includes a plurality of means for solving the above problems, and an example thereof is an on-vehicle control device, and a configuration register for storing setting values related to the operation of peripheral functions, and the on-vehicle control device An initialization processing unit that sets an initial setting value of the setting value in the configuration register when starting up; a peripheral function diagnosis processing unit that diagnoses whether or not the peripheral function is operating normally; When the abnormality is detected by the processing unit, the present value of the configuration register is compared with the initial set value, and a register diagnostic processing unit is used to determine whether the current value is normal or not. A controller is provided.

本発明によれば、数百〜数千あるConfigレジスタの診断の演算負荷を低減し、車両制御への影響を従来に比べて低減することができる。本発明に関連する更なる特徴は、本明細書の記述、添付図面から明らかになるものである。また、上記した以外の、課題、構成及び効果は、以下の実施例の説明により明らかにされる。   According to the present invention, it is possible to reduce the calculation load of diagnosis of several hundreds to several thousands of Config registers, and to reduce the influence on vehicle control as compared with the prior art. Further features related to the present invention will become apparent from the description of the present specification and the accompanying drawings. The problems, configurations and effects other than those described above will be clarified by the description of the following embodiments.

車載用制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of a vehicle-mounted control apparatus. 本発明の実施例であるコントロールユニットのAD変換を実施する部分を示す構成図である。It is a block diagram which shows the part which implements AD conversion of the control unit which is an Example of this invention. 本発明の実施例であるAD診断の手順を示すフローチャートである。It is a flowchart which shows the procedure of AD diagnosis which is an Example of this invention. 本発明の実施例であるConfigレジスタ診断の手順を示すフローチャートである。It is a flow chart which shows a procedure of Config register diagnosis which is an example of the present invention.

以下、添付図面を参照して本発明の実施例について説明する。添付図面は本発明の原理に則った具体的な実施例を示しているが、これらは本発明の理解のためのものであり、決して本発明を限定的に解釈するために用いられるものではない。   Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. The drawings illustrate specific embodiments consistent with the principles of the invention, but are for the purpose of understanding the invention and are by no means intended to be construed as limiting the invention. .

以下の実施例は、車両の動作を制御する際に利用される、ECUの中のマイコンの周辺機能の動作モード等を設定するConfigレジスタを設定する技術に関する。   The following embodiment relates to a technique for setting a Config register for setting an operation mode or the like of a peripheral function of a microcomputer in an ECU, which is used when controlling the operation of a vehicle.

以下の実施例は、Configレジスタの設定により動作している周辺機能に異常があるかを判定する診断処理の結果をトリガとして、異常を検知した周辺機能に関するConfigレジスタに限定してレジスタ診断を行う点に特徴がある。この構成によれば、異常の発生していない周辺機能に関するレジスタ診断を行う事なく、異常の発生している周辺機能に関するConfigレジスタのみに限定してレジスタ診断を行う事が可能となる。   The following embodiment uses the result of the diagnostic processing to determine whether there is an abnormality in the operating peripheral function by setting the Config register as a trigger, and performs register diagnosis limited to the Config register related to the peripheral function that detected the abnormality. There is a feature in the point. According to this configuration, it is possible to perform register diagnosis limited to only the Config register relating to the peripheral function in which the abnormality occurs without performing the register diagnosis on the peripheral function in which the abnormality does not occur.

図1は、車載用制御装置の構成を示すブロック図である。車載用制御装置100は、制御対象機器130を制御する装置であり、マイコン110を備える。マイコン110は、CPU(Central Processing Unit)111と、メモリ112とを備える。CPU111とメモリ112とはバス113によって接続されている。メモリ112は、ROM(Read Only Memory)121と、RAM(Random Access Memory)122とを備える。   FIG. 1 is a block diagram showing the configuration of the in-vehicle control device. The on-vehicle control device 100 is a device that controls the control target device 130, and includes a microcomputer 110. The microcomputer 110 includes a central processing unit (CPU) 111 and a memory 112. The CPU 111 and the memory 112 are connected by a bus 113. The memory 112 includes a read only memory (ROM) 121 and a random access memory (RAM) 122.

CPU111は、ROM121に格納されている制御プログラムの指示にしたがって、制御対象機器130に対する制御演算を実行する演算装置である。ROM121は、CPU111が実行する制御プログラムを格納する記憶装置である。RAM122は、例えば、CPU111が制御プログラムを実行している間に用いる変数などのデータを格納する記憶装置である。   The CPU 111 is an arithmetic device that executes control calculation on the control target device 130 in accordance with an instruction of a control program stored in the ROM 121. The ROM 121 is a storage device that stores a control program that the CPU 111 executes. The RAM 122 is, for example, a storage device that stores data such as variables used while the CPU 111 is executing the control program.

制御対象機器130は、任意の機器でよい。以下では車両変速機用の制御装置を説明するが、これに限定されない。制御対象機器130として、アクチュエータ、センサ、スイッチ、他のコントロールユニットなどでもよい。   The control target device 130 may be any device. Although the control device for a vehicle transmission is described below, it is not limited thereto. The control target device 130 may be an actuator, a sensor, a switch, another control unit, or the like.

図2は、車両変速機用制御装置のAD変換を実施する部分の構成図である。車両変速機の制御装置であるATCU(Automatic Transmission Control Unit)200は、AD変換器(ANALOG to DIGITAL変換器)210と、AD変換器210が正常に動作しているか診断するAD診断部220と、ATCU200起動時に初期化処理を実行する初期化処理部250とを備える。AD診断部220は、ソフトウェアの形式(CPU111が実行するプログラムの形式)で実現される。   FIG. 2 is a block diagram of a portion for performing AD conversion of the control device for a vehicle transmission. An automatic transmission control unit (ATCU) 200, which is a control device for a vehicle transmission, includes an AD converter (ANALOG to DIGITAL converter) 210 and an AD diagnosis unit 220 that diagnoses whether the AD converter 210 is operating normally. And an initialization processing unit 250 that executes initialization processing when the ATCU 200 starts up. The AD diagnosis unit 220 is realized in the form of software (a form of a program executed by the CPU 111).

AD変換器210は、Configレジスタ211と、AD変換コントロール回路212と、Dataレジスタ213とを備える。Configレジスタ211は、AD変換器210の動作モードに関する設定データや、動作又は停止させる際に設定されるデータを格納する。AD変換コントロール回路212は、Configレジスタ211の設定に従い、外部からのアナログ入力230をデジタル値に変換する。Dataレジスタ213は、AD変換コントロール回路212によって変換されたデジタル値を格納する。   The AD converter 210 includes a Config register 211, an AD conversion control circuit 212, and a Data register 213. The Config register 211 stores setting data relating to the operation mode of the AD converter 210, and data set when the operation or the operation is stopped. The AD conversion control circuit 212 converts the external analog input 230 into a digital value according to the setting of the Config register 211. The Data register 213 stores the digital value converted by the AD conversion control circuit 212.

初期化処理部250は、ATCU200起動時に一度だけ初期化処理を実行し、AD変換器210に関する設定データをConfigレジスタ211に設定する。なお、初期化処理部250によって設定される設定値は、ROM121に予め格納されている。また、Dataレジスタ213に格納されたデジタル値は、ソフトウェアの命令により出力(AD変換値)240としてRAM122に格納される。   The initialization processing unit 250 executes initialization processing only once when the ATCU 200 is started, and sets setting data regarding the AD converter 210 in the Config register 211. The setting values set by the initialization processing unit 250 are stored in advance in the ROM 121. Also, the digital value stored in the Data register 213 is stored in the RAM 122 as an output (AD conversion value) 240 by an instruction of software.

AD診断部220は、AD診断処理部221と、Configレジスタ診断処理部222とを備える。AD診断処理部221は、AD変換器210に異常があるか否かを診断する。AD診断処理部221は、異常ありと診断した場合、トリガとして、異常が検出された旨の通知をConfigレジスタ診断処理部222に出力する。Configレジスタ診断処理部222は、AD診断処理部221からの異常検知の通知をトリガとして動作し、Configレジスタ211に異常があるか否かを診断する。   The AD diagnosis unit 220 includes an AD diagnosis processing unit 221 and a Config register diagnosis processing unit 222. The AD diagnosis processing unit 221 diagnoses whether the AD converter 210 has an abnormality. When diagnosing that there is an abnormality, the AD diagnosis processing unit 221 outputs, as a trigger, a notification that the abnormality has been detected to the Config register diagnosis processing unit 222. The Config register diagnosis processing unit 222 operates with the notification of abnormality detection from the AD diagnosis processing unit 221 as a trigger, and diagnoses whether or not there is an abnormality in the Config register 211.

Configレジスタ211に設定されている設定値(AD変換コントロール回路212の動作に関する設定)と、初期化処理部250によって設定した設定値(以降、初期設定値と呼ぶ)とが一致しない場合、外来ノイズ等の様々な要因でConfigレジスタ211が書き換わった可能性がある。したがって、Configレジスタ診断処理部222は、Configレジスタ211に設定されている設定値と、初期設定値とを比較し、これらが一致しない場合、Configレジスタ211に対して初期設定値を再設定する処理を繰り返し実行する。   If the setting value (setting relating to the operation of the AD conversion control circuit 212) set in the Config register 211 does not match the setting value set by the initialization processing unit 250 (hereinafter referred to as initial setting value), foreign noise It is possible that the Config register 211 has been rewritten due to various factors such as. Therefore, the Config register diagnostic processing unit 222 compares the setting value set in the Config register 211 with the initial setting value, and when the values do not match, resets the initial setting value in the Config register 211. Run repeatedly.

上記の再設定の繰り返し実行回数が規定回数“N”(Nは任意の値)以上となった場合、Configレジスタ診断処理部222は、Configレジスタ211に異常があると判定し、故障モード260に移行する。故障モード260は、例えば、車両として最低限の機能のみ維持した状態で動作する等のモードである。   If the number of repeated executions of the above resetting becomes equal to or more than the specified number “N” (N is an arbitrary value), the Config register diagnosis processing unit 222 determines that the Config register 211 has an abnormality, Transition. The failure mode 260 is, for example, a mode in which the vehicle operates with only the minimum function maintained.

また、上記の再設定の間、規定回数“N”を超える前に、Configレジスタ211を読みだした結果と初期設定値とが一致した場合、Configレジスタ診断処理部222は、AD診断処理部221に再診断の指示を送る。AD診断処理部221は、再度、AD変換器210に異常があるか否かを診断する。その後、AD診断処理部221が、AD変換器210に異常が無いと判定した場合、通常の車両制御処理を継続することができる。   If the result of reading the Config register 211 matches the initial set value before the specified number of times “N” is exceeded during the above resetting, the Config register diagnosis processing unit 222 determines that the AD diagnosis processing unit 221 Send a rediagnostic instruction to The AD diagnosis processing unit 221 again diagnoses whether or not there is an abnormality in the AD converter 210. Thereafter, when the AD diagnosis processing unit 221 determines that there is no abnormality in the AD converter 210, normal vehicle control processing can be continued.

一方、Configレジスタ診断処理部222は、Configレジスタ211に設定されている設定値と、初期設定値とが一致した場合、Configレジスタ211の値が正常である(正しく設定されている)と判定する。この時、Configレジスタ211は正しく設定されているため、Configレジスタ診断処理部222は、Configレジスタ211の異常ではなく、AD変換器210に異常があると判定する。この場合、AD変換器210の異常をトリガとした故障モード260に移行する。   On the other hand, when the set value set in the Config register 211 matches the initial set value, the Config register diagnostic processing unit 222 determines that the value of the Config register 211 is normal (correctly set). . At this time, since the Config register 211 is correctly set, the Config register diagnostic processing unit 222 determines that the AD converter 210 is abnormal, not the Config register 211. In this case, transition to a failure mode 260 triggered by an abnormality in the AD converter 210 is made.

図3は、AD診断の手順を示すフローチャートである。以下では、図2のAD診断部220の各機能ブロックを主語として説明を行うが、上述した通り、CPU111が、AD診断部220の制御プログラムを読みだして実行するため、CPU111を主語とした説明としてもよい。   FIG. 3 is a flowchart showing a procedure of AD diagnosis. The following description is given with each functional block of the AD diagnosis unit 220 of FIG. 2 as a subject, but as described above, since the CPU 111 reads and executes the control program of the AD diagnosis unit 220, the description with the CPU 111 as the subject It may be

(S301)
AD診断処理部221は、AD変換器210が正常に動作しているか否かの診断処理を実行する。ここで、AD診断の例を示す。AD診断処理部221は、図2の初期化処理部250によって設定されたConfigレジスタ211に従い動作するAD変換コントロール回路212に対して、事前に電圧値が決まっている基準電圧をアナログ入力230として入力する。AD変換コントロール回路212は、入力された基準電圧をAD変換し、AD変換値をDataレジスタ213に格納する。その後、AD変換値は、ソフトウェアによって、出力(AD変換値)240としてRAM122に格納される。
(S301)
The AD diagnosis processing unit 221 executes a process of diagnosing whether the AD converter 210 is operating normally. Here, an example of AD diagnosis is shown. The AD diagnosis processing unit 221 inputs, as the analog input 230, a reference voltage whose voltage value is determined in advance to the AD conversion control circuit 212 that operates in accordance with the Config register 211 set by the initialization processing unit 250 in FIG. Do. The AD conversion control circuit 212 AD converts the input reference voltage and stores the AD converted value in the Data register 213. Thereafter, the AD conversion value is stored in the RAM 122 as an output (AD conversion value) 240 by software.

(S302)
AD診断処理部221は、上記基準電圧とRAM122に格納されたAD変換値240とを比較し、AD変換値240が上記基準電圧に対して有効範囲(例えば基準電圧±xx[mV]等。xxは任意の値とする。)内にあるか否かを判定することで、AD変換器210が正常に動作しているかを診断する。AD変換器210が正常に動作している場合(YES)、AD診断処理を終了する。一方、AD変換器210が正常に動作していない(すなわち、AD変換器210の異常を検出した)場合(NO)、AD診断処理部221は、トリガとして、異常が検出された旨の通知をConfigレジスタ診断処理部222に出力し、S303へ進む。
(S302)
The AD diagnosis processing unit 221 compares the reference voltage with the AD converted value 240 stored in the RAM 122, and the AD converted value 240 is effective with respect to the reference voltage (for example, reference voltage ± xx [mV] etc., etc. xx Is determined to be within an arbitrary value) to diagnose whether the AD converter 210 is operating normally. If the AD converter 210 is operating normally (YES), the AD diagnosis processing is ended. On the other hand, when the AD converter 210 does not operate normally (that is, when an abnormality of the AD converter 210 is detected) (NO), the AD diagnosis processing unit 221 notifies that an abnormality is detected as a trigger. Output to the Config register diagnostic processing unit 222, and proceed to S303.

(S303)
Configレジスタ診断処理部222は、Configレジスタ211の診断処理を実行する。この処理の詳細は後述する。この処理では、Configレジスタ故障フラグ及びConfigレジスタ再設定フラグが設定される。Configレジスタ故障フラグは、「Configレジスタ211自体が異常である」ことを示すフラグである。Configレジスタ再設定フラグは、「Configレジスタ211に対して初期設定値(初期化処理部250によって設定した設定値)を再設定する処理が実行された」ことを示すフラグである。なお、Configレジスタ故障フラグ及びConfigレジスタ再設定フラグにはグローバル変数が使用されており、AD診断処理部221は各フラグを参照することが可能である。
(S303)
The Config register diagnostic processing unit 222 executes a diagnostic process of the Config register 211. Details of this process will be described later. In this process, the Config register failure flag and the Config register reset flag are set. The Config register failure flag is a flag indicating that “Config register 211 itself is abnormal”. The Config register reset flag is a flag indicating that “processing for resetting an initial setting value (setting value set by the initialization processing unit 250) to the Config register 211 has been performed”. Note that global variables are used for the Config register failure flag and the Config register reset flag, and the AD diagnosis processing unit 221 can refer to each flag.

(S304)
AD診断処理部221は、Configレジスタ再設定フラグがセットされているかを判定する。Configレジスタ再設定フラグがセットされている場合(YES)、ステップS301に戻る。一方、Configレジスタ再設定フラグがセットされていない場合(NO)、ステップS305に進む。
(S304)
The AD diagnosis processing unit 221 determines whether the Config register reset flag is set. If the Config register reset flag is set (YES), the process returns to step S301. On the other hand, if the Config register reset flag is not set (NO), the process proceeds to step S305.

(S305)
AD診断処理部221は、Configレジスタ故障フラグがセットされているかを判定する。Configレジスタ故障フラグがセットされている場合(YES)、ステップS306に進む。一方、Configレジスタ故障フラグがセットされていない場合(NO)、ステップS307に進む。
(S305)
The AD diagnosis processing unit 221 determines whether the Config register failure flag is set. If the Config register failure flag is set (YES), the process proceeds to step S306. On the other hand, if the Config register failure flag is not set (NO), the process proceeds to step S307.

(S306)
AD診断処理部221は、Configレジスタ故障フラグがセットされている場合、AD変換器210の故障でなく、Configレジスタ211に異常があると判定し、レジスタ異常であることをRAM122に記憶し、AD診断処理を終了する。その後続く車両制御処理において、レジスタ異常をトリガとした故障モード260に移行する。
(S306)
When the Config register failure flag is set, the AD diagnosis processing unit 221 determines that the Config register 211 is abnormal, not the failure of the AD converter 210, stores the register abnormality in the RAM 122, and End the diagnostic process. Thereafter, in the vehicle control processing that follows, transition to the failure mode 260 triggered by the register abnormality is made.

(S307)
AD診断処理部221は、Configレジスタ故障フラグがセットされていない場合、AD変換器異常であることをRAM122に記憶し、AD診断処理を終了する。その後続く車両制御処理において、AD変換器異常をトリガとした故障モード260に移行する。
(S307)
If the Config register failure flag is not set, the AD diagnosis processing unit 221 stores that the AD converter is abnormal in the RAM 122, and ends the AD diagnosis process. Thereafter, in the vehicle control processing that follows, transition to a failure mode 260 triggered by an AD converter abnormality is made.

図4は、Configレジスタ診断(図3のS303)の手順を示すフローチャートである。Configレジスタ診断処理部222は、AD変換器210自体に異常があるか否か、及び、Configレジスタ211自体に異常があるか否かを判断するために、Configレジスタ故障フラグ及びConfigレジスタ再設定フラグを設定する。   FIG. 4 is a flowchart showing the procedure of the Config register diagnosis (S303 in FIG. 3). The Config register diagnostic processing unit 222 determines whether or not there is an abnormality in the AD converter 210 itself, and whether or not there is an abnormality in the Config register 211 itself. Set

(S401)
Configレジスタ診断処理部222は、レジスタ比較カウンタを“0”に設定し、Configレジスタ故障フラグ及びConfigレジスタ再設定フラグをクリアする。
(S401)
The Config register diagnostic processing unit 222 sets the register comparison counter to “0”, and clears the Config register failure flag and the Config register reset flag.

(S402)
続いて、Configレジスタ診断処理部222は、初期化処理部250によって設定されたAD変換器210に関わるConfigレジスタ211の値(現時点での値)を読みだす。
(S402)
Subsequently, the Config register diagnostic processing unit 222 reads the value (value at the present time) of the Config register 211 related to the AD converter 210 set by the initialization processing unit 250.

(S403)
Configレジスタ診断処理部222は、ステップS402で読みだした現時点での値と、初期化処理部250によって設定される初期設定値(ROM121に予め格納されている値)とを比較する。これらの値が一致しない場合、S404に進む。一方、これらの値が一致する場合、S408に進む。
(S403)
The Config register diagnostic processing unit 222 compares the value at the current time read out in step S402 with the initial setting value (value stored in advance in the ROM 121) set by the initialization processing unit 250. If these values do not match, the process proceeds to S404. On the other hand, if these values match, the process proceeds to S408.

(S404)
ステップS402で読みだした現時点での値と、初期設定値とが一致しない場合、Configレジスタ診断処理部222は、Configレジスタ211に対して初期設定値を再設定する。
(S404)
If the value at the current time read out in step S402 does not match the initial setting value, the Config register diagnostic processing unit 222 resets the initial setting value in the Config register 211.

(S405)
次に、Configレジスタ診断処理部222は、レジスタ比較カウンタをインクリメントする。
(S405)
Next, the Config register diagnostic processing unit 222 increments the register comparison counter.

(S406)
次に、Configレジスタ診断処理部222は、レジスタ比較カウンタが規定回数“N”より小さいかを判定する。レジスタ比較カウンタがNより小さい場合(YES)、ステップS402に戻る。レジスタ比較カウンタがN以上の場合(NO)、S407に進む。
(S406)
Next, the Config register diagnostic processing unit 222 determines whether the register comparison counter is smaller than the specified number “N”. If the register comparison counter is smaller than N (YES), the process returns to step S402. If the register comparison counter is N or more (NO), the process proceeds to S407.

(S407)
Configレジスタ診断処理部222は、AD変換器210の故障でなくConfigレジスタ211に異常があると判定し、Configレジスタ故障フラグをセットする。その後、Configレジスタ診断処理を終了する。
(S407)
The Config register diagnostic processing unit 222 determines that there is an abnormality in the Config register 211 instead of the failure of the AD converter 210, and sets a Config register failure flag. Thereafter, the Config register diagnostic process ends.

(S408)
ステップS402で読みだした現時点での値と、初期設定値とが一致する場合、Configレジスタ診断処理部222は、レジスタ比較カウンタが“0”であるかを判定する。レジスタ比較カウンタが“0”の場合(YES)、Configレジスタ診断処理部222は、Configレジスタ211が再設定されることなく正常に動作していると判定し、Configレジスタ診断処理を終了する。一方、レジスタ比較カウンタが“0”でない(すなわち、レジスタ比較カウンタが、1以上、N未満である)場合(NO)、Configレジスタ211の再設定処理(S404)が正常に行われたことを表す。この場合、S409に進む。
(S408)
If the value at the current time read out in step S402 matches the initial set value, the Config register diagnosis processing unit 222 determines whether the register comparison counter is "0". If the register comparison counter is “0” (YES), the Config register diagnostic processing unit 222 determines that the Config register 211 is operating normally without being reset, and ends the Config register diagnostic process. On the other hand, if the register comparison counter is not "0" (that is, the register comparison counter is not less than 1 and less than N) (NO), it indicates that the reconfiguration process (S404) of the Config register 211 has been performed normally. . In this case, the process proceeds to S409.

(S409)
Configレジスタ診断処理部222は、Configレジスタ211の再設定が正常に行われたと判定し、Configレジスタ再設定フラグをセットする。その後、Configレジスタ診断処理を終了する。
(S409)
The Config register diagnostic processing unit 222 determines that the reconfiguration of the Config register 211 has been normally performed, and sets a Config register reconfiguration flag. Thereafter, the Config register diagnostic process ends.

上記の処理の特徴をまとめると以下となる。Configレジスタ診断処理部222は、Configレジスタ211の現時点の値を読みだし、当該読みだした値と初期設定値(初期化処理部250によって設定される値)とを比較し、読みだした値が正常であるかを判定する。読みだした値が正常でない場合、Configレジスタ診断処理部222は、Configレジスタ211への再設定を繰り返し実行する。Configレジスタ診断処理部222は、再設定の繰り返し実行回数が規定回数“N”(Nは任意の回数)以上となった場合、Configレジスタ211が故障していると判定する。このとき、Configレジスタ診断処理部222は、Configレジスタ故障フラグをセットする。   The features of the above processing are summarized below. The Config register diagnostic processing unit 222 reads the current value of the Config register 211, compares the read value with the initial setting value (the value set by the initialization processing unit 250), and the read value is Determine whether it is normal. If the read value is not normal, the Config register diagnostic processing unit 222 repeatedly executes resetting of the Config register 211. The Config register diagnostic processing unit 222 determines that the Config register 211 has a failure when the number of times of repetitive execution of the resetting is equal to or more than the specified number “N” (N is an arbitrary number). At this time, the Config register diagnostic processing unit 222 sets a Config register failure flag.

また、規定回数“N”を超える前に再設定ができた後、Configレジスタ診断処理部222は、Configレジスタ211から読みだした値と初期設定値とを比較し、これらの値が一致した場合、Configレジスタ再設定フラグをセットする。   In addition, after resetting can be performed before the specified number of times “N” is exceeded, the Config register diagnostic processing unit 222 compares the value read from the Config register 211 with the initial setting value, and when these values match Set the Config register reset flag.

従来では、所定の時間毎にレジスタ診断処理を繰り返し実行していたが、上記の実施例によれば、異常がある周辺機能に関するConfigレジスタに限定してレジスタ診断を行うことができる。これにより、所定時間毎にレジスタ診断を動作させなくても、異常の発生している周辺機能に関するConfigレジスタのみのレジスタ診断を行う事が可能となり、レジスタ診断の演算時間を低減する事が可能となる。その結果、レジスタ診断の演算負荷を低減し、車両制御への影響を無くすことができる。   Conventionally, the register diagnosis process has been repeatedly executed at predetermined time intervals. However, according to the above embodiment, the register diagnosis can be performed with limitation to the Config register relating to the peripheral function having an abnormality. As a result, even if the register diagnosis is not operated every predetermined time, the register diagnosis of only the Config register related to the peripheral function in which the abnormality occurs can be performed, and the calculation time of the register diagnosis can be reduced. Become. As a result, it is possible to reduce the calculation load of register diagnosis and to eliminate the influence on vehicle control.

また、上記の実施例によれば、Configレジスタ211の異常の場合には、Configレジスタ211への再設定の処理が実行される。再設定が正常に行われると、故障モード260へ移行することなく、車両制御を継続して行うことが可能となる。   Also, according to the above embodiment, in the case of an abnormality in the Config register 211, processing for resetting the Config register 211 is executed. If resetting is normally performed, vehicle control can be continuously performed without shifting to the failure mode 260.

また、上記の実施例によれば、Configレジスタ211の異常と、周辺機能(AD変換器210)の異常とを区別して判定することができる。特に、Configレジスタ211への再設定の処理が繰り返し失敗した場合は、Configレジスタ211の異常と判定される。また、Configレジスタ211が正常に設定されているにもかかわらず、周辺機能(AD変換器210)が異常である場合には、周辺機能(AD変換器210)の異常と判定される。   Further, according to the above embodiment, it is possible to distinguish and determine the abnormality of the Config register 211 and the abnormality of the peripheral function (AD converter 210). In particular, when the process of resetting the Config register 211 repeatedly fails, it is determined that the Config register 211 is abnormal. If the peripheral function (AD converter 210) is abnormal although the Config register 211 is normally set, it is determined that the peripheral function (AD converter 210) is abnormal.

なお、上記の実施例では、AD変換器210を例にしたが、これに限定されない。Configレジスタの設定により動作する周辺機能があり、かつ、その周辺機能の診断処理がある車載用制御装置であれば、本発明を適用可能である。例えば、車両内のエンジン及びステアリングなどを制御する複数個の車載用ECUとのリアルタイム通信を制御する為のCANコントローラの動作を設定するConfigレジスタに対しても本発明を適用可能である。このConfigレジスタの異常発生に本発明を適用することで、異常となることなく、通常通り通信制御を行う事が可能となる。なお、Configレジスタの再設定が不可能な場合でも本発明を適用することができる。この場合、例えば、CANコントローラの異常でなく、Configレジスタに異常があるかどうかの判定を行うことが可能となる。   In the above embodiment, although the AD converter 210 is taken as an example, the present invention is not limited to this. The present invention is applicable to an on-vehicle control device that has a peripheral function that operates according to the setting of the Config register and that has a diagnostic process of the peripheral function. For example, the present invention can also be applied to a Config register that sets the operation of a CAN controller for controlling real-time communication with a plurality of in-vehicle ECUs that control an engine and steering in a vehicle. By applying the present invention to the occurrence of abnormality of the Config register, it becomes possible to perform communication control as usual without becoming abnormal. The present invention can be applied even when reconfiguration of the Config register is not possible. In this case, for example, it is possible to determine whether there is an abnormality in the Config register instead of the abnormality in the CAN controller.

本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。上記実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることもできる。また、ある実施例の構成に他の実施例の構成を加えることもできる。また、各実施例の構成の一部について、他の構成を追加・削除・置換することもできる。   The present invention is not limited to the embodiments described above, but includes various modifications. The above embodiments are described in detail in order to explain the present invention in an easy-to-understand manner, and are not necessarily limited to those having all the configurations described. Also, part of the configuration of one embodiment can be replaced with the configuration of another embodiment. Also, the configuration of another embodiment can be added to the configuration of one embodiment. In addition, with respect to a part of the configuration of each embodiment, another configuration can be added, deleted, or replaced.

上記の機能などは、CPU(プロセッサ)がそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現されているが、それらの一部又は全部を、例えば集積回路で設計するなどによりハードウェアで実現してもよい。   The above functions are realized by software by the CPU (processor) interpreting and executing the programs that realize the respective functions, but some or all of them are designed by, for example, integrated circuits. It may be realized by hardware.

上述の実施例において、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。全ての構成が相互に接続されていてもよい。   In the above-described embodiment, the control lines and the information lines indicate what is considered necessary for the description, and not all the control lines and the information lines in the product are necessarily shown. All configurations may be connected to each other.

100 …車載用制御装置
110 …マイコン
111 …CPU
112 …メモリ
113 …バス
121 …ROM
122 …RAM
130 …制御対象機器
200 …ATCU
210 …AD変換器
211 …Configレジスタ
212 …AD変換コントロール回路
213 …Dataレジスタ
220 …AD診断部
221 …AD診断処理部
222 …レジスタ診断処理部
230 …アナログ入力
240 …AD変換値
250 …初期化処理部
260 …故障モード
100 ... vehicle control unit 110 ... microcomputer 111 ... CPU
112 ... memory 113 ... bus 121 ... ROM
122 ... RAM
130 ... Control target device 200 ... ATCU
210 ... AD converter 211 ... Config register 212 ... AD conversion control circuit 213 ... Data register 220 ... AD diagnostic unit 221 ... AD diagnostic processing unit 222 ... register diagnostic processing unit 230 ... analog input 240 ... AD conversion value 250 ... initialization processing Unit 260 ... Failure mode

Claims (1)

車載用制御装置であって、
周辺機能の動作に関する設定値を格納するコンフィグレーションレジスタと、
前記車載用制御装置の起動時に前記設定値の初期設定値を前記コンフィグレーションレジスタに設定する初期化処理部と、
前記周辺機能が正常に動作しているか否かを診断する周辺機能診断処理部と、
前記周辺機能診断処理部によって異常が検出されたときに、前記コンフィグレーションレジスタの現時点の値と前記初期設定値とを比較し、前記現時点の値が正常であるかを判定するレジスタ診断処理部と
を備え
前記現時点の値が正常でない場合、前記レジスタ診断処理部は、前記コンフィグレーションレジスタに対して前記初期設定値を再設定することを繰り返し実行し、前記繰り返しの回数が所定の回数以上になった場合、前記コンフィグレーションレジスタの異常であると判定し、
前記レジスタ診断処理部が前記初期設定値の再設定を前記所定の回数未満繰り返し実行することにより、前記現時点の値が正常でない値から正常となった場合、前記周辺機能診断処理部は、前記周辺機能が正常に動作しているか否かを再度診断し、
前記周辺機能診断処理部が前記周辺機能の異常をいったん検出した後、前記レジスタ診断処理部が前記初期設定値を再設定することなく前記現時点の値が正常であり、かつ、前記コンフィグレーションレジスタが正常であると前記レジスタ診断処理部が判断した場合、前記周辺機能診断処理部は、前記周辺機能の異常であると判定する、
車載用制御装置。
An in-vehicle control device,
A configuration register that stores setting values related to the operation of peripheral functions;
An initialization processing unit that sets an initial setting value of the setting value in the configuration register when the in-vehicle control device is activated;
A peripheral function diagnosis processing unit that diagnoses whether or not the peripheral function is operating normally;
And a register diagnosis processing unit that determines whether the current value is normal by comparing the current value of the configuration register with the initial set value when an abnormality is detected by the peripheral function diagnosis processing unit. ,
Equipped with
When the current value is not normal, the register diagnosis processing unit repeatedly executes resetting of the initial setting value in the configuration register, and the number of repetitions exceeds a predetermined number. , Determining that the configuration register is abnormal,
When the value at the current point becomes normal from a value that is not normal by the register diagnosis processing unit repeatedly executing resetting of the initial setting value less than the predetermined number of times, the peripheral function diagnosis processing unit is configured to Re-diagnose whether the function is working properly,
After the peripheral function diagnostic processing unit once detects an abnormality in the peripheral function, the current value is normal without the register diagnostic processing unit resetting the initial setting value, and the configuration register If the register diagnosis processing unit determines that the state is normal, the peripheral function diagnosis processing unit determines that the peripheral function is abnormal.
In-vehicle control device.
JP2016104193A 2016-05-25 2016-05-25 Vehicle controller Active JP6533489B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016104193A JP6533489B2 (en) 2016-05-25 2016-05-25 Vehicle controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016104193A JP6533489B2 (en) 2016-05-25 2016-05-25 Vehicle controller

Publications (2)

Publication Number Publication Date
JP2017211812A JP2017211812A (en) 2017-11-30
JP6533489B2 true JP6533489B2 (en) 2019-06-19

Family

ID=60475630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016104193A Active JP6533489B2 (en) 2016-05-25 2016-05-25 Vehicle controller

Country Status (1)

Country Link
JP (1) JP6533489B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0658085B2 (en) * 1985-11-07 1994-08-03 日本電装株式会社 Vehicle control device having failure diagnosis function
JPH06160245A (en) * 1992-11-24 1994-06-07 Toyota Motor Corp Abnormality diagnosis system for vehicle
JP2009205528A (en) * 2008-02-28 2009-09-10 Denso Corp Electronic control device

Also Published As

Publication number Publication date
JP2017211812A (en) 2017-11-30

Similar Documents

Publication Publication Date Title
CN111164577B (en) Vehicle-mounted electronic control device and abnormal time processing method thereof
JP5739290B2 (en) Electronic control unit
CN107077407B (en) Vehicle control device
US10915082B2 (en) Microcontroller with error signal output circuit and control method of the same
JP5962697B2 (en) Electronic control unit
JP6895719B2 (en) Vehicle control device
JP2012160033A (en) Electronic controller for moving object
JP6533489B2 (en) Vehicle controller
JP2006259935A (en) Computation device with computation abnormality determination function
JP6502211B2 (en) Vehicle control device
JP2011008702A (en) Fault processor
JP2016126692A (en) Electronic control device
JP5772716B2 (en) Electronic control unit
JP6094387B2 (en) Control device
JP6524989B2 (en) Operation guarantee method of arithmetic unit
JP5978873B2 (en) Electronic control unit
JP2011126327A (en) On-vehicle controller
JP2007283788A (en) Vehicular electronic control device
US10845429B2 (en) Electronic control device
US20200183733A1 (en) Vehicle control device
JP6522550B2 (en) Electronic control unit
US20230398955A1 (en) In-vehicle use control system
JP6274947B2 (en) Abnormality diagnosis method for microprocessor of in-vehicle control device
JP7318579B2 (en) electronic controller
JP6911372B2 (en) In-vehicle electronic control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180621

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190108

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190215

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190524

R150 Certificate of patent or registration of utility model

Ref document number: 6533489

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