JP2016206967A - On-vehicle electronic control device - Google Patents

On-vehicle electronic control device Download PDF

Info

Publication number
JP2016206967A
JP2016206967A JP2015088287A JP2015088287A JP2016206967A JP 2016206967 A JP2016206967 A JP 2016206967A JP 2015088287 A JP2015088287 A JP 2015088287A JP 2015088287 A JP2015088287 A JP 2015088287A JP 2016206967 A JP2016206967 A JP 2016206967A
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.)
Granted
Application number
JP2015088287A
Other languages
Japanese (ja)
Other versions
JP6387894B2 (en
Inventor
上原 一浩
Kazuhiro Uehara
一浩 上原
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 JP2015088287A priority Critical patent/JP6387894B2/en
Publication of JP2016206967A publication Critical patent/JP2016206967A/en
Application granted granted Critical
Publication of JP6387894B2 publication Critical patent/JP6387894B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an on-vehicle electronic control device that can rewrite a control program in a short time without increasing facility costs.SOLUTION: A plurality of electronic control devices 100 rewrite a control program by going through a connection step of being connected with one writing device 11 via the same communication bus 12 and a transmission step of the writing device 11 transmitting a control program only once to all the electronic control devices 100 connected with the communication bus 12 and the control program being simultaneously written in a rewriting region in a ROM 140 of a microcomputer 110 of each of the electronic control devices.SELECTED DRAWING: Figure 1

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 Patent Document 1 below). In particular, when modifying an existing control program, it is preferable to rewrite the control program in the on-board state as described above, rather than replacing the ROM of the microcomputer. In addition, for example, in the manufacturing process of an in-vehicle electronic control device, when a control program is written to a new ROM, writing in the on-board state as described above is often performed.

特開2014−182571号公報JP 2014-182571 A

オンボード状態での制御プログラムの書き換えは、従来、書き込み装置と車載電子制御装置とを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回だけ制御プログラムが送信され、制御プログラムがそれぞれのマイコンの書き換え領域に同時に書き込まれる送信ステップと、を経ることにより制御プログラムが書き換えられる。   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.

このような車載電子制御装置の制御プログラムが書き換えられる際には、先ず、他の車載電子制御装置と共に同一の通信バスに接続された状態とされる。続いて、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.

本発明の第1実施形態に係る車載電子制御装置の構成を模式的に示す図である。It is a figure which shows typically the structure of the vehicle-mounted electronic control apparatus which concerns on 1st Embodiment of this invention. 制御プログラムの書き換えが行われる際における、ROMの状態の変化を示す図である。It is a figure which shows the change of the state of ROM at the time of rewriting of a control program. 図1の車載電子制御装置が書き込み装置と接続された状態を示す図である。It is a figure which shows the state by which the vehicle-mounted electronic control apparatus of FIG. 1 was connected with the writing device. 書き込みの前工程において、書き込み装置と車載電子制御装置との間で行われる通信の手順を示す図である。It is a figure which shows the procedure of the communication performed between a writing device and a vehicle-mounted electronic control apparatus in the pre-process of writing. 図1の車載電子制御装置が書き込み装置と接続された状態を示す図である。It is a figure which shows the state by which the vehicle-mounted electronic control apparatus of FIG. 1 was connected with the writing device. 書き込みの後工程において、書き込み装置と車載電子制御装置との間で行われる通信の手順を示す図である。It is a figure which shows the procedure of the communication performed between a writing device and a vehicle-mounted electronic control apparatus in the post process of writing. 図1の車載電子制御装置に対して制御プログラムの書き込みが行われる際における、各処理に要する時間を示す図である。It is a figure which shows the time which each process requires when a control program is written with respect to the vehicle-mounted electronic control apparatus of FIG. 従来の車載電子制御装置に対して制御プログラムの書き込みが行われる際における、各処理に要する時間を示す図である。It is a figure which shows the time which each process requires when the control program is written with respect to the conventional vehicle-mounted electronic control apparatus. 図1の車載電子制御装置側で行われる処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process performed by the vehicle-mounted electronic control apparatus side of FIG. 図1の書き込み装置側で行われる処理の流れを示すフローチャートである。2 is a flowchart showing a flow of processing performed on the writing device side of FIG. 1. 本発明の第2実施形態に係る車載電子制御装置の構成を模式的に示す図である。It is a figure which shows typically the structure of the vehicle-mounted electronic control apparatus which concerns on 2nd Embodiment of this invention.

以下、添付図面を参照しながら本発明の実施形態について説明する。説明の理解を容易にするため、各図面において同一の構成要素に対しては可能な限り同一の符号を付して、重複する説明は省略する。   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 in-vehicle electronic control device (hereinafter referred to as “electronic control device 100”) according to the first embodiment of the present invention will be described with reference to FIG. The electronic control device 100 is a control device mounted on a vehicle, and is configured as a device for controlling fuel injection in an internal combustion engine, for example. The electronic control device 100 is also called a so-called ECU.

電子制御装置100は、その主たる構成要素としてマイコン110を備えている。マイコン110は、不図示のCPUの他、外部通信部120と、RAM130と、ROM140とを備えている。   The electronic control device 100 includes a microcomputer 110 as its main component. The microcomputer 110 includes an external communication unit 120, a RAM 130, and a ROM 140 in addition to a CPU (not shown).

外部通信部120は、外部と通信が行われる際のインターフェースとなる部分である。電子制御装置100は、外部通信部120を介して信号の送受信を行うことにより、他の通信機器(例えば後述の書き込み装置11)との間において双方向の通信を行うことが可能となっている。   The external communication unit 120 is a part serving as an interface when communication with the outside is performed. The electronic control device 100 can perform bidirectional communication with other communication devices (for example, a writing device 11 described later) by transmitting and receiving signals via the external communication unit 120. .

RAM130は、マイコン110に備えられた揮発性メモリである。RAM130は、CPUにより制御プログラムが実行される際における一時的な情報の格納場所として用いられる。また、後に説明するように、ROM140に対する制御プログラムの書き換えが行われる際には、RAM130は書き換えプログラム等の格納場所としても用いられる。   The RAM 130 is a volatile memory provided in the microcomputer 110. The RAM 130 is used as a temporary information storage location when the control program is executed by the CPU. As will be described later, when the control program is rewritten to the ROM 140, the RAM 130 is also used as a storage place for the rewrite program and the like.

ROM140は、マイコン110に備えられた不揮発性メモリである。ROM140には、CPUにより実行される制御プログラム等が記憶されている。ROM140はフラッシュメモリであり、記憶されている制御プログラム等をオンボードの状態で書き換えること(新規に書き込むことも含む)が可能となっている。   The ROM 140 is a nonvolatile memory provided in the microcomputer 110. The ROM 140 stores a control program executed by the CPU. The ROM 140 is a flash memory that can rewrite a stored control program or the like in an on-board state (including new writing).

