JP7029366B2 - Electronic control device for automobiles - Google Patents

Electronic control device for automobiles Download PDF

Info

Publication number
JP7029366B2
JP7029366B2 JP2018161498A JP2018161498A JP7029366B2 JP 7029366 B2 JP7029366 B2 JP 7029366B2 JP 2018161498 A JP2018161498 A JP 2018161498A JP 2018161498 A JP2018161498 A JP 2018161498A JP 7029366 B2 JP7029366 B2 JP 7029366B2
Authority
JP
Japan
Prior art keywords
data
written
control device
electronic control
eeprom
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
JP2018161498A
Other languages
Japanese (ja)
Other versions
JP2020035503A (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 Astemo 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 Astemo Ltd filed Critical Hitachi Astemo Ltd
Priority to JP2018161498A priority Critical patent/JP7029366B2/en
Publication of JP2020035503A publication Critical patent/JP2020035503A/en
Application granted granted Critical
Publication of JP7029366B2 publication Critical patent/JP7029366B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、自動車用電子制御装置に関する。 The present invention relates to an electronic control device for an automobile.

自動車用電子制御装置には、イグニッションスイッチをOFFにすると、制御対象の学習値、故障情報などのデータを不揮発性メモリに書き込むなど、ファイナライズ処理を行ってから内部電源を遮断する「セルフシャットダウン機能」が備えられている。そして、イグニッションスイッチをONにすると、自動車用電子制御装置は、不揮発性メモリからデータをRAM(Random Access Memory)に読み出し、そのデータを使用して制御対象を制御する。 The electronic control device for automobiles has a "self-shutdown function" that shuts off the internal power supply after performing finalization processing such as writing data such as learning values and failure information to be controlled to the non-volatile memory when the ignition switch is turned off. Is provided. Then, when the ignition switch is turned on, the electronic control device for automobiles reads data from the non-volatile memory into RAM (Random Access Memory) and controls the control target using the data.

不揮発性メモリの素子の固着などの故障を検知するため、特開2014-75078号公報(特許文献1)に記載される技術が提案されている。この提案技術においては、イグニッションスイッチがONになったときに、不揮発性メモリから読み出したデータについて、データに含まれる誤り検出符号を使用してデータが正常に書き込まれたか否かを判定することで、不揮発性メモリの故障が検知されている。 In order to detect a failure such as sticking of an element of a non-volatile memory, a technique described in Japanese Patent Application Laid-Open No. 2014-75078 (Patent Document 1) has been proposed. In this proposed technique, when the ignition switch is turned on, it is determined whether or not the data read from the non-volatile memory is normally written by using the error detection code included in the data. , Non-volatile memory failure has been detected.

特開2014-75078号公報Japanese Unexamined Patent Publication No. 2014-75078

しかしながら、セルフシャットダウン中のデータ書き込みによって不揮発性メモリの故障が検知できても、例えば、バックアップRAMがないと、その故障情報を保持し続けることができない。また、イグニッションスイッチがONになったときの故障検知では、データ書き込み電圧の瞬間的な低下又は遮断によるデータ破損か、不揮発性メモリ自体の故障であるかを区別することもできない。 However, even if a failure of the non-volatile memory can be detected by writing data during self-shutdown, for example, without a backup RAM, the failure information cannot be continuously retained. Further, in the failure detection when the ignition switch is turned on, it is not possible to distinguish whether the data is damaged due to a momentary drop in the data write voltage or cutoff, or the failure of the non-volatile memory itself.

そこで、本発明は、不揮発性メモリの故障診断精度を向上させた、自動車用電子制御装置を提供することを目的とする。 Therefore, an object of the present invention is to provide an electronic control device for an automobile with improved failure diagnosis accuracy of a non-volatile memory.

このため、電気的にデータを書換可能な不揮発性メモリを有する自動車用電子制御装置は、イグニッションスイッチがOFFになったセルフシャットダウン中に、不揮発性メモリに確保された複数の記憶領域に同一データを書き込む。また、自動車用電子制御装置は、イグニッションスイッチがONになった起動時に、複数の記憶領域に書き込まれた各データが正常であるか否かを判定し、データの少なくとも1つが正常でなければ、正常でないと判定されたデータが書き込まれていた記憶領域に正常であると判定されたデータを書き込むに先立って、データ書き込み対象の記憶領域に所定のデータを書き込んでからデータを書き込む。そして、自動車用電子制御装置は、データを正常に書き込むことができなければ、不揮発性メモリが故障していると診断する。 Therefore, an automobile electronic control device having a non-volatile memory capable of electrically rewriting data stores the same data in a plurality of storage areas secured in the non-volatile memory during self-shutdown when the ignition switch is turned off. Write. Further, the electronic control device for automobiles determines whether or not each data written in the plurality of storage areas is normal at the time of activation when the ignition switch is turned on, and if at least one of the data is not normal, Prior to writing the data determined to be normal to the storage area in which the data determined to be abnormal is written, the predetermined data is written to the storage area to be written to the data, and then the data is written. Then, the electronic control device for automobiles diagnoses that the non-volatile memory has failed if the data cannot be written normally.

本発明によれば、不揮発性メモリの故障診断精度を向上させることができる。 According to the present invention, it is possible to improve the failure diagnosis accuracy of the non-volatile memory.

自動車用電子制御装置の一例を示す概略構成図である。It is a schematic block diagram which shows an example of the electronic control device for an automobile. 学習値、故障情報などのデータを格納する記憶領域のデータ構造図である。It is a data structure diagram of the storage area which stores data such as a learning value and failure information. データ書き込み処理の一例を示すフローチャートである。It is a flowchart which shows an example of a data writing process. 故障診断処理の一例を示すフローチャートである。It is a flowchart which shows an example of failure diagnosis processing. 正常時における診断シーケンスの第1段階の説明図である。It is explanatory drawing of the 1st stage of the diagnosis sequence in a normal state. 正常時における診断シーケンスの第2段階の説明図である。It is explanatory drawing of the 2nd stage of the diagnosis sequence in a normal state. 正常時における診断シーケンスの第3段階の説明図である。It is explanatory drawing of the 3rd stage of the diagnosis sequence in a normal state. 正常時における診断シーケンスの第4段階の説明図である。It is explanatory drawing of the 4th stage of the diagnostic sequence in a normal state. 異常時における診断シーケンスの第1段階の説明図である。It is explanatory drawing of the 1st stage of the diagnosis sequence at the time of abnormality. 異常時における診断シーケンスの第2段階の説明図である。It is explanatory drawing of the 2nd stage of the diagnosis sequence at the time of abnormality. 異常時における診断シーケンスの第3段階の説明図である。It is explanatory drawing of the 3rd stage of the diagnosis sequence at the time of abnormality. 異常時における診断シーケンスの第4段階の説明図である。It is explanatory drawing of the 4th stage of the diagnostic sequence at the time of abnormality. 異常時における診断シーケンスの第5段階の説明図である。It is explanatory drawing of the 5th stage of the diagnosis sequence at the time of abnormality. 異常時における診断シーケンスの第6段階の説明図である。It is explanatory drawing of the 6th stage of the diagnosis sequence at the time of abnormality. 書き込み機能診断処理の一例を示すフローチャートである。It is a flowchart which shows an example of a writing function diagnosis processing. 書き込み機能診断シーケンスの第1段階の説明図である。It is explanatory drawing of the 1st stage of a writing function diagnosis sequence. 書き込み機能診断シーケンスの第2段階の説明図である。It is explanatory drawing of the 2nd stage of a writing function diagnosis sequence. 書き込み機能診断シーケンスの第3段階の説明図である。It is explanatory drawing of the 3rd stage of a writing function diagnosis sequence. 書き込み機能診断シーケンスの第4段階の説明図である。It is explanatory drawing of the 4th stage of a writing function diagnosis sequence.

以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。
図1は、自動車用電子制御装置(以下「電子制御装置」という)100の一例を示す。
Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the attached drawings.
FIG. 1 shows an example of an electronic control device for an automobile (hereinafter referred to as “electronic control device”) 100.

電子制御装置100は、図示しない自動車に搭載され、例えば、エンジン、自動変速機、燃料ポンプ、バルブタイミングを電動で変更する電動VTC(Valve Timing Control)、圧縮比を変更するVCR(Variable Compression Ratio)などを電子制御する。電子制御装置100は、プロセッサ110と、RAM(Random Access Memory)120と、EEPROM(Electrically Etasable Programmable Read Only Memory)130と、通信回路140と、入出力回路150と、これらを相互通信可能に接続するバス160と、を有している。なお、電動VTCやVCRなどのサブシステムには、一般的に、セルフシャットダウン中に検知された故障を保持し続けることができるバックアップRAMや、警告灯を点灯させる機能は備えられていない。以下の説明では、電子制御装置100は電動VTCなどのサブシステムとするが、この限りではない。 The electronic control device 100 is mounted on an automobile (not shown), and includes, for example, an engine, an automatic transmission, a fuel pump, an electric VTC (Valve Timing Control) that electrically changes valve timing, and a VCR (Variable Compression Ratio) that changes the compression ratio. Etc. are electronically controlled. The electronic control device 100 connects a processor 110, a RAM (Random Access Memory) 120, an EEPROM (Electrically Etasable Programmable Read Only Memory) 130, a communication circuit 140, and an input / output circuit 150 so as to be able to communicate with each other. It has a bus 160 and. It should be noted that, in general, subsystems such as electric VTCs and VCRs do not have a backup RAM capable of continuously holding a failure detected during self-shutdown, or a function of turning on a warning light. In the following description, the electronic control device 100 is a subsystem such as an electric VTC, but the present invention is not limited to this.

プロセッサ110は、ソフトウエアプログラムに記述された命令セットを実行するハードウエアであって、例えば、CPU(Central Processing Unit)などからなる。RAM120は、電源を遮断するとデータが消失する揮発性メモリの一例であって、例えば、DRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)などからなる。EEPROM130は、電源を遮断してもデータが保持されると共に、電気的にデータを書換可能な不揮発性メモリの一例であって、例えば、フラッシュROM(Read Only Memory)などからなる。通信回路140は、車載ネットワークの一例であるCAN(Controller Area Network)などを介して、他の電子制御装置などと通信するためのデバイスであって、例えば、CANトランシーバなどからなる。入出力回路150は、各種のセンサ又はスイッチなどからアナログ信号又はデジタル信号を読み込むと共に、アクチュエータなどにアナログ又はデジタルの駆動信号を出力するデバイスであって、例えば、A/Dコンバータ、D/Dコンバータなどからなる。 The processor 110 is hardware that executes an instruction set described in a software program, and includes, for example, a CPU (Central Processing Unit). The RAM 120 is an example of a volatile memory in which data is lost when the power is cut off, and includes, for example, a DRAM (Dynamic Random Access Memory), a SRAM (Static Random Access Memory), and the like. The EEPROM 130 is an example of a non-volatile memory in which data is retained even when the power is cut off and data can be electrically rewritten, and is, for example, a flash ROM (Read Only Memory). The communication circuit 140 is a device for communicating with another electronic control device or the like via a CAN (Controller Area Network) or the like, which is an example of an in-vehicle network, and includes, for example, a CAN transceiver or the like. The input / output circuit 150 is a device that reads an analog signal or a digital signal from various sensors or switches and outputs an analog or digital drive signal to an actuator or the like, for example, an A / D converter or a D / D converter. And so on.

