JP6699324B2 - Electronic control device and data rewriting system - Google Patents

Electronic control device and data rewriting system Download PDF

Info

Publication number
JP6699324B2
JP6699324B2 JP2016088054A JP2016088054A JP6699324B2 JP 6699324 B2 JP6699324 B2 JP 6699324B2 JP 2016088054 A JP2016088054 A JP 2016088054A JP 2016088054 A JP2016088054 A JP 2016088054A JP 6699324 B2 JP6699324 B2 JP 6699324B2
Authority
JP
Japan
Prior art keywords
data
rewriting
electronic control
write
control device
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
JP2016088054A
Other languages
Japanese (ja)
Other versions
JP2017199120A (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 JP2016088054A priority Critical patent/JP6699324B2/en
Priority to DE102017206752.7A priority patent/DE102017206752A1/en
Publication of JP2017199120A publication Critical patent/JP2017199120A/en
Application granted granted Critical
Publication of JP6699324B2 publication Critical patent/JP6699324B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

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

Description

本発明は電子制御装置及びデータ書換えシステムに関する。   The present invention relates to an electronic control device and a data rewriting system.

従来より、制御プログラムや制御パラメータ等の書換えデータを書換え領域に保持する不揮発性メモリを内蔵又は外部接続した電子制御装置が供されている。この種の電子制御装置では、不揮発性メモリ内の書換え領域に保持されている書換えデータを書換える手法として、ブロック単位で、既に書込まれている書換えデータを用いて算出した識別情報(即ちハッシュ値)と、これから書込む書換えデータを用いて算出した識別情報とを比較し、旧書換えデータから新書換えデータへの差分の有無を確認する手法が提案されている(例えば特許文献1参照)。   2. Description of the Related Art Conventionally, an electronic control device having a built-in or externally connected non-volatile memory for holding rewriting data such as control programs and control parameters in a rewriting area has been provided. In this type of electronic control device, as a method of rewriting the rewriting data held in the rewriting area in the non-volatile memory, the identification information (that is, the hash) calculated in block units using the rewriting data already written. A method has been proposed in which a value) is compared with identification information calculated using rewrite data to be written, and whether or not there is a difference from the old rewrite data to the new rewrite data is confirmed (see, for example, Patent Document 1).

特開2014−182859号公報JP, 2014-182859, A

しかしながら、上記した手法では、書換えデータを書換える毎にブロック単位で識別情報を算出するので、書換え時間への影響が懸念される。又、書換えシーケンスの中で識別情報を確認するための専用コマンド(即ち確認用途の要求フレームや応答フレーム等)を設ける必要が有るので、専用コマンドの送受信処理や演算処理を行う機能を書換装置に実装する必要が有る。ところが、書換装置のROM容量が比較的少ない構成であると、それらの機能を書換装置に実装するのが困難となる懸念が有る。加えて、書換装置のバージョン管理(即ち専用コマンドに対応するか否かの情報の管理)も煩雑となり、バージョンの選択ミスにより書換えデータの書換えを正常に実施するのが困難となる懸念も有る。   However, in the method described above, the identification information is calculated in block units every time the rewriting data is rewritten, so there is a concern that the rewriting time will be affected. In addition, since it is necessary to provide a dedicated command for confirming the identification information in the rewriting sequence (that is, a request frame or a response frame for confirmation purposes), the rewriting device is provided with a function of transmitting/receiving the dedicated command and performing an arithmetic process. Must be implemented. However, if the ROM capacity of the rewriting device is relatively small, it may be difficult to implement those functions in the rewriting device. In addition, version management of the rewriting device (that is, management of information as to whether or not it corresponds to a dedicated command) becomes complicated, and there is a concern that it will be difficult to properly rewrite rewriting data due to a version selection error.

本発明は、上記した事情に鑑みてなされたものであり、その目的は、書換えデータを書換える際の書換え時間を短縮しつつ、書換えデータの書換えを正常に実施することができる電子制御装置及びデータ書換えシステムを提供することにある。   The present invention has been made in view of the above circumstances, and an object thereof is to provide an electronic control device capable of normally executing rewriting of rewriting data while shortening the rewriting time when rewriting data. To provide a data rewriting system.

請求項1に記載した発明によれば、不揮発性メモリ(7)に保持されている書換えデータを書換える際に、旧書換えデータから新書換えデータへの差分を含むブロック単位のデータと、ソフトウェアを管理するソフト管理情報、旧書換えデータを含む不揮発メモリ内の書換え領域(7a)内の全てのデータを対象としたデータ確認情報、書込みデータの書込みを正常に完了したか否かを示すものであって、前記書込みデータの書込みを正常に完了したときにセットされる値とは異なる値が格納された書込み完了フラグを含むブロック単位のデータとを含む転送データが書換装置(2)から転送されることで、書換え領域に保持されている書換えデータを書換え、前記不揮発性メモリ内の書込み完了フラグには、書込み完了時に、書込みデータの書込みを正常に完了した旨を意味する値が書込まれるようにした。 According to the invention described in claim 1, when rewriting the rewriting data held in the non-volatile memory (7), the block unit data including the difference from the old rewriting data to the new rewriting data and the software are stored. Software management information to be managed, data confirmation information for all data in the rewriting area (7a) in the non-volatile memory including old rewriting data, and shows whether or not writing of write data has been completed normally. Transfer data including a block unit data including a write completion flag in which a value different from the value set when the write of the write data is normally completed is transferred from the rewriting device (2). it is, rewrites the rewriting data held in the rewrite area, the write completion flag of the nonvolatile memory, when the write completion, Ru value that means that it has completed the write of the write data normally written I did it.

