JP2012234437A - In-vehicle communication system and control unit - Google Patents

In-vehicle communication system and control unit Download PDF

Info

Publication number
JP2012234437A
JP2012234437A JP2011103676A JP2011103676A JP2012234437A JP 2012234437 A JP2012234437 A JP 2012234437A JP 2011103676 A JP2011103676 A JP 2011103676A JP 2011103676 A JP2011103676 A JP 2011103676A JP 2012234437 A JP2012234437 A JP 2012234437A
Authority
JP
Japan
Prior art keywords
control unit
rewrite
connection confirmation
rewriting
confirmation data
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.)
Withdrawn
Application number
JP2011103676A
Other languages
Japanese (ja)
Inventor
Kouji Miyamoto
甲次 宮本
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 JP2011103676A priority Critical patent/JP2012234437A/en
Publication of JP2012234437A publication Critical patent/JP2012234437A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve an effect preventing a fraudulent rewriting of software of a control unit.SOLUTION: In the in-vehicle communication system in which an engine ECU and a vehicle integrated ECU are connected via a communication line, the two ECUs store same connection confirmation data. The engine ECU, upon receiving a rewrite start notification from a rewrite tool connected to the communication line, executes processes (S110, S180, and the like) including a process of executing a predetermined communication with the rewrite tool, and then executes a rewrite process (S200) for rewriting control software in a flash memory to control software from the rewrite tool. However, by the start of the rewrite processing, the engine ECU obtains connection confirmation data from the vehicle integrated ECU, executes processes (S120, S150, S170, and S190) for determining whether or not the data matches connection confirmation data of the engine ECU, and, when it is determined not to match therewith, prohibits the rewrite process. Thereby, fraudulent rewriting by removing the engine ECU and using the engine ECU as a single body can be prevented.

Description

本発明は、車両に搭載される制御ユニットのソフトウェアが不正に書き換えられることを防止する技術に関する。   The present invention relates to a technique for preventing software of a control unit mounted on a vehicle from being rewritten illegally.

車両(自動車)においては、複数の制御ユニットが通信線を介して通信する車載通信システムが採用されている。
そして、車載通信システムの構成要素となる制御ユニット(車載制御ユニット)としては、電気的に記憶内容の書き換えが可能なEEPROMやフラッシュメモリ等の不揮発性メモリ(以下、書換可能不揮発性メモリともいう)に、制御対象を制御するための制御プログラム及び制御データからなるソフトウェア(以下、制御ソフトともいう)を格納しておき、その不発性メモリ内の制御ソフトを、市場への供給後でも当該制御ユニットの外部から書き換えることができるようにしたもの(いわゆるオンボード書き換えが可能なもの)がある。
In vehicles (automobiles), an in-vehicle communication system in which a plurality of control units communicate via communication lines is employed.
As a control unit (in-vehicle control unit) that is a component of the in-vehicle communication system, an electrically rewritable nonvolatile memory such as an EEPROM or a flash memory (hereinafter also referred to as a rewritable nonvolatile memory) In addition, software (hereinafter also referred to as control software) consisting of a control program and control data for controlling the controlled object is stored, and the control software in the non-volatile memory is stored in the control unit even after being supplied to the market. Can be rewritten from outside (so-called on-board rewritable).

即ち、この種の制御ユニットは、通常時には、当該制御ユニットに搭載されているマイコンが書換可能不揮発性メモリ内の制御ソフトを実行(詳しくは、制御ソフトのうちの制御プログラムを実行)することで、その制御ソフトに従い制御対象を制御する。一方、制御ユニットは、制御ソフトを書き換えるための外部装置である書換ツールが車載通信システムの通信線に接続されると共に、その書換ツールから書換開始通知が送信されてくると、その書換ツールとの間で予め定められた手順及び内容の書換許可用通信(制御ソフトの書き換えを実施して良いか否かを判断するための通信)を行い、その通信が正常に終了したならば、書換可能不揮発性メモリ内の制御ソフトを書換ツールから送信されてくる新たな制御ソフトに書き換える書換処理を行う。尚、書換ツールとの通信のための処理や書換処理など、制御ユニットが行う処理は、実際には制御ユニットのマイコンによって行われる。   That is, this type of control unit normally executes control software in a rewritable nonvolatile memory (specifically, a control program of the control software is executed) by a microcomputer mounted on the control unit. The control object is controlled according to the control software. On the other hand, when the rewrite tool, which is an external device for rewriting the control software, is connected to the communication line of the in-vehicle communication system and a rewrite start notification is transmitted from the rewrite tool, the control unit Reprogramming permission communication (communication for determining whether or not to rewrite control software) with a predetermined procedure and contents between them is performed, and rewritable non-volatile if the communication ends normally The rewriting process is performed to rewrite the control software in the memory with new control software transmitted from the rewriting tool. Note that the processing performed by the control unit, such as processing for communication with the rewriting tool and rewriting processing, is actually performed by the microcomputer of the control unit.

また、特許文献1には、制御ユニットの書換可能不揮発性メモリに記憶されている制御ソフトが、その制御ユニットと互換性がないソフトウェアに書き換えられてしまうことを防止する技術が記載されている。具体的には、制御ユニットに識別番号を記憶させておくと共に、書換ツールに装着されるデータカードであって、新たな制御ソフトを記憶するデータカードに、その新たな制御ソフトに適合する制御ユニットの識別番号を示す情報を記憶させておき、制御ユニットは、書換ツールから通信により上記情報を取得して、その情報と自身の識別番号とが一致していなければ制御ソフトの書き換えを禁止する、という技術が記載されている。   Patent Document 1 describes a technique for preventing control software stored in a rewritable nonvolatile memory of a control unit from being rewritten with software that is not compatible with the control unit. Specifically, the control unit stores an identification number and is a data card that is attached to the rewriting tool and that is compatible with the new control software. Storing the information indicating the identification number of the control unit, the control unit acquires the information by communication from the rewriting tool, and prohibits rewriting of the control software if the information and its identification number do not match, The technology is described.

特開平11−141394号公報JP-A-11-141394

ところで、オンボード書き換えが可能な制御ユニットによれば、市場への供給後に制御内容を変更したい場合に、制御ソフトを書き換えることで容易に対応することができる反面、何者かによって制御ソフトが不正に書き換えられる(即ち、正規の書換ツールを用いることなく書き換えられる)可能性もある。   By the way, according to the on-board rewritable control unit, if you want to change the control content after supplying it to the market, you can easily cope with it by rewriting the control software. There is also a possibility of rewriting (that is, rewriting without using a regular rewriting tool).

そして、制御ソフトの不正書き換えを防止する手法としては、例えば特許文献1の技術を流用することが考えられる。つまり、制御ユニットは書換ツールから取得する識別番号と自身の識別番号とを照合して両方の識別番号が一致していなければ書換処理の実行を禁止する、という構成を採ることが考えられる。尚、一般に、このような照合の思想は、上記書換許可用通信に適用されている。   As a technique for preventing unauthorized rewriting of control software, for example, it is conceivable to use the technique of Patent Document 1. That is, it is conceivable that the control unit compares the identification number acquired from the rewriting tool with its own identification number and prohibits execution of the rewriting process if both identification numbers do not match. In general, such a concept of collation is applied to the rewrite permission communication.

しかしながら、制御ソフトを不正に書き換えようとする者(以下、不正行為者という)が、制御ユニットと書換ツールとの間で行われる書換許可用通信の手順及び内容を解析して、正規の書換ツールと同じように機能する装置を作成してしまう可能性もゼロではない。   However, a person who intends to rewrite the control software illegally (hereinafter referred to as a fraudulent person) analyzes the procedure and contents of the rewrite permission communication performed between the control unit and the rewrite tool, and creates a regular rewrite tool. The possibility of creating a device that functions in the same way is not zero.

但し、そのような解析の作業は、車両から制御ユニットを取り外し、単体状態となった制御ユニットの通信用端子に計測機器を接続して実施されることが予想される。制御ユニットが車両に搭載された状態であって他の車載制御ユニットと通信可能な状態においては、ただでさえ作業性が悪い上に、書換ツールとの通信内容を解析しようとする際の推定要素が増えるため、その解析が格段に難しくなると考えられるからである。   However, it is expected that such analysis work is performed by removing the control unit from the vehicle and connecting a measuring device to the communication terminal of the control unit that has become a single unit. In a state where the control unit is mounted on a vehicle and can communicate with other in-vehicle control units, it is not only workable, but also an estimation factor when trying to analyze the content of communication with the rewriting tool This is because the analysis is considered to be extremely difficult.

本発明は、このような点に着目しており、制御ユニットのソフトウェアが不正に書き換えられることの防止効果が高い車載通信システムと、その車載通信システムを構成する制御ユニットとを、提供することを目的としている。   The present invention pays attention to such points, and provides an in-vehicle communication system that is highly effective in preventing the software of the control unit from being illegally rewritten, and a control unit that constitutes the in-vehicle communication system. It is aimed.

請求項1の車載通信システムでは、記憶内容が書き換え可能な不揮発性メモリ(書換可能不揮発性メモリ)に記憶されているソフトウェアに従って制御対象を制御する第1の制御ユニットと、該第1の制御ユニットとは別の第2の制御ユニットとの、少なくとも2つの制御ユニットが、車両に設けられている通信線を介して通信可能に接続されている。また、通信線には、少なくとも第1の制御ユニットの不揮発性メモリに記憶されているソフトウェアを書き換えるための外部装置である書換ツールが、着脱可能になっている。   In the in-vehicle communication system according to claim 1, a first control unit that controls a control object according to software stored in a rewritable nonvolatile memory (rewritable nonvolatile memory), and the first control unit At least two control units, which are different from the second control unit, are communicably connected via a communication line provided in the vehicle. In addition, a rewriting tool, which is an external device for rewriting software stored in at least the nonvolatile memory of the first control unit, can be attached to and detached from the communication line.

そして、この車載通信システムにおいて、第1の制御ユニットと第2の制御ユニットとの各々は、互いに特定の関係を有する接続確認用データが記憶されたデータ記憶手段を備えている。   In this in-vehicle communication system, each of the first control unit and the second control unit includes data storage means in which connection confirmation data having a specific relationship with each other is stored.

また、第1の制御ユニットは、書換ツールからの書換開始通知を受けると、該書換ツールとの間で所定の書換許可用通信を行う処理を含む書換許可用処理を行い、該書換許可用処理が完了した後に、不揮発性メモリ内のソフトウェアを書換ツールから送信されてくるソフトウェアに書き換える書換処理を行うようになっている。   Further, when the first control unit receives a rewrite start notification from the rewrite tool, the first control unit performs a rewrite permission process including a process of performing a predetermined rewrite permission communication with the rewrite tool, and the rewrite permission process. After the above is completed, a rewriting process is performed in which the software in the nonvolatile memory is rewritten with the software transmitted from the rewriting tool.

そして更に、第1の制御ユニットは、判定手段と書換禁止手段とを備えている。
それらのうち、判定手段は、当該第1の制御ユニットが書換開始通知を受けてから書換処理が開始されるまでの間に、第2の制御ユニットと通信して、該第2の制御ユニットのデータ記憶手段に記憶されている接続確認用データを取得し、その第2の制御ユニットから取得した接続確認用データである他ユニット接続確認用データと、当該第1の制御ユニットのデータ記憶手段に記憶されている接続確認用データである自ユニット接続確認用データとが、前記特定の関係を有しているか否かを判定する。
Furthermore, the first control unit includes a determination unit and a rewrite prohibition unit.
Among them, the determination means communicates with the second control unit between the time when the first control unit receives the rewrite start notification and the time when the rewrite process is started. The connection confirmation data stored in the data storage means is acquired, the other unit connection confirmation data which is the connection confirmation data acquired from the second control unit, and the data storage means of the first control unit. It is determined whether the unit connection confirmation data, which is stored connection confirmation data, has the specific relationship.

そして、書換禁止手段は、判定手段が動作したにも拘わらず、該判定手段により他ユニット接続確認用データと自ユニット接続確認用データとが前記特定の関係を有していると判定されない場合には、当該第1の制御ユニットにおいて書換処理が行われるのを禁止する。   The rewrite prohibition means is used when the determination means does not determine that the other unit connection confirmation data and the own unit connection confirmation data have the specific relationship even though the determination means is operated. Prohibits the rewrite process from being performed in the first control unit.

尚、特許請求の範囲において、ソフトウェアとは、制御対象を制御するための制御プログラムに限らず、その制御プログラムの処理によって参照される制御データのことも含んでいる。そして、書換処理によって書き換えられる不揮発性メモリ内のソフトウェアとしては、制御プログラムと制御データとの一方であっても良いし、両方であっても良く、また、制御プログラムの一部又は制御データの一部でも良い。   In the scope of the claims, the software is not limited to a control program for controlling a controlled object, but includes control data referred to by processing of the control program. The software in the non-volatile memory that is rewritten by the rewriting process may be one or both of the control program and the control data, or a part of the control program or a part of the control data. Department may be sufficient.

このような請求項1の車載通信システムによれば、第1の制御ユニットが上記判定手段及び書換禁止手段を備えているため、その第1の制御ユニットのソフトウェア(不揮発メモリ内のソフトウェア)は、該第1の制御ユニットが他の第2の制御ユニットと共に車両の通信線に接続されている状態、即ち、車両に搭載されている状態でしか書き換えることができない。その状態でないと、判定手段が動作しても、該判定手段は、第2の制御ユニットから接続確認用データ(他ユニット接続確認用データ)を取得することができないため、他ユニット接続確認用データと自ユニット接続確認用データとが特定の関係を有していると判定せず、書換処理が禁止されるからである。   According to the in-vehicle communication system of the first aspect, since the first control unit includes the determination unit and the rewrite prohibition unit, the software of the first control unit (software in the nonvolatile memory) is It can be rewritten only when the first control unit is connected to the communication line of the vehicle together with the other second control unit, that is, mounted on the vehicle. Otherwise, even if the determination means operates, the determination means cannot acquire connection confirmation data (other unit connection confirmation data) from the second control unit. This is because it is not determined that the unit connection confirmation data has a specific relationship and the rewriting process is prohibited.

このため、第1の制御ユニットのソフトウェアを不正に書き換えようとする不正行為者が、その第1の制御ユニットを車両から取り外し、単体状態となった制御ユニットの通信用端子(通信線と接続される端子)に、試行錯誤しながら信号を与えることで、ソフトウェアを書き換えようとしても、そのような不正な書き換えを防止することができる。   For this reason, an unauthorized person who intends to illegally rewrite the software of the first control unit removes the first control unit from the vehicle and becomes a single unit, the communication terminal (connected to the communication line) of the control unit. If the software is rewritten, it is possible to prevent such unauthorized rewriting.

