Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6935694B2 - Electronic control device - Google Patents
[go: Go Back, main page]

JP6935694B2 - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP6935694B2
JP6935694B2 JP2017136365A JP2017136365A JP6935694B2 JP 6935694 B2 JP6935694 B2 JP 6935694B2 JP 2017136365 A JP2017136365 A JP 2017136365A JP 2017136365 A JP2017136365 A JP 2017136365A JP 6935694 B2 JP6935694 B2 JP 6935694B2
Authority
JP
Japan
Prior art keywords
procedure
information
ecu
rewriting
electronic control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017136365A
Other languages
Japanese (ja)
Other versions
JP2019020837A (en
Inventor
男樹 各務
男樹 各務
上原 一浩
一浩 上原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2017136365A priority Critical patent/JP6935694B2/en
Priority to DE102018210868.4A priority patent/DE102018210868A1/en
Publication of JP2019020837A publication Critical patent/JP2019020837A/en
Application granted granted Critical
Publication of JP6935694B2 publication Critical patent/JP6935694B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running

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)
  • Retry When Errors Occur (AREA)
  • Memory System (AREA)
  • Stored Programmes (AREA)

Description

本開示は、書き換え可能なメモリを有する電子制御装置に関する。 The present disclosure relates to an electronic control device having a rewritable memory.

特許文献1には、書き換え可能なメモリである不揮発性メモリを有する電子制御装置が開示されている。 Patent Document 1 discloses an electronic control device having a non-volatile memory which is a rewritable memory.

特開2005−56144号公報Japanese Unexamined Patent Publication No. 2005-56144

書き換えの際、不揮発性メモリでは、ブロック単位で該不揮発性メモリに記憶されているデータが一旦消去され、該データが消去されたブロックに所定のバイト毎に対象データが書き込まれる。ここでいう対象データとは、書き換えの対象となるデータをいう。すなわち、不揮発性メモリの書き換えは、一又は複数のブロックを順次書き換えることにより実現される。特許文献1に記載の電子制御装置は、書き換えの際、不揮発性メモリ内の所定の1つのブロックに、書き換えが終了したブロックを示す情報(以下、履歴情報)を記憶させている。 At the time of rewriting, in the non-volatile memory, the data stored in the non-volatile memory is once erased in block units, and the target data is written to the block in which the data is erased for each predetermined byte. The target data referred to here means data to be rewritten. That is, the rewriting of the non-volatile memory is realized by sequentially rewriting one or a plurality of blocks. At the time of rewriting, the electronic control device described in Patent Document 1 stores information (hereinafter, history information) indicating a block for which rewriting has been completed in a predetermined block in the non-volatile memory.

上記電子制御装置においても、履歴情報が記憶されているブロックのデータが一旦消去された後に、該ブロックに新たな履歴情報が書き込まれることによって、履歴情報が更新される。そのため、例えば、履歴情報が記憶されているブロックのデータが消去されたときに不揮発性メモリへの電力の供給が絶たれた場合などに、履歴情報が失われるおそれがある。 Also in the electronic control device, the history information is updated by writing new history information to the block after the data of the block in which the history information is stored is once deleted. Therefore, for example, when the data of the block in which the history information is stored is erased and the power supply to the non-volatile memory is cut off, the history information may be lost.

本開示の1つの局面は、不揮発性メモリを有する電子制御装置において、電力の供給が途絶えた場合であっても、不揮発性メモリにおけるデータの書き換えの進捗を表す情報を保持する技術を提供する。 One aspect of the present disclosure is to provide an electronic control device having a non-volatile memory, which retains information indicating the progress of data rewriting in the non-volatile memory even when the power supply is interrupted.

本開示の1つの局面は、書き換え可能なメモリである不揮発性メモリ(33)を有する電子制御装置(13)である。不揮発性メモリは、予め定められた大きさの記憶領域を表す複数のブロックを有し、且つ、ブロック単位で、該ブロックが該ブロックに記憶されている全てのデータが消去された状態である消去状態にされた後に該ブロックに書き換えの対象となるデータである対象データが書き込まれることによって、書き換えが行われるように構成されている。電子制御装置は、情報取得部(S55、S60)と、記憶実行部(S85、S95、S100)と、を備える。 One aspect of the present disclosure is an electronic control device (13) having a non-volatile memory (33) which is a rewritable memory. The non-volatile memory has a plurality of blocks representing a storage area of a predetermined size, and the block is a state in which all the data stored in the block is erased in block units. It is configured so that the rewriting is performed by writing the target data, which is the data to be rewritten, to the block after the state is set. The electronic control device includes an information acquisition unit (S55, S60) and a storage execution unit (S85, S95, S100).

情報取得部は、書き換えの進捗の度合いを表す情報である進捗情報、を繰り返し取得するように構成されている。記憶実行部は、進捗情報が取得される毎に、対象データが書き込まれるブロックとは異なる予め定められた複数の管理ブロックのうち少なくとも1つに、進捗情報を記憶させるように構成されている。そして、記憶実行部は、複数の管理ブロックのうち、進捗情報が前回記憶された管理ブロックとは異なる管理ブロックに、進捗情報を記憶させるように構成されている。 The information acquisition unit is configured to repeatedly acquire progress information, which is information indicating the degree of progress of rewriting. The storage execution unit is configured to store the progress information in at least one of a plurality of predetermined management blocks different from the block in which the target data is written each time the progress information is acquired. Then, the storage execution unit is configured to store the progress information in a management block different from the management block in which the progress information was previously stored, among the plurality of management blocks.

このような構成によれば、不揮発性メモリにおける複数の管理ブロックのうち、進捗情報が前回記憶された管理ブロックとは異なる管理ブロックに新たな進捗情報が記憶される。すなわち、仮に進捗情報の書き換えが行われている際に不揮発性メモリへの電力供給が途絶えたとしても、複数の管理ブロックのいずれかには進捗情報が記憶されている。その結果、不揮発性メモリを有する電子制御装置において、電力の供給が途絶えた場合であっても、不揮発性メモリにおけるデータの書き換えの進捗を表す情報を保持することができる。 According to such a configuration, new progress information is stored in a management block different from the management block in which the progress information was previously stored, among the plurality of management blocks in the non-volatile memory. That is, even if the power supply to the non-volatile memory is interrupted while the progress information is being rewritten, the progress information is stored in any one of the plurality of management blocks. As a result, in the electronic control device having the non-volatile memory, even when the power supply is interrupted, the information indicating the progress of data rewriting in the non-volatile memory can be retained.

なお、この欄及び特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。 In addition, the reference numerals in parentheses described in this column and the scope of claims indicate the correspondence with the specific means described in the embodiment described later as one embodiment, and the technical scope of the present disclosure is defined. It is not limited.

車両制御システムの構成を示すブロック図。The block diagram which shows the structure of the vehicle control system. ROMの記憶領域を示す説明図。Explanatory drawing which shows the storage area of ROM. 制御プログラムを書き換えるための複数の書換手順を示す説明図。Explanatory drawing which shows a plurality of rewriting procedures for rewriting a control program. 書換処理に基づいて、複数手順のうちの先頭手順から書き換えが行われる場合の処理の流れを示すシーケンス図。A sequence diagram showing a processing flow when rewriting is performed from the first procedure among a plurality of procedures based on the rewriting processing. 図5における進捗情報の遷移を説明する図。The figure explaining the transition of the progress information in FIG. 書換処理に基づいて、複数手順のうちの途中の手順から書き換えが行われる場合の処理の流れを示すシーケンス図。A sequence diagram showing a processing flow when rewriting is performed from an intermediate procedure among a plurality of procedures based on the rewriting processing. 図6における進捗情報の遷移を説明する図。The figure explaining the transition of the progress information in FIG. ECUが実行する起動処理のフローチャート。The flowchart of the start processing executed by the ECU. ECUが実行する書換処理のフローチャート(1/2)。The flowchart (1/2) of the rewriting process executed by the ECU. ECUが実行する書換処理のフローチャート(2/2)。Flow chart of rewriting process executed by ECU (2/2). 外部装置が実行する外部処理のフローチャート。Flowchart of external processing executed by an external device.

以下、図面を参照しながら、本開示の実施形態を説明する。
[1.構成]
図1に示す車両制御システム1は、例えば乗用車等といった車両に搭載された車載制御システム10が備える電子制御装置(以下、ECU)13において、制御プログラムやデータ等(以下、制御プログラム等)の書き換えを行うシステムである。ECUは、Electronic Control Unitの略である。ここでいう書き換えには、ECU13に予め記憶されている制御プログラム等の書き換えや、ECU13への制御プログラム等の初めての書き込み、が含まれ得る。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[1. composition]
The vehicle control system 1 shown in FIG. 1 is a rewriting of a control program, data, etc. (hereinafter, control program, etc.) in an electronic control device (hereinafter, ECU) 13 included in an in-vehicle control system 10 mounted on a vehicle such as a passenger car. It is a system that performs. ECU is an abbreviation for Electronic Control Unit. The rewriting referred to here may include rewriting the control program or the like stored in advance in the ECU 13 or writing the control program or the like to the ECU 13 for the first time.

車両制御システム1は、車載制御システム10と外部装置20とを備える。外部装置20は、車載制御システム10が搭載された車両の外部の装置であり、センタ21と診断装置22とを備えていてもよい。 The vehicle control system 1 includes an in-vehicle control system 10 and an external device 20. The external device 20 is a device external to the vehicle on which the vehicle-mounted control system 10 is mounted, and may include a center 21 and a diagnostic device 22.

センタ21は、所定の場所に固定されている。センタ21は、図示しないが、通信装置と、CPU、及びRAM、ROM等といったメモリを有するコンピュータと、を備える。メモリには、制御プログラムが記憶されている。センタ21は、車載制御システム10のECU13に記憶されている制御プログラムのアップデートが必要になったときに、ECU13にセンタ21のメモリに記憶されている新しい制御プログラムを送信し、ECU13の制御プログラムを書き換える。 The center 21 is fixed at a predetermined position. Although not shown, the center 21 includes a communication device, a CPU, and a computer having memories such as RAM and ROM. The control program is stored in the memory. When the center 21 needs to update the control program stored in the ECU 13 of the vehicle-mounted control system 10, the center 21 transmits a new control program stored in the memory of the center 21 to the ECU 13 to transmit the control program of the ECU 13. rewrite.

診断装置22は、診断対象となるECU13から該ECU13に関するデータを受信して、車載制御システム10が搭載された車両の診断を行うとともに、診断結果に応じて、ECU13に記憶されているデータを書き換える。診断装置22は、図示しないが、通信装置と、CPU、及びRAM、ROM等といったメモリを有するコンピュータと、を備える。 The diagnostic device 22 receives data related to the ECU 13 from the ECU 13 to be diagnosed, diagnoses the vehicle on which the in-vehicle control system 10 is mounted, and rewrites the data stored in the ECU 13 according to the diagnosis result. .. Although not shown, the diagnostic device 22 includes a communication device, a CPU, and a computer having memories such as RAM and ROM.

なお、診断装置22は、車載制御システム10のECU13に記憶されている制御プログラムのアップデートが必要になったときに、ECU13に診断装置22のメモリに記憶されている新しい制御プログラムを送信し、ECU13の制御プログラムを書き換えるように構成されてもよい。 When the diagnostic device 22 needs to update the control program stored in the ECU 13 of the in-vehicle control system 10, the diagnostic device 22 transmits a new control program stored in the memory of the diagnostic device 22 to the ECU 13 to send the new control program to the ECU 13. It may be configured to rewrite the control program of.

車載制御システム10は、ECU13を備える。車載制御システム10は、車外通信装置(以下、DCM−ECU)11、セントラルゲートウェイ(以下、C−GW)12を備えていても良い。DCM−ECU11、C−GW12、ECU13は、通信線15で接続されており、CAN規格に従って通信を行う。CANは、登録商標である。 The in-vehicle control system 10 includes an ECU 13. The in-vehicle control system 10 may include an external communication device (hereinafter, DCM-ECU) 11 and a central gateway (hereinafter, C-GW) 12. The DCM-ECU 11, C-GW 12, and ECU 13 are connected by a communication line 15 and communicate according to the CAN standard. CAN is a registered trademark.

つまり、ECU13は、DCM−ECU11及びC−GW12と、通信線15によって通信可能に接続されて、車両ネットワークを構成している。なお、図示していないが、ECU13は、車両に搭載される他のECUと通信線15によって通信可能に接続されて、車両ネットワークを構成していてもよい。なお、上述の外部装置20が該車両ネットワーク外の装置に相当する。 That is, the ECU 13 is communicably connected to the DCM-ECU 11 and the C-GW 12 by the communication line 15 to form a vehicle network. Although not shown, the ECU 13 may be connected to another ECU mounted on the vehicle by a communication line 15 so as to form a vehicle network. The above-mentioned external device 20 corresponds to a device outside the vehicle network.

