JP6221866B2 - Program rewriting system and electronic control unit - Google Patents

Program rewriting system and electronic control unit Download PDF

Info

Publication number
JP6221866B2
JP6221866B2 JP2014056172A JP2014056172A JP6221866B2 JP 6221866 B2 JP6221866 B2 JP 6221866B2 JP 2014056172 A JP2014056172 A JP 2014056172A JP 2014056172 A JP2014056172 A JP 2014056172A JP 6221866 B2 JP6221866 B2 JP 6221866B2
Authority
JP
Japan
Prior art keywords
electronic control
rewriting
program
identification information
communication line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014056172A
Other languages
Japanese (ja)
Other versions
JP2015179375A (en
Inventor
竜規 上坂
竜規 上坂
和也 山脇
和也 山脇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2014056172A priority Critical patent/JP6221866B2/en
Priority to DE102015204424.6A priority patent/DE102015204424A1/en
Publication of JP2015179375A publication Critical patent/JP2015179375A/en
Application granted granted Critical
Publication of JP6221866B2 publication Critical patent/JP6221866B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Description

本発明は、所定の制御対象の制御に用いる制御プログラムを書き換え可能なプログラム書換システムおよび電子制御装置に関する。   The present invention relates to a program rewriting system and an electronic control device capable of rewriting a control program used for controlling a predetermined control target.

記憶内容の書き換えが可能な不揮発性メモリを備え、この不揮発性メモリに記憶された制御プログラムを書き換え可能に構成された電子制御装置が知られている。
複数の電子制御装置の制御プログラムの書き換える場合には、複数の電子制御装置とプログラム書換装置とをデータ通信可能に接続し、複数の電子制御装置で同時に制御プログラムの書き換えを実行させることが、制御プログラムの書き換えに要する時間を短縮するために有効である。しかし、複数の電子制御装置で同時に制御プログラムの書き換えを実行するには、複数の電子制御装置のそれぞれに対して、互いに異なる識別番号を設定する必要がある。
2. Description of the Related Art There is known an electronic control device that includes a nonvolatile memory that can rewrite stored contents and is configured to be able to rewrite a control program stored in the nonvolatile memory.
When rewriting a control program of a plurality of electronic control devices, it is possible to connect the plurality of electronic control devices and the program rewriting device so that data communication can be performed, and to rewrite the control program simultaneously by the plurality of electronic control devices. This is effective for shortening the time required to rewrite the program. However, in order to execute rewriting of the control program simultaneously with a plurality of electronic control devices, it is necessary to set different identification numbers for each of the plurality of electronic control devices.

そして従来、複数の通信装置が通信線を介して接続されたシステムにおいて、スレーブ装置が、自装置で発生させた乱数を含むメッセージを送信し、このメッセージを受信したマスタ装置が、乱数と識別番号とを対応付けたメッセージをスレーブ装置へ送信することで、スレーブ装置に対して識別番号を設定する技術が知られている(例えば、特許文献1を参照)。   Conventionally, in a system in which a plurality of communication devices are connected via a communication line, the slave device transmits a message including a random number generated by the own device, and the master device that receives this message receives the random number and the identification number. A technique is known in which an identification number is set for a slave device by transmitting a message in association with the slave device (see, for example, Patent Document 1).

特開2009−27325号公報JP 2009-27325 A

しかし、上記特許文献1に記載の技術では、ハードウェア構成とソフトウェア構成が全く同じ複数の電子制御装置を接続した場合に、複数の電子制御装置で互いに同じ乱数を発生させてしまうおそれがある。このため、複数の電子制御装置で互いに異なる識別番号を設定することができない事態の発生が懸念される。   However, in the technique described in Patent Document 1, when a plurality of electronic control devices having exactly the same hardware configuration and software configuration are connected, the plurality of electronic control devices may generate the same random numbers. For this reason, there is a concern that a plurality of electronic control devices cannot set different identification numbers.

本発明は、こうした問題に鑑みてなされたものであり、ハードウェア構成とソフトウェア構成が全く同じ複数の電子制御装置が接続された場合に、複数の電子制御装置で互いに異なる識別番号を設定する技術を提供することを目的とする。   The present invention has been made in view of such problems, and a technique for setting different identification numbers in a plurality of electronic control devices when a plurality of electronic control devices having exactly the same hardware configuration and software configuration are connected. The purpose is to provide.

上記目的を達成するためになされた第1発明のプログラム書換システムは、第1電子制御装置および第2電子制御装置と、プログラム書換装置と、電源供給部とを備える。
第1電子制御装置および第2電子制御装置は、所定の制御対象を制御するための制御プログラムを記憶して記憶内容の書き換えが可能な不揮発性メモリを備え、予め設定された書換条件が成立した場合に、不揮発性メモリに記憶された制御プログラムの内容を書き換えるように構成される。
The program rewriting system of the first invention made to achieve the above object includes a first electronic control device, a second electronic control device, a program rewriting device, and a power supply unit.
The first electronic control device and the second electronic control device are provided with a nonvolatile memory capable of storing a control program for controlling a predetermined control object and rewriting the stored contents, and a preset rewriting condition is established. In some cases, the contents of the control program stored in the nonvolatile memory are rewritten.

プログラム書換装置は、第1電子制御装置および第2電子制御装置と通信線を介してデータ通信可能に接続され、制御プログラムの内容を書き換えるための書換データを通信線を介して第1電子制御装置および第2電子制御装置へ送信する。   The program rewriting device is connected to the first electronic control device and the second electronic control device via a communication line so that data communication is possible, and the rewrite data for rewriting the contents of the control program is sent to the first electronic control device via the communication line. And to the second electronic control unit.

電源供給部は、第1電子制御装置および第2電子制御装置に電源を供給する。
そしてプログラム書換装置は、第1電源制御手段と、第1要求送信手段と、第1識別情報送信手段と、第2電源制御手段と、第2要求送信手段と、第2識別情報送信手段とを備える。
The power supply unit supplies power to the first electronic control device and the second electronic control device.
The program rewriting device includes a first power supply control unit, a first request transmission unit, a first identification information transmission unit, a second power supply control unit, a second request transmission unit, and a second identification information transmission unit. Prepare.

第1電源制御手段は、第1電子制御装置および第2電子制御装置のうち、第1電子制御装置へ電源を供給する一方、第2電子制御装置への電源の供給を禁止するように電源供給部を制御する。   The first power supply control means supplies power to the first electronic control device among the first electronic control device and the second electronic control device while prohibiting supply of power to the second electronic control device. Control part.

第1要求送信手段は、電源供給部により第1電子制御装置へ電源が供給されている場合に、応答要求メッセージを通信線を介して送信する。
第1識別情報送信手段は、第1要求送信手段が応答要求メッセージを送信した後に、応答要求メッセージに対して応答する応答メッセージを通信線を介して受信すると、第1識別情報を送信する。
The first request transmission unit transmits a response request message via the communication line when power is supplied to the first electronic control unit by the power supply unit.
The first identification information transmitting means transmits the first identification information when receiving a response message in response to the response request message via the communication line after the first request transmitting means transmits the response request message.

第2電源制御手段は、第1識別情報送信手段が第1識別情報を送信した後に、第2電子制御装置への電源の供給の禁止を解除して、第2電子制御装置へ電源を供給するように電源供給部を制御する。   The second power control means cancels the prohibition of power supply to the second electronic control device and supplies power to the second electronic control device after the first identification information transmission means transmits the first identification information. The power supply unit is controlled as follows.

第2要求送信手段は、電源供給部により第2電子制御装置へ電源が供給されている場合に、応答要求メッセージを通信線を介して送信する。
第2識別情報送信手段は、第2要求送信手段が応答要求メッセージを送信した後に、応答メッセージを通信線を介して受信すると、第1識別情報とは異なる第2識別情報を送信する。
The second request transmission means transmits a response request message via the communication line when power is supplied to the second electronic control unit by the power supply unit.
The second identification information transmitting unit transmits second identification information different from the first identification information when receiving the response message via the communication line after the second request transmitting unit transmits the response request message.

また、第1電子制御装置および第2電子制御装置は、第1応答送信手段と、第1設定手段とを備える。
第1応答送信手段は、応答要求メッセージを通信線を介して受信すると、応答メッセージを通信線を介して送信する。
The first electronic control device and the second electronic control device include first response transmission means and first setting means.
When receiving the response request message via the communication line, the first response transmission means transmits the response message via the communication line.

第1設定手段は、第1応答送信手段が応答メッセージを送信した後に、第1識別情報または第2識別情報を受信すると、受信した第1識別情報または第2識別情報を、自装置の識別情報に設定する。   When receiving the first identification information or the second identification information after the first response transmission means transmits the response message, the first setting means uses the received first identification information or second identification information as the identification information of the device itself. Set to.

このように構成されたプログラム書換システムでは、まず、第1電子制御装置へ電源が供給される一方、第2電子制御装置へ電源が供給されない。このため、プログラム書換装置と第1電子制御装置との間で、応答要求メッセージ、応答メッセージおよび第1識別情報の送受信を行うことで、第1電子制御装置に第1識別情報を設定することができる。   In the program rewriting system configured as described above, first, power is supplied to the first electronic control unit, but power is not supplied to the second electronic control unit. For this reason, the first identification information can be set in the first electronic control device by transmitting and receiving the response request message, the response message, and the first identification information between the program rewriting device and the first electronic control device. it can.

その後、第2電子制御装置へ電源が供給される。このため、プログラム書換装置と第2電子制御装置との間で、応答要求メッセージ、応答メッセージおよび第2識別情報の送受信を行うことで、第2電子制御装置に、第1識別情報とは異なる第2識別情報を設定することができる。   Thereafter, power is supplied to the second electronic control unit. For this reason, by transmitting and receiving a response request message, a response message, and second identification information between the program rewriting device and the second electronic control device, the second electronic control device is made to be different from the first identification information. 2 Identification information can be set.

このように、本発明のプログラム書換システムでは、乱数を発生させることなく、第1電子制御装置および第2電子制御装置がそれぞれ第1識別情報および第2識別情報を設定することができる。このため、本発明のプログラム書換システムによれば、ハードウェア構成とソフトウェア構成が全く同じ複数の電子制御装置が接続された場合に、複数の電子制御装置で互いに異なる識別番号を設定することができる。   Thus, in the program rewriting system of the present invention, the first electronic control device and the second electronic control device can set the first identification information and the second identification information, respectively, without generating random numbers. Therefore, according to the program rewriting system of the present invention, when a plurality of electronic control devices having exactly the same hardware configuration and software configuration are connected, different identification numbers can be set by the plurality of electronic control devices. .

また、上記目的を達成するためになされた第2発明の電子制御装置は、不揮発性メモリと、第2応答送信手段と、第2設定手段と、受信手段と、書換手段とを備える。
不揮発性メモリは、記憶内容の書き換えが可能であり、所定の制御対象を制御するための制御プログラムを記憶する。
An electronic control device according to a second aspect of the invention made to achieve the above object includes a nonvolatile memory, a second response transmission means, a second setting means, a reception means, and a rewriting means.
The nonvolatile memory can rewrite the stored contents, and stores a control program for controlling a predetermined control target.

第2応答送信手段は、揮発性メモリに記憶された制御プログラムの内容を書き換えるための書換データを通信線を介して送信するプログラム書換装置から応答要求メッセージを通信線を介して受信すると、応答メッセージを通信線を介して送信する。   The second response transmission means receives the response request message via the communication line from the program rewriting device that transmits the rewrite data for rewriting the contents of the control program stored in the volatile memory via the communication line. Is transmitted via a communication line.

第2設定手段は、第2応答送信手段が応答メッセージを送信した後に、プログラム書換装置から識別情報を受信すると、受信した識別情報を、自装置の識別情報に設定する。
受信手段は、書換データを通信線を介してプログラム書換装置から受信する。
When receiving the identification information from the program rewriting device after the second response transmission unit transmits the response message, the second setting unit sets the received identification information to the identification information of the own device.
The receiving means receives the rewrite data from the program rewriting device via the communication line.

書換手段は、受信手段により受信した書換データを不揮発性メモリに書き込むことにより、不揮発性メモリに記憶された制御プログラムの内容を書き換える。
このように構成された電子制御装置は、第1発明のプログラム書換システムで使用される電子制御装置であり、第1発明と同様の効果を得ることができる。
The rewriting means rewrites the contents of the control program stored in the nonvolatile memory by writing the rewritten data received by the receiving means in the nonvolatile memory.
The electronic control device configured as described above is an electronic control device used in the program rewriting system of the first invention, and can obtain the same effects as those of the first invention.

通信システム1の構成を示すブロック図である。1 is a block diagram showing a configuration of a communication system 1. FIG. プログラム送信処理を示すフローチャートである。It is a flowchart which shows a program transmission process. 単体書換用送信処理を示すフローチャートである。It is a flowchart which shows the transmission process for single rewriting. 同構成書換用ID割付処理を示すフローチャートである。It is a flowchart which shows the same structure rewriting ID allocation process. 複数書換用送信処理を示すフローチャートである。It is a flowchart which shows the transmission process for multiple rewriting. 書換処理を示すフローチャートである。It is a flowchart which shows a rewriting process. 単体書換用送信処理の手順を示すシーケンス図である。It is a sequence diagram which shows the procedure of the transmission process for single rewriting. 複数書換用送信処理の手順を示すシーケンス図である。It is a sequence diagram which shows the procedure of the transmission process for multiple rewriting. 同構成書換用ID割付処理の手順を示すブロック図である。It is a block diagram which shows the procedure of the structure rewriting ID allocation process.

以下に本発明の実施形態を図面とともに説明する。
本実施形態の通信システム1は、図1に示すように、電子制御装置(Electronic Control Unit)11,12,13,14(以下、ECU11,12,13,14という)と、プログラムの書き換えを行うためのプログラム書換装置15と、電源回路16とを備える。
Embodiments of the present invention will be described below with reference to the drawings.
As shown in FIG. 1, the communication system 1 of the present embodiment rewrites a program with electronic control units (Electronic Control Units) 11, 12, 13, 14 (hereinafter referred to as ECUs 11, 12, 13, 14). A program rewriting device 15 and a power supply circuit 16 are provided.

ECU11,12,13,14とプログラム書換装置15は、通信線17を介して互いにデータ通信可能に接続される。また通信線17には、ECU11,12,13,14をそれぞれ通信線17に対して着脱可能とするためのコネクタ21,22,23,24が設けられている。さらに通信線17には、プログラム書換装置15を通信線17に対して着脱可能とするためのコネクタ25が設けられている。   The ECUs 11, 12, 13, 14 and the program rewriting device 15 are connected to each other via a communication line 17 so that data communication is possible. The communication line 17 is provided with connectors 21, 22, 23 and 24 for enabling the ECUs 11, 12, 13 and 14 to be detachable from the communication line 17. Further, the communication line 17 is provided with a connector 25 for making the program rewriting device 15 detachable from the communication line 17.

ECU11,12,13,14は、マイクロコンピュータ(以下、マイコンという)31と、フラッシュROM32と、通信回路33とを備える。
フラッシュROM32は、記憶内容を書き換え可能な不揮発性メモリであり、マイコン31が実行する制御プログラムを記憶する。
The ECUs 11, 12, 13, and 14 include a microcomputer (hereinafter referred to as a microcomputer) 31, a flash ROM 32, and a communication circuit 33.
The flash ROM 32 is a non-volatile memory in which stored contents can be rewritten, and stores a control program executed by the microcomputer 31.

通信回路33はそれぞれ、例えばCAN(Controller Area Network)通信プロトコルに従い、他のECUとの間で通信線17を介してデータの送受信を行う。また通信回路33は、プログラム書換装置15がコネクタ25を介して通信線17に接続された場合に
、プログラム書換装置15との間でデータの送受信を行う。
Each of the communication circuits 33 transmits / receives data to / from other ECUs via the communication line 17 according to, for example, a CAN (Controller Area Network) communication protocol. The communication circuit 33 transmits / receives data to / from the program rewriting device 15 when the program rewriting device 15 is connected to the communication line 17 via the connector 25.

マイコン31は、CPU、ROM、RAM、I/O及びこれらの構成を接続するバスラインなどから構成されている。そしてマイコン31は、フラッシュROM32に記憶された制御プログラムに基づいて、各種処理を実行する。   The microcomputer 31 includes a CPU, a ROM, a RAM, an I / O, a bus line that connects these components, and the like. The microcomputer 31 executes various processes based on the control program stored in the flash ROM 32.

プログラム書換装置15は、マイコン41と、操作部42と、通信回路43と、入出力回路44とを備える。
マイコン41は、CPU、ROM、RAM、I/O及びこれらの構成を接続するバスラインなどから構成されている。そしてマイコン41は、ECU11,12,13,14に記憶されている制御プログラムを書き換えるための処理を行う。
The program rewriting device 15 includes a microcomputer 41, an operation unit 42, a communication circuit 43, and an input / output circuit 44.
The microcomputer 41 includes a CPU, a ROM, a RAM, an I / O, a bus line that connects these components, and the like. The microcomputer 41 performs processing for rewriting the control program stored in the ECUs 11, 12, 13, and 14.

操作部42は、プログラム書換装置15の使用者(通常は、制御プログラムを書き換える作業者)からの外部操作による指令を入力するためのものである。
そして操作部42は、1台のECUの制御プログラムの書き換えを指示するために予め設定された単体書換操作が操作部42に対して行われると、その旨を示す単体書換信号を出力する。
The operation unit 42 is for inputting a command by an external operation from a user of the program rewriting device 15 (usually an operator who rewrites the control program).
When the unit rewriting operation set in advance to instruct rewriting of the control program of one ECU is performed on the operation unit 42, the operation unit 42 outputs a unit rewriting signal indicating that.

また操作部42は、ハードウェア構成とソフトウェア構成が互いに異なる複数台のECUの制御プログラムの書き換えを指示するために予め設定された異構成書換操作が操作部42に対して行われると、その旨を示す異構成書換信号を出力する。   Further, when a different configuration rewriting operation set in advance to instruct rewriting of the control programs of a plurality of ECUs having different hardware configurations and software configurations is performed on the operation unit 42, the operation unit 42 Is output.

また操作部42は、ハードウェア構成とソフトウェア構成が互いに同じ複数台のECUの制御プログラムの書き換えを指示するために予め設定された同構成書換操作が操作部42に対して行われると、その旨を示す同構成書換信号を出力する。なお、同構成書換操作では、制御プログラムの書き換えを行うECUの台数を指示する操作を行う必要がある。そして、同構成書換信号には、ECUの台数を示す書換台数情報が含まれる。   In addition, when the same configuration rewriting operation set in advance for instructing the rewriting of the control program of a plurality of ECUs having the same hardware configuration and software configuration is performed on the operation unit 42, the operation unit 42 The same configuration rewrite signal is output. In the configuration rewriting operation, it is necessary to perform an operation for instructing the number of ECUs for rewriting the control program. The configuration rewriting signal includes rewritten number information indicating the number of ECUs.

通信回路43はそれぞれ、コネクタ25を介して通信線17に接続された場合に、ECU11,12,13,14との間でデータの送受信を行う。
入出力回路44は、ECU11,12,13,14の外部とマイコン41の間で信号の入出力を行わせるための回路である。
Each of the communication circuits 43 transmits and receives data to and from the ECUs 11, 12, 13, and 14 when connected to the communication line 17 via the connector 25.
The input / output circuit 44 is a circuit for inputting / outputting signals between the outside of the ECUs 11, 12, 13, and 14 and the microcomputer 41.

またプログラム書換装置15は、ECU11,12,13,14へ送信する新たな制御プログラム(以下、新制御プログラムともいう)が記憶された記憶媒体45を着脱可能に接続するコネクタ(不図示)を備えている。そしてプログラム書換装置15は、記憶媒体45がコネクタを介して接続されている場合に、マイコン41と記憶媒体45との間でデータの入出力が可能に構成されている。   The program rewriting device 15 includes a connector (not shown) for detachably connecting a storage medium 45 in which a new control program (hereinafter also referred to as a new control program) to be transmitted to the ECUs 11, 12, 13, and 14 is stored. ing. The program rewriting device 15 is configured to be able to input and output data between the microcomputer 41 and the storage medium 45 when the storage medium 45 is connected via a connector.

電源回路16は、ECU11,12,13,14へ電源を供給するための回路である。電源回路16は、ECU11,12,13,14のそれぞれへ電源を供給するための電源供給線51,52,53,54を備える。そして電源回路16は、プログラム書換装置15からの指令に基づき、電源供給線51,52,53,54のそれぞれについて、電源供給を行うか否かを決定する。以下、電源供給線51,52,53,54をそれぞれ第1,2,3,4電源供給線ともいう。   The power supply circuit 16 is a circuit for supplying power to the ECUs 11, 12, 13, and 14. The power supply circuit 16 includes power supply lines 51, 52, 53, and 54 for supplying power to the ECUs 11, 12, 13, and 14, respectively. The power supply circuit 16 determines whether or not to supply power to each of the power supply lines 51, 52, 53, and 54 based on a command from the program rewriting device 15. Hereinafter, the power supply lines 51, 52, 53, and 54 are also referred to as first, second, third, and fourth power supply lines, respectively.

次に、プログラム書換装置15が実行するプログラム送信処理の手順を説明する。プログラム送信処理は、プログラム書換装置15の動作中に繰り返し実行される処理である。
このプログラム送信処理が実行されると、マイコン41は、図2に示すように、まずS10にて、操作部42から単体書換信号が入力したか否かを判断する。ここで、単体書換
信号が入力した場合には(S10:YES)、S20にて、電源供給線51,52,53,54を介した電源供給を指示する全電源供給指令を入出力回路44から電源回路16へ出力する。そして電源回路16は、全電源供給指令が入力すると、電源供給線51,52,53,54を介した電源供給を開始する。なお、操作部42から単体書換信号が入力する状況下では、制御プログラムを書き換える作業者が、あらかじめ、ECU11,12,13,14のうち1台のみを通信線17に接続している。その後S30にて、単体書換用送信処理(後述)を実行し、単体書換用送信処理が終了すると、プログラム送信処理を一旦終了する。
Next, the procedure of the program transmission process executed by the program rewriting device 15 will be described. The program transmission process is a process that is repeatedly executed during the operation of the program rewriting device 15.
When this program transmission process is executed, the microcomputer 41 first determines whether or not a single rewrite signal is input from the operation unit 42 in S10, as shown in FIG. If a single rewrite signal is input (S10: YES), a full power supply command for instructing power supply via the power supply lines 51, 52, 53, and 54 is issued from the input / output circuit 44 in S20. Output to the power supply circuit 16. The power supply circuit 16 starts power supply via the power supply lines 51, 52, 53, and 54 when the full power supply command is input. Note that, under a situation where a single rewrite signal is input from the operation unit 42, an operator who rewrites the control program connects only one of the ECUs 11, 12, 13, and 14 to the communication line 17 in advance. Thereafter, in S30, a single rewrite transmission process (described later) is executed, and when the single rewrite transmission process is completed, the program transmission process is temporarily terminated.

またS10にて、単体書換信号が入力していない場合には(S10:NO)、S40にて、操作部42から異構成書換信号が入力したか否かを判断する。ここで、異構成書換信号が入力した場合には(S40:YES)、S50にて、全電源供給指令を入出力回路44から電源回路16へ出力する。そして、電源回路16は、全電源供給指令が入力すると、電源供給線51,52,53,54を介した電源供給を開始する。なお、操作部42から異構成書換信号が入力する状況下では、制御プログラムを書き換える作業者が、あらかじめ、ECU11,12,13,14のうち2台以上を通信線17に接続している。   If the single rewrite signal is not input in S10 (S10: NO), it is determined in S40 whether or not a different configuration rewrite signal is input from the operation unit 42. Here, when the different configuration rewrite signal is input (S40: YES), the entire power supply command is output from the input / output circuit 44 to the power supply circuit 16 in S50. And the power supply circuit 16 will start the power supply via the power supply line 51,52,53,54, if the all power supply command is input. Note that, in a situation where a different configuration rewrite signal is input from the operation unit 42, an operator who rewrites the control program connects two or more of the ECUs 11, 12, 13, and 14 to the communication line 17 in advance.

その後S60にて、異構成書換要求メッセージを通信回路43から送信する。そしてS70にて、異構成書換用ID割付処理を実行する。
この異構成書換用ID割付処理は、この処理の実行開始から予め設定された割付実行時間が経過した後に終了する処理であり、乱数を含むCANID要求メッセージをECU11,12,13,14から受信すると、CANID通知メッセージを通信回路43から送信する。CANID通知メッセージには、受信したCANID要求メッセージから抽出した乱数と、プログラム書換装置15が割り当てたCANIDが含まれる。なお、この異構成書換用ID割付処理は、特許文献1に記載されている処理と基本的に同じであるため、詳細な説明は省略する。そして、異構成書換用ID割付処理が終了すると、S100に移行する。
Thereafter, in S60, a different configuration rewrite request message is transmitted from the communication circuit 43. Then, in S70, the different configuration rewriting ID assignment process is executed.
This different configuration rewriting ID allocation process is a process that ends after a predetermined allocation execution time has elapsed from the start of the execution of this process, and when a CANID request message including a random number is received from the ECU 11, 12, 13, 14. , A CANID notification message is transmitted from the communication circuit 43. The CANID notification message includes a random number extracted from the received CANID request message and the CANID assigned by the program rewriting device 15. This different configuration rewriting ID assignment process is basically the same as the process described in Patent Document 1, and therefore a detailed description thereof is omitted. Then, when the different configuration rewriting ID assignment process is completed, the process proceeds to S100.

またS40にて、異構成書換信号が入力していない場合には(S40:NO)、S80にて、操作部42から同構成書換信号が入力したか否かを判断する。ここで、同構成書換信号が入力した場合には(S80:YES)、S90にて、同構成書換用送信処理(後述)を実行し、同構成書換用送信処理が終了すると、S100に移行する。一方、同構成書換信号が入力していない場合には(S80:NO)、プログラム送信処理を一旦終了する。   In S40, if a different configuration rewrite signal is not input (S40: NO), it is determined in S80 whether or not the same configuration rewrite signal is input from the operation unit 42. If the same configuration rewriting signal is input (S80: YES), the same configuration rewriting transmission process (described later) is executed in S90, and when the same configuration rewriting transmission process ends, the process proceeds to S100. . On the other hand, if the same configuration rewriting signal is not input (S80: NO), the program transmission process is temporarily terminated.

そしてS100に移行すると、複数書換用送信処理(後述)を実行し、複数書換用送信処理が終了すると、プログラム送信処理を一旦終了する。
次に、S30で実行する単体書換用送信処理の手順を説明する。
When the process proceeds to S100, a multiple rewriting transmission process (described later) is executed. When the multiple rewriting transmission process ends, the program transmission process is temporarily terminated.
Next, the procedure of the single rewrite transmission process executed in S30 will be described.

この単体書換用送信処理が実行されると、マイコン41は、図3に示すように、まずS210にて、新制御プログラムの書き換えを要求する書換要求メッセージを通信回路43から送信する(図7の書換要求メッセージD01を参照)。そしてS220にて、書換応答メッセージ(図7の書換応答メッセージD02を参照)を受信したか否かを判断する。ここで、書換応答メッセージを受信していない場合には(S220:NO)、S220の処理を繰り返すことにより、書換応答メッセージを受信するまで待機する。そして、書換応答メッセージを受信すると(S220:YES)、S230にて、新制御プログラムから、未送信のデータを、予め設定された送信データ量分(フラッシュROMへの書き込み単位の倍数)抽出する。   When this single rewrite transmission process is executed, the microcomputer 41 first transmits a rewrite request message for requesting rewriting of the new control program from the communication circuit 43 in S210 as shown in FIG. 3 (FIG. 7). (Refer to the rewrite request message D01). In S220, it is determined whether or not a rewrite response message (see rewrite response message D02 in FIG. 7) has been received. If no rewrite response message has been received (S220: NO), the process of S220 is repeated until the rewrite response message is received. When a rewrite response message is received (S220: YES), untransmitted data is extracted from the new control program by a preset amount of transmission data (a multiple of the write unit to the flash ROM) in S230.

そしてS240にて、S230で抽出したデータを書込データとして送信し(図7の書
込データD03を参照)、S250にて、新制御プログラムの全データを送信したか否かを判断する。ここで、全データを送信していない場合には(S250:NO)、S260にて、書込完了メッセージ(図7の書込完了メッセージD04を参照)を受信したか否かを判断する。
In S240, the data extracted in S230 is transmitted as write data (see write data D03 in FIG. 7). In S250, it is determined whether all data of the new control program has been transmitted. If all data has not been transmitted (S250: NO), it is determined in S260 whether or not a write completion message (see write completion message D04 in FIG. 7) has been received.

ここで、書込完了メッセージを受信していない場合には(S260:NO)、S260の処理を繰り返すことにより、書込完了メッセージを受信するまで待機する。そして、書込完了メッセージを受信すると(S260:YES)、S230に移行する。   If the write completion message has not been received (S260: NO), the process of S260 is repeated to wait until the write completion message is received. When a write completion message is received (S260: YES), the process proceeds to S230.

またS250にて、新制御プログラムの全データを送信した場合には(S250:YES)、単体書換用送信処理を終了する。
次に、S90で実行する同構成書換用ID割付処理の手順を説明する。
If all data of the new control program is transmitted in S250 (S250: YES), the single rewrite transmission process is terminated.
Next, the procedure of the configuration rewriting ID assignment process executed in S90 will be described.

この同構成書換用ID割付処理が実行されると、マイコン41は、図4に示すように、まずS310にて、装置指示値nを1に設定する。次にS320にて、第n電源供給線を介した電源供給を指示する第n電源供給指令を入出力回路44から電源回路16へ出力する。そして電源回路16は、第n電源供給指令が入力すると、第n電源供給線を介した電源供給を開始する。   When this same configuration rewriting ID assignment process is executed, the microcomputer 41 first sets the device instruction value n to 1 in S310 as shown in FIG. In step S320, an n-th power supply command for instructing power supply via the n-th power supply line is output from the input / output circuit 44 to the power supply circuit 16. When the nth power supply command is input, the power supply circuit 16 starts power supply via the nth power supply line.

さらにS330にて、CAN通信のアイデンティファイア(以下、CANIDという)を割り付けるための応答を要求するCANID割付要求メッセージを通信回路43から送信する。なお本実施形態において、CANID割付要求メッセージを構成するCANフレームのアービトレーションフィールドには、CANIDとして「0x7E0」が設定されている。   Further, in S330, the communication circuit 43 transmits a CANID assignment request message for requesting a response for assigning an identifier for CAN communication (hereinafter referred to as CANID). In this embodiment, “0x7E0” is set as the CANID in the arbitration field of the CAN frame constituting the CANID allocation request message.

そしてS340にて、CANID割付要求メッセージに対する応答メッセージを通信回路43で受信したか否かを判断する。なお本実施形態において、応答メッセージを構成するCANフレームのアービトレーションフィールドには、CANIDとして「0x7E8」が設定されている。   In S340, it is determined whether or not the communication circuit 43 has received a response message to the CANID allocation request message. In the present embodiment, “0x7E8” is set as the CANID in the arbitration field of the CAN frame constituting the response message.

ここで、応答メッセージを受信していない場合には(S340:NO)、S340の処理を繰り返すことにより、応答メッセージを受信するまで待機する。そして、応答メッセージを受信すると(S340:YES)、S350にて、CANIDを「0x00n」に割り付ける旨を指示するCANID割付メッセージを通信回路43から送信する。なお本実施形態において、CANID割付メッセージを構成するCANフレームのアービトレーションフィールドには、CANIDとして「0x7E0」が設定されている。   If no response message has been received (S340: NO), the process of S340 is repeated until the response message is received. When the response message is received (S340: YES), a CANID assignment message for instructing to assign CANID to “0x00n” is transmitted from the communication circuit 43 in S350. In this embodiment, “0x7E0” is set as the CANID in the arbitration field of the CAN frame constituting the CANID allocation message.

その後S360にて、装置指示値nをインクリメント(1加算)する。そしてS370にて、装置指示値nが書換台数を超えているか否かを判断する。この書換台数は、上記同構成書換信号に含まれている書換台数情報が示す値である。ここで、装置指示値nが書換台数以下である場合には(S370:NO)、S320に移行して、上述の処理を繰り返す。   Thereafter, in S360, the device instruction value n is incremented (added by 1). In S370, it is determined whether or not the device instruction value n exceeds the number of rewrites. This number of rewrites is a value indicated by the information on the number of rewrites included in the same configuration rewrite signal. Here, when the device instruction value n is equal to or less than the number of rewrites (S370: NO), the process proceeds to S320 and the above process is repeated.

一方、装置指示値nが書換台数を超えている場合には(S370:YES)、同構成書換用ID割付処理を終了する。
次に、S100で実行する複数書換用送信処理の手順を説明する。
On the other hand, if the device instruction value n exceeds the number of rewrites (S370: YES), the configuration rewriting ID assignment process is terminated.
Next, the procedure of the multiple rewriting transmission process executed in S100 will be described.

この複数書換用送信処理が実行されると、マイコン41は、図5に示すように、まずS410にて、新制御プログラムの書き換えを要求する書換要求メッセージを通信回路43から送信する(図8の書換要求メッセージD11,D12を参照)。そしてS420にて
、制御プログラムの書換対象となるECUの全てから書換応答メッセージ(図8の書換応答メッセージD13,D14を参照)を受信したか否かを判断する。ここで、書換対象となるECUの全てから書換応答メッセージを受信していない場合には(S420:NO)、S420の処理を繰り返すことにより、書換対象となるECUの全てから書換応答メッセージを受信するまで待機する。そして、書換対象となるECUの全てから書換応答メッセージを受信すると(S420:YES)、S430にて、新制御プログラムから、未送信のデータを、予め設定された送信データ量分(フラッシュROMへの書き込み単位の倍数)抽出する。
When this multi-rewrite transmission process is executed, the microcomputer 41 first transmits a rewrite request message for requesting rewriting of the new control program from the communication circuit 43 in S410 as shown in FIG. 5 (FIG. 8). (Refer to the rewrite request messages D11 and D12). In S420, it is determined whether or not a rewrite response message (see rewrite response messages D13 and D14 in FIG. 8) has been received from all of the ECUs to be rewritten by the control program. Here, when the rewrite response message has not been received from all of the ECUs to be rewritten (S420: NO), the rewrite response message is received from all of the ECUs to be rewritten by repeating the process of S420. Wait until. When a rewrite response message is received from all of the ECUs to be rewritten (S420: YES), untransmitted data is sent from the new control program for a preset transmission data amount (to the flash ROM) in S430. (Multiple of writing unit).

そしてS440にて、S430で抽出したデータを書込データとして送信し(図8の書込データD15,D16を参照)、S450にて、新制御プログラムの全データを送信したか否かを判断する。ここで、全データを送信していない場合には(S450:NO)、S460にて、書換対象となるECUの全てから書込完了メッセージ(図8の書込完了メッセージD17,D18を参照)を受信したか否かを判断する。   In S440, the data extracted in S430 is transmitted as write data (see write data D15 and D16 in FIG. 8). In S450, it is determined whether all data of the new control program has been transmitted. . If all the data has not been transmitted (S450: NO), a write completion message (see write completion messages D17 and D18 in FIG. 8) is sent from all the ECUs to be rewritten in S460. It is determined whether or not it has been received.

ここで、書換対象となるECUの全てから書込完了メッセージを受信していない場合には(S460:NO)、S460の処理を繰り返すことにより、書換対象となるECUの全てから書込完了メッセージを受信するまで待機する。そして、書換対象となるECUの全てから書込完了メッセージを受信すると(S460:YES)、S430に移行する。   Here, when the writing completion message has not been received from all the ECUs to be rewritten (S460: NO), the writing completion message is sent from all the ECUs to be rewritten by repeating the process of S460. Wait for reception. When the writing completion message is received from all the ECUs to be rewritten (S460: YES), the process proceeds to S430.

またS450にて、新制御プログラムの全データを送信した場合には(S450:YES)、複数書換用送信処理を終了する。
次に、ECU11,12,13,14が実行する書換処理の手順を説明する。書換処理は、ECU11〜14の動作中に繰り返し実行される処理である。
If all data of the new control program is transmitted in S450 (S450: YES), the multiple rewriting transmission process is terminated.
Next, the procedure of the rewriting process which ECU11, 12, 13, 14 performs is demonstrated. The rewriting process is a process that is repeatedly executed during the operation of the ECUs 11 to 14.

この書換処理が実行されると、マイコン31は、図6に示すように、まずS510にて、書換要求メッセージを受信したか否かを判断する。ここで、書換要求メッセージを受信した場合には(S510:YES)、単体書換であると判断し、S520にて、単体書換用データ書込処理を行う。単体書換用データ書込処理では、まず、S510で受信した書換要求メッセージに対する書換応答メッセージを通信回路33から送信する(図7の書換応答メッセージD02を参照)。その後、プログラム書換装置15から順次送信される上記送信データ量分(S230を参照)の書込データを受信する毎に、受信した書込データをフラッシュROM32に書き込む。そして、上記送信データ量分の書込データの書き込みが完了する毎に書込完了メッセージを通信回路33から送信する(図7の書込完了メッセージD04を参照)。そして、新制御プログラムの全データの書き込みが完了すると、単体書換用データ書込処理を終了する。そして、単体書換用データ書込処理が終了すると、書換処理を一旦終了する。   When this rewriting process is executed, the microcomputer 31 first determines whether or not a rewriting request message has been received in S510, as shown in FIG. If a rewrite request message has been received (S510: YES), it is determined that it is a single rewrite, and a single rewrite data writing process is performed in S520. In the single rewrite data writing process, first, a rewrite response message for the rewrite request message received in S510 is transmitted from the communication circuit 33 (see the rewrite response message D02 in FIG. 7). Thereafter, the received write data is written into the flash ROM 32 each time the write data corresponding to the transmission data amount (see S230) sequentially transmitted from the program rewriting device 15 is received. Then, a write completion message is transmitted from the communication circuit 33 each time writing of the write data for the transmission data amount is completed (see the write completion message D04 in FIG. 7). When the writing of all data of the new control program is completed, the single rewriting data writing process is terminated. Then, when the single rewriting data writing process is completed, the rewriting process is temporarily ended.

またS510にて、書換要求メッセージを受信していない場合には(S510:NO)、S530にて、CANID割付要求メッセージを受信したか否かを判断する。ここで、CANID割付要求メッセージを受信した場合には(S530:YES)、S540にて、応答メッセージを通信回路33から送信する。   If the rewrite request message has not been received at S510 (S510: NO), it is determined at S530 whether a CANID allocation request message has been received. Here, when the CANID allocation request message is received (S530: YES), a response message is transmitted from the communication circuit 33 in S540.

さらにS550にて、CANID割付メッセージを受信したか否かを判断する。ここで、CANID割付メッセージを受信していない場合には(S550:NO)、S550の処理を繰り返すことにより、CANID割付メッセージを受信するまで待機する。そして、CANID割付メッセージを受信すると(S550:YES)、S560にて、CANID割付メッセージが指示するCANIDを、自装置の送信用CANIDに設定する。   In step S550, it is determined whether a CANID assignment message has been received. Here, when the CANID allocation message has not been received (S550: NO), the process of S550 is repeated to wait until the CANID allocation message is received. When the CANID assignment message is received (S550: YES), the CANID indicated by the CANID assignment message is set as the CANID for transmission of the own device in S560.

そしてS570にて、これ以降に受信したCANID割付メッセージが指示するCAN
IDへの再設定を禁止する。これにより、S560で設定された送信用CANIDは、ECUの電源がオフされるまで保持される。
In S570, the CAN indicated by the CANID allocation message received thereafter is designated.
Re-setting to ID is prohibited. Thus, the transmission CANID set in S560 is held until the ECU is powered off.

その後S580にて、複数書換用データ書込処理を行う。複数書換用データ書込処理では、まず、プログラム書換装置15から書換要求メッセージを受信するまで待機し、書換要求メッセージを受信すると、書換応答メッセージを通信回路33から送信する(図8の書換応答メッセージD13,D14を参照)。その後、プログラム書換装置15から順次送信される上記送信データ量分の書込データを受信する毎に、受信した書込データをフラッシュROM32に書き込む。そして、上記送信データ量分の書込データの書き込みが完了する毎に書込完了メッセージを通信回路33から送信する(図8の書込完了メッセージD17,D18を参照)。そして、新制御プログラムの全データの書き込みが完了すると、複数書換用データ書込処理を終了する。そして、複数書換用データ書込処理が終了すると、書換処理を一旦終了する。   Thereafter, in S580, a plurality of rewrite data writing processes are performed. In the data rewriting process for multiple rewriting, first, it waits until a rewrite request message is received from the program rewriting device 15, and when a rewrite request message is received, a rewrite response message is transmitted from the communication circuit 33 (rewrite response message in FIG. 8). D13, D14). Thereafter, the received write data is written into the flash ROM 32 each time the write data for the transmission data amount sequentially transmitted from the program rewriting device 15 is received. A write completion message is transmitted from the communication circuit 33 every time writing data for the transmission data amount is completed (see write completion messages D17 and D18 in FIG. 8). When the writing of all data of the new control program is completed, the multiple rewriting data writing process is terminated. When the multiple rewriting data writing process is completed, the rewriting process is temporarily ended.