また仮に、第1の制御ユニットが車両に搭載されている状態で、不正行為者が、その第1の制御ユニットのソフトウェアを書き換えようとしても、第1の制御ユニットは、書換ツールだけでなく第2の制御ユニットとも通信することで、書換処理を行う状態に移行するため、その移行条件の全てを不正行為者が見つけ出すのは非常に困難になると考えられる。   In addition, even if an unauthorized person attempts to rewrite the software of the first control unit in a state where the first control unit is mounted on the vehicle, the first control unit is not limited to the rewriting tool. Since communication with the control unit 2 shifts to a state in which rewrite processing is performed, it is considered very difficult for an unauthorized person to find all of the transition conditions.

以上のことから、請求項1の車載通信システムによれば、制御ユニット(第1の制御ユニット)のソフトウェアが不正に書き換えられることの防止効果を高めることができる。
次に、請求項2の車載通信システムでは、請求項1の車載通信システムにおいて、前記書換許可用処理は、所定の順序で行われる複数の処理からなり、判定手段は、その書換許可用処理をなす複数の各処理が終了する毎に動作する。
As described above, according to the in-vehicle communication system according to the first aspect, the effect of preventing the software of the control unit (first control unit) from being rewritten illegally can be enhanced.
Next, in the in-vehicle communication system according to claim 2, in the in-vehicle communication system according to claim 1, the rewrite permission process includes a plurality of processes performed in a predetermined order, and the determination unit performs the rewrite permission process. It operates every time a plurality of processes to be completed is completed.

この構成によれば、第1の制御ユニットが書換開始通知を受けてから書換処理を開始するまでの間に、第1の制御ユニットにおいては、判定手段が複数回動作することとなり、そのため、第2の制御ユニットとの接続確認(接続確認用データを用いた認証)が複数回行われることとなる。よって、第1の制御ユニットのソフトウェアが不正に書き換えられることの防止効果を一層高めることができる。   According to this configuration, the determination unit operates a plurality of times in the first control unit between the time when the first control unit receives the rewrite start notification and the start of the rewrite process. Connection confirmation with the second control unit (authentication using connection confirmation data) is performed a plurality of times. Therefore, it is possible to further enhance the effect of preventing the software of the first control unit from being rewritten illegally.

例えば、不正行為者が、車両に第1の制御ユニットが搭載されている状態で、その第1の制御ユニットのソフトウェアを書き換えようとし始め、試行錯誤している途中で、第1の制御ユニット又は第2の制御ユニットを車両の通信線から外したとしても、その後に判定手段が動作することで、書換禁止手段により第1の制御ユニットのソフトウェアを書換不能とすることができる。   For example, a fraudster starts to rewrite the software of the first control unit in a state where the first control unit is mounted on the vehicle, and in the middle of trial and error, the first control unit or Even if the second control unit is removed from the communication line of the vehicle, the software of the first control unit can be made non-rewritable by the rewrite prohibition unit by the operation of the determination unit thereafter.

次に、請求項3の車載通信システムでは、請求項1,2の車載通信システムにおいて、第1の制御ユニットは、書換ツールからの書換開始通知を受けると、当該第1の制御ユニットのデータ記憶手段に記憶されている接続確認用データを書換ツールへ送信し、前記書換処理が終了した後に、書換ツールから送信されて来る新たな接続確認用データを、当該第1の制御ユニットのデータ記憶手段に更新記憶するようになっている。   Next, in the in-vehicle communication system according to claim 3, in the in-vehicle communication system according to claims 1 and 2, when the first control unit receives a rewrite start notification from the rewrite tool, the data storage of the first control unit is performed. The connection confirmation data stored in the means is transmitted to the rewriting tool, and after the rewriting process is completed, the new connection confirmation data transmitted from the rewriting tool is stored in the data storage means of the first control unit. It is supposed to be updated and stored.

そして、書換ツールは、第1の制御ユニットから送信されてきた接続確認用データを、所定のロジックで更新すると共に、その更新した接続確認用データを、第1の制御ユニットにて前記書換処理が終了した後に、前記新たな接続確認用データとして第1の制御ユニットへ送信するようになっている。   The rewrite tool updates the connection confirmation data transmitted from the first control unit with a predetermined logic, and the rewrite processing is performed on the updated connection confirmation data by the first control unit. After completion, the new connection confirmation data is transmitted to the first control unit.

更に、第2の制御ユニットは、第1の制御ユニットにて前記書換処理が終了した後に、当該第2の制御ユニットのデータ記憶手段に記憶されている接続確認用データを、前記新たな接続確認用データと前記特定の関係を有するデータに更新するようになっている。   Further, after the rewriting process is completed in the first control unit, the second control unit uses the connection confirmation data stored in the data storage means of the second control unit as the new connection confirmation. The data is updated to the data having the specific relationship with the business data.

つまり、第1の制御ユニットで記憶される接続確認用データは、書換ツールによって更新し、第2の制御ユニットで記憶される接続確認用データは、第2の制御ユニット自身によって更新するようになっている。   That is, the connection confirmation data stored in the first control unit is updated by the rewriting tool, and the connection confirmation data stored in the second control unit is updated by the second control unit itself. ing.

このような請求項3の車載通信システムによれば、万一、第1及び第2の制御ユニットが車両の通信線に接続されている状態で、第1の制御ユニットのソフトウェアが正規の書換ツールではない外部装置(以下、非正規外部装置という)によって不正に書き換えられたとしても、第1の制御ユニットで記憶される接続確認用データは、正しく更新されることがなく、第2の制御ユニットで記憶される更新後の接続確認用データとは特定の関係を有さないものとなる。よって、第1及び第2の制御ユニットが車両の通信線に接続されている状態で、不正行為者が、再び第1の制御ユニットのソフトウェアを書き換えようとしても、判定手段は、他ユニット接続確認用データと自ユニット接続確認用データとが特定の関係を有していないと判定することとなり、そのような2回目以降の不正書き換えを阻止することができる。   According to such an in-vehicle communication system of claim 3, in the unlikely event that the first and second control units are connected to the communication line of the vehicle, the software of the first control unit is an authorized rewriting tool. The connection confirmation data stored in the first control unit is not correctly updated even if it is illegally rewritten by a non-external device (hereinafter referred to as a non-regular external device), and the second control unit The updated connection confirmation data stored in (1) does not have a specific relationship. Therefore, even if the fraudster tries to rewrite the software of the first control unit again in a state where the first and second control units are connected to the communication line of the vehicle, the determination means confirms the connection of the other unit. It is determined that the data for use and the self unit connection confirmation data do not have a specific relationship, and such illegal rewriting after the second time can be prevented.

次に、請求項4の車載通信システムでは、請求項3の車載通信システムにおいて、第1の制御ユニットの判定手段は、当該第1の制御ユニットが制御対象を制御する通常制御期間中においても動作するようになっている。   Next, in the in-vehicle communication system according to claim 4, in the in-vehicle communication system according to claim 3, the determination unit of the first control unit operates even during a normal control period in which the first control unit controls a control target. It is supposed to be.

そして、この構成によれば、万一、第1の制御ユニットのソフトウェアが非正規外部装置によって不正に書き換えられたとしても、その後、第1の制御ユニットが起動されて通常制御期間中に判定手段が動作すれば、判定手段は、他ユニット接続確認用データと自ユニット接続確認用データとが特定の関係を有していないと判定することとなる。   According to this configuration, even if the software of the first control unit is illegally rewritten by the non-regular external device, the first control unit is subsequently activated and the determination means during the normal control period If is operated, the determination means determines that the other unit connection confirmation data and the own unit connection confirmation data do not have a specific relationship.

よって、その通常制御期間中に動作する判定手段により、ソフトウェアの不正書き換えがあったことを検知することができる。そして、ソフトウェアの不正書き換えを検知した場合には、何等かの対策処理を行うことができるようになる。   Therefore, it is possible to detect that the software has been illegally rewritten by the determination unit that operates during the normal control period. Then, when an unauthorized rewrite of software is detected, some countermeasure processing can be performed.

その対策処理としては、例えば、ソフトウェアの不正書き換えがあったことを示す履歴を記憶する処理や、警告灯を点灯させる処理が考えられる。それらの処理は、カーディーラにおける車両整備者等にソフトウェアの不正書き換えがあったことを知らせるための処理である。また、他の対策処理として、請求項5に記載のような処理を行うように構成しても良い。   As the countermeasure process, for example, a process of storing a history indicating that the software has been illegally rewritten or a process of turning on a warning lamp can be considered. These processes are processes for notifying a vehicle mechanic or the like in a card dealer that software has been illegally rewritten. Moreover, you may comprise so that the process as described in Claim 5 may be performed as another countermeasure process.

即ち、請求項5の車載通信システムでは、請求項4の車載通信システムにおいて、第1の制御ユニットは、出力禁止手段を備えている。そして、その出力禁止手段は、通常制御期間中において、判定手段により他ユニット接続確認用データと自ユニット接続確認用データとが特定の関係を有していないと判定された場合に、当該第1の制御ユニットから制御対象を制御するための所定の信号が出力されるのを禁止する。   That is, in the in-vehicle communication system according to the fifth aspect, in the in-vehicle communication system according to the fourth aspect, the first control unit includes an output prohibiting unit. Then, the output prohibiting means, when the determination means determines that the other unit connection confirmation data and the own unit connection confirmation data do not have a specific relationship during the normal control period. It is prohibited to output a predetermined signal for controlling the controlled object from the control unit.

この構成によれば、第1の制御ユニットは、ソフトウェアが不正に書き換えられると、制御対象を制御するための信号を出力しなくなるため、実質的に機能しなくなる。
このため、ソフトウェアを不正に書き換えること自体が意味をなさなくなり、その結果、ソフトウェアの不正書き換え防止効果を更に高めることができる。
According to this configuration, when the software is illegally rewritten, the first control unit does not output a signal for controlling the control target, and thus substantially does not function.
For this reason, illegally rewriting software itself does not make sense, and as a result, the effect of preventing illegal software rewriting can be further enhanced.

次に、請求項6の車載通信システムでは、請求項1〜5の車載通信システムにおいて、第2の制御ユニットは、前記通信線へ書換開始通知が出力されたことを検知すると、書換ツールと第1の制御ユニットとの間の通信内容を監視して、その通信内容が前記書換許可用通信とは異なるものであるか否かを判定する。   Next, in the in-vehicle communication system according to claim 6, in the in-vehicle communication system according to claims 1 to 5, when the second control unit detects that a rewrite start notification is output to the communication line, The communication content with one control unit is monitored to determine whether the communication content is different from the rewrite permission communication.

この構成によれば、第1及び第2の制御ユニットが車両の通信線に接続されている状態で、不正行為者が、第1の制御ユニットのソフトウェアを非正規外部装置によって不正に書き換えようとした場合に、そのことを第2の制御ユニットが検知して何等かの対策処理を行うことができるようになる。非正規外部装置が用いられた場合、第1の制御ユニットとの正しい書換許可用通信が最初から完全に実現されるとは考えられないからである。   According to this configuration, in the state where the first and second control units are connected to the communication line of the vehicle, the fraudulent person tries to illegally rewrite the software of the first control unit by the non-regular external device. In this case, the second control unit can detect this and perform some countermeasure processing. This is because when a non-regular external device is used, it is not considered that correct rewrite permission communication with the first control unit is completely realized from the beginning.

尚、第2の制御ユニットが行う対策処理としては、例えば、第1の制御ユニットのソフトウェアが不正に書き換えられようとしたことを示す履歴を記憶する処理や、警告灯を点灯させる処理が考えられる。それらの処理は、カーディーラにおける整備者等に対して、第1の制御ユニットのソフトウェアが不正に書き換えられた可能性があることを知らせるための処理である。また、第2の制御ユニットは、請求項7に記載のような対策処理を行うように構成しても良い。   As the countermeasure process performed by the second control unit, for example, a process of storing a history indicating that the software of the first control unit has been illegally rewritten or a process of turning on a warning lamp can be considered. . These processes are processes for notifying a maintenance person or the like in the card dealer that the software of the first control unit may be illegally rewritten. Further, the second control unit may be configured to perform countermeasure processing as described in claim 7.

即ち、請求項7の車載通信システムでは、請求項6の車載通信システムにおいて、第2の制御ユニットは、書換ツールと第1の制御ユニットとの間の通信内容が前記書換許可用通信とは異なるものであると判定した場合には、書換ツールと第1の制御ユニットとの間の通信を妨害するための通信妨害用データを、通信線に出力する。尚、この場合、第1の制御ユニットと通信しようとしている書換ツールは、実際には、非正規外部装置であるということになる。   That is, in the in-vehicle communication system according to claim 7, in the in-vehicle communication system according to claim 6, the communication content between the rewriting tool and the first control unit of the second control unit is different from the rewriting permission communication. If it is determined that the communication is interrupted, communication obstruction data for obstructing communication between the rewriting tool and the first control unit is output to the communication line. In this case, the rewriting tool trying to communicate with the first control unit is actually a non-regular external device.

そして、このように構成すれば、第1の制御ユニットのソフトウェアが実際に書き換えられてしまうことの防止効果を一層高めることができる。不正行為者の立場から見ると、非正規外部装置から第1の制御ユニットへ試行錯誤して種々の信号を送信しようとしても、その不正な通信自体が妨害されて、ソフトウェアの書き換えに至ることができなくなるからである。また、もし不正行為者が、第2の制御ユニットから通信妨害用データが出ていることに気付いて、その第2の制御ユニットを通信線から外したならば、第1の制御ユニットにおいては、前述した判定手段及び書換禁止手段の機能により、書換処理の実施が禁止されるため、やはりソフトウェアの不正書き換えを阻止することができる。   And if comprised in this way, the prevention effect that the software of the 1st control unit is actually rewritten can be heightened further. From the standpoint of a fraudulent person, even if an attempt is made to send various signals from a non-regular external device to the first control unit by trial and error, the unauthorized communication itself may be interrupted, leading to software rewriting. Because it becomes impossible. In addition, if the fraudster notices that the data for interfering communication is output from the second control unit and removes the second control unit from the communication line, in the first control unit, Since the above-described functions of the determination unit and the rewrite prohibiting unit prohibit the execution of the rewriting process, it is possible to prevent unauthorized rewriting of software.

尚、請求項8に記載のように、通信妨害用データとしては、書換ツールと第1の制御ユニットとの間の通信で使用される通信データよりも優先度が高い通信データであれば良い。また、その通信妨害用データは、可能な限り短い周期で送信することが好ましい。通信妨害用データが通信線を占有する時間が長くなるため、通信妨害効果を大きくすることができるからである。   In addition, as described in claim 8, the communication interference data may be communication data having a higher priority than communication data used in communication between the rewriting tool and the first control unit. Further, it is preferable to transmit the communication jamming data at a cycle as short as possible. This is because the time for which the communication disturbing data occupies the communication line becomes longer, so that the communication disturbing effect can be increased.

また、第2の制御ユニットは、通信妨害用データを一定時間だけ送信するように構成することもできるが、書換ツールと第1の制御ユニットとの間の通信内容が書換許可用通信とは異なるものであると一旦判定したなら、動作用電源が遮断されて動作を停止するまで、通信妨害用データを送信し続けるように構成することもできる。そして、後者の方が、通信妨害効果が高く好ましいと言える。   The second control unit can also be configured to transmit the communication obstruction data for a certain period of time, but the communication content between the rewrite tool and the first control unit is different from the rewrite permission communication. Once it is determined that the communication power is interrupted, the communication jamming data can be continuously transmitted until the operation power supply is cut off and the operation is stopped. The latter is preferable because it has a high communication interference effect.