DCM−ECU11は、センタ21との間で、無線通信を行う装置である。
C−GW12は、診断装置22と通信線5によって接続され、診断装置22との間で、CAN規格に従って通信を行う装置である。
The DCM-ECU 11 is a device that performs wireless communication with the center 21.
The C-GW 12 is a device that is connected to the diagnostic device 22 by a communication line 5 and communicates with the diagnostic device 22 in accordance with the CAN standard.

ECU13は、例えば、エンジンやブレーキ等といった、車両に搭載された制御対象の制御を行う電子制御装置である。ECU13は、CPU31と、RAM33、ROM34、等の半導体メモリ(以下、メモリ32)と、を有するマイクロコンピュータを備える。なお、ECU13は、図示しないが、電源装置(以下、電源)を備えており、電源がオンの場合に電力が供給され、電源がオフの場合に電力の供給が停止されるように構成されている。 The ECU 13 is an electronic control device that controls a controlled object mounted on a vehicle, such as an engine and a brake. The ECU 13 includes a microcomputer having a CPU 31 and semiconductor memories (hereinafter, memory 32) such as RAM 33 and ROM 34. Although not shown, the ECU 13 is provided with a power supply device (hereinafter referred to as a power supply), and is configured so that power is supplied when the power is on and power is stopped when the power is off. There is.

CPU31は、演算装置であり、RAM33は、CPU31の演算結果等を一時記憶するための揮発性メモリである。ROM34は、書き換え可能な記憶領域を有する不揮発性メモリである。ここでいう不揮発性メモリには、例えば、フラッシュメモリやEEPROM等が含まれ得る。ROM34には、CPU31により実行される各種プログラムが記憶される。ROM34の構成の詳細については後述する。 The CPU 31 is an arithmetic unit, and the RAM 33 is a volatile memory for temporarily storing the arithmetic results of the CPU 31 and the like. The ROM 34 is a non-volatile memory having a rewritable storage area. The non-volatile memory referred to here may include, for example, a flash memory, an EEPROM, and the like. Various programs executed by the CPU 31 are stored in the ROM 34. The details of the configuration of the ROM 34 will be described later.

ECU13の各種機能は、CPU31がROM34に記憶されたプログラムを実行することにより実現される。ECU13は、後述する書換処理を実行することによって、ROM34に記憶されている制御プログラムの書き換えを実現する。 Various functions of the ECU 13 are realized by the CPU 31 executing a program stored in the ROM 34. The ECU 13 realizes rewriting of the control program stored in the ROM 34 by executing the rewriting process described later.

ROM34は、図2に示すように書き換え不可能な領域(以下、非書換領域)341と書き換え可能な領域(以下、書換領域)342とを有する。ROM34において、予め定められた大きさの領域をブロックという。ブロックは、例えば、数十バイト〜数百バイトであり得る。 As shown in FIG. 2, the ROM 34 has a non-rewritable area (hereinafter, non-rewritable area) 341 and a rewritable area (hereinafter, rewritable area) 342. In the ROM 34, an area having a predetermined size is called a block. The block can be, for example, tens to hundreds of bytes.

ROM34は、CPU31からの指示に従って、ブロック単位でのデータの消去が可能である。また、ROM34は、例えば2バイト、4バイト等といった、一又は複数のバイト単位でのデータの書き込みが可能である。ROM34は、初期状態では、全ブロックに論理値1が書き込まれている。また、ROM34は、ブロック単位で、該ブロックが該ブロックに記憶されている全てのデータが消去された状態である消去状態にされた後に、該ブロックに対象データが書き込まれることによって、書き換えが行われる。ここでいう対象データとは、書き換えの対象となるデータである。なお、消去状態にされたブロックは、ブロック内の全てに論理値1が書き込まれる。 The ROM 34 can erase data in block units according to instructions from the CPU 31. Further, the ROM 34 can write data in units of one or a plurality of bytes, for example, 2 bytes, 4 bytes, and the like. In the initial state of the ROM 34, the logical value 1 is written in all the blocks. Further, the ROM 34 is rewritten in block units by writing the target data to the block after the block is put into the erased state in which all the data stored in the block is erased. Will be. The target data referred to here is data to be rewritten. A logical value of 1 is written to all of the blocks in the erased state.

非書換領域341には、リプロプログラムが記憶されている。リプロプログラムは、CPU31に実行されることによって、書換領域342に記憶されている制御プログラムを書き換えるためのプログラムである。書換処理は、リプロプログラムを実行する際の処理手順を表している。 The repro program is stored in the non-rewriting area 341. The repro program is a program for rewriting the control program stored in the rewrite area 342 by being executed by the CPU 31. The rewriting process represents a processing procedure when executing a repro program.

書換領域342には、制御プログラム、完了フラグ、進捗情報、が記憶されている。制御プログラムは、CPU31に実行されて、ECU13の制御対象を制御するためのプログラムである。 The control program, the completion flag, and the progress information are stored in the rewrite area 342. The control program is a program executed by the CPU 31 to control the control target of the ECU 13.

完了フラグとは、ROM34において、リプロプログラムによる書き換えの対象となる制御プログラムの書き換えが完了したか否かを表すフラグである。完了フラグがオフの場合には、制御プログラムの書き換えが完了していない状態を表し、完了フラグがオンの場合には、制御プログラムの書き換えが完了した状態を表す。完了フラグは、リプロプログラムが実行されることをきっかけとして、初期状態としてのオフに設定される。 The completion flag is a flag indicating whether or not the rewriting of the control program to be rewritten by the repro program is completed in the ROM 34. When the completion flag is off, it means that the rewriting of the control program is not completed, and when the completion flag is on, it means that the rewriting of the control program is completed. The completion flag is set to off as the initial state when the repro program is executed.

進捗情報とは、ROM34における、リプロプログラムによる書き換えの対象となる制御プログラムの、書き換えの進捗の度合い、を表す情報である。進捗情報は、ROM34における複数の管理ブロックに記憶されている。ここでいう管理ブロックとは、ROM34が備える複数のブロックのうち、対象データが書き込まれるブロックとは異なる、予め定められたブロックをいう。 The progress information is information indicating the degree of progress of rewriting of the control program to be rewritten by the repro program in the ROM 34. The progress information is stored in a plurality of management blocks in the ROM 34. The management block referred to here refers to a predetermined block different from the block in which the target data is written among the plurality of blocks included in the ROM 34.

具体的には、ROM34の書換領域342に含まれる第1の情報ブロック101及び第2の情報ブロック102といった、異なる2つのブロックが管理ブロックに相当する。以下では、第1の情報ブロック101に記憶されている進捗情報を第1の情報といい、第2の情報ブロック102に記憶されている進捗情報を第2の情報という。 Specifically, two different blocks, such as the first information block 101 and the second information block 102 included in the rewrite area 342 of the ROM 34, correspond to the management blocks. Hereinafter, the progress information stored in the first information block 101 is referred to as the first information, and the progress information stored in the second information block 102 is referred to as the second information.

ROM34は、図3に示すように、書き換えの対象であるECU13によって予め定められた複数の書換手順(以下、複数手順)が順に実行されることによって、制御プログラムの書き換えが行われるように構成されている。ECU13は、外部装置20としてのセンタ21又は診断装置22との間での通信に基づいて、制御プログラムの書き換えを実行する。複数手順には、認証手順、消去手順、書込手順、ベリファイ手順、完了手順が含まれ得る。 As shown in FIG. 3, the ROM 34 is configured so that the control program is rewritten by sequentially executing a plurality of predetermined rewriting procedures (hereinafter, a plurality of procedures) by the ECU 13 to be rewritten. ing. The ECU 13 rewrites the control program based on the communication with the center 21 as the external device 20 or the diagnostic device 22. The plurality of procedures may include an authentication procedure, an erasure procedure, a writing procedure, a verification procedure, and a completion procedure.

例えば、複数手順のうち実行が終了した手順が特定されれば、該実行が終了した手順によって制御プログラムの書き換えの進捗の度合いを表すことができる。以下でいう終了手順とは、複数手順のうち、ECU13による実行が終了した手順をいう。 For example, if a procedure whose execution has been completed is specified among a plurality of procedures, the degree of progress of rewriting of the control program can be indicated by the procedure whose execution has been completed. The termination procedure referred to below means a procedure in which execution by the ECU 13 is completed among a plurality of procedures.

認証手順では、外部装置20がECU13の正しい通信相手であるか否か、が確認される。例えば、後述する図4におけるA6−A8が認証手順に相当する。
消去手順では、外部装置20からの消去要求に従って、ROM34において、書き換えの対象となる制御プログラムを書き込むブロック(以下、対象ブロック)が消去状態にされる。例えば、図4におけるA9−A12が消去手順に相当する。
In the authentication procedure, it is confirmed whether or not the external device 20 is the correct communication partner of the ECU 13. For example, A6-A8 in FIG. 4, which will be described later, corresponds to the authentication procedure.
In the erasing procedure, in accordance with the erasing request from the external device 20, the block (hereinafter referred to as the target block) for writing the control program to be rewritten is put into the erasing state in the ROM 34. For example, A9-A12 in FIG. 4 corresponds to the erasing procedure.

書込手順では、外部装置20からECU13に書き換えの対象となる制御プログラムが送信され、該制御プログラムがROM34に書き込まれる。書込手順は、書き換えの対象となる制御プログラムを表すデータが複数に分割された分割データ毎に行われても良い。分割データは、1ブロック分の大きさのデータであっても良い。なお、本実施形態では、分割データの書き込みが終了する毎にECU13から外部装置20へACKが送信される。例えば、図4におけるA13−A20が書込手順に相当する。 In the writing procedure, the external device 20 transmits a control program to be rewritten to the ECU 13, and the control program is written to the ROM 34. The writing procedure may be performed for each of the divided data in which the data representing the control program to be rewritten is divided into a plurality of pieces. The divided data may be data having a size of one block. In this embodiment, ACK is transmitted from the ECU 13 to the external device 20 each time the writing of the divided data is completed. For example, A13-A20 in FIG. 4 corresponds to the writing procedure.

ベリファイ手順では、書き換えの対象となる制御プログラムが正常に書きかえられたか否かが検証される。図4におけるA21−A24がベリファイ手順に相当する。
完了処理は、書き換えの対象となる制御プログラムの書き換えが完了したか否かが判断される。例えば、図4におけるA25−A27が完了手順に相当する。
In the verification procedure, it is verified whether or not the control program to be rewritten has been rewritten normally. A21-A24 in FIG. 4 corresponds to the verification procedure.
In the completion process, it is determined whether or not the rewriting of the control program to be rewritten is completed. For example, A25-A27 in FIG. 4 corresponds to the completion procedure.

複数手順のそれぞれは、認証手順、消去手順、書込手順、ベリファイ手順、完了手順の順に実行され、予め定められた識別符号が一又は複数の書換手順に付されている。識別符号は、例えば、それぞれの書換手順を識別可能な記号や数字やこれらの組合せ等で有り得る。 Each of the plurality of procedures is executed in the order of an authentication procedure, an erasure procedure, a writing procedure, a verification procedure, and a completion procedure, and a predetermined identification code is attached to one or more rewriting procedures. The identification code may be, for example, a symbol or a number that can identify each rewriting procedure, a combination thereof, or the like.

本実施形態では、書き換えの対象となる制御プログラムを表すデータは、第1の分割データ及び第2の分割データといった2つの分割データからなる。また、複数手順のうち、消去手順には「1」、第1の分割データを書き込む書込手順(以下、第1の書込手順)には「2」、第2の分割データの書込手順(以下、第2の書込手順)には「3」、ベリファイ手順には「4」、完了手順には「5」といったように、識別符号が付されている。なお、複数手順のうち、このように識別符号が付されている書換手順を、書換通知手順ともいう。 In the present embodiment, the data representing the control program to be rewritten is composed of two divided data such as the first divided data and the second divided data. Further, among the plurality of procedures, "1" is used for the erasing procedure, "2" is used for the writing procedure for writing the first divided data (hereinafter, the first writing procedure), and the writing procedure for the second divided data is performed. (Hereinafter, the second writing procedure) is given an identification code such as "3", the verifying procedure is given an identification code such as "4", and the completion procedure is given an identification code such as "5". Of the plurality of procedures, the rewriting procedure with the identification code in this way is also referred to as a rewriting notification procedure.

[2.処理]
[2−1.最初の書換手順からの書き換えシーケンス]
次に、ECU13が、書換処理に基づいて、外部装置20と間で通信を行うことによって、制御プログラムの書き換えを実行する際の処理の流れを説明する。ここでは、センタ21を外部装置20とする。なお、診断装置22を外部装置20とする場合も、同様の流れで処理が行われる。
[2. process]
[2-1. Rewriting sequence from the first rewriting procedure]
Next, the flow of processing when the ECU 13 executes rewriting of the control program by communicating with the external device 20 based on the rewriting processing will be described. Here, the center 21 is an external device 20. When the diagnostic device 22 is used as the external device 20, the processing is performed in the same flow.