EEPROM130には、図2に示すように、制御対象に関する学習値、故障情報などのデータを記憶する複数の第1の記憶領域として、例えば、データバンク1~4が確保されている。ここで、故障情報は、電子制御装置100の作動中に、例えば、OBD(On-Board Diagnostics)機能により収集される。なお、複数の第1の記憶領域としては、4つのデータバンク1~4に限らず、例えば、制御対象の重要度などを考慮してその個数を決定することができる。 As shown in FIG. 2, the EEPROM 130 secures, for example, data banks 1 to 4 as a plurality of first storage areas for storing data such as learning values and failure information related to the control target. Here, the failure information is collected by, for example, an OBD (On-Board Diagnostics) function during the operation of the electronic control device 100. The plurality of first storage areas are not limited to the four data banks 1 to 4, and the number of them can be determined in consideration of, for example, the importance of the controlled object.

そして、電子制御装置100は、例えば、EEPROM130とは異なるPROM(Programmable ROM)に格納されている制御プログラム(制御変数を含む)に従って、以下に説明する処理によって、EEPROM130に故障が発生しているか否かを診断する。ここで、制御プログラムがPROMに格納されている理由は、EEPROM130に故障が発生していると、制御プログラムが正常に動作しない可能性があるため、EEPROM130に故障が発生しているか否かを誤診断してしまうおそれがあるからである。 Then, for example, whether or not the electronic control device 100 has a failure in the EEPROM 130 by the process described below according to the control program (including the control variable) stored in the PROM (Programmable ROM) different from the EEPROM 130. Diagnose. Here, the reason why the control program is stored in the PROM is that if the EEPROM 130 has a failure, the control program may not operate normally. Therefore, it is erroneous whether or not the EEPROM 130 has a failure. This is because there is a risk of making a diagnosis.

図3は、イグニッションスイッチがOFFになったことを契機として、電子制御装置100のプロセッサ110が、内部電源を保持しつつファイナライズ処理を実行するセルフシャットダウン中に実行する、データ書き込み処理の一例を示す。なお、データ書き込み処理を実行する前提として、電子制御装置100の作動中に学習値、故障情報などのデータが収集されてRAM120に記憶されているものとする。 FIG. 3 shows an example of a data writing process executed by the processor 110 of the electronic control device 100 during a self-shutdown in which the finalizing process is executed while holding the internal power supply when the ignition switch is turned off. .. As a premise for executing the data writing process, it is assumed that data such as learning values and failure information are collected and stored in the RAM 120 during the operation of the electronic control device 100.

ステップ1(図3では「S1」と略記する。以下同様。)では、プロセッサ110が、EEPROM130のデータバンクを特定する制御変数iに1を代入する。 In step 1 (abbreviated as “S1” in FIG. 3; the same applies hereinafter), the processor 110 assigns 1 to the control variable i that identifies the data bank of the EEPROM 130.

ステップ2では、プロセッサ110が、EEPROM130のデータバンク[i]に、RAM120に記憶されている学習値、故障情報などのデータを書き込む。このとき、プロセッサ110は、データバンク[i]に書き込むデータのチェックサムを算出する。 In step 2, the processor 110 writes data such as learning values and failure information stored in the RAM 120 to the data bank [i] of the EEPROM 130. At this time, the processor 110 calculates the checksum of the data to be written in the data bank [i].