一方、請求項9の制御ユニットによれば、請求項1の車載通信システムにおける第1の制御ユニットとして使用することでき、請求項10の制御ユニットによれば、請求項2の車載通信システムにおける第1の制御ユニットとして使用することでき、請求項11の制御ユニットによれば、請求項3の車載通信システムにおける第1の制御ユニットとして使用することできる。そして、請求項12の制御ユニットによれば、請求項4の車載通信システムにおける第1の制御ユニットとして使用することでき、請求項13の制御ユニットによれば、請求項5の車載通信システムにおける第1の制御ユニットとして使用することできる。   On the other hand, according to the control unit of claim 9, it can be used as the first control unit in the in-vehicle communication system of claim 1, and according to the control unit of claim 10, the second in the in-vehicle communication system of claim 2. The control unit of claim 11 can be used as the first control unit in the in-vehicle communication system of claim 3. According to the control unit of claim 12, the control unit can be used as the first control unit in the in-vehicle communication system of claim 4, and according to the control unit of claim 13, the first in the in-vehicle communication system of claim 5. It can be used as one control unit.

実施形態の車載通信システムを表す構成図である。It is a block diagram showing the vehicle-mounted communication system of embodiment. エンジンECUで実行される書換開始通知応答処理を表すフローチャートである。It is a flowchart showing the rewriting start notification response process performed by engine ECU. エンジンECUで実行される通常モード時処理を表すフローチャートである。It is a flowchart showing the process at the time of normal mode performed by engine ECU. 書換ツールで実行される制御ソフト書換用処理を表すフローチャートである。It is a flowchart showing the process for control software rewriting performed with a rewriting tool. 車両統合ECUで実行される接続確認応答処理を表すフローチャートである。It is a flowchart showing the connection confirmation response process performed by vehicle integrated ECU. 車両統合ECUで実行される書換シーケンス監視処理を表すフローチャートである。It is a flowchart showing the rewriting sequence monitoring process performed with vehicle integrated ECU. エンジンECUと車両統合ECUと書換ツールとの動作の相互関係を表す説明図である。It is explanatory drawing showing the mutual relationship of operation | movement with engine ECU, vehicle integrated ECU, and a rewriting tool.

以下に、本発明が適用された実施形態の車載通信システムについて説明する。
図1に示すように、本実施形態の車載通信システム1は、車両のエンジンを制御する電子制御ユニット(以下、エンジンECUという)11と、車両の走行状態に応じたエンジンの目標出力や自動変速機の目標変速状態など、車両の動力に関する目標の制御状態を決定する電子制御ユニット(以下、車両統合ECUという)12と、車両の上記自動変速機を制御する電子制御ユニット(以下、トランスミッションECUという)13と、車両盗難を防止するためのイモビライザ制御を行う電子制御ユニット(以下、イモビライザECUという)14と、車両のメータを制御する電子制御ユニット(以下、メータECUという)15と、を備えている。そして、各ECU11〜15は、車両に配設されている通信線17を介して互いにデータ通信可能に接続されている。
Hereinafter, an in-vehicle communication system according to an embodiment to which the present invention is applied will be described.
As shown in FIG. 1, an in-vehicle communication system 1 according to this embodiment includes an electronic control unit (hereinafter referred to as an engine ECU) 11 that controls an engine of a vehicle, an engine target output and an automatic shift according to the traveling state of the vehicle. An electronic control unit (hereinafter referred to as a vehicle integrated ECU) 12 that determines a target control state relating to the power of the vehicle, such as a target gear shift state of the machine, and an electronic control unit (hereinafter referred to as a transmission ECU) that controls the automatic transmission of the vehicle. ) 13, an electronic control unit (hereinafter referred to as an immobilizer ECU) 14 that performs immobilizer control for preventing vehicle theft, and an electronic control unit (hereinafter referred to as meter ECU) 15 that controls a vehicle meter. Yes. Each of the ECUs 11 to 15 is connected to be communicable with each other via a communication line 17 provided in the vehicle.

また、通信線17には、外部装置(車両外部の装置)を当該通信線17に着脱可能とするためのコネクタ18が設けられている。そして、そのコネクタ18には、ECU11〜15のうちの何れかの制御ソフト(制御プログラム及び制御データからなるソフトウェア)を書き換える際に、制御ソフト書き換え用の外部装置である書換ツール19が取り付けられる。   Further, the communication line 17 is provided with a connector 18 for enabling an external device (device outside the vehicle) to be attached to and detached from the communication line 17. The connector 18 is attached with a rewriting tool 19 that is an external device for rewriting control software when rewriting any control software (software consisting of control programs and control data) of the ECUs 11 to 15.

尚、本実施形態では、ECU11〜15のうち、エンジンECU11だけが制御ソフトのオンボード書き換えが可能となっているものとして説明する。このため、書換ツール19は、エンジンECU11の制御ソフトを書き換える場合に、コネクタ18を介して通信線17に接続される。   In the present embodiment, it is assumed that only the engine ECU 11 among the ECUs 11 to 15 is capable of on-board rewriting of control software. For this reason, the rewriting tool 19 is connected to the communication line 17 via the connector 18 when the control software of the engine ECU 11 is rewritten.

ここで、エンジンECU11は、処理動作の中枢部であるマイコン21と、記憶内容が書き換え可能な不揮発性メモリ(本実施形態ではフラッシュメモリ)22と、通信線17に接続されている他のECUと通信するための通信回路23とを備えている。また、フラッシュメモリ22には、記憶内容の書き換えが許可された2つの記憶領域22a,22bが設けられている。一方の記憶領域22aには、エンジンを制御するための制御ソフト(制御プログラム及び制御データ)が記憶されており、他方の記憶領域22bには、通信線17に当該ECU11及び車両統合ECU12が接続されていることを確認するための接続確認用データが記憶されている。   Here, the engine ECU 11 includes a microcomputer 21 that is a central part of the processing operation, a nonvolatile memory (flash memory in the present embodiment) 22 in which stored contents can be rewritten, and other ECUs connected to the communication line 17. And a communication circuit 23 for communication. Further, the flash memory 22 is provided with two storage areas 22a and 22b in which rewriting of stored contents is permitted. In one storage area 22a, control software (control program and control data) for controlling the engine is stored, and in the other storage area 22b, the ECU 11 and the vehicle integrated ECU 12 are connected to the communication line 17. The data for connection confirmation for confirming that it has been stored is stored.

そして、エンジンECU11では、マイコン21がフラッシュメモリ22内の制御ソフトを実行(詳しくは、制御ソフトのうちの制御プログラムを実行)することで、その制御ソフトに従いエンジンを制御する。例えば、マイコン21は、車両統合ECU12から通信線17を介して送信されてくる目標出力が実現されるように、エンジンを制御する。   In the engine ECU 11, the microcomputer 21 executes the control software in the flash memory 22 (specifically, executes a control program of the control software), thereby controlling the engine according to the control software. For example, the microcomputer 21 controls the engine so that the target output transmitted from the vehicle integrated ECU 12 via the communication line 17 is realized.

また、車両統合ECU12も、処理動作の中枢部であるマイコン25と、記憶内容が書き換え可能な不揮発性メモリ(本実施形態ではフラッシュメモリ)26と、通信線17に接続されている他のECUと通信するための通信回路27とを備えている。そして、フラッシュメモリ26において、記憶内容の書き換えが許可されている所定記憶領域には、エンジンECU11のフラッシュメモリ22に記憶されている接続確認用データと特定の関係を有する接続確認用データが記憶されている。尚、本実施形態において、その特定の関係とは、「同じ」という関係である。   In addition, the vehicle integrated ECU 12 includes a microcomputer 25 that is a central part of the processing operation, a nonvolatile memory (flash memory in the present embodiment) 26 in which stored contents can be rewritten, and other ECUs connected to the communication line 17. And a communication circuit 27 for communication. In the flash memory 26, connection confirmation data having a specific relationship with the connection confirmation data stored in the flash memory 22 of the engine ECU 11 is stored in a predetermined storage area where rewriting of the stored contents is permitted. ing. In the present embodiment, the specific relationship is “same”.

そして、車両統合ECU12では、マイコン25が、例えば当該マイコン25に内蔵されているROM内の制御ソフトを実行(詳しくは、制御ソフトのうちの制御プログラムを実行)することで、エンジンの目標出力や自動変速機の目標変速状態などを決定して、目標出力をエンジンECU11へ送信したり、目標変速状態をトランスミッションECU13へ送信したりする動力制御処理を行う。   In the vehicle integrated ECU 12, the microcomputer 25 executes the control software in the ROM built in the microcomputer 25 (specifically, the control program of the control software is executed), so that the target output of the engine A power control process for determining a target shift state of the automatic transmission and transmitting the target output to the engine ECU 11 and transmitting the target shift state to the transmission ECU 13 is performed.

また、図示を省略しているが、トランスミッションECU13、イモビライザECU14及びメータECU15の各々も、マイコンや通信回路を備えている。そして、その各ECU13〜15においても、マイコンが、そのECUに設けられている通信回路及び上記通信線17を介して、他のECUと通信することにより情報をやりとりして、各自の制御対象を制御するための処理を行う。例えば、トランスミッションECU13のマイコンは、車両統合ECU12から通信線17を介して送信されてくる目標変速状態が実現されるように、自動変速機(トランスミッション)を制御する。   Although not shown, each of the transmission ECU 13, the immobilizer ECU 14, and the meter ECU 15 also includes a microcomputer and a communication circuit. In each of the ECUs 13 to 15, the microcomputer exchanges information by communicating with other ECUs via the communication circuit provided in the ECU and the communication line 17 so that each control target is controlled. Processing for control is performed. For example, the microcomputer of the transmission ECU 13 controls the automatic transmission (transmission) so that the target shift state transmitted from the vehicle integrated ECU 12 via the communication line 17 is realized.

尚、本実施形態において、ECU11〜15は、車両がイグニッションオンの状態(車両におけるイグニッション系の電源ラインにバッテリ電圧が供給される状態)になると動作用電源が供給されて起動する(詳しくは、そのECU11〜15のマイコンが起動する)。   In the present embodiment, the ECUs 11 to 15 are activated by supplying power for operation when the vehicle is in an ignition-on state (a state in which a battery voltage is supplied to an ignition system power line in the vehicle). The microcomputers of the ECUs 11 to 15 are activated).

一方、書換ツール19は、処理動作の中枢部であるマイコン31や通信回路33や操作部35を備えている。そして、書換ツール19では、当該書換ツール19の使用者(通常は、エンジンECU11の制御ソフトを書き換える作業者)が操作部35に対して所定の操作を行うと、マイコン31が、エンジンECU11の制御ソフトを書き換えるための制御ソフト書換用処理を行う。また、書換ツール19には、エンジンECU11へ送信する制御ソフト(即ち、書き換えるべき新たな制御ソフト)が記憶された所定形状の記憶媒体37が装着されるようになっている。尚、記憶媒体37としては、例えばカード型のメモリカードやUSBメモリ等が考えられる。   On the other hand, the rewriting tool 19 includes a microcomputer 31, a communication circuit 33, and an operation unit 35 that are the central part of the processing operation. In the rewriting tool 19, when a user of the rewriting tool 19 (usually a worker who rewrites control software of the engine ECU 11) performs a predetermined operation on the operation unit 35, the microcomputer 31 controls the engine ECU 11. The control software rewriting process for rewriting the software is performed. The rewriting tool 19 is mounted with a storage medium 37 having a predetermined shape in which control software to be transmitted to the engine ECU 11 (that is, new control software to be rewritten) is stored. As the storage medium 37, for example, a card-type memory card or a USB memory can be considered.

次に、エンジンECU11の制御ソフトを書き換える際に、そのエンジンECU11と車両統合ECU12と書換ツール19との各々で実行される処理について説明する。
エンジンECU11の制御ソフトを書き換える作業者が、書換ツール19を車両の通信線17に接続し、その後、操作部35に対して所定の操作を行うと、書換ツール19は、通信線17に書換開始通知を送信する。
Next, processing executed by each of the engine ECU 11, the vehicle integrated ECU 12, and the rewriting tool 19 when the control software of the engine ECU 11 is rewritten will be described.
When an operator who rewrites control software of the engine ECU 11 connects the rewriting tool 19 to the communication line 17 of the vehicle and then performs a predetermined operation on the operation unit 35, the rewriting tool 19 starts rewriting to the communication line 17. Send a notification.

そして、エンジンECU11では、フラッシュメモリ22内の制御ソフトに従いエンジンの制御を行う通常制御期間中において、書換ツール19からの書換開始通知を受信すると、マイコン21が、図2の書換開始通知応答処理を実行する。   When the engine ECU 11 receives the rewrite start notification from the rewrite tool 19 during the normal control period in which the engine is controlled according to the control software in the flash memory 22, the microcomputer 21 performs the rewrite start notification response process in FIG. Run.

図2に示すように、エンジンECU11のマイコン21は、書換開始通知応答処理の実行を開始すると、まずS110にて、現在の制御ソフトを当該ECU11に適合しない制御ソフトに書き換えてしまうことを防止するための品番確認用処理を行う。   As shown in FIG. 2, when the microcomputer 21 of the engine ECU 11 starts executing the rewrite start notification response process, first, in S110, the current control software is prevented from being rewritten with control software that is not compatible with the ECU 11. For product number confirmation.

具体的には、まず、書換ツール19から品番要求が送信されてくるため、その品番要求を受信したなら、書換ツール19へ当該ECU11の品番を送信する。すると、書換ツール19では、記憶媒体37に記憶されている制御ソフトのうち、当該ECU11の品番に適合する制御ソフトが、書き換えるべき新たな制御ソフトとして選択される。尚、エンジンECU11において、当該ECU11の品番は、例えば、フラッシュメモリ22の記憶領域のうちで記憶内容の書き換えが許可されていない書換不能領域、又はマイコン21内のROMに記憶されている。   Specifically, first, a product number request is transmitted from the rewriting tool 19. When the product number request is received, the product number of the ECU 11 is transmitted to the rewriting tool 19. Then, the rewriting tool 19 selects control software that matches the product number of the ECU 11 among the control software stored in the storage medium 37 as new control software to be rewritten. In the engine ECU 11, the product number of the ECU 11 is stored in, for example, a non-rewritable area where rewriting of stored contents is not permitted in the storage area of the flash memory 22 or a ROM in the microcomputer 21.

次に、S120にて、他ユニット(本実施形態では車両統合ECU12)の接続確認用データと当該ECU11の接続確認用データとが一致しているか否かを確認するための一致確認処理を行う。   Next, in S120, a matching confirmation process for confirming whether or not the connection confirmation data of the other unit (vehicle integrated ECU 12 in this embodiment) matches the connection confirmation data of the ECU 11 is performed.