書換えデータを書換える際に書換装置から電子制御装置に転送される転送データを、旧書換えデータから新書換えデータへの差分を含むブロック単位のデータと、ソフト管理情報、データ確認情報、書込み完了フラグを含むブロック単位のデータとを含む転送データとすることで、転送されるデータ量を削減することができる。その結果、書換えデータを書換える際の書換え時間を短縮することができる。このとき、従来とは異なり、識別情報を算出することが無いので、書換えシーケンスの中で識別情報を確認するための専用コマンドを設ける必要が無くなり、専用コマンドの送受信処理や演算処理を行う機能を書換装置に実装する必要も無くなる。加えて、書換装置のバージョン管理が煩雑となることも無く、書換えデータの書換えを正常に実施するのが困難となる懸念も無くなる。これにより、書換えデータを書換える際の書換え時間を短縮しつつ、書換えデータの書換えを正常に実施することができる。   The transfer data transferred from the rewriting device to the electronic control device when rewriting the rewriting data is the block unit data including the difference from the old rewriting data to the new rewriting data, the software management information, the data confirmation information, and the write completion flag. It is possible to reduce the amount of data to be transferred by using transfer data including block-based data including As a result, the rewriting time when rewriting the rewriting data can be shortened. At this time, unlike the conventional method, since the identification information is not calculated, it is not necessary to provide a dedicated command for confirming the identification information in the rewriting sequence, and the function of performing transmission/reception processing and arithmetic processing of the dedicated command is provided. It is not necessary to mount it on the rewriting device. In addition, version management of the rewriting device does not become complicated, and there is no concern that it will be difficult to rewrite the rewriting data normally. As a result, the rewrite data can be normally rewritten while shortening the rewrite time when rewriting the rewrite data.

本発明の一実施形態を示す機能ブロック図Functional block diagram showing one embodiment of the present invention 転送データ作成処理を示すフローチャートFlowchart showing transfer data creation processing 旧書換えデータ、新書換えデータ、転送データを示す図Diagram showing old rewrite data, new rewrite data, and transfer data シーケンス図Sequence Diagram 転送データ送信処理を示すフローチャートFlowchart showing transfer data transmission processing 転送データ受信処理を示すフローチャートFlowchart showing transfer data reception processing データ確認を行う対象を示す図(その1)Figure showing the target of data confirmation (Part 1) データ確認を行う対象を示す図(その2)Figure showing the target of data confirmation (Part 2)

以下、本発明を、自動車に搭載される電子制御装置に適用した一実施形態について図面を参照して説明する。データ書換えシステム1は、書換装置2と、電子制御装置3とを有する。電子制御装置3は、装置の動作全般を制御するマイコン4を有する。マイコン4は、外部との通信制御を行う外部通信部5と、RAM6と、ROM7(不揮発性メモリに相当する)とを有する。ROM7には、ソフトウェアが書換え可能な書換え領域7aと、ソフトウェアが一旦書込まれた後では書換え不可となる非書換え領域7bとが設けられている。   Hereinafter, an embodiment in which the present invention is applied to an electronic control device mounted on an automobile will be described with reference to the drawings. The data rewriting system 1 includes a rewriting device 2 and an electronic control device 3. The electronic control device 3 has a microcomputer 4 that controls the overall operation of the device. The microcomputer 4 includes an external communication unit 5 that controls communication with the outside, a RAM 6, and a ROM 7 (corresponding to a nonvolatile memory). The ROM 7 is provided with a rewriting area 7a in which the software can be rewritten and a non-rewriting area 7b in which the software cannot be rewritten once the software has been written.

電子制御装置3は、書換装置2がデータ通信ケーブル8を介して接続されることで、書換装置2から送信される書換えプログラムや書換えデータが外部通信部5に受信可能となる。書換装置2がデータ通信ケーブル8を介して電子制御装置3に接続されている状態では、作業者が書換えプログラム(即ちリプロソフト)の書込み操作を行うと、予めROM7に格納されているファームウェアが起動し、書換えプログラムがROM7の非書換え領域7bに書込まれる。又、作業者が制御プログラムや制御パラメータ等の書換えデータの書換え操作を行うと、非書換え領域7bに書込まれている書換えプログラムが起動し、書換えデータがROM7の書換え領域7aに書込まれる。   When the rewriting device 2 is connected to the electronic control device 3 via the data communication cable 8, the rewriting program and the rewriting data transmitted from the rewriting device 2 can be received by the external communication unit 5. When the rewriting device 2 is connected to the electronic control device 3 via the data communication cable 8, when the worker performs a writing operation of the rewriting program (that is, repro software), the firmware stored in the ROM 7 in advance is activated. Then, the rewriting program is written in the non-rewriting area 7b of the ROM 7. When an operator rewrites rewriting data such as a control program and control parameters, the rewriting program written in the non-rewriting area 7b is activated and the rewriting data is written in the rewriting area 7a of the ROM 7.