ステップ3では、プロセッサ110が、ステップ2で算出したチェックサムとデータバンク[i]に書き込まれたデータに含まれるチェックサムとを比較し、データの書き込みが正常に終了したか否かを判定する。そして、プロセッサ110は、データの書き込みが正常に終了したと判定すれば、処理をステップ5へと進める(Yes)。一方、プロセッサ110は、データの書き込みが正常に終了しない、即ち、データの書き込みに異常が発生したと判定すれば、処理をステップ4へと進める(No)。なお、電子制御装置100のハードウエアによって、データの書き込みが正常に終了したか否かを判定するようにしてもよい。 In step 3, the processor 110 compares the checksum calculated in step 2 with the checksum included in the data written in the data bank [i], and determines whether or not the writing of the data is completed normally. .. Then, if the processor 110 determines that the data writing has been completed normally, the processor 110 proceeds to step 5 (Yes). On the other hand, if the processor 110 determines that the data writing does not end normally, that is, an abnormality has occurred in the data writing, the processor 110 proceeds to step 4 (No). The hardware of the electronic control device 100 may be used to determine whether or not the writing of data has been completed normally.

ステップ4では、データの書き込みが正常に終了しなかったので、プロセッサ110が、異常を検出したことをRAM120に記憶させる。その後、プロセッサ110は、処理をステップ5へと進める。なお、セルフシャットダウンが終了したときには、内部電源が遮断されてRAM120のデータが消失するので、異常を検出したことをRAM120に記憶させなくてもよい。 In step 4, since the writing of data was not completed normally, the processor 110 stores in the RAM 120 that an abnormality has been detected. After that, the processor 110 advances the process to step 5. When the self-shutdown is completed, the internal power supply is cut off and the data in the RAM 120 is lost. Therefore, it is not necessary to store the detection of the abnormality in the RAM 120.

ステップ5では、プロセッサ110が、制御変数iをインクリメント、即ち、i=i+1とする。 In step 5, the processor 110 increments the control variable i, that is, i = i + 1.

ステップ6では、プロセッサ110が、制御変数iがEEPROM130に確保されたデータバンクの個数n(本実施形態では4)を上回ったか否か、即ち、最後のデータバンクまでデータを書き込んだか否かを判定する。そして、プロセッサ110は、最後のデータバンクまでデータを書き込んだと判定すれば、データ書き込み処理を終了させる(Yes)。一方、プロセッサ110は、最後のデータバンクまでデータを書き込んでいないと判定すれば、処理をステップ2へと戻す(No)。なお、データ書き込み機能の失陥やEEPROM130の故障などにより、データ書き込み処理が終了できない可能性を考慮し、イグニッションスイッチをOFFにしてから所定時間経過後に、データ書き込み処理を強制的に終了させてもよい。 In step 6, the processor 110 determines whether or not the control variable i exceeds the number n of data banks secured in the EEPROM 130 (4 in this embodiment), that is, whether or not data has been written to the last data bank. do. Then, if the processor 110 determines that the data has been written up to the last data bank, the processor 110 ends the data writing process (Yes). On the other hand, if the processor 110 determines that the data has not been written up to the last data bank, the processor 110 returns the process to step 2 (No). In consideration of the possibility that the data writing process cannot be completed due to the failure of the data writing function or the failure of the EEPROM 130, even if the data writing process is forcibly terminated after a predetermined time has elapsed after the ignition switch is turned off. good.

かかるデータ書き込み処理によれば、イグニッションスイッチがOFFになったセルフシャットダウン中に、作動中に収集された学習値、故障情報などのデータは、EEPROM130に確保された複数のデータバンクに書き込まれる。即ち、EEPROM130の複数のデータバンクには、同一データが書き込まれる。なお、データの書き込みが正常に終了したか否かは、チェックサムに限らず、CRC(Cyclic Redundancy Check)、パリティビットなどの誤り検出符号を使用して判定してもよい(以下同様)。 According to the data writing process, data such as learning values and failure information collected during operation are written to a plurality of data banks secured in the EEPROM 130 during the self-shutdown when the ignition switch is turned off. That is, the same data is written in the plurality of data banks of the EEPROM 130. Whether or not the data writing is completed normally is not limited to the checksum, and may be determined by using an error detection code such as CRC (Cyclic Redundancy Check) or a parity bit (the same applies hereinafter).

図4は、イグニッションスイッチがONになったことを契機として、電子制御装置100のプロセッサ110が起動時に実行する、故障診断処理の一例を示す。 FIG. 4 shows an example of a failure diagnosis process executed by the processor 110 of the electronic control device 100 at startup when the ignition switch is turned on.

ステップ11では、プロセッサ110が、EEPROM130の複数のデータバンクに書き込まれているすべてのデータを読み込む。なお、プロセッサ110は、どのデータバンクに書き込まれていたデータであるかを特定可能なように、例えば、数字からなる識別子を付しつつデータを読み込むことができる。ここで、識別子として順次大きくなる数値を使用した場合、最も大きい数字が付されているデータバンクが最新のものであると特定することもできる。 In step 11, the processor 110 reads all the data written in the plurality of data banks of the EEPROM 130. The processor 110 can read the data with an identifier consisting of numbers, for example, so that it is possible to identify which data bank the data was written in. Here, when a numerical value that gradually increases is used as the identifier, it is also possible to specify that the data bank with the largest number is the latest one.

ステップ12では、プロセッサ110が、各データバンクに書き込まれていたデータについて、データから算出したチェックサムとデータに含まれるチェックサムとを比較して、内容が異常となっているデータ(異常データ)があるか否かを判定する。そして、プロセッサ110は、異常データがあると判定すれば、処理をステップ13へと進める(Yes)。一方、プロセッサ110は、異常データがないと判定すれば、処理をステップ23へと進める(No)。ここで、異常データが書き込まれていたデータバンクの識別子については、後述の処理のために、例えば、RAM120に書き込んでおく。 In step 12, the processor 110 compares the checksum calculated from the data with the checksum included in the data for the data written in each data bank, and the data whose contents are abnormal (abnormal data). Determine if there is. Then, if the processor 110 determines that there is abnormal data, the processor 110 proceeds to step 13 (Yes). On the other hand, if the processor 110 determines that there is no abnormal data, the processor 110 proceeds to step 23 (No). Here, the identifier of the data bank in which the abnormal data is written is written in, for example, the RAM 120 for the processing described later.

ステップ13では、プロセッサ110が、ステップ12での比較結果に基づいて、内容が正常であるデータ(正常データ)があるか否かを判定する。そして、プロセッサ110は、正常データがあると判定すれば、処理をステップ14へと進める(Yes)。一方、プロセッサ110は、正常データがない、即ち、各データバンクに書き込まれていたすべてのデータが異常であると判定すれば、処理をステップ16へと進める(No)。 In step 13, the processor 110 determines whether or not there is data whose contents are normal (normal data) based on the comparison result in step 12. Then, if the processor 110 determines that there is normal data, the processor 110 proceeds to step 14 (Yes). On the other hand, if the processor 110 determines that there is no normal data, that is, all the data written in each data bank is abnormal, the processor 110 proceeds to step 16 (No).

ステップ14では、プロセッサ110が、複数のデータバンクの中から所定規則によって選定された1つのデータバンクに書き込まれているデータをRAM120にコピーする。ここで、所定規則としては、例えば、ステップ11においてデータ読み込みが正常に行われたデータバンクのうち、識別子によって最新のものであると特定されるデータバンクとすることができる。 In step 14, the processor 110 copies the data written in one data bank selected by a predetermined rule from the plurality of data banks to the RAM 120. Here, as a predetermined rule, for example, among the data banks in which the data was normally read in step 11, the data bank specified by the identifier as the latest one can be used.