制御プログラムの書き換えは、図1に示される書き換えシステム10により行われる。書き換えシステム10は、書き込み装置11と通信バス12とにより構成されている。書き込み装置11は、CPU、ROM、RAM、通信インターフェースを備えたコンピュータシステムとして構成されており、電子制御装置100と双方向の通信を行いながら、マイコン110のROM140に制御プログラムを書き込むための装置である。   The rewriting of the control program is performed by the rewriting system 10 shown in FIG. The rewriting system 10 includes a writing device 11 and a communication bus 12. The writing device 11 is configured as a computer system including a CPU, a ROM, a RAM, and a communication interface, and is a device for writing a control program in the ROM 140 of the microcomputer 110 while performing bidirectional communication with the electronic control device 100. is there.

通信バス12は、書き込み装置11と電子制御装置100が通信を行う際における信号の伝達経路である。通信バス12により、書き込み装置11の通信インターフェース(不図示)と、電子制御装置100の外部通信部120とが接続される。尚、図1においては、1つの書き込み装置11に対して1つの電子制御装置100が接続された状態が示されているが、後に説明するように、1つの書き込み装置11に対して複数の電子制御装置100を接続し、それら複数の電子制御装置100に対して制御プログラムの書き換えを同時に行うことも可能となっている。   The communication bus 12 is a signal transmission path when the writing device 11 and the electronic control device 100 communicate with each other. A communication interface (not shown) of the writing device 11 and the external communication unit 120 of the electronic control device 100 are connected by the communication bus 12. FIG. 1 shows a state in which one electronic control device 100 is connected to one writing device 11, but as will be described later, a plurality of electrons are connected to one writing device 11. It is also possible to connect the control device 100 and simultaneously rewrite the control program for the plurality of electronic control devices 100.

制御プログラムの書き換えについて説明する。図2には、制御プログラムの書き換えが行われる際におけるROM140の状態の変化、具体的には、ROM140に記憶されている情報の変化が示されている。   The rewriting of the control program will be described. FIG. 2 shows changes in the state of the ROM 140 when the control program is rewritten, specifically, changes in the information stored in the ROM 140.

制御プログラムの書き換えは、前工程と後工程の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 ROM 140 at the time before the previous process is performed. That is, an initial state before the control program is rewritten is shown. FIG. 2B shows the state of the ROM 140 when the previous process is completed. FIG. 2C shows the state of the ROM 140 when the post-process is completed, that is, when the rewriting of the control program is completed.

ROM140は、書き換え領域AD1と、非書き換え領域AD2と、ファームウェア格納領域AD3とからなる3つの記憶領域を有している。書き換え領域AD1は、制御プログラムが格納される記憶領域である。   The ROM 140 has three storage areas including a rewrite area AD1, a non-rewrite area AD2, and a firmware storage area AD3. The rewrite area AD1 is a storage area in which a control program is stored.

非書き換え領域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 electronic control device 100 is put on the market. After a vehicle equipped with the electronic control device 100 is put on the market, the information (market rewriting program) stored in the non-rewritable area AD2 is not updated in principle.

ファームウェア格納領域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 microcomputer 110 is stored. The firmware storage area AD3 is a storage area that cannot be recognized by an external information device such as the writing device 11. Except when the firmware is updated, the information (firmware) stored in the firmware storage area AD3 is not updated.

図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 electronic control device 100. When a vehicle equipped with the electronic control device 100 is put on the market and is rewritten to a modified control program, the rewriting area AD1 is (old version) even before the previous process is performed. B) The control program is stored. What is the initial state before the pre-process is performed is not a limitation in implementing the present invention.

図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 electronic control devices 100 in order to identify the plurality of electronic control devices 100 in the process at the time of rewriting. That is, different identification IDs are assigned to different electronic control devices 100.

識別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 electronic control device 100 as an identification ID. The request ID is an identification ID for specifying the electronic control device 100 that receives the signal when the writing device 11 transmits a signal to the electronic control device 100. The response ID is an identification ID for identifying the electronic control device 100 that is a transmission source of the signal when the electronic control device 100 transmits a signal to the writing device 11.

例えば、3つの電子制御装置100に対して制御プログラムの書き換えが行われる場合には、要求IDとして「0x001」、「0x002」、「0x003」がそれぞれの電子制御装置100に割り振られる。また、応答IDとして「0x011」、「0x022」、「0x033」がそれぞれの電子制御装置100に割り振られる。   For example, when the control program is rewritten for three electronic control devices 100, “0x001”, “0x002”, and “0x003” are assigned to the respective electronic control devices 100 as request IDs. In addition, “0x011”, “0x022”, and “0x033” are assigned to the respective electronic control devices 100 as response IDs.

書き換えプログラムは、後工程、すなわち書き換え領域AD1に対する制御プログラムの書き込みが行われる際に、書き込み装置11との通信を行いながら書き換えを実行するためのプログラムである。つまり、先に説明した市場用書き換えプログラムと同様の機能を有するプログラムなのであるが、後工程専用である点において市場用書き換えプログラムとは異なっている。以下でも単に「書き換えプログラム」と表記することとする。   The rewriting program is a program for executing rewriting while communicating with the writing device 11 when a control program is written to the rewriting area AD1 in a subsequent process. That is, it is a program having the same function as the market rewrite program described above, but is different from the market rewrite program in that it is dedicated to the post-process. Hereinafter, it is simply referred to as “rewrite program”.

図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 device 11 and the electronic control device 100 when the pre-process is performed. As shown in FIG. 3, the previous process, that is, the writing of the identification ID and the rewrite program is performed in a state where the writing device 11 and the electronic control device 100 are connected one-to-one via the communication bus 12. In such a state, communication performed between the writing device 11 and the electronic control device 100 is performed according to the procedure shown in FIG. As shown in FIG. 4, writing and verifying are sequentially performed in the previous process.

ここでいう「書き込み」とは、書き換え領域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 writing device 11 to the electronic control device 100 (arrow AR11). In the electronic control unit 100, the market rewrite program is written to the non-rewrite area AD2.

続いて、書き込み装置11から電子制御装置100に向けて、書き換えプログラムが送信される(矢印AR12)。電子制御装置100では、書き換え領域AD1に対する書き換えプログラムの書き込みが行われる。   Subsequently, the rewriting program is transmitted from the writing device 11 to the electronic control device 100 (arrow AR12). In the electronic control device 100, the rewrite program is written to the rewrite area AD1.

続いて、書き込み装置11から電子制御装置100に向けて、識別ID(要求ID及び応答ID)が送信される(矢印AR13)。電子制御装置100では、書き換え領域AD1に対する識別IDの書き込みが行われる。   Subsequently, an identification ID (request ID and response ID) is transmitted from the writing device 11 to the electronic control device 100 (arrow AR13). In the electronic control device 100, the identification ID is written to the rewrite area AD1.