次に、上記した構成の作用について図2から図8を参照して説明する。書換装置2は、本発明に関連する処理として、単独で転送データ作成処理を行い、電子制御装置3と連携して転送データ送信処理を行う。電子制御装置3は、本発明に関連する処理として、書換装置2と連携して転送データ受信処理を行う。以下、それぞれの処理について順次説明する。尚、既に書込まれている書換えデータを旧書換えデータと称し、これから書込む書換えデータを新書換えデータと称する。   Next, the operation of the above configuration will be described with reference to FIGS. As a process related to the present invention, the rewriting device 2 independently performs the transfer data creating process, and cooperates with the electronic control device 3 to perform the transfer data transmitting process. The electronic control device 3 performs a transfer data receiving process in cooperation with the rewriting device 2 as a process related to the present invention. Hereinafter, each processing will be sequentially described. The rewrite data that has already been written is referred to as old rewrite data, and the rewrite data to be written from now on is referred to as new rewrite data.

(1)転送データ作成処理
書換装置2は、転送データ作成処理を開始すると、同一のブロック単位毎に旧書換えデータと新書換えデータとの差分の有無を確認する(A1)。書換装置2は、旧書換えデータから新書換えデータへの差分が有るか否かを判定し(A2)、差分が有ると判定すると(A2:YES)、その差分を登録する(A3)。書換装置2は、全てのブロック単位に対して差分の有無を確認したか否かを判定し(S4)、全てのブロック単位に対して差分の有無を確認していない、即ち差分の有無を未確認のブロック単位が有ると判定すると(A4:NO)、ステップA1に戻り、ステップA1以降を繰り返して行い、その差分の有無を未確認のブロック単位について差分の有無を確認する。書換装置2は、全てのブロック単位に対して差分の有無を確認した、即ち差分の有無を未確認のブロック単位が無いと判定すると(A4:YES)、これよりも先に登録した差分を含む転送データを作成し(A5)、転送データ作成処理を終了する。
(1) Transfer Data Creating Process When the transfer data creating process is started, the rewriting device 2 confirms whether there is a difference between the old rewriting data and the new rewriting data for each same block unit (A1). The rewrite device 2 determines whether or not there is a difference from the old rewrite data to the new rewrite data (A2), and when it determines that there is a difference (A2: YES), registers the difference (A3). The rewriting device 2 determines whether or not the presence/absence of differences has been confirmed for all block units (S4), and the presence/absence of differences has not been confirmed for all block units, that is, the presence/absence of differences has not been confirmed. If it is determined that there is a block unit (A4: NO), the process returns to step A1 and steps A1 and subsequent steps are repeated, and the presence or absence of the difference is confirmed with respect to the unconfirmed block unit. When the rewriting device 2 confirms the presence/absence of differences for all the block units, that is, determines that there is no unconfirmed block unit for the presence/absence of differences (A4: YES), the transfer including the differences registered earlier than this is performed. Data is created (A5), and the transfer data creation process ends.

ここで、書換装置2は、図3に示すように、旧書換えデータから新書換えデータへの差分を含むブロック単位のデータと、ソフト管理情報、データ確認情報、書込み完了フラグを含むブロック単位のデータとを含む転送データを作成する。ソフト管理情報はソフトウェアを管理する情報である。データ確認情報は旧書換えデータを含むROM7内の書換え領域7a内の全てのデータを対象とした情報である。書込み完了フラグは書込みデータの書込みを正常に完了したか否かを示すフラグである。即ち、書換装置2は、旧書換えデータから新書換えデータへの差分、ソフト管理情報、データ確認情報、書込み完了フラグを含むそれぞれのブロックを、更新データを有するブロックとして転送データを作成する。   Here, as shown in FIG. 3, the rewriting device 2 includes block unit data including a difference from old rewrite data to new rewrite data, and block unit data including software management information, data confirmation information, and a write completion flag. Create transfer data including and. The software management information is information for managing software. The data confirmation information is information for all the data in the rewriting area 7a in the ROM 7 including the old rewriting data. The write completion flag is a flag indicating whether or not the writing of the write data is normally completed. That is, the rewriting device 2 creates transfer data by using each block including the difference from the old rewriting data to the new rewriting data, the software management information, the data confirmation information, and the write completion flag as the block having the update data.

(2)転送データ送信処理及び転送データ受信処理
書換装置2は、転送データ送信処理を開始すると、消去要求を電子制御装置3に送信し(A11)、電子制御装置3からの応答の受信を待機する(A12)。
(2) Transfer data transmission processing and transfer data reception processing When the transfer data transmission processing is started, the rewriting device 2 transmits an erase request to the electronic control unit 3 (A11) and waits for reception of a response from the electronic control unit 3. Yes (A12).

電子制御装置3は、転送データ受信処理を開始すると、書換装置2からの消去要求の受信を待機し(B1)、書換装置2から消去要求を受信したと判定すると(B1:YES)、書込み完了フラグが格納されているブロックのデータを消去する(B2)。電子制御装置3は、データの消去を完了すると(B3:YES)、肯定応答(ACK)を書換装置2に送信し(B4)、書換装置2からの書込み要求の受信を待機する(B5)。   When the electronic control device 3 starts the transfer data reception process, it waits for the reception of the erase request from the rewriting device 2 (B1), and when it determines that the erase request is received from the rewriting device 2 (B1: YES), the writing is completed. The data of the block storing the flag is erased (B2). When erasing the data is completed (B3: YES), the electronic control unit 3 sends an acknowledgment (ACK) to the rewriting unit 2 (B4) and waits for a write request from the rewriting unit 2 (B5).