具体的には、まず、車両統合ECU12へ、接続確認用データを要求するためのデータ要求を送信する。そして、車両統合ECU12は、そのデータ要求を受信したなら、フラッシュメモリ26に記憶されている接続確認用データをエンジンECU11へ送信するため、当該ECU11のマイコン21は、車両統合ECU12からの接続確認用データを受信して、その受信した車両統合ECU12の接続確認用データと、当該ECU11の接続確認用データ(即ち、フラッシュメモリ22の記憶領域22bに記憶されている接続確認用データ)とが一致しているか否かを判定する。   Specifically, first, a data request for requesting connection confirmation data is transmitted to the vehicle integrated ECU 12. When the vehicle integration ECU 12 receives the data request, the microcomputer 21 of the ECU 11 transmits the connection confirmation data stored in the flash memory 26 to the engine ECU 11. When the data is received and the received connection confirmation data of the vehicle integrated ECU 12 matches the connection confirmation data of the ECU 11 (that is, the connection confirmation data stored in the storage area 22b of the flash memory 22). It is determined whether or not.

そして、次のS125にて、S120での一致確認処理による判定結果が“一致”であるか否かを判定し、“一致”ではないと判定した場合には、そのまま当該書換開始通知応答処理を終了する。この場合には、エンジンの制御が引き続き行われることとなる。   Then, in the next S125, it is determined whether or not the determination result in the match confirmation process in S120 is “match”. If it is determined that it is not “match”, the rewrite start notification response process is directly performed. finish. In this case, engine control is continued.

尚、S125では、一致確認処理により、車両統合ECU12の接続確認用データと当該ECU11の接続確認用データとが一致していない(不一致である)と判定された場合、あるいは、車両統合ECU12から接続確認用データが送信されてこなかった場合に、一致確認処理による判定結果が“一致”ではないと判定される。そして、このことは、後述するS155,S175,S195,S200及び図3におけるS315の各々についても同様である。   In S125, if it is determined by the match confirmation process that the connection confirmation data of the vehicle integrated ECU 12 and the connection confirmation data of the ECU 11 do not match (do not match), or the connection is made from the vehicle integrated ECU 12. When the confirmation data has not been transmitted, it is determined that the determination result by the match confirmation process is not “match”. This also applies to S155, S175, S195, and S200, which will be described later, and S315 in FIG.

一方、上記S125にて、S120での一致確認処理による判定結果が“一致”であると判定した場合には、S130に進む。
S130では、接続確認用データを書換ツール19によって更新してもらうために、フラッシュメモリ22に記憶されている接続確認用データを書換ツール19へ送信する。
On the other hand, if it is determined in S125 that the determination result of the match confirmation process in S120 is “match”, the process proceeds to S130.
In S 130, the connection confirmation data stored in the flash memory 22 is transmitted to the rewriting tool 19 so that the connection confirmation data is updated by the rewriting tool 19.

次にS140にて、実行対象のプログラムを切り替える。つまり、本実施形態において、このS140と上記S110〜S130の処理は、フラッシュメモリ22の記憶領域22aに書き換え対象の制御ソフトの一部として記憶されている所定のプログラムによって行われるため、このS140にて、フラッシュメモリ22の書換不能領域又はマイコン21内のROMに記憶されている書換処理用プログラムへジャンプし、以後は、その書換処理用プログラムを実行することで、後述するS150以降の処理を行う。   Next, in S140, the program to be executed is switched. In other words, in the present embodiment, the processes of S140 and S110 to S130 are performed by a predetermined program stored as part of the control software to be rewritten in the storage area 22a of the flash memory 22, so Thus, the process jumps to the rewrite process area of the flash memory 22 or the rewrite process program stored in the ROM in the microcomputer 21, and thereafter, the rewrite process program is executed to perform the processes after S150 described later. .

そして、S140に続くS150では、上記S120と同じ一致確認処理を行う。そして更に、次のS155にて、上記S125と同様に、S150での一致確認処理による判定結果が“一致”であるか否かを判定し、“一致”ではないと判定した場合には、後述する最後のS240へ移行するが、“一致”であると判定した場合には、S160に進む。   In S150 subsequent to S140, the same confirmation process as in S120 is performed. Further, in the next S155, as in the above S125, it is determined whether or not the determination result by the match confirmation processing in S150 is “match”. The process proceeds to the last step S240, but if it is determined to be “match”, the process proceeds to step S160.

S160では、他のECU12〜15に対して、故障診断停止の要求と、通信停止の要求とを送信する。すると、他のECU12〜15は、各ECU11〜15が正常に動作しているか否かを監視するための故障診断処理を停止すると共に、通常制御期間中に行っている相互通信を停止することとなる。このような処置をとるのは、今からエンジンECU11が制御ソフトを書き換える状態になり、正常に動作しなくなるからである。   In S160, a failure diagnosis stop request and a communication stop request are transmitted to the other ECUs 12-15. Then, the other ECUs 12 to 15 stop the failure diagnosis process for monitoring whether or not each of the ECUs 11 to 15 is operating normally, and stop the mutual communication performed during the normal control period. Become. The reason why such a measure is taken is that the engine ECU 11 is now in a state of rewriting the control software and does not operate normally.

次にS170にて、上記S120と同じ一致確認処理を行う。そして更に、次のS175にて、上記S125と同様に、S170での一致確認処理による判定結果が“一致”であるか否かを判定し、“一致”ではないと判定した場合には、最後のS240へ移行するが、“一致”であると判定した場合には、S180に進む。   Next, in S170, the same confirmation process as in S120 is performed. Further, in the next S175, as in S125, it is determined whether or not the determination result by the match confirmation processing in S170 is “match”. The process proceeds to S240, but if it is determined to be “match”, the process proceeds to S180.

S180では、通信相手が正規の書換ツール19であるかを確認するためのセキュリティ確認用処理を行う。
具体的には、書換ツール19と所定規則の暗号通信を何度か行い、その暗号通信が全て正常に完了したならば、通信相手が正規の書換ツール19であると判断して、S190に進む。尚、図2では図示を省略しているが、上記S180にて、書換ツール19との暗号通信(セキュリティ確認用処理)を正常に完了できなければ、以後の処理を中断して、最後のS240へ移行する。
In S180, a security confirmation process for confirming whether the communication partner is the regular rewriting tool 19 is performed.
Specifically, the encryption communication of the predetermined rule is performed several times with the rewriting tool 19 and if all the encryption communication is normally completed, it is determined that the communication partner is the regular rewriting tool 19 and the process proceeds to S190. . Although not shown in FIG. 2, if the encryption communication (security confirmation processing) with the rewriting tool 19 cannot be normally completed in S180, the subsequent processing is interrupted and the last S240 is completed. Migrate to

S190では、上記S120と同じ一致確認処理を行う。そして更に、次のS195にて、上記S125と同様に、S190での一致確認処理による判定結果が“一致”であるか否かを判定し、“一致”ではないと判定した場合には、最後のS240へ移行するが、“一致”であると判定した場合には、S200に進む。   In S190, the same confirmation process as in S120 is performed. Further, in the next S195, as in S125, it is determined whether or not the determination result by the match confirmation processing in S190 is “match”. The process proceeds to S240, but if it is determined to be “match”, the process proceeds to S200.

そして、S200では、書換ツール19に制御ソフトの要求を送信する。すると、書換ツール19から、書き換えるべき新たな制御ソフトが送信されてくるため、フラッシュメモリ22の記憶領域22aに記憶されている制御ソフトを書換ツール19から送信されてくる新たな制御ソフトに書き換える書換処理を行う。具体的には、記憶領域22a内のデータを消去し、その消去した記憶領域22aに、書換ツール19から受信した制御ソフト(詳しくは、制御ソフトを構成するデジタルデータ)を書き込む。尚、書き換えられる制御ソフトとしては、制御プログラムと制御データとの一方であっても、両方であっても良く、制御プログラムの一部又は制御データの一部であっても良い。   In S200, a request for control software is transmitted to the rewriting tool 19. Then, since the new control software to be rewritten is transmitted from the rewriting tool 19, the rewriting to rewrite the control software stored in the storage area 22 a of the flash memory 22 with the new control software transmitted from the rewriting tool 19. Process. Specifically, the data in the storage area 22a is erased, and the control software received from the rewriting tool 19 (specifically, digital data constituting the control software) is written into the erased storage area 22a. The rewritten control software may be one or both of the control program and control data, or may be a part of the control program or a part of the control data.

また、図2では図示を省略しているが、S200では、書換処理と並行して、マルチタスクのかたちで、上記S120と同じ一致確認処理と、その一致確認処理による判定結果が“一致”であるか否かを判定する処理とを、繰り返し実行し、一致確認処理による判定結果が“一致”ではないと判定した場合には、書換処理を中断して、最後のS240へ移行する。   Although not shown in FIG. 2, in S200, in parallel with the rewriting process, in the form of multitasking, the same match confirmation process as in S120 and the determination result by the match confirmation process are “match”. The process of determining whether or not there is repeated is executed, and when it is determined that the determination result by the match confirmation process is not “match”, the rewrite process is interrupted and the process proceeds to the last S240.

そして、S200の書換処理により、書換ツール19からの制御ソフトを全てフラッシュメモリ22の記憶領域22aに書き込んだならば、S210に進み、制御ソフトの書き込みが正常に完了したか否かを確認するためのメモリチェックを行う。具体的には、フラッシュメモリ22の記憶領域22aに書き込んだ制御ソフトと、書換ツール19から受信してマイコン21内のRAM(図示省略)に一時的に保存している制御ソフトとを比較(ベリファイ)する。   If all the control software from the rewriting tool 19 is written in the storage area 22a of the flash memory 22 by the rewriting process in S200, the process proceeds to S210 to check whether the writing of the control software is normally completed. Perform memory check. Specifically, the control software written in the storage area 22a of the flash memory 22 is compared with the control software received from the rewriting tool 19 and temporarily stored in the RAM (not shown) in the microcomputer 21 (verification). )

そして、S210でのメモリチェックがNGならば、例えばS200の処理をやり直すが、S210でのメモリチェックがOKならば、S220に進んで、書き換え後の制御ソフトが当該ECU11に適合する制御ソフトであることを再確認するための品番再確認用処理を行う。   If the memory check in S210 is NG, for example, the process of S200 is performed again. If the memory check in S210 is OK, the process proceeds to S220, and the rewritten control software is control software compatible with the ECU 11. Perform part number reconfirmation processing to reconfirm that.

具体的には、まず、書換ツール19へ当該ECU11の品番を送信する。すると、書換ツール19では、当該ECU11から受信した品番と、当該ECU11へ送信した制御ソフトに適合するECUの品番とが一致しているか否かを判定し、その判定結果を示す品番確認情報を当該ECU11へ返送する。このため、マイコン21は、書換ツール19から送信されてきた品番確認情報が“品番一致”を示していれば、品番再確認用処理が終了したとして、S230に進む。   Specifically, first, the product number of the ECU 11 is transmitted to the rewriting tool 19. Then, the rewriting tool 19 determines whether or not the product number received from the ECU 11 matches the product number of the ECU conforming to the control software transmitted to the ECU 11, and stores the product number confirmation information indicating the determination result. It returns to ECU11. For this reason, if the product number confirmation information transmitted from the rewriting tool 19 indicates “product number match”, the microcomputer 21 determines that the product number reconfirmation process has ended and proceeds to S230.

尚、図2では図示を省略しているが、書換ツール19からの品番確認情報が“品番不一致”を示していた場合には、そのまま最後のS240へ移行する。また、この場合、書換ツール19では、使用者に対して品番間違いの発生(即ち、ECU11に不適合な制御ソフトを書き込んでしまったこと)を報知するための処理が行われる。   Although not shown in FIG. 2, if the product number confirmation information from the rewriting tool 19 indicates “product number mismatch”, the process proceeds to the last S240. Further, in this case, the rewriting tool 19 performs a process for notifying the user of the occurrence of an incorrect product number (that is, writing incompatible control software to the ECU 11).

S230では、書換ツール19から送信されてくる更新後の接続確認用データを受信し、その受信した接続確認用データを、フラッシュメモリ22の記憶領域22bに更新記憶する。つまり、記憶領域22bに記憶されている旧来の接続確認用データを消去し、その消去後の記憶領域22bに、書換ツール19から受信した接続確認用データを書き込む。尚、書換ツール19は、当該ECU11から上記S130で送信された接続確認用データを受信すると共に、その受信した接続確認用データを所定のロジックで更新し、その更新した接続確認用データを、当該ECU11へ送信するようになっている。   In S230, the updated connection confirmation data transmitted from the rewriting tool 19 is received, and the received connection confirmation data is updated and stored in the storage area 22b of the flash memory 22. That is, the old connection confirmation data stored in the storage area 22b is erased, and the connection confirmation data received from the rewriting tool 19 is written into the erased storage area 22b. The rewriting tool 19 receives the connection confirmation data transmitted from the ECU 11 in S130 and updates the received connection confirmation data with a predetermined logic. It transmits to ECU11.

そして、S230での更新記憶処理を終えたら、最後のS240に進む。
S240では、書換終了後処理として、当該マイコン21を再起動させるための処理を行う。尚、マイコン21を再起動させるための処理としては、当該マイコン21のリセット端子のレベルをリセットがかかる方のアクティブレベルにする処理が考えられる。また、本実施形態において、マイコン21は、リセット状態から起動すると、制御ソフトを成す制御プログラムの先頭から実行するようになっているため、マイコン21を再起動させるための処理としては、プログラムの実行先アドレスを制御プログラムの先頭アドレスにジャンプさせる処理でも良い。
When the update storage process in S230 is completed, the process proceeds to the last S240.
In S240, a process for restarting the microcomputer 21 is performed as the post-rewrite process. A process for restarting the microcomputer 21 may be a process of setting the level of the reset terminal of the microcomputer 21 to the active level that is reset. In the present embodiment, when the microcomputer 21 is started from the reset state, the microcomputer 21 is executed from the top of the control program constituting the control software. Therefore, as a process for restarting the microcomputer 21, the execution of the program is executed. Processing for jumping the destination address to the start address of the control program may be used.

このため、S230からS240に進んだ場合であって、フラッシュメモリ22内の制御ソフトが、正規の書換ツール19によって当該ECU11に適合する制御ソフトに正常に書き換えられた場合には、S240の処理により、その書き換えられた新たな制御ソフトを成す制御プログラムの実行が開始されることとなる。   For this reason, when the process proceeds from S230 to S240, and the control software in the flash memory 22 is normally rewritten to the control software suitable for the ECU 11 by the regular rewriting tool 19, the process of S240 is performed. Then, the execution of the control program constituting the rewritten new control software is started.

次に、図3は、エンジンECU11のマイコン21が、通常制御期間中(フラッシュメモリ22内の制御ソフトに従いエンジンの制御を行う期間中)に実行する通常モード時処理を表すフローチャートである。尚、この通常モード時処理は、フラッシュメモリ22内の制御ソフトの一部を成す所定のプログラムによる処理であり、例えば一定時間毎に実行される。   Next, FIG. 3 is a flowchart showing normal mode processing executed by the microcomputer 21 of the engine ECU 11 during the normal control period (during the period when the engine is controlled according to the control software in the flash memory 22). The normal mode processing is processing by a predetermined program that forms part of the control software in the flash memory 22, and is executed at regular intervals, for example.

