JP2020035503A - Automobile electronic control device - Google Patents

Automobile electronic control device Download PDF

Info

Publication number
JP2020035503A
JP2020035503A JP2018161498A JP2018161498A JP2020035503A JP 2020035503 A JP2020035503 A JP 2020035503A JP 2018161498 A JP2018161498 A JP 2018161498A JP 2018161498 A JP2018161498 A JP 2018161498A JP 2020035503 A JP2020035503 A JP 2020035503A
Authority
JP
Japan
Prior art keywords
data
written
electronic control
normal
control unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018161498A
Other languages
Japanese (ja)
Other versions
JP7029366B2 (en
Inventor
謙二 吉田
Kenji Yoshida
謙二 吉田
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 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

Landscapes

  • Debugging And Monitoring (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

To improve failure diagnostic accuracy of a non-volatile memory.SOLUTION: An automobile electronic control device writes the same data to a plurality of data banks secured in a non-volatile memory during self shutdown in which an ignition switch is turned OFF. And the automobile electronic control device determines whether each data written to the plurality of data banks is normal at the time of starting in which the ignition switch is turned ON (S11, S12), and if at least one of the data is not normal (S13), writes the data determined to be normal to the data banks written with the data determined not to be normal (S14). And if the data cannot be written normally (S16), the automobile electronic control device diagnoses that the non-volatile memory has failed (S19).SELECTED DRAWING: Figure 4

Description

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

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

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

特開2014−75078号公報JP 2014-75078 A

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

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

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

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

自動車用電子制御装置の一例を示す概略構成図である。It is a schematic structure figure showing an example of an electronic control unit for vehicles. 学習値、故障情報などのデータを格納する記憶領域のデータ構造図である。FIG. 4 is a data structure diagram of a storage area for storing data such as learning values and failure information. データ書き込み処理の一例を示すフローチャートである。9 is a flowchart illustrating an example of a data write process. 故障診断処理の一例を示すフローチャートである。It is a flowchart which shows an example of a failure diagnosis process. 正常時における診断シーケンスの第1段階の説明図である。FIG. 7 is an explanatory diagram of a first stage of a diagnostic sequence in a normal state. 正常時における診断シーケンスの第2段階の説明図である。FIG. 9 is an explanatory diagram of a second stage of the diagnostic sequence in a normal state. 正常時における診断シーケンスの第3段階の説明図である。FIG. 11 is an explanatory diagram of a third stage of the diagnostic sequence in a normal state. 正常時における診断シーケンスの第4段階の説明図である。FIG. 14 is an explanatory diagram of a fourth stage of the diagnostic sequence in a normal state. 異常時における診断シーケンスの第1段階の説明図である。FIG. 4 is an explanatory diagram of a first stage of a diagnostic sequence when an abnormality occurs. 異常時における診断シーケンスの第2段階の説明図である。FIG. 9 is an explanatory diagram of a second stage of the diagnostic sequence when an abnormality occurs. 異常時における診断シーケンスの第3段階の説明図である。FIG. 10 is an explanatory diagram of a third stage of the diagnostic sequence when an abnormality occurs. 異常時における診断シーケンスの第4段階の説明図である。FIG. 14 is an explanatory diagram of a fourth stage of the diagnostic sequence at the time of abnormality. 異常時における診断シーケンスの第5段階の説明図である。FIG. 11 is an explanatory diagram of a fifth stage of the diagnostic sequence at the time of abnormality. 異常時における診断シーケンスの第6段階の説明図である。FIG. 14 is an explanatory diagram of a sixth step of the diagnostic sequence at the time of abnormality. 書き込み機能診断処理の一例を示すフローチャートである。It is a flowchart which shows an example of a writing function diagnosis process. 書き込み機能診断シーケンスの第1段階の説明図である。FIG. 9 is an explanatory diagram of a first stage of the writing function diagnosis sequence. 書き込み機能診断シーケンスの第2段階の説明図である。FIG. 9 is an explanatory diagram of a second stage of the writing function diagnosis sequence. 書き込み機能診断シーケンスの第3段階の説明図である。FIG. 10 is an explanatory diagram of a third stage of the write function diagnosis sequence. 書き込み機能診断シーケンスの第4段階の説明図である。FIG. 14 is an explanatory diagram of a fourth stage of the writing function diagnosis sequence.

以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。
図1は、自動車用電子制御装置(以下「電子制御装置」という)100の一例を示す。
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 shows an example of a vehicle electronic control device (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 unit 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) for electrically changing valve timing, and a VCR (Variable Compression Ratio) for changing a compression ratio. Electronic control of such. The electronic control device 100 connects the processor 110, a RAM (Random Access Memory) 120, an EEPROM (Electrically Etasable Programmable Read Only Memory) 130, a communication circuit 140, an input / output circuit 150, and these to allow mutual communication. And a bus 160. Note that subsystems such as an electric VTC and a VCR generally do not have a backup RAM that can continue to hold a failure detected during self-shutdown, or a function of turning on a warning lamp. In the following description, the electronic control device 100 is a subsystem such as an electric VTC, but is not limited thereto.

プロセッサ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 that loses data when the power is turned off, and includes, for example, a DRAM (Dynamic Random Access Memory) and an SRAM (Static Random Access Memory). The EEPROM 130 is an example of a non-volatile memory that retains data even when the power is turned off and is electrically rewritable, and includes, 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), which is an example of an in-vehicle network, and includes, for example, a CAN transceiver. 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, and includes, for example, an A / D converter and a D / D converter. Etc.

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

そして、電子制御装置100は、例えば、EEPROM130とは異なるPROM(Programmable ROM)に格納されている制御プログラム(制御変数を含む)に従って、以下に説明する処理によって、EEPROM130に故障が発生しているか否かを診断する。ここで、制御プログラムがPROMに格納されている理由は、EEPROM130に故障が発生していると、制御プログラムが正常に動作しない可能性があるため、EEPROM130に故障が発生しているか否かを誤診断してしまうおそれがあるからである。   The electronic control unit 100 determines whether a failure has occurred in the EEPROM 130 by a process described below in accordance with a control program (including control variables) stored in a PROM (Programmable ROM) different from the EEPROM 130, for example. To 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 properly. Therefore, it is erroneously determined whether or not the EEPROM 130 has a failure. This is because a diagnosis may be made.

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

ステップ1(図3では「S1」と略記する。以下同様。)では、プロセッサ110が、EEPROM130のデータバンクを特定する制御変数iに1を代入する。   In step 1 (abbreviated as “S1” in FIG. 3; the same applies hereinafter), the processor 110 substitutes 1 for a control variable i that specifies 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 a checksum of the data to be written to 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 to the data bank [i], and determines whether the data writing has been completed normally. . If the processor 110 determines that the data writing has been completed normally, the process proceeds to step 5 (Yes). On the other hand, if the processor 110 determines that the data writing does not end normally, that is, determines that an error has occurred in the data writing, the process proceeds to step 4 (No). The hardware of the electronic control unit 100 may determine whether the data writing has been completed normally.

ステップ4では、データの書き込みが正常に終了しなかったので、プロセッサ110が、異常を検出したことをRAM120に記憶させる。その後、プロセッサ110は、処理をステップ5へと進める。なお、セルフシャットダウンが終了したときには、内部電源が遮断されてRAM120のデータが消失するので、異常を検出したことをRAM120に記憶させなくてもよい。   In step 4, since the data writing did not end normally, the processor 110 causes the RAM 120 to store the detection of the abnormality. After that, the processor 110 causes the process to proceed to step 5. When the self-shutdown is completed, the internal power supply is shut 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 has exceeded the number n (4 in this embodiment) of data banks secured in the EEPROM 130, that is, whether or not data has been written to the last data bank. I do. If the processor 110 determines that data has been written up to the last data bank, it ends the data write process (Yes). On the other hand, if the processor 110 determines that data has not been written to the last data bank, the process returns to step 2 (No). In consideration of a possibility that the data writing process cannot be terminated due to a failure of the data writing function or a failure of the EEPROM 130, even if the data writing process is forcibly terminated after a predetermined time has elapsed since the ignition switch was turned off. Good.

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

ステップ11では、プロセッサ110が、EEPROM130の複数のデータバンクに書き込まれているすべてのデータを読み込む。なお、プロセッサ110は、どのデータバンクに書き込まれていたデータであるかを特定可能なように、例えば、数字からなる識別子を付しつつデータを読み込むことができる。ここで、識別子として順次大きくなる数値を使用した場合、最も大きい数字が付されているデータバンクが最新のものであると特定することもできる。   In step 11, the processor 110 reads all data written in the plurality of data banks of the EEPROM 130. Note that the processor 110 can read data while giving an identifier consisting of a number, for example, so as to specify which data bank the data was written to. Here, when a numerical value that sequentially increases is used as the identifier, it is possible to specify that the data bank to which the largest numeral is assigned 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 written in each data bank, and finds data having abnormal contents (abnormal data). It is determined whether or not there is. If the processor 110 determines that there is abnormal data, the process proceeds to step 13 (Yes). On the other hand, if the processor 110 determines that there is no abnormal data, the process proceeds to step 23 (No). Here, the identifier of the data bank in which the abnormal data has been written is written in, for example, the RAM 120 for the processing described below.

ステップ13では、プロセッサ110が、ステップ12での比較結果に基づいて、内容が正常であるデータ(正常データ)があるか否かを判定する。そして、プロセッサ110は、正常データがあると判定すれば、処理をステップ14へと進める(Yes)。一方、プロセッサ110は、正常データがない、即ち、各データバンクに書き込まれていたすべてのデータが異常であると判定すれば、処理をステップ16へと進める(No)。   In step 13, the processor 110 determines whether there is data whose contents are normal (normal data) based on the comparison result in step 12. If the processor 110 determines that there is normal data, the process proceeds to step 14 (Yes). On the other hand, if the processor 110 determines that there is no normal data, that is, all data written in each data bank is abnormal, the process 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, the predetermined rule may be, for example, a data bank specified as the latest one by the identifier among the data banks whose data has been read normally in step 11.

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

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

ステップ17では、各データバンクに書き込まれていたすべてのデータが異常であるため、プロセッサ110が、すべてのデータバンク1〜4に初期値などのデフォルト値を書き込む。このとき、プロセッサ110は、各データバンクに書き込むデータのチェックサムを算出する。その後、プロセッサ110は、処理をステップ18へと進める。   In step 17, since all data written in each data bank is abnormal, the processor 110 writes default values such as initial values to all data banks 1 to 4. At this time, the processor 110 calculates a checksum of data to be written to each data bank. After that, the processor 110 causes the process to proceed 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 step 17 with the checksum included in the data written in the data bank for the data bank to which the data has been written in step 15 or step 17, It is determined whether the data writing has been completed normally. If the processor 110 determines that the data writing has been completed normally, the process proceeds to step 19 (Yes). On the other hand, if the processor 110 determines that the data writing does not end normally, that is, determines that an error has occurred in the data writing, the process proceeds to step 20 (No). The hardware of the electronic control unit 100 may determine whether the data writing has been completed normally.

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

ステップ20では、セルフシャットダウン中にデータの書き込みが正常に終了しなかったデータバンクへのデータの書き込みが正常に終了しなかったので、プロセッサ110が、EEPROM130が異常、即ち、EEPROM130が故障していると判断し、異常が検出されたことをRAM120に記憶させる。なお、RAM120に記憶させた情報は、制御対象を実際に制御する際に利用することができる。   In step 20, the data writing to the data bank that did not end normally during the self-shutdown did not end normally. Therefore, the processor 110 found that the EEPROM 130 was abnormal, that is, the EEPROM 130 failed. And that the abnormality is detected is stored in the RAM 120. 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 issues a warning light via a CAN communication or the like to, for example, an engine control unit or the like that can turn on a warning light of an instrument panel mounted in front of the driver's seat of the vehicle. Send a lighting request. Then, the engine control unit or the like that has received the lighting request turns on the warning light instead of the electronic control unit 100. Therefore, the driver of the vehicle can recognize that there is a possibility that a failure has occurred in the EEPROM 130 by turning on the warning light of the instrument panel. If the electronic control unit 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 control target to the fail-safe mode. Therefore, even if the EEPROM 130 is out of order, the control target can operate in a state where the functions are restricted, and, for example, the driver can drive the vehicle to a service factory. After that, the processor 110 ends the failure diagnosis processing. Note that the processor 110 may write the default value to the RAM 120 instead of, or in addition to, shifting to the fail-safe mode.

かかる故障診断処理によれば、イグニッションスイッチがONになった起動時に、EEPROM130の複数のデータバンクに書き込まれている各データが正常であるか否かが判定される。そして、データの少なくとも1つが異常であれば、異常データが書き込まれていたデータバンクに最新の正常データが書き込まれる。その後、データが正常に書き込まれたか否かが判定され、データが正常に書き込まれていなければ、EEPROM130が故障していると診断される。   According to the failure diagnosis processing, 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. If at least one of the data is abnormal, the latest normal data is written to the data bank where the abnormal data was written. Thereafter, it is determined whether or not the data has been written normally. 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, in consideration of the possibility that the data writing during the self-shutdown did not end normally due to an instantaneous decrease or interruption of the writing voltage, the data writing related to the data writing is performed again by restarting the data writing at the time of restart. It is diagnosed whether the bank, that is, the EEPROM 130 has failed. Therefore, even if the write voltage is instantaneously reduced or interrupted frequently for some reason, it is diagnosed whether or not the EEPROM 130 has failed at the time of restart, so that the failure diagnosis accuracy of the EEPROM 130 can be improved. Can be. If a failure of the EEPROM 130 is detected at the time of restart, the subsystem such as the electric VTC cannot turn on the warning light. For example, the engine control unit that can turn on the warning light turns on the warning light via CAN communication or the like. By transmitting the request, the engine control unit can turn on the warning light to notify the driver instead of the subsystem. Further, since the failure of the EEPROM 130 is diagnosed when the ignition switch is turned on, a backup RAM is not required.

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

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

[正常時の診断シーケンス]
イグニッションスイッチがOFFになったセルフシャットダウン中のデータ書き込みでは、図5に示すように、RAM120のデータ2が、最初に、EEPROM130のデータバンク1に書き込まれる。次に、RAM120のデータ2が、EEPROM130のデータバンク2及び3に書き込まれた後、図6に示すように、RAM120のデータ2が、EEPROM130のデータバンク4に書き込まれる。
[Normal diagnostic sequence]
In data writing during self-shutdown with the ignition switch turned off, as shown in FIG. 5, 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が正常であるとの診断が行われる。   Thereafter, 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 become undefined as shown in FIG. 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 is 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 to normal. Such processing is sequentially executed when the ignition switch is turned OFF or ON, and a diagnosis is made that the EEPROM 130 is normal.

[異常時の診断シーケンス]
イグニッションスイッチがOFFになったセルフシャットダウン中のデータ書き込みでは、図9に示すように、RAM120のデータ2が、最初に、EEPROM130のデータバンク1に書き込まれる。次に、RAM120のデータ2が、EEPROM130のデータバンク2に書き込まれる。このとき、データバンク2が故障しているため、データ書き込みが正常に終了せず、図10に示すように、RAM120のEEPROM状態が異常に設定される。そして、RAM120のデータ2が、EEPROM130のデータバンク3及び4に夫々書き込まれる。
[Diagnosis sequence at abnormal time]
In data writing during self-shutdown with the ignition switch turned off, as shown in FIG. 9, 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 has failed, the data writing does not end normally, and the EEPROM state of the RAM 120 is set to abnormal 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が故障しているとの診断が行われる。   Thereafter, 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 state of the EEPROM and the data become indefinite 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 to the data bank 2 as shown in FIG. Then, since the data writing to the data bank 2 did not end normally, the EEPROM state of the RAM 120 is set to abnormal as shown in FIG. After executing such processing, as shown in FIG. 14, the data of 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 a diagnosis that the EEPROM 130 has failed is performed.

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

そこで、電子制御装置100のプロセッサ110は、イグニッションスイッチがONになるたびに、EEPROM130に確保された2つの記憶領域1及び2に任意のデータ及びその反転値を夫々書き込み、任意のデータ及びその反転値と書き込まれた2つのデータとを比較して、データ書き込み機能が失陥しているか否かを診断してもよい。ここで、任意のデータとしては、イグニッションスイッチがONになるたびに変化するデータが望ましく、例えば、EEPROM130へのデータ書き込み回数などを使用することができる。なお、記憶領域1及び2が、少なくとも1つの第2の記憶領域の一例として挙げられる。   Therefore, every time the ignition switch is turned on, the processor 110 of the electronic control unit 100 writes arbitrary data and its inverted value into the two storage areas 1 and 2 secured in the EEPROM 130, and writes the arbitrary data and its inverted value. The value may be compared with the two written data to determine whether the data writing function has failed. Here, as the arbitrary data, data that changes each time the ignition switch is turned on is desirable. For example, the number of times of writing data to the EEPROM 130 can be used. Note that 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 illustrates an example of a writing function diagnosis process executed by the processor 110 of the electronic control device 100 at the time of activation when the ignition switch is turned on. It is assumed that the number of times of writing data to the EEPROM 130 is obtained by incrementing a value read from the storage area 1 of the EEPROM 130 in the initialization processing of the electronic control device 100 and writing the incremented value 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 the read count into 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 the inverted value in the storage area 2 of the EEPROM 130. Here, the inverted value of the number of times of writing means a value obtained by inverting each bit of the number of times of writing data, that is, inverting 0 and 1 of each bit. In this way, by writing the incremented write count and its inverted value to the EEPROM 130, a write function diagnosis can be performed for all bits (write units unique to hardware) each time. In addition, diagnosis of the bus of the EEPROM 130 can 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 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 times of writing and the data read from the storage area 1 are the same, and the inverted value of the number of times of writing and the data read from the storage area 2 are the same. By determining whether or not the data is consistent, data consistency is determined. 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, it ends the write function diagnosis processing (No).

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

かかる書き込み機能診断処理によれば、イグニッションスイッチがONになるたびに、EEPROM130に確保された記憶領域1及び2に対して、データ書き込み回数及びその反転値が書き込まれる。そして、書き込んだデータと書き込まれたデータとが比較され、これらの間に整合性がなければ、データ書き込み機能が失陥していると診断される。即ち、データ書き込み機能が失陥しているときには、EEPROM130にデータを書き込むことができないので、書き込むデータと書き込まれたデータとの間に整合性がなくなってしまう。このため、書き込むデータと書き込まれたデータとを比較することで、データ書き込み機能が失陥しているか否かを診断することができる。   According to the write function diagnosis processing, each time the ignition switch is turned on, the number of times of data writing and its inverted value 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, 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 data to be written 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, in the initial state, the data write function is normal and the number of times of data write is 0000h (hexadecimal). 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 an arbitrary length such as 4 bytes. Here, the data length of the number of times of data writing is a minimum value (for example, 2 bytes) of a hardware-specific writing unit, and may be a data length longer than that. However, if it is an integral multiple of the minimum value of the write unit unique to hardware, management becomes easy due to the configuration of 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 number 0001h incremented in the initialization processing is written to the storage area 1, and the inverted value FFFEh of the data write number is written to the storage area 2 as shown in FIG. It is. Since the data writing function is normal in the initial state, there is consistency between the written data and the written data. For this reason, in the first diagnosis, it is diagnosed that the data writing function is normal. Here, after the vehicle on which the electronic control device 100 is mounted is shipped to the market, whether the initial state (or intended initialization) or not is determined by not using the data write count in the initial state. Can be distinguished. In addition, if the number of times of data writing in the initial state remains the same even after being shipped to the market, it can be recognized that the EEPROM 130 has failed for some reason after shipping. 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 number of times of data writing 0002h incremented in the initialization processing is written to the storage area 1, and the inverted value FFFDh of the number of times of data writing 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. For this reason, also in the second diagnosis, it is diagnosed that the data writing function is normal. Thereafter, it is assumed that the data writing function has failed for some reason before 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 number of times of data writing 0003h incremented in the initialization process is written to the storage area 1, and the inverted value FFFCh of the number of times of data writing 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 remain the same as before, that is, 0002h is written in the storage area 1, FFFDh is written in the storage area 2, and the data to be written is written. And the written data will not be consistent. For this reason, in the third diagnosis, it is diagnosed that the data writing function has failed.

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

なお、データ書き込み機能の失陥診断は、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 at least one storage area secured in the EEPROM 130 is used to store arbitrary data (for each diagnosis). Can be diagnosed by writing data indicating a different value to The storage area of the EEPROM 130 may use any one of the data banks 1 to 4 if, for example, the number of times of writing data in the EEPROM 130 is loose. In this case, it is desirable to use the data banks 1 to 4 in order so that the number of times of writing data to a specific data bank does not excessively increase.

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

Claims (7)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220138353A1 (en) * 2019-07-12 2022-05-05 Panasonic Intellectual Property Management Co., Ltd. On-board secure storage system for detecting unauthorized access or failure and performing predetermined processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302231A (en) * 1994-05-06 1995-11-14 Casio Comput Co Ltd Memory self-testing 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
JP2009289049A (en) * 2008-05-29 2009-12-10 Toyota Motor Corp Memory control device
JP2014075078A (en) * 2012-10-05 2014-04-24 Denso Corp Electronic control device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302231A (en) * 1994-05-06 1995-11-14 Casio Comput Co Ltd Memory self-testing 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
JP2009289049A (en) * 2008-05-29 2009-12-10 Toyota Motor Corp Memory control device
JP2014075078A (en) * 2012-10-05 2014-04-24 Denso Corp Electronic control device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220138353A1 (en) * 2019-07-12 2022-05-05 Panasonic Intellectual Property Management Co., Ltd. On-board secure storage system for detecting unauthorized access or failure and performing predetermined processing
US11983304B2 (en) * 2019-07-12 2024-05-14 Panasonic Intellectual Property Management Co., Ltd. On-board secure storage system for detecting unauthorized access or failure and performing predetermined processing

Also Published As

Publication number Publication date
JP7029366B2 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
US10964135B2 (en) In-vehicle electronic control unit and method for abnormality response processing thereof
JP2014035730A (en) Vehicle control device
CN110809755A (en) Electronic control system
US6430709B1 (en) Apparatus and method for diagnosing microcomputer memory
JP7029366B2 (en) Electronic control device for automobiles
JP4001088B2 (en) Electronic control unit
JP6869743B2 (en) Electronic control device for automobiles
US20150012781A1 (en) Power supply diagnostic strategy
JP6708596B2 (en) Electronic control device and control program verification method
US11314634B2 (en) Electronic control unit and data protection method therefor
JP2005023923A (en) Electronic system
JP3296043B2 (en) Vehicle electronic control unit
JP2002091834A (en) Rom diagnostic device
JP2004151944A (en) Method for writing data in non-volatile storage device, its program and device, and onboard electronic controller
JP4353126B2 (en) Vehicle state determination device
JP2015171853A (en) Vehicle electronic control unit
JP3960212B2 (en) Electronic control unit
JP6159668B2 (en) Vehicle control device
US20130055017A1 (en) Device and method for restoring information in a main storage unit
US20070033492A1 (en) Method and device for monitoring an electronic circuit
JP6075262B2 (en) Control device
JP7007223B2 (en) Control device and abnormality detection method
WO2023233611A1 (en) Electronic control device
JP2014035729A (en) Vehicle control device
JP4026924B2 (en) Electronic control unit for automobile

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