書換装置2は、消去要求を電子制御装置3に送信した後に、電子制御装置3から肯定応答を受信したと判定すると(A12:YES)、アドレス及びデータ長を指定する書込み要求を電子制御装置3に送信し(A13)、電子制御装置3からの応答の受信を待機する(A14)。   When the rewriting device 2 determines that it has received an affirmative response from the electronic control device 3 after transmitting the erase request to the electronic control device 3 (A12: YES), the rewriting device 2 issues a write request designating an address and a data length. (A13) and waits for the reception of a response from the electronic control unit 3 (A14).

電子制御装置3は、肯定応答を書換装置2に送信した後に、書換装置2から書込み要求を受信したと判定すると(B5:YES)、アドレス及びデータ長により指定される該当するブロックのデータを消去する(B6)。電子制御装置3は、データの消去を完了すると(B7:YES)、肯定応答を書換装置2に送信し(B8)、書換装置2からの書込みデータの受信を待機する(B9)。   When the electronic control unit 3 determines that the write request is received from the rewriting unit 2 after transmitting the positive response to the rewriting unit 2 (B5: YES), it erases the data of the corresponding block designated by the address and the data length. Yes (B6). When the electronic control device 3 completes the erasing of the data (B7: YES), it sends an affirmative response to the rewriting device 2 (B8) and waits for the reception of the write data from the rewriting device 2 (B9).

書換装置2は、書込み要求を電子制御装置3に送信した後に、電子制御装置3からの定応答を受信したと判定すると(A14:YES)、更新対象のブロック毎の書込みデータを電子制御装置3に送信し(A15)、電子制御装置3からの応答の受信を待機する(A16)。   When the rewriting device 2 determines that the constant response from the electronic control device 3 is received after transmitting the write request to the electronic control device 3 (A14: YES), the rewrite device 2 writes the write data for each block to be updated. (A15), and waits for reception of a response from the electronic control unit 3 (A16).

電子制御装置3は、肯定応答を書換装置2に送信した後に、書換装置2から書込みデータを受信したと判定すると(B9:YES)、書込みデータを書込む(B10)。電子制御装置3は、書込みデータの書込みを完了すると(B11:YES)、肯定応答を書換装置2に送信する(B12)。   When the electronic control device 3 determines that the write data is received from the rewrite device 2 after transmitting the positive response to the rewrite device 2 (B9: YES), it writes the write data (B10). When the writing of the write data is completed (B11: YES), the electronic control unit 3 sends a positive response to the rewriting unit 2 (B12).

書換装置2は、書込みデータを電子制御装置3に送信した後に、電子制御装置3から肯定応答を受信したと判定すると(A16:YES)、全ての書込みデータの送信を完了したか否かを判定する(A17)。書換装置2は、全ての書込みデータの送信を完了していない、即ち未送信の書込みデータが有ると判定すると(A17:NO)、ステップA13に戻り、次のアドレス及びデータ長を指定し、ステップA13以降を繰り返して行う。一方、書換装置2は、全ての書込みデータの送信を完了した、即ち未送信の書込みデータが無いと判定すると(A17:YES)、ベリファイ要求を電子制御装置3に送信し(A18)、電子制御装置3からの応答の受信を待機する(A19)。   When the rewriting device 2 determines that it has received a positive response from the electronic control device 3 after transmitting the write data to the electronic control device 3 (A16: YES), it determines whether or not the transmission of all the write data has been completed. Yes (A17). When the rewriting device 2 determines that transmission of all write data has not been completed, that is, there is untransmitted write data (A17: NO), the process returns to step A13, the next address and data length are designated, and step Repeat after A13. On the other hand, when the rewrite device 2 determines that all the write data has been transmitted, that is, there is no untransmitted write data (A17: YES), it sends a verify request to the electronic control device 3 (A18), and the electronic control is performed. It waits for reception of a response from the device 3 (A19).

電子制御装置3は、書込みデータの書込みを完了したと判定し、肯定応答を書換装置2に送信すると、全ての書込みデータの受信を完了したか否かを判定する(B13)。電子制御装置3は、全ての書込みデータの受信を完了していないと判定すると(B13:NO)、ステップB5に戻り、書換装置2からの書込み要求の受信を待機し、ステップB5以降を繰り返して行う。   When the electronic control device 3 determines that the writing of the write data is completed and transmits an affirmative response to the rewriting device 2, the electronic control device 3 determines whether or not the reception of all the write data is completed (B13). When the electronic control unit 3 determines that the reception of all the write data is not completed (B13: NO), the process returns to step B5, waits for the reception of the write request from the rewriting device 2, and repeats step B5 and subsequent steps. To do.