前工程における「ベリファイ」とは、ROM140に書き込まれた書き換えプログラム、市場用書き換えプログラム、及び識別IDが、正常に書き込まれたか否かを電子制御装置100側で判定する処理である。   “Verify” in the previous process is a process for determining on the electronic control device 100 side whether or not the rewrite program written in the ROM 140, the market rewrite program, and the identification ID are normally written.

書き込み装置11から電子制御装置100に向けて、ベリファイ要求コマンドが送信される(矢印AR14)。ベリファイ要求コマンドは、電子制御装置100に対してベリファイの開始を要求するためのコマンドである。ベリファイ要求コマンドが受信されると、電子制御装置100ではベリファイの処理が開始される。   A verify request command is transmitted from the writing device 11 to the electronic control device 100 (arrow AR14). The verify request command is a command for requesting the electronic control device 100 to start verification. When the verify request command is received, the electronic control device 100 starts the verify process.

電子制御装置100におけるベリファイの処理が完了すると、電子制御装置100から書き込み装置11に向けて、ベリファイ完了通知コマンドが送信される(矢印AR15)。これにより、ベリファイが完了した旨が書き込み装置11により認識される。   When the verification process in the electronic control device 100 is completed, a verification completion notification command is transmitted from the electronic control device 100 to the writing device 11 (arrow AR15). Thereby, the writing device 11 recognizes that the verification is completed.

図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 device 11 and the electronic control device 100 when the post-process is performed. As shown in FIG. 5, the subsequent process, that is, writing of the control program is performed in a state where a plurality of electronic control devices 100 are connected to one writing device 11 via the same communication bus 12.

図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 electronic control devices 100 are connected to the same communication bus 12. For convenience of explanation, in the following description, FIG. 5 and the like, the numbers 1 to N are associated with the respective electronic control devices 100 and, for example, the first electronic control device 100 is referred to as “electronic control device 1. ". Similarly, the second electronic control device 100 may be referred to as “electronic control device 2”, and the Nth electronic control device 100 may be referred to as “electronic control device 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 “electronic control device 101” by replacing the reference numeral 100 with the reference numeral 101. Similarly, the second electronic control device 100 (electronic control device 2) may be referred to as an electronic control device 102.

N個の電子制御装置100を、通信バス12を介して書き込み装置11に接続し、図5の状態とする工程は、本発明の「接続ステップ」に該当するものである。図5の状態において、書き込み装置11と電子制御装置100との間では再び通信が行われる。   The process of connecting the N electronic control devices 100 to the writing device 11 via the communication bus 12 to obtain the state of FIG. 5 corresponds to the “connection step” of the present invention. In the state of FIG. 5, communication is performed again between the writing device 11 and the electronic control device 100.

制御プログラムの書き換えのために、書き込み装置11と電子制御装置100との間で行われる通信は、図6に示される手順(シーケンス)で行われる。図6に示されるように、後工程では、消去、書き込み、及びベリファイが順に行われる。このような後工程は、本発明の「送信ステップ」に該当するものである。   Communication performed between the writing device 11 and the electronic control device 100 for rewriting the control program is performed according to a procedure (sequence) shown in FIG. As shown in FIG. 6, erasing, writing, and verifying are sequentially performed in the subsequent process. Such a post process corresponds to the “transmission step” of the present invention.

ここでいう「消去」とは、前工程において書き換え領域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 RAM 130. . Thus, since the identification ID or the like is not left in the rewrite area AD1, the arrangement of the control program is not restricted by the identification ID or the like.

先ず、書き込み装置11から電子制御装置100に向けて、消去要求コマンドが送信される(矢印AR21)。消去要求コマンドは、電子制御装置100に対して消去の開始を要求するためのコマンドである。消去要求コマンドが受信されると、電子制御装置100では消去の処理が開始される。   First, an erase request command is transmitted from the writing device 11 to the electronic control device 100 (arrow AR21). The erase request command is a command for requesting the electronic control device 100 to start erasing. When the erasure request command is received, the electronic control device 100 starts erasure processing.

尚、消去要求コマンドは書き込み装置11から1回だけ送信され、全ての電子制御装置100により受信される。このため、全ての電子制御装置100では、消去の処理がほぼ同時に開始される。   The erase request command is transmitted only once from the writing device 11 and received by all the electronic control devices 100. For this reason, in all the electronic control apparatuses 100, the erasing process is started almost simultaneously.

続いて、書き込み装置11から電子制御装置100に向けて、消去状態確認コマンドが送信される(矢印AR22)。消去状態確認コマンドは、それぞれの電子制御装置100において、消去の処理が完了したか否かを確認するためのコマンドである。電子制御装置100における消去の処理が完了している場合には、電子制御装置100からは消去完了通知コマンドが返信として書き込み装置11に送信される(矢印AR23)。一方、電子制御装置100における消去の処理が完了していない場合には、電子制御装置100からは消去中通知コマンドが返信として書き込み装置11に送信される。   Subsequently, an erase state confirmation command is transmitted from the writing device 11 to the electronic control device 100 (arrow AR22). The erase state confirmation command is a command for confirming whether or not the erasure process is completed in each electronic control device 100. When the erasing process in the electronic control device 100 is completed, an erasure completion notification command is transmitted from the electronic control device 100 to the writing device 11 as a reply (arrow AR23). On the other hand, when the erasing process in the electronic control apparatus 100 is not completed, the electronic control apparatus 100 transmits a erasing notification command to the writing apparatus 11 as a reply.

消去状態確認コマンドは、先ず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 electronic control device 1 is transmitted from the writing device 11.

その後、電子制御装置1から消去完了通知コマンドが送信されるまでの間、すなわち、電子制御装置1に割り振られたものと同一の識別ID(応答ID)が付された消去完了通知コマンドが、電子制御装置1から送信されるまでの間は、電子制御装置1に対して消去状態確認コマンドが繰り返し送信される。   Thereafter, until the erasure completion notification command is transmitted from the electronic control device 1, that is, the erasure completion notification command with the same identification ID (response ID) assigned to the electronic control device 1 is Until it is transmitted from the control device 1, an erase state confirmation command is repeatedly transmitted to the electronic control device 1.

電子制御装置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 electronic control device 100.

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 writing device 11 and the transmission of the erase completion notification command from the electronic control device 100 are processes (first confirmation process) for confirming that the erasure of the rewrite area AD1 is completed. is there.

後工程における「書き込み」とは、書き換え領域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 writing device 11 to the electronic control device 100 (arrow AR26), and subsequently, a control program is transmitted. The write request command is a command for requesting the electronic control device 100 to start writing. When the write request command and the subsequent control program are received, the electronic control device 100 starts a write process.