図3に示すように、エンジンECU11のマイコン21が通常モード時処理の実行を開始すると、まずS310にて、図2のS120と同じ一致確認処理を行う。そして、次のS315にて、図2のS125と同様に、S310での一致確認処理による判定結果が“一致”であるか否かを判定し、“一致”であると判定した場合(即ち、車両統合ECU12の接続確認用データと当該ECU11の接続確認用データとが一致していると判定した場合)には、そのまま当該通常モード時処理を終了する。よって、この場合には、フラッシュメモリ22内の制御ソフトに基づく通常制御が実施されることとなる。   As shown in FIG. 3, when the microcomputer 21 of the engine ECU 11 starts executing the normal mode process, first, in S310, the same confirmation process as in S120 of FIG. 2 is performed. Then, in the next S315, as in S125 of FIG. 2, it is determined whether or not the determination result by the match confirmation processing in S310 is “match”, and if it is determined to be “match” (ie, If it is determined that the connection confirmation data of the vehicle integrated ECU 12 and the connection confirmation data of the ECU 11 match), the normal mode processing is terminated. Therefore, in this case, normal control based on the control software in the flash memory 22 is performed.

一方、上記S315にて、S310での一致確認処理による判定結果が“一致”ではないと判定した場合(即ち、車両統合ECU12の接続確認用データと当該ECU11の接続確認用データとが一致していないと判定した場合、あるいは、車両統合ECU12から接続確認用データが送信されてこなかった場合)には、S320に進む。   On the other hand, when it is determined in S315 that the determination result by the match confirmation process in S310 is not "match" (that is, the connection check data of the vehicle integrated ECU 12 and the connection check data of the ECU 11 match). If it is determined that there is no connection confirmation data is not transmitted from the vehicle integrated ECU 12, the process proceeds to S320.

そして、S320では、当該ECU11から制御対象としてのエンジンを制御するための所定の信号が出力されるのを禁止する出力禁止処理を行う。
出力を禁止する所定の信号としては、例えば、エンジンに燃料を噴射するインジェクタを開弁動作させるための噴射指令信号や、エンジンのプラグに火花を発生させるための点火指令信号が考えられる。そして、出力禁止処理としては、それらの信号を出力するための処理が実行されるのを禁止したり、それらの信号を出力するための出力回路への電源を遮断したりする処理が考えられる。
In S320, an output prohibiting process for prohibiting the ECU 11 from outputting a predetermined signal for controlling the engine as a control target is performed.
As the predetermined signal for prohibiting the output, for example, an injection command signal for opening the injector for injecting fuel into the engine or an ignition command signal for generating a spark in the plug of the engine can be considered. As the output prohibition processing, processing for prohibiting execution of processing for outputting those signals, or processing for shutting off the power to the output circuit for outputting those signals can be considered.

そして更に、続くS330にて、制御ソフトの不正書き換えがあったことを示す履歴をフラッシュメモリ22の所定領域に記憶する処理や、警告灯を点灯させる警告処理を行う。これらの処理は、カーディーラにおける車両整備者等に対して制御ソフトの不正書き換えがあったことを知らせるための処理である。そして、このS330の処理を終えた後、当該通常モード時処理を終了する。   Further, in the subsequent S330, a process for storing a history indicating that the control software has been illegally rewritten is stored in a predetermined area of the flash memory 22, and a warning process for turning on a warning lamp is performed. These processes are processes for notifying a vehicle mechanic or the like in a card dealer that the control software has been illegally rewritten. Then, after the process of S330 is completed, the normal mode process is terminated.

次に、図4は、書換ツール19のマイコン31が実行する制御ソフト書換用処理を表すフローチャートである。尚、この制御ソフト書換用処理は、書換ツール19の使用者が操作部35に対して所定の操作を行うと実行される。   Next, FIG. 4 is a flowchart showing the control software rewriting process executed by the microcomputer 31 of the rewriting tool 19. The control software rewriting process is executed when the user of the rewriting tool 19 performs a predetermined operation on the operation unit 35.

そして、図4に示すように、書換ツール19のマイコン31が制御ソフト書換用処理の実行を開始すると、まずS410にて、通信線17へ書換開始通知を送信する。すると、前述したように、その書換開始通知を受信したエンジンECU11では、マイコン21が、図2の書換開始通知応答処理を実行することとなる。   Then, as shown in FIG. 4, when the microcomputer 31 of the rewriting tool 19 starts executing the control software rewriting process, first, a rewriting start notification is transmitted to the communication line 17 in S410. Then, as described above, in the engine ECU 11 that has received the rewrite start notification, the microcomputer 21 executes the rewrite start notification response process of FIG.

次に、書換ツール19のマイコン31は、S420にて、前述した品番確認用処理を行う。即ち、まず、エンジンECU11へ品番要求を送信し、その品番要求に対してエンジンECU11から送信されてくる該ECU11の品番を受信する。そして、記憶媒体37に記憶されている制御ソフトのうち、ECU11の品番に適合する制御ソフトを、書き換えるべき新たな制御ソフトとして選択する。   Next, the microcomputer 31 of the rewriting tool 19 performs the above-described product number confirmation processing in S420. That is, first, a part number request is transmitted to the engine ECU 11, and the part number of the ECU 11 transmitted from the engine ECU 11 in response to the part number request is received. And among the control software memorize | stored in the storage medium 37, the control software which suits the product number of ECU11 is selected as new control software which should be rewritten.

そして、次のS430にて、エンジンECU11から図2のS130の処理によって送信されてくる接続確認用データを受信して記憶しておく。
次に、S440にて、前述したセキュリティ確認用処理を行う。即ち、エンジンECU11と所定規則の暗号通信を何度か行う。
In the next S430, the connection confirmation data transmitted from the engine ECU 11 in the process of S130 in FIG. 2 is received and stored.
Next, in S440, the above-described security confirmation process is performed. That is, the encryption communication with the engine ECU 11 according to a predetermined rule is performed several times.

そして、その暗号通信が全て正常に完了したなら、S450に進み、エンジンECU11との間で制御ソフト書換用通信を行う。
具体的には、エンジンECU11から前述した制御ソフトの要求が送信されてくるのを待ち、制御ソフトの要求が送信されてきたなら、上記S420で選択した制御ソフトを、エンジンECU11へ所定単位量ずつ送信する。すると、その制御ソフトは、エンジンECU11において、図2のS200の書換処理により、フラッシュメモリ22の記憶領域22aに書き込まれることとなる。
If all the encrypted communications are normally completed, the process proceeds to S450, and the control software rewriting communication is performed with the engine ECU 11.
Specifically, the control software waits for the above-described control software request from the engine ECU 11 to be transmitted, and if the control software request is transmitted, the control software selected in S420 is transferred to the engine ECU 11 by a predetermined unit amount. Send. Then, the control software is written in the storage area 22a of the flash memory 22 by the rewriting process of S200 in FIG.

そして、制御ソフト書換用通信が全て正常に完了したなら、次のS460にて、前述した品番再確認用処理を行う。即ち、エンジンECU11から図2のS220の処理によって送信されてくる品番を受信し、その受信した品番と、S450でエンジンECU11へ送信した制御ソフトに適合するECUの品番とが一致しているか否かを判定する。そして、その判定結果を示す品番確認情報をエンジンECU11へ送信する。   If all the control software rewriting communication is normally completed, the above-described product number reconfirmation process is performed in the next S460. That is, the product number transmitted from the engine ECU 11 in the process of S220 in FIG. 2 is received, and whether or not the received product number matches the product number of the ECU that matches the control software transmitted to the engine ECU 11 in S450. Determine. And the product number confirmation information which shows the determination result is transmitted to engine ECU11.

次に、S470にて、制御ソフトの書き換えが正常に終了したか否かを判定する。そして、制御ソフトの書き換えが正常に終了しなかったと判定した場合には、そのまま当該制御ソフト書換用処理を終了するが、制御ソフトの書き換えが正常に終了したと判定した場合には、S480に進む。尚、上記S460の品番再確認用処理にて、エンジンECU11から受信した品番と、エンジンECU11へ送信した制御ソフトに適合するECUの品番とが一致していると判定した場合には、制御ソフトの書き換えが正常に終了したと判定することとなる。   Next, in S470, it is determined whether the rewriting of the control software has been normally completed. When it is determined that the rewriting of the control software has not ended normally, the control software rewriting process is terminated as it is. However, when it is determined that the rewriting of the control software has ended normally, the process proceeds to S480. . In the part number reconfirmation process in S460, if it is determined that the part number received from the engine ECU 11 matches the part number of the ECU that matches the control software transmitted to the engine ECU 11, It is determined that the rewriting has been completed normally.

S480では、上記S430でエンジンECU11から受信した接続確認用データを所定のロジックで更新する。その更新ロジックとしては、例えば、受信した接続確認用データに、定数aを加えるといったロジックや、定数bを乗ずるといったロジックが考えられる。   In S480, the connection confirmation data received from the engine ECU 11 in S430 is updated with a predetermined logic. As the update logic, for example, logic such as adding a constant a to the received connection confirmation data and logic such as multiplying a constant b can be considered.

そして、次のS490にて、その更新した接続確認用データを、エンジンECU11へ送信する。すると、前述したように、エンジンECU11では、その書換ツール19から送信される接続確認用データが、フラッシュメモリ22の記憶領域22bに更新記憶されることとなる。   Then, in the next S490, the updated connection confirmation data is transmitted to the engine ECU 11. Then, as described above, in the engine ECU 11, the connection confirmation data transmitted from the rewriting tool 19 is updated and stored in the storage area 22 b of the flash memory 22.

そして、続くS495にて、制御ソフトの書き換えが完了したことを示す書換完了通知を通信線17に送信し、その後、当該制御ソフト書換用処理を終了する。
尚、エンジンECU11のマイコン21は、図2の書換開始通知応答処理において、S230の処理を行った後、書換ツール19からの上記書換完了通知を受信したなら、S240へ進むようになっていても良い。
In subsequent S495, a rewriting completion notification indicating that the rewriting of the control software is completed is transmitted to the communication line 17, and then the control software rewriting process is terminated.
If the microcomputer 21 of the engine ECU 11 receives the rewrite completion notification from the rewrite tool 19 after performing the process of S230 in the rewrite start notification response process of FIG. 2, the process proceeds to S240. good.

次に、図5は、車両統合ECU12のマイコン25が実行する接続確認応答処理を表すフローチャートである。尚、この接続確認応答処理は、例えば一定時間毎に実行される。
図5に示すように、車両統合ECU12のマイコン25が接続確認応答処理の実行を開始すると、まずS510にて、エンジンECU11からの前述したデータ要求(接続確認用データを要求するためのデータ要求)を受信したか否かを判定する。
Next, FIG. 5 is a flowchart showing a connection confirmation response process executed by the microcomputer 25 of the vehicle integrated ECU 12. This connection confirmation response process is executed, for example, at regular intervals.
As shown in FIG. 5, when the microcomputer 25 of the vehicle integrated ECU 12 starts executing the connection confirmation response process, first, in S510, the above-described data request from the engine ECU 11 (data request for requesting connection confirmation data). Is received.

そして、データ要求を受信していなければ、そのまま当該接続確認応答処理を終了するが、データ要求を受信したならば、S520に進む。
S520では、フラッシュメモリ26に記憶されている接続確認用データ(即ち、当該ECU12の接続確認用データ)をエンジンECU11へ送信する。そして、その後、当該接続確認応答処理を終了する。尚、S520でエンジンECU11へ送信される接続確認用データは、エンジンECU11においては、前述した図2のS120,S150,S170,S190,S200及び図3のS310における一致確認処理の各々に用いられる。
If a data request has not been received, the connection confirmation response process is terminated. If a data request has been received, the process proceeds to S520.
In S520, the connection confirmation data stored in the flash memory 26 (that is, the connection confirmation data of the ECU 12) is transmitted to the engine ECU 11. Then, the connection confirmation response process ends. The connection confirmation data transmitted to the engine ECU 11 in S520 is used in the engine ECU 11 for each of the above-described coincidence confirmation processes in S120, S150, S170, S190, S200 in FIG. 2 and S310 in FIG.

次に、図6は、車両統合ECU12のマイコン25が実行する書換シーケンス監視処理を表すフローチャートである。
車両統合ECU12では、書換ツール19からの前述した書換開始通知を受信すると(換言すれば、書換ツール19から通信線17へ書換開始通知が出力されたことを検知すると)、マイコン25が、図6の書換シーケンス監視処理を実行する。
Next, FIG. 6 is a flowchart showing a rewrite sequence monitoring process executed by the microcomputer 25 of the vehicle integrated ECU 12.
When the vehicle integration ECU 12 receives the above-mentioned rewrite start notification from the rewrite tool 19 (in other words, when it is detected that the rewrite start notification is output from the rewrite tool 19 to the communication line 17), the microcomputer 25 changes the state shown in FIG. The rewrite sequence monitoring process is executed.

そして、図6に示すように、マイコン25は、書換シーケンス監視処理の実行を開始すると、S610にて、通信線17に伝送される通信信号を継続的にモニタして、書換ツール19とエンジンECU11との間の通信内容(詳しくは、双方でやり取りされる信号の内容及び順序)である書換シーケンスを監視し、その書換シーケンスが正しい(OK)か正しくない(NG)かを判定(チェック)する。   Then, as shown in FIG. 6, when the microcomputer 25 starts executing the rewrite sequence monitoring process, in S610, the microcomputer 25 continuously monitors the communication signal transmitted to the communication line 17, and the rewrite tool 19 and the engine ECU 11 are monitored. The rewrite sequence that is the communication content between the two (specifically, the content and order of signals exchanged between the two) is monitored, and it is determined (checked) whether the rewrite sequence is correct (OK) or not correct (NG). .

つまり、車両統合ECU12のマイコン25には、少なくとも、エンジンECU11における図2のS110,S180の各処理と書換ツール19における図4のS420,S440の各処理とによって行われるエンジンECU11と書換ツール19との間の通信の内容(やり取りされる信号の内容及び順序)が、書換許可用通信の内容として記憶されている。そして、マイコン25は、書換ツール19とエンジンECU11との間の通信内容が、書換許可用通信の内容と一致しているか否かを判定する。   That is, the microcomputer 25 of the vehicle integrated ECU 12 includes at least the engine ECU 11 and the rewriting tool 19 that are executed by the processes of S110 and S180 of FIG. 2 in the engine ECU 11 and the processes of S420 and S440 of FIG. The contents of communication (contents and order of signals exchanged) are stored as the contents of rewrite permission communication. Then, the microcomputer 25 determines whether or not the communication content between the rewrite tool 19 and the engine ECU 11 matches the content of the rewrite permission communication.