またS530にて、CANID割付要求メッセージを受信していない場合には(S530:NO)、S590にて、異構成書換要求メッセージを受信したか否かを判断する。ここで、異構成書換要求メッセージを受信していない場合には(S590:NO)、書換処理を一旦終了する。一方、異構成書換要求メッセージを受信した場合には(S590:YES)、S600にて、ID設定処理を行う。このID設定処理では、まず、自装置で発生させた乱数を含むCANID要求メッセージをプログラム書換装置15へ送信する。そして、プログラム書換装置15から、CANID通知メッセージを受信すると、CANID通知メッセージから抽出した乱数と、自装置で発生させた乱数とが一致するか否かを判断し、一致する場合に、CANID通知メッセージが指示するCANIDを、自装置の送信用CANIDに設定する。なお、このID設定処理は、特許文献1に記載されている処理と基本的に同じであるため、詳細な説明は省略する。   If the CANID assignment request message has not been received at S530 (S530: NO), it is determined at S590 whether a different configuration rewrite request message has been received. Here, when the different configuration rewriting request message has not been received (S590: NO), the rewriting process is temporarily ended. On the other hand, if a different configuration rewrite request message is received (S590: YES), ID setting processing is performed in S600. In this ID setting process, first, a CANID request message including a random number generated by the own apparatus is transmitted to the program rewriting apparatus 15. Then, when the CANID notification message is received from the program rewriting device 15, it is determined whether or not the random number extracted from the CANID notification message matches the random number generated by the own device. Is set to the CANID for transmission of its own device. Since this ID setting process is basically the same as the process described in Patent Document 1, detailed description thereof is omitted.