消去要求コマンドと同様に、書き込み要求コマンド及び制御プログラムは書き込み装置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 writing device 11 and received by all the electronic control devices 100. For this reason, in all the electronic control apparatuses 100, the writing process is started almost simultaneously. Since the control program has a relatively large amount of data, it is transmitted from the writing device 11 to the electronic control device 100 in a state of being divided into a plurality of blocks (arrow AR27).

制御プログラムの送信が完了すると、書き込み装置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 writing device 11 to the electronic control device 100 (arrow AR28). The write status confirmation command is a command for confirming whether or not the writing process is completed in each electronic control device 100. When the writing process in the electronic control device 100 is completed, a writing completion notification command is sent as a reply from the electronic control device 100 to the writing device 11 (arrow AR29). On the other hand, when the writing process in the electronic control apparatus 100 is not completed, the electronic control apparatus 100 transmits a writing in progress notification command to the writing apparatus 11 as a reply.

書き込み状態確認コマンドは、先ず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 electronic control device 1 is transmitted from the writing device 11.

その後、電子制御装置1から書き込み完了通知コマンドが送信されるまでの間、すなわち、電子制御装置1に割り振られたものと同一の識別ID(応答ID)が付された書き込み完了通知コマンドが、電子制御装置1から送信されるまでの間は、電子制御装置1に対して書き込み状態確認コマンドが繰り返し送信される。   Thereafter, until the writing completion notification command is transmitted from the electronic control device 1, that is, the writing completion notification command with the same identification ID (response ID) assigned to the electronic control device 1 is Until it is transmitted from the control device 1, a write state confirmation command is repeatedly transmitted to the electronic control device 1.

電子制御装置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 electronic control device 100.

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 writing device 11 and the transmission of the write completion notification command from the electronic control device 100 are processes for confirming that the writing of the control program to the rewrite area AD1 is completed (second confirmation) Processing).

後工程における「ベリファイ」とは、ROM140に書き込まれた制御プログラムが、正常に書き込まれたか否かを電子制御装置100側で判定する処理である。先ず、書き込み装置11から電子制御装置100に向けて、ベリファイ要求コマンドが送信される(矢印AR32)。ベリファイ要求コマンドは、電子制御装置100に対してベリファイの開始を要求するためのコマンドである。ベリファイ要求コマンドが受信されると、電子制御装置100ではベリファイの処理が開始される。   “Verify” in the subsequent process is a process for determining on the electronic control device 100 side whether or not the control program written in the ROM 140 has been normally written. First, a verify request command is transmitted from the writing device 11 to the electronic control device 100 (arrow AR32). The verify request command is a command for requesting the electronic control device 100 to start verification. When the verify request command is received, the electronic control device 100 starts the verify process.

消去要求コマンドや書き込み要求コマンドと同様に、ベリファイ要求コマンドは書き込み装置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 writing device 11 and received by all the electronic control devices 100. For this reason, in all the electronic control apparatuses 100, the verify process is started almost simultaneously.

続いて、書き込み装置11から電子制御装置100に向けて、ベリファイ状態確認コマンドが送信される(矢印AR33)。ベリファイ状態確認コマンドは、それぞれの電子制御装置100において、ベリファイの処理が完了したか否かを確認するためのコマンドである。電子制御装置100におけるベリファイの処理が完了している場合には、電子制御装置100からはベリファイ完了通知コマンドが返信として書き込み装置11に送信される(矢印AR34)。一方、電子制御装置100におけるベリファイの処理が完了していない場合には、電子制御装置100からはベリファイ中通知コマンドが返信として書き込み装置11に送信される。   Subsequently, a verification state confirmation command is transmitted from the writing device 11 to the electronic control device 100 (arrow AR33). The verify state confirmation command is a command for confirming whether or not the verify process is completed in each electronic control device 100. When the verification process in the electronic control device 100 is completed, a verification completion notification command is sent from the electronic control device 100 as a reply to the writing device 11 (arrow AR34). On the other hand, when the verification process in the electronic control device 100 is not completed, the electronic control device 100 transmits a verifying notification command to the writing device 11 as a reply.

ベリファイ状態確認コマンドは、先ず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 electronic control device 1 is attached is transmitted from the writing device 11.

その後、電子制御装置1からベリファイ完了通知コマンドが送信されるまでの間、すなわち、電子制御装置1に割り振られたものと同一の識別ID(応答ID)が付されたベリファイ完了通知コマンドが、電子制御装置1から送信されるまでの間は、電子制御装置1に対してベリファイ状態確認コマンドが繰り返し送信される。   Thereafter, until the verification completion notification command is transmitted from the electronic control device 1, that is, the verification completion notification command with the same identification ID (response ID) assigned to the electronic control device 1 is Until the data is transmitted from the control device 1, a verification state confirmation command is repeatedly transmitted to the electronic control device 1.

電子制御装置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 electronic control devices 100.

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 writing device 11 and the transmission of the verification completion notification command from the electronic control device 100 are completed as to whether or not the verification has been completed, that is, whether or not the control program has been normally written. This is a process for confirming (third confirmation process).

以上のように、電子制御装置100に対する制御プログラムの書き換えが行われるにあたっては、制御プログラムの送信等、処理の一部が複数の電子制御装置100において同時に行われる。図7には、同時に書き込みが行われる電子制御装置100の個数を2とした上で、後工程の各処理に要する時間が示されている。   As described above, when the rewriting of the control program for the electronic control device 100 is performed, a part of the processing such as transmission of the control program is simultaneously performed in the plurality of electronic control devices 100. FIG. 7 shows the time required for each process in the subsequent process after setting the number of electronic control devices 100 to be simultaneously written to two.

図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 electronic control apparatus 100 is set as time t0, and the time at which the erasing process is ended is set as time t10. In addition, the time at which the writing process is started in each electronic control device 100 is time t12, and the time at which the writing process is finished is time t20. Furthermore, the time at which the verification process is started in each electronic control apparatus 100 is set as time t22, and the time at which the verification process is ended is set as time t30.

また、図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 writing device 11, a corresponding completion notification command (erase completion notification command or the like) is transmitted. Is the period up to the point of time when the electronic control device 100 is transmitted. For example, immediately after the completion of erasure, the period from time t10 when the erasure state confirmation command is transmitted to the electronic control device 1 to time t11 when the corresponding erasure completion notification command is transmitted from the electronic control device 1. Etc. correspond to the above-described state confirmation.

上記の他、図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 electronic control device 1 is time t21, and the time when the verification completion notification command is transmitted from the electronic control device 1 is time t31.