一方、電子制御装置3は、全ての書込みデータの受信を完了したと判定すると(B13:YES)、書換装置2からのベリファイ要求の受信を待機する(B14)。電子制御装置3は、書換装置2からのベリファイ要求を受信したと判定すると(B14:YES)、ROM7内に格納されている全てのデータを対象としてデータ確認を実施する。即ち、電子制御装置3は、ROM7内に格納されている全てのデータを対象としてCRC値を算出し(B15)、その算出したCRC値を期待値と照合し、その算出したCRC値が期待値と一致するか否かを判定する(B16)。電子制御装置3は、算出したCRC値が期待値と一致すると判定すると(B16:YES)、ROM7内に格納されている全てのデータを対象として認証子を算出し(B17)、その算出した認証子を期待値と照合し、その算出した認証子が期待値と一致するか否かを判定する(B18)。電子制御装置3は、その算出した認証子が期待値と一致すると判定すると(B18:YES)、書込み完了フラグをセットし、即ち書込み完了フラグに書込みデータの書込みを正常完了した旨を意味する値を書込む(B19)。電子制御装置3は、書込み完了フラグのセットを完了すると(B20:YES)、肯定応答を書換装置2に送信し(B21)、書換装置2からのソフト管理情報要求の受信を待機する(B22)。尚、電子制御装置は、算出したCRC値が期待値と一致しないと判定すると(B16:NO)、又は算出した認証子が期待値と一致しないと判定すると(B18:NO)、否定応答(NACK)を書換装置2に送信し(B24)、転送データ受信処理を終了する。   On the other hand, when the electronic control unit 3 determines that the reception of all the write data is completed (B13: YES), it waits for the reception of the verify request from the rewriting unit 2 (B14). When the electronic control unit 3 determines that the verify request from the rewriting unit 2 has been received (B14: YES), the electronic control unit 3 performs data confirmation on all the data stored in the ROM 7. That is, the electronic control unit 3 calculates the CRC value for all the data stored in the ROM 7 (B15), collates the calculated CRC value with the expected value, and the calculated CRC value is the expected value. It is determined whether or not (B16). When the electronic control unit 3 determines that the calculated CRC value matches the expected value (B16: YES), it calculates the authenticator for all the data stored in the ROM 7 (B17), and the calculated authentication is performed. The child is compared with the expected value, and it is determined whether the calculated authenticator matches the expected value (B18). When the electronic control unit 3 determines that the calculated authenticator matches the expected value (B18: YES), it sets the write completion flag, that is, a value indicating that the write data has been normally written to the write completion flag. Is written (B19). When the electronic control device 3 completes the setting of the write completion flag (B20: YES), it sends an affirmative response to the rewriting device 2 (B21) and waits for the reception of the software management information request from the rewriting device 2 (B22). .. The electronic control unit determines that the calculated CRC value does not match the expected value (B16: NO) or determines that the calculated authenticator does not match the expected value (B18: NO), a negative response (NACK). ) Is transmitted to the rewriting device 2 (B24), and the transfer data receiving process ends.

電子制御装置3は、図7に示すように、関連が有る制御プログラムと制御パラメータとをセットで書換える場合には、複数のブロックを対象としてデータ確認を実施する。又、電子制御装置3は、図8に示すように、制御プログラムを書換えずに制御パラメータのみを書換える場合には、複数のブロックとして新ブロックと旧ブロックとを対象として(即ち混在して)データ確認を実施する。新ブロックとは新書換えデータを含むブロックであり、図8では新データを含む制御パラメータが格納されているブロックである。旧ブロックとは旧書換えデータのみで構成されたブロックであり、図8では旧データの制御プログラムが格納されているブロックである。   As shown in FIG. 7, when rewriting a related control program and control parameters as a set, the electronic control unit 3 performs data confirmation on a plurality of blocks. Further, as shown in FIG. 8, when rewriting only the control parameters without rewriting the control program, the electronic control unit 3 targets the new block and the old block as a plurality of blocks (that is, they are mixed). Check the data. The new block is a block including new rewriting data, and in FIG. 8, it is a block in which control parameters including new data are stored. The old block is a block composed only of old rewrite data, and in FIG. 8, it is a block in which a control program of old data is stored.

書換装置2は、ベリファイ要求を電子制御装置3に送信した後に、電子制御装置3から肯定応答を受信したと判定すると(A19:YES)、ソフト管理情報要求を電子制御装置3に送信し(A20)、電子制御装置3からのソフト管理情報の受信を待機する(A21)。   When the rewriting device 2 determines that it has received a positive response from the electronic control device 3 after transmitting the verification request to the electronic control device 3 (A19: YES), it transmits a software management information request to the electronic control device 3 (A20). ), and waits for reception of software management information from the electronic control unit 3 (A21).

電子制御装置3は、肯定応答を書換装置2に送信した後に、書換装置2からソフト管理情報要求を受信したと判定すると(B22:YES)、ソフト管理情報を書換装置2に送信し(B23)、転送データ受信処理を終了する。   When the electronic control device 3 determines that the software management information request has been received from the rewriting device 2 after transmitting the positive response to the rewriting device 2 (B22: YES), it transmits the software management information to the rewriting device 2 (B23). , The transfer data receiving process ends.

書換装置2は、電子制御装置3からのソフト管理情報を受信したと判定すると(A21:YES)、その受信したソフト管理情報を表示し(A22)、転送データ送信処理を終了する。   When the rewriting device 2 determines that the software management information from the electronic control device 3 has been received (A21: YES), it displays the received software management information (A22), and ends the transfer data transmission process.

以上説明したように本実施形態によれば、次に示す効果を得ることができる。
電子制御装置3において、書換えデータを書換える際に書換装置2から転送される転送データを、旧書換えデータから新書換えデータへの差分を含むブロック単位のデータと、ソフト管理情報、データ確認情報、書込み完了フラグを含むブロック単位のデータとを含む転送データとすることで、転送されるデータ量を削減することができる。その結果、書換えデータを書換える際の書換え時間を短縮することができる。このとき、従来とは異なり、識別情報を算出することが無いので、書換えシーケンスの中で識別情報を確認するための専用コマンドを設ける必要が無くなり、専用コマンドの送受信処理や演算処理を行う機能を書換装置2に実装する必要も無くなる。加えて、書換装置2のバージョン管理が煩雑となることも無く、書換えデータの書換えを正常に実施するのが困難となる懸念も無くなる。これにより、書換えデータを書換える際の書換え時間を短縮しつつ、書換えデータの書換えを正常に実施することができる。
As described above, according to this embodiment, the following effects can be obtained.
In the electronic control unit 3, when the rewriting data is rewritten, the transfer data transferred from the rewriting unit 2 includes block unit data including a difference from the old rewriting data to the new rewriting data, software management information, data confirmation information, The amount of data to be transferred can be reduced by using transfer data including block-unit data including a write completion flag. As a result, the rewriting time when rewriting the rewriting data can be shortened. At this time, unlike the conventional method, since the identification information is not calculated, there is no need to provide a dedicated command for confirming the identification information in the rewriting sequence, and the function of performing transmission/reception processing and arithmetic processing of the dedicated command is provided. It is not necessary to mount it on the rewriting device 2. In addition, the version management of the rewriting device 2 is not complicated, and there is no concern that it will be difficult to rewrite the rewriting data normally. As a result, the rewrite data can be normally rewritten while shortening the rewrite time when rewriting the rewrite data.

