JP2014232437A - Electronic controller and memory rewrite method - Google Patents

Electronic controller and memory rewrite method Download PDF

Info

Publication number
JP2014232437A
JP2014232437A JP2013113144A JP2013113144A JP2014232437A JP 2014232437 A JP2014232437 A JP 2014232437A JP 2013113144 A JP2013113144 A JP 2013113144A JP 2013113144 A JP2013113144 A JP 2013113144A JP 2014232437 A JP2014232437 A JP 2014232437A
Authority
JP
Japan
Prior art keywords
rewrite
verification
data
reception
rewriting
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
JP2013113144A
Other languages
Japanese (ja)
Other versions
JP5835271B2 (en
Inventor
憲治 坪井
Kenji Tsuboi
憲治 坪井
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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2013113144A priority Critical patent/JP5835271B2/en
Priority to DE102014210266.9A priority patent/DE102014210266A1/en
Publication of JP2014232437A publication Critical patent/JP2014232437A/en
Application granted granted Critical
Publication of JP5835271B2 publication Critical patent/JP5835271B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To make time required to rewrite a control program shorter.SOLUTION: First, an ECU 1 executes a receiving process for receiving rewrite data for rewriting a content of a control program stored in a flash ROM 3 from outside. By writing the rewrite data received in the receiving process to the flash ROM 3, the ECU 1 executes a write process for rewriting the content of the control program stored in the flash ROM 3. Furthermore, if a state in which the ECU 1 does not execute the receiving process or a state in which the ECU 1 waits to receive the rewrite data in the receiving process, and a state in which the ECU 1 does not execute the rewrite process or a state in which the ECU 1 waits for the end of writing the rewrite data to the nonvolatile memory in the rewrite process are both satisfied, the ECU 1 executes a verification process for verifying whether the rewrite data written to the nonvolatile memory is appropriate.

Description

本発明は、所定の制御対象の制御に用いる制御プログラムを書き換え可能な電子制御装置およびメモリ書換方法に関する。   The present invention relates to an electronic control device and a memory rewriting method capable of rewriting a control program used for controlling a predetermined control target.

従来、記憶内容の書き換えが可能な不揮発性メモリに制御プログラムを記憶する電子制御装置において、制御プログラムの書き換えに要する時間を短縮するために、書換データを外部から受信する受信処理と、受信した書換データを不揮発性メモリに書き込むことにより制御プログラムを書き換える書換処理とを並行に実行するものが知られている(例えば、特許文献1を参照)。   Conventionally, in an electronic control device that stores a control program in a non-volatile memory capable of rewriting stored contents, in order to shorten the time required for rewriting the control program, a reception process for receiving rewrite data from the outside, and a received rewrite There is known one that executes a rewrite process for rewriting a control program in parallel by writing data in a nonvolatile memory (see, for example, Patent Document 1).

このように制御プログラムの書き換えが可能な電子制御装置では、受信した書換データと不揮発性メモリに書き込まれたデータとの一致を確認するベリファイ(Verification)が実行される。しかし、このベリファイでは、受信した書換データが電子制御装置にとって適切なものであるか否かを判断できない。このため、例えば、受信した書換データが第三者によって不正に書き換えられたものであっても、ベリファイにおいて上記の一致が確認されると、不正な書換データが不揮発性メモリに書き込まれてしまう。   In the electronic control device capable of rewriting the control program in this way, verification (Verification) for confirming the coincidence between the received rewritten data and the data written in the nonvolatile memory is executed. However, this verification cannot determine whether the received rewrite data is appropriate for the electronic control device. For this reason, for example, even if the received rewritten data is illegally rewritten by a third party, the illegal rewritten data is written in the nonvolatile memory when the above-mentioned coincidence is confirmed in the verification.

このような問題を解決するための手法として、書き換えたデータの妥当性を確認するバリデート(Validation)が知られている。バリデートでは、例えば、検証すべきデータについて演算を実行したり外部機器との認証を実行したりして、電子制御装置にとって適した書換データであるか否かを判断する。   As a method for solving such a problem, validation for confirming the validity of rewritten data is known. In the validation, for example, calculation is performed on data to be verified or authentication with an external device is performed to determine whether the data is rewritten data suitable for the electronic control device.

特開2000−20389号公報JP 2000-20389 A

しかし、バリデートを実行することにより、制御プログラムの書き換えに要する時間がバリデートの実行分長くなるという問題があった。
本発明は、こうした問題に鑑みてなされたものであり、制御プログラムの書き換えに要する時間を短縮することを目的とする。
However, by executing the validation, there is a problem that the time required for rewriting the control program becomes longer by the execution of the validation.
The present invention has been made in view of these problems, and an object thereof is to shorten the time required for rewriting a control program.

上記目的を達成するためになされた第1発明の電子制御装置は、不揮発性メモリと、受信処理実行手段と、書換処理実行手段と、検証処理実行手段とを備える。
不揮発性メモリは、記憶内容の書き換えが可能であり、所定の制御対象を制御するための制御プログラムを記憶する。
An electronic control device according to a first aspect of the invention made to achieve the above object includes a non-volatile memory, a reception process execution means, a rewrite process execution means, and a verification process execution means.
The nonvolatile memory can rewrite the stored contents, and stores a control program for controlling a predetermined control target.

そして第1発明の電子制御装置では、まず受信処理実行手段が、不揮発性メモリに記憶された制御プログラムの内容を書き換えるためのデータである書換データを外部から受信する受信処理を実行する。そして書換処理実行手段が、受信処理により受信した書換データを不揮発性メモリに書き込むことにより、不揮発性メモリに記憶された制御プログラムの内容を書き換える書換処理を実行する。また検証処理実行手段が、受信処理において書換データの受信を待っている状態であるか否か、および書換処理において不揮発性メモリへの書換データの書き込み終了を待っている状態であるか否かの少なくとも一方を条件として含むように予め設定された検証実行条件が成立した場合に、不揮発性メモリに書き込まれる書換データが適正なものであるか否かを検証する検証処理を実行する。   In the electronic control apparatus according to the first aspect of the invention, first, the reception process execution means executes a reception process for receiving rewrite data, which is data for rewriting the contents of the control program stored in the nonvolatile memory, from the outside. Then, the rewrite process execution means executes the rewrite process for rewriting the contents of the control program stored in the non-volatile memory by writing the rewrite data received by the receiving process into the non-volatile memory. Whether the verification process execution means is in a state of waiting for reception of rewrite data in the reception process, and whether it is in a state of waiting for completion of writing of rewrite data to the nonvolatile memory in the rewrite process. When a verification execution condition set in advance so as to include at least one of the conditions is satisfied, a verification process for verifying whether the rewritten data written in the nonvolatile memory is appropriate is executed.

このように構成された電子制御装置によれば、受信処理において書換データの受信を待っている状態、または、書換処理において不揮発性メモリへの書換データの書き込み終了を待っている状態である場合に、検証処理を実行することができる。このため、受信処理の実行中であっても、書換データの受信を待っている状態であれば、検証処理を実行することができるとともに、書換処理の実行中であっても、不揮発性メモリへの書換データの書き込み終了を待っている状態であれば、検証処理を実行することができる。すなわち、制御プログラムを書き換えるために実行される受信処理または書換処理と並行して検証処理を実行することができる。   According to the electronic control device configured as described above, in a state of waiting for reception of rewrite data in the reception process, or in a state of waiting for completion of writing of rewrite data to the nonvolatile memory in the rewrite process. The verification process can be executed. Therefore, even if the reception process is being executed, the verification process can be executed as long as it is waiting for the reception of the rewrite data. If it is in a state of waiting for completion of writing of the rewrite data, verification processing can be executed. That is, the verification process can be executed in parallel with the reception process or the rewrite process executed to rewrite the control program.

これにより、書き換え対象となる制御プログラム全体の書き込みが終了する前から検証処理を実行することができるため(すなわち、制御プログラム全体の書き込みが終了した後に検証処理を実行する必要がなくなるため)、制御プログラムの書き換えを開始してから検証処理が終了するまでの時間、すなわち制御プログラムの書き換えに要する時間を短縮することができる。   As a result, the verification process can be executed before the writing of the entire control program to be rewritten is completed (that is, the verification process need not be executed after the writing of the entire control program is completed). The time from the start of program rewriting to the end of the verification process, that is, the time required for rewriting the control program can be shortened.

また第2発明のメモリ書換方法は、受信処理実行手順と、書換処理実行手順と、検証処理実行手順とを備える。
そして第2発明のメモリ書換方法では、まず受信処理実行手順が、記憶内容の書き換えが可能であり所定の制御対象を制御するための制御プログラムを記憶する不揮発性メモリに記憶された制御プログラムの内容を書き換えるためのデータである書換データを受信する受信処理を実行する。そして書換処理実行手順が、受信処理により受信した書換データを不揮発性メモリに書き込むことにより、不揮発性メモリに記憶された制御プログラムの内容を書き換える書換処理を実行する。また検証処理実行手順が、受信処理において書換データの受信を待っている状態であるか否か、および書換処理において不揮発性メモリへの書換データの書き込み終了を待っている状態であるか否かの少なくとも一方を条件として含むように予め設定された検証実行条件が成立した場合に、不揮発性メモリに書き込まれる書換データが適正なものであるか否かを検証する検証処理を実行する。
The memory rewriting method of the second invention includes a reception process execution procedure, a rewrite process execution procedure, and a verification process execution procedure.
In the memory rewriting method according to the second aspect of the invention, first, the contents of the control program stored in the non-volatile memory storing the control program for controlling the predetermined control object, in which the reception processing execution procedure can rewrite the stored contents. A reception process for receiving rewrite data that is data for rewriting the data is executed. Then, the rewrite process execution procedure executes the rewrite process for rewriting the contents of the control program stored in the non-volatile memory by writing the rewrite data received by the receiving process into the non-volatile memory. Whether the verification process execution procedure is in a state of waiting for reception of rewrite data in the reception process, and whether it is in a state of waiting for completion of writing of rewrite data to the nonvolatile memory in the rewrite process. When a verification execution condition set in advance so as to include at least one of the conditions is satisfied, a verification process for verifying whether the rewritten data written in the nonvolatile memory is appropriate is executed.

第2発明のメモリ書換方法は、第1発明の電子制御装置にて実行される方法であり、当該方法を実行することで、第1発明の電子制御装置と同様の効果を得ることができる。   The memory rewriting method of the second invention is a method executed by the electronic control device of the first invention, and the same effect as that of the electronic control device of the first invention can be obtained by executing this method.

第1実施形態のECU1の構成を示すブロック図である。It is a block diagram which shows the structure of ECU1 of 1st Embodiment. 受信バッファ11と書換バッファ12の構成を示す図である。FIG. 3 is a diagram illustrating the configuration of a reception buffer 11 and a rewrite buffer 12. 制御プログラム実行処理を示すフローチャートである。It is a flowchart which shows a control program execution process. 書換プログラム実行処理を示すフローチャートである。It is a flowchart which shows a rewriting program execution process. 受信格納処理を示すフローチャートである。It is a flowchart which shows a reception storage process. 第1実施形態の書換実行処理を示すフローチャートである。It is a flowchart which shows the rewriting execution process of 1st Embodiment. 第1実施形態の検証実行処理を示すフローチャートである。It is a flowchart which shows the verification execution process of 1st Embodiment. 第1実施形態の受信処理と書換処理と検証処理の動作を示すタイミングチャートである。6 is a timing chart illustrating operations of a reception process, a rewrite process, and a verification process according to the first embodiment. 第2実施形態のECU1の構成を示すブロック図である。It is a block diagram which shows the structure of ECU1 of 2nd Embodiment. フラッシュROM3と検証バッファ13の構成を示す図である。FIG. 3 is a diagram showing a configuration of a flash ROM 3 and a verification buffer 13. 第2実施形態の書換実行処理を示すフローチャートである。It is a flowchart which shows the rewriting execution process of 2nd Embodiment. 第2実施形態の検証実行処理を示すフローチャートである。It is a flowchart which shows the verification execution process of 2nd Embodiment. 第2実施形態の受信処理と書換処理と検証処理の動作を示すタイミングチャートである。It is a timing chart which shows operation of reception processing, rewriting processing, and verification processing of a 2nd embodiment. 書込起動前後の受信処理と書換処理と検証処理の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the reception process before and after writing starting, a rewriting process, and a verification process. ROM用検証ポインタPT21を説明する図である。It is a figure explaining ROM verification pointer PT21. 第3実施形態の書換実行処理を示すフローチャートである。It is a flowchart which shows the rewriting execution process of 3rd Embodiment. 第3実施形態の検証実行処理を示すフローチャートである。It is a flowchart which shows the verification execution process of 3rd Embodiment. 第3実施形態の受信処理と書換処理と検証処理の動作を示すタイミングチャートである。It is a timing chart which shows operation of reception processing, rewriting processing, and verification processing of a 3rd embodiment. 別の実施形態の受信処理と書換処理と検証処理の動作を示すタイミングチャートである。It is a timing chart which shows operation | movement of the reception process of another embodiment, a rewriting process, and a verification process.

(第1実施形態)
以下に本発明の第1実施形態を図面とともに説明する。
本実施形態の電子制御装置(Electronic Control Unit)1(以下、ECU1という)は、車両に搭載され、図1に示すように、車両のエンジンEGの制御を行う。
(First embodiment)
A first embodiment of the present invention will be described below with reference to the drawings.
An electronic control unit 1 (hereinafter referred to as ECU 1) of the present embodiment is mounted on a vehicle and controls an engine EG of the vehicle as shown in FIG.

ECU1は、CPU(中央演算装置)2、フラッシュROM3、RAM4、入出力回路5および通信回路6と、これらを相互に接続するバス7とを備える。
フラッシュROM3は、データ書き換え可能な不揮発性メモリであり、CPU2が実行するプログラムと、プログラムの実行時に参照されるデータを記憶する。
The ECU 1 includes a CPU (central processing unit) 2, a flash ROM 3, a RAM 4, an input / output circuit 5, a communication circuit 6, and a bus 7 that interconnects them.
The flash ROM 3 is a data rewritable nonvolatile memory, and stores a program executed by the CPU 2 and data referred to when the program is executed.

RAM4は、揮発性メモリであり、CPU2の演算結果等を一時的に記憶する。またRAM4には、受信バッファ11と書換バッファ12が設けられている。受信バッファ11は、フラッシュROM3に記憶されるプログラムの書き換え等を行うためのプログラム書換装置RPから受信したデータを一時的に記憶するための記憶領域である。書換バッファ12は、フラッシュROM3に書き込むデータを一時的に記憶するための記憶領域である。   The RAM 4 is a volatile memory, and temporarily stores calculation results of the CPU 2 and the like. The RAM 4 is provided with a reception buffer 11 and a rewrite buffer 12. The reception buffer 11 is a storage area for temporarily storing data received from the program rewriting device RP for rewriting a program stored in the flash ROM 3. The rewrite buffer 12 is a storage area for temporarily storing data to be written to the flash ROM 3.

CPU2は、エンジンEGを制御するための情報として、吸気管圧力センサ、エンジン回転数センサ、エンジン水温センサ、排気系の酸素センサ(空燃比センサ)、車速センサおよびイグニッションスイッチ等から各種信号を入出力回路5を介して入力する。なお、図1に示すエンジンEGは、エンジン本体を含め、吸気系、排気系等、エンジンに関連する系を総称して示すものであって、本実施形態では詳細な説明を省略する。   The CPU 2 inputs and outputs various signals as information for controlling the engine EG from an intake pipe pressure sensor, an engine speed sensor, an engine water temperature sensor, an exhaust system oxygen sensor (air-fuel ratio sensor), a vehicle speed sensor, an ignition switch, and the like. Input via the circuit 5. The engine EG shown in FIG. 1 is a generic name for systems related to the engine such as an intake system and an exhaust system including the engine body, and detailed description thereof is omitted in this embodiment.

そしてCPU2は、フラッシュROM3に記憶されたプログラムに基づいて各種処理を実行する。またCPU2は、入出力回路5を介して入力される各種信号に基づいて制御演算を行い、その演算結果に基づき、点火装置およびインジェクタ等の電気負荷へ入出力回路5を介して駆動信号を出力することにより、エンジンEGの制御に関係する電気負荷を制御する。例えばCPU2は、インジェクタの開弁タイミングおよび開弁時間を演算し、その演算結果に基づいて、インジェクタを駆動するための駆動信号を出力することにより、エンジンEGへの燃料噴射を制御する。   The CPU 2 executes various processes based on the program stored in the flash ROM 3. Further, the CPU 2 performs a control calculation based on various signals input via the input / output circuit 5 and outputs a drive signal via the input / output circuit 5 to an electric load such as an ignition device and an injector based on the calculation result. Thus, the electric load related to the control of the engine EG is controlled. For example, the CPU 2 calculates the valve opening timing and valve opening time of the injector, and controls the fuel injection to the engine EG by outputting a drive signal for driving the injector based on the calculation result.

また通信回路6は、例えばCAN(Controller Area Network)通信プロトコルに従い通信バスBSを介して他のECU(不図示)との間でメッセージを交換することにより、制御対象機器の制御に必要なデータを送受信する。また通信回路6には、フラッシュROM3に記憶されるプログラムの書き換え等を行うためのプログラム書換装置RPが、通信バスBSを介して接続される。このプログラム書換装置RPは、例えば、コネクタ(不図示)を介して着脱可能になっており、プログラムの書き換え時等にECU1に接続される。なおプログラム書換装置RPは、マイコンおよび表示装置を備えたハンディタイプの装置または小型のパソコン等である。   Further, the communication circuit 6 exchanges messages with other ECUs (not shown) via the communication bus BS in accordance with, for example, a CAN (Controller Area Network) communication protocol, thereby obtaining data necessary for controlling the control target device. Send and receive. Further, a program rewriting device RP for rewriting a program stored in the flash ROM 3 is connected to the communication circuit 6 via a communication bus BS. The program rewriting device RP is detachable through a connector (not shown), for example, and is connected to the ECU 1 when the program is rewritten. The program rewriting device RP is a handy type device provided with a microcomputer and a display device or a small personal computer.

また、RAM4の受信バッファ11は、図2に示すように、リングバッファ構造で形成されている。このため、プログラム書換装置RPから受信した受信データは、受信した順に、受信バッファ11の先頭アドレスから順次書き込まれる。そして、受信バッファ11の最後尾アドレスに受信データが書き込まれると、次の受信データは先頭アドレスに書き込まれる(矢印AL1を参照)。   Further, the reception buffer 11 of the RAM 4 has a ring buffer structure as shown in FIG. For this reason, the reception data received from the program rewriting device RP is sequentially written from the head address of the reception buffer 11 in the order of reception. When reception data is written to the last address of the reception buffer 11, the next reception data is written to the head address (see arrow AL1).

また、受信データを受信バッファ11に書き込むときに、この受信データが書き込まれる記憶領域のアドレスを指示する受信用書込ポインタPT1が設けられている。また、受信バッファ11に格納されているデータを読み出して、書換バッファ12に書き込むときに、読み出すデータが格納されている記憶領域のアドレスを指示する受信用読出ポインタPT2が設けられている。図2では、受信バッファ11からデータRD1を読み出して書換バッファ12に書き込む(矢印AL2を参照)ことにより、受信用読出ポインタPT2の指示値がデータRD1のデータ量分変化したことを示している(矢印AL3を参照)。   Further, when receiving data is written in the receiving buffer 11, a receiving write pointer PT1 is provided which indicates an address of a storage area in which the receiving data is written. In addition, when the data stored in the reception buffer 11 is read out and written into the rewrite buffer 12, a reception read pointer PT2 is provided that indicates the address of the storage area in which the data to be read is stored. FIG. 2 shows that by reading the data RD1 from the reception buffer 11 and writing it in the rewrite buffer 12 (see arrow AL2), the indicated value of the reception read pointer PT2 has changed by the amount of data RD1 (see FIG. 2). (See arrow AL3).

また、RAM4の書換バッファ12はリングバッファ構造で形成されている。このため、受信バッファ11から読み出された読出データは、読み出された順に、書換バッファ12の先頭アドレスから順次書き込まれる。そして、書換バッファ12の最後尾アドレスに読出データが書き込まれると、次の読出データは先頭アドレスに書き込まれる(矢印AL4を参照)。   The rewrite buffer 12 of the RAM 4 has a ring buffer structure. For this reason, the read data read from the reception buffer 11 is sequentially written from the top address of the rewrite buffer 12 in the order of reading. When read data is written to the last address of the rewrite buffer 12, the next read data is written to the head address (see arrow AL4).

また、読出データを書換バッファ12に書き込むときに、この読出データが書き込まれる記憶領域のアドレスを指示する書換用書込ポインタPT3が設けられている。図2では、受信バッファ11からデータRD1を読み出して書換バッファ12に書き込む(矢印AL2を参照)ことにより、書換用書込ポインタPT3の指示値がデータRD1のデータ量分変化したことを示している(矢印AL5を参照)。   A rewrite write pointer PT3 is provided for designating the address of the storage area where the read data is written when the read data is written to the rewrite buffer 12. FIG. 2 shows that the instruction value of the rewrite write pointer PT3 has changed by the amount of data RD1 by reading the data RD1 from the reception buffer 11 and writing it in the rewrite buffer 12 (see arrow AL2). (See arrow AL5).

また、書換バッファ12に格納されているデータをフラッシュROM3に書き込むときに、フラッシュROM3に書き込むために書換バッファ12から読み出すデータが格納されている記憶領域のアドレスを指示する書換用読出ポインタPT4が設けられている。   In addition, when the data stored in the rewrite buffer 12 is written to the flash ROM 3, a rewrite read pointer PT4 is provided to indicate the address of the storage area where the data to be read from the rewrite buffer 12 for writing to the flash ROM 3 is stored. It has been.

また、書換バッファ12に格納されているデータを検証(バリデート)するときに、検証するデータが格納されている記憶領域のアドレスを指示する書換用検証ポインタPT5が設けられている。   Further, when verifying (validating) the data stored in the rewrite buffer 12, a rewrite verification pointer PT5 is provided which indicates the address of the storage area where the data to be verified is stored.

このように構成されたECU1において、CPU2は、後述する制御プログラム実行処理、書換プログラム実行処理、受信格納処理、書換実行処理および検証実行処理を実行する。   In the ECU 1 configured as described above, the CPU 2 executes a control program execution process, a rewrite program execution process, a reception storage process, a rewrite execution process, and a verification execution process, which will be described later.

まず、CPU2が実行する制御プログラム実行処理の手順を説明する。制御プログラム実行処理は、ECU1が起動した直後に1回のみ実行される処理である。
この制御プログラム実行処理が実行されると、CPU2は、図3に示すように、まずS10にて、フラッシュROM3に制御プログラムが既に書き込まれているか否かを判断する。ここで、制御プログラムが書き込まれていない場合には(S10:NO)、S10の処理を繰り返すことにより、フラッシュROM3に制御プログラムが書き込まれるまで待機する。なお、この制御プログラムは、エンジンEGを制御するためのプログラムである。
First, the procedure of the control program execution process executed by the CPU 2 will be described. The control program execution process is a process executed only once immediately after the ECU 1 is activated.
When this control program execution process is executed, the CPU 2 first determines whether or not a control program has already been written in the flash ROM 3 in S10 as shown in FIG. Here, when the control program is not written (S10: NO), the process of S10 is repeated to wait until the control program is written in the flash ROM 3. This control program is a program for controlling the engine EG.

一方、制御プログラムが既に書き込まれている場合には(S10:YES)、S20にて、検証(バリデート(validate))の結果に基づいて、フラッシュROM3に書き込まれている制御プログラムが適正なものであるか否かを判断する。ここで、書き込まれている制御プログラムが適正なものでない場合には(S20:NO)、S10に移行し、上述の処理を繰り返す。   On the other hand, if the control program has already been written (S10: YES), the control program written in the flash ROM 3 is appropriate based on the result of verification (validate) in S20. Judge whether there is. If the written control program is not appropriate (S20: NO), the process proceeds to S10 and the above-described processing is repeated.

一方、書き込まれている制御プログラムが適正なものである場合には(S20:YES)、S30にて、フラッシュROM3に書き込まれている制御プログラムの実行を開始し、制御プログラム実行処理を終了する。   On the other hand, if the written control program is appropriate (S20: YES), in S30, the control program written in the flash ROM 3 is started and the control program execution process is terminated.

次に、CPU2が実行する書換プログラム実行処理の手順を説明する。書換プログラム実行処理は、ECU1が起動した直後に1回のみ実行される処理である。
この書換プログラム実行処理が実行されると、CPU2は、図4に示すように、まずS110にて、通信回路6を介してプログラム書換装置RPからプログラム書換要求を受信したか否かを判断する。ここで、プログラム書換要求を受信していない場合には(S110:NO)、S110の処理を繰り返すことにより、プログラム書換要求を受信するまで待機する。
Next, the procedure of the rewrite program execution process executed by the CPU 2 will be described. The rewrite program execution process is a process executed only once immediately after the ECU 1 is activated.
When the rewrite program execution process is executed, the CPU 2 first determines whether or not a program rewrite request is received from the program rewrite device RP via the communication circuit 6 in S110, as shown in FIG. Here, when the program rewrite request is not received (S110: NO), the process of S110 is repeated to wait until the program rewrite request is received.

一方、プログラム書換要求を受信した場合には(S110:YES)、S120にて、制御プログラムを書き換えるための書換プログラムを通信回路6を介してプログラム書換装置RPから取得する。そしてS130にて、取得した書換プログラムの実行を開始し、書換プログラム実行処理を終了する。   On the other hand, when a program rewrite request is received (S110: YES), a rewrite program for rewriting the control program is acquired from the program rewrite device RP via the communication circuit 6 in S120. In S130, execution of the acquired rewrite program is started, and the rewrite program execution process is terminated.

次に、CPU2が実行する受信格納処理の手順を説明する。受信格納処理は、書換プログラム内に記述されている処理であり、書換プログラムの実行が開始されると処理を開始し、制御プログラムの書き換えが終了すると、処理を終了する。   Next, the procedure of the reception storing process executed by the CPU 2 will be described. The reception storage process is a process described in the rewrite program. The process starts when the execution of the rewrite program is started, and ends when the rewrite of the control program is completed.

この受信格納処理が実行されると、CPU2は、図5に示すように、まずS210にて、書換処理(S320の処理)を実行中であるか否かを判断する。ここで、制御プログラムの書き換えを実行していない場合には(S210:NO)、S230に移行する。一方、書換処理を実行中である場合には(S210:YES)、S220にて、データ書き込みの終了を待っている状態(以下、書込終了待ち状態という)であるか否かを判断する。なお書込終了待ち状態とは、CPU2がフラッシュROM3に対して書き込みの指示を送信し、その後にフラッシュROM3からの書き込み終了の通知をCPU2が待っている状態をいう。   When this reception storage process is executed, the CPU 2 first determines in S210 whether or not the rewrite process (the process of S320) is being executed, as shown in FIG. If the control program is not rewritten (S210: NO), the process proceeds to S230. On the other hand, if the rewriting process is being executed (S210: YES), it is determined in S220 whether or not it is in a state waiting for the end of data writing (hereinafter referred to as a write end waiting state). Note that the write completion wait state refers to a state in which the CPU 2 transmits a write instruction to the flash ROM 3 and then the CPU 2 waits for a write completion notification from the flash ROM 3.

ここで、書込終了待ち状態でない場合には(S220:NO)、S210に移行し、上述の処理を繰り返す。一方、書込終了待ち状態である場合には(S220:YES)、S230に移行する。   Here, when it is not in the writing end waiting state (S220: NO), the process proceeds to S210 and the above-described processing is repeated. On the other hand, when it is in the writing end waiting state (S220: YES), the process proceeds to S230.

そしてS230に移行すると、今回のプログラム書換要求で書き換えられる新しい制御プログラムを示すデータをプログラム書換装置RPから通信回路6を介して受信する処理(以下、受信処理という)を実行する。   When the process proceeds to S230, a process of receiving data indicating a new control program to be rewritten by the current program rewriting request from the program rewriting apparatus RP via the communication circuit 6 (hereinafter referred to as a receiving process) is executed.

そしてS240にて、S230での受信処理により、プログラム書換装置RPから新たにデータを受信したか否かを判断する。ここで、新たにデータを受信していない場合には(S240:NO)、S210に移行し、上述の処理を繰り返す。   In S240, it is determined whether or not new data has been received from the program rewriting device RP by the reception process in S230. If no new data has been received (S240: NO), the process proceeds to S210, and the above process is repeated.

一方、新たにデータを受信した場合には(S240:YES)、S250にて、受信したデータを、受信して順に受信バッファ11に格納する。さらにS260にて、受信用書込ポインタPT1を更新する。具体的には、S250で受信バッファ11に格納したデータ量分、受信用書込ポインタPT1の指示値を変化させる。   On the other hand, when data is newly received (S240: YES), the received data is received and stored in the reception buffer 11 in order in S250. In S260, the reception write pointer PT1 is updated. Specifically, the instruction value of the reception write pointer PT1 is changed by the amount of data stored in the reception buffer 11 in S250.

そしてS270にて、受信バッファ11に格納されているデータのうち書換バッファ12に格納されていないものを、受信バッファ11から読み出して、書換バッファ12に格納する。さらにS280にて、受信用読出ポインタPT2と書換用書込ポインタPT3を更新する。具体的には、S270で書換バッファ12に格納したデータ量分、受信用読出ポインタPT2と書換用書込ポインタPT3の指示値を変化させる。   In step S <b> 270, data stored in the reception buffer 11 that is not stored in the rewrite buffer 12 is read from the reception buffer 11 and stored in the rewrite buffer 12. In S280, the reception read pointer PT2 and the rewrite write pointer PT3 are updated. Specifically, the instruction values of the reception read pointer PT2 and the rewrite write pointer PT3 are changed by the amount of data stored in the rewrite buffer 12 in S270.

その後S290にて、今回のプログラム書換要求で書き換えるべき制御プログラムに関する全ての書き換えが終了したか否かを判断する。ここで、全ての書き換えが終了していない場合には(S290:NO)、S210に移行し、上述の処理を繰り返す。一方、全ての書き換えが終了していない場合には(S290:NO)、受信格納処理を終了する。   Thereafter, in S290, it is determined whether or not all rewriting related to the control program to be rewritten by the current program rewriting request has been completed. Here, when all the rewriting is not completed (S290: NO), the process proceeds to S210 and the above-described processing is repeated. On the other hand, if all rewriting has not been completed (S290: NO), the reception storage process is terminated.

次に、CPU2が実行する書換実行処理の手順を説明する。書換実行処理は、書換プログラム内に記述されている処理であり、書換プログラムの実行が開始されると処理を開始し、制御プログラムの書き換えが終了すると、処理を終了する。   Next, the procedure of the rewrite execution process executed by the CPU 2 will be described. The rewrite execution process is a process described in the rewrite program. The process starts when the execution of the rewrite program is started, and ends when the control program is rewritten.

この書換実行処理が実行されると、CPU2は、図6に示すように、まずS310にて、書換バッファ12に格納されているデータのうちフラッシュROM3に書き込まれていないものがあるか否かを判断する。具体的には、書換用書込ポインタPT3の指示値と書換用読出ポインタPT4の指示値が互いに一致してない場合に、フラッシュROM3に書き込まれていないデータがあると判断する。   When this rewrite execution process is executed, as shown in FIG. 6, the CPU 2 first determines in S310 whether there is any data stored in the rewrite buffer 12 that has not been written to the flash ROM 3. to decide. Specifically, when the instruction value of the rewrite write pointer PT3 and the instruction value of the rewrite read pointer PT4 do not match each other, it is determined that there is data not written in the flash ROM 3.

ここで、フラッシュROM3に書き込まれていないデータ(以下、未書込データという)がない場合には(S310:NO)、S310の処理を繰り返すことにより、未書込データが書換バッファ12に格納されるまで待機する。   Here, when there is no data not written in the flash ROM 3 (hereinafter referred to as unwritten data) (S310: NO), the process of S310 is repeated, whereby the unwritten data is stored in the rewrite buffer 12. Wait until

一方、未書込データがある場合には(S310:YES)、S320にて、未書込データを書換バッファ12から読み出し、読み出したデータをフラッシュROM3に書き込むことにより、制御プログラムを書き換える書換処理を実行する。   On the other hand, if there is unwritten data (S310: YES), in S320, the unwritten data is read from the rewrite buffer 12, and the read data is written to the flash ROM 3, thereby rewriting the control program. Run.

その後S330にて、S320で書き込んだデータのベリファイ(verify)を実行する。具体的には、書換バッファ12から読み出したデータと、フラッシュROM3に書き込まれたデータが互いに一致しているか否かを確認する。   Thereafter, in S330, the data written in S320 is verified. Specifically, it is confirmed whether or not the data read from the rewrite buffer 12 and the data written to the flash ROM 3 match each other.

そしてS340にて、S330でのベリファイの結果に基づいて、書換バッファ12から読み出したデータと、フラッシュROM3に書き込まれたデータが互いに一致しているかを判断する。ここで、両データが一致していない場合には(S340:NO)、S320に移行し、上述の処理を繰り返す。   In S340, based on the result of verification in S330, it is determined whether the data read from the rewrite buffer 12 and the data written in the flash ROM 3 match each other. Here, when both data do not correspond (S340: NO), it transfers to S320 and repeats the above-mentioned process.

一方、両データが一致している場合には(S340:YES)、S350にて、書換用読出ポインタPT4を更新する。具体的には、S320で書換バッファ12から読み出したデータ量分、書換用読出ポインタPT4の指示値を変化させる。   On the other hand, if the two data match (S340: YES), the rewrite read pointer PT4 is updated in S350. Specifically, the instruction value of the rewrite read pointer PT4 is changed by the amount of data read from the rewrite buffer 12 in S320.

その後S360にて、今回のプログラム書換要求で書き換えるべき制御プログラムに関する全ての書き換えが終了したか否かを判断する。ここで、全ての書き換えが終了していない場合には(S360:NO)、S310に移行し、上述の処理を繰り返す。一方、全ての書き換えが終了した場合には(S360:YES)、書換実行処理を終了する。   Thereafter, in S360, it is determined whether or not all rewriting related to the control program to be rewritten by the current program rewriting request has been completed. Here, when all rewriting is not completed (S360: NO), the process proceeds to S310 and the above-described processing is repeated. On the other hand, when all rewriting is completed (S360: YES), the rewriting execution process is terminated.

次に、CPU2が実行する検証実行処理の手順を説明する。検証実行処理は、書換プログラム内に記述されている処理であり、書換プログラムの実行が開始されると処理を開始し、制御プログラムの書き換えが終了すると、処理を終了する。   Next, a procedure of verification execution processing executed by the CPU 2 will be described. The verification execution process is a process described in the rewrite program. The process starts when the execution of the rewrite program is started, and ends when the rewrite of the control program is completed.

この検証実行処理が実行されると、CPU2は、図7に示すように、まずS410にて、書換処理(S320の処理)を実行中であるか否かを判断する。ここで、書換処理を実行していない場合には(S410:NO)、S430に移行する。一方、書換処理を実行中である場合には(S410:YES)、S420にて、書込終了待ち状態であるか否かを判断する。   When the verification execution process is executed, as shown in FIG. 7, the CPU 2 first determines in S410 whether or not the rewrite process (the process of S320) is being executed. If the rewriting process is not executed (S410: NO), the process proceeds to S430. On the other hand, when the rewriting process is being executed (S410: YES), it is determined in S420 whether or not the writing completion waiting state is set.

ここで、書込終了待ち状態でない場合には(S420:NO)、S410に移行し、上述の処理を繰り返す。一方、書込終了待ち状態である場合には(S420:YES)、S430に移行する。   Here, when it is not in the writing end waiting state (S420: NO), the process proceeds to S410 and the above-described processing is repeated. On the other hand, when it is in the writing end waiting state (S420: YES), the process proceeds to S430.

そしてS430に移行すると、受信処理(S230の処理)を実行中であるか否かを判断する。ここで、受信処理を実行していない場合には(S430:NO)、S450に移行する。一方、受信処理を実行中である場合には(S430:YES)、S440にて、プログラム書換装置RPからのデータの受信を待っている状態(以下、受信待ち状態という)であるか否かを判断する。なお受信待ち状態とは、例えば、受信処理の実行中において、メッセージの受信を完了してから次のメッセージの受信が開始されるまでCPU2が待っている状態をいう。   When the process proceeds to S430, it is determined whether or not the reception process (the process of S230) is being executed. If the reception process is not executed (S430: NO), the process proceeds to S450. On the other hand, when the reception process is being executed (S430: YES), it is determined in S440 whether or not it is in a state of waiting for reception of data from the program rewriting device RP (hereinafter referred to as a reception wait state). to decide. The reception waiting state refers to, for example, a state in which the CPU 2 waits until reception of the next message is started after reception of a message is completed during reception processing.

ここで、受信待ち状態でない場合には(S440:NO)、S410に移行し、上述の処理を繰り返す。一方、受信待ち状態である場合には(S440:YES)、S450に移行する。   Here, when it is not in the reception waiting state (S440: NO), the process proceeds to S410 and the above-described processing is repeated. On the other hand, when it is in a reception waiting state (S440: YES), the process proceeds to S450.

そしてS450に移行すると、書換バッファ12に格納されているデータのうち検証(バリデート)が行われていないものがあるか否かを判断する。具体的には、書換用書込ポインタPT3の指示値と書換用検証ポインタPT5の指示値が互いに一致してない場合に、検証(バリデート)が行われていないデータがあると判断する。   In S450, it is determined whether or not there is data that has not been verified (validated) among the data stored in the rewrite buffer 12. Specifically, if the instruction value of the rewrite write pointer PT3 and the instruction value of the rewrite verification pointer PT5 do not match each other, it is determined that there is data that has not been verified (validated).

ここで、検証が行われていないデータ(以下、未検証データという)がない場合には(S450:NO)、S410に移行し、上述の処理を繰り返す。
一方、未検証データがある場合には(S450:YES)、S460にて、検証処理を実行する。具体的には、まず、書換バッファ12に格納されているデータのうち、書換用検証ポインタPT5が指示するアドレスから予め設定された検証単位分のアドレスまでのデータを読み出す。そして、読み出したデータについて、例えばサム計算またはCRC計算などの認証用演算を実行し、この演算値と、読み出したデータに対してプログラム書換装置RP側で予め付与された検証用データの値とを比較し、両者が一致している場合に、読み出したデータが適正であると判断するとともに、両者が不一致である場合に、読み出したデータが不適正であると判断する。
If there is no data that has not been verified (hereinafter referred to as unverified data) (S450: NO), the process proceeds to S410 and the above-described processing is repeated.
On the other hand, if there is unverified data (S450: YES), verification processing is executed in S460. Specifically, first, of the data stored in the rewrite buffer 12, data from the address indicated by the rewrite verification pointer PT5 to the address for the preset verification unit is read. For the read data, for example, an authentication calculation such as a sum calculation or a CRC calculation is executed, and the calculated value and the value of the verification data previously given to the read data on the program rewriting device RP side are obtained. In comparison, if the two match, it is determined that the read data is appropriate, and if the two do not match, it is determined that the read data is incorrect.

そしてS470にて、書換用検証ポインタPT5を更新する。具体的には、S460で検証(バリデート)を実行したデータ量分、書換用検証ポインタPT5の指示値を変化させる。   In step S470, the rewrite verification pointer PT5 is updated. Specifically, the instruction value of the rewriting verification pointer PT5 is changed by the amount of data that has been verified (validated) in S460.

その後S480にて、今回のプログラム書換要求で書き換えるべき制御プログラムに関する全ての検証(バリデート)が終了したか否かを判断する。ここで、全ての検証が終了していない場合には(S480:NO)、S410に移行し、上述の処理を繰り返す。一方、全ての検証が終了した場合には(S480:YES)、検証実行処理を終了する。   Thereafter, in S480, it is determined whether or not all verification (validation) related to the control program to be rewritten by the current program rewrite request has been completed. Here, when all the verifications are not completed (S480: NO), the process proceeds to S410 and the above-described processing is repeated. On the other hand, when all the verifications are completed (S480: YES), the verification execution process is ended.

このように構成されたECU1では、まず、フラッシュROM3に記憶された制御プログラムの内容を書き換えるための書換データを外部から受信する受信処理を実行する(S230)。そして、受信処理により受信した書換データをフラッシュROM3に書き込むことにより、フラッシュROM3に記憶された制御プログラムの内容を書き換える書換処理を実行する(S320)。また、受信処理が実行されていない状態(S430:NO)または受信処理において書換データの受信を待っている状態(S440:YES)であることと、書換処理が実行されていない状態(S410:NO)または書換処理において不揮発性メモリへの書換データの書き込み終了を待っている状態(S420:YES)であることの両方が成り立っている場合に、不揮発性メモリに書き込まれる書換データが適正なものであるか否かを検証する検証処理を実行する(S460)。   In the ECU 1 configured as described above, first, a reception process for receiving rewrite data for rewriting the contents of the control program stored in the flash ROM 3 is executed (S230). And the rewriting process which rewrites the content of the control program memorize | stored in flash ROM3 is performed by writing in the flash ROM3 the rewriting data received by the receiving process (S320). In addition, the reception process is not executed (S430: NO) or the reception process is waiting for the rewrite data (S440: YES), and the rewrite process is not executed (S410: NO). ) Or in the rewrite process, when both of the states of waiting for the completion of rewrite data write to the non-volatile memory (S420: YES) are satisfied, the rewrite data written to the non-volatile memory is appropriate. A verification process for verifying whether or not there is is executed (S460).