具体的には、下記(1),(2)の内容を順次チェックしていく。
(1)エンジンECU11と書換ツール19との間で品番確認用処理による通信が正しい内容及び順序で実施されたか否か。
Specifically, the contents of (1) and (2) below are sequentially checked.
(1) Whether or not communication by the part number confirmation process between the engine ECU 11 and the rewriting tool 19 has been performed with the correct contents and order.

即ち、書換ツール19からエンジンECU11へ品番要求としての信号が送信され、その後、エンジンECU11から書換ツール19へECU11の品番を示す信号が送信されたか否か。   That is, whether a signal indicating a product number request is transmitted from the rewriting tool 19 to the engine ECU 11, and then a signal indicating the product number of the ECU 11 is transmitted from the engine ECU 11 to the rewriting tool 19.

(2)エンジンECU11と書換ツール19との間でセキュリティ確認用処理による暗号通信が正しい内容及び順序で正しい回数だけ実施されたか否か。
尚、S610でのチェック内容としては、更に、上記(1)と(2)との間で、エンジンECU11から、図2のS130とS160との各々で送信されるはずの信号が送信されたか否か、ということもチェックしても良い。また、上記(2)の後に、エンジンECU11から書換ツール19へ制御ソフトの要求としての信号が送信されたか否かと、その後に、書換ツール19からエンジンECU11へ、制御ソフトと考えられるデータが前述の所定単位量ずつ送信されたか否か、ということもチェックしても良い。
(2) Whether or not cryptographic communication by the security confirmation process between the engine ECU 11 and the rewriting tool 19 has been performed the correct number of times in the correct content and order.
In addition, as a check content in S610, whether or not a signal that should have been transmitted in each of S130 and S160 in FIG. 2 is transmitted from engine ECU 11 between (1) and (2) above. You can also check that. Further, after the above (2), whether or not a signal as a request for the control software is transmitted from the engine ECU 11 to the rewriting tool 19, and thereafter, the data considered to be the control software is transmitted from the rewriting tool 19 to the engine ECU 11. It may also be checked whether or not a predetermined unit amount has been transmitted.

そして、このS610にて、書換シーケンスが正しくない(NG)と判定した時点で、S620に移行し、書換妨害用通信を開始する。
その書換妨害用通信としては、具体的には、書換ツール19とエンジンECU11との間の通信を妨害するための通信妨害用データを、通信線17に出力する。また、その通信妨害用データは、書換ツール19とエンジンECU11との間の通信で使用される通信データよりも優先度が高い通信データである。
Then, when it is determined in S610 that the rewrite sequence is not correct (NG), the process proceeds to S620 and rewrite disturbing communication is started.
As the rewrite disturbing communication, specifically, communication disturbing data for disturbing communication between the rewriting tool 19 and the engine ECU 11 is output to the communication line 17. The communication obstruction data is communication data having a higher priority than communication data used in communication between the rewriting tool 19 and the engine ECU 11.

例えば、車載通信システム1における通信プロトコルが、車両で一般的に使用されるCANであるとすると、通信データに付与されるID(いわゆるCAN−ID)によって、その通信データの優先度(即ち、衝突した際に生き残る優先順位)が決まるため、書換ツール19とエンジンECU11との間の通信で使用される通信データのIDよりも優先度が高いIDを付した通信データを、通信妨害用データとして通信線17に送出する。   For example, if the communication protocol in the in-vehicle communication system 1 is a CAN generally used in a vehicle, the priority (that is, collision) of the communication data is determined by an ID (so-called CAN-ID) given to the communication data. Therefore, communication data with an ID higher in priority than the ID of communication data used for communication between the rewriting tool 19 and the engine ECU 11 is communicated as communication obstruction data. Send to line 17.

このため、S610にて書換シーケンスが正しくない(NG)と判定した場合には、書換ツール19とエンジンECU11との間の通信が妨害され、延いては、書換ツール19によるエンジンECU11の制御ソフトの書き換えが妨害されることとなる。   For this reason, when it is determined in S610 that the rewriting sequence is not correct (NG), communication between the rewriting tool 19 and the engine ECU 11 is obstructed, and as a result, the control software of the engine ECU 11 by the rewriting tool 19 is Rewriting will be disturbed.

このように妨害するのは、エンジンECU11と通信しようとしている外部装置が、実際には正規の書換ツール19ではなく、何者かが正規の書換ツール19ではない外部装置(非正規外部装置)を使ってエンジンECU11の制御ソフトを不正に書き換えようとしていると考えられるからである。   This interference is caused by the fact that the external device that is trying to communicate with the engine ECU 11 is not actually a regular rewriting tool 19 but uses an external device (non-regular external device) that is not the regular rewriting tool 19. This is because the control software of the engine ECU 11 is considered to be illegally rewritten.

そして、このことから、通信妨害用データは、可能な限り短い周期で送信することが好ましく、例えば、本実施形態では連続で送信する。通信妨害効果、延いては、制御ソフトの不正な書き換えを防止する効果を、大きくすることができるからである。   From this point of view, it is preferable to transmit the communication jamming data at a cycle as short as possible. For example, in this embodiment, the data is continuously transmitted. This is because it is possible to increase the communication interference effect, and thus the effect of preventing unauthorized rewriting of the control software.

また、通信妨害用データは、一定時間だけ送信するように構成することもできるが、本実施形態では、S610にて書換シーケンスが正しくないと一旦判定したなら、車両がイグニッションオフの状態になって当該車両統合ECU12への動作用電源が遮断されるまで、通信妨害用データを送信し続けるようになっている。この方が、通信妨害効果が高く好ましい。   In addition, the communication jamming data can be configured to be transmitted for a certain period of time, but in this embodiment, once it is determined in S610 that the rewrite sequence is not correct, the vehicle is in an ignition-off state. The communication disturbance data is continuously transmitted until the operation power supply to the vehicle integrated ECU 12 is cut off. This is preferable because the communication interference effect is high.

そして、車両統合ECU12のマイコン25は、次のS630にて、エンジンECU11の制御ソフトが不正に書き換えられようとしたことを示す不正行為履歴をフラッシュメモリ26の所定領域に記憶する処理を行うと共に、警告灯を点灯させる警告処理を行う。これらの処理は、カーディーラにおける車両整備者等に対して、エンジンECU11の制御ソフトが不正に書き換えられた可能性があることを知らせるための処理である。そして、その後、当該書換シーケンス監視処理を終了する。   In step S630, the microcomputer 25 of the vehicle integrated ECU 12 performs a process of storing in the predetermined area of the flash memory 26 an illegal activity history indicating that the control software of the engine ECU 11 has been illegally rewritten. Perform warning processing to turn on the warning light. These processes are processes for notifying a vehicle mechanic or the like in the card dealer that the control software of the engine ECU 11 may be illegally rewritten. Thereafter, the rewrite sequence monitoring process is terminated.

一方、上記S610にて、書換シーケンスが正しくないと判定しなかった場合には、S640にて、エンジンECU11の制御ソフトの書き換えが正常に終了するまで待ち、制御ソフトの書き換えが正常に終了したなら、S650に進む。尚、S640では、書換ツール19から通信線17へ前述の書換完了通知が出力されたか否かを監視し、書換完了通知が出力されたなら、エンジンECU11の制御ソフトの書き換えが正常に終了したと判定する。   On the other hand, if it is not determined in S610 that the rewriting sequence is not correct, in S640, the process waits until the rewriting of the control software of the engine ECU 11 ends normally, and if the rewriting of the control software ends normally. The process proceeds to S650. In S640, it is monitored whether or not the above-described rewriting completion notification is output from the rewriting tool 19 to the communication line 17. If the rewriting completion notification is output, the rewriting of the control software of the engine ECU 11 is normally completed. judge.

そして、S650では、フラッシュメモリ26に記憶されている接続確認用データを、書換ツール19において図4のS480でエンジンECU11の接続確認用データを更新するのに用いられるロジック(更新規則)と同じロジック(同じ規則)で更新する。そして、その後、当該書換シーケンス監視処理を終了する。   In S650, the connection confirmation data stored in the flash memory 26 is the same logic as the logic (update rule) used to update the connection confirmation data of the engine ECU 11 in S480 of FIG. (Same rules) Thereafter, the rewrite sequence monitoring process is terminated.

一方、図7に、前述した図2,図4〜図6の各処理によるエンジンECU11と車両統合ECU12と書換ツール19との動作の相互関係を示しておく。
以上のような本実施形態の車載通信システム1において、エンジンECU11では、書換開始通知を受けてから制御ソフトを書き換える書換処理(S200)を開始するまでの間に、他のユニットである車両統合ECU12から接続確認用データを取得して、その取得した車両統合ECU12の接続確認用データと当該エンジンECU11の接続確認用データとが一致しているか否かを判定する一致確認処理を行い(S120,S150,S170,S190)、その一致確認処理による判定結果が“一致”にならなければ、書換処理(S200)が行われるのを禁止している(S125:NO,S155:NO,S175:NO,S195:NO)。
On the other hand, FIG. 7 shows the interrelationship among the operations of the engine ECU 11, the vehicle integrated ECU 12, and the rewriting tool 19 by the processes shown in FIGS. 2 and 4 to 6.
In the in-vehicle communication system 1 of the present embodiment as described above, the engine ECU 11 receives the rewriting start notification and starts the rewriting process (S200) for rewriting the control software before starting the rewriting process (S200). The connection confirmation data is acquired from the vehicle, and a matching confirmation process for determining whether or not the acquired connection confirmation data of the vehicle integrated ECU 12 matches the connection confirmation data of the engine ECU 11 is performed (S120, S150). , S170, S190), if the determination result by the match confirmation process does not become “match”, the rewrite process (S200) is prohibited (S125: NO, S155: NO, S175: NO, S195). : NO).

このため、エンジンECU11の制御ソフトは、エンジンECU11が車両統合ECU12と共に車両の通信線17に接続されている状態、即ち、車両に搭載されている状態でしか書き換えることができない。その状態でないと、エンジンECU11は車両統合ECU12から接続確認用データを取得することができず、一致確認処理による判定結果が“一致”にならないからである。   For this reason, the control software of the engine ECU 11 can be rewritten only when the engine ECU 11 is connected to the communication line 17 of the vehicle together with the vehicle integrated ECU 12, that is, when the engine ECU 11 is mounted on the vehicle. Otherwise, the engine ECU 11 cannot acquire the connection confirmation data from the vehicle integrated ECU 12, and the determination result by the matching confirmation process does not become “match”.

よって、エンジンECU11の制御ソフトを不正に書き換えようとする不正行為者が、そのエンジンECU11を車両から取り外し、単体状態となったECU11の通信用端子(通信線17と接続される端子)に、試行錯誤しながら信号を与えることで、制御ソフトを書き換えようとしても、そのような不正な書き換えを防止することができる。また仮に、エンジンECU11が車両に搭載されている状態で、不正行為者が、そのエンジンECU11の制御ソフトを書き換えようとしても、エンジンECU11は、書換ツール19だけでなく車両統合ECU12とも通信することで、書換処理を行う状態に移行するため、その移行条件の全てを不正行為者が見つけ出すのは非常に困難になると考えられる。   Therefore, a fraudulent person who intends to rewrite the control software of the engine ECU 11 removes the engine ECU 11 from the vehicle and tries the communication terminal (terminal connected to the communication line 17) of the ECU 11 in a single state. By giving signals while making mistakes, even if the control software is to be rewritten, such illegal rewriting can be prevented. Further, even if an unauthorized person tries to rewrite the control software of the engine ECU 11 with the engine ECU 11 mounted on the vehicle, the engine ECU 11 communicates not only with the rewriting tool 19 but also with the vehicle integrated ECU 12. In order to shift to the state where the rewriting process is performed, it is considered very difficult for the fraudster to find out all the transition conditions.

以上のことから、本実施形態の車載通信システム1によれば、エンジンECU11の制御ソフトが不正に書き換えられることの防止効果を高めることができる。
また、エンジンECU11では、書換開始通知を受けてから書換処理を開始するまでの間に、少なくとも、図2におけるS110、S140、S160、S180の複数の各処理からなる書換許可用処理を行うようになっているが、その各処理が終了する段階毎に、図2におけるS120,S150,S170,S190の各々で一致確認処理を行い、その何れかの一致確認処理による判定結果が“一致”にならなければ、書換処理が行われるのを禁止している。
From the above, according to the in-vehicle communication system 1 of the present embodiment, the effect of preventing the control software of the engine ECU 11 from being rewritten illegally can be enhanced.
In addition, the engine ECU 11 performs at least a rewrite permission process including a plurality of processes of S110, S140, S160, and S180 in FIG. 2 after receiving the rewrite start notification and before starting the rewrite process. However, at each stage where each process is completed, a match confirmation process is performed in each of S120, S150, S170, and S190 in FIG. 2, and the determination result by any one of the match confirmation processes is “match”. If not, the rewrite process is prohibited.

このため、エンジンECU11の制御ソフトが不正に書き換えられることの防止効果を一層高めることができる。例えば、不正行為者が、車両にエンジンECU11が搭載されている状態で、そのエンジンECU11の制御ソフトを書き換えようとし始め、試行錯誤している途中で、エンジンECU11又は車両統合ECU12を通信線17から外したとしても、図2におけるS120,S150,S170,S190の何れかの一致確認処理が行われることで、エンジンECU11の制御ソフトを書換不能とすることができる。   For this reason, it is possible to further enhance the effect of preventing the control software of the engine ECU 11 from being rewritten illegally. For example, an unauthorized person starts to rewrite the control software of the engine ECU 11 in a state where the engine ECU 11 is mounted on the vehicle, and the engine ECU 11 or the vehicle integrated ECU 12 is connected from the communication line 17 in the middle of trial and error. Even if it is removed, it is possible to make the control software of the engine ECU 11 unrewritable by performing the coincidence confirmation process of any of S120, S150, S170, and S190 in FIG.

また更に、本実施形態において、エンジンECU11は、書換ツール19からの書換開始通知を受けると、当該ECU11のフラッシュメモリ22(詳しくは記憶領域22b)に記憶されている接続確認用データを書換ツール19へ送信し(S130)、書換処理が終了した後に、書換ツール19から送信されて来る新たな接続確認用データを、フラッシュメモリ22に更新記憶するようになっている(S230)。   Furthermore, in the present embodiment, when the engine ECU 11 receives a rewrite start notification from the rewrite tool 19, the rewrite tool 19 stores the connection confirmation data stored in the flash memory 22 (specifically, the storage area 22 b) of the ECU 11. After the rewriting process is completed, new connection confirmation data transmitted from the rewriting tool 19 is updated and stored in the flash memory 22 (S230).

このため、書換ツール19は、エンジンECU11から送信されてきた接続確認用データを、所定のロジックで更新すると共に、その更新した接続確認用データを、エンジンECU11にて書換処理が終了した後に、新たな接続確認用データとしてエンジンECU11へ送信するようになっている(S480,S490)。   For this reason, the rewriting tool 19 updates the connection confirmation data transmitted from the engine ECU 11 with a predetermined logic, and updates the updated connection confirmation data after the rewriting process is completed in the engine ECU 11. Is transmitted to the engine ECU 11 as correct connection confirmation data (S480, S490).