ステップ15では、一部のデータバンクに書き込まれていたデータが異常であったため、プロセッサ110が、異常データが書き込まれていたデータバンクに最新の正常データを書き込む。即ち、プロセッサ110は、セルフシャットダウン中のデータ書き込み処理において、例えば、書き込み電圧が瞬間的に低下又は遮断して書き込みが正常に終了できなかった可能性を鑑み、データをデータバンクに再度書き込む。このとき、プロセッサ110は、データバンクに書き込むデータのチェックサムを算出する。その後、プロセッサ110は、処理をステップ16へと進める。 In step 15, since the data written in a part of the data banks is abnormal, the processor 110 writes the latest normal data to the data bank in which the abnormal data is written. That is, in the data writing process during the self-shutdown, for example, the processor 110 writes the data to the data bank again in consideration of the possibility that the writing voltage is momentarily lowered or cut off and the writing cannot be normally completed. At this time, the processor 110 calculates the checksum of the data to be written in the data bank. After that, the processor 110 advances the process to step 16.

ステップ16では、各データバンクに書き込まれていたすべてのデータが異常であるため、プロセッサ110が、初期値などのデフォルト値をRAM120にコピーする。 In step 16, since all the data written in each data bank is abnormal, the processor 110 copies the default value such as the initial value to the RAM 120.

ステップ17では、各データバンクに書き込まれていたすべてのデータが異常であるため、プロセッサ110が、すべてのデータバンク1~4に初期値などのデフォルト値を書き込む。このとき、プロセッサ110は、各データバンクに書き込むデータのチェックサムを算出する。その後、プロセッサ110は、処理をステップ18へと進める。 In step 17, since all the data written in each data bank is abnormal, the processor 110 writes a default value such as an initial value in all the data banks 1 to 4. At this time, the processor 110 calculates the checksum of the data to be written in each data bank. After that, the processor 110 advances the process to step 18.

ステップ18では、プロセッサ110が、ステップ15又はステップ17でデータを書き込んだデータバンクについて、ステップ15又はステップ17で算出したチェックサムとデータバンクに書き込まれたデータに含まれるチェックサムとを比較し、データの書き込みが正常に終了したか否かを判定する。そして、プロセッサ110は、データの書き込みが正常に終了したと判定すれば、処理をステップ19へと進める(Yes)。一方、プロセッサ110は、データの書き込みが正常に終了しない、即ち、データの書き込みに異常が発生したと判定すれば、処理をステップ20へと進める(No)。なお、電子制御装置100のハードウエアによって、データの書き込みが正常に終了したか否かを判定するようにしてもよい。 In step 18, the processor 110 compares the checksum calculated in step 15 or 17 with the checksum included in the data written in the data bank for the data bank in which the data is written in step 15 or 17. Judge whether or not the data writing is completed normally. Then, if the processor 110 determines that the data writing has been completed normally, the processor 110 proceeds to step 19 (Yes). On the other hand, if the processor 110 determines that the data writing does not end normally, that is, an abnormality has occurred in the data writing, the processor 110 proceeds to the process to step 20 (No). The hardware of the electronic control device 100 may be used to determine whether or not the writing of data has been completed normally.

ステップ19では、セルフシャットダウン中にデータの書き込みが正常に終了しなかったデータバンクへのデータの書き込みが正常に終了したので、プロセッサ110が、異常が検出されなかったことをRAM120に記憶させる。その後、プロセッサ110は、故障診断処理を終了させる。なお、プロセッサ110は、制御対象を実際に制御するとき、RAM120に書き込まれたデータを参照して、制御値を学習値で補正したり、故障情報を追加したりすることができる。 In step 19, writing of data was not normally completed during the self-shutdown. Since writing of data to the data bank was normally completed, the processor 110 stores in the RAM 120 that no abnormality was detected. After that, the processor 110 ends the failure diagnosis process. When the processor 110 actually controls the control target, the processor 110 can refer to the data written in the RAM 120, correct the control value with the learning value, or add failure information.

ステップ20では、セルフシャットダウン中にデータの書き込みが正常に終了しなかったデータバンクへのデータの書き込みが正常に終了しなかったので、プロセッサ110が、EEPROM130が異常、即ち、EEPROM130が故障していると判断し、異常が検出されたことをRAM120に記憶させる。なお、RAM120に記憶させた情報は、制御対象を実際に制御する際に利用することができる。 In step 20, the writing of data was not completed normally during the self-shutdown. Since the writing of data to the data bank was not completed normally, the processor 110 has an error in the EEPROM 130, that is, the EEPROM 130 has failed. It is determined that the error is detected, and the RAM 120 stores the detection. The information stored in the RAM 120 can be used when actually controlling the control target.

ステップ21では、プロセッサ110が、例えば、車両の運転席の前方に取り付けられているインストルメントパネルの警告灯を点灯させることができるエンジン制御ユニットなどに対して、CAN通信などを介して警告灯の点灯依頼を送信する。そして、この点灯依頼を受信したエンジン制御ユニットなどは、電子制御装置100に代わって警告灯を点灯させる。従って、車両の運転者は、インストルメントパネルの警告灯が点灯することで、EEPROM130に故障が発生している可能性があることを認識できる。なお、電子制御装置100がサブシステムでなければ、自ら警告灯を点灯させることができる。 In step 21, the processor 110 determines, for example, an engine control unit capable of lighting a warning light of an instrument panel mounted in front of the driver's seat of the vehicle via CAN communication or the like. Send a lighting request. Then, the engine control unit or the like that has received this lighting request turns on the warning light instead of the electronic control device 100. Therefore, the driver of the vehicle can recognize that the EEPROM 130 may have a failure by turning on the warning light of the instrument panel. If the electronic control device 100 is not a subsystem, the warning light can be turned on by itself.

ステップ22では、プロセッサ110が、制御対象を制御するモードをフェイルセーフモードに移行する。従って、制御対象は、EEPROM130が故障していても、機能が制限された状態で作動可能となり、例えば、運転者がサービス工場まで車両を走行させることができる。その後、プロセッサ110は、故障診断処理を終了させる。なお、プロセッサ110は、フェイルセーフモードに移行する代わりに、又は、これと併せて、RAM120にデフォルト値を書き込むようにしてもよい。 In step 22, the processor 110 shifts the mode for controlling the controlled object to the fail-safe mode. Therefore, the controlled object can operate in a state where the function is limited even if the EEPROM 130 is out of order, and for example, the driver can drive the vehicle to the service factory. After that, the processor 110 ends the failure diagnosis process. The processor 110 may write a default value to the RAM 120 instead of or in combination with the shift to the fail-safe mode.

かかる故障診断処理によれば、イグニッションスイッチがONになった起動時に、EEPROM130の複数のデータバンクに書き込まれている各データが正常であるか否かが判定される。そして、データの少なくとも1つが異常であれば、異常データが書き込まれていたデータバンクに最新の正常データが書き込まれる。その後、データが正常に書き込まれたか否かが判定され、データが正常に書き込まれていなければ、EEPROM130が故障していると診断される。 According to such a failure diagnosis process, it is determined whether or not each data written in the plurality of data banks of the EEPROM 130 is normal at the time of starting when the ignition switch is turned on. Then, if at least one of the data is abnormal, the latest normal data is written to the data bank in which the abnormal data was written. After that, it is determined whether or not the data has been written normally, and if the data has not been written normally, it is diagnosed that the EEPROM 130 has failed.