図4は、ECU13において電源がオフされてからオンされた際に、制御プログラムを書き換えるために、上述の複数手順のうちの最初の書換手順から書き換えが行われる場合の処理の流れ、を示している。ECU13は、例えば、外部装置20との通信が途絶した場合等に、電源がオフされるように構成されている。 FIG. 4 shows a processing flow when rewriting is performed from the first rewriting procedure among the above-mentioned plurality of procedures in order to rewrite the control program when the power is turned on after the power is turned off in the ECU 13. There is. The ECU 13 is configured so that the power is turned off when, for example, communication with the external device 20 is interrupted.

はじめに、A1では、ECU13の電源がオンされる。ここでいう電源がオンされる状況には、ECU13において制御プログラムの書き換えが、例えば外部装置20との通信途絶等によって中断された際に、一旦ECU13の電源がオフされた後、再びECU13の電源がオンされる、というような状況が含まれ得る。 First, in A1, the power of the ECU 13 is turned on. In the situation where the power is turned on, when the rewriting of the control program in the ECU 13 is interrupted due to, for example, communication interruption with the external device 20, the power of the ECU 13 is once turned off, and then the power of the ECU 13 is again supplied. Can be included, such as when is turned on.

続いて、A2では、ECU13は、完了フラグを確認する。完了フラグはオフに設定されている。
次に、A3、A4では、ECU13は、完了フラグがオフであるので、ROM34から進捗情報を読み出す。
Subsequently, in A2, the ECU 13 confirms the completion flag. The completion flag is set to off.
Next, in A3 and A4, the ECU 13 reads the progress information from the ROM 34 because the completion flag is off.

続いて、A5では、ECU13は、読み出された進捗情報に従って再開手順を特定し、再開手順を外部装置20へ通知する。再開手順とは、上述の複数手順に含まれる1つの手順であって、書き換えが再開されるときの最初の書換手順である。ここでは、ECU13は、上述の複数手順のうちの最初の書換手順、つまり先頭の手順(以下、先頭手順)である認証手順、を再開手順として特定し、再開手順を表す情報を外部装置20へ送信する。再開手順は、後述する書換処理において、進捗情報に基づいて特定される。 Subsequently, in A5, the ECU 13 identifies the restart procedure according to the read progress information, and notifies the external device 20 of the restart procedure. The resumption procedure is one procedure included in the above-mentioned plurality of procedures, and is the first rewriting procedure when rewriting is restarted. Here, the ECU 13 specifies the first rewriting procedure among the above-mentioned plurality of procedures, that is, the authentication procedure which is the first procedure (hereinafter, the first procedure) as the restart procedure, and transmits the information indicating the restart procedure to the external device 20. Send. The resumption procedure is specified based on the progress information in the rewriting process described later.

次に、A6では、ECU13は、外部装置20から送信されたACKを受信する。ここでいうACKは、外部装置20によって再開手順が受信されたことを表す応答である。
続いて、A7では、ECU13は、外部装置20から送信された認証要求を受信する。認証要求は、外部装置20がECU13に対して外部装置20の認証を要求する通信フレームである。認証要求には、外部装置20を識別するための情報(以下、識別情報)が含まれている。
Next, in A6, the ECU 13 receives the ACK transmitted from the external device 20. The ACK referred to here is a response indicating that the restart procedure has been received by the external device 20.
Subsequently, in A7, the ECU 13 receives the authentication request transmitted from the external device 20. The authentication request is a communication frame in which the external device 20 requests the ECU 13 to authenticate the external device 20. The authentication request includes information for identifying the external device 20 (hereinafter, identification information).

次に、A8では、ECU13は、ECU13のROM34に予め記憶されている外部装置20についての識別情報と認証要求に含まれる識別情報とが一致することを確認する。ECU13は、これらが一致する場合に、外部装置20へACKを送信する。ここでいうACKは、外部装置20の認証が完了したことを表す応答である。 Next, in A8, the ECU 13 confirms that the identification information about the external device 20 stored in advance in the ROM 34 of the ECU 13 and the identification information included in the authentication request match. When these match, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating that the authentication of the external device 20 is completed.

続いて、A9では、ECU13は、外部装置20から送信された消去要求を受信する。消去要求とは、上述の複数手順のうちの再開手順以降の書換手順を実行する際に、書き換えの対象となるデータが記憶されているブロックを消去状態にするための要求をいう。ここでは、先頭手順を再開手順とするので、書き換え対象となる制御プログラムが記憶されている全てのブロックと、第1の情報ブロック101及び第2の情報ブロック102と、が、消去の対象として指定された消去要求を受信する。 Subsequently, in A9, the ECU 13 receives the erasure request transmitted from the external device 20. The erasure request refers to a request for putting a block in which data to be rewritten is stored into an erasure state when executing a rewrite procedure after the restart procedure among the above-mentioned plurality of procedures. Here, since the first procedure is the restart procedure, all the blocks in which the control program to be rewritten is stored and the first information block 101 and the second information block 102 are designated as the targets to be erased. Receive the erase request.

次に、A10では、ECU13は、消去要求に従って、ブロックの消去を実行する。ブロックの消去では、ECU13は、上述のように、指定されたブロック内の全てのビットを論理値1に設定する。 Next, in A10, the ECU 13 erases the block according to the erase request. In erasing the block, the ECU 13 sets all the bits in the designated block to the logical value 1 as described above.

続いて、A11では、ECU13は、進捗情報を更新する。具体的には、ECU13は、第1の情報ブロック101に、消去手順を終了手順として、消去手順を表す識別符号である「1」を進捗情報として書き込む。 Subsequently, in A11, the ECU 13 updates the progress information. Specifically, the ECU 13 writes "1", which is an identification code representing the erasing procedure, as progress information in the first information block 101 with the erasing procedure as the ending procedure.

次に、A12では、ECU13は、外部装置20にACKを送信する。ここでいうACKは、消去要求に従ってブロックの消去が完了したことを表す応答である。
続いて、A13では、ECU13は、外部装置20から送信された第1の分割データを受信する。
Next, in A12, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating that the block has been erased according to the erase request.
Subsequently, in A13, the ECU 13 receives the first partition data transmitted from the external device 20.

次に、A14では、ECU13は、ROM34において、第1の分割データに対応するアドレスへ、受信した第1の分割データを書き込む。
続いて、A15では、ECU13は進捗情報を更新する。具体的には、ECU13は、第2の情報ブロック102に、第1の書込手順を終了手順として、第1の書込手順が完了したことを表す識別符号である「2」を進捗情報として書き込む。
Next, in A14, the ECU 13 writes the received first partition data to the address corresponding to the first partition data in the ROM 34.
Subsequently, in A15, the ECU 13 updates the progress information. Specifically, the ECU 13 uses the first writing procedure as the ending procedure and the identification code "2" indicating that the first writing procedure is completed as progress information in the second information block 102. Write.

次に、A16では、ECU13は、外部装置20にACKを送信する。ここでいうACKは、第1の書込手順が完了したことを表す応答である。
続いて、A17では、ECU13は、外部装置20から送信された第2の分割データを受信する。
Next, in A16, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating that the first writing procedure has been completed.
Subsequently, in A17, the ECU 13 receives the second divided data transmitted from the external device 20.

次に、A18では、ECU13は、ROM34において、第2の分割データに対応するアドレスへ、受信した第2の分割データを書き込む。
続いて、A19では、ECU13は、進捗情報を更新する。具体的には、ECU13は、第1の情報ブロック101を一旦消去状態にし、その後で、第1の情報ブロック101に、第2の書込手順を終了手順として、第2の書込手順が完了したことを表す識別符号である「3」を進捗管理情報として書き込む。
Next, in A18, the ECU 13 writes the received second divided data to the address corresponding to the second divided data in the ROM 34.
Subsequently, in A19, the ECU 13 updates the progress information. Specifically, the ECU 13 temporarily puts the first information block 101 in the erased state, and then completes the second writing procedure in the first information block 101 with the second writing procedure as the ending procedure. Write "3", which is an identification code indicating that the information has been done, as progress management information.

次に、A20では、ECU13は、外部装置20にACKを送信する。ここでいうACKは、第2の書込手順が完了したことを表す応答である。
続いて、A21では、ECU13は、外部装置20から送信されたベリファイ要求を受信する。ここでいうベリファイ要求とは、ECU13に、制御プログラムの書き換えが正常に終了したか否かの検証(以下、ベリファイ)を要求するものである。
Next, in A20, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating that the second writing procedure has been completed.
Subsequently, in A21, the ECU 13 receives the verification request transmitted from the external device 20. The verification request referred to here is a request to the ECU 13 to verify whether or not the rewriting of the control program has been completed normally (hereinafter referred to as verification).

次に、A22は、ECU13は、ベリファイを実行する。ベリファイは、パリティビットや誤り訂正符号等といった、各種手法により実行され得る。
続いて、A23では、ECU13は、ベリファイにより、制御プログラムが正常に書き換えられたことが検証された場合に、進捗情報を更新する。具体的には、ECU13は、第2の情報ブロック102を一旦消去状態にし、その後で、第2の情報ブロック102に、ベリファイ手順を終了手順として、ベリファイ手順が完了したことを表す識別符号である「4」を進捗管理情報として書き込む。
Next, in A22, ECU 13 executes verification. Verification can be performed by various methods such as parity bits and error correction codes.
Subsequently, in A23, the ECU 13 updates the progress information when it is verified by verification that the control program has been normally rewritten. Specifically, the ECU 13 is an identification code indicating that the second information block 102 is temporarily erased, and then the verification procedure is completed in the second information block 102 with the verification procedure as the end procedure. Write "4" as progress management information.

次に、A24では、ECU13は、外部装置20にACKを送信する。ここでいうACKは、ベリファイの完了を表す応答である。
続いて、A25では、ECU13は、外部装置20から送信された完了通知を受信する。完了通知とは、書き換えるべき制御プログラムの全てのデータの送信が完了したことを表す通知である。
Next, in A24, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating the completion of verification.
Subsequently, in A25, the ECU 13 receives the completion notification transmitted from the external device 20. The completion notification is a notification indicating that all the data of the control program to be rewritten has been transmitted.

次に、A26では、ECU13は、進捗情報を更新する。具体的には、ECU13は、第1の情報ブロック101を一旦消去状態にし、その後で、第1の情報ブロック101に、完了手順を終了手順として、完了手順が終了したことを表す識別符号である「5」を進捗管理情報として書き込む。 Next, in A26, the ECU 13 updates the progress information. Specifically, the ECU 13 temporarily puts the first information block 101 in the erased state, and then the first information block 101 is an identification code indicating that the completion procedure is completed with the completion procedure as the end procedure. Write "5" as progress management information.

最後にA25では、ECU13は、外部装置20にACKを送信する。ここでいうACKは、書き換えの対象となる制御プログラムの書き換えが全て完了したこと、を表す応答(以下、最終応答)である。 Finally, in A25, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response (hereinafter, final response) indicating that the rewriting of the control program to be rewritten has been completed.

このようにして、ECU13は、外部装置20と通信を行い、書き換えの対象となる制御プログラムの書き換えを実行する。この際、進捗情報、つまり、第1の情報及び第2の情報は、図5に示すように遷移する。図5では、第2の書込手順が完了する迄の進捗情報の遷移が示されている。 In this way, the ECU 13 communicates with the external device 20 to rewrite the control program to be rewritten. At this time, the progress information, that is, the first information and the second information transitions as shown in FIG. FIG. 5 shows the transition of progress information until the second writing procedure is completed.

すなわち、第1の情報ブロック101と第2の情報ブロック102とに、交互に、書換手順が終了する毎に、進捗情報が書き込まれる。換言すれば、第1の情報ブロック101及び第2の情報ブロック102といった複数の管理ブロックのうち、前回進捗情報が書き込まれた管理ブロックとは異なる管理ブロックに、書換手順が終了する毎に、進捗情報が書き込まれる。 That is, progress information is alternately written in the first information block 101 and the second information block 102 each time the rewriting procedure is completed. In other words, among a plurality of management blocks such as the first information block 101 and the second information block 102, progress is made each time the rewriting procedure is completed in a management block different from the management block in which the progress information was written last time. Information is written.

[2−2.途中の手順からの書き換えシーケンス]
図6は、ECU13において電源がオフされてからオンされた際に、制御プログラムを書き換えるために、上述の複数手順のうちの途中の手順から書き換えが行われる場合の処理の流れ、を示している。つまり、ECU13において制御プログラムの書き換えが実行されている最中に書き換えが中断された際等に、制御プログラムを書き換えるための上述の複数手順のうちの先頭手順以外の手順から書き換えが再開される場合の処理の流れ、を示している。図6では、図4におけるA18を実行中に、ECU13の電源がオフとなった例が示されている。以下でいう電源断とは電源がオフとなった状態をいう。
[2-2. Rewriting sequence from the procedure in the middle]
FIG. 6 shows a processing flow when rewriting is performed from an intermediate procedure among the above-mentioned plurality of procedures in order to rewrite the control program when the power is turned on after the power is turned off in the ECU 13. .. That is, when the rewriting is interrupted while the rewriting of the control program is being executed in the ECU 13, the rewriting is restarted from a procedure other than the first procedure among the above-mentioned plurality of procedures for rewriting the control program. The processing flow of is shown. FIG. 6 shows an example in which the power of the ECU 13 is turned off while the A18 in FIG. 4 is being executed. In the following, power off means a state in which the power is turned off.