そしてS600の処理が終了すると、S610にて、S580と同様にして、複数書換用データ書込処理を行い、複数書換用データ書込処理が終了すると、書換処理を一旦終了する。   When the process of S600 ends, in S610, a plurality of rewrite data writing processes are performed in the same manner as in S580. When the plurality of rewrite data writing processes end, the rewrite process is temporarily ended.

次に、ハードウェア構成とソフトウェア構成が互いに同じ複数台のECUの制御プログラムを書き換える場合の具体例を説明する。
図9に示すように、ECU11,12,13,14とプログラム書換装置15が通信線17に接続されているとする。なお、ECU11,12,13,14は、受信用CANIDの初期値として「0x7E0」が設定され、送信用CANIDの初期値として「0x7E8」が設定されている。
Next, a specific example in the case where the control program of a plurality of ECUs having the same hardware configuration and software configuration is rewritten will be described.
As shown in FIG. 9, it is assumed that the ECUs 11, 12, 13, 14 and the program rewriting device 15 are connected to the communication line 17. In the ECUs 11, 12, 13, and 14, "0x7E0" is set as the initial value of the CANID for reception, and "0x7E8" is set as the initial value of the CANID for transmission.

まず、プログラム書換装置15の操作部42に対して同構成書換操作が行われると、プログラム書換装置15が第1電源供給指令を出力し、電源回路16が、電源供給線51(第1電源供給線)を介してECU11への電源供給を開始する。これにより、ECU11が起動する。   First, when the same configuration rewriting operation is performed on the operation unit 42 of the program rewriting device 15, the program rewriting device 15 outputs a first power supply command, and the power supply circuit 16 causes the power supply line 51 (first power supply). The power supply to the ECU 11 is started via the line). Thereby, ECU11 starts.