又、電子制御装置3において、旧書換えデータを含むROM7内の書換え領域7a内の全てのデータを対象としてデータ確認を実施するようにした。書換えたデータのみを対象としてデータ確認を実施するのでなく、書換えたデータに加えて書換えていない旧書換えデータをも対象としてデータ確認を実施することで、ROM7内の書換え領域7aの全体を書換えた場合と同等のレベルでデータを保証することができる。   Further, in the electronic control unit 3, all the data in the rewriting area 7a in the ROM 7 including the old rewriting data is targeted for data confirmation. The entire rewriting area 7a in the ROM 7 was rewritten by not only checking the rewritten data but also checking the rewritten data as well as the unrewritten old rewritten data. Data can be guaranteed at the same level as when.

又、電子制御装置3において、旧書換えデータを含むROM7内の書換え領域7a内の全てのデータを対象としたデータ確認と、ブロック単位のデータを対象としたデータ確認とを実施するようにした。ブロック単位のデータを対象としたデータ確認を実施することで、ブロック単位でもデータを保証することができる。   Further, in the electronic control unit 3, the data confirmation targeting all the data in the rewriting area 7a in the ROM 7 including the old rewriting data and the data confirmation targeting the data in block units are performed. By confirming the data for each block, the data can be guaranteed for each block.

又、電子制御装置3において、関連が有る複数のブロックを対象としてデータ確認を実施することで、関連が有る制御プログラムと制御パラメータとを整合することができる。この場合、新ブロック、即ち新データを含むデータで構成されたブロックと、旧ブロック、即ち旧データのみで構成されたブロックとを対象としてデータ確認を実施することで、新旧に拘らずに関連が有る制御プログラムと制御パラメータとを整合することができる。   Further, in the electronic control unit 3, by performing data confirmation on a plurality of related blocks, it is possible to match the related control programs and control parameters. In this case, by performing the data confirmation on the new block, that is, the block configured by the data including the new data and the old block, that is, the block configured by only the old data, the relation is established regardless of the old and new. It is possible to match existing control programs with control parameters.

又、電子制御装置3において、書換装置2から消去要求を受信すると、書込み完了フラグが格納されているブロックのデータを消去し、書換えデータの書換え後にデータ確認を実施した結果が正常であると判定すると、そのデータを消去したブロックに書込み完了フラグをセットするようにした。書換えデータの書換え中に例えば電源断線等の物理障害が発生してROM7内に新旧の書換えデータが混在する状態で再起動したとしても、制御プログラムが異常に起動するのを回避することができ、意図しない車両制御の実施を未然に回避することができる。即ち、書込み完了フラグが格納されているブロックのデータを消去しないと、書換えデータの書換え中に物理障害が発生してROM7内に新旧の書換えデータが混在する状態で再起動し、制御プログラムが異常に起動する虞が有る。これに対し、書込み完了フラグが格納されているブロックのデータを消去することで、そのような虞を排除することができる。   Further, when the electronic control unit 3 receives the erase request from the rewrite unit 2, the data in the block in which the write completion flag is stored is erased, and the result of performing the data confirmation after rewriting the rewrite data is determined to be normal. Then, the write completion flag is set to the block in which the data is erased. Even if a physical failure such as a power supply disconnection occurs during rewriting of the rewriting data and the ROM 7 is restarted in a state where old and new rewriting data are mixed, it is possible to prevent the control program from starting abnormally. Unintentional vehicle control can be avoided in advance. That is, unless the data in the block in which the write completion flag is stored is erased, a physical failure occurs during rewriting of the rewriting data, the ROM 7 is restarted in a state where old and new rewriting data are mixed, and the control program is abnormal. There is a risk of starting up. On the other hand, by deleting the data of the block in which the write completion flag is stored, such a fear can be eliminated.

本発明は、上記した実施形態で例示したものに限定されることなく、その範囲を逸脱しない範囲で任意に変形又は拡張することができる。
電子制御装置3に内蔵されているROM7内の書換え領域に保持されている書換えデータを書換える構成を例示したが、ROM7と同等の不揮発性メモリが電子制御装置3に外部接続され、その不揮発性メモリ内の書換え領域に保持されている書換えデータを書換える構成に適用しても良い。
The present invention is not limited to what is exemplified in the above-described embodiment, and can be arbitrarily modified or expanded without departing from the scope thereof.
Although the configuration in which the rewriting data held in the rewriting area in the ROM 7 built in the electronic control unit 3 is rewritten has been illustrated, a nonvolatile memory equivalent to the ROM 7 is externally connected to the electronic control unit 3 and its nonvolatile It may be applied to a configuration for rewriting the rewriting data held in the rewriting area in the memory.