ECU13が電源断となり書き換えが中断された後、まず、B1では、ECU13の電源がオンされる。
続いて、B2では、ECU13は、完了フラグを確認する。完了フラグはオフに設定されている。
After the power of the ECU 13 is turned off and the rewriting is interrupted, first, in B1, the power of the ECU 13 is turned on.
Subsequently, in B2, the ECU 13 confirms the completion flag. The completion flag is set to off.

次に、B3、B4では、ECU13は、完了フラグがオフであるので、ROM34から進捗情報を読み出す。
続いて、B5では、ECU13は、読み出された進捗情報に従って再開手順を特定し、再開手順を外部装置20へ通知する。ここでは、後述する図7に示すように、再開時、第1の情報は「FFH」であり、第2の情報は「2」であるので、後述する書換処理に従って、ECU13は、「2」に相当する第1の書込手順を終了手順として特定し、該終了手順の次の手順である第2の書込手順を再開手順として特定する。ECU13は、第2の書込手順を再開手順として、再開手順を表す情報を外部装置20へ送信する。
Next, in B3 and B4, the ECU 13 reads the progress information from the ROM 34 because the completion flag is off.
Subsequently, in B5, the ECU 13 identifies the restart procedure according to the read progress information, and notifies the external device 20 of the restart procedure. Here, as shown in FIG. 7 described later, at the time of restart, the first information is “FFH” and the second information is “2”. Therefore, according to the rewriting process described later, the ECU 13 is set to “2”. The first writing procedure corresponding to is specified as the ending procedure, and the second writing procedure, which is the next procedure of the ending procedure, is specified as the restarting procedure. The ECU 13 uses the second writing procedure as the restarting procedure, and transmits information indicating the restarting procedure to the external device 20.

次に、B6では、外部装置20から送信されたACKを受信する。ここでいうACKは、外部装置20によって再開手順が受信されたことを表す応答であり、外部装置20がECU13に再開手順の実行を要求する処理要求でもある。 Next, the B6 receives the ACK transmitted from the external device 20. The ACK referred to here is a response indicating that the restart procedure has been received by the external device 20, and is also a processing request that the external device 20 requests the ECU 13 to execute the restart procedure.

続いて、B7では、ECU13は、外部装置20から送信された認証要求を受信する。
次に、B8では、ECU13は、外部装置20へACKを送信する。ここでいうACKは、外部装置20の認証が完了したことを表す応答である。
Subsequently, in B7, the ECU 13 receives the authentication request transmitted from the external device 20.
Next, in B8, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating that the authentication of the external device 20 is completed.

続いて、B9では、ECU13は、外部装置20から送信された消去要求を受信する。ここでいう消去要求では、第2の書込手順が再開手順として設定されているので、書き換え対象となる制御プログラムのうち第2の分割データが記憶されている全てのブロックが消去の対象として指定される。 Subsequently, in B9, the ECU 13 receives the erasure request transmitted from the external device 20. In the erase request referred to here, since the second write procedure is set as the restart procedure, all the blocks in which the second divided data is stored among the control programs to be rewritten are designated as the erase targets. Will be done.

次に、B10では、ECU13は、消去要求に従って、ブロックの消去を実行する。
続いて、B11では、ECU13は、外部装置20にACKを送信する。ここでいうACKは、消去要求に従ってブロックの消去が完了したことを表す応答である。
Next, in B10, the ECU 13 erases the block according to the erase request.
Subsequently, in B11, the ECU 13 transmits an ACK to the external device 20. The ACK referred to here is a response indicating that the block has been erased according to the erase request.

そして、ECU13は、B12以降は、図4におけるA17以降と同様の処理を実行する。
ここで、B7−B8では、ECU13と外部装置20との間で、書き換えが再開される際には、認証手順が再度実施されている。堅牢性の高い安全な通信を実現するためである。但し、これに限定されるものではなく、該認証手順は省略されても良い。
Then, the ECU 13 executes the same processing as after A17 in FIG. 4 after B12.
Here, in B7-B8, when the rewriting is restarted between the ECU 13 and the external device 20, the authentication procedure is performed again. This is to realize highly robust and secure communication. However, the present invention is not limited to this, and the authentication procedure may be omitted.

また、直前まで書き込みを実行していたブロックに対して書き込み再開する際は、不揮発性メモリの特性上、該当するブロック内のデータを一旦消去状態とする必要があるため、B9−B11では、該当するブロック内のデータが消去されている。 Further, when resuming writing to a block that has been written until immediately before, it is necessary to temporarily erase the data in the corresponding block due to the characteristics of the non-volatile memory. The data in the block is erased.

このようにして、ECU13は、通信途絶等により電源断となった場合に、書き換えの対象となる制御プログラムの書き換えを実行する。上述のように、複数の管理ブロックである第1の情報ブロック101と第2の情報ブロック102とのうち、前回とは異なる管理ブロックに進捗情報が書き込まれている。つまり、ECU13が電源断となった場合には、第1の情報ブロック101に書き込まれている第1の情報と第2の情報ブロック102に書き込まれている第2の情報とに基づいて、再開すべき書換手順である再開手順を特定することが可能である。 In this way, the ECU 13 rewrites the control program to be rewritten when the power is cut off due to communication interruption or the like. As described above, the progress information is written in a management block different from the previous one among the first information block 101 and the second information block 102, which are a plurality of management blocks. That is, when the power of the ECU 13 is turned off, it is restarted based on the first information written in the first information block 101 and the second information written in the second information block 102. It is possible to identify the resumption procedure, which is the rewriting procedure to be performed.

例えば、第2の書込手順についての進捗情報を第1の情報ブロック101に書き込む際にECU13が電源断となった場合は、図7に示すように、第1の情報ブロック101及び第2の情報ブロック102のうち、第2の情報ブロックに第2の情報として書き込まれている「2」に基づいて、「2」の次の「3」に相当する第2の書込手順が再開手順として特定される。そして、第2の書込手順が再度実行される。なお、再開手順は、後述する書換処理に従って特定される。 For example, if the power of the ECU 13 is turned off when writing the progress information about the second writing procedure to the first information block 101, as shown in FIG. 7, the first information block 101 and the second information block 101 Of the information block 102, based on the "2" written as the second information in the second information block, the second writing procedure corresponding to the "3" following the "2" is the restart procedure. Be identified. Then, the second writing procedure is executed again. The restart procedure is specified according to the rewriting process described later.

[2−3.ECUが実行する処理]
次に、ECU13が実行する処理を図8−図10のフローチャートに基づいて説明する。
[2−3−1.起動処理]
図8に示す起動処理は、ECU13の電源がオフされた後にオンされた際に、実行される。なお、起動処理は、起動プログラムを実行する際の処理手順を表している。起動プログラムは、図示していないが、ROM34の非書換領域341に予め記憶されている。
[2-3. Process executed by ECU]
Next, the process executed by the ECU 13 will be described with reference to the flowcharts of FIGS. 8 to 10.
[2-3-1. Start process]
The start-up process shown in FIG. 8 is executed when the power of the ECU 13 is turned on after being turned off. The startup process represents a processing procedure when the startup program is executed. Although not shown, the boot program is stored in advance in the non-rewrite area 341 of the ROM 34.

はじめに、ECU13は、S5では、完了フラグがオンであるか否かを判断する。つまり、制御プログラムの書き換えが完了しているか否かを判断する。ECU13は、完了フラグがオンである場合に処理をS10へ移行させ、完了フラグがオフである場合に処理をS15へ移行させる。 First, the ECU 13 determines in S5 whether or not the completion flag is on. That is, it is determined whether or not the rewriting of the control program is completed. The ECU 13 shifts the process to S10 when the completion flag is on, and shifts the process to S15 when the completion flag is off.

ECU13は、S10では、適宜、所定の制御プログラムを起動し、本起動処理を終了する。
ECU13は、S15では、リプロプログラムを起動し、本起動処理を終了する。
In S10, the ECU 13 appropriately activates a predetermined control program and ends the main activation process.
In S15, the ECU 13 activates the repro program and ends the main activation process.

[2−3−2.書換処理]
図9−図10に示す書換処理は、ECU13が、起動処理のS15にて、制御プログラムの書き換えが完了していないと判断し、リプロプログラムを実行する際の処理手順を表している。
[2-3-2. Rewriting process]
The rewriting process shown in FIGS. 9 to 10 represents a processing procedure when the ECU 13 determines in S15 of the start-up process that the rewriting of the control program has not been completed and executes the repro program.

ECU13は、S20では、進捗情報を取得する。具体的には、ECU13は、第1の情報ブロック101及び第2の情報ブロック102から、それぞれ、第1の情報、第2の情報を取得する。ここでいう取得とは、ECU13が、第1の情報ブロック101及び第2の情報ブロック102から、それぞれ、進捗情報である第1の情報、第2の情報を読み出すことをいう。 The ECU 13 acquires progress information in S20. Specifically, the ECU 13 acquires the first information and the second information from the first information block 101 and the second information block 102, respectively. The acquisition here means that the ECU 13 reads out the first information and the second information, which are progress information, from the first information block 101 and the second information block 102, respectively.

ECU13は、S25では、第1の情報がFFHであるか否かを判断する。つまり、第1の情報ブロック101が消去状態であるか否かを判断する。ECU13は、第1の情報がFFHである場合に処理をS30へ移行させ、第1の情報がFFHでない場合に処理をS40へ移行させる。 In S25, the ECU 13 determines whether or not the first information is FFH. That is, it is determined whether or not the first information block 101 is in the erased state. The ECU 13 shifts the process to S30 when the first information is FFH, and shifts the process to S40 when the first information is not FFH.

ECU13は、S30では、第2の情報がFFHであるか否かを判断する。つまり、第2の情報ブロック102が消去状態であるか否かを判断する。ECU13は、第2の情報がFFHである場合に処理をS35へ移行させ、第1の情報がFFHでない場合に処理をS55へ移行させる。 In S30, the ECU 13 determines whether or not the second information is FFH. That is, it is determined whether or not the second information block 102 is in the erased state. The ECU 13 shifts the process to S35 when the second information is FFH, and shifts the process to S55 when the first information is not FFH.

ECU13は、S35では、上述の複数手順のうちの先頭手順である認証手順を再開手順として特定する。ECU13は、センタ21に、再開手順を表す情報を送信する。そして、ECU13は、処理をS70へ移行させる。 In S35, the ECU 13 specifies the authentication procedure, which is the first procedure among the above-mentioned plurality of procedures, as the restart procedure. The ECU 13 transmits information indicating the restart procedure to the center 21. Then, the ECU 13 shifts the process to S70.

ECU13は、S40では、第2の情報がFFHであるか否かを判断する。ECU13は、第2の情報がFFHである場合に処理をS60へ移行させ、第1の情報がFFHでない場合に処理をS45へ移行させる。 In S40, the ECU 13 determines whether or not the second information is FFH. The ECU 13 shifts the process to S60 when the second information is FFH, and shifts the process to S45 when the first information is not FFH.

ECU13は、S45では、第1の情報が表す終了手順と、第2の情報が表す終了手順と、に連続性が有るか否かを判断する。つまり、これらが互いに連続する手順であるか否かを判断する。本ステップでは、第1の情報及び第2の情報は、いずれも、FFHではない。以下でいう更新情報とは、このように、消去状態を表していない進捗情報、つまり第1の情報又は第2の情報をいう。 In S45, the ECU 13 determines whether or not there is continuity between the end procedure represented by the first information and the end procedure represented by the second information. That is, it is determined whether or not these are procedures that are continuous with each other. In this step, neither the first information nor the second information is FFH. The update information referred to below refers to progress information that does not represent the erased state, that is, first information or second information.

すなわち、本ステップでは、ECU13は、S20にて取得された進捗情報に複数の更新情報が含まれる場合に、これらの更新情報のそれぞれによって表される複数の終了手順が互いに連続する手順であるか否かを判断している。 That is, in this step, when the progress information acquired in S20 includes a plurality of update information, is the ECU 13 a procedure in which the plurality of end procedures represented by each of the update information are continuous with each other? I'm judging whether or not.

終了手順は、上述のように、例えば「1」、「2」等といったように、数値による識別符号で表されている。ECU13は、第1の情報による終了手順を示す情報と、第2の情報による終了手順を示す情報とに連続性がある場合、処理をS50へ移行させる。また、ECU13は、これらに連続性が無い場合、処理を上述のS35へ移行させる。 As described above, the termination procedure is represented by a numerical identification code such as "1", "2", or the like. When the information indicating the end procedure based on the first information and the information indicating the end procedure based on the second information are continuous, the ECU 13 shifts the process to S50. Further, when there is no continuity between them, the ECU 13 shifts the process to S35 described above.