その後、プログラム書換装置15が、CANIDとして「0x7E0」が設定されているCANID割付要求メッセージを送信する。これにより、ECU11が、このCANID割付要求メッセージを受信する(矢印L11を参照)。   Thereafter, the program rewriting device 15 transmits a CANID allocation request message in which “0x7E0” is set as the CANID. Thereby, ECU11 receives this CANID allocation request message (refer arrow L11).

そして、CANID割付要求メッセージを受信したECU11は、CANIDとして「0x7E8」が設定されている応答メッセージを送信する。これにより、プログラム書換装置15が、この応答メッセージを受信する(矢印L12を参照)。   Then, the ECU 11 that has received the CANID allocation request message transmits a response message in which “0x7E8” is set as the CANID. As a result, the program rewriting device 15 receives this response message (see arrow L12).

さらに、応答メッセージを受信したプログラム書換装置15は、CANIDを「0x001」に割り付ける旨を指示するCANID割付メッセージを送信する。なお、CANID割付メッセージには、CANIDとして「0x7E0」が設定されている。これにより、ECU11が、このCANID割付メッセージを受信する(矢印L13を参照)。   Further, the program rewriting device 15 that has received the response message transmits a CANID assignment message instructing that the CANID is assigned to “0x001”. In the CANID allocation message, “0x7E0” is set as the CANID. Thereby, ECU11 receives this CANID allocation message (refer arrow L13).