このため、受信処理の実行中であっても、書換データの受信を待っている状態であれば、検証処理を実行することができるとともに、書換処理の実行中であっても、不揮発性メモリへの書換データの書き込み終了を待っている状態であれば、検証処理を実行することができる。すなわち、例えば図8に示すように、制御プログラムを書き換えるために実行される受信処理または書換処理と並行して検証処理を実行することができる。   Therefore, even if the reception process is being executed, the verification process can be executed as long as it is waiting for the reception of the rewrite data. If it is in a state of waiting for completion of writing of the rewrite data, verification processing can be executed. That is, for example, as shown in FIG. 8, the verification process can be executed in parallel with the reception process or the rewrite process executed to rewrite the control program.

図8では、受信処理RP01,RP02,RP03,・・・・,RP14が順次実行されており、まず受信処理RP01の実行中に、書換処理WP01と検証処理VP01が開始される(時刻t01を参照)。書換処理WP01は、受信処理RP01で受信したデータを書き込む。検証処理VP01は、書換処理WP01で書き込むデータを検証する。これにより、受信処理RP01,RP02,RP03と書換処理WP01と検証処理VP01とが並行に実行される。   In FIG. 8, the reception processes RP01, RP02, RP03,..., RP14 are sequentially executed. First, during the execution of the reception process RP01, the rewrite process WP01 and the verification process VP01 are started (see time t01). ). The rewriting process WP01 writes the data received by the receiving process RP01. The verification process VP01 verifies the data written in the rewrite process WP01. As a result, the reception processes RP01, RP02, RP03, the rewrite process WP01, and the verification process VP01 are executed in parallel.