ECU13は、S50では、第1の情報による終了手順を示す情報と、第2の情報による終了手順を示す情報とに連続性がある場合に、第1の情報による終了手順及び第2の情報による終了手順のうちいずれが上述の複数手順における最後の手順(以下、最終手順)に最も近い手順であるか、を特定する。以下でいう直前手順とは、第1の情報による終了手順及び第2の情報による終了手順のうち、最終手順に最も近い手順をいう。 In S50, when the information indicating the end procedure based on the first information and the information indicating the end procedure based on the second information are continuous, the ECU 13 uses the end procedure according to the first information and the second information. Identify which of the termination procedures is the closest to the final procedure (hereinafter referred to as the final procedure) in the above-mentioned plurality of procedures. The immediately preceding procedure referred to below refers to the procedure closest to the final procedure among the end procedure based on the first information and the end procedure based on the second information.

ここで、ECU13は、第1の情報による終了手順を示す情報としての識別符号が、第2の情報による終了手順を示す情報としての識別符号よりも大きい場合に、第1の情報による終了手順を直前手順として特定し、処理をS60へ移行させる。一方、ECU13は、第1の情報による終了手順を示す情報としての識別符号が、第2の情報による終了手順を示す情報としての識別符号よりも小さい場合に、第2の情報による終了手順を直前手順として特定し、処理をS55へ移行させる。 Here, when the identification code as the information indicating the end procedure by the first information is larger than the identification code as the information indicating the end procedure by the second information, the ECU 13 performs the end procedure by the first information. It is specified as the immediately preceding procedure, and the process is transferred to S60. On the other hand, when the identification code as the information indicating the end procedure by the first information is smaller than the identification code as the information indicating the end procedure by the second information, the ECU 13 immediately before the end procedure by the second information. Specify as a procedure and shift the process to S55.

ECU13は、S55では、第2の情報を取得する。すなわち、第2の情報によって表される終了情報を取得する。そして、ECU13は、処理をS65へ移行させる。
ECU13は、S60では、第1の情報を取得する。すなわち、第1の情報によって表される終了情報を取得する。そして、ECU13は、処理をS65へ移行させる。
The ECU 13 acquires the second information in S55. That is, the end information represented by the second information is acquired. Then, the ECU 13 shifts the process to S65.
The ECU 13 acquires the first information in S60. That is, the end information represented by the first information is acquired. Then, the ECU 13 shifts the process to S65.

ECU13は、S65では、上述の複数手順のうち、S55またはS60にて取得された終了手順の次の手順を再開手順として特定する。ECU13は、センタ21に、再開手順を表す情報を送信する。そして、ECU13は、処理をS70へ移行させる。 In S65, the ECU 13 specifies, among the above-mentioned plurality of procedures, the procedure following the end procedure acquired in S55 or S60 as the restart procedure. The ECU 13 transmits information indicating the restart procedure to the center 21. Then, the ECU 13 shifts the process to S70.

ECU13は、S70では、センタ21から再開手順の実行を要求する処理要求を受信したか否か判断する。ECU13は、処理要求を受信するまで待機し、処理要求を受信すると処理をS75へ移行させる。 In S70, the ECU 13 determines whether or not a processing request requesting execution of the restart procedure has been received from the center 21. The ECU 13 waits until the processing request is received, and when the processing request is received, the processing shifts to S75.

ECU13は、S75では、処理要求に従って、処理要求にて要求された手順を実行する。
ECU13は、S80では、処理要求にて要求された手順が完了したか否かを判断する。ECU13は、処理要求にて要求された手順が完了するまで待機し、処理要求にて要求された手順が完了すると処理をS85へ移行させる。
In S75, the ECU 13 executes the procedure required by the processing request in accordance with the processing request.
In S80, the ECU 13 determines whether or not the procedure requested by the processing request has been completed. The ECU 13 waits until the procedure requested by the processing request is completed, and shifts the processing to S85 when the procedure requested by the processing request is completed.

ECU13は、S85では、新たな進捗情報を取得する。ここでは、ECU13は、処理要求にて要求された書換手順であって完了した書換手順である終了情報を表す情報含む進捗情報を新たな進捗情報として生成する。 The ECU 13 acquires new progress information in S85. Here, the ECU 13 generates progress information including information representing the end information which is the rewriting procedure requested by the processing request and is the completed rewriting procedure as new progress information.

ECU13は、S90では、全ての管理ブロックのそれぞれに記憶されている全ての進捗情報がFFHであるか否か、を判断する。具体的には、ECU13は、第1の情報ブロック101及び第2の情報ブロック102がいずれも消去状態であるか否か、を判断する。 In S90, the ECU 13 determines whether or not all the progress information stored in each of the all management blocks is FFH. Specifically, the ECU 13 determines whether or not both the first information block 101 and the second information block 102 are in the erased state.

ここで、ECU13は、全ての進捗情報がFFHである場合に処理をS95へ移行させる。ECU13は、S95では、第1の情報ブロック101及び第2の情報ブロック102のうち、予め定められた一方を更新する。ここでいう更新するとは、S85にて取得された新たな進捗情報を、1つの管理ブロックに書き込むことをいう。ここでは、ECU13は、第1の情報ブロック101を更新する。すなわち、ECU13は、第1の情報ブロック101にS85にて取得された新たな進捗情報を書き込む。そして、ECU13は、処理をS115へ移行させる。一方、ECU13は、全ての進捗情報がFFHでない場合に処理をS100へ移行させる。 Here, the ECU 13 shifts the process to S95 when all the progress information is FFH. In S95, the ECU 13 updates one of the first information block 101 and the second information block 102, which is predetermined. Updating here means writing the new progress information acquired in S85 in one management block. Here, the ECU 13 updates the first information block 101. That is, the ECU 13 writes the new progress information acquired in S85 in the first information block 101. Then, the ECU 13 shifts the process to S115. On the other hand, the ECU 13 shifts the process to S100 when all the progress information is not FFH.

ECU13は、S100では、全ての進捗情報のなかにFFHが含まれているか否かを判断する。つまり、ECU13は、第1の情報ブロック101及び第2の情報ブロック102のうち、消去状態のブロックがあるか否かを判断する。ここで、ECU13は、第1の情報ブロック101及び第2の情報ブロック102のうち、消去状態のブロックがある場合に、処理をS105へ移行させる。ECU13は、S105では、第1の情報ブロック101及び第2の情報ブロック102のうち、消去状態のブロックを更新する。つまり、消去状態のブロックにS85にて取得された新たな進捗情報を書き込む。そして、処理をS115へ移行させる。 In S100, the ECU 13 determines whether or not FFH is included in all the progress information. That is, the ECU 13 determines whether or not there is a block in the erased state among the first information block 101 and the second information block 102. Here, the ECU 13 shifts the processing to S105 when there is a block in the erased state among the first information block 101 and the second information block 102. In S105, the ECU 13 updates the erased block of the first information block 101 and the second information block 102. That is, the new progress information acquired in S85 is written in the erased block. Then, the process is transferred to S115.

一方、ECU13は、第1の情報ブロック101及び第2の情報ブロック102のうち、消去状態のブロックが無い場合に、処理をS110へ移行させる。つまり、複数の管理ブロックに記憶されている進捗情報のそれぞれが全て更新情報である場合に、処理をS110へ移行させる。 On the other hand, the ECU 13 shifts the process to S110 when there is no block in the erased state among the first information block 101 and the second information block 102. That is, when each of the progress information stored in the plurality of management blocks is the update information, the process is shifted to S110.

ECU13は、S105では、第1の情報が表す終了手順を示す情報、及び第2の情報が表す終了手順を表す情報のうち、上述の複数手順における先頭手順に最も近い手順を特定し、該手順が記憶されている管理ブロックを更新する。そして、ECU13は、処理をS115へ移行させる。 In S105, the ECU 13 identifies the procedure closest to the start procedure in the above-mentioned plurality of procedures among the information indicating the end procedure represented by the first information and the information representing the end procedure represented by the second information, and the procedure. Update the management block where is stored. Then, the ECU 13 shifts the process to S115.

ECU13は、S115では、センタ21から完了通知を受信したか否かを判断する。ここで、ECU13は、完了通知を受信した場合に処理をS115へ移行させる。一方、ECU13は、完了通知を受信していない場合に処理をS70へ移行させ、上述の複数手順において再開手順から後の手順について、S70−S110の処理を繰り返し実行する。つまり、ECU13は、再開手順から最終手順迄、S70−S110を繰り返し実行する。 In S115, the ECU 13 determines whether or not the completion notification has been received from the center 21. Here, when the ECU 13 receives the completion notification, the processing shifts to S115. On the other hand, when the completion notification is not received, the ECU 13 shifts the process to S70, and repeatedly executes the process of S70-S110 from the restart procedure to the subsequent procedure in the above-mentioned plurality of procedures. That is, the ECU 13 repeatedly executes S70-S110 from the restart procedure to the final procedure.

ECU13は、S115では、センタ21から受信した完了通知に対して、センタ21へACKである最終応答を送信し、書換処理を終了する。
[2−4.外部装置が実行する処理]
次に、外部装置20が、外部装置20に記憶されている新しい制御プログラムをECU13に送信し、ECU13の制御プログラムを書き換えるための外部装置処理、を図11のフローチャートに基づいて説明する。外部装置20は、ECU13との間の通信が途絶したことを検出可能に構成されている。図11に示す処理は、例えば、ECU13との間の通信が途絶したことをきっかけとして、開始される。
In S115, the ECU 13 transmits a final response, which is an ACK, to the center 21 in response to the completion notification received from the center 21, and ends the rewriting process.
[2-4. Processing executed by the external device]
Next, the external device 20 transmits a new control program stored in the external device 20 to the ECU 13, and the external device process for rewriting the control program of the ECU 13 will be described with reference to the flowchart of FIG. The external device 20 is configured to be able to detect that the communication with the ECU 13 is interrupted. The process shown in FIG. 11 is started, for example, when communication with the ECU 13 is interrupted.

はじめに、外部装置20は、S210では、ECU13から再開手順を受信したか否かを判断する。外部装置20は、再開手順が受信されていないと判断された場合は、再開手順が受信されたと判断される迄待機する。外部装置20は、再開手順が受信されたと判断された場合に、処理をS220へ移行させる。 First, the external device 20 determines in S210 whether or not the restart procedure has been received from the ECU 13. If it is determined that the restart procedure has not been received, the external device 20 waits until it is determined that the restart procedure has been received. When it is determined that the restart procedure has been received, the external device 20 shifts the process to S220.

外部装置20は、S220では、ECU13へ処理要求を送信する。ここでいう処理要求とは、ECU13から受信した再開手順の実行をECU13に要求するものである。
外部装置20は、S230では、ECU13からACKを受信したか否かを判断する。ここでいうACKは、S230にて送信した処理要求に従う手順がECU13にて実行されたことを表す応答である。外部装置20は、ACKが受信されていないと判断された場合は、ACKが受信されたと判断される迄待機する。外部装置20は、再開手順が受信されたと判断された場合に、処理をS240へ移行させる。
In S220, the external device 20 transmits a processing request to the ECU 13. The processing request referred to here is a request to the ECU 13 to execute the restart procedure received from the ECU 13.
The external device 20 determines in S230 whether or not ACK has been received from the ECU 13. The ACK referred to here is a response indicating that the procedure according to the processing request transmitted in S230 has been executed in the ECU 13. If it is determined that the ACK has not been received, the external device 20 waits until it is determined that the ACK has been received. When it is determined that the restart procedure has been received, the external device 20 shifts the process to S240.

外部装置20は、S240では、上述の複数手順のうち全ての書換手順が完了したか否かを判断する。ここで、外部装置20は、全ての書換手順が完了したと判断された場合に処理をS250へ移行させる。一方、外部装置20は、全ての書換手順が完了していないと判断された場合に、処理をS220へ移行させ、再開手順から最終手順までのそれぞれについて、S220−S240の処理を繰り返し実行する。 In S240, the external device 20 determines whether or not all the rewriting procedures among the above-mentioned plurality of procedures have been completed. Here, the external device 20 shifts the process to S250 when it is determined that all the rewriting procedures have been completed. On the other hand, when it is determined that all the rewriting procedures have not been completed, the external device 20 shifts the processing to S220, and repeatedly executes the processing of S220-S240 for each of the restart procedure to the final procedure.

外部装置20は、S250では、ECU13へ完了通知を送信する。
外部装置20は、S260では、ECU13から最終応答を表すACKを受信したか否かを判断する。外部装置20は、最終応答を表すACKが受信されていないと判断された場合は、該ACKが受信されたと判断される迄待機し、該ACKが受信されたと判断されると、本外部装置処理を終了する。
In S250, the external device 20 transmits a completion notification to the ECU 13.
In S260, the external device 20 determines whether or not ACK indicating the final response has been received from the ECU 13. When it is determined that the ACK representing the final response has not been received, the external device 20 waits until it is determined that the ACK has been received, and when it is determined that the ACK has been received, the external device 20 processes the external device. To finish.