そして、CANID割付メッセージを受信したECU11は、CANID割付メッセージに基づいて、送信用CANIDを「0x001」に設定する(矢印L14とECU11aを参照)。   The ECU 11 that has received the CANID assignment message sets the transmission CANID to “0x001” based on the CANID assignment message (see the arrow L14 and the ECU 11a).

次に、プログラム書換装置15が第2電源供給指令を出力し、電源回路16が、電源供給線52(第2電源供給線)を介してECU12への電源供給を開始する。これにより、ECU12が起動する。   Next, the program rewriting device 15 outputs a second power supply command, and the power supply circuit 16 starts power supply to the ECU 12 via the power supply line 52 (second power supply line). Thereby, ECU12 starts.

その後、プログラム書換装置15が、CANIDとして「0x7E0」が設定されているCANID割付要求メッセージを送信する。これにより、ECU12が、このCANID割付要求メッセージを受信する(矢印L21を参照)。   Thereafter, the program rewriting device 15 transmits a CANID allocation request message in which “0x7E0” is set as the CANID. Thereby, ECU12 receives this CANID allocation request message (refer arrow L21).

そして、CANID割付要求メッセージを受信したECU12は、CANIDとして「0x7E8」が設定されている応答メッセージを送信する。これにより、プログラム書換装置15が、この応答メッセージを受信する(矢印L22を参照)。   Then, the ECU 12 that has received the CANID allocation request message transmits a response message in which “0x7E8” is set as the CANID. As a result, the program rewriting device 15 receives this response message (see arrow L22).