また、受信処理RP04の開始前に、書換処理WP02が開始され(時刻t02を参照)、その後に検証処理VP02が開始される。書換処理WP02は、受信処理RP02,RP03で受信したデータを書き込む。検証処理VP02は、書換処理WP02で書き込むデータを検証する。これにより、受信処理RP04,RP05,RP06と書換処理WP02と検証処理VP02とが並行に実行される。   Further, the rewrite process WP02 is started before the start of the reception process RP04 (see time t02), and thereafter the verification process VP02 is started. The rewriting process WP02 writes the data received by the receiving processes RP02 and RP03. The verification process VP02 verifies the data written in the rewrite process WP02. As a result, the reception processes RP04, RP05, RP06, the rewrite process WP02, and the verification process VP02 are executed in parallel.

また、受信処理RP07の開始前に、書換処理WP03が開始され(時刻t03を参照)、その後に検証処理VP03が開始される。書換処理WP03は、受信処理RP04,RP05,RP06で受信したデータを書き込む。検証処理VP03は、書換処理WP03で書き込むデータを検証する。これにより、受信処理RP07,RP08,RP09,RP10と書換処理WP03と検証処理VP03とが並行に実行される。   Further, the rewrite process WP03 is started before the start of the reception process RP07 (see time t03), and thereafter the verification process VP03 is started. The rewriting process WP03 writes the data received in the receiving processes RP04, RP05, and RP06. The verification process VP03 verifies the data written in the rewrite process WP03. As a result, the reception processes RP07, RP08, RP09, RP10, the rewrite process WP03, and the verification process VP03 are executed in parallel.