要するに、セルフシャットダウン中のデータ書き込みは、書き込み電圧の瞬間的な低下又は遮断などにより正常に終了しなかった可能性を鑑み、再起動時にデータ書き込みを再度実行することで、そのデータ書き込みに係るデータバンク、即ち、EEPROM130が故障しているか否かが診断される。このため、何らかの原因によって書き込み電圧の瞬間的な低下又は遮断が頻発する状態であっても、再起動時にEEPROM130が故障しているか否かが診断されるため、EEPROM130の故障診断精度を向上させることができる。再起動時にEEPROM130の故障が検知できた場合、電動VTCなどのサブシステムは警告灯を点灯することができないが、例えば、警告灯を点灯できるエンジン制御ユニットにCAN通信などを介して警告灯の点灯依頼を送信することで、エンジン制御ユニットが、サブシステムに代わって警告灯を点灯して運転者に知らせることができる。また、EEPROM130の故障は、イグニッションスイッチがONになったときに診断されるため、バックアップRAMが不要となる。 In short, considering the possibility that the data writing during self-shutdown did not end normally due to a momentary drop in the writing voltage or interruption, the data related to the data writing is executed again at the time of restarting. It is diagnosed whether the bank, that is, the EEPROM 130 is out of order. Therefore, even if the write voltage is momentarily lowered or cut off frequently for some reason, it is diagnosed whether or not the EEPROM 130 has failed at the time of restarting, so that the failure diagnosis accuracy of the EEPROM 130 should be improved. Can be done. If a failure of the EEPROM 130 can be detected at the time of restart, a subsystem such as an electric VTC cannot turn on the warning light. For example, the engine control unit that can turn on the warning light is turned on via CAN communication or the like. By sending the request, the engine control unit can turn on a warning light on behalf of the subsystem to notify the driver. Further, since the failure of the EEPROM 130 is diagnosed when the ignition switch is turned on, the backup RAM becomes unnecessary.

また、異常データが書き込まれていたデータバンクに正常データを書き込むに先立って、所定のデータ、例えば、16進数の5555h及びAAAAhを書き込んでから、正常データを書き込むようにしてもよい。このようにすれば、EEPROM130のメモリセル(ビット)故障を検知することができる。 Further, prior to writing the normal data to the data bank in which the abnormal data has been written, predetermined data, for example, hexadecimal numbers 5555h and AAAAh may be written and then the normal data may be written. By doing so, it is possible to detect a memory cell (bit) failure of the EEPROM 130.

ここで、EEPROM130の故障診断方法の理解を容易ならしめることを目的として、EEPROM130が正常であるときの診断シーケンスと、EEPROM130に異常が発生したときの診断シーケンスと、を比較して説明する。なお、異常が発生したときの診断シーケンスの前提として、EEPROM130のデータバンク2が故障しているものとする。 Here, for the purpose of facilitating the understanding of the failure diagnosis method of the EEPROM 130, the diagnostic sequence when the EEPROM 130 is normal and the diagnostic sequence when an abnormality occurs in the EEPROM 130 will be described in comparison with each other. As a premise of the diagnostic sequence when an abnormality occurs, it is assumed that the data bank 2 of the EEPROM 130 is out of order.

[正常時の診断シーケンス]
イグニッションスイッチがOFFになったセルフシャットダウン中のデータ書き込みでは、図5に示すように、RAM120のデータ2が、最初に、EEPROM130のデータバンク1に書き込まれる。次に、RAM120のデータ2が、EEPROM130のデータバンク2及び3に書き込まれた後、図6に示すように、RAM120のデータ2が、EEPROM130のデータバンク4に書き込まれる。
[Diagnosis sequence at normal time]
In the data writing during the self-shutdown when the ignition switch is turned off, as shown in FIG. 5, the data 2 of the RAM 120 is first written to the data bank 1 of the EEPROM 130. Next, after the data 2 of the RAM 120 is written to the data banks 2 and 3 of the EEPROM 130, the data 2 of the RAM 120 is written to the data bank 4 of the EEPROM 130 as shown in FIG.

その後、ファイナライズ処理が終了して内部電源が遮断されると、RAM120のデータが消失するので、図7に示すように、EEPROM状態及びデータが不定となる。この状態でイグニッションスイッチがONになると、EEPROM130の全データバンクに書き込まれていたデータが正常であるか否か判定される。全データバンクに書き込まれていたデータが正常であると、例えば、図8に示すように、データバンク1のデータがRAM120にコピーされると共に、そのEEPROM状態が正常に設定される。このような処理が、イグニッションスイッチがOFF又はONになったときに順次実行され、EEPROM130が正常であるとの診断が行われる。 After that, when the finalizing process is completed and the internal power supply is cut off, the data in the RAM 120 is lost, so that the EEPROM state and the data are undefined as shown in FIG. 7. When the ignition switch is turned on in this state, it is determined whether or not the data written in all the data banks of the EEPROM 130 is normal. If the data written in all the data banks are normal, for example, as shown in FIG. 8, the data in the data bank 1 is copied to the RAM 120, and the EEPROM state is set normally. Such processing is sequentially executed when the ignition switch is turned OFF or ON, and a diagnosis that the EEPROM 130 is normal is performed.

[異常時の診断シーケンス]
イグニッションスイッチがOFFになったセルフシャットダウン中のデータ書き込みでは、図9に示すように、RAM120のデータ2が、最初に、EEPROM130のデータバンク1に書き込まれる。次に、RAM120のデータ2が、EEPROM130のデータバンク2に書き込まれる。このとき、データバンク2が故障しているため、データ書き込みが正常に終了せず、図10に示すように、RAM120のEEPROM状態が異常に設定される。そして、RAM120のデータ2が、EEPROM130のデータバンク3及び4に夫々書き込まれる。
[Diagnosis sequence in case of abnormality]
In the data writing during the self-shutdown when the ignition switch is turned off, as shown in FIG. 9, the data 2 of the RAM 120 is first written to the data bank 1 of the EEPROM 130. Next, the data 2 of the RAM 120 is written to the data bank 2 of the EEPROM 130. At this time, since the data bank 2 is out of order, the data writing is not completed normally, and the EEPROM state of the RAM 120 is set abnormally as shown in FIG. Then, the data 2 of the RAM 120 is written to the data banks 3 and 4 of the EEPROM 130, respectively.

その後、ファイナライズ処理が終了して内部電源が遮断されると、RAM120のデータが消失するので、図11に示すように、EEPROM状態及びデータが不定となる。従って、セルフシャットダウン中にデータバンク2が故障であると判定された情報は、内部電源の遮断によって消失してしまう。この状態でイグニッションスイッチがONになると、EEPROM130の全データバンクに書き込まれていたデータが正常であるか否か判定される。データバンク2のデータが異常であるので、図12に示すように、正常であるデータバンク1のデータがデータバンク2に書き込まれる。そして、データバンク2へのデータ書き込みが正常に終了しなかったので、図13に示すように、RAM120のEEPROM状態が異常に設定される。このような処理を実行した後、図14に示すように、正常であるデータバンク1のデータがRAM120にコピーされる。このような処理が、イグニッションスイッチがOFF又はONになったときに順次実行され、EEPROM130が故障しているとの診断が行われる。 After that, when the finalizing process is completed and the internal power supply is cut off, the data in the RAM 120 is lost, so that the EEPROM state and the data are undefined as shown in FIG. Therefore, the information determined that the data bank 2 is out of order during the self-shutdown is lost by shutting off the internal power supply. When the ignition switch is turned on in this state, it is determined whether or not the data written in all the data banks of the EEPROM 130 is normal. Since the data in the data bank 2 is abnormal, the data in the normal data bank 1 is written in the data bank 2 as shown in FIG. Then, since the data writing to the data bank 2 was not completed normally, the EEPROM state of the RAM 120 is abnormally set as shown in FIG. After performing such processing, as shown in FIG. 14, the data in the normal data bank 1 is copied to the RAM 120. Such processing is sequentially executed when the ignition switch is turned OFF or ON, and it is diagnosed that the EEPROM 130 is out of order.