さらに、応答メッセージを受信したプログラム書換装置15は、CANIDを「0x002」に割り付ける旨を指示するCANID割付メッセージを送信する。なお、CANID割付メッセージには、CANIDとして「0x7E0」が設定されている。これにより、ECU12が、このCANID割付メッセージを受信する(矢印L23を参照)。   Further, the program rewriting device 15 that has received the response message transmits a CANID assignment message instructing that the CANID is assigned to “0x002”. In the CANID allocation message, “0x7E0” is set as the CANID. Thereby, ECU12 receives this CANID allocation message (refer arrow L23).

そして、CANID割付メッセージを受信したECU12は、CANID割付メッセージに基づいて、送信用CANIDを「0x002」に設定する(矢印L24とECU12aを参照)。   And ECU12 which received the CANID allocation message sets CANID for transmission to "0x002" based on the CANID allocation message (refer arrow L24 and ECU12a).

次に、ECU13が、ECU11,12と同様のメッセージ交換をプログラム書換装置15との間で行い、送信用CANIDを「0x003」に設定する(矢印L34とECU13aを参照)。   Next, the ECU 13 exchanges messages with the program rewriting device 15 in the same manner as the ECUs 11 and 12, and sets the transmission CANID to “0x003” (see the arrow L34 and the ECU 13a).

その後にECU14が、ECU11,12と同様のメッセージ交換をプログラム書換装置15との間で行い、送信用CANIDを「0x004」に設定する(矢印L44とECU14aを参照)。   Thereafter, the ECU 14 exchanges messages similar to those of the ECUs 11 and 12 with the program rewriting device 15, and sets the transmission CANID to “0x004” (see the arrow L44 and the ECU 14a).

このように構成された通信システム1は、ECU11,12と、プログラム書換装置15と、電源回路16とを備える。
ECU11,12は、制御プログラムを記憶して記憶内容の書き換えが可能なフラッシュROM32を備え、書換要求メッセージを受信すると、フラッシュROM32に記憶された制御プログラムの内容を書き換えるように構成される。
The communication system 1 configured as described above includes ECUs 11 and 12, a program rewriting device 15, and a power supply circuit 16.
The ECUs 11 and 12 are provided with a flash ROM 32 that can store a control program and rewrite the stored contents, and is configured to rewrite the contents of the control program stored in the flash ROM 32 when a rewrite request message is received.

プログラム書換装置15は、ECU11,12と通信線17を介してデータ通信可能に接続され、制御プログラムの内容を書き換えるための書込データを通信線17を介してECU11,12へ送信する。   The program rewriting device 15 is connected to the ECUs 11 and 12 via the communication line 17 so as to be capable of data communication, and transmits write data for rewriting the contents of the control program to the ECUs 11 and 12 via the communication line 17.

電源回路16は、ECU11,12に電源を供給する。
プログラム書換装置15は、まず、ECU11,12のうち、ECU11へ電源を供給
する一方、ECU12への電源の供給を禁止するように電源回路16を制御する(S310,S320)。そしてプログラム書換装置15は、電源回路16によりECU11へ電源が供給されている場合に、CANID割付要求メッセージを通信線17を介して送信する(S330)。
The power supply circuit 16 supplies power to the ECUs 11 and 12.
First, the program rewriting device 15 controls the power supply circuit 16 so as to prohibit the supply of power to the ECU 12 while supplying power to the ECU 11 among the ECUs 11 and 12 (S310, S320). Then, when the power is supplied to the ECU 11 by the power supply circuit 16, the program rewriting device 15 transmits a CANID assignment request message via the communication line 17 (S330).

プログラム書換装置15は、CANID割付要求メッセージを送信した後に、応答メッセージを通信線17を介して受信すると、CANIDを「0x001」に割り付ける旨を指示するCANID割付メッセージを送信する(S310,S350)。   When the program rewriting device 15 transmits the CANID allocation request message and then receives a response message via the communication line 17, the program rewriting device 15 transmits a CANID allocation message instructing to allocate the CANID to “0x001” (S310, S350).

次にプログラム書換装置15は、CANID割付メッセージを送信した後に、ECU12への電源の供給の禁止を解除して、ECU12へ電源を供給するように電源回路16を制御する(S320,S360)。   Next, after transmitting the CANID assignment message, the program rewriting device 15 cancels the prohibition of power supply to the ECU 12 and controls the power supply circuit 16 to supply power to the ECU 12 (S320, S360).

そしてプログラム書換装置15は、電源回路16によりECU12へ電源が供給されている場合に、CANID割付要求メッセージを通信線17を介して送信する(S330)。   Then, when power is supplied to the ECU 12 by the power supply circuit 16, the program rewriting device 15 transmits a CANID assignment request message via the communication line 17 (S330).