図7では、電子制御装置1から消去完了通知コマンドが送信されるのとほぼ同時(時刻t11)に、電子制御装置2に向けて消去状態確認コマンドが送信されている。これに対して電子制御装置2から消去完了通知コマンドが送信されると(時刻t12)、直ちに書き込みが開始されている。   In FIG. 7, an erasure state confirmation command is transmitted to the electronic control device 2 almost simultaneously (time t <b> 11) when the erasure completion notification command is transmitted from the electronic control device 1. On the other hand, when an erasure completion notification command is transmitted from the electronic control unit 2 (time t12), writing is started immediately.

また、電子制御装置1から書き込み完了通知コマンドが送信されるのとほぼ同時(時刻t21)に、電子制御装置2に向けて書き込み状態確認コマンドが送信されている。これに対して電子制御装置2から書き込み完了通知コマンドが送信されると(時刻t22)、直ちにベリファイが開始されている。   In addition, a writing state confirmation command is transmitted to the electronic control device 2 almost simultaneously with the writing completion notification command transmitted from the electronic control device 1 (time t21). On the other hand, when a write completion notification command is transmitted from the electronic control unit 2 (time t22), the verification is started immediately.

更に、電子制御装置1からベリファイ完了通知コマンドが送信されるのとほぼ同時(時刻t31)に、電子制御装置2に向けてベリファイ状態確認コマンドが送信されている。これに対して電子制御装置2からベリファイ完了通知コマンドが送信された時刻を、図7では時刻t32としている。   Further, a verify state confirmation command is transmitted to the electronic control unit 2 almost simultaneously with the transmission of the verification completion notification command from the electronic control unit 1 (time t31). On the other hand, the time when the verification completion notification command is transmitted from the electronic control unit 2 is time t32 in FIG.

図7に示されるように、本実施形態においては、それぞれの電子制御装置100における消去、書き込み、及びベリファイの処理が、いずれも同時に行われている。このため、制御プログラムの書き換え対象となる電子制御装置100の個数が更に増加したとしても、後工程の全体の時間、すなわち、時刻t0から時刻t32までの総書き換え時間が、電子制御装置100の個数に比例して増加することはない。   As shown in FIG. 7, in the present embodiment, the erase, write, and verify processes in the respective electronic control devices 100 are all performed simultaneously. For this reason, even if the number of electronic control devices 100 to be rewritten in the control program further increases, the total time for the subsequent process, that is, the total rewrite time from time t0 to time t32 is It does not increase in proportion to

尚、状態確認に要する時間は電子制御装置100の個数に応じて増加するのであるが、当該時間は書き込み等に要する時間に比べれば非常に短い。このため、電子制御装置100の個数が増加しても総書き換え時間は殆ど増加しない。   It should be noted that the time required for status confirmation increases with the number of electronic control devices 100, but this time is very short compared to the time required for writing and the like. For this reason, even if the number of electronic control units 100 increases, the total rewriting time hardly increases.

図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 electronic control device 1 is first subjected to the erase, write, and verify processes in order, and then the electronic control device 2 is sequentially subjected to the erase, write, and verify processes.

具体的には、先ず電子制御装置1において、時刻t100から時刻t110までの期間において消去が行われ、続いて時刻t111までの期間において状態確認が行われる。その後、時刻t111から時刻t120までの期間において書き込みが行われ、時刻t121までの期間において状態確認が行われる。更にその後、時刻t121から時刻t130までの期間においてベリファイが行われ、時刻t131までの期間において状態確認が行われる。   Specifically, first, in the electronic control unit 1, erasing is performed in a period from time t100 to time t110, and then state confirmation is performed in a period from time t111. Thereafter, writing is performed in a period from time t111 to time t120, and state confirmation is performed in a period from time t121. Thereafter, verification is performed in a period from time t121 to time t130, and state confirmation is performed in a period from time t131.

時刻t131において、電子制御装置1に対する上記の処理がすべて完了すると、ほぼ同時に電子制御装置2に対する処理が開始される。時刻t131から時刻t140までの期間において消去が行われ、続いて時刻t141までの期間において状態確認が行われる。その後、時刻t141から時刻t150までの期間において書き込みが行われ、時刻t151までの期間において状態確認が行われる。更にその後、時刻t151から時刻t160までの期間においてベリファイが行われ、時刻t161までの期間において状態確認が行われる。   At time t131, when all the above processing for the electronic control device 1 is completed, processing for the electronic control device 2 is started almost simultaneously. Erasing is performed during a period from time t131 to time t140, and then state confirmation is performed during a period from time t141. Thereafter, writing is performed in a period from time t141 to time t150, and state confirmation is performed in a period from time t151. Thereafter, verification is performed in a period from time t151 to time t160, and state confirmation is performed in a period from time t161.

以上のようであるから、例えば電子制御装置1への書き込みが行われる期間(時刻t111から時刻t120までの期間)と、電子制御装置2への書き込みが行われる期間(時刻t141から時刻t150までの期間)とは、互いに重なっていない。消去やベリファイが行われる期間についても同様である。   As described above, for example, a period during which writing to the electronic control apparatus 1 is performed (period from time t111 to time t120) and a period during which writing to the electronic control apparatus 2 is performed (from time t141 to time t150). (Period) does not overlap each other. The same applies to the period during which erasure and verification are performed.

その結果、図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 electronic control devices 100 to be rewritten by the control program increases, the total rewriting time increases in proportion to this.

以上の説明で明らかなように、本実施形態に係る電子制御装置100では、書き込み装置11の個数を増加させることなく、制御プログラムの書き換えに要する時間を従来に比べて大幅に短縮することが可能となっている。   As is clear from the above description, in the electronic control device 100 according to the present embodiment, the time required for rewriting the control program can be significantly shortened compared to the conventional case without increasing the number of writing devices 11. It has become.

図6を参照しながら説明した後工程において、電子制御装置100及び書き込み装置11のそれぞれで行われる具体的な処理の流れについて、図9及び図10を参照しながら説明する。   In the subsequent process described with reference to FIG. 6, a specific processing flow performed in each of the electronic control device 100 and the writing device 11 will be described with reference to FIGS. 9 and 10.

図9は、電子制御装置100側で行われる処理の流れを示すフローチャートである。最初のステップS01では、書き込み装置11からの消去要求コマンドが受信されたか否かが判定される。消去要求コマンドが未だ受信されていない場合には、ステップS01の処理が繰り返される。消去要求コマンドが受信されればステップS02に移行する。   FIG. 9 is a flowchart showing a flow of processing performed on the electronic control device 100 side. In the first step S01, it is determined whether or not an erase request command from the writing device 11 has been received. If the erase request command has not been received yet, the process of step S01 is repeated. If an erase request command is received, the process proceeds to step S02.

ステップ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 RAM 130 and saved. In step S03 following step S02, erasing of the rewrite area AD1 is started.

ステップ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 writing device 11 has been received. That is, it is determined whether or not an erase state confirmation command with the same identification ID as the identification ID (request ID) stored in the RAM 130 of the electronic control device 100 has been received. If the erase state confirmation command has not yet been received, the process of step S04 is repeated. If an erase state confirmation command is received, the process proceeds to step S05.