また、受信処理RP11の開始前に、書換処理WP04が開始され(時刻t04を参照)、その後に検証処理VP04が開始される。書換処理WP04は、受信処理RP07,RP08,RP09,RP10で受信したデータを書き込む。検証処理VP04は、書換処理WP04で書き込むデータを検証する。これにより、受信処理RP11,RP12,RP13,RP14と書換処理WP04と検証処理VP04とが並行に実行される。   Further, the rewrite process WP04 is started before the start of the reception process RP11 (see time t04), and thereafter the verification process VP04 is started. The rewrite process WP04 writes the data received in the reception processes RP07, RP08, RP09, and RP10. The verification process VP04 verifies the data written in the rewrite process WP04. As a result, the reception processes RP11, RP12, RP13, RP14, the rewrite process WP04, and the verification process VP04 are executed in parallel.

これにより、書き換え対象となる制御プログラム全体の書き込みが終了する前から検証処理を実行することができるため(すなわち、制御プログラム全体の書き込みが終了した後に検証処理を実行する必要がなくなるため)、制御プログラムの書き換えを開始してから検証処理が終了するまでの時間、すなわち制御プログラムの書き換えに要する時間を短縮することができる。   As a result, the verification process can be executed before the writing of the entire control program to be rewritten is completed (that is, the verification process need not be executed after the writing of the entire control program is completed). The time from the start of program rewriting to the end of the verification process, that is, the time required for rewriting the control program can be shortened.

またECU1は、書換処理によりフラッシュROM3に書き込む書換データを、フラッシュROM3に書き込む前に一時的に記憶する書換バッファ12を備え、書換バッファ12に記憶されている書換データに対して検証処理を実行する。   Further, the ECU 1 includes a rewrite buffer 12 that temporarily stores rewrite data to be written to the flash ROM 3 by rewrite processing, and executes verification processing on the rewrite data stored in the rewrite buffer 12. .

これにより、フラッシュROM3に書き込む書換データの検証を、フラッシュROM3からデータを読み出すことなく行うことができる。なお、書換処理の実行中にはフラッシュROM3からデータを読み出すことができない。しかし、フラッシュROM3ではなく書換バッファ12に記憶されている書換データに対して検証処理を実行することができるため、書換処理の実行中であっても、不揮発性メモリへの書換データの書き込み終了を待っている状態であれば、検証処理を実行することができる。   As a result, rewriting data to be written to the flash ROM 3 can be verified without reading the data from the flash ROM 3. Note that data cannot be read from the flash ROM 3 during the rewriting process. However, since the verification process can be executed on the rewrite data stored in the rewrite buffer 12 instead of the flash ROM 3, even when the rewrite process is being executed, the completion of the rewrite data writing to the nonvolatile memory is terminated. If it is in a waiting state, the verification process can be executed.

また書換バッファ12は、リングバッファ構造で形成されている。すなわち、書換バッファ12の最後尾アドレスに書換データが書き込まれると、次の書換データは書換バッファ12の先頭アドレスに書き込まれる。このため、書換バッファ12に書き込まれている書換データに対する検証が全て終了していない状態で、新たに書換バッファ12に書き込まれる場合には、未検証の書換データを先頭アドレスに移動させる必要がなくなる。一方、書換バッファ12がリングバッファ構造でない場合には、最後尾アドレスに書換データが書き込まれるとデータをそれ以上書き込めなくなるため、データを書き込む領域を確保するために、未検証の書換データを先頭アドレスに移動させる必要がある。   The rewrite buffer 12 has a ring buffer structure. That is, when rewrite data is written to the last address of the rewrite buffer 12, the next rewrite data is written to the start address of the rewrite buffer 12. For this reason, when new verification data is written to the rewrite buffer 12 in a state where the verification of the rewrite data written in the rewrite buffer 12 is not completed, it is not necessary to move the unverified rewrite data to the head address. . On the other hand, if the rewrite buffer 12 does not have a ring buffer structure, no more data can be written when rewritten data is written to the last address. Therefore, in order to secure an area for writing data, unverified rewritten data is used as the top address. Need to be moved to.

以上説明した実施形態において、フラッシュROM3は本発明における不揮発性メモリ、S230の処理は本発明における受信処理実行手段および受信処理実行手順、S320の処理は本発明における書換処理実行手段および書換処理実行手順、S460の処理は本発明における検証処理実行手段および検証処理実行手順である。   In the embodiment described above, the flash ROM 3 is the non-volatile memory in the present invention, the process in S230 is the reception process execution means and the reception process execution procedure in the present invention, and the process in S320 is the rewrite process execution means and the rewrite process execution procedure in the present invention. , S460 is the verification processing execution means and verification processing execution procedure in the present invention.

(第2実施形態)
以下に本発明の第2実施形態を図面とともに説明する。なお第2実施形態では、第1実施形態と異なる部分を説明する。
(Second Embodiment)
A second embodiment of the present invention will be described below with reference to the drawings. In the second embodiment, parts different from the first embodiment will be described.

第2実施形態のECU1は、ECU1の構成と書換実行処理と検証処理が変更された点以外は第1実施形態と同じである。
まずECU1の構成は、図9に示すように、RAM4に検証バッファ13が更に設けられている点以外は第1実施形態と同じである。
The ECU 1 of the second embodiment is the same as the first embodiment except that the configuration of the ECU 1, the rewrite execution process, and the verification process are changed.
First, the configuration of the ECU 1 is the same as that of the first embodiment except that a verification buffer 13 is further provided in the RAM 4 as shown in FIG.

検証バッファ13は、図10に示すように、リングバッファ構造で形成されている。このため、フラッシュROM3から読み出された読出データは、読み出された順に検証バッファ13の先頭アドレスから順次書き込まれる。そして、検証バッファ13の最後尾アドレスに読出データが書き込まれると、次の読出データは先頭アドレスに書き込まれる(矢印AL11を参照)。   The verification buffer 13 has a ring buffer structure as shown in FIG. For this reason, the read data read from the flash ROM 3 is sequentially written from the head address of the verification buffer 13 in the order of reading. When read data is written to the last address of the verification buffer 13, the next read data is written to the head address (see arrow AL11).

また、フラッシュROM3に書き込まれているデータを読み出して検証バッファ13に書き込むときに、読み出すデータが格納されている記憶領域のアドレスを指示するROM用読出ポインタPT11が設けられている。図11では、フラッシュROM3からデータRD11を読み出して検証バッファ13に書き込む(矢印AL12を参照)ことにより、ROM用読出ポインタPT11の指示値がデータRD11のデータ量分変化したことを示している(矢印AL13を参照)。   Also, a ROM read pointer PT11 is provided that indicates the address of the storage area where the read data is stored when the data written in the flash ROM 3 is read out and written into the verification buffer 13. FIG. 11 shows that by reading the data RD11 from the flash ROM 3 and writing it in the verification buffer 13 (see arrow AL12), the indicated value of the ROM read pointer PT11 has changed by the amount of data RD11 (arrow). See AL13).

また、データをフラッシュROM3に書き込むときに、このデータが書き込まれる記憶領域のアドレスを指示するROM用書込ポインタPT12が設けられている。
また、読出データを検証バッファ13に書き込むときに、この読出データが書き込まれる記憶領域のアドレスを指示する検証用書込ポインタPT13が設けられている。図10では、フラッシュROM3からデータRD11を読み出して検証バッファ13に書き込む(矢印AL12を参照)ことにより、検証用書込ポインタPT13の指示値がデータRD1のデータ量分変化したことを示している(矢印AL14を参照)。
Further, when writing data to the flash ROM 3, a ROM write pointer PT12 is provided which indicates an address of a storage area in which the data is written.
In addition, a verification write pointer PT13 is provided which indicates an address of a storage area in which the read data is written when the read data is written into the verification buffer 13. FIG. 10 shows that the instruction value of the verification write pointer PT13 has changed by the amount of data RD1 by reading the data RD11 from the flash ROM 3 and writing it in the verification buffer 13 (see arrow AL12) (see FIG. 10). (See arrow AL14).

また、検証バッファ13に格納されているデータを検証(バリデート)するときに、検証するデータが格納されている記憶領域のアドレスを指示する検証用検証ポインタPT14が設けられている。   A verification pointer PT14 for indicating the address of a storage area in which data to be verified is verified when data stored in the verification buffer 13 is verified (validated) is provided.

次に、第2実施形態の書換実行処理を説明する。第2実施形態の書換実行処理は、図11に示すように、S303とS306とS342とS345とS355の処理が追加された点と、S350の処理が省略された点以外は第1実施形態と同じである。   Next, the rewriting execution process of 2nd Embodiment is demonstrated. As shown in FIG. 11, the rewrite execution process of the second embodiment is the same as that of the first embodiment except that the processes of S303, S306, S342, S345, and S355 are added and the process of S350 is omitted. The same.

すなわち、この書換実行処理が実行されると、CPU2は、まずS303にて、今回のプログラム書換要求で書き換えるべき制御プログラムとは別に既にフラッシュROM3に書き込まれている制御プログラムのうち検証が行われていないデータを、フラッシュROM3から読み出して、検証バッファ13に格納する。   That is, when this rewrite execution process is executed, the CPU 2 first verifies among the control programs already written in the flash ROM 3 separately from the control program to be rewritten by the current program rewrite request in S303. Unread data is read from the flash ROM 3 and stored in the verification buffer 13.

そしてS306にて、ROM用読出ポインタPT11と検証用書込ポインタPT13と検証用検証ポインタPT14を更新する。具体的には、ROM用読出ポインタPT11を、今回のプログラム書換要求で書き換えるべき制御プログラムが書き込まれる記憶領域の先頭アドレスに設定する。また検証用書込ポインタPT13を、S303で検証バッファ13に格納されたデータの最後尾アドレスの次のアドレスに設定する。また検証用検証ポインタPT14を、S303で検証バッファ13に格納されたデータの先頭アドレスに設定する。そしてS306の処理が終了すると、S310に移行する。   In S306, the ROM read pointer PT11, the verification write pointer PT13, and the verification verification pointer PT14 are updated. Specifically, the ROM read pointer PT11 is set to the start address of the storage area in which the control program to be rewritten by the current program rewrite request is written. Further, the verification write pointer PT13 is set to the address next to the last address of the data stored in the verification buffer 13 in S303. Further, the verification pointer PT14 is set to the head address of the data stored in the verification buffer 13 in S303. When the process of S306 is completed, the process proceeds to S310.

またS340にて、書換バッファ12から読み出したデータと、フラッシュROM3に書き込まれたデータが互いに一致している場合に(S340:YES)、S342にて、ROM用書込ポインタPT12を更新する。具体的には、S320でフラッシュROM3に書き込んだデータ量分、ROM用書込ポインタPT12の指示値を変化させる。   In S340, when the data read from the rewrite buffer 12 and the data written in the flash ROM 3 match each other (S340: YES), the ROM write pointer PT12 is updated in S342. Specifically, the instruction value of the ROM write pointer PT12 is changed by the amount of data written to the flash ROM 3 in S320.

そしてS345にて、フラッシュROM3に書き込まれたデータのうち検証バッファ13に格納されていないもの、すなわち、ROM用読出ポインタPT11が示すアドレスと、ROM用書込ポインタPT12が示すアドレスの間に書き込まれているデータを、フラッシュROM3から読み出して、検証バッファ13に格納する。さらにS355にて、ROM用読出ポインタPT11と検証用書込ポインタPT13を更新する。具体的には、S345で検証バッファ13に格納したデータ量分、ROM用読出ポインタPT11と検証用書込ポインタPT13の指示値を変化させる。そしてS355の処理が終了すると、S360に移行する。   In S345, the data written in the flash ROM 3 that is not stored in the verification buffer 13, that is, written between the address indicated by the ROM read pointer PT11 and the address indicated by the ROM write pointer PT12 is written. Is read from the flash ROM 3 and stored in the verification buffer 13. Further, in S355, the ROM read pointer PT11 and the verification write pointer PT13 are updated. Specifically, the instruction values of the ROM read pointer PT11 and the verification write pointer PT13 are changed by the amount of data stored in the verification buffer 13 in S345. When the process of S355 ends, the process proceeds to S360.

次に、第2実施形態の検証実行処理を説明する。
この検証実行処理が実行されると、CPU2は、図12に示すように、まずS510にて、書換処理(S320の処理)を実行中であるか否かを判断する。ここで、書換処理を実行していない場合には(S510:NO)、S530に移行する。一方、書換処理を実行中である場合には(S510:YES)、S520にて、書込終了待ち状態であるか否かを判断する。
Next, verification execution processing according to the second embodiment will be described.
When the verification execution process is executed, as shown in FIG. 12, the CPU 2 first determines in S510 whether or not the rewrite process (the process of S320) is being executed. If the rewriting process is not executed (S510: NO), the process proceeds to S530. On the other hand, if the rewriting process is being executed (S510: YES), it is determined in S520 whether or not the writing completion waiting state is set.

ここで、書込終了待ち状態でない場合には(S520:NO)、S510に移行し、上述の処理を繰り返す。一方、書込終了待ち状態である場合には(S520:YES)、S530に移行する。   Here, when it is not in the writing end waiting state (S520: NO), the process proceeds to S510 and the above-described processing is repeated. On the other hand, when it is in the writing end waiting state (S520: YES), the process proceeds to S530.

そしてS530に移行すると、受信処理(S230の処理)を実行中であるか否かを判断する。ここで、受信処理を実行していない場合には(S530:NO)、S550に移行する。一方、受信処理を実行中である場合には(S530:YES)、S540にて、プログラム書換装置RPからのデータの受信を待っている状態(以下、受信待ち状態という)であるか否かを判断する。   When the process proceeds to S530, it is determined whether the reception process (the process of S230) is being executed. If the reception process is not executed (S530: NO), the process proceeds to S550. On the other hand, if the reception process is being executed (S530: YES), it is determined in S540 whether or not it is in a state of waiting for reception of data from the program rewriting device RP (hereinafter referred to as a reception wait state). to decide.

ここで、受信待ち状態でない場合には(S540:NO)、S510に移行し、上述の処理を繰り返す。一方、受信待ち状態である場合には(S540:YES)、S550に移行する。   Here, when it is not in the reception waiting state (S540: NO), the process proceeds to S510 and the above-described processing is repeated. On the other hand, when it is in the reception waiting state (S540: YES), the process proceeds to S550.

そしてS450に移行すると、検証バッファ13に格納されているデータのうち検証(バリデート)が行われていないものがあるか否かを判断する。具体的には、検証用書込ポインタPT13の指示値と検証用検証ポインタPT14の指示値が互いに一致してない場合に、検証(バリデート)が行われていないデータがあると判断する。   In step S450, it is determined whether there is data that has not been verified (validated) among the data stored in the verification buffer 13. Specifically, when the indication value of the verification write pointer PT13 and the indication value of the verification verification pointer PT14 do not match each other, it is determined that there is data that has not been verified (validated).

ここで、検証が行われていないデータ(以下、未検証データという)がない場合には(S550:NO)S510に移行し、上述の処理を繰り返す。
一方、未検証データがある場合には(S550:YES)、S560にて、検証処理を実行する。具体的には、まず、検証バッファ13に格納されているデータのうち、検証用検証ポインタPT14が指示するアドレスから予め設定された検証単位分のアドレスまでのデータを読み出す。そして、読み出したデータについて、例えばサム計算またはCRC計算などの認証用演算を実行し、この演算値と、読み出したデータに対してプログラム書換装置RP側で予め付与された検証用データの値とを比較し、両者が一致している場合に、読み出したデータが適正であると判断するとともに、両者が不一致である場合に、読み出したデータが不適正であると判断する。
If there is no data that has not been verified (hereinafter referred to as unverified data) (S550: NO), the process proceeds to S510, and the above-described processing is repeated.
On the other hand, if there is unverified data (S550: YES), verification processing is executed in S560. Specifically, first, of the data stored in the verification buffer 13, the data from the address indicated by the verification verification pointer PT14 to the address corresponding to the preset verification unit is read. For the read data, for example, an authentication calculation such as a sum calculation or a CRC calculation is executed, and the calculated value and the value of the verification data previously given to the read data on the program rewriting device RP side are obtained. In comparison, if the two match, it is determined that the read data is appropriate, and if the two do not match, it is determined that the read data is incorrect.

そしてS570にて、検証用検証ポインタPT14を更新する。具体的には、S560で検証(バリデート)を実行したデータ量分、検証用検証ポインタPT14の指示値を変化させる。   In step S570, the verification pointer PT14 for verification is updated. Specifically, the instruction value of the verification pointer PT14 is changed by the amount of data that has been verified (validated) in S560.

その後S580にて、今回のプログラム書換要求で書き換えるべき制御プログラムに関する全ての検証(バリデート)が終了したか否かを判断する。ここで、全ての検証が終了していない場合には(S580:NO)、S510に移行し、上述の処理を繰り返す。一方、全ての検証が終了した場合には(S580:YES)、検証実行処理を終了する。   Thereafter, in S580, it is determined whether or not all verification (validation) related to the control program to be rewritten by the current program rewrite request has been completed. Here, when all the verifications are not completed (S580: NO), the process proceeds to S510 and the above-described processing is repeated. On the other hand, when all the verifications are completed (S580: YES), the verification execution process is ended.

このように構成されたECU1では、まず、フラッシュROM3に記憶された制御プログラムの内容を書き換えるための書換データを外部から受信する受信処理を実行する(S230)。そして、受信処理により受信した書換データをフラッシュROM3に書き込むことにより、フラッシュROM3に記憶された制御プログラムの内容を書き換える書換処理を実行する(S320)。また、受信処理が実行されていない状態(S530:NO)または受信処理において書換データの受信を待っている状態(S540:YES)であることと、書換処理が実行されていない状態(S510:NO)または書換処理において不揮発性メモリへの書換データの書き込み終了を待っている状態(S520:YES)であることの両方が成り立っている場合に、不揮発性メモリに書き込まれる書換データが適正なものであるか否かを検証する検証処理を実行する(S560)。   In the ECU 1 configured as described above, first, a reception process for receiving rewrite data for rewriting the contents of the control program stored in the flash ROM 3 is executed (S230). And the rewriting process which rewrites the content of the control program memorize | stored in flash ROM3 is performed by writing in the flash ROM3 the rewriting data received by the receiving process (S320). In addition, the reception process is not executed (S530: NO) or the reception process is waiting for the rewrite data (S540: YES), and the rewrite process is not executed (S510: NO). ) Or the state of waiting for the completion of rewrite data writing to the non-volatile memory in the rewrite process (S520: YES), the rewrite data written to the non-volatile memory is appropriate. A verification process for verifying whether or not there is is executed (S560).