ところで、EEPROM130の複数のデータバンクにデータが正常に書き込まれている状態で、EEPROM130へのデータ書き込み機能が失陥すると、イグニッションスイッチがONになった起動時の故障診断処理において、EEPROM130の故障を診断することができない。即ち、セルフシャットダウン中にデータを書き込むことができなくても、複数のデータバンクに書き込まれているデータが正常であるので、これからEEPROM130の故障を診断することができない。このため、データ書き込み機能が失陥した後、EEPROM130の複数のデータバンクにデータを正常に書き込むことができないことを検知できず、制御対象に影響を及ぼしてしまう。 By the way, if the data writing function to the EEPROM 130 fails while the data is normally written to the plurality of data banks of the EEPROM 130, the EEPROM 130 fails in the failure diagnosis process at the time of starting when the ignition switch is turned on. Cannot be diagnosed. That is, even if the data cannot be written during the self-shutdown, the data written in the plurality of data banks is normal, so that the failure of the EEPROM 130 cannot be diagnosed from now on. Therefore, after the data writing function fails, it cannot be detected that the data cannot be normally written to the plurality of data banks of the EEPROM 130, which affects the controlled object.

そこで、電子制御装置100のプロセッサ110は、イグニッションスイッチがONになるたびに、EEPROM130に確保された2つの記憶領域1及び2に任意のデータ及びその反転値を夫々書き込み、任意のデータ及びその反転値と書き込まれた2つのデータとを比較して、データ書き込み機能が失陥しているか否かを診断してもよい。ここで、任意のデータとしては、イグニッションスイッチがONになるたびに変化するデータが望ましく、例えば、EEPROM130へのデータ書き込み回数などを使用することができる。なお、記憶領域1及び2が、少なくとも1つの第2の記憶領域の一例として挙げられる。 Therefore, each time the ignition switch of the electronic control device 100 is turned on, the processor 110 writes arbitrary data and its inverted value in the two storage areas 1 and 2 secured in the EEPROM 130, respectively, and arbitrary data and its inversion. You may compare the value with the two written data to diagnose whether the data writing function has failed. Here, as arbitrary data, data that changes every time the ignition switch is turned on is desirable, and for example, the number of times data is written to the EEPROM 130 can be used. The storage areas 1 and 2 are given as an example of at least one second storage area.

図15は、イグニッションスイッチがONになったことを契機として、電子制御装置100のプロセッサ110が起動時に実行する、書き込み機能診断処理の一例を示す。なお、EEPROM130へのデータ書き込み回数は、電子制御装置100の初期化処理において、EEPROM130の記憶領域1より読み出した値をインクリメントし、このインクリメントした値がRAM120に書き込まれているものとする。 FIG. 15 shows an example of a write function diagnostic process executed by the processor 110 of the electronic control device 100 at startup when the ignition switch is turned on. The number of times the data is written to the EEPROM 130 is calculated by incrementing the value read from the storage area 1 of the EEPROM 130 in the initialization process of the electronic control device 100, and it is assumed that the incremented value is written to the RAM 120.

ステップ31では、プロセッサ110が、RAM120からインクリメントされた書き込み回数を読み出し、これをEEPROM130の記憶領域1に書き込む。 In step 31, the processor 110 reads the incremented write count from the RAM 120 and writes it to the storage area 1 of the EEPROM 130.

ステップ32では、プロセッサ110が、RAM120から読み出したインクリメントされた書き込み回数の反転値を求め、これをEEPROM130の記憶領域2に書き込む。ここで、書き込み回数の反転値とは、書き込み回数データの各ビットを反転、即ち、各ビットの0と1とを反転させたものをいう。このようにすれば、インクリメントされた書き込み回数とその反転値をEEPROM130に書き込むことによって、書き込み機能診断を毎回全ビット(ハードウエア固有の書き込み単位)に対して行うことができる。また、EEPROM130のバスに対する診断もビット単位で行うことができる。 In step 32, the processor 110 obtains an inverted value of the incremented write count read from the RAM 120, and writes this in the storage area 2 of the EEPROM 130. Here, the inversion value of the write count means that each bit of the write count data is inverted, that is, 0 and 1 of each bit are inverted. By doing so, the write function diagnosis can be performed for all bits (hardware-specific write unit) each time by writing the incremented write count and its inverted value to the EEPROM 130. Further, the diagnosis for the bus of the EEPROM 130 can also be performed in bit units.

ステップ33では、プロセッサ110が、EEPROM130の記憶領域1及び2に書き込まれたデータを夫々読み出し、書き込んだデータと書き込まれたデータとを比較することで、データ間に整合性があるか否かを判定する。具体的には、プロセッサ110は、書き込み回数と記憶領域1から読み込んだデータとが同一であるか否かを判定すると共に、書き込み回数の反転値と記憶領域2から読み出したデータとが同一であるか否かを判定することで、データ間の整合性を判定する。そして、プロセッサ110は、データ間に整合性がないと判定すれば、処理をステップ34へと進める(Yes)。一方、プロセッサ110は、データ間に整合性があると判定すれば、書き込み機能診断処理を終了させる(No)。 In step 33, the processor 110 reads out the data written in the storage areas 1 and 2 of the EEPROM 130, respectively, and compares the written data with the written data to determine whether or not there is consistency between the data. judge. Specifically, the processor 110 determines whether or not the number of writes and the data read from the storage area 1 are the same, and the inverted value of the number of writes and the data read from the storage area 2 are the same. By determining whether or not it is, the consistency between the data is determined. Then, if the processor 110 determines that there is no consistency between the data, the process proceeds to step 34 (Yes). On the other hand, if the processor 110 determines that there is consistency between the data, the processor 110 ends the write function diagnosis process (No).

ステップ34では、データ間に整合性がない、即ち、データを正常に書き込むことができなかったため、プロセッサ110が、データ書き込み機能が失陥していると診断する。なお、警告灯を自ら点灯させることができない電動VTCのデータ書き込み機能が失陥していると診断されたときには、プロセッサ110は、例えば、CAN通信を介してエンジン制御ユニットなどへ警告灯の点灯依頼を送信し、エンジン制御ユニットが、車両の運転席の前方に取り付けられているインストルメントパネルの警告灯を点灯させてもよい。また、データ書き込み機能が所定回数連続して失陥していると診断されたときに、その診断を確定するようにしてもよい。 In step 34, the processor 110 diagnoses that the data writing function has failed because there is no consistency between the data, that is, the data could not be written normally. When it is diagnosed that the data writing function of the electric VTC that cannot turn on the warning light by itself has failed, the processor 110 requests, for example, the engine control unit to turn on the warning light via CAN communication. The engine control unit may turn on the warning light of the instrument panel mounted in front of the driver's seat of the vehicle. Further, when it is diagnosed that the data writing function has been continuously failed a predetermined number of times, the diagnosis may be confirmed.