ステップ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 writing device 11. Thereafter, the processes after step S04 are executed again.

ステップ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 writing device 11. Thereafter, the process proceeds to step S11.

ステップS11では、書き込み装置11からの書き込み要求コマンドが受信されたか否かが判定される。書き込み要求コマンドが未だ受信されていない場合には、ステップS11の処理が繰り返される。書き込み要求コマンドが受信されればステップS12に移行する。ステップS12では、書き込み装置11からの制御プログラムの受信、及び書き換え領域AD1に対する制御プログラムの書き込みが開始される。かかる処理は、当該電子制御装置100のRAM130に記憶されている書き換えプログラムにより実行される。   In step S11, it is determined whether a write request command from the writing device 11 has been received. If the write request command has not been received yet, the process of step S11 is repeated. If a write request command is received, the process proceeds to step S12. In step S12, reception of the control program from the writing device 11 and writing of the control program to the rewrite area AD1 are started. Such processing is executed by a rewriting program stored in the RAM 130 of the electronic control device 100.

ステップ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 writing device 11 has been received. That is, it is determined whether or not a write state confirmation command having the same identification ID as the identification ID (request ID) stored in the RAM 130 of the electronic control device 100 is received. If the write state confirmation command has not been received yet, the process of step S13 is repeated. If a write status confirmation command is received, the process proceeds to step S14.

ステップ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 writing device 11. Thereafter, the processing after step S13 is executed again.

ステップ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 writing device 11. Thereafter, the process proceeds to step S21.

ステップS21では、書き込み装置11からのベリファイ要求コマンドが受信されたか否かが判定される。ベリファイ要求コマンドが未だ受信されていない場合には、ステップS21の処理が繰り返される。ベリファイ要求コマンドが受信されればステップS22に移行する。ステップS22ではベリファイの処理が開始される。   In step S21, it is determined whether or not a verify request command from the writing device 11 has been received. If the verify request command has not been received yet, the process of step S21 is repeated. If the verify request command is received, the process proceeds to step S22. In step S22, a verify process is started.

ステップ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 writing device 11 has been received. That is, it is determined whether or not a verify state confirmation command with the same identification ID as the identification ID (request ID) stored in the RAM 130 of the electronic control device 100 has been received. If the verify state confirmation command has not been received yet, the process of step S23 is repeated. If the verify state confirmation command is received, the process proceeds to step S24.

ステップ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 writing device 11. Thereafter, the processing after step S23 is executed again.

ステップ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 RAM 130 are written back to the rewrite area AD1 of the ROM 140. As a result, the ROM 140 is returned to the state shown in FIG.

尚、ステップ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 ROM 140 is returned to the state shown in FIG.

図10は、書き込み装置11側で行われる処理の流れを示すフローチャートである。最初のステップS31では、全ての電子制御装置100に向けた消去要求コマンドの送信が行われる。これにより、全ての電子制御装置100において消去の処理が同時に開始される。   FIG. 10 is a flowchart showing the flow of processing performed on the writing device 11 side. In the first step S31, an erase request command is transmitted to all the electronic control devices 100. Thereby, the erasing process is started simultaneously in all the electronic control apparatuses 100.

ステップ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 writing device 11. The variable n stores a number corresponding to the electronic control device 100 that is a transmission target of an erase state confirmation command or the like. For example, when the value of the variable n is 1, an erase state confirmation command, a write state confirmation command, and the like are transmitted to the electronic control device 1 (electronic control device 101). That is, an erase state confirmation command or the like with the same identification ID (request ID) assigned to the electronic control device 1 is transmitted.

ステップS32に続くステップS33では、電子制御装置100に向けた消去状態確認コマンドの送信が行われる。この場合、変数nの値は1であるから、消去状態確認コマンドは電子制御装置1に向けて送信される。   In step S33 following step S32, an erase state confirmation command is transmitted to the electronic control apparatus 100. In this case, since the value of the variable n is 1, the erase state confirmation command is transmitted to the electronic control device 1.

ステップ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 electronic control apparatus 100 has been received. That is, it is determined whether or not an erasing notification command with the same identification ID as the identification ID (response ID) corresponding to the value of the variable n is received. When the erasing notification command is received, the processing after step S33 is repeated. If an erasing notification command is not received, the process proceeds to step S35.

ステップ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 electronic control apparatus 100. That is, it is determined whether or not an erasure completion notification command with the same identification ID as the identification ID (response ID) corresponding to the value of the variable n is received. If the erase completion notification command has not yet been received, the process of step S35 is repeated. If an erase completion notification command is received, the process proceeds to step S36.

ステップ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 electronic control devices 100. If the value of the variable n is smaller than N, the process proceeds to step S37. In step S37, 1 is added to the value of the variable n. Thereafter, the processing after step S33 is executed again.

つまり、電子制御装置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 electronic control device 2 is subsequently performed. By repeating such processing, state confirmation with all the electronic control devices 100 is performed.

ステップ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 electronic control devices 100 has been completed. In this case, the process proceeds to step S41.

ステップS41では、全ての電子制御装置100に向けた書き込み要求コマンドの送信、及び制御プログラムの送信が行われる。これにより、全ての電子制御装置100において制御プログラムの書き込みが同時に開始される。   In step S41, a write request command and a control program are sent to all the electronic control devices 100. Thereby, the writing of the control program is started simultaneously in all the electronic control devices 100.

ステップ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 electronic control device 100. In this case, since the value of the variable n is 1, the write state confirmation command is transmitted to the electronic control device 1.

ステップ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 electronic control apparatus 100 has been received. That is, it is determined whether or not a writing notification command with the same identification ID as the identification ID (response ID) corresponding to the value of the variable n is received. When the writing notification command is received, the processing from step S43 is repeated. If the writing notification command is not received, the process proceeds to step S45.

ステップS45では、電子制御装置100からの書き込み完了通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付された書き込み完了通知コマンドが受信されたか否かが判定される。書き込み完了通知コマンドが未だ受信されていない場合には、ステップS45の処理が繰り返される。書き込み完了通知コマンドが受信されればステップS46に移行する。   In step S45, it is determined whether a write completion notification command from the electronic control apparatus 100 has been received. That is, it is determined whether or not a write completion notification command with the same identification ID as the identification ID (response ID) corresponding to the value of the variable n is received. If the write completion notification command has not yet been received, the process of step S45 is repeated. If a write completion notification command is received, the process proceeds to step S46.

ステップ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 electronic control devices 100. If the value of the variable n is smaller than N, the process proceeds to step S47. In step S47, 1 is added to the value of the variable n. Thereafter, the processing after step S43 is executed again.