このため、受信処理の実行中であっても、書換データの受信を待っている状態であれば、検証処理を実行することができるとともに、書換処理の実行中であっても、不揮発性メモリへの書換データの書き込み終了を待っている状態であれば、検証処理を実行することができる。すなわち、例えば図13および図14に示すように、制御プログラムを書き換えるために実行される受信処理または書換処理と並行して検証処理を実行することができる。これにより、第1実施形態と同様に、制御プログラムの書き換えに要する時間を短縮することができる。   Therefore, even if the reception process is being executed, the verification process can be executed as long as it is waiting for the reception of the rewrite data. If it is in a state of waiting for completion of writing of the rewrite data, verification processing can be executed. That is, for example, as shown in FIG. 13 and FIG. 14, the verification process can be executed in parallel with the reception process or the rewrite process executed to rewrite the control program. Thereby, similarly to the first embodiment, the time required for rewriting the control program can be shortened.

図13では、受信処理RP01,RP02,RP03,・・・・,RP14が順次実行されており、受信処理RP01の開始前に検証処理VP11が開始される(時刻t11を参照)。そして受信処理RP01の実行中に、書換処理WP11が開始される(時刻t12を参照)。書換処理WP11は、受信処理RP01で受信したデータを書き込む。検証処理VP11は、書換処理WP11の前にフラッシュROM3に書き込まれたデータ(例えば、部分書換により書き込まれたデータ)を検証する。これにより、受信処理RP01,RP02,RP03と書換処理WP11と検証処理VP11とが並行に実行される。   In FIG. 13, reception processes RP01, RP02, RP03,..., RP14 are sequentially executed, and the verification process VP11 is started before the reception process RP01 is started (see time t11). Then, the rewriting process WP11 is started during the execution of the receiving process RP01 (see time t12). The rewrite process WP11 writes the data received by the reception process RP01. The verification process VP11 verifies the data (for example, data written by partial rewriting) written in the flash ROM 3 before the rewriting process WP11. As a result, the reception processes RP01, RP02, and RP03, the rewrite process WP11, and the verification process VP11 are executed in parallel.

また、受信処理RP04の開始前に、書換処理WP12が開始され(時刻t13を参照)、その後に検証処理VP12が開始される。書換処理WP12は、受信処理RP02,RP03で受信したデータを書き込む。検証処理VP12は、書換処理WP11,WP12で書き込むデータを検証する。これにより、受信処理RP04,RP05,RP06と書換処理WP12と検証処理VP11,VP12とが並行に実行される。   Further, the rewrite process WP12 is started before the start of the reception process RP04 (see time t13), and thereafter the verification process VP12 is started. The rewriting process WP12 writes the data received in the receiving processes RP02 and RP03. The verification process VP12 verifies the data written in the rewrite processes WP11 and WP12. As a result, the reception processes RP04, RP05, RP06, the rewrite process WP12, and the verification processes VP11, VP12 are executed in parallel.

また、受信処理RP07の開始前に、書換処理WP13が開始され(時刻t14を参照)、その後に検証処理VP13が開始される。書換処理WP13は、受信処理RP04,RP05,RP06で受信したデータを書き込む。検証処理VP13は、書換処理WP13で書き込むデータを検証する。これにより、受信処理RP07,RP08,RP09,RP10と書換処理WP13と検証処理VP12,VP13とが並行に実行される。   Further, the rewrite process WP13 is started before the start of the reception process RP07 (see time t14), and thereafter the verification process VP13 is started. The rewriting process WP13 writes the data received in the receiving processes RP04, RP05, RP06. The verification process VP13 verifies the data written in the rewrite process WP13. Accordingly, the reception processes RP07, RP08, RP09, RP10, the rewrite process WP13, and the verification processes VP12, VP13 are executed in parallel.

また、受信処理RP11の開始前に、書換処理WP14が開始され(時刻t15を参照)、その後に検証処理VP14が開始される。書換処理WP14は、受信処理RP07,RP08,RP09,RP10で受信したデータを書き込む。検証処理VP14は、書換処理WP14で書き込むデータを検証する。これにより、受信処理RP11,RP12,RP13,RP14と書換処理WP14と検証処理VP13,VP14とが並行に実行される。   Further, the rewrite process WP14 is started before the start of the reception process RP11 (see time t15), and then the verification process VP14 is started. The rewriting process WP14 writes the data received in the receiving processes RP07, RP08, RP09, RP10. The verification process VP14 verifies the data written in the rewrite process WP14. As a result, the reception processes RP11, RP12, RP13, RP14, the rewrite process WP14, and the verification processes VP13, VP14 are executed in parallel.

また図14では、書込起動WP21の前に、受信処理RP21と検証処理VP21とが並行に実行されるとともに、書込起動WP21の後に、受信処理RP22と書換処理WP22と検証処理VP22とが並行に実行されることを示している。   In FIG. 14, the reception process RP21 and the verification process VP21 are executed in parallel before the write activation WP21, and the reception process RP22, the rewrite process WP22, and the verification process VP22 are performed in parallel after the write activation WP21. Is shown to be executed.

またECU1は、フラッシュROM3に書き込まれた書換データを一時的に記憶する検証バッファ13を備え、検証バッファ13に記憶されている書換データに対して検証処理を実行する。   The ECU 1 also includes a verification buffer 13 that temporarily stores rewrite data written in the flash ROM 3, and executes verification processing on the rewrite data stored in the verification buffer 13.

これにより、フラッシュROM3に書き込む書換データの検証を、フラッシュROM3からデータを読み出すことなく行うことができる。このため、第1実施形態と同様に、書換処理の実行中であっても、不揮発性メモリへの書換データの書き込み終了を待っている状態であれば、検証処理を実行することができる。   As a result, rewriting data to be written to the flash ROM 3 can be verified without reading the data from the flash ROM 3. For this reason, as in the first embodiment, even when the rewriting process is being executed, the verification process can be executed as long as the writing of the rewritten data to the nonvolatile memory is awaited.

また、今回のプログラム書換要求を受信した時点で、前回のプログラム書換要求に基づく書換処理によりフラッシュROM3に書き込まれた書換データが未検証のまま検証バッファ13に残っている場合には、今回のプログラム書換要求のプログラム書換要求に基づく書換処理と並行して、前回のプログラム書換要求に基づく書換処理による書換データの検証を継続することができる。   If the rewrite data written in the flash ROM 3 by the rewrite process based on the previous program rewrite request remains in the verification buffer 13 at the time of receiving the current program rewrite request, In parallel with the rewriting process based on the program rewriting request of the rewriting request, the verification of the rewriting data by the rewriting process based on the previous program rewriting request can be continued.

また検証バッファ13は、リングバッファ構造で形成されている。このため、第1実施形態と同様に、検証バッファ13に書き込まれている書換データに対する検証が全て終了していない状態で、新たに検証バッファ13に書き込まれる場合には、未検証の書換データを先頭アドレスに移動させる必要がなくなる。   The verification buffer 13 has a ring buffer structure. For this reason, as in the first embodiment, when all the verifications on the rewritten data written in the verification buffer 13 are not completed, and new data is written in the verification buffer 13, unverified rewritten data is stored. There is no need to move to the start address.

以上説明した実施形態において、S560の処理は本発明における検証処理実行手段および検証処理実行手順である。
(第3実施形態)
以下に本発明の第3実施形態を図面とともに説明する。なお第3実施形態では、第1実施形態と異なる部分を説明する。
In the embodiment described above, the processing of S560 is the verification processing execution means and the verification processing execution procedure in the present invention.
(Third embodiment)
A third embodiment of the present invention will be described below with reference to the drawings. In the third embodiment, parts different from the first embodiment will be described.

第3実施形態のECU1は、ECU1の構成と書換実行処理と検証実行処理が変更された点以外は第1実施形態と同じである。
まずECU1の構成は、書換用検証ポインタPT5が省略されている点と、図15に示すように、フラッシュROM3に書き込まれているデータを検証(バリデート)するときに、検証するデータが書き込まれている記憶領域のアドレスを指示するROM用検証ポインタPT21が設けられている点以外は第1実施形態と同じである。
The ECU 1 of the third embodiment is the same as the first embodiment except that the configuration of the ECU 1, the rewrite execution process, and the verification execution process are changed.
First, the configuration of the ECU 1 is that the rewriting verification pointer PT5 is omitted, and the data to be verified is written when the data written in the flash ROM 3 is verified (validated) as shown in FIG. The second embodiment is the same as the first embodiment except that a ROM verification pointer PT21 is provided to indicate the address of the storage area.

次に、第3実施形態の書換実行処理を説明する。第3実施形態の書換実行処理は、図16に示すように、S308の処理が追加された点以外は第1実施形態と同じである。
すなわち、この書換実行処理が実行されると、CPU2は、まずS308にて、ROM用検証ポインタPT21を更新する。具体的には、ROM用検証ポインタPT21を、今回のプログラム書換要求で書き換えるべき制御プログラムとは別に既にフラッシュROM3に書き込まれている制御プログラムのうち検証が行われていないデータの記憶領域の先頭アドレスに設定する。そしてS308の処理が終了すると、S310に移行する。
Next, the rewrite execution process of the third embodiment will be described. The rewrite execution process of the third embodiment is the same as that of the first embodiment except that the process of S308 is added as shown in FIG.
That is, when this rewrite execution process is executed, the CPU 2 first updates the ROM verification pointer PT21 in S308. Specifically, the ROM verification pointer PT21 is the start address of the storage area of the data that has not been verified among the control programs already written in the flash ROM 3 separately from the control program to be rewritten by the current program rewrite request. Set to. Then, when the processing of S308 ends, the process proceeds to S310.

次に、第3実施形態の検証実行処理を説明する。
この検証実行処理が実行されると、CPU2は、図17に示すように、まずS610にて、書換処理(S320の処理)を実行中であるか否かを判断する。書換処理を実行中である場合には(S610:YES)、S610に移行し、S610の処理を繰り返す。一方書換処理を実行していない場合には(S610:NO)、S620にて、受信処理(S230の処理)を実行中であるか否かを判断する。ここで、受信処理を実行していない場合には(S620:NO)、S640に移行する。
Next, verification execution processing according to the third embodiment will be described.
When the verification execution process is executed, as shown in FIG. 17, the CPU 2 first determines in S610 whether or not the rewrite process (the process of S320) is being executed. When the rewriting process is being executed (S610: YES), the process proceeds to S610, and the process of S610 is repeated. On the other hand, if the rewriting process is not executed (S610: NO), it is determined in S620 whether the receiving process (the process of S230) is being executed. If the reception process is not executed (S620: NO), the process proceeds to S640.

一方、受信処理を実行中である場合には(S620:YES)、S630にて、受信待ち状態であるか否かを判断する。ここで、受信待ち状態でない場合には(S630:NO)、S610に移行し、上述の処理を繰り返す。一方、受信待ち状態である場合には(S630:YES)、S640に移行する。   On the other hand, if the reception process is being executed (S620: YES), it is determined in S630 whether or not a reception waiting state is set. Here, when it is not a reception waiting state (S630: NO), it transfers to S610 and repeats the above-mentioned process. On the other hand, when it is in a reception waiting state (S630: YES), the process proceeds to S640.

そしてS640に移行すると、検証処理を実行する。具体的には、まず、フラッシュROM3に書き込まれているデータのうち、ROM用検証ポインタPT21が指示するアドレスから予め設定された検証単位分のアドレスまでのデータを読み出す。そして、読み出したデータについて、例えばサム計算またはCRC計算などの認証用演算を実行し、この演算値と、読み出したデータに対してプログラム書換装置RP側で予め付与された検証用データの値とを比較し、両者が一致している場合に、読み出したデータが適正であると判断するとともに、両者が不一致である場合に、読み出したデータが不適正であると判断する。   In S640, a verification process is executed. Specifically, first, of the data written in the flash ROM 3, the data from the address indicated by the ROM verification pointer PT21 to the address corresponding to the preset verification unit is read. For the read data, for example, an authentication calculation such as a sum calculation or a CRC calculation is executed, and the calculated value and the value of the verification data previously given to the read data on the program rewriting device RP side are obtained. In comparison, if the two match, it is determined that the read data is appropriate, and if the two do not match, it is determined that the read data is incorrect.