プログラム書換装置15は、CANID割付要求メッセージを送信した後に、応答メッセージを通信線17を介して受信すると、CANIDを「0x002」に割り付ける旨を指示するCANID割付メッセージを送信する(S350,S360)。   When the program rewriting device 15 receives the response message via the communication line 17 after transmitting the CANID allocation request message, the program rewriting device 15 transmits a CANID allocation message instructing to allocate the CANID to “0x002” (S350, S360).

ECU11,12は、CANID割付要求メッセージを通信線17を介して受信すると、応答メッセージを通信線17を介して送信する(S540)。またECU11,12は、応答メッセージを送信した後に、CANID割付メッセージを受信すると、CANID割付メッセージで指示するCANIDを、自装置の送信用CANIDに設定する(S560)。   When the ECUs 11 and 12 receive the CANID assignment request message via the communication line 17, the ECUs 11 and 12 transmit a response message via the communication line 17 (S540). Further, when receiving the CANID assignment message after sending the response message, the ECUs 11 and 12 set the CANID instructed by the CANID assignment message to the CANID for transmission of the own device (S560).

このように構成された通信システム1では、まず、ECU11へ電源が供給される一方、ECU12へ電源が供給されない。このため、プログラム書換装置15とECU11との間で、CANID割付要求メッセージ、応答メッセージおよびCANID割付メッセージの送受信を行うことで、「0x001」をECU11の送信用CANIDとして設定することができる。   In the communication system 1 configured as described above, first, power is supplied to the ECU 11, but power is not supplied to the ECU 12. Therefore, “0x001” can be set as the transmission CANID of the ECU 11 by transmitting / receiving the CANID allocation request message, the response message, and the CANID allocation message between the program rewriting device 15 and the ECU 11.

その後、ECU12へ電源が供給される。このため、プログラム書換装置15とECU12との間で、CANID割付要求メッセージ、応答メッセージおよびCANID割付メッセージの送受信を行うことで、「0x002」をECU12の送信用CANIDとして設定することができる。   Thereafter, power is supplied to the ECU 12. For this reason, “0x002” can be set as the CANID for transmission of the ECU 12 by transmitting and receiving the CANID allocation request message, the response message, and the CANID allocation message between the program rewriting device 15 and the ECU 12.

その後に、ECU11,12では、通信回路33が、書込データを通信線17を介してプログラム書換装置15から受信する。そしてECU11,12は、通信回路33により受信した書込データをフラッシュROM32に書き込むことにより、フラッシュROM32に記憶された制御プログラムの内容を書き換える(S580)。   Thereafter, in the ECUs 11 and 12, the communication circuit 33 receives the write data from the program rewriting device 15 via the communication line 17. Then, the ECUs 11 and 12 rewrite the contents of the control program stored in the flash ROM 32 by writing the write data received by the communication circuit 33 into the flash ROM 32 (S580).

このように、通信システム1では、乱数を発生させることなく、ECU11,12がそれぞれ「0x001」および「0x002」の送信用CANIDを設定することができる。このため、通信システム1によれば、ハードウェア構成とソフトウェア構成が全く同じ複数のECUが接続された場合に、複数のECUで互いに異なる送信用CANIDを設定することができる。   Thus, in the communication system 1, the ECUs 11 and 12 can set the transmission CANIDs “0x001” and “0x002”, respectively, without generating random numbers. Therefore, according to the communication system 1, when a plurality of ECUs having exactly the same hardware configuration and software configuration are connected, different transmission CANIDs can be set by the plurality of ECUs.

またECU11,12は、CANID割付要求メッセージを受信する前に、書換要求メ
ッセージをプログラム書換装置15から通信線17を介して受信すると(S510:YES)、単体書換用データ書込処理を行う(S520)。これにより、ECU11,12は、通信線17にプログラム書換装置15と自装置のみが接続されている場合であっても、自装置に記憶された制御プログラムの書き換えを行うことができる。
If the ECUs 11 and 12 receive the rewrite request message from the program rewriting device 15 via the communication line 17 before receiving the CANID assignment request message (S510: YES), the ECUs 11 and 12 perform the data rewriting process for single rewriting (S520). ). Thereby, ECU11, 12 can rewrite the control program memorize | stored in the own apparatus, even when it is a case where only the program rewriting apparatus 15 and its own apparatus are connected to the communication line 17. FIG.

以上説明した実施形態において、通信システム1は本発明におけるプログラム書換システム、ECU11は本発明における第1電子制御装置、ECU12は本発明における第2電子制御装置、フラッシュROM32は本発明における不揮発性メモリ、電源回路16は本発明における電源供給部である。   In the embodiment described above, the communication system 1 is the program rewriting system according to the present invention, the ECU 11 is the first electronic control device according to the present invention, the ECU 12 is the second electronic control device according to the present invention, and the flash ROM 32 is the nonvolatile memory according to the present invention. The power supply circuit 16 is a power supply unit in the present invention.

また、S310,S320の処理は本発明における第1電源制御手段、S330の処理は本発明における第1要求送信手段、S350の処理は本発明における第1識別情報送信手段、S320,S360の処理は本発明における第2電源制御手段、S330の処理は本発明における第2要求送信手段、S350,S360の処理は本発明における第2識別情報送信手段である。   Further, the processes of S310 and S320 are the first power control means in the present invention, the process of S330 is the first request transmitting means in the present invention, the process of S350 is the first identification information transmitting means in the present invention, and the processes of S320 and S360 are The second power supply control means in the present invention, the process of S330 is the second request transmission means in the present invention, and the processes of S350 and S360 are the second identification information transmission means in the present invention.

また、S540の処理は本発明における第1応答送信手段および第2応答送信手段、S560の処理は本発明における第1設定手段および第2設定手段、通信回路33は本発明における受信手段、S580の処理は本発明における書換手段である。   Further, the process of S540 is the first response transmission means and the second response transmission means in the present invention, the process of S560 is the first setting means and the second setting means in the present invention, the communication circuit 33 is the reception means in the present invention, the process of S580 Processing is the rewriting means in the present invention.

以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の技術的範囲に属する限り種々の形態を採ることができる。
例えば上記実施形態では、4台のECUが通信線17に接続されている場合において制御プログラムの書き換えを行うものを示したが、これに限定されるものではなく、複数(すなわち2台以上)のECUが通信線17に接続されているようにしてもよい。
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, As long as it belongs to the technical scope of this invention, a various form can be taken.
For example, in the above embodiment, the control program is rewritten when four ECUs are connected to the communication line 17. However, the present invention is not limited to this, and a plurality (that is, two or more) of the control program is not limited thereto. The ECU may be connected to the communication line 17.

1…通信システム、11,12,13,14…ECU、15…プログラム書換装置、16…電源回路、17…通信線、31,41…マイコン、32…フラッシュROM、33,43…通信回路   DESCRIPTION OF SYMBOLS 1 ... Communication system 11, 12, 13, 14 ... ECU, 15 ... Program rewriting apparatus, 16 ... Power supply circuit, 17 ... Communication line, 31, 41 ... Microcomputer, 32 ... Flash ROM, 33, 43 ... Communication circuit

Claims (3)