つまり、電子制御装置1との間における状態確認(書き込み状態確認コマンドの送信等)が完了すると、続いて電子制御装置2との間における状態確認が行われる。このような処理が繰り返されることにより、全ての電子制御装置100との間における状態確認が行われることとなる。   That is, when the state confirmation (such as transmission of a write state confirmation command) with the electronic control device 1 is completed, the state confirmation with the electronic control device 2 is subsequently performed. By repeating such processing, state confirmation with all the electronic control devices 100 is performed.

ステップ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 electronic control devices 100 has been completed. In this case, the process proceeds to step S51.

ステップS51では、全ての電子制御装置100に向けたベリファイ要求コマンドの送信が行われる。これにより、全ての電子制御装置100においてベリファイの処理が同時に開始される。   In step S51, a verify request command is transmitted to all the electronic control devices 100. As a result, the verify process is simultaneously started in all the electronic control devices 100.

ステップ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 electronic control apparatus 100. In this case, since the value of the variable n is 1, the verify state confirmation command is transmitted to the electronic control device 1.

ステップ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 electronic control apparatus 100 has been received. That is, it is determined whether or not a verifying notification command with the same identification ID as the identification ID (response ID) corresponding to the value of the variable n is received. When the verifying notification command is received, the processes after step S53 are repeated. If the verifying notification command is not received, the process proceeds to step S55.

ステップS55では、電子制御装置100からのベリファイ完了通知コマンドが受信されたか否かが判定される。すなわち、変数nの値に対応する識別ID(応答ID)と同一の識別IDが付されたベリファイ完了通知コマンドが受信されたか否かが判定される。ベリファイ完了通知コマンドが未だ受信されていない場合には、ステップS55の処理が繰り返される。ベリファイ完了通知コマンドが受信されればステップS56に移行する。   In step S55, it is determined whether or not a verification completion notification command from the electronic control apparatus 100 has been received. That is, it is determined whether or not a verification completion notification command having the same identification ID as the identification ID (response ID) corresponding to the value of the variable n is received. If the verify completion notification command has not been received yet, the process of step S55 is repeated. If the verify completion notification command is received, the process proceeds to step S56.

ステップ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 electronic control devices 100. If the value of the variable n is smaller than N, the process proceeds to step S57. In step S57, 1 is added to the value of the variable n. Thereafter, the processing after step S53 is executed again.

つまり、電子制御装置1との間における状態確認(ベリファイ状態確認コマンドの送信等)が完了すると、続いて電子制御装置2との間における状態確認が行われる。このような処理が繰り返されることにより、全ての電子制御装置100との間における状態確認が行われることとなる。   That is, when the state confirmation (e.g., transmission of a verify state confirmation command) with the electronic control device 1 is completed, the state confirmation with the electronic control device 2 is subsequently performed. By repeating such processing, state confirmation with all the electronic control devices 100 is performed.

ステップ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 electronic control devices 100 has been completed. For this reason, a series of processes shown in FIG.

尚、本実施形態においては、書き換えプログラムと識別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 RAM 130. Instead of such a mode, a mode in which the rewriting program and the identification ID are directly written in the RAM 130 without going through the rewriting area AD1 may be employed. In this case, since the time for writing the rewriting program and the identification ID into the ROM 140 is omitted, the total writing time can be further shortened.

これまでに説明した第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 electronic control device 100 has been described. However, the present invention can also be applied to a case where a plurality of microcomputers 110 (and thus a plurality of ROMs 140) are mounted on one electronic control device 100.

図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 (electronic control devices 101 and 102) according to the second embodiment of the present invention are connected to the writing device 11 via the communication bus 12. The electronic control device 100 according to this embodiment is different from the electronic control device 100 according to the first embodiment in that it includes two microcomputers 110 and 210.

マイコン110と同様に、マイコン210も外部通信部220、RAM230、及びROM240を備えている。以下の説明では、電子制御装置101に備えられたマイコン110のROM140のことを、「ROM141」とも表記する。また、電子制御装置101に備えられたマイコン210のROM240のことを、「ROM241」とも表記する。   Similar to the microcomputer 110, the microcomputer 210 includes an external communication unit 220, a RAM 230, and a ROM 240. In the following description, the ROM 140 of the microcomputer 110 provided in the electronic control apparatus 101 is also referred to as “ROM 141”. Further, the ROM 240 of the microcomputer 210 provided in the electronic control device 101 is also referred to as “ROM 241”.

同様に、電子制御装置102に備えられたマイコン110のROM140のことを、「ROM142」とも表記する。また、電子制御装置102に備えられたマイコン210のROM240のことを、「ROM242」とも表記する。   Similarly, the ROM 140 of the microcomputer 110 provided in the electronic control device 102 is also referred to as “ROM 142”. The ROM 240 of the microcomputer 210 provided in the electronic control device 102 is also referred to as “ROM 242”.

ROM141に書き込まれる制御プログラムと、ROM142に書き込まれる制御プログラムとは互いに同一であるとする。また、ROM241に書き込まれる制御プログラムと、ROM242に書き込まれる制御プログラムとは互いに同一であるとする。   It is assumed that the control program written in the ROM 141 and the control program written in the ROM 142 are the same. It is assumed that the control program written in the ROM 241 and the control program written in the ROM 242 are the same.

このような場合には、第1実施形態において説明した方法と同様の方法により、ROM141及びROM142の両方に対する制御プログラムの書き込みが、同時に行われればよい。その後、ROM241及びROM242の両方に対する制御プログラムの書き込みが、やはり同時に行われればよい。   In such a case, the control program may be written to both the ROM 141 and the ROM 142 at the same time by a method similar to the method described in the first embodiment. Thereafter, it is sufficient that the control program is written to both the ROM 241 and the ROM 242 at the same time.

この場合、通信バス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 microcomputers 110 and 210 of the electronic control device 101 and the microcomputers 110 and 210 of the electronic control device 102) have different identification IDs (request IDs). , Response ID) may be allocated. If an individual identification ID is assigned to each microcomputer, the total writing time can be shortened by performing simultaneous writing even in the state of connection as shown in FIG.

以上、具体例を参照しつつ本発明の実施の形態について説明した。なお、通信バス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 communication bus 12 is determined by the communication method between the writing device 11 and the electronic control device 100 (in the case of CAN: two wires). However, the present invention is not limited to these specific examples. In other words, those specific examples that have been appropriately modified by those skilled in the art are also included in the scope of the present invention as long as they have the characteristics of the present invention. For example, the elements included in each of the specific examples described above and their arrangement, materials, conditions, shapes, sizes, and the like are not limited to those illustrated, but can be changed as appropriate. Moreover, each element with which each embodiment mentioned above is provided can be combined as long as technically possible, and the combination of these is also included in the scope of the present invention as long as it includes the features of the present invention.

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: communication bus 100, 101, 102: electronic control device 110, 210: microcomputer 120, 220: external communication unit 140, 141, 142, 240, 241, 242: ROM
130, 230: RAM
AD1: Rewrite area