そしてS650にて、ROM用検証ポインタを更新する。具体的には、S640で検証(バリデート)を実行したデータ量分、ROM用検証ポインタの指示値を変化させる。
その後S660にて、今回のプログラム書換要求で書き換えるべき制御プログラムに関する全ての検証(バリデート)が終了したか否かを判断する。ここで、全ての検証が終了していない場合には(S660:NO)、S610に移行し、上述の処理を繰り返す。一方、全ての検証が終了した場合には(S660:YES)、検証実行処理を終了する。
In step S650, the ROM verification pointer is updated. Specifically, the instruction value of the ROM verification pointer is changed by the amount of data that has been verified (validated) in S640.
Thereafter, in S660, it is determined whether or not all verification (validation) related to the control program to be rewritten by the current program rewrite request has been completed. If all the verifications have not been completed (S660: NO), the process proceeds to S610 and the above-described process is repeated. On the other hand, when all the verifications are completed (S660: YES), the verification execution process is ended.

このように構成されたECU1では、まず、フラッシュROM3に記憶された制御プログラムの内容を書き換えるための書換データを外部から受信する受信処理を実行する(S230)。そして、受信処理により受信した書換データをフラッシュROM3に書き込むことにより、フラッシュROM3に記憶された制御プログラムの内容を書き換える書換処理を実行する(S320)。また、受信処理が実行されていない状態(S620:NO)または受信処理において書換データの受信を待っている状態(S630:YES)であることと、書換処理が実行されていない状態(S610:NO)であることの両方が成り立っている場合に、不揮発性メモリに書き込まれる書換データが適正なものであるか否かを検証する検証処理を実行する(S640)。   In the ECU 1 configured as described above, first, a reception process for receiving rewrite data for rewriting the contents of the control program stored in the flash ROM 3 is executed (S230). And the rewriting process which rewrites the content of the control program memorize | stored in flash ROM3 is performed by writing in the flash ROM3 the rewriting data received by the receiving process (S320). In addition, the reception process is not executed (S620: NO) or the reception process is waiting for the rewrite data (S630: YES), and the rewrite process is not executed (S610: NO). ), A verification process for verifying whether or not the rewritten data written to the nonvolatile memory is appropriate is executed (S640).

このため、受信処理の実行中であっても、書換データの受信を待っている状態であれば、検証処理を実行することができる。すなわち、例えば図18に示すように、受信処理と検証処理とを並行に実行することができる。これにより、第1実施形態と同様に、制御プログラムの書き換えに要する時間を短縮することができる。   For this reason, even if the reception process is being executed, the verification process can be executed as long as it is waiting for the reception of the rewrite data. That is, for example, as shown in FIG. 18, the reception process and the verification process can be executed in parallel. Thereby, similarly to the first embodiment, the time required for rewriting the control program can be shortened.

図18では、受信処理RP01,RP02,RP03,・・・・,RP14が順次実行されており、受信処理RP01の開始前に検証処理VP31が開始される(時刻t31を参照)。そして受信処理RP01の実行中に、書換処理WP31が開始される(時刻t32を参照)。このため、書換処理WP31の開始前に検証処理VP31が終了する。書換処理WP31は、受信処理RP01で受信したデータを書き込む。検証処理VP31は、書換処理WP31の前にフラッシュROM3に書き込まれたデータを検証する。これにより、受信処理RP01と検証処理VP31とが並行に実行される。   In FIG. 18, the reception processes RP01, RP02, RP03,..., RP14 are sequentially executed, and the verification process VP31 is started before the reception process RP01 is started (see time t31). Then, the rewriting process WP31 is started during the execution of the receiving process RP01 (see time t32). For this reason, the verification process VP31 ends before the start of the rewrite process WP31. The rewriting process WP31 writes the data received by the receiving process RP01. The verification process VP31 verifies the data written in the flash ROM 3 before the rewrite process WP31. As a result, the reception process RP01 and the verification process VP31 are executed in parallel.

また、書換処理WP31が終了すると検証処理VP32が開始される(時刻t33を参照)。そして、受信処理RP04の開始前に、書換処理WP32が開始される。(時刻t34を参照)。このため、書換処理WP32の開始前に検証処理VP31が終了する。書換処理WP32は、受信処理RP02,RP03で受信したデータを書き込む。検証処理VP32は、書換処理WP31の前にフラッシュROM3に書き込まれたデータを検証する。これにより、受信処理RP03と検証処理VP32とが並行に実行される。   When the rewriting process WP31 ends, the verification process VP32 is started (see time t33). Then, the rewrite process WP32 is started before the start of the reception process RP04. (See time t34). For this reason, the verification process VP31 ends before the start of the rewrite process WP32. The rewriting process WP32 writes the data received in the receiving processes RP02 and RP03. The verification process VP32 verifies the data written in the flash ROM 3 before the rewrite process WP31. Thereby, the reception process RP03 and the verification process VP32 are executed in parallel.

また、書換処理WP32が終了すると検証処理VP33が開始される(時刻t35を参照)。そして、受信処理RP07の開始前に、書換処理WP33が開始される。(時刻t36を参照)。このため、書換処理WP33の開始前に検証処理VP33が終了する。書換処理WP33は、受信処理RP04,RP05,RP06で受信したデータを書き込む。検証処理VP33は、書換処理WP31の前にフラッシュROM3に書き込まれたデータを検証する。   Further, when the rewriting process WP32 is completed, the verification process VP33 is started (see time t35). Then, the rewrite process WP33 is started before the start of the reception process RP07. (See time t36). For this reason, the verification process VP33 ends before the start of the rewrite process WP33. The rewriting process WP33 writes the data received in the receiving processes RP04, RP05, RP06. The verification process VP33 verifies the data written in the flash ROM 3 before the rewrite process WP31.

また、書換処理WP33が終了すると検証処理VP34が開始される(時刻t37を参照)。そして、受信処理RP11の開始前に、書換処理WP34が開始される。(時刻t38を参照)。このため、書換処理WP34の開始前に検証処理VP34が終了する。書換処理WP34は、受信処理RP07,RP08,RP09,RP10で受信したデータを書き込む。検証処理VP34は、書換処理WP11の前にフラッシュROM3に書き込まれたデータを検証する。これにより、受信処理RP10と検証処理VP34とが並行に実行される。   When the rewriting process WP33 ends, the verification process VP34 is started (see time t37). Then, the rewrite process WP34 is started before the start of the reception process RP11. (See time t38). Therefore, the verification process VP34 ends before the rewrite process WP34 starts. The rewriting process WP34 writes the data received in the receiving processes RP07, RP08, RP09, and RP10. The verification process VP34 verifies the data written in the flash ROM 3 before the rewrite process WP11. Thereby, the reception process RP10 and the verification process VP34 are executed in parallel.

またECU1は、フラッシュROM3に書き込まれた書換データに対して検証処理を実行する。これにより、検証バッファ13を設けることができる程度の記憶容量の余裕をRAM4が有していない場合であっても、検証処理を実行することができる。   The ECU 1 also performs verification processing on the rewritten data written in the flash ROM 3. As a result, even if the RAM 4 does not have enough storage capacity to provide the verification buffer 13, the verification process can be executed.

また、今回のプログラム書換要求を受信した時点で、前回のプログラム書換要求に基づく書換処理によりフラッシュROM3に書き込まれた書換データが未検証のまま残っている場合には、今回のプログラム書換要求のプログラム書換要求に基づく書換処理と並行して、前回のプログラム書換要求に基づく書換処理による書換データの検証を継続することができる。   Further, when the rewrite data written in the flash ROM 3 by the rewrite process based on the previous program rewrite request remains unverified when the current program rewrite request is received, the program rewrite request program of this time In parallel with the rewrite process based on the rewrite request, verification of the rewrite data by the rewrite process based on the previous program rewrite request can be continued.

以上説明した実施形態において、S640の処理は本発明における検証処理実行手段および検証処理実行手順である。
以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の技術的範囲に属する限り種々の形態を採ることができる。
In the embodiment described above, the processing of S640 is the verification processing execution means and the verification processing execution procedure in the present invention.
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, As long as it belongs to the technical scope of this invention, a various form can be taken.

例えば上記実施形態では、ECU1の制御対象が車両のエンジンであるものを示したが、これに限定されるものではなく、例えば自動変速機であってもよい。
また上記実施形態では、フラッシュROM3に制御プログラムを記憶するものを示したが、制御プログラムの記憶媒体としてはこれに限定されるものではなく、例えばEEPROMのように記憶内容の書き換えが可能な不揮発性メモリであればよい。
For example, in the above-described embodiment, the control target of the ECU 1 is the vehicle engine. However, the present invention is not limited to this, and may be an automatic transmission, for example.
In the above embodiment, the control program is stored in the flash ROM 3. However, the storage medium for the control program is not limited to this, and for example, nonvolatile storage that can rewrite the storage content, such as an EEPROM. Any memory can be used.

また上記実施形態では、書換プログラムをプログラム書換装置RPから取得するものを示したが、ECU1が予めフラッシュROM3内に書換プログラムを記憶していてもよい。   In the above embodiment, the rewriting program is acquired from the program rewriting device RP. However, the ECU 1 may store the rewriting program in the flash ROM 3 in advance.

また上記実施形態では、書換バッファ12と検証バッファ13がリングバッファ構造で形成されているものを示したが、リングバッファ構造ではない通常の構造であってもよい。但し、通常の構造の場合には、新たなデータが書き込まれる前に、既に書き込まれているデータを先頭アドレスに移動させる必要がある。   In the above embodiment, the rewrite buffer 12 and the verification buffer 13 are formed in a ring buffer structure. However, a normal structure other than the ring buffer structure may be used. However, in the case of a normal structure, it is necessary to move already written data to the head address before new data is written.

また上記実施形態では、S20にて、書き込まれている制御プログラムが適正なものであるか否かを判断するものを示した。しかし、書き込まれている制御プログラムが適正なものでないと検証処理で判断されたときにおいて、制御プログラムが既に書き込まれていても、制御プログラムが書き込まれていないとS10の処理で判断されるようにする場合には、S20の処理を不要とすることができる。例えば、書き換えと検証(バリデート)の両方が正常であるか否かを示す識別値を記憶する領域を設け、書き換えの開始時に識別値を消去する。そして、書き換えが正常に終了するとともに検証結果が正常である場合に、予め設定された値の識別値を再度記憶する一方、書き換えが途絶したり検証結果が異常であったりした場合には、識別値の記憶を禁止する。これにより、識別値に基づいて、制御プログラムが正常に書き込まれたか否かを判断することが可能になるとともに、書き込まれた制御プログラムが適正であるか否かを判断する処理を不要とすることができる。   Moreover, in the said embodiment, what determined whether the control program currently written in S20 is appropriate was shown. However, when the verification process determines that the written control program is not appropriate, it is determined in the process of S10 that the control program has not been written even if the control program has already been written. If so, the process of S20 can be made unnecessary. For example, an area for storing an identification value indicating whether both rewriting and verification (validation) are normal is provided, and the identification value is erased at the start of rewriting. When the rewriting is normally completed and the verification result is normal, the identification value of the preset value is stored again. On the other hand, if the rewriting is interrupted or the verification result is abnormal, the identification is performed. Prohibit value storage. This makes it possible to determine whether or not the control program has been normally written based on the identification value, and eliminates the need for processing to determine whether or not the written control program is appropriate. Can do.

また上記実施形態では、受信処理と書換処理と検証処理とを並行に実行するものと、受信処理と検証処理とを並行に実行するものを示した。しかし、例えば図19に示すように、書換処理と検証処理とを並行に実行するようにしてもよい。なお図19は、複数回の受信処理の後に、複数回の受信処理で受信したデータを一括してフラッシュROMに書き込む書換処理を実行し、書換処理の終了後に、受信処理を再開するように構成された電子制御装置において、検証処理が、書換処理と並行に実行されるとともに、受信処理と受信処理との間で実行されることを示している。   Moreover, in the said embodiment, what performed a receiving process, a rewriting process, and a verification process in parallel, and what performed a receiving process and a verification process in parallel were shown. However, for example, as shown in FIG. 19, the rewriting process and the verification process may be executed in parallel. Note that FIG. 19 is configured to execute a rewriting process in which data received in a plurality of receiving processes is collectively written in the flash ROM after a plurality of receiving processes, and to resume the receiving process after the rewriting process is completed. In the electronic control apparatus, the verification process is executed in parallel with the rewrite process and is executed between the reception process and the reception process.

1…ECU、3…フラッシュROM   1 ... ECU, 3 ... Flash ROM

Claims (11)

記憶内容の書き換えが可能であり、所定の制御対象を制御するための制御プログラムを記憶する不揮発性メモリ(3)と、
前記不揮発性メモリに記憶された前記制御プログラムの内容を書き換えるためのデータである書換データを外部から受信する受信処理を実行する受信処理実行手段(S230)と、
前記受信処理により受信した前記書換データを前記不揮発性メモリに書き込むことにより、前記不揮発性メモリに記憶された前記制御プログラムの内容を書き換える書換処理を実行する書換処理実行手段(S320)と、
前記受信処理において前記書換データの受信を待っている状態であるか否か、および前記書換処理において前記不揮発性メモリへの前記書換データの書き込み終了を待っている状態であるか否かの少なくとも一方を条件として含むように予め設定された検証実行条件が成立した場合に、前記不揮発性メモリに書き込まれる前記書換データが適正なものであるか否かを検証する検証処理を実行する検証処理実行手段(S460,S560,S640)とを備える
ことを特徴とする電子制御装置(1)。
A non-volatile memory (3) capable of rewriting stored contents and storing a control program for controlling a predetermined control object;
A receiving process executing means (S230) for executing a receiving process for receiving rewrite data from the outside, which is data for rewriting the contents of the control program stored in the nonvolatile memory;
Rewriting processing execution means (S320) for executing rewriting processing for rewriting the contents of the control program stored in the nonvolatile memory by writing the rewriting data received by the receiving processing in the nonvolatile memory;
At least one of whether it is in a state of waiting for reception of the rewrite data in the reception process and whether it is in a state of waiting for completion of writing of the rewrite data to the nonvolatile memory in the rewrite process Verification processing means for executing verification processing for verifying whether or not the rewritten data written to the nonvolatile memory is appropriate when a preset verification execution condition is established so as to include (S460, S560, S640) The electronic control apparatus (1) characterized by the above-mentioned.
前記検証処理実行手段(S460,S560)は、
前記受信処理が実行されていない状態または前記受信処理において前記書換データの受信を待っている状態であることを第1判断状態とし、前記書換処理が実行されていない状態または前記書換処理において前記不揮発性メモリへの前記書換データの書き込み終了を待っている状態であることを第2判断状態とし、前記第1判断状態であり且つ前記第2判断状態であることを第1検証実行条件として、前記第1検証実行条件を前記検証実行条件として採用する
ことを特徴とする請求項1に記載の電子制御装置。
The verification processing execution means (S460, S560)
The first determination state is a state in which the reception process is not executed or a state in which reception of the rewrite data is awaited in the reception process, and a state in which the rewrite process is not executed or the nonvolatile process in the rewrite process. The state of waiting for completion of writing of the rewritten data to the volatile memory is set as the second determination state, and the first determination state and the second determination state are set as the first verification execution condition, The electronic control apparatus according to claim 1, wherein a first verification execution condition is adopted as the verification execution condition.
前記書換処理により前記不揮発性メモリに書き込む前記書換データを、前記不揮発性メモリに書き込む前に一時的に記憶する書換バッファ(12)を備え、
前記検証処理実行手段は、前記検証実行条件として前記第1検証実行条件を採用し、前記書換バッファに記憶されている前記書換データに対して前記検証処理を実行する
ことを特徴とする請求項2に記載の電子制御装置。
A rewrite buffer (12) for temporarily storing the rewrite data to be written to the nonvolatile memory by the rewrite processing before the data is written to the nonvolatile memory;
The verification processing execution unit adopts the first verification execution condition as the verification execution condition, and executes the verification processing on the rewritten data stored in the rewrite buffer. The electronic control apparatus as described in.
前記不揮発性メモリに書き込まれた前記書換データを一時的に記憶する検証バッファ(13)を備え、
前記検証処理実行手段は、前記検証バッファに記憶されている前記書換データに対して前記検証処理を実行する
ことを特徴とする請求項2に記載の電子制御装置。
A verification buffer (13) for temporarily storing the rewritten data written in the nonvolatile memory;
The electronic control device according to claim 2, wherein the verification processing execution unit executes the verification processing on the rewritten data stored in the verification buffer.
前記検証処理実行手段(S640)は、
前記受信処理が実行されていない状態または前記受信処理において前記書換データの受信を待っている状態であることを第1判断状態とし、前記書換処理が実行されていない状態であることを第3判断状態とし、前記第1判断状態であり且つ前記第3判断状態であることを第2検証実行条件として、前記第2検証実行条件を前記検証実行条件として採用する
ことを特徴とする請求項1に記載の電子制御装置。
The verification processing execution means (S640)
The first determination state is a state in which the reception process is not executed or a state in which reception of the rewrite data is awaited in the reception process, and a third determination that the rewrite process is not executed. The second verification execution condition is adopted as the second verification execution condition, and the second verification execution condition is adopted as the verification execution condition. The electronic control device described.
前記検証処理実行手段は、前記不揮発性メモリに書き込まれた前記書換データに対して前記検証処理を実行する
ことを特徴とする請求項5に記載の電子制御装置。
The electronic control device according to claim 5, wherein the verification processing execution unit executes the verification processing on the rewritten data written in the nonvolatile memory.
前記書換バッファは、リングバッファ構造で形成されている
ことを特徴とする請求項3に記載の電子制御装置。
The electronic control device according to claim 3, wherein the rewrite buffer has a ring buffer structure.
前記検証バッファは、リングバッファ構造で形成されている
ことを特徴とする請求項4に記載の電子制御装置。
The electronic control device according to claim 4, wherein the verification buffer has a ring buffer structure.
記憶内容の書き換えが可能であり所定の制御対象を制御するための制御プログラムを記憶する不揮発性メモリに記憶された前記制御プログラムの内容を書き換えるためのデータである書換データを受信する受信処理を実行する受信処理実行手順(S230)と、
前記受信処理により受信した前記書換データを前記不揮発性メモリに書き込むことにより、前記不揮発性メモリに記憶された前記制御プログラムの内容を書き換える書換処理を実行する書換処理実行手順(S320)と、
前記受信処理において前記書換データの受信を待っている状態であるか否か、および前記書換処理において前記不揮発性メモリへの前記書換データの書き込み終了を待っている状態であるか否かの少なくとも一方を条件として含むように予め設定された検証実行条件が成立した場合に、前記不揮発性メモリに書き込まれる前記書換データが適正なものであるか否かを検証する検証処理を実行する検証処理実行手順(S460,S560,S640)とを備える
ことを特徴とするメモリ書換方法。
Receiving rewrite data, which is data for rewriting the contents of the control program stored in the non-volatile memory that stores the control program for controlling a predetermined control object, can be rewritten. Receiving process execution procedure (S230),
A rewrite process execution procedure (S320) for executing a rewrite process for rewriting the contents of the control program stored in the non-volatile memory by writing the rewrite data received by the reception process to the non-volatile memory;
At least one of whether it is in a state of waiting for reception of the rewrite data in the reception process and whether it is in a state of waiting for completion of writing of the rewrite data to the nonvolatile memory in the rewrite process Verification process execution procedure for executing verification process for verifying whether or not the rewritten data written to the nonvolatile memory is appropriate when a preset verification execution condition is established so as to include (S460, S560, S640) The memory rewriting method characterized by the above-mentioned.
前記検証処理実行手順(S460,S560)は、
前記受信処理が実行されていない状態または前記受信処理において前記書換データの受信を待っている状態であることを第1判断状態とし、前記書換処理が実行されていない状態または前記書換処理において前記不揮発性メモリへの前記書換データの書き込み終了を待っている状態であることを第2判断状態とし、前記第1判断状態であり且つ前記第2判断状態であることを第1検証実行条件として、前記第1検証実行条件を前記検証実行条件として採用する
ことを特徴とする請求項9に記載のメモリ書換方法。
The verification processing execution procedure (S460, S560)
The first determination state is a state in which the reception process is not executed or a state in which reception of the rewrite data is awaited in the reception process, and a state in which the rewrite process is not executed or the nonvolatile process in the rewrite process. The state of waiting for completion of writing of the rewritten data to the volatile memory is set as the second determination state, and the first determination state and the second determination state are set as the first verification execution condition, The memory rewriting method according to claim 9, wherein the first verification execution condition is adopted as the verification execution condition.
前記検証処理実行手順(S640)は、
前記受信処理が実行されていない状態または前記受信処理において前記書換データの受信を待っている状態であることを第1判断状態とし、前記書換処理が実行されていない状態であることを第3判断状態とし、前記第1判断状態であり且つ前記第3判断状態であることを第2検証実行条件として、前記第2検証実行条件を前記検証実行条件として採用する
ことを特徴とする請求項9に記載のメモリ書換方法。
The verification process execution procedure (S640) includes:
The first determination state is a state in which the reception process is not executed or a state in which reception of the rewrite data is awaited in the reception process, and a third determination that the rewrite process is not executed. The second verification execution condition is adopted as the second verification execution condition, and the second verification execution condition is adopted as the verification execution condition. Memory rewrite method as described.
JP2013113144A 2013-05-29 2013-05-29 Electronic control device and memory rewriting method Active JP5835271B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2013113144A JP5835271B2 (en) 2013-05-29 2013-05-29 Electronic control device and memory rewriting method
DE102014210266.9A DE102014210266A1 (en) 2013-05-29 2014-05-28 ELECTRONIC CONTROL UNIT AND MEMORY OVERRACKING PROCESS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013113144A JP5835271B2 (en) 2013-05-29 2013-05-29 Electronic control device and memory rewriting method

Publications (2)

Publication Number Publication Date
JP2014232437A true JP2014232437A (en) 2014-12-11
JP5835271B2 JP5835271B2 (en) 2015-12-24

Family

ID=51899673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013113144A Active JP5835271B2 (en) 2013-05-29 2013-05-29 Electronic control device and memory rewriting method

Country Status (2)

Country Link
JP (1) JP5835271B2 (en)
DE (1) DE102014210266A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019016086A (en) * 2017-07-05 2019-01-31 日立オートモティブシステムズ株式会社 Automobile electronic control device
JP2020173597A (en) * 2019-04-10 2020-10-22 株式会社デンソー Electronic control device
JP7472844B2 (en) 2021-04-14 2024-04-23 株式会社デンソー Electronic Control Unit

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111399472A (en) * 2019-01-03 2020-07-10 北京汽车动力总成有限公司 ECU (electronic control unit) flashing device and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3893755B2 (en) 1998-07-03 2007-03-14 株式会社デンソー Electronic control unit

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019016086A (en) * 2017-07-05 2019-01-31 日立オートモティブシステムズ株式会社 Automobile electronic control device
JP2020173597A (en) * 2019-04-10 2020-10-22 株式会社デンソー Electronic control device
JP7302250B2 (en) 2019-04-10 2023-07-04 株式会社デンソー electronic controller
JP7472844B2 (en) 2021-04-14 2024-04-23 株式会社デンソー Electronic Control Unit

Also Published As

Publication number Publication date
DE102014210266A1 (en) 2014-12-04
JP5835271B2 (en) 2015-12-24

Similar Documents

Publication Publication Date Title
JP5835271B2 (en) Electronic control device and memory rewriting method
JP6044316B2 (en) In-vehicle electronic control unit
JP4650566B2 (en) Control system and electronic control device
JP2010167997A (en) Rewriting system for vehicle
JP2020027635A5 (en) Electronic control device, method for specifying retry point, program for specifying retry point, and electronic control system for vehicle
KR100874955B1 (en) Semiconductor memory device and its VeriFi control method
CN113093694B (en) Vehicle-mounted electronic control unit data flashing method and system based on UDS
WO2017036101A1 (en) Method and device for updating register
CN115657537B (en) Calibration data management method, device and medium for vehicle and electronic control unit
JP2009265819A (en) Control unit and program for the same
JP2013232028A (en) Microcomputer
JP2012212272A (en) Electronic control device for vehicle
JP5111486B2 (en) Update apparatus and update method for control program
JP2019020837A (en) Electronic controller
JP2009223435A (en) Data storage method and device, and program
JP6394291B2 (en) Electronic control device and memory rewriting method
KR20120082292A (en) Semiconductor memory device and method of driving the same
JP6334776B1 (en) Electronic control unit
US20140136744A1 (en) Reset method and network device
JP2008181596A (en) Semiconductor storage device
JP5930940B2 (en) Electronic control device for vehicle
CN112599172B (en) Data writing method and device of electronic control unit and storage medium
JP7250056B2 (en) Control system, moving body and communication control method
JP5564854B2 (en) Control device
JP2005078255A (en) Device and method for data processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150806

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151019

R151 Written notification of patent or utility model registration

Ref document number: 5835271

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250