[3.効果]
以上詳述した実施形態によれば、以下の効果を奏する。
(3a)ECU13は、不揮発性メモリであるROM34を有する。ECU13は、S85では、新たな進捗情報を繰り返し取得する。ECU13は、S85、S95、S100では、進捗情報が取得される毎に、例えば第1の情報ブロック101及び第2の情報ブロック102といった複数の管理ブロック、のうちの少なくとも1つに、進捗情報を記憶させる。ここで特にECU13は、複数の管理ブロックのうち、進捗情報が前回記憶された管理ブロックとは異なる管理ブロックに、進捗情報を記憶させる。
[3. effect]
According to the embodiment described in detail above, the following effects are obtained.
(3a) The ECU 13 has a ROM 34 which is a non-volatile memory. In S85, the ECU 13 repeatedly acquires new progress information. In S85, S95, and S100, the ECU 13 sends progress information to at least one of a plurality of management blocks such as the first information block 101 and the second information block 102 each time the progress information is acquired. Remember. Here, in particular, the ECU 13 stores the progress information in a management block different from the management block in which the progress information was previously stored among the plurality of management blocks.

その結果、仮に進捗情報の書き換えが行われている際にECU13が電源断になったとしても、進捗情報は複数の管理ブロックのいずれかに記憶されている。つまり、不揮発性メモリを有するECU13が電源断となった場合であっても、不揮発性メモリにおけるデータの書き換えの進捗を表す進捗情報を保持することができる。 As a result, even if the power of the ECU 13 is turned off while the progress information is being rewritten, the progress information is stored in any of the plurality of management blocks. That is, even when the power of the ECU 13 having the non-volatile memory is turned off, progress information indicating the progress of data rewriting in the non-volatile memory can be retained.

(3b)ECU13は、(3a)に記載の構成において、S85では、書換手順が実行される毎に、進捗情報を取得する。進捗情報には終了手順を表す情報が含まれている。ECU13は、S95、S105、S110では、複数の管理ブロックのうちの1つの管理ブロックであって進捗情報が前回記憶された管理ブロックとは異なる管理ブロックに、取得した進捗情報を記憶させる。 (3b) In the configuration described in (3a), the ECU 13 acquires progress information each time the rewriting procedure is executed in S85. Progress information includes information that represents the end procedure. In S95, S105, and S110, the ECU 13 stores the acquired progress information in a management block that is one of the plurality of management blocks and is different from the management block in which the progress information was previously stored.

ECU13は、S5では、ECU13への電力の供給が停止から開始となった際に、上述の複数手順のうちの全ての書換手順が実行されてROM34の書き換えが完了しているか否かを判断する。ECU13は、書き換えが完了していないと判断された場合に、S20では複数の管理ブロックのそれぞれから進捗情報を取得し、S35、S65では、取得した進捗情報に基づいて再開手順を特定する。 In S5, the ECU 13 determines whether or not all the rewriting procedures among the above-mentioned plurality of procedures are executed and the rewriting of the ROM 34 is completed when the power supply to the ECU 13 is started from the stop. .. When it is determined that the rewriting is not completed, the ECU 13 acquires progress information from each of the plurality of management blocks in S20, and in S35 and S65, specifies the restart procedure based on the acquired progress information.

その結果、進捗情報に含まれる終了手順は上述の複数手順のうちの実行が終了した書換手順を表しているので、終了情報に基づいて、再開手順を特定することが可能となる。また、進捗情報は、複数の管理ブロックのうち進捗情報が前回記憶された管理ブロックとは異なるブロックに記憶されるので、仮に進捗情報が複数の管理ブロックの一方に書き込まれる際に通信途絶等の理由によりECU13が電源断になったとしても、複数の管理ブロックの他方には既に書き込まれた進捗情報が残っている。 As a result, since the end procedure included in the progress information represents the rewrite procedure in which the execution of the above-mentioned plurality of procedures has been completed, it is possible to specify the restart procedure based on the end information. Further, since the progress information is stored in a block different from the previously stored management block among the plurality of management blocks, if the progress information is written to one of the plurality of management blocks, communication interruption or the like may occur. Even if the power of the ECU 13 is turned off for some reason, the progress information already written remains in the other of the plurality of management blocks.

従って、ECU13が電源断になったとしても、進捗情報を保持することができる。また、進捗情報に基づいて特定された再開手順から書き換えを再開することができるので、書き換えに要する時間を短縮することができる。 Therefore, even if the power of the ECU 13 is turned off, the progress information can be retained. Further, since the rewriting can be restarted from the restart procedure specified based on the progress information, the time required for the rewriting can be shortened.

(3c)ECU13は、(3b)に記載の構成において、S35では、S20にて複数の管理ブロックのそれぞれから取得された全ての進捗情報が消去状態を表しているか否かを判断し、全ての進捗情報が消去状態を表している場合に、上述の複数手順のうちの先頭手順を再開手順として特定する。 (3c) In the configuration described in (3b), the ECU 13 determines in S35 whether or not all the progress information acquired from each of the plurality of management blocks in S20 represents the erased state, and all the progress information. When the progress information indicates the erased state, the first procedure among the above-mentioned plurality of procedures is specified as the restart procedure.

その結果、複数の管理ブロックが全て消去状態であったとしても、先頭手順が再開手順として特定されるので、制御プログラムの書き換えを確実に再開することができる。
(3d)ECU13は、(3b)または(3c)に記載の構成において、S65では、S20にて複数の管理ブロックのそれぞれから取得された全ての進捗情報のうち少なくとも1つが、消去状態を表していない更新情報であるか否かを判断し、全ての進捗情報のうち少なくとも1つが更新情報である場合は、更新情報に基づいて再開手順を特定する。
As a result, even if all of the plurality of management blocks are in the erased state, the first procedure is specified as the restart procedure, so that the rewriting of the control program can be reliably restarted.
(3d) In the configuration described in (3b) or (3c), in S65, at least one of all the progress information acquired from each of the plurality of management blocks in S20 represents the erased state. It is determined whether or not there is no update information, and if at least one of all the progress information is the update information, the restart procedure is specified based on the update information.

すなわち、少なくとも1つの更新情報が取得された場合、更新情報に基づいて再開手順を特定することができる。その結果、書き換えに要する時間を短縮することができる。
(3e)ECU13は、(3d)に記載の構成において、S65では、複数の管理ブロックのそれぞれから取得された全ての進捗情報なかに複数の更新情報が含まれる場合、複数の更新情報のそれぞれによって表される複数の終了手順のうち、上述の複数手順における最終手順に最も近い手順である直前手順を特定し、直前手順の次の手順を再開手順として特定する。
That is, when at least one update information is acquired, the restart procedure can be specified based on the update information. As a result, the time required for rewriting can be shortened.
(3e) In the configuration described in (3d), in S65, when the ECU 13 includes a plurality of update information in all the progress information acquired from each of the plurality of management blocks, the ECU 13 depends on each of the plurality of update information. Among the plurality of end procedures represented, the immediately preceding procedure, which is the procedure closest to the final procedure in the above-mentioned plurality of procedures, is specified, and the procedure following the immediately preceding procedure is specified as the restart procedure.

すなわち、複数の更新情報が取得された場合、より最終手順に近い手順から、書き換えを再開することができる。その結果、書き換えに要する時間を短縮することができる。
(3f)ECU13は、(3e)に記載の構成において、S45では、全ての進捗情報のなかに複数の更新情報が含まれる場合、複数の終了手順のそれぞれが互いに連続する手順であるか否かを判断する。
That is, when a plurality of update information is acquired, rewriting can be restarted from a procedure closer to the final procedure. As a result, the time required for rewriting can be shortened.
(3f) In the configuration described in (3e), in S45, when a plurality of update information is included in all the progress information, the ECU 13 determines whether or not each of the plurality of end procedures is a continuous procedure. To judge.

その結果、例えば、複数の管理ブロックのそれぞれに予め定められた順番に進捗情報が記憶されるような場合に、複数の終了手順のそれぞれが互いに連続する手順であると判断されたときには、進捗情報が正常に記憶されている状況であると認識することができる。 As a result, for example, when progress information is stored in each of a plurality of management blocks in a predetermined order, and it is determined that each of the plurality of end procedures is a procedure that is continuous with each other, the progress information. Can be recognized as a normally memorized situation.

(3g)ECU13は、(3f)に記載の構成において、S65では、上述のように、複数の終了手順のそれぞれが互いに連続する手順であると判断された場合に、直前手順を特定し、直前手順の次の手順を再開手順として特定する。 (3g) In the configuration described in (3f), the ECU 13 identifies the immediately preceding procedure and immediately before, when it is determined in S65 that each of the plurality of ending procedures is a continuous procedure, as described above. Identify the next step in the procedure as the restart procedure.

すなわち、進捗情報が正常に記憶されている状況であると認識された場合に、より最終手順に近い手順から、書き換えを再開することができる。その結果、書き換えを開始すべき手順を正確に特定することができる。 That is, when it is recognized that the progress information is normally stored, the rewriting can be restarted from a procedure closer to the final procedure. As a result, the procedure for starting rewriting can be accurately specified.

(3h)ECU13は、(3f)または(3g)に記載の構成において、S65では、上述のように、複数の終了手順のそれぞれが互いに連続する手順でないと判断された場合に、上述の複数手順のうち先頭手順を再開手順として特定する。 (3h) In the configuration described in (3f) or (3g), the ECU 13 has the above-mentioned plurality of procedures when it is determined in S65 that each of the plurality of termination procedures is not a continuous procedure. Of these, the first procedure is specified as the restart procedure.

すなわち、進捗情報が正常に記憶されている状況でないと認識された場合には、先頭手順から書き換えが再開される。その結果、書き換えを確実に実行することができる。
(3i)ECU13は、(3d)から(3h)のいずれか一項に記載の構成において、S35では、複数の管理ブロックのそれぞれから取得された全ての進捗情報に1つの更新情報が含まれる場合に、更新情報によって表される終了手順の次の手順を再開手順として特定する。
That is, when it is recognized that the progress information is not normally stored, the rewriting is restarted from the first procedure. As a result, rewriting can be reliably executed.
(3i) In the configuration described in any one of (3d) to (3h), the ECU 13 has a configuration in which one update information is included in all the progress information acquired from each of the plurality of management blocks in S35. In addition, the next step of the termination procedure represented by the update information is specified as the restart procedure.

すなわち、1つの更新情報が取得された場合、該更新情報に基づいて、再開手順を特定することができる。その結果、書き換えに要する時間を短縮することができる。
(3j)ECU13は、(3b)から(3i)のいずれか一項に記載の構成において、車両に搭載され、車両に搭載される他の電子制御装置としてのDCM−ECU11やC−GW12等と通信線15によって通信可能に接続されて車両ネットワークを構成している。ECU13は、S35、S65では、車両ネットワーク外の装置であってECU13と通信可能な外部装置20に、再開手順を表す情報を送信する。
That is, when one update information is acquired, the restart procedure can be specified based on the update information. As a result, the time required for rewriting can be shortened.
(3j) In the configuration according to any one of (3b) to (3i), the ECU 13 is mounted on a vehicle and is mounted on the vehicle as another electronic control device such as the DCM-ECU 11 or the C-GW 12. It is connected by a communication line 15 so as to be communicable and constitutes a vehicle network. In S35 and S65, the ECU 13 transmits information indicating the restart procedure to the external device 20 which is a device outside the vehicle network and can communicate with the ECU 13.

上述のように、外部装置20は、対象データをECU13に送信するように構成されている。ECU13は、外部装置20から受信した対象データをROM34に書き込むことによって書き換えを実行するように構成されている。本実施形態では、再開手順を外部装置20へ送信するので、外部装置20に、制御プログラムを構成するデータのうち書き換えの再開に必要な対象データを送信させることが可能となる。 As described above, the external device 20 is configured to transmit the target data to the ECU 13. The ECU 13 is configured to execute rewriting by writing the target data received from the external device 20 to the ROM 34. In the present embodiment, since the restart procedure is transmitted to the external device 20, it is possible to cause the external device 20 to transmit the target data necessary for restarting the rewriting among the data constituting the control program.

(3k)ECU13は、(3b)から(3j)のいずれかに記載の構成において、S95では、全ての管理ブロックが消去状態であるか否かを判断し、全ての管理ブロックが消去状態である場合に、予め定められた1つの管理ブロックに進捗情報を記憶させるように構成される。その結果、全ての管理ブロックが消去状態である場合に、進捗情報を記憶させるべき管理ブロックが予め定められているので、進捗情報を確実に記憶させることができる。 (3k) In the configuration described in any one of (3b) to (3j), the ECU 13 determines whether or not all the management blocks are in the erased state in S95, and all the management blocks are in the erased state. In some cases, it is configured to store progress information in one predetermined management block. As a result, when all the management blocks are in the erased state, the management blocks for storing the progress information are predetermined, so that the progress information can be reliably stored.

(3l)ECU13は、(3b)から(3k)のいずれかに記載の構成において、S105では、全ての管理ブロックのうち少なくとも1つの管理ブロックが消去状態であるか否かを判断し、少なくとも1つの管理ブロックが消去状態である場合に、少なくとも1つの管理ブロックのうちの1つに進捗情報を記憶させるように構成される。例えば、上述のように、第1の情報ブロック101及び第2の情報ブロック102のうち一方が消去状態である場合に、該消去状態である第2の情報ブロック102に進捗情報が記憶される。 (3l) In the configuration described in any one of (3b) to (3k), the ECU 13 determines in S105 whether or not at least one management block among all the management blocks is in the erased state, and at least 1 When one management block is in the erased state, at least one of the management blocks is configured to store progress information. For example, as described above, when one of the first information block 101 and the second information block 102 is in the erased state, the progress information is stored in the second information block 102 in the erased state.

すなわち、新たな進捗情報は消去状態でない管理ブロックよりも優先して消去状態である管理ブロックに記憶されるので、過去の進捗情報及び新たな進捗情報をそれぞれ異なる管理ブロックに記憶させることができる。その結果、(3a)と同様の効果を得ることができる。 That is, since the new progress information is stored in the management block that is in the erased state with priority over the management block that is not in the erased state, the past progress information and the new progress information can be stored in different management blocks. As a result, the same effect as in (3a) can be obtained.

(3m)ECU13は、(3b)から(3l)のいずれかに記載の構成において、S110では、全ての管理ブロックが非消去状態であるか否かを判断するように構成される。ECU13は、全ての管理ブロックが非消去状態である場合に、全ての管理ブロックのそれぞれに記憶されている複数の終了手順のうちの1つであって上述の先頭手順に最も近い終了手順が記憶されている管理ブロックに、進捗情報を記憶させるように構成される。 (3m) The ECU 13 is configured to determine whether or not all the management blocks are in the non-erased state in S110 in the configuration described in any of (3b) to (3l). When all the management blocks are in the non-erased state, the ECU 13 stores the end procedure that is one of the plurality of end procedures stored in each of the all management blocks and is closest to the above-mentioned first procedure. It is configured to store progress information in the management block.

例えば、上述のように、第1の情報ブロック101及び第2の情報ブロック102のうち両方が非消去状態である場合に、第1の情報ブロック101及び第2の情報ブロック102のそれぞれに記憶されている複数の終了手順のうち先頭手順に最も近い終了手順が記憶されている管理ブロックに進捗情報が記憶される。その結果、より直近の進捗情報を保持することができる。 For example, as described above, when both the first information block 101 and the second information block 102 are in the non-erased state, they are stored in the first information block 101 and the second information block 102, respectively. Progress information is stored in the management block in which the end procedure closest to the first procedure is stored among the plurality of end procedures. As a result, more recent progress information can be retained.

上記実施形態における車両制御システム1が制御システムに相当し、ECU13が電子制御装置に相当し、ROM34が不揮発性メモリに相当する。また、ECU13が情報取得部、記憶実行部、完了判断部、再開特定部、連続判断部、再開送信部に相当する。また、S85が情報取得部としての処理に相当し、S95、S105、S110が記憶実行部としての処理に相当し、S5が完了判断部としての処理に相当し、S35、S65が再開特定部、再開送信部としての処理に相当し、S45が連続判断部としての処理に相当する。 The vehicle control system 1 in the above embodiment corresponds to the control system, the ECU 13 corresponds to the electronic control device, and the ROM 34 corresponds to the non-volatile memory. Further, the ECU 13 corresponds to an information acquisition unit, a storage execution unit, a completion determination unit, a restart identification unit, a continuous determination unit, and a restart transmission unit. Further, S85 corresponds to the processing as the information acquisition unit, S95, S105, and S110 correspond to the processing as the storage execution unit, S5 corresponds to the processing as the completion determination unit, and S35 and S65 correspond to the restart identification unit. It corresponds to the process as the restart transmission unit, and S45 corresponds to the process as the continuous determination unit.

DCM−ECU11、C−GW12が、車両ネットワークを構成する、他の電子制御装置に相当する。第1の情報ブロック101及び第2の情報ブロックのそれぞれが管理ブロックに相当し、第1の情報及び第2の情報のそれぞれが進捗情報に相当し、複数手順が複数の書換手順に相当する。また、先頭手順が複数の書換手順のうち最初の書換手順に相当し、終了手順が複数の書換手順における最後の書換手順に相当する。 The DCM-ECU 11 and C-GW 12 correspond to other electronic control devices constituting the vehicle network. Each of the first information block 101 and the second information block corresponds to a management block, each of the first information and the second information corresponds to progress information, and a plurality of procedures correspond to a plurality of rewriting procedures. Further, the first procedure corresponds to the first rewriting procedure among the plurality of rewriting procedures, and the ending procedure corresponds to the last rewriting procedure in the plurality of rewriting procedures.

[4.他の実施形態]
以上、本開示の実施形態について説明したが、本開示は上述の実施形態に限定されることなく、種々変形して実施することができる。
[4. Other embodiments]
Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments, and can be implemented in various modifications.

(4a)上記実施形態では、DCM−ECU11、C−GW12、ECU13は、CAN規格に従って通信を行うように構成されていた。但し、これに限定されるものではない。DCM−ECU11、C−GW12、ECU13は、Ethernet規格に従って通信を行うように構成され得る。Ethernetは登録商標である。 (4a) In the above embodiment, the DCM-ECU 11, C-GW 12, and ECU 13 are configured to perform communication according to the CAN standard. However, the present invention is not limited to this. The DCM-ECU 11, C-GW 12, and ECU 13 may be configured to communicate according to Ethernet standards. Ethernet is a registered trademark.

(4b)上記実施形態では、上述の複数手順に、認証手順、消去手順、書込手順としての第1の書込手順及び第2の書込手順、ベリファイ手順、完了手順、が含まれていたが、これらに限定されるものではない。上述の複数手順には、認証手順、消去手順、書込手順、ベリファイ手順、完了手順、のうち一又は複数が含まれ得る。また、書込手順は、書き換えの対象となる制御プログラムを表すデータを分割することなく行われても良い。 (4b) In the above-described embodiment, the above-mentioned plurality of procedures include an authentication procedure, an erasing procedure, a first writing procedure and a second writing procedure as a writing procedure, a verification procedure, and a completion procedure. However, it is not limited to these. The plurality of procedures described above may include one or more of an authentication procedure, an erasure procedure, a writing procedure, a verification procedure, and a completion procedure. Further, the writing procedure may be performed without dividing the data representing the control program to be rewritten.

(4c)上記実施形態では、進捗情報は、第1の情報ブロック101及び第2の情報ブロック102といった、異なる2つの管理ブロックに交互に記憶されていたが、これに限定されるものではない。進捗情報は、第1の情報ブロック101、第2の情報ブロック102、及び図示しない第3の情報ブロックといった、異なる3つの管理ブロックに記憶されてもよい。または、進捗情報は、4つ以上の異なる管理ブロックに記憶されてもよい。いずれの場合であっても、進捗情報が前回書き込まれた管理ブロックとは異なる管理ブロックに書き込まれることによって、上記実施形態と同様の効果が奏される。 (4c) In the above embodiment, the progress information is alternately stored in two different management blocks such as the first information block 101 and the second information block 102, but the present invention is not limited thereto. The progress information may be stored in three different management blocks, such as a first information block 101, a second information block 102, and a third information block (not shown). Alternatively, the progress information may be stored in four or more different management blocks. In any case, the same effect as that of the above-described embodiment is obtained by writing the progress information to a management block different from the previously written management block.

(4d)上記実施形態では、制御プログラムの書き換えを行う例を説明したが、これに限定されるものではない。例えば、ECU13は、ROM34の書換領域342に、診断装置22による車両の診断結果に応じて書き換えられるデータ(以下、診断データ)が記憶されていても良い。そして、ECU13は、上記実施形態と同様に書換処理を実行することによって、ROM34に記憶されている診断データを対象データとして、診断データの書き換えを実現しても良い。 (4d) In the above embodiment, an example of rewriting the control program has been described, but the present invention is not limited to this. For example, the ECU 13 may store data (hereinafter, diagnostic data) that is rewritten according to the diagnosis result of the vehicle by the diagnostic device 22 in the rewrite area 342 of the ROM 34. Then, the ECU 13 may realize rewriting of the diagnostic data using the diagnostic data stored in the ROM 34 as the target data by executing the rewriting process in the same manner as in the above embodiment.

(4e)上記実施形態では、ECU13は、S85にて進捗情報が取得される毎に、複数の管理ブロックのうちの1つに、進捗情報を記憶させていたが、これに限定されるものではない。ECU13は、S85にて進捗情報が取得される毎に、複数の管理ブロックのうちの2つ以上の管理ブロックに、進捗情報を記憶させるように構成されても良い。 (4e) In the above embodiment, the ECU 13 stores the progress information in one of the plurality of management blocks each time the progress information is acquired in S85, but the present invention is not limited to this. No. The ECU 13 may be configured to store the progress information in two or more management blocks among the plurality of management blocks each time the progress information is acquired in S85.

(4f)上記実施形態では、図5、図7にて第2の書込手順の説明で示すように、書換手順の完了時に、進捗情報を更新すべき管理ブロックを消去していた。但し、これに限定されるものではない。例えば、図5、図7にて第2の書込手順の開始直前に進捗情報を更新すべき管理ブロックである第1の情報ブロック101を消去する、といったように、書換手順の開始直前に、進捗情報を更新すべき管理ブロックを消去してもよい。 (4f) In the above embodiment, as shown in the description of the second writing procedure in FIGS. 5 and 7, when the rewriting procedure is completed, the management block whose progress information should be updated is deleted. However, the present invention is not limited to this. For example, in FIGS. 5 and 7, immediately before the start of the rewriting procedure, the first information block 101, which is a management block whose progress information should be updated, is deleted immediately before the start of the second writing procedure. The management block whose progress information should be updated may be deleted.

(4g)上記実施形態では、図6に示すB5にてECU13から再開手順が通知された際、外部装置20は、B6にて、ECU13から受信した再開手順を表す情報をACKとしてECU13へ送信するように構成されていた。但し、これに限定されるものではない。ECU13は、B6にて、再開手順と、外部装置20からACKとして受信した再開手順とが一致しているか否かを判断するように構成されてもよい。ここで、ECU13は、再開手順と、外部装置20からACKとして受信した再開手順とが一致している場合に、B7以降の処理を実行するように構成されてもよい。一方、ECU13は、再開手順と、外部装置20からACKとして受信した再開手順とが不一致である場合に、外部装置20へ否定応答を送信し、外部装置20へ先頭処理から書き換えを実行することを要求するように構成されてもよい。 (4g) In the above embodiment, when the restart procedure is notified from the ECU 13 in B5 shown in FIG. 6, the external device 20 transmits the information indicating the restart procedure received from the ECU 13 to the ECU 13 as ACK in B6. It was configured like this. However, the present invention is not limited to this. The ECU 13 may be configured in B6 to determine whether or not the restart procedure and the restart procedure received as ACK from the external device 20 match. Here, the ECU 13 may be configured to execute the process after B7 when the restart procedure and the restart procedure received as ACK from the external device 20 match. On the other hand, when the restart procedure and the restart procedure received as ACK from the external device 20 do not match, the ECU 13 transmits a negative response to the external device 20 and executes rewriting from the heading process to the external device 20. It may be configured to require.

(4h)上記実施形態は、車両制御システム1として実現されても良い。車両制御システム1は、車両に搭載されて車両ネットワークを構成し、書き換え可能なメモリである不揮発性メモリを有するECU13と、車両ネットワーク外の装置であってECU13と通信可能な外部装置20と、を備えていても良い。ここで、車両制御システム1は、上記(3a)に記載のように構成されたECU13を備えていても良い。また、車両制御システム1が備えるECU13は、更に、上記(3b)−(3m)に記載のように構成されていても良い。 (4h) The above embodiment may be realized as a vehicle control system 1. The vehicle control system 1 comprises an ECU 13 mounted on a vehicle to form a vehicle network and having a non-volatile memory which is a rewritable memory, and an external device 20 which is a device outside the vehicle network and can communicate with the ECU 13. You may have it. Here, the vehicle control system 1 may include an ECU 13 configured as described in (3a) above. Further, the ECU 13 included in the vehicle control system 1 may be further configured as described in (3b)-(3m) above.

(4i)上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。なお、特許請求の範囲に記載した文言から特定される技術思想に含まれるあらゆる態様が本開示の実施形態である。 (4i) A plurality of functions possessed by one component in the above embodiment may be realized by a plurality of components, or one function possessed by one component may be realized by a plurality of components. .. Further, a plurality of functions possessed by the plurality of components may be realized by one component, or one function realized by the plurality of components may be realized by one component. Further, a part of the configuration of the above embodiment may be omitted. In addition, at least a part of the configuration of the above embodiment may be added or replaced with the configuration of the other above embodiment. It should be noted that all aspects included in the technical idea specified from the wording described in the claims are embodiments of the present disclosure.