所定の制御対象を制御するための制御プログラムを記憶して記憶内容の書き換えが可能な不揮発性メモリ(32)を備え、予め設定された書換条件が成立した場合に、前記不揮発性メモリに記憶された前記制御プログラムの内容を書き換えるように構成された第1電子制御装置(11)および第2電子制御装置(12)と、
前記第1電子制御装置および前記第2電子制御装置と通信線(17)を介してデータ通信可能に接続され、前記制御プログラムの内容を書き換えるための書換データを前記通信線を介して前記第1電子制御装置および前記第2電子制御装置へ送信するプログラム書換装置(15)と、
前記第1電子制御装置および前記第2電子制御装置に電源を供給する電源供給部(16)とを備え、
前記プログラム書換装置は、
前記第1電子制御装置および前記第2電子制御装置のうち、前記第1電子制御装置へ電源を供給する一方、前記第2電子制御装置への電源の供給を禁止するように前記電源供給部を制御する第1電源制御手段(S310,S320)と、
前記電源供給部により前記第1電子制御装置へ電源が供給されている場合に、応答要求メッセージを前記通信線を介して送信する第1要求送信手段(S330)と、
前記第1要求送信手段が前記応答要求メッセージを送信した後に、前記応答要求メッセージに対して応答する応答メッセージを前記通信線を介して受信すると、第1識別情報を送信する第1識別情報送信手段(S350)と、
前記第1識別情報送信手段が前記第1識別情報を送信した後に、前記第2電子制御装置への電源の供給の禁止を解除して、前記第2電子制御装置へ電源を供給するように前記電源供給部を制御する第2電源制御手段(S320,S360)と、
前記電源供給部により前記第2電子制御装置へ電源が供給されている場合に、前記応答要求メッセージを前記通信線を介して送信する第2要求送信手段(S330)と、
前記第2要求送信手段が前記応答要求メッセージを送信した後に、前記応答メッセージを前記通信線を介して受信すると、前記第1識別情報とは異なる第2識別情報を送信する第2識別情報送信手段(S350,S360)とを備え、
前記第1電子制御装置および前記第2電子制御装置は、
前記応答要求メッセージを前記通信線を介して受信すると、前記応答メッセージを前記通信線を介して送信する第1応答送信手段(S540)と、
前記第1応答送信手段が前記応答メッセージを送信した後に、前記第1識別情報または前記第2識別情報を受信すると、受信した前記第1識別情報または前記第2識別情報を、自装置の識別情報に設定する第1設定手段(S560)とを備える
ことを特徴とするプログラム書換システム(1)。
A non-volatile memory (32) capable of storing a control program for controlling a predetermined control object and rewriting the stored contents is stored in the non-volatile memory when a preset rewrite condition is satisfied. A first electronic control unit (11) and a second electronic control unit (12) configured to rewrite the contents of the control program;
The first electronic control unit and the second electronic control unit are connected to be able to communicate data via a communication line (17), and rewrite data for rewriting the contents of the control program is transmitted via the communication line to the first electronic control unit. A program rewriting device (15) for transmitting to the electronic control device and the second electronic control device;
A power supply unit (16) for supplying power to the first electronic control device and the second electronic control device;
The program rewriting device is:
Among the first electronic control device and the second electronic control device, the power supply unit is configured to supply power to the first electronic control device, while prohibiting supply of power to the second electronic control device. First power control means (S310, S320) for controlling;
A first request transmitting means (S330) for transmitting a response request message via the communication line when power is supplied to the first electronic control unit by the power supply unit;
After the first request transmission means transmits the response request message, a first identification information transmission means for transmitting first identification information when a response message responding to the response request message is received via the communication line. (S350),
After the first identification information transmitting means transmits the first identification information, the prohibition of power supply to the second electronic control device is canceled and the power is supplied to the second electronic control device. Second power control means (S320, S360) for controlling the power supply unit;
A second request transmitting means (S330) for transmitting the response request message via the communication line when power is supplied to the second electronic control unit by the power supply unit;
Second identification information transmission means for transmitting second identification information different from the first identification information when the response message is received via the communication line after the second request transmission means transmits the response request message. (S350, S360),
The first electronic control device and the second electronic control device are:
When the response request message is received via the communication line, first response transmission means (S540) for transmitting the response message via the communication line;
If the first identification information or the second identification information is received after the first response transmission means transmits the response message, the received first identification information or the second identification information is used as the identification information of its own device. A program rewriting system (1) comprising: first setting means (S560) for setting to
記憶内容の書き換えが可能であり、所定の制御対象を制御するための制御プログラムを記憶する不揮発性メモリ(32)と、
前記不揮発性メモリに記憶された前記制御プログラムの内容を書き換えるための書換データを通信線を介して送信するプログラム書換装置から応答要求メッセージを前記通信線を介して受信すると、応答メッセージを前記通信線を介して送信する第2応答送信手段(S540)と、
前記第2応答送信手段が前記応答メッセージを送信した後に、前記プログラム書換装置から他の電子制御装置とは異なる識別情報を受信すると、受信した前記識別情報を、自装置の識別情報に設定する第2設定手段(S560)と、
前記書換データを前記通信線を介して前記プログラム書換装置から受信する受信手段(33)と、
前記受信手段により受信した前記書換データを前記不揮発性メモリに書き込むことにより、前記不揮発性メモリに記憶された前記制御プログラムの内容を書き換える書換手段(S580)とを備える
ことを特徴とする電子制御装置(11,12,13,14)。
A non-volatile memory (32) capable of rewriting stored contents and storing a control program for controlling a predetermined control target;
When a response request message is received via the communication line from the program rewriting device that transmits the rewrite data for rewriting the contents of the control program stored in the nonvolatile memory via the communication line, the response message is transmitted to the communication line. Second response transmission means (S540) for transmitting via
After the second response transmitting means transmits the response message and receives identification information different from the other electronic control device from the program rewriting device, the received identification information is set to the identification information of the own device. 2 setting means (S560);
Receiving means (33) for receiving the rewrite data from the program rewriting device via the communication line;
An electronic control device comprising: rewriting means (S580) for rewriting the contents of the control program stored in the nonvolatile memory by writing the rewritten data received by the receiving means into the nonvolatile memory. (11, 12, 13, 14).
前記応答要求メッセージを受信する前に、前記制御プログラムの書き換えを要求する書換要求メッセージを前記プログラム書換装置から前記通信線を介して受信すると、前記書換手段による書き換えを開始する
ことを特徴とする請求項2に記載の電子制御装置。
The rewriting by the rewriting means is started when a rewrite request message for requesting rewriting of the control program is received from the program rewriting device via the communication line before receiving the response request message. Item 3. The electronic control device according to Item 2.
JP2014056172A 2014-03-19 2014-03-19 Program rewriting system and electronic control unit Active JP6221866B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2014056172A JP6221866B2 (en) 2014-03-19 2014-03-19 Program rewriting system and electronic control unit
DE102015204424.6A DE102015204424A1 (en) 2014-03-19 2015-03-12 Program rewriting system and electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014056172A JP6221866B2 (en) 2014-03-19 2014-03-19 Program rewriting system and electronic control unit

Publications (2)

Publication Number Publication Date
JP2015179375A JP2015179375A (en) 2015-10-08
JP6221866B2 true JP6221866B2 (en) 2017-11-01

Family

ID=54053842

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014056172A Active JP6221866B2 (en) 2014-03-19 2014-03-19 Program rewriting system and electronic control unit

Country Status (2)

Country Link
JP (1) JP6221866B2 (en)
DE (1) DE102015204424A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4303721A1 (en) * 2022-07-08 2024-01-10 Yamaha Hatsudoki Kabushiki Kaisha Method of rewriting programs of plurality of electronic devices in watercraft system and watercraft system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102456630B1 (en) * 2018-05-15 2022-10-18 현대자동차주식회사 In-vehicle controller and method of controlling data transmission for the same
JP7363510B2 (en) 2020-01-21 2023-10-18 株式会社オートネットワーク技術研究所 Management device, identification information assignment method for in-vehicle devices, in-vehicle system, and data structure
CN114615105B (en) * 2022-04-02 2024-04-02 深圳市元征科技股份有限公司 Data transmission method, device, electronic equipment, system and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009027235A (en) 2007-07-17 2009-02-05 Hoya Corp Fixing structure and method of image sensor supporting substrate and substrate supporting member
JP4440951B2 (en) 2007-07-18 2010-03-24 三菱電機株式会社 Network system
WO2015063864A1 (en) * 2013-10-29 2015-05-07 株式会社安川電機 Motor control program transfer system, host controller, motor control device, and motor control program transfer method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4303721A1 (en) * 2022-07-08 2024-01-10 Yamaha Hatsudoki Kabushiki Kaisha Method of rewriting programs of plurality of electronic devices in watercraft system and watercraft system

Also Published As

Publication number Publication date
DE102015204424A1 (en) 2015-09-24
JP2015179375A (en) 2015-10-08

Similar Documents

Publication Publication Date Title
JP6221866B2 (en) Program rewriting system and electronic control unit
JP5607784B2 (en) CAN open network configuration method, slave device operation method, PLC device control method, and PLC device control system
JP2006270193A (en) Image forming system and method, and image forming apparatus
JP6627571B2 (en) Programmable controller, programmable controller control method, and programmable controller control program
JP6390113B2 (en) Control system, development support apparatus, control apparatus, and control method
JP6115482B2 (en) Electronic control unit
JP2008099482A (en) Battery pack block, battery pack system, and address setting method for battery pack system
JP4666589B2 (en) USB device, USB system and USB control program
JP3516905B2 (en) Host computer, recording medium on which the program is recorded, and control system using the same
CN117118951A (en) Method for dynamically distributing addresses of universal slaves of one master and multiple slaves bus
CN109753012A (en) A kind of processing machine long-range control method, apparatus and system based on cloud platform
JP2010109474A (en) Image forming apparatus and printing system
JP2018120438A (en) Electronic control device and program rewriting system
JPH10229533A (en) Image forming device, image forming system and image forming method
CN103303007B (en) Image processing system, image formation system and image forming method
CN113347283B (en) Method and system for distributing node addresses
CN107968718B (en) Method, device and equipment for confirming main standby state
JP2002189697A (en) Data transfer system and data transfer method
JP2009104283A (en) System for transmitting/receiving data by modbus and control equipment such as programmable controller
JP5752087B2 (en) Control device, data output control unit, data input control unit, and control unit
CN109660976A (en) Method, apparatus, system and the storage medium of equipment search
JP2021060870A (en) Electronic control device
JP6572779B2 (en) Communications system
JP6430710B2 (en) Data transfer control device and data transfer control method
KR102423467B1 (en) Control method and system of boilers arranging in a row

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170627

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170731

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170918

R151 Written notification of patent or utility model registration

Ref document number: 6221866

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