JP6387894B2 - In-vehicle electronic control unit - Google Patents
In-vehicle electronic control unit Download PDFInfo
- Publication number
- JP6387894B2 JP6387894B2 JP2015088287A JP2015088287A JP6387894B2 JP 6387894 B2 JP6387894 B2 JP 6387894B2 JP 2015088287 A JP2015088287 A JP 2015088287A JP 2015088287 A JP2015088287 A JP 2015088287A JP 6387894 B2 JP6387894 B2 JP 6387894B2
- Authority
- JP
- Japan
- Prior art keywords
- electronic control
- control device
- writing
- program
- transmitted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Stored Programmes (AREA)
Description
本発明は、制御プログラムの書き換えが可能な車載電子制御装置に関する。 The present invention relates to an in-vehicle electronic control device capable of rewriting a control program.
車両に搭載され、燃料噴射等の制御を行うための制御装置である車載電子制御装置(ECU)は、CPU、ROM、RAM等を備えたマイコンを有している。マイコンのROMには、車載電子制御装置で実行される制御プログラムが記憶されている。 An in-vehicle electronic control unit (ECU) that is a control device that is mounted on a vehicle and controls fuel injection or the like has a microcomputer including a CPU, a ROM, a RAM, and the like. The ROM of the microcomputer stores a control program that is executed by the on-vehicle electronic control device.
マイコンに対する制御プログラムの書き換え(新規の書き込みを含む)は、ROMが制御基板に搭載された状態、すなわちオンボード状態において行われることがある(下記特許文献1を参照)。特に、既存の制御プログラムを改修するにあたっては、マイコンのROM自体を置き換えるよりも、上記のようにオンボード状態で制御プログラムの書き換えを行った方が望ましい。また、例えば車載電子制御装置の製造工程において、新規のROMに制御プログラムの書き込みが行われる場合にも、上記のようなオンボード状態での書き込みが行われることが多い。
The rewriting of the control program for the microcomputer (including new writing) may be performed in a state where the ROM is mounted on the control board, that is, in an on-board state (see
オンボード状態での制御プログラムの書き換えは、従来、書き込み装置と車載電子制御装置とを1対1で接続した状態で行われていた。このため、複数個の車載電子制御装置に対して制御プログラムの書き込みが行われる場合には、車載電子制御装置の個数に略比例した時間がかかってしまっていた。 The rewriting of the control program in the on-board state has been conventionally performed in a state where the writing device and the vehicle-mounted electronic control device are connected one-to-one. For this reason, when a control program is written to a plurality of in-vehicle electronic control devices, it takes time substantially proportional to the number of in-vehicle electronic control devices.
制御プログラムの書き換えに要する時間を短縮するために、複数個の車載電子制御装置に対して制御プログラムの書き換えを同時に行うことも考えられる。しかしながら、この場合には車載電子制御装置と同数の書き込み装置を用意する必要があったので、設備のコストが増大してしまうという問題があった。 In order to shorten the time required for rewriting the control program, it is conceivable to simultaneously rewrite the control program for a plurality of on-vehicle electronic control devices. However, in this case, since it is necessary to prepare the same number of writing devices as the on-vehicle electronic control device, there is a problem that the cost of the equipment increases.
本発明はこのような課題に鑑みてなされたものであり、その目的は、設備のコストを増大させることなく、制御プログラムの書き換えを短時間で行うことのできる車載電子制御装置を提供することにある。 The present invention has been made in view of such problems, and an object thereof is to provide an in-vehicle electronic control device capable of rewriting a control program in a short time without increasing the cost of equipment. is there.
上記課題を解決するために、本発明に係る車載電子制御装置は、マイコンに対する制御プログラムの書き換えが可能な車載電子制御装置であって、複数の車載電子制御装置が、同一の通信バスを介して1つの書き込み装置に接続される接続ステップと、通信バスに接続された全ての車載電子制御装置に対し、書き込み装置から1回だけ制御プログラムが送信され、制御プログラムがそれぞれのマイコンの書き換え領域に同時に書き込まれる送信ステップと、を経ることにより制御プログラムが書き換えられる。送信ステップにおける制御プログラムの書き込みは、書き換え領域に予め書き込まれていた書き換えプログラムによって行われる。送信ステップが完了した時点においては、書き換えプログラムは制御プログラムによって上書きされた状態となっている。それぞれのマイコンの書き換え領域には、互いに異なる個別の識別IDが予め書き込まれている。送信ステップにおいては、書き換え領域の消去が完了したことを確認する第1確認処理と、制御プログラムの書き込みが完了したことを確認する第2確認処理と、制御プログラムが正常に書き込まれたか否かの判定が完了したことを確認する第3確認処理とが、識別IDを用いてそれぞれの車載電子制御装置毎に実施される。送信ステップが完了した時点においては、識別IDは制御プログラムによって上書きされた状態となっている。 In order to solve the above-described problems, an in-vehicle electronic control device according to the present invention is an in-vehicle electronic control device capable of rewriting a control program for a microcomputer, and a plurality of in-vehicle electronic control devices are connected via the same communication bus. The control program is transmitted only once from the writing device to the connection step connected to one writing device and all on-vehicle electronic control devices connected to the communication bus, and the control program is simultaneously sent to the rewriting area of each microcomputer. The control program is rewritten through the transmission step to be written. The writing of the control program in the transmission step is performed by a rewriting program written in advance in the rewriting area. When the transmission step is completed, the rewriting program is overwritten by the control program. Different identification IDs are written in advance in the rewrite area of each microcomputer. In the transmission step, a first confirmation process for confirming that the erasure of the rewrite area is completed, a second confirmation process for confirming that the writing of the control program is completed, and whether or not the control program has been normally written A third confirmation process for confirming that the determination has been completed is performed for each on-vehicle electronic control device using the identification ID. When the transmission step is completed, the identification ID is overwritten by the control program.
このような車載電子制御装置の制御プログラムが書き換えられる際には、先ず、他の車載電子制御装置と共に同一の通信バスに接続された状態とされる。続いて、1つの書き込み装置から送信される制御プログラムが複数の車載電子制御装置に同時に書き込まれる。 When the control program of such an in-vehicle electronic control device is rewritten, first, it is in a state of being connected to the same communication bus together with other in-vehicle electronic control devices. Subsequently, a control program transmitted from one writing device is simultaneously written in a plurality of in-vehicle electronic control devices.
制御プログラムの送信は、書き込み装置から1回だけ行われる。従って、制御プログラムの書き換えが行われる期間のうち、書き込み装置から制御プログラムが送信される期間の長さは、車載電子制御装置の数に拘らず概ね一定となる。 The control program is transmitted only once from the writing device. Therefore, the length of the period during which the control program is transmitted from the writing device in the period during which the control program is rewritten is substantially constant regardless of the number of on-vehicle electronic control apparatuses.
このため、制御プログラムの書き換えが複数の車載電子制御装置に対し同時に行われる場合であっても、比較的短時間で書き換えを完了させることができる。また、同時書き換えが行われる車載電子制御装置の個数が増加しても、必要な書き込み装置の個数がそれに比例して増加するわけではない。従って設備のコストも抑制される。 For this reason, even if it is a case where rewriting of a control program is simultaneously performed with respect to a some vehicle-mounted electronic control apparatus, rewriting can be completed in a comparatively short time. Further, even if the number of on-vehicle electronic control devices that are simultaneously rewritten increases, the number of necessary writing devices does not increase proportionally. Therefore, the cost of equipment is also suppressed.
本発明によれば、設備のコストを増大させることなく、制御プログラムの書き換えを短時間で行うことのできる車載電子制御装置が提供される。 ADVANTAGE OF THE INVENTION According to this invention, the vehicle-mounted electronic control apparatus which can rewrite a control program in a short time, without increasing the cost of an installation is provided.
以下、添付図面を参照しながら本発明の実施形態について説明する。説明の理解を容易にするため、各図面において同一の構成要素に対しては可能な限り同一の符号を付して、重複する説明は省略する。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In order to facilitate the understanding of the description, the same constituent elements in the drawings will be denoted by the same reference numerals as much as possible, and redundant description will be omitted.
本発明の第1実施形態に係る車載電子制御装置(以下、「電子制御装置100」と表記する)の構成について、図1を参照しながら説明する。電子制御装置100は、車両に搭載される制御装置であって、例えば内燃機関における燃料噴射を制御するための装置として構成されている。電子制御装置100は、所謂ECUとも称されるものである。
The configuration of the on-vehicle electronic control device (hereinafter referred to as “
電子制御装置100は、その主たる構成要素としてマイコン110を備えている。マイコン110は、不図示のCPUの他、外部通信部120と、RAM130と、ROM140とを備えている。
The
外部通信部120は、外部と通信が行われる際のインターフェースとなる部分である。電子制御装置100は、外部通信部120を介して信号の送受信を行うことにより、他の通信機器(例えば後述の書き込み装置11)との間において双方向の通信を行うことが可能となっている。
The
RAM130は、マイコン110に備えられた揮発性メモリである。RAM130は、CPUにより制御プログラムが実行される際における一時的な情報の格納場所として用いられる。また、後に説明するように、ROM140に対する制御プログラムの書き換えが行われる際には、RAM130は書き換えプログラム等の格納場所としても用いられる。
The
ROM140は、マイコン110に備えられた不揮発性メモリである。ROM140には、CPUにより実行される制御プログラム等が記憶されている。ROM140はフラッシュメモリであり、記憶されている制御プログラム等をオンボードの状態で書き換えること(新規に書き込むことも含む)が可能となっている。
The
制御プログラムの書き換えは、図1に示される書き換えシステム10により行われる。書き換えシステム10は、書き込み装置11と通信バス12とにより構成されている。書き込み装置11は、CPU、ROM、RAM、通信インターフェースを備えたコンピュータシステムとして構成されており、電子制御装置100と双方向の通信を行いながら、マイコン110のROM140に制御プログラムを書き込むための装置である。
The rewriting of the control program is performed by the
通信バス12は、書き込み装置11と電子制御装置100が通信を行う際における信号の伝達経路である。通信バス12により、書き込み装置11の通信インターフェース(不図示)と、電子制御装置100の外部通信部120とが接続される。尚、図1においては、1つの書き込み装置11に対して1つの電子制御装置100が接続された状態が示されているが、後に説明するように、1つの書き込み装置11に対して複数の電子制御装置100を接続し、それら複数の電子制御装置100に対して制御プログラムの書き換えを同時に行うことも可能となっている。
The
制御プログラムの書き換えについて説明する。図2には、制御プログラムの書き換えが行われる際におけるROM140の状態の変化、具体的には、ROM140に記憶されている情報の変化が示されている。
The rewriting of the control program will be described. FIG. 2 shows changes in the state of the
制御プログラムの書き換えは、前工程と後工程の2回に分けて行われる。図2(A)は、前工程が行われる前の時点におけるROM140の状態を示している。すなわち、制御プログラムの書き換えが行われる前の初期状態を示している。図2(B)は、前工程が完了した時点におけるROM140の状態を示している。図2(C)は、後工程が完了した時点、すなわち、制御プログラムの書き換えが完了した時点におけるROM140の状態を示している。
The rewriting of the control program is performed in two steps, a pre-process and a post-process. FIG. 2A shows the state of the
ROM140は、書き換え領域AD1と、非書き換え領域AD2と、ファームウェア格納領域AD3とからなる3つの記憶領域を有している。書き換え領域AD1は、制御プログラムが格納される記憶領域である。
The
非書き換え領域AD2は、市場用書き換えプログラムが格納される記憶領域である。市場用書き換えプログラムとは、電子制御装置100を搭載した車両が市場に出た後において制御プログラムの書き換えが行われる際に、外部との通信を行いながら書き換えを実行するためのプログラムである。電子制御装置100を搭載した車両が市場に出た後においては、非書き換え領域AD2に記憶されている情報(市場用書き換えプログラム)は原則として更新されない。
The non-rewritable area AD2 is a storage area in which a market rewriting program is stored. The market rewriting program is a program for executing rewriting while communicating with the outside when the control program is rewritten after a vehicle equipped with the
ファームウェア格納領域AD3は、マイコン110の動作を制御するためのファームウェア(マイコン内蔵ファーム)が格納されている記憶領域である。ファームウェア格納領域AD3は、書き込み装置11のような外部の情報機器からは認識することのできない記憶領域である。ファームウェアの更新が行われる場合を除いては、ファームウェア格納領域AD3に記憶されている情報(ファームウェア)が更新されることはない。
The firmware storage area AD3 is a storage area in which firmware (firmware built-in firmware) for controlling the operation of the
図2(A)に示されるように、前工程が行われる前においては、ファームウェア格納領域AD3にファームウェアが格納されているのみであり、書き換え領域AD1及び非書き換え領域AD2には情報が格納されていない。 As shown in FIG. 2A, before the previous process is performed, only firmware is stored in the firmware storage area AD3, and information is stored in the rewrite area AD1 and the non-rewrite area AD2. Absent.
尚、図2(A)に示される状態は、制御プログラムの書き込みがこれまでに一度も行われていないとき、つまり、電子制御装置100の製造工程における状態である。電子制御装置100を搭載した車両が市場に出た後、改修された制御プログラムへの書き換えが行われるような場合には、前工程が行われる前であっても、書き換え領域AD1には(旧版の)制御プログラムが格納されている。前工程が行われる前の初期状態がどのようなものであるかは、本発明を実施するにあたって何ら制約となるものではない。
The state shown in FIG. 2A is a state when the control program has not been written so far, that is, in the manufacturing process of the
図2(B)に示されるように、前工程では、非書き換え領域AD2に対して市場用書き換えプログラムが書き込まれる。更に、書き換え領域AD1に対して識別IDと書き換えプログラムとが書き込まれる。 As shown in FIG. 2B, in the previous step, the market rewrite program is written in the non-rewrite area AD2. Further, the identification ID and the rewriting program are written in the rewriting area AD1.
後に説明するように、後工程では、複数の電子制御装置100(従って複数のROM140)に対して、制御プログラムの書き換えが同時に行われる。識別IDは、書き換え時の処理においてこれら複数の電子制御装置100を特定するために、電子制御装置100のそれぞれに対して個別に割り振られる数値である。つまり、異なる電子制御装置100には異なる識別IDが割り振られる。
As will be described later, in the post-process, rewriting of the control program is simultaneously performed for the plurality of electronic control devices 100 (and thus the plurality of ROMs 140). The identification ID is a numerical value that is individually assigned to each of the
識別IDには、要求IDと応答IDからなる2つの数値が含まれる。つまり、1つの電子制御装置100には、識別IDとして要求IDと応答IDとが割り振られる。要求IDは、書き込み装置11が電子制御装置100に向けて信号を送信する際に、当該信号を受信する電子制御装置100を特定するための識別IDである。応答IDは、電子制御装置100が書き込み装置11に向けて信号を送信する際に、当該信号の送信元である電子制御装置100を特定するための識別IDである。
The identification ID includes two numerical values including a request ID and a response ID. That is, a request ID and a response ID are assigned to one
例えば、3つの電子制御装置100に対して制御プログラムの書き換えが行われる場合には、要求IDとして「0x001」、「0x002」、「0x003」がそれぞれの電子制御装置100に割り振られる。また、応答IDとして「0x011」、「0x022」、「0x033」がそれぞれの電子制御装置100に割り振られる。
For example, when the control program is rewritten for three
書き換えプログラムは、後工程、すなわち書き換え領域AD1に対する制御プログラムの書き込みが行われる際に、書き込み装置11との通信を行いながら書き換えを実行するためのプログラムである。つまり、先に説明した市場用書き換えプログラムと同様の機能を有するプログラムなのであるが、後工程専用である点において市場用書き換えプログラムとは異なっている。以下でも単に「書き換えプログラム」と表記することとする。
The rewriting program is a program for executing rewriting while communicating with the
図2(C)に示されるように、後工程では、書き換え領域AD1に対して制御プログラムが書き込まれる。書き換え領域AD1に書き込まれていた識別ID及び書き換えプログラムは、制御プログラムによって上書きされている。このため、後工程が完了した時点においては、書き換え領域AD1には制御プログラムのみが格納されており、識別ID及び書き換えプログラムは格納されていない。また、後工程においては、非書き換え領域AD2の状態は変化しない。 As shown in FIG. 2C, a control program is written in the rewrite area AD1 in the subsequent process. The identification ID and the rewriting program written in the rewriting area AD1 are overwritten by the control program. For this reason, when the post-process is completed, only the control program is stored in the rewrite area AD1, and the identification ID and the rewrite program are not stored. In the subsequent process, the state of the non-rewritable area AD2 does not change.
図3及び図4を参照しながら、前工程の具体的な態様について説明する。図3には、前工程が行われる際における、書き込み装置11と電子制御装置100との接続態様が模式的に示されている。図3に示されるように、前工程、すなわち識別ID及び書き換えプログラムの書き込みは、書き込み装置11と電子制御装置100とが通信バス12を介して1対1で接続された状態で行われる。このような状態において、書き込み装置11と電子制御装置100との間で行われる通信は図4に示される手順(シーケンス)で行われる。図4に示されるように、前工程では、書き込みとベリファイとが順に行われる。
A specific aspect of the previous process will be described with reference to FIGS. FIG. 3 schematically shows a connection mode between the writing
ここでいう「書き込み」とは、書き換え領域AD1に識別ID及び書き換えプログラムを書き込む処理である。先ず、書き込み装置11から電子制御装置100に向けて、市場用書き換えプログラムが送信される(矢印AR11)。電子制御装置100では、非書き換え領域AD2に対する市場用書き換えプログラムの書き込みが行われる。
Here, “writing” is a process of writing the identification ID and the rewriting program in the rewriting area AD1. First, the market rewriting program is transmitted from the
続いて、書き込み装置11から電子制御装置100に向けて、書き換えプログラムが送信される(矢印AR12)。電子制御装置100では、書き換え領域AD1に対する書き換えプログラムの書き込みが行われる。
Subsequently, the rewriting program is transmitted from the
続いて、書き込み装置11から電子制御装置100に向けて、識別ID(要求ID及び応答ID)が送信される(矢印AR13)。電子制御装置100では、書き換え領域AD1に対する識別IDの書き込みが行われる。
Subsequently, an identification ID (request ID and response ID) is transmitted from the
前工程における「ベリファイ」とは、ROM140に書き込まれた書き換えプログラム、市場用書き換えプログラム、及び識別IDが、正常に書き込まれたか否かを電子制御装置100側で判定する処理である。
“Verify” in the previous process is a process for determining on the
書き込み装置11から電子制御装置100に向けて、ベリファイ要求コマンドが送信される(矢印AR14)。ベリファイ要求コマンドは、電子制御装置100に対してベリファイの開始を要求するためのコマンドである。ベリファイ要求コマンドが受信されると、電子制御装置100ではベリファイの処理が開始される。
A verify request command is transmitted from the
電子制御装置100におけるベリファイの処理が完了すると、電子制御装置100から書き込み装置11に向けて、ベリファイ完了通知コマンドが送信される(矢印AR15)。これにより、ベリファイが完了した旨が書き込み装置11により認識される。
When the verification process in the
図5及び図6を参照しながら、後工程の具体的な態様について説明する。図5には、後工程が行われる際における、書き込み装置11と電子制御装置100との接続態様が模式的に示されている。図5に示されるように、後工程、すなわち制御プログラムの書き込みは、1つの書き込み装置11に対し、複数個の電子制御装置100が同一の通信バス12を介して接続された状態で行われる。
A specific aspect of the post-process will be described with reference to FIGS. FIG. 5 schematically shows a connection mode between the writing
図5に示される例では、N個の電子制御装置100が同一の通信バス12に接続されている。説明の便宜のため、以下の説明や図5等では、それぞれの電子制御装置100に1〜Nの番号を対応させた上で、例えば1番目の電子制御装置100のことを「電子制御装置1」のように表記することがある。同様に、2番目の電子制御装置100のことを「電子制御装置2」と表記することがあり、N番目の電子制御装置100のことを「電子制御装置N」と表記することがある。
In the example shown in FIG. 5, N
また、例えば1番目の電子制御装置100(電子制御装置1)については、符号100を符号101に置き換えて、「電子制御装置101」のように表記することもある。同様に、2番目の電子制御装置100(電子制御装置2)を電子制御装置102と表記することもある。
Further, for example, the first electronic control device 100 (electronic control device 1) may be represented as “
N個の電子制御装置100を、通信バス12を介して書き込み装置11に接続し、図5の状態とする工程は、本発明の「接続ステップ」に該当するものである。図5の状態において、書き込み装置11と電子制御装置100との間では再び通信が行われる。
The process of connecting the N
制御プログラムの書き換えのために、書き込み装置11と電子制御装置100との間で行われる通信は、図6に示される手順(シーケンス)で行われる。図6に示されるように、後工程では、消去、書き込み、及びベリファイが順に行われる。このような後工程は、本発明の「送信ステップ」に該当するものである。
Communication performed between the writing
ここでいう「消去」とは、前工程において書き換え領域AD1に書き込まれていた識別ID及び書き換えプログラムをRAM130に退避させた後、書き換え領域AD1に格納されている情報の全てを消去する処理である。このように、識別ID等が書き換え領域AD1には残されないので、制御プログラムの配置が識別ID等により制約されてしまうことが無い。
“Erase” here is a process of erasing all of the information stored in the rewrite area AD1 after saving the identification ID and rewrite program written in the rewrite area AD1 in the previous process to the
先ず、書き込み装置11から電子制御装置100に向けて、消去要求コマンドが送信される(矢印AR21)。消去要求コマンドは、電子制御装置100に対して消去の開始を要求するためのコマンドである。消去要求コマンドが受信されると、電子制御装置100では消去の処理が開始される。
First, an erase request command is transmitted from the
尚、消去要求コマンドは書き込み装置11から1回だけ送信され、全ての電子制御装置100により受信される。このため、全ての電子制御装置100では、消去の処理がほぼ同時に開始される。
The erase request command is transmitted only once from the
続いて、書き込み装置11から電子制御装置100に向けて、消去状態確認コマンドが送信される(矢印AR22)。消去状態確認コマンドは、それぞれの電子制御装置100において、消去の処理が完了したか否かを確認するためのコマンドである。電子制御装置100における消去の処理が完了している場合には、電子制御装置100からは消去完了通知コマンドが返信として書き込み装置11に送信される(矢印AR23)。一方、電子制御装置100における消去の処理が完了していない場合には、電子制御装置100からは消去中通知コマンドが返信として書き込み装置11に送信される。
Subsequently, an erase state confirmation command is transmitted from the
消去状態確認コマンドは、先ず1番目の電子制御装置100(電子制御装置1)に対して送信される(矢印AR22)。すなわち、電子制御装置1に割り振られたものと同一の識別ID(要求ID)が付された消去状態確認コマンドが、書き込み装置11から送信される。
The erase state confirmation command is first transmitted to the first electronic control device 100 (electronic control device 1) (arrow AR22). That is, an erase state confirmation command with the same identification ID (request ID) assigned to the
その後、電子制御装置1から消去完了通知コマンドが送信されるまでの間、すなわち、電子制御装置1に割り振られたものと同一の識別ID(応答ID)が付された消去完了通知コマンドが、電子制御装置1から送信されるまでの間は、電子制御装置1に対して消去状態確認コマンドが繰り返し送信される。
Thereafter, until the erasure completion notification command is transmitted from the
電子制御装置1から消去完了通知コマンドが送信されると(矢印AR23)、続いて2番目の電子制御装置100(電子制御装置2)に対して消去状態確認コマンドが送信される。以降も同様に、それぞれの電子制御装置100に対する消去状態確認コマンドの送信が順に行われる。
When an erase completion notification command is transmitted from the electronic control device 1 (arrow AR23), subsequently, an erase state confirmation command is transmitted to the second electronic control device 100 (electronic control device 2). Similarly, the erase state confirmation command is sequentially transmitted to each
N番目の電子制御装置100(電子制御装置N)に消去完了通知コマンドが送信され(矢印AR24)、これに対する消去完了通知コマンドが電子制御装置Nから送信されると(矢印AR25)、消去に続く書き込みの処理が開始される。 When an erasure completion notification command is transmitted to the Nth electronic control device 100 (electronic control device N) (arrow AR24) and an erasure completion notification command is transmitted from the electronic control device N (arrow AR25), erasure is continued. The writing process is started.
書き込み装置11からの消去状態確認コマンドの送信、及び、電子制御装置100からの消去完了通知コマンドの送信は、書き換え領域AD1の消去が完了したことを確認するための処理(第1確認処理)である。
The transmission of the erase state confirmation command from the
後工程における「書き込み」とは、書き換え領域AD1に制御プログラムを書き込む処理である。先ず、書き込み装置11から電子制御装置100に向けて、書き込み要求コマンドが送信され(矢印AR26)、それに続いて制御プログラムが送信される。書き込み要求コマンドは、電子制御装置100に対して書き込みの開始を要求するためのコマンドである。書き込み要求コマンド、及びそれに続く制御プログラムが受信されると、電子制御装置100では書き込みの処理が開始される。
“Writing” in the subsequent process is a process of writing a control program in the rewrite area AD1. First, a write request command is transmitted from the
消去要求コマンドと同様に、書き込み要求コマンド及び制御プログラムは書き込み装置11から1回だけ送信され、全ての電子制御装置100により受信される。このため、全ての電子制御装置100では、書き込みの処理がほぼ同時に開始される。尚、制御プログラムは比較的データ量が多いため、複数のブロックに分けられた状態で書き込み装置11から電子制御装置100へと送信される(矢印AR27)。
Similar to the erase request command, the write request command and the control program are transmitted only once from the
制御プログラムの送信が完了すると、書き込み装置11から電子制御装置100に向けて、書き込み状態確認コマンドが送信される(矢印AR28)。書き込み状態確認コマンドは、それぞれの電子制御装置100において、書き込みの処理が完了したか否かを確認するためのコマンドである。電子制御装置100における書き込みの処理が完了している場合には、電子制御装置100からは書き込み完了通知コマンドが返信として書き込み装置11に送信される(矢印AR29)。一方、電子制御装置100における書き込みの処理が完了していない場合には、電子制御装置100からは書き込み中通知コマンドが返信として書き込み装置11に送信される。
When the transmission of the control program is completed, a writing state confirmation command is transmitted from the
書き込み状態確認コマンドは、先ず1番目の電子制御装置100(電子制御装置1)に対して送信される(矢印AR28)。すなわち、電子制御装置1に割り振られたものと同一の識別ID(要求ID)が付された書き込み状態確認コマンドが、書き込み装置11から送信される。
The write status confirmation command is first transmitted to the first electronic control device 100 (electronic control device 1) (arrow AR28). That is, a writing state confirmation command with the same identification ID (request ID) as that assigned to the
その後、電子制御装置1から書き込み完了通知コマンドが送信されるまでの間、すなわち、電子制御装置1に割り振られたものと同一の識別ID(応答ID)が付された書き込み完了通知コマンドが、電子制御装置1から送信されるまでの間は、電子制御装置1に対して書き込み状態確認コマンドが繰り返し送信される。
Thereafter, until the writing completion notification command is transmitted from the
電子制御装置1から書き込み完了通知コマンドが送信されると(矢印AR29)、続いて2番目の電子制御装置100(電子制御装置2)に対して書き込み状態確認コマンドが送信される。以降も同様に、それぞれの電子制御装置100に対する書き込み状態確認コマンドの送信が順に行われる。
When a write completion notification command is transmitted from the electronic control device 1 (arrow AR29), a write state confirmation command is subsequently transmitted to the second electronic control device 100 (electronic control device 2). Similarly, the writing status confirmation command is sequentially transmitted to each
N番目の電子制御装置100(電子制御装置N)に書き込み完了通知コマンドが送信され(矢印AR30)、これに対する書き込み完了通知コマンドが電子制御装置Nから送信されると(矢印AR31)、書き込みに続くベリファイの処理が開始される。 When a write completion notification command is transmitted to the Nth electronic control device 100 (electronic control device N) (arrow AR30), and a write completion notification command is transmitted from the electronic control device N (arrow AR31), the writing is continued. The verification process is started.
書き込み装置11からの書き込み状態確認コマンドの送信、及び、電子制御装置100からの書き込み完了通知コマンドの送信は、書き換え領域AD1に対する制御プログラムの書き込みが完了したことを確認するための処理(第2確認処理)である。
The transmission of the write status confirmation command from the
後工程における「ベリファイ」とは、ROM140に書き込まれた制御プログラムが、正常に書き込まれたか否かを電子制御装置100側で判定する処理である。先ず、書き込み装置11から電子制御装置100に向けて、ベリファイ要求コマンドが送信される(矢印AR32)。ベリファイ要求コマンドは、電子制御装置100に対してベリファイの開始を要求するためのコマンドである。ベリファイ要求コマンドが受信されると、電子制御装置100ではベリファイの処理が開始される。
“Verify” in the subsequent process is a process for determining on the
消去要求コマンドや書き込み要求コマンドと同様に、ベリファイ要求コマンドは書き込み装置11から1回だけ送信され、全ての電子制御装置100により受信される。このため、全ての電子制御装置100では、ベリファイの処理がほぼ同時に開始される。
Similar to the erase request command and the write request command, the verify request command is transmitted only once from the
続いて、書き込み装置11から電子制御装置100に向けて、ベリファイ状態確認コマンドが送信される(矢印AR33)。ベリファイ状態確認コマンドは、それぞれの電子制御装置100において、ベリファイの処理が完了したか否かを確認するためのコマンドである。電子制御装置100におけるベリファイの処理が完了している場合には、電子制御装置100からはベリファイ完了通知コマンドが返信として書き込み装置11に送信される(矢印AR34)。一方、電子制御装置100におけるベリファイの処理が完了していない場合には、電子制御装置100からはベリファイ中通知コマンドが返信として書き込み装置11に送信される。
Subsequently, a verification state confirmation command is transmitted from the
ベリファイ状態確認コマンドは、先ず1番目の電子制御装置100(電子制御装置1)に対して送信される(矢印AR33)。すなわち、電子制御装置1に割り振られたものと同一の識別ID(要求ID)が付されたベリファイ状態確認コマンドが、書き込み装置11から送信される。
The verification state confirmation command is first transmitted to the first electronic control device 100 (electronic control device 1) (arrow AR33). That is, a verification state confirmation command to which the same identification ID (request ID) as that assigned to the
その後、電子制御装置1からベリファイ完了通知コマンドが送信されるまでの間、すなわち、電子制御装置1に割り振られたものと同一の識別ID(応答ID)が付されたベリファイ完了通知コマンドが、電子制御装置1から送信されるまでの間は、電子制御装置1に対してベリファイ状態確認コマンドが繰り返し送信される。
Thereafter, until the verification completion notification command is transmitted from the
電子制御装置1からベリファイ完了通知コマンドが送信されると(矢印AR34)、続いて2番目の電子制御装置100(電子制御装置2)に対してベリファイ状態確認コマンドが送信される。以降も同様に、それぞれの電子制御装置100に対するベリファイ状態確認コマンドの送信が順に行われる。
When a verification completion notification command is transmitted from the electronic control device 1 (arrow AR34), a verification state confirmation command is subsequently transmitted to the second electronic control device 100 (electronic control device 2). Similarly, the verification status confirmation command is sequentially transmitted to the respective
N番目の電子制御装置100(電子制御装置N)にベリファイ完了通知コマンドが送信され(矢印AR35)、これに対するベリファイ完了通知コマンドが電子制御装置Nから送信されると(矢印AR36)、以上に説明した後工程が完了する。 When a verification completion notification command is transmitted to the Nth electronic control device 100 (electronic control device N) (arrow AR35) and a verification completion notification command is transmitted from the electronic control device N (arrow AR36), the above description will be given. After that, the process is completed.
書き込み装置11からのベリファイ状態確認コマンドの送信、及び、電子制御装置100からのベリファイ完了通知コマンドの送信は、ベリファイが完了したこと、すなわち制御プログラムが正常に書き込まれたか否かの判定が完了したことを確認するための処理(第3確認処理)である。
The transmission of the verification status confirmation command from the
以上のように、電子制御装置100に対する制御プログラムの書き換えが行われるにあたっては、制御プログラムの送信等、処理の一部が複数の電子制御装置100において同時に行われる。図7には、同時に書き込みが行われる電子制御装置100の個数を2とした上で、後工程の各処理に要する時間が示されている。
As described above, when the rewriting of the control program for the
図7の例では、それぞれの電子制御装置100において消去の処理が開始される時刻を時刻t0とし、消去の処理が終了する時刻を時刻t10としている。また、それぞれの電子制御装置100において書き込みの処理が開始される時刻を時刻t12とし、書き込みの処理が終了する時刻を時刻t20としている。更に、それぞれの電子制御装置100においてベリファイの処理が開始される時刻を時刻t22とし、ベリファイの処理が終了する時刻を時刻t30としている。
In the example of FIG. 7, the time at which the erasing process is started in each
また、図7において「状態確認」と記載されている期間は、書き込み装置11から状態確認コマンド(消去状態確認コマンド等)が送信されてから、それに対応する完了通知コマンド(消去完了通知コマンド等)が電子制御装置100から送信される時点までの期間である。例えば、消去が完了した直後において、電子制御装置1に向けて消去状態確認コマンドが送信された時刻t10から、これに対応する消去完了通知コマンドが電子制御装置1から送信された時刻t11までの期間等が、上記の状態確認に該当する。
Further, during a period described as “status confirmation” in FIG. 7, after a status confirmation command (erase status confirmation command or the like) is transmitted from the
上記の他、図7では、電子制御装置1から書き込み完了通知コマンドが送信された時刻を時刻t21としており、電子制御装置1からベリファイ完了通知コマンドが送信された時刻を時刻t31としている。
In addition to the above, in FIG. 7, the time when the write completion notification command is transmitted from the
図7では、電子制御装置1から消去完了通知コマンドが送信されるのとほぼ同時(時刻t11)に、電子制御装置2に向けて消去状態確認コマンドが送信されている。これに対して電子制御装置2から消去完了通知コマンドが送信されると(時刻t12)、直ちに書き込みが開始されている。
In FIG. 7, an erasure state confirmation command is transmitted to the
また、電子制御装置1から書き込み完了通知コマンドが送信されるのとほぼ同時(時刻t21)に、電子制御装置2に向けて書き込み状態確認コマンドが送信されている。これに対して電子制御装置2から書き込み完了通知コマンドが送信されると(時刻t22)、直ちにベリファイが開始されている。
In addition, a writing state confirmation command is transmitted to the
更に、電子制御装置1からベリファイ完了通知コマンドが送信されるのとほぼ同時(時刻t31)に、電子制御装置2に向けてベリファイ状態確認コマンドが送信されている。これに対して電子制御装置2からベリファイ完了通知コマンドが送信された時刻を、図7では時刻t32としている。
Further, a verify state confirmation command is transmitted to the
図7に示されるように、本実施形態においては、それぞれの電子制御装置100における消去、書き込み、及びベリファイの処理が、いずれも同時に行われている。このため、制御プログラムの書き換え対象となる電子制御装置100の個数が更に増加したとしても、後工程の全体の時間、すなわち、時刻t0から時刻t32までの総書き換え時間が、電子制御装置100の個数に比例して増加することはない。
As shown in FIG. 7, in the present embodiment, the erase, write, and verify processes in the respective
尚、状態確認に要する時間は電子制御装置100の個数に応じて増加するのであるが、当該時間は書き込み等に要する時間に比べれば非常に短い。このため、電子制御装置100の個数が増加しても総書き換え時間は殆ど増加しない。
It should be noted that the time required for status confirmation increases with the number of
図8には、本発明によらない従来の方法によって制御プログラムの書き換えが行われた場合における、各処理に要する時間が示されている。図8の例では、先ず電子制御装置1に対して消去、書き込み、ベリファイの処理が順に行われた後、電子制御装置2に対して消去、書き込み、ベリファイの処理が順に行われる。
FIG. 8 shows the time required for each process when the control program is rewritten by a conventional method not according to the present invention. In the example of FIG. 8, the
具体的には、先ず電子制御装置1において、時刻t100から時刻t110までの期間において消去が行われ、続いて時刻t111までの期間において状態確認が行われる。その後、時刻t111から時刻t120までの期間において書き込みが行われ、時刻t121までの期間において状態確認が行われる。更にその後、時刻t121から時刻t130までの期間においてベリファイが行われ、時刻t131までの期間において状態確認が行われる。
Specifically, first, in the
時刻t131において、電子制御装置1に対する上記の処理がすべて完了すると、ほぼ同時に電子制御装置2に対する処理が開始される。時刻t131から時刻t140までの期間において消去が行われ、続いて時刻t141までの期間において状態確認が行われる。その後、時刻t141から時刻t150までの期間において書き込みが行われ、時刻t151までの期間において状態確認が行われる。更にその後、時刻t151から時刻t160までの期間においてベリファイが行われ、時刻t161までの期間において状態確認が行われる。
At time t131, when all the above processing for the
以上のようであるから、例えば電子制御装置1への書き込みが行われる期間(時刻t111から時刻t120までの期間)と、電子制御装置2への書き込みが行われる期間(時刻t141から時刻t150までの期間)とは、互いに重なっていない。消去やベリファイが行われる期間についても同様である。
As described above, for example, a period during which writing to the
その結果、図8の例における総書き換え時間、すなわち時刻t100から時刻t161までに要する時間は、図7の例における総書き換え時間に比べると長くなっている。また、図8に示される方法においては、制御プログラムの書き換え対象となる電子制御装置100の個数が増加すると、これにほぼ比例して総書き換え時間は増加してしまうことになる。
As a result, the total rewriting time in the example of FIG. 8, that is, the time required from time t100 to time t161 is longer than the total rewriting time in the example of FIG. In the method shown in FIG. 8, when the number of
以上の説明で明らかなように、本実施形態に係る電子制御装置100では、書き込み装置11の個数を増加させることなく、制御プログラムの書き換えに要する時間を従来に比べて大幅に短縮することが可能となっている。
As is clear from the above description, in the
図6を参照しながら説明した後工程において、電子制御装置100及び書き込み装置11のそれぞれで行われる具体的な処理の流れについて、図9及び図10を参照しながら説明する。
In the subsequent process described with reference to FIG. 6, a specific processing flow performed in each of the
図9は、電子制御装置100側で行われる処理の流れを示すフローチャートである。最初のステップS01では、書き込み装置11からの消去要求コマンドが受信されたか否かが判定される。消去要求コマンドが未だ受信されていない場合には、ステップS01の処理が繰り返される。消去要求コマンドが受信されればステップS02に移行する。
FIG. 9 is a flowchart showing a flow of processing performed on the
ステップS02では、前工程において書き換え領域AD1に書き込まれていた識別ID及び書き換えプログラムを、RAM130に転送し退避させる。ステップS02に続くステップS03では、書き換え領域AD1の消去が開始される。
In step S02, the identification ID and the rewrite program written in the rewrite area AD1 in the previous process are transferred to the
ステップS03に続くステップS04では、書き込み装置11からの消去状態確認コマンドが受信されたか否かが判定される。すなわち、当該電子制御装置100のRAM130に記憶されている識別ID(要求ID)と同一の識別IDが付された消去状態確認コマンドが受信されたか否かが判定される。消去状態確認コマンドが未だ受信されていない場合には、ステップS04の処理が繰り返される。消去状態確認コマンドが受信されればステップS05に移行する。
In step S04 following step S03, it is determined whether an erase state confirmation command from the
ステップS05では、ステップS03で開始された消去の処理が、現時点で完了しているか否かが判定される。消去が完了していなければステップS06に移行する。ステップS06では、書き込み装置11に向けて消去中通知コマンドが送信される。その後、ステップS04以降の処理が再度実行される。
In step S05, it is determined whether or not the erasing process started in step S03 is completed at the present time. If the erasure is not completed, the process proceeds to step S06. In step S06, an erasing notification command is transmitted to the
ステップS05において、消去が完了していた場合にはステップS07に移行する。ステップS07では、書き込み装置11に向けて消去完了通知コマンドが送信される。その後、ステップS11に移行する。
If the erasure has been completed in step S05, the process proceeds to step S07. In step S07, an erasure completion notification command is transmitted to the
ステップS11では、書き込み装置11からの書き込み要求コマンドが受信されたか否かが判定される。書き込み要求コマンドが未だ受信されていない場合には、ステップS11の処理が繰り返される。書き込み要求コマンドが受信されればステップS12に移行する。ステップS12では、書き込み装置11からの制御プログラムの受信、及び書き換え領域AD1に対する制御プログラムの書き込みが開始される。かかる処理は、当該電子制御装置100のRAM130に記憶されている書き換えプログラムにより実行される。
In step S11, it is determined whether a write request command from the
ステップS12に続くステップS13では、書き込み装置11からの書き込み状態確認コマンドが受信されたか否かが判定される。すなわち、当該電子制御装置100のRAM130に記憶されている識別ID(要求ID)と同一の識別IDが付された書き込み状態確認コマンドが受信されたか否かが判定される。書き込み状態確認コマンドが未だ受信されていない場合には、ステップS13の処理が繰り返される。書き込み状態確認コマンドが受信されればステップS14に移行する。
In step S13 subsequent to step S12, it is determined whether or not a write state confirmation command from the
ステップS14では、ステップS12で開始された書き込みの処理が、現時点で完了しているか否かが判定される。書き込みが完了していなければステップS15に移行する。ステップS15では、書き込み装置11に向けて書き込み中通知コマンドが送信される。その後、ステップS13以降の処理が再度実行される。
In step S14, it is determined whether or not the writing process started in step S12 is completed at the present time. If the writing has not been completed, the process proceeds to step S15. In step S <b> 15, a writing notification command is transmitted to the
ステップS14において、書き込みが完了していた場合にはステップS16に移行する。ステップS16では、書き込み装置11に向けて書き込み完了通知コマンドが送信される。その後、ステップS21に移行する。
If the writing has been completed in step S14, the process proceeds to step S16. In step S <b> 16, a write completion notification command is transmitted to the
ステップS21では、書き込み装置11からのベリファイ要求コマンドが受信されたか否かが判定される。ベリファイ要求コマンドが未だ受信されていない場合には、ステップS21の処理が繰り返される。ベリファイ要求コマンドが受信されればステップS22に移行する。ステップS22ではベリファイの処理が開始される。
In step S21, it is determined whether or not a verify request command from the
ステップS22に続くステップS23では、書き込み装置11からのベリファイ状態確認コマンドが受信されたか否かが判定される。すなわち、当該電子制御装置100のRAM130に記憶されている識別ID(要求ID)と同一の識別IDが付されたベリファイ状態確認コマンドが受信されたか否かが判定される。ベリファイ状態確認コマンドが未だ受信されていない場合には、ステップS23の処理が繰り返される。ベリファイ状態確認コマンドが受信されればステップS24に移行する。
In step S23 following step S22, it is determined whether or not a verify state confirmation command from the
ステップS24では、ステップS22で開始されたベリファイの処理が、現時点で完了しているか否かが判定される。ベリファイが完了していなければステップS25に移行する。ステップS25では、書き込み装置11に向けてベリファイ中通知コマンドが送信される。その後、ステップS23以降の処理が再度実行される。
In step S24, it is determined whether or not the verify process started in step S22 is completed at the present time. If the verification is not completed, the process proceeds to step S25. In step S <b> 25, a verifying notification command is transmitted to the
ステップS24において、ベリファイが完了していた場合にはステップS26に移行する。ステップS26では、ベリファイの結果が異常を示すものであったか否かが判定される。ベリファイの結果が正常であれば、図9に示される一連の処理を終了する。ベリファイの結果が異常を示すものであった場合には、ステップS27に移行する。 If verification has been completed in step S24, the process proceeds to step S26. In step S <b> 26, it is determined whether or not the verification result indicates abnormality. If the result of verification is normal, the series of processes shown in FIG. 9 is terminated. If the verification result indicates an abnormality, the process proceeds to step S27.
ステップS27に移行した場合には、書き換え領域AD1に対する制御プログラムの書き込みが正常に行われておらず、当該制御プログラムは正常に動作し得ないということである。このため、ステップS27では、RAM130に記憶(退避)されていた識別IDと書き換えプログラムとが、ROM140の書き換え領域AD1に書き戻される。その結果、ROM140は、図2(B)の状態に戻される。
When the process proceeds to step S27, the control program is not normally written in the rewrite area AD1, and the control program cannot operate normally. Therefore, in step S27, the identification ID and rewrite program stored (saved) in the
尚、ステップS03における消去や、ステップS12における制御プログラムの書き込みが行われている途中の時点においても、何らかの異常が生じる可能性がある。このように異常が生じた場合には、割り込み処理によって強制的にステップS27の処理が実行され、ROM140が図2(B)の状態に戻される。
It should be noted that some abnormality may occur even at the time when the erasure in step S03 or the control program is written in step S12. When an abnormality occurs in this way, the process of step S27 is forcibly executed by the interrupt process, and the
図10は、書き込み装置11側で行われる処理の流れを示すフローチャートである。最初のステップS31では、全ての電子制御装置100に向けた消去要求コマンドの送信が行われる。これにより、全ての電子制御装置100において消去の処理が同時に開始される。
FIG. 10 is a flowchart showing the flow of processing performed on the
ステップS31に続くステップS32では、変数nの値が1とされる。変数nは、書き込み装置11のメモリ内に確保された情報の格納場所である。変数nには、消去状態確認コマンド等の送信対象となる電子制御装置100、に対応する番号が記憶される。例えば、変数nの値が1のときには、消去状態確認コマンドや書き込み状態確認コマンド等が電子制御装置1(電子制御装置101)に向けて送信される。すなわち、電子制御装置1に割り振られたものと同一の識別ID(要求ID)が付された消去状態確認コマンド等が送信される。
In step S32 following step S31, the value of the variable n is set to 1. The variable n is a storage location of information secured in the memory of the
ステップS32に続くステップS33では、電子制御装置100に向けた消去状態確認コマンドの送信が行われる。この場合、変数nの値は1であるから、消去状態確認コマンドは電子制御装置1に向けて送信される。
In step S33 following step S32, an erase state confirmation command is transmitted to the
ステップS33に続くステップS34では、電子制御装置100からの消去中通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付された消去中通知コマンドが受信されたか否かが判定される。消去中通知コマンドが受信された場合には、ステップS33以降の処理が繰り返される。消去中通知コマンドが受信されなければステップS35に移行する。
In step S34 subsequent to step S33, it is determined whether an erasure notification command from the
ステップS35では、電子制御装置100からの消去完了通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付された消去完了通知コマンドが受信されたか否かが判定される。消去完了通知コマンドが未だ受信されていない場合には、ステップS35の処理が繰り返される。消去完了通知コマンドが受信されればステップS36に移行する。
In step S35, it is determined whether or not an erasure completion notification command has been received from the
ステップS36では、変数nの値が、電子制御装置100の個数(N)に等しいか否かが判定される。変数nの値がNよりも小さければ、ステップS37に移行する。ステップS37では、変数nの値に1が加算される。その後、ステップS33以降の処理が再度実行される。
In step S36, it is determined whether or not the value of the variable n is equal to the number (N) of the
つまり、電子制御装置1との間における状態確認(消去状態確認コマンドの送信等)が完了すると、続いて電子制御装置2との間における状態確認が行われる。このような処理が繰り返されることにより、全ての電子制御装置100との間における状態確認が行われることとなる。
That is, when the state confirmation with the electronic control device 1 (transmission of an erase state confirmation command or the like) is completed, the state confirmation with the
ステップS36において、変数nの値がNに等しい場合には、全ての電子制御装置100との間における状態確認が完了したということである。この場合、ステップS41に移行する。
In step S36, when the value of the variable n is equal to N, it means that the state confirmation with all the
ステップS41では、全ての電子制御装置100に向けた書き込み要求コマンドの送信、及び制御プログラムの送信が行われる。これにより、全ての電子制御装置100において制御プログラムの書き込みが同時に開始される。
In step S41, a write request command and a control program are sent to all the
ステップS41に続くステップS42では、変数nの値が再び1とされる。ステップS42に続くステップS43では、電子制御装置100に向けた書き込み状態確認コマンドの送信が行われる。この場合、変数nの値は1であるから、書き込み状態確認コマンドは電子制御装置1に向けて送信される。
In step S42 following step S41, the value of the variable n is set to 1 again. In step S43 following step S42, a write state confirmation command is transmitted to the
ステップS43に続くステップS44では、電子制御装置100からの書き込み中通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付された書き込み中通知コマンドが受信されたか否かが判定される。書き込み中通知コマンドが受信された場合には、ステップS43以降の処理が繰り返される。書き込み中通知コマンドが受信されなければステップS45に移行する。
In step S44 following step S43, it is determined whether or not a writing notification command from the
ステップS45では、電子制御装置100からの書き込み完了通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付された書き込み完了通知コマンドが受信されたか否かが判定される。書き込み完了通知コマンドが未だ受信されていない場合には、ステップS45の処理が繰り返される。書き込み完了通知コマンドが受信されればステップS46に移行する。
In step S45, it is determined whether a write completion notification command from the
ステップS46では、変数nの値が、電子制御装置100の個数(N)に等しいか否かが判定される。変数nの値がNよりも小さければ、ステップS47に移行する。ステップS47では、変数nの値に1が加算される。その後、ステップS43以降の処理が再度実行される。
In step S46, it is determined whether or not the value of the variable n is equal to the number (N) of the
つまり、電子制御装置1との間における状態確認(書き込み状態確認コマンドの送信等)が完了すると、続いて電子制御装置2との間における状態確認が行われる。このような処理が繰り返されることにより、全ての電子制御装置100との間における状態確認が行われることとなる。
That is, when the state confirmation (such as transmission of a write state confirmation command) with the
ステップS46において、変数nの値がNに等しい場合には、全ての電子制御装置100との間における状態確認が完了したということである。この場合、ステップS51に移行する。
In step S46, when the value of the variable n is equal to N, it means that the state confirmation with all the
ステップS51では、全ての電子制御装置100に向けたベリファイ要求コマンドの送信が行われる。これにより、全ての電子制御装置100においてベリファイの処理が同時に開始される。
In step S51, a verify request command is transmitted to all the
ステップS51に続くステップS52では、変数nの値が再び1とされる。ステップS52に続くステップS53では、電子制御装置100に向けたベリファイ状態確認コマンドの送信が行われる。この場合、変数nの値は1であるから、ベリファイ状態確認コマンドは電子制御装置1に向けて送信される。
In step S52 following step S51, the value of the variable n is set to 1 again. In step S53 following step S52, a verification state confirmation command is transmitted to the
ステップS53に続くステップS54では、電子制御装置100からのベリファイ中通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付されたベリファイ中通知コマンドが受信されたか否かが判定される。ベリファイ中通知コマンドが受信された場合には、ステップS53以降の処理が繰り返される。ベリファイ中通知コマンドが受信されなければステップS55に移行する。
In step S54 subsequent to step S53, it is determined whether or not a verifying notification command from the
ステップS55では、電子制御装置100からのベリファイ完了通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付されたベリファイ完了通知コマンドが受信されたか否かが判定される。ベリファイ完了通知コマンドが未だ受信されていない場合には、ステップS55の処理が繰り返される。ベリファイ完了通知コマンドが受信されればステップS56に移行する。
In step S55, it is determined whether or not a verification completion notification command from the
ステップS56では、変数nの値が、電子制御装置100の個数(N)に等しいか否かが判定される。変数nの値がNよりも小さければ、ステップS57に移行する。ステップS57では、変数nの値に1が加算される。その後、ステップS53以降の処理が再度実行される。
In step S56, it is determined whether or not the value of the variable n is equal to the number (N) of the
つまり、電子制御装置1との間における状態確認(ベリファイ状態確認コマンドの送信等)が完了すると、続いて電子制御装置2との間における状態確認が行われる。このような処理が繰り返されることにより、全ての電子制御装置100との間における状態確認が行われることとなる。
That is, when the state confirmation (e.g., transmission of a verify state confirmation command) with the
ステップS56において、変数nの値がNに等しい場合には、全ての電子制御装置100との間における状態確認が完了したということである。このため、図10に示される一連の処理を終了する。
In step S56, if the value of the variable n is equal to N, it means that the state confirmation with all the
尚、本実施形態においては、書き換えプログラムと識別IDとが、前工程において書き換え領域AD1に書き込まれ、その後RAM130に転送される。このような態様に替えて、書き換えプログラムと識別IDとが、書き換え領域AD1を経由することなく直接RAM130に書き込まれるような態様であってもよい。この場合、書き換えプログラムと識別IDとをROM140に書き込むための時間が省略されるので、総書き込み時間をより短縮することができる。
In the present embodiment, the rewrite program and the identification ID are written in the rewrite area AD1 in the previous process and then transferred to the
これまでに説明した第1実施形態では、1つの電子制御装置100に1つのマイコン110(従って1つのROM140)が搭載されている例について説明した。しかしながら、本発明は、1つの電子制御装置100に複数のマイコン110(従って複数のROM140)が搭載されている場合にも適用可能である。
In the first embodiment described so far, the example in which one microcomputer 110 (and thus one ROM 140) is mounted on one
図11には、本発明の第2実施形態に係る2つの電子制御装置100(電子制御装置101、102)が、通信バス12を介して書き込み装置11に接続された状態が示されている。本実施形態における電子制御装置100は、2つのマイコン110、210を備えている点において、第1実施形態に係る電子制御装置100と異なっている。
FIG. 11 shows a state in which two electronic control devices 100 (
マイコン110と同様に、マイコン210も外部通信部220、RAM230、及びROM240を備えている。以下の説明では、電子制御装置101に備えられたマイコン110のROM140のことを、「ROM141」とも表記する。また、電子制御装置101に備えられたマイコン210のROM240のことを、「ROM241」とも表記する。
Similar to the
同様に、電子制御装置102に備えられたマイコン110のROM140のことを、「ROM142」とも表記する。また、電子制御装置102に備えられたマイコン210のROM240のことを、「ROM242」とも表記する。
Similarly, the
ROM141に書き込まれる制御プログラムと、ROM142に書き込まれる制御プログラムとは互いに同一であるとする。また、ROM241に書き込まれる制御プログラムと、ROM242に書き込まれる制御プログラムとは互いに同一であるとする。
It is assumed that the control program written in the
このような場合には、第1実施形態において説明した方法と同様の方法により、ROM141及びROM142の両方に対する制御プログラムの書き込みが、同時に行われればよい。その後、ROM241及びROM242の両方に対する制御プログラムの書き込みが、やはり同時に行われればよい。
In such a case, the control program may be written to both the
この場合、通信バス12に接続された全てのマイコン(電子制御装置101のマイコン110、210、及び電子制御装置102のマイコン110、210)のそれぞれに対して、互いに異なる個別の識別ID(要求ID、応答ID)が割り振られればよい。各マイコンに個別の識別IDが割り振られれば、図11のように接続された状態においても、同時書き込みを行うことにより総書き込み時間を短縮することができる。
In this case, each of all the microcomputers connected to the communication bus 12 (the
以上、具体例を参照しつつ本発明の実施の形態について説明した。なお、通信バス12の通信線は、書き込み装置11と電子制御装置100との間の通信方式によって決定されるものである(CANの場合:2線)。しかし、本発明はこれらの具体例に限定されるものではない。すなわち、これら具体例に、当業者が適宜設計変更を加えたものも、本発明の特徴を備えている限り、本発明の範囲に包含される。例えば、前述した各具体例が備える各要素およびその配置、材料、条件、形状、サイズなどは、例示したものに限定されるわけではなく適宜変更することができる。また、前述した各実施の形態が備える各要素は、技術的に可能な限りにおいて組み合わせることができ、これらを組み合わせたものも本発明の特徴を含む限り本発明の範囲に包含される。
The embodiments of the present invention have been described above with reference to specific examples. The communication line of the
10:書き換えシステム
11:書き込み装置
12:通信バス
100,101,102:電子制御装置
110,210:マイコン
120,220:外部通信部
140,141,142,240,241,242:ROM
130,230:RAM
AD1:書き換え領域
10: rewrite system 11: writing device 12:
130, 230: RAM
AD1: Rewrite area
Claims (4)
複数の前記車載電子制御装置(100)が、同一の通信バス(12)を介して1つの書き込み装置(11)に接続される接続ステップと、
前記通信バスに接続された全ての前記車載電子制御装置に対し、前記書き込み装置から1回だけ前記制御プログラムが送信され、前記制御プログラムがそれぞれの前記マイコン(110)の書き換え領域(AD1)に同時に書き込まれる送信ステップと、
を経ることにより、制御プログラムが書き換えられるものであり、
前記送信ステップにおける前記制御プログラムの書き込みは、前記書き換え領域に予め書き込まれていた書き換えプログラムによって行われ、
前記送信ステップが完了した時点においては、前記書き換えプログラムは前記制御プログラムによって上書きされた状態となっており、
それぞれの前記マイコンの前記書き換え領域には、互いに異なる個別の識別IDが予め書き込まれており、
前記送信ステップにおいては、
前記書き換え領域の消去が完了したことを確認する第1確認処理と、
前記制御プログラムの書き込みが完了したことを確認する第2確認処理と、
前記制御プログラムが正常に書き込まれたか否かの判定が完了したことを確認する第3確認処理とが、前記識別IDを用いてそれぞれの前記車載電子制御装置毎に実施され、
前記送信ステップが完了した時点においては、前記識別IDは前記制御プログラムによって上書きされた状態となっていることを特徴とする車載電子制御装置。 An in-vehicle electronic control device capable of rewriting a control program for a microcomputer,
A connection step in which a plurality of the on-vehicle electronic control devices (100) are connected to one writing device (11) via the same communication bus (12);
The control program is transmitted only once from the writing device to all the in-vehicle electronic control devices connected to the communication bus, and the control program is simultaneously transmitted to the rewrite area (AD1) of each microcomputer (110). A send step to be written; and
Through the, which control program is rewritten,
The writing of the control program in the transmission step is performed by a rewriting program written in advance in the rewriting area,
At the time when the transmission step is completed, the rewriting program is overwritten by the control program,
Different identification IDs different from each other are written in advance in the rewrite area of each of the microcomputers.
In the transmission step,
A first confirmation process for confirming that the erasure of the rewrite area is completed;
A second confirmation process for confirming that the writing of the control program is completed;
A third confirmation process for confirming that the determination of whether or not the control program has been normally written is completed is performed for each of the on-vehicle electronic control devices using the identification ID,
The vehicle-mounted electronic control device according to claim 1, wherein when the transmission step is completed, the identification ID is overwritten by the control program .
それぞれの前記車載電子制御装置において、前記書き換えプログラムと前記識別IDとが、前記書き換え領域からRAM(130)へと転送され記憶されており、
前記送信ステップにおいて異常が生じた場合には、前記RAMに記憶されていた前記書き換えプログラムと前記識別IDとが、前記書き換え領域に書き戻されることを特徴とする、請求項1に記載の車載電子制御装置。 Before the sending step is started,
In each of the on-vehicle electronic control devices, the rewriting program and the identification ID are transferred from the rewriting area to the RAM (130) and stored.
When an abnormality in the transmitting step occurs, and the rewrite program which has been stored in the RAM and the identification ID, characterized in that it is written back to the rewrite area, vehicle electronic according to claim 1 Control device.
前記識別IDは、
前記通信バスに接続された前記車載電子制御装置の全ての前記マイコン、のそれぞれに対して互いに異なるよう個別に割り振られており、これにより前記制御プログラムの同時書き込みが実施されることを特徴とする、請求項2に記載の車載電子制御装置。 Each of the in-vehicle electronic control devices is equipped with a plurality of the microcomputers,
The identification ID is
All of the microcomputers of the in-vehicle electronic control device connected to the communication bus are individually allocated to be different from each other, whereby the control program is simultaneously written. The on-vehicle electronic control device according to claim 2 .
前記送信ステップが開始される前に、前記書き込み装置からそれぞれの前記車載電子制御装置へと送信され、前記書き換え領域に書き込まれることなくRAMに記憶されることを特徴とする、請求項1に記載の車載電子制御装置。 The rewriting program and the identification ID are
Before the transmission step is initiated, sent to each of the vehicle electronic control unit from the writing device, characterized in that it is stored in the RAM without being written in the rewritable area, according to claim 1 In-vehicle electronic control device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015088287A JP6387894B2 (en) | 2015-04-23 | 2015-04-23 | In-vehicle electronic control unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015088287A JP6387894B2 (en) | 2015-04-23 | 2015-04-23 | In-vehicle electronic control unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016206967A JP2016206967A (en) | 2016-12-08 |
JP6387894B2 true JP6387894B2 (en) | 2018-09-12 |
Family
ID=57487685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015088287A Active JP6387894B2 (en) | 2015-04-23 | 2015-04-23 | In-vehicle electronic control unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6387894B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0233690A (en) * | 1988-07-25 | 1990-02-02 | Nippon Telegr & Teleph Corp <Ntt> | Method for issuing ic card |
FR2825812B1 (en) * | 2001-06-12 | 2003-12-05 | St Microelectronics Sa | PARALLEL PROGRAMMING / REPROGRAMMING METHOD OF ON-BOARD FLASH MEMORY BY CAN BUS |
JP2008198318A (en) * | 2007-02-15 | 2008-08-28 | Nec Corp | Read only memory writing device, target device, and read only memory writing system |
JP6192334B2 (en) * | 2013-03-29 | 2017-09-06 | 日立オートモティブシステムズ株式会社 | Electronic control device program rewriting method, electronic control device, and rewriting device |
-
2015
- 2015-04-23 JP JP2015088287A patent/JP6387894B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2016206967A (en) | 2016-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2016224898A (en) | On-vehicle electronic control device | |
JP4742102B2 (en) | Improved checking method for automotive control system | |
CN112148326A (en) | Remote updating method, device and system for Internet of things equipment firmware | |
US8136108B2 (en) | Updating firmware with multiple processors | |
JP4302113B2 (en) | In-vehicle control device | |
CN110765223A (en) | Map updating processing method, device, equipment and storage medium | |
CN105468384A (en) | Vehicle-mounted controller programming system and method, server and programming terminal | |
JP3493772B2 (en) | Control software specification change system | |
US20060218340A1 (en) | Data validity determining method for flash EEPROM and electronic control system | |
WO2019123747A1 (en) | Electronic control device for automobile and control method thereof | |
US9367482B2 (en) | Systems and methods to extend ROM functionality | |
JP6387894B2 (en) | In-vehicle electronic control unit | |
JP7216559B2 (en) | How to use electronic controllers and non-volatile memory | |
US20220405083A1 (en) | Ota master, system, method, non-transitory storage medium, and vehicle | |
RU2735965C1 (en) | Method for commissioning air conditioning system, computer-readable data medium and air conditioning system | |
JP6935694B2 (en) | Electronic control device | |
JP5945044B2 (en) | Electronic control device for automobile, writing system for electronic control device for automobile, and writing method of control program for vehicle control | |
JP6984203B2 (en) | Electronic control device and update software distribution system | |
JP5034866B2 (en) | In-vehicle control device | |
JP2022103451A (en) | Equipment for checking software integrity and vehicles equipped with it, methods and programs for checking software integrity | |
JP6528700B2 (en) | In-vehicle control device and in-vehicle network including in-vehicle control device | |
KR100601655B1 (en) | A device connected via a predetermined network to automatically update firmware and a method of updating the firmware of the devices | |
CN108170443A (en) | Vehicle-mounted LIN buses part software refreshing system and method | |
JP2012096763A (en) | Fault-diagnosis control system and method for vehicle | |
US20220413873A1 (en) | Electronic apparatus and operation method thereof having elastic boot file allocation mechanism |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170725 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180411 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180424 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180529 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180717 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180730 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6387894 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |