JP2022170949A - Control device and data rewriting method - Google Patents
Control device and data rewriting method Download PDFInfo
- Publication number
- JP2022170949A JP2022170949A JP2021077253A JP2021077253A JP2022170949A JP 2022170949 A JP2022170949 A JP 2022170949A JP 2021077253 A JP2021077253 A JP 2021077253A JP 2021077253 A JP2021077253 A JP 2021077253A JP 2022170949 A JP2022170949 A JP 2022170949A
- Authority
- JP
- Japan
- Prior art keywords
- controller
- data
- ram
- control device
- existing
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000004891 communication Methods 0.000 claims description 24
- 230000008672 reprogramming Effects 0.000 abstract description 27
- 238000012545 processing Methods 0.000 description 26
- 238000012958 reprocessing Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013329 compounding Methods 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、制御装置およびデータ書き換え方法に関する。 The present invention relates to a control device and a data rewriting method.
車両に搭載されるマイコンの不揮発性メモリには、当該マイコン製品本来の機能を発揮させるための製品用ソフトウェア(以下、製品ソフトと記載する)と、製品ソフトを書き換えるためのリプログラミングソフトウェア(以下、リプロソフトと記載する)とが格納されている。製品ソフトの更新(リプログラミング)は、車両外部の書き換え装置とマイコンとを接続して、リプロソフトを実行することにより行われる。 In the non-volatile memory of the microcomputer installed in the vehicle, there are product software (hereinafter referred to as product software) that enables the original functions of the microcomputer product, and reprogramming software (hereinafter referred to as reprogramming software) to rewrite the product software. described as repro software) is stored. Product software is updated (reprogrammed) by connecting a rewriting device outside the vehicle to a microcomputer and executing reprogramming software.
従来、メインマイコンとサブマイコンとを備える電子制御装置(ECU:Electronic Control Unit)が知られている。このような電子制御装置においては、メインマイコンのみが書き換え装置と接続され、メインマイコンを経由してサブマイコンの製品ソフトの更新が行われることがある(例えば特許文献1参照)。 BACKGROUND Conventionally, an electronic control unit (ECU) including a main microcomputer and a sub-microcomputer is known. In such an electronic control device, only the main microcomputer is connected to the rewriting device, and the product software of the sub-microcomputer may be updated via the main microcomputer (see, for example, Patent Document 1).
また、従来、製品ソフトの更新時間を短縮するため、不揮発性メモリに既に格納されている製品ソフト(以下、既存ソフトと記載する)と更新用の製品ソフトとの差分データを書き換え装置からマイコンに送信して、製品ソフトの更新を行う差分リプログラミング(以下、差分リプロと記載する)が知られている。差分リプロでは、マイコンの内部で既存ソフトと差分データとに基づいて書き換えソフトが生成される。そして、不揮発性メモリに格納される既存ソフトを消去してから、生成した書き換えソフトの不揮発性メモリへの書き込みが行われる。 In addition, conventionally, in order to shorten the update time of product software, the difference data between the product software already stored in the non-volatile memory (hereinafter referred to as existing software) and the product software for updating is transferred from the rewriting device to the microcomputer. Differential reprogramming (hereinafter referred to as differential reprogramming) is known for transmitting and updating product software. In differential repro, rewritten software is generated inside the microcomputer based on existing software and differential data. After erasing the existing software stored in the non-volatile memory, the generated rewriting software is written into the non-volatile memory.
ところで、差分リプロでは、既存ソフトと差分データとに基づいて生成される書き換えソフトを、マイコンのRAM(Random Access Memory)に一時的に保管する必要がある。メインマイコンとサブマイコンとを備える電子制御装置では、メインマイコンに比べてサブマイコンのスペックが低く、サブマイコンのRAMの容量が少ないことがある。このような構成では、サブマイコンにおいて、容量不足により書き換えソフトをRAMで一時的に保管することができず、差分リプロを行うことができないといった事態が生じ得る。 By the way, in differential reprocessing, it is necessary to temporarily store rewritten software generated based on existing software and differential data in a RAM (Random Access Memory) of a microcomputer. In an electronic control device having a main microcomputer and a sub-microcomputer, the specifications of the sub-microcomputer may be lower than that of the main microcomputer, and the RAM capacity of the sub-microcomputer may be small. In such a configuration, a situation may occur in which the sub-microcomputer cannot temporarily store the rewritten software in the RAM due to lack of capacity, and cannot perform differential reprocessing.
本発明は、上記の点に鑑み、複数のコントローラを備える制御装置において、少なくとも1つのコントローラのRAM容量を小さく抑えつつ、各コントローラにおいて差分リプロを適切に行うことができる技術を提供することを目的とする。 SUMMARY OF THE INVENTION In view of the above points, it is an object of the present invention to provide a technique in a control device having a plurality of controllers, capable of appropriately performing differential reprocessing in each controller while keeping the RAM capacity of at least one controller small. and
上記目的を達成するために本発明の制御装置は、第1RAMを有する第1コントローラと、前記第1コントローラと通信可能に設けられる第2コントローラと、を備える制御装置であって、前記第2コントローラは、前記第1RAMよりも容量が小さい第2RAMと、電気的にデータの書き換えが可能な不揮発性メモリと、を有し、自装置の外部から前記不揮発性メモリに格納される既存データの書き換えに必要な差分データが前記第1コントローラに送信された場合に、前記既存データと前記差分データとを用いて生成する新データの生成領域に前記第1RAMを使用する構成(第1の構成)となっている。 In order to achieve the above object, the control device of the present invention comprises a first controller having a first RAM, and a second controller communicable with the first controller, wherein the second controller has a second RAM whose capacity is smaller than that of the first RAM, and a non-volatile memory in which data can be electrically rewritten. When necessary difference data is transmitted to the first controller, the first RAM is used as a generation area for new data generated using the existing data and the difference data (first configuration). ing.
上記第1の構成の制御装置において、前記第1コントローラは、前記外部から前記差分データを受信した場合に前記第2コントローラに前記既存データの送信を要求するとともに、生成した前記新データを前記第2コントローラに送信し、前記第2コントローラは、前記不揮発性メモリにおける前記既存データの消去後に前記新データを前記不揮発性メモリに書き込む構成(第2の構成)であることが好ましい。 In the control device having the first configuration, the first controller requests the second controller to transmit the existing data when receiving the difference data from the outside, and transmits the generated new data to the second controller. 2 controller, and the second controller writes the new data into the nonvolatile memory after erasing the existing data in the nonvolatile memory (second configuration).
上記第1又は第2の構成の制御装置において、前記第1RAMを用いた前記新データの生成処理と、前記不揮発性メモリにおける前記既存データの消去処理とが並行して行われる構成(第3の構成)であることが好ましい。 In the control device having the first or second configuration, the processing for generating the new data using the first RAM and the processing for erasing the existing data in the nonvolatile memory are performed in parallel (third configuration).
上記第1から第3のいずれかの構成の制御装置において、前記第1コントローラと前記第2コントローラとの間の通信速度は、前記外部と前記第1コントローラとの間の通信速度に比べて高速である構成(第4の構成)であることが好ましい。 In the control device having any one of the first to third configurations, the communication speed between the first controller and the second controller is higher than the communication speed between the outside and the first controller. (fourth configuration).
また、上記目的を達成するために本発明のデータ書き換え方法は、第1RAMを有する第1コントローラと、前記第1RAMより容量の小さい第2RAMを有する第2コントローラとを備える制御装置において、前記第2コントローラの不揮発メモリに格納される既存データを書き換える方法であって、前記第1コントローラが前記既存データの書き換えに必要な差分データを外部から受信するステップと、前記第2コントローラから前記第1コントローラに前記既存データが送信されるステップと、前記第1RAMを生成領域として前記既存データと前記差分データとを基に新データが生成されるステップと、前記第1コントローラから前記第2コントローラへ送信された前記新データが、前記不揮発性メモリにおける前記既存データの消去後に前記不揮発性メモリに書き込まれるステップと、を備える構成(第5の構成)になっている。 In order to achieve the above object, a data rewriting method of the present invention provides a control device comprising a first controller having a first RAM and a second controller having a second RAM having a capacity smaller than that of the first RAM, wherein the second A method for rewriting existing data stored in a non-volatile memory of a controller, comprising the step of receiving, from the outside, differential data necessary for rewriting the existing data by the first controller; a step of transmitting the existing data; a step of generating new data based on the existing data and the difference data using the first RAM as a generation area; writing the new data into the non-volatile memory after erasing the existing data in the non-volatile memory (fifth configuration).
本発明によれば、複数のコントローラを備える制御装置において、少なくとも1つのコントローラのRAM容量を小さく抑えつつ、各コントローラにおいて差分リプロを適切に行うことができる。 According to the present invention, in a control device having a plurality of controllers, it is possible to appropriately perform differential reprocessing in each controller while keeping the RAM capacity of at least one controller small.
以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。なお、本明細書では、プログラムの書き換えのことをリプログラミングと表現することがある。また、リプログラミングのことをリプロと省略することがある。 Exemplary embodiments of the invention are described in detail below with reference to the drawings. In this specification, rewriting of a program may be expressed as reprogramming. Also, reprogramming is sometimes abbreviated as repro.
<1.データ書き換えシステム>
図1は、本発明の実施形態に係るデータ書き換えシステム100の構成を示すブロック図である。図1に示すように、データ書き換えシステム100は、制御装置1と書き換え装置2とを備える。
<1. Data rewrite system>
FIG. 1 is a block diagram showing the configuration of a
本実施形態では、制御装置1は、車両に搭載される電子制御装置(ECU)である。ただし、制御装置1は、車両に搭載される電子制御装置以外の制御装置であってもよい。例えば、制御装置1は、船舶や航空機等の車両以外の移動体に搭載される電子制御装置であってもよい。書き換え装置2は、制御装置1の外部に設けられる。書き換え装置2は、例えばパーソナルコンピュータによって構成され、制御装置1が有するプログラムの書き換えを行うリプログラミングツールとしての機能を備える。
In this embodiment, the
制御装置1と書き換え装置2とは、通信可能に接続される。本実施形態では、制御装置1と書き換え装置2との通信には、CAN(Controller Area Network)通信が利用される。書き換え装置2は、例えば、車両の工場やディーラ等で制御装置1が有するプログラムを書き換える際に使用される。すなわち、書き換え装置2は、制御装置1と常時接続されているわけではなく、リプログラミングが必要な場合に制御装置1に接続される。
The
なお、書き換え装置2により書き換えが行われるプログラムは、例えば、制御装置1が各種の制御を実行するために使用する制御プログラムである。当該制御プログラムは、上述の製品ソフトに該当する。また、書き換え装置2を利用したプログラム(製品ソフト)の更新時において、プログラムは、コンピュータで処理する情報と定義されるデータの一種に含まれる。
The program rewritten by the
<2.制御装置>
(2-1.構成)
図1に示すように、制御装置1は、第1コントローラ11と第2コントローラ12とを備える。本実施形態では、第1コントローラ11および第2コントローラ12は、いずれもマイコン(マイクロコントローラ)である。詳細には、第1コントローラ11はメインマイコンであり、第2コントローラ12はサブマイコンである。メインマイコンは、サブマイコンよりもスペックが高い。
<2. Control device>
(2-1. Configuration)
As shown in FIG. 1 , the
第1コントローラ11は、第1演算処理部111と、第1RAM112と、第1不揮発性メモリ113とを有する。これらの構成要素は、第1コントローラ11内において、不図示のバスを介して適宜接続されている。本実施形態では、第1演算処理部111は、CPU(Central Processing Unit)により構成される。第1RAM112は、詳細を後述する差分リプロを行うために必要となる容量よりも大きな容量を有する。すなわち、第1コントローラ11は、差分リプロを実行可能である。
The
第1不揮発性メモリ113は、電気的にデータの書き換えが可能なメモリである。本実施形態では、第1不揮発性メモリ113は、フラッシュメモリにより構成される。詳細には、第1不揮発性メモリ113は、NAND型フラッシュメモリにより構成される。第1不揮発性メモリ113には、第1コントローラ11用の製品ソフト113aおよびリプロソフト113bが格納されている。
The first
第1コントローラ11においては、第1演算処理部111が、第1RAM112を作業領域として利用しつつ、第1不揮発性メモリ113に予め記憶された制御プログラム(製品ソフト113a)にしたがった演算処理を実行することにより、各種の機能が実現される。第1コントローラ11は、制御装置1に書き換え装置2が接続されている場合、CANを利用して書き換え装置2と通信を行うことができる。
In the
第2コントローラ12は、第2演算処理部121と、第2RAM122と、第2不揮発性メモリ123とを有する。これらの構成要素は、第2コントローラ12内において、不図示のバスを介して適宜接続されている。本実施形態では、第2演算処理部121は、CPU(Central Processing Unit)により構成される。第2RAM122は、第1RAM112よりも容量が小さい。詳細には、第2RAM122の容量は、第2コントローラ12が単独で差分リプロを行うために必要な容量よりも小さい。すなわち、第2コントローラ12は、単独で差分リプロを実行することができない。
The
第2不揮発性メモリ123は、電気的にデータの書き換えが可能なメモリである。すなわち、第2コントローラ12は、電気的にデータの書き換え可能な不揮発性メモリ123を有する。本実施形態では、第2不揮発性メモリ123は、フラッシュメモリにより構成される。詳細には、第2不揮発性メモリ123は、NAND型フラッシュメモリにより構成される。第2不揮発性メモリ123には、第2コントローラ12用の製品ソフト123aおよびリプロソフト123bが格納されている。
The second
第2コントローラ12においては、第2演算処理部121が、第2RAM122を作業領域として利用しつつ、第2不揮発性メモリ123に予め記憶された制御プログラム(製品ソフト123a)にしたがった演算処理を実行することにより、各種の機能が実現される。
In the
第2コントローラ12は、第1コントローラ11と通信可能に設けられる。詳細には、第1演算処理部111と第2演算処理部121とが通信可能に設けられる。第1演算処理部111と第2演算処理部121との間の通信(CPU間通信)は、例えばシリアル通信である。シリアル通信は、例えばSPI(Serial Peripheral Interface)通信であってよい。
The
本実施形態では、第1コントローラ11と第2コントローラ12との間の通信速度は、書き換え装置2(外部)と第1コントローラ11との間の通信速度に比べて高速である。第1コントローラ11と第2コントローラ12との間の通信速度は、書き換え装置2(外部)と第1コントローラ11との間の通信速度の2倍以上であることが好ましい。第1コントローラ11と第2コントローラ12との間の通信(SPI通信)の速度は、例えば2Mbpsである。書き換え装置2と第1コントローラ11との間の通信(CAN通信)の速度は、例えば500kbpsである。
In this embodiment, the communication speed between the
なお、本実施形態では、第2コントローラ12は、制御装置1に書き換え装置2が接続されている場合、書き換え装置2とCAN通信を行うことができる第1コントローラ11を介して書き換え装置2と通信を行う。換言すると、書き換え装置2は、第1コントローラ11とだけCAN通信を行い、第2コントローラ12とはCAN通信は行わない。
In this embodiment, when the
(2-2.第1コントローラが有する製品ソフトの差分リプロ)
次に、第1コントローラ11が有する製品ソフト113aのリプログラミングについて説明する。当該リプログラミングには、差分リプロが利用される。当該差分リプロは、制御装置1と書き換え装置2とを接続して、第1不揮発性メモリ113に格納されるリプロソフト113bを用いて実行される。
(2-2. Difference Repro of Product Software Owned by First Controller)
Next, reprogramming of the
なお、本実施形態では、制御装置1が第1コントローラ11と第2コントローラ12とを含む。このために、書き換え装置2は、いずれのコントローラ11、12を対象としたリプロ処理であるかを信号によって予め制御装置1に送信する。すなわち、制御装置1は、いずれのコントローラ11、12を対象としたリプロ処理であるかを認識することができる。以下、制御装置1が、第1コントローラ11が有する製品ソフト113aを対象としたリプロ処理であると認識していることを前提として、第1コントローラ11が有する製品ソフト113aの差分リプロについて説明する。
In addition, in this embodiment, the
図2A、図2B、および、図2Cは、第1コントローラ11が有する製品ソフト113aに対して実行される差分リプロの流れを説明するための模式図である。図2A、図2B、および、図2Cに示すように、差分リプロにおいては、製品ソフト113aの書き換えがブロック(一塊のデータ)単位で進められる。当該ブロックがどの程度のサイズであるかは、制御装置1の仕様により適宜決められる。例えば、1ブロックのサイズは32kByte等である。
2A, 2B, and 2C are schematic diagrams for explaining the flow of differential reprogramming executed for the
なお、図2A、図2B、および、図2Cにおいては、既に第1不揮発性メモリ113に記憶されている既存の製品ソフト113aを構成する複数のブロックを区別し易いように、便宜的に、各ブロックに対して、第1ブロック、第2ブロック、・・・、第nブロックといった名前を付けている。ブロックの数はn個であり、nは1以上の任意の整数である。また、既存の製品ソフト113aを構成する各ブロック(一塊のデータ)について、先のブロック名を利用して、例えば「既存データ(第nブロック)」といった表記を行っている。
2A, 2B, and 2C, for the sake of convenience, each block is shown as The blocks are named 1st block, 2nd block, . . . , nth block. The number of blocks is n, where n is any integer greater than or equal to 1. Further, each block (a block of data) that constitutes the existing
図2Aに示すように、まず、書き換え装置2から差分データが送信される。ここで、差分データは、第1コントローラ11が有する既存の製品ソフト113a(既存プログラム)の書き換えのために新しく準備されたプログラムと、第1コントローラ11が有する既存の製品ソフト113a(既存プログラム)との差分データである。本実施形態においては、差分データもブロック単位となっている。差分データがいずれのブロックの差分データであるかを示す情報が、例えばヘッダ情報として差分データに含まれる構成としてよい。
As shown in FIG. 2A, difference data is first transmitted from the
なお、差分データは、書き換え装置2から1ブロック分ずつ送信される構成であってよい。ただし、書き換え装置2から、複数ブロック分の差分データが纏めて送信されてもよい。また、既存の製品ソフト113aを構成するブロックの中には、書き換えの必要がないブロックも存在し得る。このようなブロックについては、書き換え装置2から差分データが送信されない構成とすることが好ましい。これにより、リプロ時間の短縮を図ることができる。
Note that the differential data may be transmitted from the
既存データとの書き換え用の差分データが複数ブロック分存在する場合、1ブロック分ずつ、図2A、図2B、および、図2Cに示す処理が行われる。各ブロックについて、図2A、図2B、図2Cの順で処理が行われる。書き換えの必要な全てのブロックについて処理が完了するまで、図2A~図2Cに示す処理が繰り返される。 When a plurality of blocks of differential data for rewriting with existing data exist, the processing shown in FIGS. 2A, 2B, and 2C is performed for each block. Each block is processed in the order of FIGS. 2A, 2B, and 2C. The processes shown in FIGS. 2A to 2C are repeated until all blocks that need to be rewritten have been processed.
図2Aでは、詳細には、第1コントローラ11において第1ブロック用の差分データ(差分データ(第1ブロック))が受信され、既存データ(第1ブロック)が書き換えの対象となっている。第1不揮発性メモリ113に格納される既存データ(第1ブロック)が読み出され、当該既存データ(第1ブロック)と、差分データ(第1ブロック)とに基づいて、第1RAM112を生成領域として新データ(第1ブロック)が生成される。新データ(第1ブロック)は、差分データ(第1ブロック)を用いて既存データ(第1ブロック)の書き換え必要箇所を書き換えたデータである。
In FIG. 2A, more specifically, the difference data for the first block (difference data (first block)) is received in the
図2Bに示すように、新データ(第1ブロック)が生成されると、第1不揮発性メモリ113に格納される既存データ(第1ブロック)が消去される。なお、既存データ(第1ブロック)の消去は、新データ(第1ブロック)を生成する必要があるために、新データの生成が完了するまで消去できない。既存データ(第1ブロック)の消去が完了すると、図2Cに示すように、第1RAM112上に生成された新データ(第1ブロック)が第1不揮発性メモリ113に書き込まれる。これにより、1ブロック分のデータの書き換えが完了する。書き換えが必要な全てのブロックに対して以上の処理が繰り返され、リプロ処理が完了する。
As shown in FIG. 2B, when new data (first block) is generated, existing data (first block) stored in first
(2-3.第2コントローラが有する製品ソフトの差分リプロ)
次に、第2コントローラ12が有する製品ソフト123aのリプログラミングについて説明する。当該リプログラミングには、第1コントローラ11の場合と同様に、差分リプロが利用される。当該差分リプロは、制御装置1と書き換え装置2とを接続し、第1コントローラ11の機能を利用しつつ、第2不揮発性メモリ123に格納されるリプロソフト123bを用いて実行される。
(2-3. Difference Repro of Product Software Owned by Second Controller)
Next, reprogramming of the
上述のように、本実施形態では、第2RAM122の容量が小さく、第2コントローラ12は、自身が有する製品ソフト123aのリプログラミングのために、単独で差分リプロを行うことができない。このために、第2コントローラ12が有する製品ソフト123aの差分リプロに、第1コントローラ11が有する第1RAM112が利用される構成となっている。以下では、制御装置1が、第2コントローラ12が有する製品ソフト123aを対象としたリプロ処理であると認識していることを前提として、第2コントローラ12が有する製品ソフト123aの差分リプロについて説明する。
As described above, in this embodiment, the capacity of the
図3は、第2コントローラ12が有する製品ソフト123aに対して実行される差分リプロの流れを示すフローチャートである。当該差分リプロにおいても、第1コントローラ11が有する製品ソフト113aの差分リプロの場合と同様に、製品ソフト123aの書き換えはブロック(一塊のデータ)単位で進められる。図3は、詳細には、1ブロック分の書き換え処理の流れを示すフローチャートである。
FIG. 3 is a flow chart showing the flow of differential repro that is executed for the
図4A、図4B、および、図4Cは、第2コントローラ12が有する製品ソフト123aに対して実行される差分リプロの流れを説明するための模式図である。図4A、図4B、および、図4Cにおいては、既に第2不揮発性メモリ123に記憶されている既存の製品ソフト123aを構成する複数のブロックを区別し易いように、便宜的に、各ブロックに対して、第1ブロック、第2ブロック、・・・、第nブロックといった名前を付けている。ブロックの数はn個であり、nは1以上の任意の整数である。また、既存の製品ソフト123aを構成する各ブロック(一塊のデータ)について、先のブロック名を利用して、例えば「既存データ(第nブロック)」といった表記を行っている。
4A, 4B, and 4C are schematic diagrams for explaining the flow of differential reprogramming executed for the
図3に示すように、まず、第1コントローラ11が、既存データの書き換えに必要な差分データを書き換え装置2(外部)から受信する(ステップS1)。ここで、差分データは、第2コントローラ12が有する既存の製品ソフト123a(既存プログラム)の書き換えのために新しく準備されたプログラムと、第2コントローラ12が有する既存の製品ソフト123a(既存プログラム)との差分データである。詳細には、ステップS1における差分データは、1ブロック分の差分データである。なお、第1コントローラ11における差分リプロの場合と同様に、第1コントローラ11は複数ブロック分の差分データを纏めて受信してもよい。ただし、この場合でも、ブロック単位で図3に示す処理が行われる。
As shown in FIG. 3, first, the
なお、図4Aに示す例では、第1コントローラ11が、第2不揮発性メモリ123に既に格納されている製品ソフト123aを構成する既存データ(第1ブロック)の書き換えに必要な第1ブロック用の差分データ(差分データ(第1ブロック))を受信している。
Note that, in the example shown in FIG. 4A, the
差分データを受信すると、第1コントローラ11は、第2コントローラ12に対して第2不揮発性メモリ123に格納される既存データの送信を要求する(ステップS2)。詳細には、第1コントローラ11は、既存の製品ソフト123aを構成する複数ブロックのうち、受信した差分データのブロックと対応するブロック(1ブロック分)の既存データの送信を要求する。
Upon receiving the difference data, the
第1コントローラ11の要求により、第2コントローラ12から第1コントローラ11に第2不揮発性メモリ123に格納される既存データが送信される(ステップS3)。詳細には、第2コントローラ12から第1コントローラ11に、既存の製品ソフト123aを構成する複数ブロックのうち、第1コントローラ11が受信した差分データのブロックと対応するブロック(1ブロック分)の既存データが送信される。
Existing data stored in the second
なお、図4Aに示す例では、第1コントローラ11が受信した差分データのブロックと対応するブロックが第1ブロックであり、既存データ(第1ブロック)が、第2コントローラ12から第1コントローラ11に送信されている。
In the example shown in FIG. 4A, the block corresponding to the block of differential data received by the
第2コントローラ12から既存データを受信すると、第1コントローラ11から第2コントローラ12に対して、先に送信した1ブロック分の既存データの消去命令が出される(ステップS4)。当該消去命令の具体例が図4Bに示されている。図4Bに示す例では、第1コントローラ11から第2コントローラ12に対して、既存データ(第1ブロック)の消去命令が出されている。
When the existing data is received from the
第1コントローラ11において第2コントローラ12から既存データが受信されると、第1RAM112を生成領域として既存データと差分データとを基に新データが生成される(ステップS5)。新データは、差分データ(1ブロック分)を用いて既存データ(1ブロック分)の書き換え必要箇所を書き換えたデータである。なお、既存データは、ステップS3で第2コントローラ12から送信されたデータである。また、差分データは、ステップS1で受信したデータである。本実施形態では、新データの生成開始処理は、ステップS4の消去処理の後に開始される構成となっているが、ステップS4と同時、又は、ステップS4より前に開始されてもよい。
When the existing data is received from the
第1コントローラ11からの消去命令を受けて、第2コントローラ12においては、ステップS3)で第1コントローラ11に送信した既存データと同じ既存データであって、第2不揮発性メモリ123に格納される既存データを消去する処理が行われる(ステップS6)。図4Bに示す例では、第2不揮発性メモリ123に格納される既存データ(第1ブロック)を消去する処理が行われている。
Upon receiving the erase command from the
なお、本実施形態では、第1RAM112を用いた新データの生成処理(ステップS5)と、第2不揮発性メモリ123における既存データの消去処理(ステップS6)とが並行して行われる。このように2つの処理が並行して行われることにより、リプロ処理に要する時間の短縮を図ることができる。差分データは、圧縮されていたり、暗号化されていたりする。このために、差分データを用いて新データを生成する処理には、解凍処理や複合化処理等が必要となる。この結果、新データの生成処理には、或る程度の時間を要する。また、消去処理もブロック単位で消去するために或る程度の時間を要する。このために、これら2つの処理を並行して行うことにより、リプロ処理の処理時間の短縮を効果的に図ることができる。 Note that, in the present embodiment, the process of generating new data using the first RAM 112 (step S5) and the process of erasing existing data in the second nonvolatile memory 123 (step S6) are performed in parallel. By performing the two processes in parallel in this way, it is possible to shorten the time required for the repro process. Differential data may be compressed or encrypted. For this reason, processing for generating new data using differential data requires decompression processing, compounding processing, and the like. As a result, it takes a certain amount of time to generate new data. Also, the erasing process takes a certain amount of time to erase data in units of blocks. Therefore, by performing these two processes in parallel, it is possible to effectively shorten the processing time of the repro process.
また、本実施形態では、第2コントローラ12は、第1コントローラ11からの命令を待って既存データの消去処理を行う構成としているが、これに限定されない。例えば、第2コントローラ12は、新データの生成のための既存データを第1コントローラ11に送信した時点(ステップS3の処理が完了した時点)で、当該既存データの消去処理を開始してもよい。
Further, in the present embodiment, the
第1コントローラ11において新データが生成されると、第1コントローラ11から第2コントローラ12へ新データが送信される(ステップS7)。第1コントローラ11から第2コントローラ12に送信された新データは、第2不揮発性メモリ123における既存データの消去後(ステップS6の処理後)に第2不揮発性メモリ123に書き込まれる(ステップS8)。これにより、1ブロック分のデータの書き換えが完了する。書き換えが必要な全てのブロックに対して以上に説明したステップS1からステップS8の処理が繰り返され、リプロ処理が完了する。
When new data is generated in the
なお、図4Cに示す例では、第1コントローラ11で生成された新データ(第1ブロック)が、既存データ(第1ブロック)に替わるデータとして、第2不揮発性メモリ123に書き込まれている。
Note that in the example shown in FIG. 4C, new data (first block) generated by the
以上の説明からわかるように、制御装置1においては、自装置1の外部(書き換え装置2)から第2不揮発性メモリ123に格納される既存データの書き換えに必要な差分データが第1コントローラ11に送信された場合に、前記既存データと前記差分データとを用いて生成する新データの生成領域に第1RAM112を使用する。このように構成することにより、第2コントローラ12の第2RAM122の容量を小さくしつつ、第2コントローラ12が有する製品ソフト123aについても差分リプロを行うことができる。すなわち、第2コントローラ12を安価としつつ、第1コントローラ11が有する製品ソフト113aと第2コントローラ12が有する製品ソフト123aとの両方について差分リプロを行うことができる。
As can be seen from the above description, in the
詳細には、第1コントローラ11は、外部(書き換え装置2)から差分データを受信した場合に第2コントローラ12に既存データの送信を要求するとともに、生成した新データを第2コントローラ12に送信する。第2コントローラ12は、第2不揮発性メモリ123における既存データの消去後に新データを第2不揮発性メモリ123に書き込む。このような構成することにより、第2コントローラ12が有する製品ソフト123aについて、第1コントローラ11を利用して効率良く差分リプロを行うことができる。
Specifically, when the
また、上述のように、本実施形態では、第1コントローラ11と第2コントローラ12との間の通信速度が、外部(書き換え装置2)と第1コントローラ11との間の通信速度に比べて高速である。このために、第2コントローラ12が有する製品ソフト123aのリプログラミングを第1コントローラ11の第1RAM112を利用して差分リプロを行う構成としているにもかかわらず、全てのデータを消去後に新たなデータを書き込む全リプロを行う場合に比べて、リプロ処理を短時間で完了することができる。
Further, as described above, in the present embodiment, the communication speed between the
<4.留意事項等>
本明細書中に開示されている種々の技術的特徴は、上記実施形態のほか、その技術的創作の主旨を逸脱しない範囲で種々の変更を加えることが可能である。すなわち、上記実施形態は、全ての点で例示であって、制限的なものではないと考えられるべきであり、本発明の技術的範囲は、上記実施形態の説明ではなく、特許請求の範囲によって示されるものであり、特許請求の範囲と均等の意味及び範囲内に属する全ての変更が含まれると理解されるべきである。また、本明細書中に示される複数の実施形態及び変形例は可能な範囲で適宜組み合わせて実施されてよい。
<4. Notes, etc.>
Various modifications can be made to the various technical features disclosed in this specification without departing from the gist of the technical creation in addition to the above-described embodiments. That is, the above embodiments should be considered as examples in all respects and not restrictive, and the technical scope of the present invention is not defined by the description of the above embodiments, but by the scope of claims. All changes that come within the meaning and range of equivalency of the claims are to be understood. In addition, the multiple embodiments and modifications shown in this specification may be implemented in appropriate combinations within a possible range.
以上においては、第1コントローラ11に対して1つの第2コントローラ12のみが通信可能に接続される構成としたが、これは例示である。本発明は、第1コントローラ11に対して、複数の第2コントローラ12が通信可能に接続される構成にも適用できる。このような構成でも、各第2コント―ラ12が有する既存プログラムのリプロ処理を行うに際して、第1RAM112を利用した差分リプロを行うことができる。
In the above description, only one
また、本発明は、第1コントローラ11に対して通信可能に接続される第2コントローラ12に対して、更に通信可能に第3コントローラが接続される構成にも適用可能である。この構成において、第3コントローラが有する既存プログラムのリプロ処理を行うに際して、第1RAM112を利用する構成としたり、第2RAM122を利用する構成としたりしてよい。後者の場合、第2RAM122は、差分リプロを行うことができる容量とされる必要がある。
The present invention can also be applied to a configuration in which a third controller is communicably connected to the
1・・・制御装置
2・・・書き換え装置(外部)
11・・・第1コントローラ
12・・・第2コントローラ
112・・・第1RAM
122・・・第2RAM
123・・・第2不揮発性メモリ(不揮発性メモリ)
1...
11...
122 Second RAM
123 Second nonvolatile memory (nonvolatile memory)
Claims (5)
前記第1コントローラと通信可能に設けられる第2コントローラと、
を備える制御装置であって、
前記第2コントローラは、
前記第1RAMよりも容量が小さい第2RAMと、
電気的にデータの書き換えが可能な不揮発性メモリと、
を有し、
自装置の外部から前記不揮発性メモリに格納される既存データの書き換えに必要な差分データが前記第1コントローラに送信された場合に、前記既存データと前記差分データとを用いて生成する新データの生成領域に前記第1RAMを使用する、制御装置。 a first controller having a first RAM;
a second controller provided to communicate with the first controller;
A control device comprising
The second controller is
a second RAM having a capacity smaller than that of the first RAM;
a non-volatile memory in which data can be electrically rewritten;
has
When difference data necessary for rewriting existing data stored in the nonvolatile memory is transmitted from the outside of the device to the first controller, new data is generated using the existing data and the difference data. A control device using the first RAM for a generation area.
前記第2コントローラは、前記不揮発性メモリにおける前記既存データの消去後に前記新データを前記不揮発性メモリに書き込む、請求項1に記載の制御装置。 the first controller requests the second controller to transmit the existing data when receiving the difference data from the outside, and transmits the generated new data to the second controller;
2. The control device according to claim 1, wherein said second controller writes said new data into said non-volatile memory after erasing said existing data in said non-volatile memory.
前記第1コントローラが前記既存データの書き換えに必要な差分データを外部から受信するステップと、
前記第2コントローラから前記第1コントローラに前記既存データが送信されるステップと、
前記第1RAMを生成領域として前記既存データと前記差分データとを基に新データが生成されるステップと、
前記第1コントローラから前記第2コントローラへ送信された前記新データが、前記不揮発性メモリにおける前記既存データの消去後に前記不揮発性メモリに書き込まれるステップと、
を備える、データ書き換え方法。 A method for rewriting existing data stored in a non-volatile memory of the second controller in a control device comprising a first controller having a first RAM and a second controller having a second RAM having a capacity smaller than that of the first RAM, comprising:
a step in which the first controller receives difference data necessary for rewriting the existing data from the outside;
transmitting the existing data from the second controller to the first controller;
a step of generating new data based on the existing data and the difference data using the first RAM as a generation area;
writing the new data sent from the first controller to the second controller into the non-volatile memory after erasing the existing data in the non-volatile memory;
A data rewriting method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021077253A JP2022170949A (en) | 2021-04-30 | 2021-04-30 | Control device and data rewriting method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021077253A JP2022170949A (en) | 2021-04-30 | 2021-04-30 | Control device and data rewriting method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022170949A true JP2022170949A (en) | 2022-11-11 |
Family
ID=83946382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021077253A Pending JP2022170949A (en) | 2021-04-30 | 2021-04-30 | Control device and data rewriting method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022170949A (en) |
-
2021
- 2021-04-30 JP JP2021077253A patent/JP2022170949A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7071574B2 (en) | Gateway device, in-vehicle network system and firmware update method | |
JP6964163B2 (en) | Gateway device, firmware update method and control program | |
JP2019061690A (en) | On-vehicle control device and program writing device | |
JP4654750B2 (en) | Automotive control system | |
JP2022093680A (en) | Gateway device, on-vehicle network system and firmware update method | |
CN110825403A (en) | Method and system for flashing ECU (electronic control Unit) of automobile | |
JP2019109745A (en) | Automobile electronic controller | |
US11263001B2 (en) | Car onboard control device and program updating software | |
JP2022170949A (en) | Control device and data rewriting method | |
JP5945044B2 (en) | Electronic control device for automobile, writing system for electronic control device for automobile, and writing method of control program for vehicle control | |
US11995429B2 (en) | Software update device, update control method, non-transitory storage medium, and server | |
JP6302004B2 (en) | Writing program | |
JP2022187646A (en) | Ota master, system, method, program, and vehicle | |
WO2023175752A1 (en) | Onboard program update system and onboard program update method | |
JP2009223435A (en) | Data storage method and device, and program | |
US11954480B2 (en) | Center, OTA master, system, method, non-transitory storage medium, and vehicle | |
US11947824B2 (en) | Electronic control unit, method, and program | |
US20220405083A1 (en) | Ota master, system, method, non-transitory storage medium, and vehicle | |
WO2024062897A1 (en) | Control system and software update method | |
JP2022126194A (en) | Ota master, center, system, method, program, and vehicle | |
JP2022163602A (en) | Electronic control device | |
JP5956505B2 (en) | Electronic control unit for automobile | |
JP2019175024A (en) | In-vehicle control device | |
JP2022109039A (en) | Center, update management method, and update management program | |
JP2023174004A (en) | Vehicle control apparatus and program update method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240131 |