また、車両統合ECU12は、エンジンECU11にて書換処理が終了した後に、当該ECU12のフラッシュメモリ26に記憶されている接続確認用データを、書換ツール19による更新ロジックと同じロジックで更新するようになっている(S650)。   The vehicle integrated ECU 12 updates the connection confirmation data stored in the flash memory 26 of the ECU 12 with the same logic as the update logic by the rewriting tool 19 after the rewriting process is completed in the engine ECU 11. (S650).

つまり、エンジンECU11で記憶される接続確認用データは、書換ツール19によって更新し、車両統合ECU12で記憶される接続確認用データは、車両統合ECU12自身によって更新するようになっている。   That is, the connection confirmation data stored in the engine ECU 11 is updated by the rewriting tool 19, and the connection confirmation data stored in the vehicle integrated ECU 12 is updated by the vehicle integrated ECU 12 itself.

このようになっているため、万一、エンジンECU11及び車両統合ECU12が車両の通信線17に接続されている状態で、エンジンECU11の制御ソフトが非正規外部装置によって不正に書き換えられたとしても、エンジンECU11で記憶される接続確認用データは、正しく更新されることがなく、車両統合ECU12で記憶される更新後の接続確認用データとは一致しないものとなる。   Therefore, even if the engine ECU 11 and the vehicle integrated ECU 12 are connected to the vehicle communication line 17 and the control software of the engine ECU 11 is illegally rewritten by an unauthorized external device, The connection confirmation data stored in the engine ECU 11 is not updated correctly and does not match the updated connection confirmation data stored in the vehicle integrated ECU 12.

よって、エンジンECU11及び車両統合ECU12が車両の通信線17に接続されている状態で、不正行為者が、再びエンジンECU11の制御ソフトを書き換えようとしても、エンジンECU11における前述の一致確認処理による判定結果が“一致”にはならないこととなり、そのような2回目以降の不正書き換えを阻止することができる。   Therefore, even if the fraudulent person tries to rewrite the control software of the engine ECU 11 again in a state where the engine ECU 11 and the vehicle integrated ECU 12 are connected to the communication line 17 of the vehicle, the determination result by the coincidence confirmation process in the engine ECU 11 Will not become “match”, and such illegal rewriting after the second time can be prevented.

そして更に、エンジンECU11では、通常制御期間中においても、図3のS310にて、一致確認処理を行うため、万一、制御ソフトが非正規外部装置によって不正に書き換えられたとしても、その後、エンジンECU11が起動されて通常制御期間中に図3のS310にて一致確認処理が行われれば、その一致確認処理による判定結果は、“一致”ではなくなり(“不一致”となり)、制御ソフトの不正書き換えがあったことを検知することができる。   Further, since the engine ECU 11 performs the matching confirmation process in S310 of FIG. 3 even during the normal control period, even if the control software is illegally rewritten by an unauthorized external device, the engine ECU 11 thereafter If the coincidence confirmation process is performed in S310 of FIG. 3 during the normal control period after the ECU 11 is activated, the determination result by the coincidence confirmation process is not “coincidence” (“mismatch”), and the control software is illegally rewritten. Can be detected.

特に、エンジンECU11では、図3のS310での一致確認処理による判定結果が“一致”でない場合(S315:NO)であって、制御ソフトの不正書き換えを検知した場合には、エンジンを制御するための信号が出力されるのを禁止する出力禁止処理(S320)を行うため、制御ソフトを不正に書き換えること自体が意味をなさなくなり、延いては、制御ソフトの不正書き換え防止効果を更に高めることができる。エンジンECU11は、制御ソフトが不正に書き換えられると、エンジンを制御するという役割において実質的に機能しなくなるからである。   In particular, the engine ECU 11 controls the engine when the determination result by the match confirmation processing in S310 of FIG. 3 is not “match” (S315: NO) and an unauthorized rewrite of the control software is detected. Since the output prohibition process (S320) for prohibiting the output of the above-mentioned signal is performed, it is meaningless to illegally rewrite the control software itself, thereby further enhancing the effect of preventing unauthorized rewrite of the control software. it can. This is because the engine ECU 11 does not substantially function in the role of controlling the engine if the control software is rewritten illegally.

また、本実施形態において、車両統合ECU12は、通信線17へ書換開始通知が出力されたことを検知すると、図6の書換シーケンス監視処理におけるS610にて、書換ツール19とエンジンECU11との間の通信による書換シーケンスが正しいか否かを判定するチェック処理を行うため、何者かが非正規外部装置を使ってエンジンECU11の制御ソフトを不正に書き換えようとした場合に、そのことを検知することができる。   Further, in the present embodiment, when the vehicle integrated ECU 12 detects that a rewrite start notification has been output to the communication line 17, in step S610 in the rewrite sequence monitoring process of FIG. In order to perform a check process for determining whether or not the rewriting sequence by communication is correct, it is possible to detect when someone attempts to rewrite the control software of the engine ECU 11 illegally using a non-regular external device. it can.

そして、車両統合ECU12は、図6のS610にて書換シーケンスが正しくないと判定すると、通信妨害用データを通信線17に出力する書換妨害用通信(S620)を行うため、エンジンECU11の制御ソフトが実際に書き換えられてしまうことの防止効果を一層高めることができる。不正行為者が、非正規外部装置からエンジンECU11へ試行錯誤して種々の信号を送信しようとしても、その不正な通信自体が妨害されて、制御ソフトの書き換えに至ることができなくなるからである。また、もし不正行為者が、車両統合ECU12から通信妨害用データが出ていることに気付いて、その車両統合ECU12を通信線17から外したならば、エンジンECU11においては、前述した一致確認処理による判定結果が“一致”にならないことで書換処理の実施が禁止されるため、やはり制御ソフトの不正書き換えを阻止することができる。   If the vehicle integration ECU 12 determines that the rewrite sequence is not correct in S610 of FIG. 6, the vehicle integration ECU 12 performs rewrite obstruction communication (S620) for outputting communication obstruction data to the communication line 17, so that the control software of the engine ECU 11 The effect of preventing actual rewriting can be further enhanced. This is because even if an unauthorized person tries to transmit various signals from the non-regular external device to the engine ECU 11 through trial and error, the unauthorized communication itself is disturbed and the control software cannot be rewritten. Also, if an unauthorized person notices that data for interfering communication has been output from the vehicle integrated ECU 12, and removes the vehicle integrated ECU 12 from the communication line 17, the engine ECU 11 performs the above-described matching confirmation process. Since the execution of the rewriting process is prohibited when the determination result does not become “match”, the unauthorized rewriting of the control software can also be prevented.

一方、エンジンECU11と車両統合ECU12との何れかを、故障等の理由で交換する場合には、交換後の新たなECUと他方のECUとが、同じ接続確認用データを記憶している状態にしておく必要がある。   On the other hand, when one of the engine ECU 11 and the vehicle integrated ECU 12 is replaced due to a failure or the like, the new ECU after the replacement and the other ECU are in a state in which the same connection confirmation data is stored. It is necessary to keep.

その対策としては以下の手法が考えられる。
まず、ECU11,12の製造時において、フラッシュメモリ22,26の特定領域あるいは書き換え不能なROMの特定領域に、接続確認用データの初期値を記憶しておく。また、その初期値は、車両の機種毎に同じデータとなるように管理する。
The following methods can be considered as countermeasures.
First, when the ECUs 11 and 12 are manufactured, the initial value of the connection confirmation data is stored in a specific area of the flash memories 22 and 26 or a specific area of the non-rewritable ROM. The initial value is managed so as to be the same data for each model of vehicle.

そして、ECU11,12は、書換ツール19あるいは他の専用ツールと所定の認証通信を行った後、その書換ツール19あるいは専用ツールからの記憶値初期化要求を受けると、上記特定領域に記憶されている接続確認用データの初期値を、実際の処理に用いる接続確認用データとして記憶するように構成しておく。つまり、エンジンECU11であれば、上記特定領域からフラッシュメモリ22の記憶領域22bに接続確認用データの初期値をコピーするようにし、車両統合ECU12であれば、上記特定領域からフラッシュメモリ26の所定記憶領域に接続確認用データの初期値をコピーするようにしておく。   Then, after performing predetermined authentication communication with the rewriting tool 19 or another dedicated tool, the ECUs 11 and 12 receive the stored value initialization request from the rewriting tool 19 or the dedicated tool, and are stored in the specific area. The initial value of the connection confirmation data is stored as connection confirmation data used in actual processing. That is, in the case of the engine ECU 11, the initial value of the connection confirmation data is copied from the specific area to the storage area 22b of the flash memory 22, and in the case of the vehicle integrated ECU 12, the predetermined area of the flash memory 26 is stored from the specific area. The initial value of the connection confirmation data is copied to the area.

このため、エンジンECU11と車両統合ECU12との何れかを交換した場合には、書換ツール19あるいは専用ツールにより、ECU11,12の各々に対して、上記認証通信を行った後、記憶値初期化要求を送信すれば、ECU11,12の各々における接続確認用データを同じ初期値にすることができる。   For this reason, when one of the engine ECU 11 and the vehicle integrated ECU 12 is exchanged, the stored value initialization request is made after performing the authentication communication to each of the ECUs 11 and 12 by the rewriting tool 19 or the dedicated tool. , The connection confirmation data in each of the ECUs 11 and 12 can be set to the same initial value.

また例えば、他の手法として、書換ツール19あるいは専用ツールにより、交換していない方のECUから接続確認用データを読み出して、その読み出した接続確認用データを、交換した方のECUに記憶させる、という手法を採っても良い。   Further, for example, as another method, the rewriting tool 19 or the dedicated tool reads out the connection confirmation data from the ECU that has not been exchanged, and stores the read connection confirmation data in the exchanged ECU. You may take the technique.

尚、上記実施形態では、エンジンECU11が第1の制御ユニットに相当し、車両統合ECU12が第2の制御ユニットに相当しており、エンジンECU11においては、フラッシュメモリ22(更に詳しくは記憶領域22b)が、接続確認用データを記憶するデータ記憶手段に相当し、車両統合ECU12においては、フラッシュメモリ26が、接続確認用データを記憶するデータ記憶手段に相当している。このため、エンジンECU11のフラッシュメモリ22に記憶されている接続確認用データが、自ユニット接続確認用データに相当し、車両統合ECU12のフラッシュメモリ26に記憶されている接続確認用データが、他ユニット接続確認用データに相当する。   In the above embodiment, the engine ECU 11 corresponds to the first control unit, and the vehicle integrated ECU 12 corresponds to the second control unit. In the engine ECU 11, the flash memory 22 (more specifically, the storage area 22b). However, in the vehicle integrated ECU 12, the flash memory 26 corresponds to data storage means for storing connection confirmation data. For this reason, the connection confirmation data stored in the flash memory 22 of the engine ECU 11 corresponds to the self-unit connection confirmation data, and the connection confirmation data stored in the flash memory 26 of the vehicle integrated ECU 12 is the other unit connection confirmation data. Corresponds to connection confirmation data.

そして、エンジンECU11においては、図2のS120,S150,S170,S190の各々と、図3のS310とで行われる一致確認処理が、判定手段としての処理に相当し、図2のS125,S155,S175,S195の各処理が、書換禁止手段に相当し、図3のS315及びS320の処理が、出力禁止手段としての処理に相当している。   In the engine ECU 11, the coincidence confirmation process performed in each of S120, S150, S170, and S190 in FIG. 2 and S310 in FIG. 3 corresponds to a process as a determination unit, and S125, S155 in FIG. Each process of S175 and S195 corresponds to a rewrite prohibiting unit, and the processes of S315 and S320 in FIG. 3 correspond to a process as an output prohibiting unit.

以上、本発明の一実施形態について説明したが、本発明はこうした実施形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲において、種々なる態様で実施し得ることは勿論である。   As mentioned above, although one Embodiment of this invention was described, this invention is not limited to such Embodiment at all, Of course, in the range which does not deviate from the summary of this invention, it can implement in a various aspect. .

例えば、上記実施形態では、エンジンECU11側で記憶される接続確認用データと、車両統合ECU12側で記憶される接続確認用データとの関係を、同じという関係にしていたが、データ値の差が所定数であるといった具合に、他の関係を持つようにしても良い。   For example, in the above embodiment, the connection confirmation data stored on the engine ECU 11 side and the connection confirmation data stored on the vehicle integrated ECU 12 side have the same relationship, but the difference in data values is Other relationships such as a predetermined number may be used.

また、書き換え対象の制御ソフトが記憶される書換可能不揮発性メモリは、フラッシュメモリ以外の種類のメモリであっても良い。
また、エンジンECU11において、接続確認用データを記憶するメモリは、書き換え対象の制御ソフトが記憶されるメモリとは物理的に別体のメモリであっても良い。
In addition, the rewritable nonvolatile memory in which the control software to be rewritten is stored may be a type of memory other than the flash memory.
Further, in the engine ECU 11, the memory for storing the connection confirmation data may be a physically separate memory from the memory for storing the control software to be rewritten.

また、車載通信システムを構成する各ECUは、上記実施形態のものに限らず、他の役割を持つECUであっても良い。   Moreover, each ECU which comprises a vehicle-mounted communication system is not restricted to the thing of the said embodiment, ECU which has another role may be sufficient.

1…車載通信システム、11…エンジンECU、12…車両統合ECU
13…トランスミッションECU、14…イモビライザECU、15…メータECU
17…通信線、19…書換ツール、18…コネクタ、21,25,31…マイコン
22,26…フラッシュメモリ、23,27,33…通信回路、35…操作部
37…記憶媒体
DESCRIPTION OF SYMBOLS 1 ... In-vehicle communication system, 11 ... Engine ECU, 12 ... Vehicle integrated ECU
13 ... Transmission ECU, 14 ... Immobilizer ECU, 15 ... Meter ECU
DESCRIPTION OF SYMBOLS 17 ... Communication line, 19 ... Rewriting tool, 18 ... Connector, 21, 25, 31 ... Microcomputer 22, 26 ... Flash memory, 23, 27, 33 ... Communication circuit, 35 ... Operation part 37 ... Storage medium

Claims (13)