かかる書き込み機能診断処理によれば、イグニッションスイッチがONになるたびに、EEPROM130に確保された記憶領域1及び2に対して、データ書き込み回数及びその反転値が書き込まれる。そして、書き込んだデータと書き込まれたデータとが比較され、これらの間に整合性がなければ、データ書き込み機能が失陥していると診断される。即ち、データ書き込み機能が失陥しているときには、EEPROM130にデータを書き込むことができないので、書き込むデータと書き込まれたデータとの間に整合性がなくなってしまう。このため、書き込むデータと書き込まれたデータとを比較することで、データ書き込み機能が失陥しているか否かを診断することができる。 According to the write function diagnosis process, every time the ignition switch is turned on, the number of data writes and the inverted value thereof are written to the storage areas 1 and 2 secured in the EEPROM 130. Then, the written data and the written data are compared, and if there is no consistency between them, it is diagnosed that the data writing function has failed. That is, when the data writing function has failed, the data cannot be written to the EEPROM 130, so that there is no consistency between the written data and the written data. Therefore, by comparing the written data with the written data, it is possible to diagnose whether or not the data writing function has failed.

ここで、データ書き込み機能の失陥診断方法の理解を容易ならしめることを目的として、具体的な例を挙げて説明する。なお、以下の説明においては、初期状態では、データ書き込み機能が正常であり、かつ、データ書き込み回数が0000h(16進数)であるものとする。ここで、初期状態のデータ書き込み回数は0000h以外の値でもよく、また、データ長も4バイトなどの任意の長さとしてもよい。ここで、データ書き込み回数のデータ長は、ハードウエア固有の書き込み単位の最小値(例えば、2バイト)とし、それ以上のデータ長であってもよい。但し、ハードウエア固有の書き込み単位の最小値の整数倍とすると、ソフトウエアの構成上、管理が容易になる。 Here, a specific example will be described for the purpose of facilitating the understanding of the failure diagnosis method of the data writing function. In the following description, it is assumed that the data writing function is normal and the number of times of data writing is 0000h (hexadecimal number) in the initial state. Here, the number of times of data writing in the initial state may be a value other than 0000h, and the data length may be any length such as 4 bytes. Here, the data length of the number of times of data writing is set to the minimum value (for example, 2 bytes) of the writing unit peculiar to the hardware, and the data length may be longer than that. However, if it is an integral multiple of the minimum value of the writing unit peculiar to the hardware, the management becomes easy due to the configuration of the software.

初期状態においてイグニッションスイッチがONになると、図16に示すように、初期化処理でインクリメントされたデータ書き込み回数0001hが記憶領域1に書き込まれると共に、データ書き込み回数の反転値FFFEhが記憶領域2に書き込まれる。初期状態ではデータ書き込み機能が正常であるため、書き込んだデータと書き込まれたデータとの間には整合性がある。このため、第1回目の診断においては、データ書き込み機能が正常であると診断される。ここで、電子制御装置100が搭載された車両が市場に出荷された後は、初期状態のデータ書き込み回数を使用しないようにすることで、初期状態(若しくは意図した初期化)か、そうでないかを区別することができる。また、市場に出荷されても初期状態のデータ書き込み回数のままであれば、出荷後に何らかの原因でEEPROM130が故障したと認識することができる。なお、このような場合には、初期状態のデータ書き込み回数は、ソフトウエアによっても書き込まれないようにすることが好ましい。 When the ignition switch is turned on in the initial state, as shown in FIG. 16, the data write count 0001h incremented by the initialization process is written to the storage area 1, and the inverted value FFFEh of the data write count is written to the storage area 2. Is done. Since the data writing function is normal in the initial state, there is consistency between the written data and the written data. Therefore, in the first diagnosis, it is diagnosed that the data writing function is normal. Here, after the vehicle equipped with the electronic control device 100 is shipped to the market, the initial state (or intended initialization) or not is performed by not using the data write count in the initial state. Can be distinguished. Further, even if the data is shipped to the market, if the number of data writes in the initial state remains, it can be recognized that the EEPROM 130 has failed for some reason after the shipment. In such a case, it is preferable that the number of times of data writing in the initial state is not written by software.

イグニッションスイッチが再度ONになると、図17に示すように、初期化処理でインクリメントされたデータ書き込み回数0002hが記憶領域1に書き込まれると共に、データ書き込み回数の反転値FFFDhが記憶領域2に書き込まれる。このとき、データ書き込み機能が正常であるため、書き込んだデータと書き込まれたデータとの間には整合性がある。このため、第2回目の診断においても、データ書き込み機能が正常であると診断される。その後、イグニッションスイッチがOFFになるまでの間に、何らかの理由によって、データ書き込み機能が失陥したとする。 When the ignition switch is turned on again, as shown in FIG. 17, the data write count 0002h incremented by the initialization process is written to the storage area 1, and the inverted value FFFDh of the data write count is written to the storage area 2. At this time, since the data writing function is normal, there is consistency between the written data and the written data. Therefore, even in the second diagnosis, it is diagnosed that the data writing function is normal. After that, it is assumed that the data writing function has failed for some reason until the ignition switch is turned off.

イグニッションスイッチが再度ONになると、図18に示すように、初期化処理でインクリメントされたデータ書き込み回数0003hが記憶領域1に書き込まれると共に、データ書き込み回数の反転値FFFChが記憶領域2に書き込まれる。このとき、データ書き込み機能が失陥しているので、記憶領域1及び2の内容は、前回のまま、即ち、記憶領域1には0002h、記憶領域2にはFFFDhが書き込まれており、書き込むデータと書き込まれたデータとの間には整合性がなくなってしまう。このため、第3回目の診断においては、データ書き込み機能が失陥していると診断される。 When the ignition switch is turned on again, as shown in FIG. 18, the data write count 0003h incremented by the initialization process is written to the storage area 1, and the inverted value FFFCh of the data write count is written to the storage area 2. At this time, since the data writing function has failed, the contents of the storage areas 1 and 2 are the same as the previous time, that is, 0002h is written in the storage area 1 and FFFDh is written in the storage area 2, and the data to be written is written. And the written data will be inconsistent. Therefore, in the third diagnosis, it is diagnosed that the data writing function is impaired.

その後、イグニッションスイッチが再度ONになると、図19に示すように、初期化処理でインクリメントされたデータ書き込み回数0004hが記憶領域1に書き込まれると共に、データ書き込み回数の反転値FFFBhが記憶領域2に書き込まれる。このとき、データ書き込み機能が失陥しているので、記憶領域1には0002h、記憶領域2にはFFFDhが書き込まれており、書き込むデータと書き込まれたデータとの間には整合性がなくなってしまう。このため、第4回目の診断においては、データ書き込み機能が相変わらず失陥していると診断される。 After that, when the ignition switch is turned on again, as shown in FIG. 19, the data write count 0004h incremented by the initialization process is written to the storage area 1, and the inverted value FFFBh of the data write count is written to the storage area 2. Is done. At this time, since the data writing function is lost, 0002h is written in the storage area 1 and FFFDh is written in the storage area 2, and there is no consistency between the written data and the written data. It ends up. Therefore, in the fourth diagnosis, it is diagnosed that the data writing function is still impaired.