書換装置2から電子制御装置3に転送データが直接転送される構成を例示したが、書換装置2から別の電子制御装置を介して電子制御装置3に転送データが転送される構成に適用しても良い。書換装置2と別の電子制御装置とが無線通信機能を有する構成であれば、書換装置2から別の電子制御装置への転送データの転送を無線通信として書換えデータを書換えることができる。   Although the configuration in which the transfer data is directly transferred from the rewriting device 2 to the electronic control device 3 has been illustrated, it is applied to the configuration in which the transfer data is transferred from the rewriting device 2 to the electronic control device 3 via another electronic control device. Is also good. If the rewriting device 2 and another electronic control device have a configuration having a wireless communication function, the rewriting data can be rewritten using wireless transfer as transfer of transfer data from the rewriting device 2 to another electronic control device.

図面中、1はデータ書換えシステム、2は書換装置、3は電子制御装置、7はROM(不揮発性メモリ)、7aは書換え領域である。   In the drawing, 1 is a data rewriting system, 2 is a rewriting device, 3 is an electronic control device, 7 is a ROM (nonvolatile memory), and 7a is a rewriting area.

Claims (9)

書換えデータを保持する不揮発性メモリ(7)を内蔵又は外部接続した電子制御装置(3)において、
前記不揮発性メモリに保持されている書換えデータを書換える際に、旧書換えデータから新書換えデータへの差分を含むブロック単位のデータと、ソフトウェアを管理するソフト管理情報、旧書換えデータを含む前記不揮発メモリ内の書換え領域(7a)内の全てのデータを対象としたデータ確認情報、書込みデータの書込みを正常に完了したか否かを示すものであって、前記書込みデータの書込みを正常に完了したときにセットされる値とは異なる値が格納された書込み完了フラグを含むブロック単位のデータとを含む転送データが書換装置(2)から転送されることで、前記書換え領域に保持されている書換えデータを書換え、前記不揮発性メモリ内の書込み完了フラグには、書込み完了時に、書込みデータの書込みを正常に完了した旨を意味する値が書込まれる電子制御装置。
In an electronic control unit (3) having a non-volatile memory (7) for holding rewriting data built-in or externally connected,
When rewriting the rewriting data held in the non-volatile memory, the non-volatile including the block unit data including the difference from the old rewriting data to the new rewriting data, the software management information for managing the software, and the old rewriting data. The data confirmation information for all the data in the rewriting area (7a) in the memory, which shows whether or not the writing of the write data has been normally completed, and the writing of the write data has been normally completed. The transfer data including the block unit data including the write completion flag in which a value different from the value set at this time is stored is transferred from the rewriting device (2), and thus the rewrite area held in the rewrite area is rewritten. rewriting the data, the write completion flag of the nonvolatile memory, when the write completion, the electronic control unit value that means that it has completed the write of the write data normally Ru written.
請求項1に記載した電子制御装置において、
旧書換えデータを含む前記不揮発メモリ内の前記書換え領域内の全てのデータを対象としてデータ確認を実施する電子制御装置。
The electronic control device according to claim 1,
An electronic control device for performing data confirmation on all data in the rewrite area in the non-volatile memory including old rewrite data.
請求項1又は2に記載した電子制御装置において、
前記データ確認情報がブロック単位に設けられ、旧書換えデータを含む前記不揮発メモリ内の前記書換え領域内の全てのデータを対象としたデータ確認と、ブロック単位のデータを対象としたデータ確認とを実施する電子制御装置。
The electronic control unit according to claim 1 or 2,
The data confirmation information is provided in block units, and data confirmation targeting all data in the rewrite area in the nonvolatile memory including old rewrite data and data confirmation targeting data in block units are performed. Electronic control unit.
請求項3に記載した電子制御装置において、
関連が有る複数のブロックを対象としてデータ確認を実施する電子制御装置。
The electronic control unit according to claim 3 ,
An electronic control device that performs data confirmation on a plurality of related blocks.
請求項4に記載した電子制御装置において、
関連が有る複数のブロックとして新データを含むデータで構成された新ブロックと旧データのみで構成された旧ブロックとを対象としてデータ確認を実施する電子制御装置。
The electronic control unit according to claim 4,
An electronic control device that performs data confirmation on a new block configured by data including new data as a plurality of related blocks and an old block configured only by old data.
請求項から5の何れか一項に記載した電子制御装置において、
前記書換装置から消去要求を受信すると、前記書込み完了フラグが格納されているブロックのデータを消去し、書換えデータの書換え後にデータ確認を実施した結果が正常であると判定すると、そのデータを消去したブロックに格納されている前記書込み完了フラグに書込みデータの書込みを正常完了した旨を意味する値を書込む電子制御装置。
The electronic control device according to any one of claims 3 to 5,
When the erase request is received from the rewriting device, the data in the block in which the write completion flag is stored is erased, and when it is determined that the result of confirming the data after rewriting the rewriting data is normal, the data is erased. An electronic control unit that writes a value indicating that writing of write data is normally completed in the write completion flag stored in a block.
請求項から6の何れか一項に記載した電子制御装置において、
前記書換装置から書込み要求を受信すると、更新データを含むブロックのデータを消去する電子制御装置。

The electronic control device according to any one of claims 3 to 6,
An electronic control device that erases data in a block including update data when a write request is received from the rewrite device.