記憶内容が書き換え可能な不揮発性メモリに記憶されているソフトウェアに従って制御対象を制御する第1の制御ユニットと、該第1の制御ユニットとは別の第2の制御ユニットとの、少なくとも2つの制御ユニットが、車両に設けられている通信線を介して通信可能に接続され、
前記通信線には、少なくとも前記第1の制御ユニットの前記不揮発性メモリに記憶されているソフトウェアを書き換えるための外部装置である書換ツールが、着脱可能になっている車載通信システムであって、
前記第1の制御ユニットと前記第2の制御ユニットとの各々は、互いに特定の関係を有する接続確認用データが記憶されたデータ記憶手段を備えており、
前記第1の制御ユニットは、前記書換ツールからの書換開始通知を受けると、該書換ツールとの間で所定の書換許可用通信を行う処理を含む書換許可用処理を行い、該書換許可用処理が完了した後に、前記不揮発性メモリ内のソフトウェアを前記書換ツールから送信されてくるソフトウェアに書き換える書換処理を行うようになっており、
更に、前記第1の制御ユニットは、
前記書換開始通知を受けてから前記書換処理が開始されるまでの間に、前記第2の制御ユニットと通信して、該第2の制御ユニットの前記データ記憶手段に記憶されている接続確認用データを取得し、その第2の制御ユニットから取得した接続確認用データである他ユニット接続確認用データと、当該第1の制御ユニットの前記データ記憶手段に記憶されている接続確認用データである自ユニット接続確認用データとが、前記特定の関係を有しているか否かを判定する判定手段と、
前記判定手段が動作したにも拘わらず、該判定手段により前記他ユニット接続確認用データと前記自ユニット接続確認用データとが前記特定の関係を有していると判定されない場合には、当該第1の制御ユニットにおいて前記書換処理が行われるのを禁止する書換禁止手段と、を備えていること、
を特徴とする車載通信システム。
At least two controls: a first control unit that controls an object to be controlled in accordance with software stored in a rewritable nonvolatile memory, and a second control unit that is different from the first control unit The unit is connected to be communicable via a communication line provided in the vehicle,
The communication line is an in-vehicle communication system in which a rewriting tool that is an external device for rewriting software stored in the nonvolatile memory of at least the first control unit is removable.
Each of the first control unit and the second control unit includes data storage means in which connection confirmation data having a specific relationship with each other is stored.
Upon receiving a rewrite start notification from the rewrite tool, the first control unit performs a rewrite permission process including a process for performing a predetermined rewrite permission communication with the rewrite tool, and the rewrite permission process. Is completed, the rewriting process is performed to rewrite the software in the nonvolatile memory with the software transmitted from the rewriting tool,
Furthermore, the first control unit comprises:
Between receiving the rewrite start notification and starting the rewrite process, communicate with the second control unit and check the connection stored in the data storage means of the second control unit Other unit connection confirmation data which is data for connection confirmation obtained from the second control unit and connection confirmation data stored in the data storage means of the first control unit A determination means for determining whether or not own unit connection confirmation data has the specific relationship;
If the determination means does not determine that the other unit connection confirmation data and the own unit connection confirmation data have the specific relationship even though the determination means has been operated, Rewriting prohibiting means for prohibiting the rewriting process from being performed in one control unit;
An in-vehicle communication system characterized by the above.
請求項1に記載の車載通信システムにおいて、
前記書換許可用処理は、所定の順序で行われる複数の処理からなり、
前記判定手段は、前記書換許可用処理をなす複数の各処理が終了する毎に動作すること、
を特徴とする車載通信システム。
The in-vehicle communication system according to claim 1,
The rewrite permission process includes a plurality of processes performed in a predetermined order.
The determination means operates each time a plurality of processes constituting the rewrite permission process are completed;
An in-vehicle communication system characterized by the above.
請求項1又は請求項2に記載の車載通信システムにおいて、
前記第1の制御ユニットは、
前記書換開始通知を受けると、当該第1の制御ユニットの前記データ記憶手段に記憶されている接続確認用データを前記書換ツールへ送信し、前記書換処理が終了した後に、前記書換ツールから送信されて来る新たな接続確認用データを、当該第1の制御ユニットの前記データ記憶手段に更新記憶するようになっており、
前記書換ツールは、
前記第1の制御ユニットから送信されてきた接続確認用データを、所定のロジックで更新すると共に、その更新した接続確認用データを、前記第1の制御ユニットにて前記書換処理が終了した後に、前記新たな接続確認用データとして前記第1の制御ユニットへ送信するようになっており、
前記第2の制御ユニットは、
前記第1の制御ユニットにて前記書換処理が終了した後に、当該第2の制御ユニットの前記データ記憶手段に記憶されている接続確認用データを、前記新たな接続確認用データと前記特定の関係を有するデータに更新すること、
を特徴とする車載通信システム。
In the in-vehicle communication system according to claim 1 or claim 2,
The first control unit includes:
Upon receiving the rewrite start notification, the connection confirmation data stored in the data storage means of the first control unit is transmitted to the rewrite tool, and is transmitted from the rewrite tool after the rewrite process is completed. New incoming connection confirmation data is updated and stored in the data storage means of the first control unit,
The rewriting tool is:
The connection confirmation data transmitted from the first control unit is updated with a predetermined logic, and the updated connection confirmation data is updated in the first control unit after the rewriting process is completed. The new connection confirmation data is transmitted to the first control unit,
The second control unit is
After the rewrite processing is completed in the first control unit, the connection confirmation data stored in the data storage means of the second control unit is changed to the new connection confirmation data and the specific relationship. Updating to data with
An in-vehicle communication system characterized by the above.
請求項3に記載の車載通信システムにおいて、
前記第1の制御ユニットの前記判定手段は、当該第1の制御ユニットが前記制御対象を制御する通常制御期間中においても動作すること、
を特徴とする車載通信システム。
The in-vehicle communication system according to claim 3,
The determination means of the first control unit operates even during a normal control period in which the first control unit controls the control target;
An in-vehicle communication system characterized by the above.
請求項4に記載の車載通信システムにおいて、
前記第1の制御ユニットは、
前記通常制御期間中において、前記判定手段により前記他ユニット接続確認用データと前記自ユニット接続確認用データとが前記特定の関係を有していないと判定された場合に、当該第1の制御ユニットから前記制御対象を制御するための所定の信号が出力されるのを禁止する出力禁止手段を備えていること、
を特徴とする車載通信システム。
The in-vehicle communication system according to claim 4,
The first control unit includes:
When the determination unit determines that the other unit connection confirmation data and the own unit connection confirmation data do not have the specific relationship during the normal control period, the first control unit Output prohibiting means for prohibiting the output of a predetermined signal for controlling the control object from
An in-vehicle communication system characterized by the above.
請求項1ないし請求項5の何れか1項に記載の車載通信システムにおいて、
前記第2の制御ユニットは、
前記通信線へ前記書換開始通知が出力されたことを検知すると、前記書換ツールと前記第1の制御ユニットとの間の通信内容を監視して、その通信内容が前記書換許可用通信とは異なるものであるか否かを判定すること、
を特徴とする車載通信システム。
The in-vehicle communication system according to any one of claims 1 to 5,
The second control unit is
When it is detected that the rewrite start notification is output to the communication line, the communication content between the rewrite tool and the first control unit is monitored, and the communication content is different from the rewrite permission communication. Determining whether or not
An in-vehicle communication system characterized by the above.
請求項6に記載の車載通信システムにおいて、
前記第2の制御ユニットは、
前記書換ツールと前記第1の制御ユニットとの間の通信内容が前記書換許可用通信とは異なるものであると判定した場合には、前記書換ツールと前記第1の制御ユニットとの間の通信を妨害するための通信妨害用データを、前記通信線に出力すること、
を特徴とする車載通信システム。
The in-vehicle communication system according to claim 6,
The second control unit is
Communication between the rewriting tool and the first control unit when it is determined that the communication content between the rewriting tool and the first control unit is different from the rewriting permission communication. Outputting data for interfering communication to disturb the communication line,
An in-vehicle communication system characterized by the above.
請求項7に記載の車載通信システムにおいて、
前記通信妨害用データは、前記書換ツールと前記第1の制御ユニットとの間の通信で使用される通信データよりも優先度が高い通信データであること、
を特徴とする車載通信システム。
The in-vehicle communication system according to claim 7,
The communication obstruction data is communication data having a higher priority than communication data used in communication between the rewriting tool and the first control unit;
An in-vehicle communication system characterized by the above.
記憶内容が書き換え可能な不揮発性メモリに記憶されているソフトウェアに従って制御対象を制御すると共に、車両に設けられている通信線を介して他のユニットと通信可能に接続され、
更に、前記通信線に着脱可能な外部装置である書換ツールからの書換開始通知を受けると、該書換ツールとの間で所定の書換許可用通信を行う処理を含む書換許可用処理を行い、該書換許可用処理が完了した後に、前記不揮発性メモリ内のソフトウェアを前記書換ツールから送信されてくるソフトウェアに書き換える書換処理を行う制御ユニットにおいて、
前記他のユニットに記憶されている接続確認用データと特定の関係を有する接続確認用データが記憶されたデータ記憶手段と、
前記書換開始通知を受けてから前記書換処理が開始されるまでの間に、前記他のユニットと通信して、該他のユニットに記憶されている接続確認用データを取得し、その取得した接続確認用データである他ユニット接続確認用データと、当該制御ユニットの前記データ記憶手段に記憶されている接続確認用データである自ユニット接続確認用データとが、前記特定の関係を有しているか否かを判定する判定手段と、
前記判定手段が動作したにも拘わらず、該判定手段により前記他ユニット接続確認用データと前記自ユニット接続確認用データとが前記特定の関係を有していると判定されない場合には、当該制御ユニットにおいて前記書換処理が行われるのを禁止する書換禁止手段と、
を備えていることを特徴とする制御ユニット。
The control object is controlled according to the software stored in the rewritable nonvolatile memory, and the communication contents are communicably connected to other units via a communication line provided in the vehicle.
Further, upon receiving a rewrite start notification from a rewrite tool that is an external device that can be attached to and detached from the communication line, a rewrite permission process including a process of performing a predetermined rewrite permission communication with the rewrite tool is performed, In a control unit that performs a rewrite process for rewriting the software in the nonvolatile memory with the software transmitted from the rewrite tool after the rewrite permission process is completed.
Data storage means for storing connection confirmation data having a specific relationship with the connection confirmation data stored in the other unit;
Between receiving the rewrite start notification and starting the rewrite process, communicate with the other unit to obtain connection confirmation data stored in the other unit, and obtain the connection Whether the other unit connection confirmation data as confirmation data and the own unit connection confirmation data as connection confirmation data stored in the data storage means of the control unit have the specific relationship Determining means for determining whether or not;
If the determination means does not determine that the other unit connection confirmation data and the own unit connection confirmation data have the specific relationship even though the determination means has operated, the control Rewrite prohibition means for prohibiting the rewrite processing from being performed in the unit;
A control unit comprising:
請求項9に記載の制御ユニットにおいて、
前記書換許可用処理は、所定の順序で行われる複数の処理からなり、
前記判定手段は、前記書換許可用処理をなす複数の各処理が終了する毎に動作すること、
を特徴とする制御ユニット。
The control unit according to claim 9,
The rewrite permission process includes a plurality of processes performed in a predetermined order.
The determination means operates each time a plurality of processes constituting the rewrite permission process are completed;
A control unit characterized by.
請求項9又は請求項10に記載の制御ユニットにおいて、
前記書換開始通知を受けると、前記データ記憶手段に記憶されている接続確認用データを前記書換ツールへ送信し、前記書換処理が終了した後に、前記書換ツールから送信されて来る新たな接続確認用データを、前記データ記憶手段に更新記憶すること、
を特徴とする制御ユニット。
In the control unit according to claim 9 or 10,
Upon receipt of the rewrite start notification, the connection confirmation data stored in the data storage means is transmitted to the rewrite tool, and after the rewrite process is completed, a new connection confirmation data transmitted from the rewrite tool is transmitted. Updating and storing data in the data storage means;
A control unit characterized by.
請求項11に記載の制御ユニットにおいて、
前記判定手段は、当該制御ユニットが前記制御対象を制御する通常制御期間中においても動作すること、
を特徴とする制御ユニット。
The control unit according to claim 11, wherein
The determination means operates even during a normal control period in which the control unit controls the control object;
A control unit characterized by.
請求項12に記載の制御ユニットにおいて、
前記通常制御期間中において、前記判定手段により前記他ユニット接続確認用データと前記自ユニット接続確認用データとが前記特定の関係を有していないと判定された場合に、当該制御ユニットから前記制御対象を制御するための所定の信号が出力されるのを禁止する出力禁止手段を備えていること、
を特徴とする制御ユニット。
The control unit according to claim 12,
During the normal control period, when the determination unit determines that the other unit connection confirmation data and the own unit connection confirmation data do not have the specific relationship, the control unit performs the control. Comprising output prohibiting means for prohibiting the output of a predetermined signal for controlling the object;
A control unit characterized by.
JP2011103676A 2011-05-06 2011-05-06 In-vehicle communication system and control unit Withdrawn JP2012234437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011103676A JP2012234437A (en) 2011-05-06 2011-05-06 In-vehicle communication system and control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011103676A JP2012234437A (en) 2011-05-06 2011-05-06 In-vehicle communication system and control unit

Publications (1)

Publication Number Publication Date
JP2012234437A true JP2012234437A (en) 2012-11-29

Family

ID=47434685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011103676A Withdrawn JP2012234437A (en) 2011-05-06 2011-05-06 In-vehicle communication system and control unit

Country Status (1)

Country Link
JP (1) JP2012234437A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015207912A (en) * 2014-04-21 2015-11-19 トヨタ自動車株式会社 Information provisioning device and information provisioning method
JP2015227157A (en) * 2014-05-30 2015-12-17 以勤科技股▲分▼有限公司 Data gateway, and method for interfering with vehicular operation thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015207912A (en) * 2014-04-21 2015-11-19 トヨタ自動車株式会社 Information provisioning device and information provisioning method
JP2015227157A (en) * 2014-05-30 2015-12-17 以勤科技股▲分▼有限公司 Data gateway, and method for interfering with vehicular operation thereof

Similar Documents

Publication Publication Date Title
CN107547327B (en) Method and system for protecting vehicle
JP3932654B2 (en) Vehicle control device and vehicle control system
US7415332B2 (en) Method and system for vehicle component management, method and system for vehicle component management data update, and vehicle component management center
JP4340297B2 (en) Memory rewriting system for vehicle control device
JP5729337B2 (en) VEHICLE AUTHENTICATION DEVICE AND VEHICLE AUTHENTICATION SYSTEM
US11671498B2 (en) Vehicle master device, update data verification method and computer program product
JP4539757B2 (en) Electronic control unit
EP2757497B1 (en) Vehicular electronic control device
US20210191661A1 (en) Electronic control unit, vehicle electronic control system, rewrite execution method, rewrite execution program, and data structure of specification data
US11604637B2 (en) Electronic control unit, vehicle electronic control system, difference data consistency determination method and computer program product
JP4557042B2 (en) Electronic control device and vehicle control system
JP2008084120A (en) Electronic control device
JP2018195932A (en) System for vehicle performing processing of encryption key and electronic control equipment
US11926270B2 (en) Display control device, rewrite progress display control method and computer program product
JP4253979B2 (en) Inspection method for in-vehicle control unit
JP2012242900A (en) On-vehicle control unit
JP5783013B2 (en) In-vehicle communication system
JP2012234437A (en) In-vehicle communication system and control unit
JP6274849B2 (en) Vehicle control system
JP2008149744A (en) Anti-theft system for vehicle
JP4534731B2 (en) Electronic control device and identification code generation method thereof
JP4684851B2 (en) Start control device
JP2001301572A (en) Method for imparting identification code of on-vehicle ecu and on-vehicle ecu
JP2006242171A5 (en)
JP2003196755A (en) System for monitoring theft of on-vehicle component and on-vehicle component

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140805