Claims (6)

マイコンに対する制御プログラムの書き換えが可能な車載電子制御装置であって、
複数の前記車載電子制御装置(100)が、同一の通信バス(12)を介して1つの書き込み装置(11)に接続される接続ステップと、
前記通信バスに接続された全ての前記車載電子制御装置に対し、前記書き込み装置から1回だけ前記制御プログラムが送信され、前記制御プログラムがそれぞれの前記マイコン(110)の書き換え領域(AD1)に同時に書き込まれる送信ステップと、
を経ることにより、制御プログラムが書き換えられることを特徴とする車載電子制御装置。
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
The on-vehicle electronic control device is characterized in that the control program is rewritten by going through.
前記送信ステップにおける前記制御プログラムの書き込みは、前記書き換え領域に予め書き込まれていた書き換えプログラムによって行われ、
前記送信ステップが完了した時点においては、前記書き換えプログラムは前記制御プログラムによって上書きされた状態となっていることを特徴とする、請求項1に記載の車載電子制御装置。
The writing of the control program in the transmission step is performed by a rewriting program written in advance in the rewriting area,
The on-vehicle electronic control device according to claim 1, wherein when the transmission step is completed, the rewriting program is overwritten by the control program.
それぞれの前記マイコンの前記書き換え領域には、互いに異なる個別の識別IDが予め書き込まれており、
前記送信ステップにおいては、
前記書き換え領域の消去が完了したことを確認する第1確認処理と、
前記制御プログラムの書き込みが完了したことを確認する第2確認処理と、
前記制御プログラムが正常に書き込まれたか否かの判定が完了したことを確認する第3確認処理とが、前記識別IDを用いてそれぞれの前記車載電子制御装置毎に実施され、
前記送信ステップが完了した時点においては、前記識別IDは前記制御プログラムによって上書きされた状態となっていることを特徴とする、請求項2に記載の車載電子制御装置。
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 in-vehicle electronic control device according to claim 2, wherein when the transmission step is completed, the identification ID is overwritten by the control program.
前記送信ステップが開始される前に、
それぞれの前記車載電子制御装置において、前記書き換えプログラムと前記識別IDとが、前記書き換え領域からRAM(130)へと転送され記憶されており、
前記送信ステップにおいて異常が生じた場合には、前記RAMに記憶されていた前記書き換えプログラムと前記識別IDとが、前記書き換え領域に書き戻されることを特徴とする、請求項3に記載の車載電子制御装置。
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.
4. The in-vehicle electronic device according to claim 3, wherein when an abnormality occurs in the transmission step, the rewriting program and the identification ID stored in the RAM are written back to the rewriting area. Control device.
それぞれの前記車載電子制御装置には前記マイコンが複数搭載されており、
前記識別IDは、
前記通信バスに接続された前記車載電子制御装置の全ての前記マイコン、のそれぞれに対して互いに異なるよう個別に割り振られており、これにより前記制御プログラムの同時書き込みが実施されることを特徴とする、請求項4に記載の車載電子制御装置。
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 4.
前記書き換えプログラムと前記識別IDとは、
前記送信ステップが開始される前に、前記書き込み装置からそれぞれの前記車載電子制御装置へと送信され、前記書き換え領域に書き込まれることなくRAMに記憶されることを特徴とする、請求項3に記載の車載電子制御装置。
The rewriting program and the identification ID are
4. The method according to claim 3, wherein the transmission step is transmitted from the writing device to each of the on-vehicle electronic control devices before the transmission step is started, and is stored in the RAM without being written to the rewrite area. 5. In-vehicle electronic control device.
JP2015088287A 2015-04-23 2015-04-23 In-vehicle electronic control unit Active JP6387894B2 (en)

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 true JP2016206967A (en) 2016-12-08
JP6387894B2 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)

Citations (4)

* Cited by examiner, † Cited by third party
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
JP2004530229A (en) * 2001-06-12 2004-09-30 エステーミクロエレクトロニクス ソシエテ アノニム Parallel programming and reprogramming process of built-in flash memory by multiple connection bus
JP2008198318A (en) * 2007-02-15 2008-08-28 Nec Corp Read only memory writing device, target device, and read only memory writing system
JP2014194688A (en) * 2013-03-29 2014-10-09 Hitachi Automotive Systems Ltd Program rewriting method of electronic control device, electronic control device, and rewriting device

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
JP2004530229A (en) * 2001-06-12 2004-09-30 エステーミクロエレクトロニクス ソシエテ アノニム Parallel programming and reprogramming process of built-in flash memory by multiple connection bus
JP2008198318A (en) * 2007-02-15 2008-08-28 Nec Corp Read only memory writing device, target device, and read only memory writing system
JP2014194688A (en) * 2013-03-29 2014-10-09 Hitachi Automotive Systems Ltd Program rewriting method of electronic control device, electronic control device, and rewriting device

Also Published As

Publication number Publication date
JP6387894B2 (en) 2018-09-12

Similar Documents

Publication Publication Date Title
JP2016224898A (en) On-vehicle electronic control device
CN106257416B (en) Method for wireless remote updating of vehicle software
JP4742102B2 (en) Improved checking method for automotive control system
CN104793975B (en) The update method and device of application program in electronic control unit
CN107422658B (en) Program change acquisition method
CN110765223A (en) Map updating processing method, device, equipment and storage medium
CN105468384A (en) Vehicle-mounted controller programming system and method, server and programming terminal
US20060218340A1 (en) Data validity determining method for flash EEPROM and electronic control system
WO2019123747A1 (en) Electronic control device for automobile and control method thereof
CN105045640A (en) Software upgrading method and device and intelligent equipment
JP3493772B2 (en) Control software specification change system
US9367482B2 (en) Systems and methods to extend ROM functionality
JP6387894B2 (en) In-vehicle electronic control unit
US11836045B2 (en) Electronic control device having a non-volatile memory with a reserved area storing failure data
RU2735965C1 (en) Method for commissioning air conditioning system, computer-readable data medium and air conditioning system
JP6935694B2 (en) Electronic control device
JP5034866B2 (en) In-vehicle control device
CN113590271A (en) Database deployment method and device, electronic equipment and storage medium
KR100601655B1 (en) Apparatus connected to other apparatus via predetermined network for automatic upgrading of firmware and method for upgrading thereof
JP6528700B2 (en) In-vehicle control device and in-vehicle network including in-vehicle control device
KR20010027466A (en) Method for reprogramming ecu of vehicles
JP2012096763A (en) Fault-diagnosis control system and method for vehicle
CN105591749A (en) Authorization processing method, device and system
JP6571423B2 (en) Information processing system, device information acquisition method, and program therefor
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