書換装置(2)と、書換えデータを保持する不揮発性メモリ(7)を内蔵又は外部接続した電子制御装置(3)と、を備えたデータ書換えシステム(1)において、
前記書換装置は、旧書換えデータから新書換えデータへの差分を含むブロック単位のデータと、ソフトウェアを管理するソフト管理情報、旧書換えデータを含む前記不揮発メモリ内の書換え領域(7a)内の全てのデータを対象としたデータ確認情報、書込みデータの書込みを正常に完了したか否かを示すものであって、前記書込みデータの書込みを正常に完了したときにセットされる値とは異なる値が格納された書込み完了フラグを含むブロック単位のデータとを含む転送データを前記電子制御装置に転送し、
前記電子制御装置は、前記転送データが前記書換装置から転送されることで、前記書換え領域に保持されている書換えデータを書換え
前記不揮発性メモリ内の書込み完了フラグには、書込み完了時に、書込みデータの書込みを正常に完了した旨を意味する値が書込まれるデータ書換えシステム。
A data rewriting system (1) comprising a rewriting device (2) and an electronic control device (3) having a non-volatile memory (7) for holding rewriting data built-in or externally connected,
The rewriting device includes block unit data including a difference from old rewriting data to new rewriting data, software management information for managing software, and all rewriting areas (7a) in the non-volatile memory including old rewriting data. Stores the data confirmation information for the data, indicating whether or not the writing of the write data has been completed normally, and a value different from the value set when the writing of the write data is completed normally. Transfer data including block unit data including the written write completion flag, to the electronic control unit,
The electronic control device rewrites the rewrite data held in the rewrite area by the transfer data being transferred from the rewrite device ,
Wherein the write completion flag in the nonvolatile memory, when the write completion, data rewriting system value that means that it has completed the write of the write data normally Ru written.
請求項8に記載したデータ書換えシステムにおいて、
前記書換装置は、前記転送データを別の電子制御装置を介して前記電子制御装置に転送するデータ書換えシステム。
In the data rewriting system according to claim 8,
The rewriting device is a data rewriting system for transferring the transfer data to the electronic control device via another electronic control device.
JP2016088054A 2016-04-26 2016-04-26 Electronic control device and data rewriting system Active JP6699324B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016088054A JP6699324B2 (en) 2016-04-26 2016-04-26 Electronic control device and data rewriting system
DE102017206752.7A DE102017206752A1 (en) 2016-04-26 2017-04-21 ELECTRONIC CONTROL UNIT AND DATA WRITING SYSTEM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016088054A JP6699324B2 (en) 2016-04-26 2016-04-26 Electronic control device and data rewriting system

Publications (2)

Publication Number Publication Date
JP2017199120A JP2017199120A (en) 2017-11-02
JP6699324B2 true JP6699324B2 (en) 2020-05-27

Family

ID=60021199

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016088054A Active JP6699324B2 (en) 2016-04-26 2016-04-26 Electronic control device and data rewriting system

Country Status (2)

Country Link
JP (1) JP6699324B2 (en)
DE (1) DE102017206752A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7266216B2 (en) 2020-01-31 2023-04-28 パナソニックIpマネジメント株式会社 Information processing device and information processing method
US20230252153A1 (en) 2020-06-17 2023-08-10 Hitachi Astemo, Ltd. Electronic control device and updating method for control software

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6030485B2 (en) 2013-03-21 2016-11-24 日立オートモティブシステムズ株式会社 Electronic control unit
JP6308074B2 (en) * 2014-08-27 2018-04-11 株式会社デンソー Microcomputer

Also Published As

Publication number Publication date
DE102017206752A1 (en) 2017-10-26
JP2017199120A (en) 2017-11-02

Similar Documents

Publication Publication Date Title
CN107179909B (en) Software upgrading method and device and computer readable storage medium
US8539472B2 (en) Method and system of updating shared memory
KR100584338B1 (en) Method and system for updating software
US20100058316A1 (en) Updating Firmware with Multiple Processors
JP2015011475A (en) Information processing device, control method thereof, and program
JP6504315B2 (en) Program update system, distribution apparatus and program update method
CN107422658B (en) Program change acquisition method
JP6699324B2 (en) Electronic control device and data rewriting system
JP2006221274A (en) Electronic control device for vehicle and rewriting method of control program
US20190056929A1 (en) Data transmission method and communication system
JP2016170471A (en) Electronic control device
JP2015210669A (en) Program rewrite method
JP6575157B2 (en) Firmware download method and firmware embedded device
JP2016126699A (en) Electronic control unit for vehicle
JP6899719B2 (en) Electronic control device for automobiles
US11169828B2 (en) Electronic control unit and method for verifying control program
TWI663509B (en) System information managing method
JP5543274B2 (en) Electronic control device for automobile and data writing method in electronic control device for automobile
CN115454462A (en) OTA manager, system, method, non-transitory storage medium, and vehicle
JP6334776B1 (en) Electronic control unit
KR20090114974A (en) Program Update Method and Device for Remote Electric Tilt System of Antenna
JP2017091057A (en) Electronic control device and data rewrite system
JP6528700B2 (en) In-vehicle control device and in-vehicle network including in-vehicle control device
JP2007042038A (en) Device and method for controlling terminal equipment
KR20080042502A (en) Electronic control unit for vehicle and method of control program setup thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180704

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190702

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200128

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200221

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200413

R151 Written notification of patent or utility model registration

Ref document number: 6699324

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250