なお、データ書き込み機能の失陥診断は、EEPROM130に確保された2つの記憶領域1及び2に限らず、EEPROM130に確保された少なくとも1つの記憶領域を使用して、ここに任意のデータ(診断ごとに異なる値を示すデータ)を書き込むことで診断することもできる。また、EEPROM130の記憶領域は、例えば、EEPROM130のデータ書き込み回数の制約が緩ければ、データバンク1~4のいずれかを利用してもよい。この場合、特定のデータバンクに対するデータ書き込み回数が過度に増加しないように、データバンク1~4を順番に利用することが望ましい。 The failure diagnosis of the data writing function is not limited to the two storage areas 1 and 2 secured in the EEPROM 130, and any data (for each diagnosis) is used here using at least one storage area secured in the EEPROM 130. It is also possible to make a diagnosis by writing data indicating different values in. Further, as the storage area of the EEPROM 130, for example, any one of the data banks 1 to 4 may be used if the restriction on the number of times of data writing of the EEPROM 130 is relaxed. In this case, it is desirable to use the data banks 1 to 4 in order so that the number of times of data writing to a specific data bank does not increase excessively.

100 電子制御装置(自動車用電子制御装置)
130 EEPROM(不揮発性メモリ)
100 Electronic control device (electronic control device for automobiles)
130 EEPROM (non-volatile memory)

Claims (6)

電気的にデータを書換可能な不揮発性メモリを有する自動車用電子制御装置であって、
イグニッションスイッチがOFFになったセルフシャットダウン中に、前記不揮発性メモリに確保された複数の第1の記憶領域に同一データを書き込み、
前記イグニッションスイッチがONになった起動時に、前記複数の第1の記憶領域に書き込まれた各データが正常であるか否かを判定し、前記データの少なくとも1つが正常でなければ、正常でないと判定された前記データが書き込まれていた前記第1の記憶領域に正常であると判定された前記データを書き込むに先立って、データ書き込み対象の前記第1の記憶領域に所定のデータを書き込んでから前記データを書き込み、当該データを正常に書き込むことができなければ、前記不揮発性メモリが故障していると診断する、
自動車用電子制御装置。
An electronic control device for automobiles having a non-volatile memory capable of electrically rewriting data.
During the self-shutdown when the ignition switch is turned off, the same data is written to the plurality of first storage areas secured in the non-volatile memory.
At the time of activation when the ignition switch is turned on, it is determined whether or not each data written in the plurality of first storage areas is normal, and if at least one of the data is not normal, it is not normal. Prior to writing the data determined to be normal in the first storage area in which the determined data was written, the predetermined data is written in the first storage area to be written. If the data cannot be written and the data cannot be written normally, it is diagnosed that the non-volatile memory has failed.
Electronic control device for automobiles.
前記所定のデータは、16進数の5555h及びAAAAhである、
請求項1に記載の自動車用電子制御装置。
The predetermined data are hexadecimal numbers 5555h and AAAAh.
The electronic control device for an automobile according to claim 1 .
前記複数の第1の記憶領域に書き込まれていたすべてのデータが正常でないとき、前記複数の第1の記憶領域のすべてに所定のデフォルト値を書き込む、
請求項1又は請求項2に記載の自動車用電子制御装置。
When all the data written in the plurality of first storage areas is not normal, a predetermined default value is written in all of the plurality of first storage areas .
The electronic control device for an automobile according to claim 1 or 2 .
前記不揮発性メモリが故障していると診断されたとき、他の電子制御装置に対して警告灯の点灯依頼を送信する、
請求項1~請求項3のいずれか1つに記載の自動車用電子制御装置。
When it is diagnosed that the non-volatile memory has failed, a request to turn on the warning light is sent to another electronic control device.
The electronic control device for an automobile according to any one of claims 1 to 3 .
前記イグニッションスイッチがONになるたびに、前記不揮発性メモリに確保された少なくとも1つの第2の記憶領域に任意のデータを書き込み、前記任意のデータと前記少なくとも1つの第2の記憶領域に書き込まれたデータとを比較して、前記不揮発性メモリへのデータ書き込み機能が失陥しているか否かを診断する、
請求項1~請求項4のいずれか1つに記載の自動車用電子制御装置。
Every time the ignition switch is turned on, arbitrary data is written to at least one second storage area reserved in the non-volatile memory, and the arbitrary data is written to the at least one second storage area. It is diagnosed whether or not the data writing function to the non-volatile memory has failed by comparing with the data.
The electronic control device for an automobile according to any one of claims 1 to 4 .
前記任意のデータは、前記イグニッションスイッチがONになるたびに変化するデータである、
請求項5に記載の自動車用電子制御装置。
The arbitrary data is data that changes each time the ignition switch is turned on.
The electronic control device for an automobile according to claim 5 .
JP2018161498A 2018-08-30 2018-08-30 Electronic control device for automobiles Active JP7029366B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018161498A JP7029366B2 (en) 2018-08-30 2018-08-30 Electronic control device for automobiles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018161498A JP7029366B2 (en) 2018-08-30 2018-08-30 Electronic control device for automobiles

Publications (2)

Publication Number Publication Date
JP2020035503A JP2020035503A (en) 2020-03-05
JP7029366B2 true JP7029366B2 (en) 2022-03-03

Family

ID=69668363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018161498A Active JP7029366B2 (en) 2018-08-30 2018-08-30 Electronic control device for automobiles

Country Status (1)

Country Link
JP (1) JP7029366B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021010143A1 (en) * 2019-07-12 2021-01-21 パナソニックIpマネジメント株式会社 In-vehicle secure storage system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009289049A (en) 2008-05-29 2009-12-10 Toyota Motor Corp Memory control device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3463127B2 (en) * 1994-05-06 2003-11-05 カシオ計算機株式会社 Memory self test method
JP2004138542A (en) * 2002-10-18 2004-05-13 Yazaki Corp Flowmeter
JP2007072695A (en) * 2005-09-06 2007-03-22 Of Networks:Kk Redundancy storage method and program to flash memory
JP5915490B2 (en) * 2012-10-05 2016-05-11 株式会社デンソー Electronic control unit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009289049A (en) 2008-05-29 2009-12-10 Toyota Motor Corp Memory control device

Also Published As

Publication number Publication date
JP2020035503A (en) 2020-03-05

Similar Documents

Publication Publication Date Title
US10964135B2 (en) In-vehicle electronic control unit and method for abnormality response processing thereof
JP4475320B2 (en) Vehicle memory management device
JP5176728B2 (en) Electronic control device for vehicle
JP4227149B2 (en) Information storage method for electronic control unit
JP2014035730A (en) Vehicle control device
CN110809755A (en) Electronic control system
JP7029366B2 (en) Electronic control device for automobiles
JP6708596B2 (en) Electronic control device and control program verification method
JP6663371B2 (en) Electronic control unit
US11314634B2 (en) Electronic control unit and data protection method therefor
JP6611877B1 (en) Semiconductor integrated circuit and rotation detection device
JP6869743B2 (en) Electronic control device for automobiles
JP2004151944A (en) Method for writing data in non-volatile storage device, its program and device, and onboard electronic controller
JP2006017468A (en) Data recorder
JP2015171853A (en) Vehicle electronic control unit
JP7007223B2 (en) Control device and abnormality detection method
JP6159668B2 (en) Vehicle control device
JP2009520289A (en) Method for detecting a power outage in a data storage device and method for restoring a data storage device
JPH0793006A (en) Electronic control unit for vehicle
JP5872982B2 (en) Vehicle control device
JP6956566B2 (en) Vehicle information storage device
JP3960212B2 (en) Electronic control unit
JP2004021520A (en) Electronic controller for vehicle
JP6887277B2 (en) Electronic control device for automobiles
JP6975581B2 (en) Vehicle information storage device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211109

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220107

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220218

R150 Certificate of patent or registration of utility model

Ref document number: 7029366

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150