(4j)上述した車両制御システム1、車載制御システム10、外部装置20、センタ21、診断装置22、ECU13の他、外部装置20、センタ21、ECU13を機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実態的記録媒体、書き換え方法など、種々の形態で本開示を実現することもできる。 (4j) In addition to the vehicle control system 1, the in-vehicle control system 10, the external device 20, the center 21, the diagnostic device 22, and the ECU 13 described above, a program for operating the external device 20, the center 21, and the ECU 13 is recorded. The present disclosure can also be realized in various forms such as a non-transitional actual recording medium such as a semiconductor memory and a rewriting method.

1 車両制御システム、13 ECU、20 外部装置。 1 Vehicle control system, 13 ECU, 20 external device.

Claims (10)

書き換え可能なメモリである不揮発性メモリを有する電子制御装置(13)であって、
前記不揮発性メモリは、予め定められた大きさの記憶領域を表す複数のブロックを有し、且つ、前記ブロック単位で、該ブロックが該ブロックに記憶されている全てのデータが消去された状態である消去状態にされた後に該ブロックに書き換えの対象となるデータである対象データが書き込まれることによって、書き換えが行われるように構成されており、
前記書き換えの進捗の度合いを示す情報である進捗情報を生成して取得するように構成された情報取得部(S85)と、
前記進捗情報が取得される毎に、前記対象データが書き込まれるブロックとは異なる予め定められた複数の管理ブロックのうち前記進捗情報が前回記憶された管理ブロックとは異なる管理ブロックに、前記進捗情報を記憶させるように構成された記憶実行部(S95、S105、S110)と、
を備える電子制御装置。
An electronic control device (13) having a non-volatile memory which is a rewritable memory.
The non-volatile memory has a plurality of blocks representing a storage area having a predetermined size, and in the block unit, all the data stored in the block is erased. It is configured so that rewriting is performed by writing the target data, which is the data to be rewritten, to the block after being put into a certain erased state.
An information acquisition unit (S85) configured to generate and acquire progress information, which is information indicating the degree of progress of the rewriting, and
Each time the progress information is acquired, the progress information is set in a management block different from the management block in which the progress information was previously stored among a plurality of predetermined management blocks different from the block in which the target data is written. Storage execution units (S95, S105, S110) configured to store
Bei obtain an electronic control device.
請求項1に記載の電子制御装置であって、
前記不揮発性メモリは、予め定められた複数の書換手順が順に実行されることによって、前記書き換えが行われるように構成されており、
前記情報取得部は、前記書換手順が実行される毎に、前記進捗情報であって前記複数の書換手順のうち実行が終了した手順である終了手順を表す情報を含む進捗情報を生成して取得し、
前記記憶実行部は、前記複数の管理ブロックのうちの1つであって前記進捗情報が前回記憶された管理ブロックとは異なる管理ブロックに、前記進捗情報を記憶させ、
全ての前記複数の書換手順が実行されて前記書き換えが完了したか否かを判断するように構成された完了判断部(S5)と、
前記書き換えが完了していないと判断された場合に、前記複数の管理ブロックのそれぞれから前記進捗情報を取得し、前記進捗情報に基づいて、前記複数の書換手順に含まれる1つの手順であって前記書き換えを再開するときの最初の書換手順を表す再開手順を特定するように構成された再開特定部(S35、S65)と、
を更に備える電子制御装置。
The electronic control device according to claim 1.
The non-volatile memory is configured so that the rewriting is performed by sequentially executing a plurality of predetermined rewriting procedures.
Each time the rewriting procedure is executed, the information acquisition unit generates and acquires progress information including information indicating a completion procedure which is the progress information and is a procedure whose execution has been completed among the plurality of rewriting procedures. death,
The storage execution unit stores the progress information in a management block that is one of the plurality of management blocks and is different from the management block in which the progress information was previously stored.
A completion determination unit (S5) configured to determine whether or not all the plurality of rewriting procedures have been executed and the rewriting has been completed.
When it is determined that the rewriting is not completed, the progress information is acquired from each of the plurality of management blocks, and based on the progress information, it is one procedure included in the plurality of rewriting procedures. Resumption identification units (S35, S65) configured to specify the resumption procedure representing the first rewriting procedure when resuming the rewriting, and
An electronic control device further equipped with.
請求項2に記載の電子制御装置であって、
前記再開特定部(S35)は、前記複数の管理ブロックのそれぞれから取得された全ての前記進捗情報が前記消去状態を表しているか否かを判断し、前記全ての進捗情報が前記消去状態を表している場合に、前記複数の書換手順のうち最初の書換手順を前記再開手順として特定するように構成された
電子制御装置。
The electronic control device according to claim 2.
The restart specifying unit (S35) determines whether or not all the progress information acquired from each of the plurality of management blocks represents the erased state, and all the progress information represents the erased state. When the electronic control device is configured to specify the first rewriting procedure among the plurality of rewriting procedures as the restarting procedure.
請求項2または請求項3に記載の電子制御装置であって、
前記再開特定部(S65)は、前記複数の管理ブロックのそれぞれから取得された全ての前記進捗情報のうち少なくとも1つが、前記進捗情報であって前記消去状態を表していない更新情報であるか否かを判断し、前記全ての進捗情報のうち少なくとも1つが前記更新情報である場合、前記更新情報に基づいて前記再開手順を特定するように構成された
電子制御装置。
The electronic control device according to claim 2 or 3.
In the restart identification unit (S65), whether or not at least one of all the progress information acquired from each of the plurality of management blocks is the progress information and the update information that does not represent the erased state. An electronic control device configured to identify the restart procedure based on the update information when at least one of all the progress information is the update information.
請求項4に記載の電子制御装置であって、
前記再開特定部(S65)は、前記複数の管理ブロックのそれぞれから取得された全ての前記進捗情報に複数の前記更新情報が含まれる場合、前記複数の更新情報のそれぞ
れによって表される複数の前記終了手順のうちの1つであって前記複数の書換手順における最後の書換手順に最も近い直前手順を特定し、前記直前手順の次の手順を前記再開手順として特定するように構成された
電子制御装置。
The electronic control device according to claim 4.
The resumption identification unit (S65), when containing the plurality of the update information to all of the progress information obtained from each of the plurality of management blocks, the plurality represented by each of the plurality of update information An electron configured to identify the immediately preceding procedure that is one of the termination procedures and is closest to the last rewriting procedure in the plurality of rewriting procedures, and identifies the next procedure of the immediately preceding procedure as the restarting procedure. Control device.
請求項5に記載の電子制御装置であって、
前記再開特定部(S65)は、前記全ての進捗情報に複数の更新情報が含まれる場合、前記複数の終了手順のそれぞれが互いに連続する手順であるか否かを判断するように構成された連続判断部(S45)を備える
電子制御装置。
The electronic control device according to claim 5.
The resumption identification unit (S65), if that contain multiple updates to the all progress information, each of said plurality of termination procedure is configured to determine whether the procedure of mutually sequential An electronic control device including a continuous determination unit (S45).
請求項6に記載の電子制御装置であって、
前記再開特定部(S65)は、前記複数の終了手順のそれぞれが互いに連続する手順であると判断された場合に、前記直前手順を特定し、前記直前手順の次の手順を前記再開手順として特定するように構成された
電子制御装置。
The electronic control device according to claim 6.
When it is determined that each of the plurality of end procedures is a continuous procedure, the restart identification unit (S65) specifies the immediately preceding procedure and specifies the next procedure of the immediately preceding procedure as the restart procedure. An electronic control unit configured to do so.
請求項6または請求項7に記載の電子制御装置であって、
前記再開特定部(S35)は、前記複数の終了手順のそれぞれが互いに連続する手順でないと判断された場合に、前記複数の書換手順のうち最初の書換手順を前記再開手順として特定するように構成された
電子制御装置。
The electronic control device according to claim 6 or 7.
The restart identification unit (S35) is configured to specify the first rewrite procedure among the plurality of rewrite procedures as the restart procedure when it is determined that each of the plurality of end procedures is not a continuous procedure. Electronic control device.
請求項4から請求項8のいずれか一項に記載の電子制御装置であって、
前記再開特定部(S65)は、前記複数の管理ブロックのそれぞれから取得された全ての前記進捗情報に1つの前記更新情報が含まれる場合に、前記更新情報によって表される前記終了手順の次の手順を前記再開手順として特定するように構成された
電子制御装置。
The electronic control device according to any one of claims 4 to 8.
When all the progress information acquired from each of the plurality of management blocks includes one update information, the restart identification unit (S65) is next to the end procedure represented by the update information. An electronic control device configured to identify the procedure as said resumption procedure.
請求項2から請求項9のいずれか一項に記載の電子制御装置であって、
車両に搭載され、前記車両に搭載される他の電子制御装置と通信線によって通信可能に接続されて車両ネットワークを構成しており、
前記車両ネットワーク外の装置であって当該電子制御装置と通信可能な外部装置に、前記再開手順を表す情報を送信するように構成された再開送信部(S35、S65)
を更に備える電子制御装置。
The electronic control device according to any one of claims 2 to 9.
It is mounted on a vehicle and is communicably connected to other electronic control devices mounted on the vehicle by a communication line to form a vehicle network.
A restart transmission unit (S35, S65) configured to transmit information indicating the restart procedure to an external device that is outside the vehicle network and is capable of communicating with the electronic control device.
An electronic control device further equipped with.
JP2017136365A 2017-07-12 2017-07-12 Electronic control device Active JP6935694B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017136365A JP6935694B2 (en) 2017-07-12 2017-07-12 Electronic control device
DE102018210868.4A DE102018210868A1 (en) 2017-07-12 2018-07-02 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017136365A JP6935694B2 (en) 2017-07-12 2017-07-12 Electronic control device

Publications (2)

Publication Number Publication Date
JP2019020837A JP2019020837A (en) 2019-02-07
JP6935694B2 true JP6935694B2 (en) 2021-09-15

Family

ID=64745157

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017136365A Active JP6935694B2 (en) 2017-07-12 2017-07-12 Electronic control device

Country Status (2)

Country Link
JP (1) JP6935694B2 (en)
DE (1) DE102018210868A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112020005173T5 (en) * 2020-01-10 2022-08-04 Hitachi Astemo, Ltd. ELECTRONIC CONTROL UNIT AND ELECTRONIC CONTROL SYSTEM
JP7490518B2 (en) * 2020-09-29 2024-05-27 本田技研工業株式会社 CONTROL SYSTEM, MOBILE BODY, PROGRAM, AND CONTROL METHOD

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004280752A (en) * 2003-03-19 2004-10-07 Sony Corp Data storage device, management information updating method in data storage device, and computer program
JP4266742B2 (en) 2003-08-04 2009-05-20 Necディスプレイソリューションズ株式会社 ELECTRONIC DEVICE WITH FLASH MEMORY, MEMORY DATA MANAGEMENT METHOD, AND PROGRAM
JP4577075B2 (en) * 2005-04-22 2010-11-10 株式会社デンソー Automotive control unit
JP5629927B2 (en) * 2010-11-12 2014-11-26 クラリオン株式会社 Online update method for in-vehicle devices
JP5884663B2 (en) * 2012-07-10 2016-03-15 株式会社デンソー Electronic control device and data rewriting system

Also Published As

Publication number Publication date
DE102018210868A1 (en) 2019-01-17
JP2019020837A (en) 2019-02-07

Similar Documents

Publication Publication Date Title
EP0990989A2 (en) Microcomputer provided with flash memory and method of storing program into flash memory
CN102124447A (en) Control device for vehicle and method for updating data of vehicle control device
CN108279916A (en) Electronic control unit program updating method and device
CN112000358B (en) Upgrading method of charging pile and intelligent charging pile
US7774382B2 (en) Method and apparatus for configuring a control device, and corresponding control device
CN105009096B (en) Data storage device, data storage method, and vehicle-mounted control device
US12423430B2 (en) Firmware update method and apparatus for a MCU of a vehicle
CN107422658A (en) Programing change acquisition methods
US20220405083A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle
KR102705918B1 (en) Ota master, center, system, update method, non-transitory storage medium, and vehicle
CN117130915A (en) Controller flashing method and system
WO2019123747A1 (en) Electronic control device for automobile and control method thereof
JP6935694B2 (en) Electronic control device
JP6447469B2 (en) Rewriting system
EP2778910A1 (en) Systems and methods to extend rom functionality
CN113434163B (en) Online calibration method, system, device and medium suitable for electronic control unit
JP2015210669A (en) Program rewriting method
CN112732309A (en) Updating method and device of Flash memory and electronic equipment
US20170200503A1 (en) Storage apparatus, flash memory control apparatus, and program
JP6708596B2 (en) Electronic control device and control program verification method
US20110082995A1 (en) Information processing apparatus
US20250190337A1 (en) Electronic control device and write control method
CN117289972A (en) Firmware update method for flash bootloader in automotive MCU
CN112905218A (en) Firmware upgrading method, device and equipment
JP6334776B1 (en) Electronic control unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200616

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210511

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210706

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210809

R151 Written notification of patent or utility model registration

Ref document number: 6935694

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