JP2009042850A - Control device for vehicle, and device for updating vehicle control program - Google Patents

Control device for vehicle, and device for updating vehicle control program Download PDF

Info

Publication number
JP2009042850A
JP2009042850A JP2007204783A JP2007204783A JP2009042850A JP 2009042850 A JP2009042850 A JP 2009042850A JP 2007204783 A JP2007204783 A JP 2007204783A JP 2007204783 A JP2007204783 A JP 2007204783A JP 2009042850 A JP2009042850 A JP 2009042850A
Authority
JP
Japan
Prior art keywords
control program
program
vehicle
update
vehicle control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007204783A
Other languages
Japanese (ja)
Inventor
Takatoshi Ota
孝俊 太田
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor Co Ltd
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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP2007204783A priority Critical patent/JP2009042850A/en
Publication of JP2009042850A publication Critical patent/JP2009042850A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a control device for vehicle which appropriately controls a vehicle without increasing the capacity of a program to be stored so much even when a vehicle control program is not normally updated, and to provide a device for updating a vehicle control program. <P>SOLUTION: The control device for vehicle is provided with: a vehicle control program PRN stored in a rewritable area ARP; a boot program PRN stored in an non-rewritable area ARIP; a fail/safe control program PRF whose capacity is smaller than the vehicle control program; a vehicle control program updating means 15 for updating the vehicle control program; and a control means 15 for executing the boot program PRB when a control device 2 is started, and for executing the vehicle control program when it is decided that the update of the vehicle control program has been normally completed, and for executing the fail/safe control program PRF when it is decided that the update has not been normally completed. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、車両を制御する車両の制御装置、および当該制御装置に用いられる車両制御用プログラムの更新装置に関する。   The present invention relates to a vehicle control device that controls a vehicle, and a vehicle control program update device used in the control device.

従来の車両の制御装置として、例えば特許文献1に開示されたものが知られている。この制御装置は、初期状態において通信用プログラムが記憶された不揮発性のフラッシュメモリと、揮発性のRAMを有するマイコンと、マイコンに電力を供給する電源を備えており、通信端末に接続されている。通信端末には、車両を制御するためのアプリケーションプログラムが記憶されており、このアプリケーションプログラムは、マイコンに転送される。マイコンは、このアプリケーションプログラムをフラッシュメモリに書き込み、記憶させるとともに、実行することによって、車両を制御する。このフラッシュメモリへのアプリケーションプログラムの書き込みは、以下のようにして行われる。   As a conventional vehicle control device, for example, one disclosed in Patent Document 1 is known. This control device includes a nonvolatile flash memory in which a communication program is stored in an initial state, a microcomputer having a volatile RAM, and a power source for supplying power to the microcomputer, and is connected to a communication terminal. . The communication terminal stores an application program for controlling the vehicle, and this application program is transferred to the microcomputer. The microcomputer controls the vehicle by writing and storing the application program in the flash memory and executing it. The application program is written to the flash memory as follows.

まず、フラッシュメモリに記憶された通信用プログラムに基づいて、通信端末とのシリアル通信を可能な状態にした後、通信端末から通信用プログラム、書換ソフト、通信異常判定ソフトおよび退避ソフトを受信し、RAMに記憶させる。次に、書換ソフトに基づいて、フラッシュメモリに記憶された通信用プログラムを含むすべてのプログラムを消去した後、通信端末からアプリケーションプログラムを順次受信し、フラッシュメモリに書き込む。このとき、通信異常判定ソフトに基づいて、通信端末との通信異常が発生しているか否かを判定し、通信異常の場合には、退避ソフトに基づいて、通信用プログラムをフラッシュメモリに送信し、記憶させる。以上により、アプリケーションプログラムの受信中に、通信異常が発生した場合、マイコンへの電力を遮断しても、フラッシュメモリに通信用プログラムが記憶されるので、その後、電力を供給したときに、通信用プログラムに基づいて通信端末との通信が可能になり、アプリケーションプログラムの転送および書き込みが再度、行われる。   First, based on the communication program stored in the flash memory, after enabling serial communication with the communication terminal, the communication program, rewrite software, communication abnormality determination software and save software are received from the communication terminal, Store in RAM. Next, after erasing all the programs including the communication program stored in the flash memory based on the rewriting software, the application program is sequentially received from the communication terminal and written into the flash memory. At this time, it is determined whether there is a communication error with the communication terminal based on the communication error determination software. If there is a communication error, the communication program is sent to the flash memory based on the save software. , Remember. As described above, if a communication error occurs during reception of the application program, the communication program is stored in the flash memory even if the power to the microcomputer is cut off. Communication with the communication terminal becomes possible based on the program, and transfer and writing of the application program are performed again.

しかし、上述した従来の制御装置では、通信端末とマイコンの間で通信異常の発生時には、アプリケーションプログラムをフラッシュメモリに送信し、記憶させることができないので、アプリケーションプログラムを実行することも、それに基づいて車両を制御することもできない。その結果、例えば運転者などが車両を移動させたくても、移動させることができない。また、この制御装置では、通信異常の発生後、正常な状態に復帰したとしても、アプリケーションプログラムの書き込みが完了するまでの間、車両をやはり制御することはできない。特に、アプリケーションプログラムの容量が大きいときには、プログラムの書き込みに長い時間が必要になるため、その間、車両を制御できなくなる。   However, in the above-described conventional control device, when a communication abnormality occurs between the communication terminal and the microcomputer, the application program cannot be transmitted to the flash memory and stored. Therefore, the application program can be executed based on that The vehicle cannot be controlled. As a result, even if the driver or the like wants to move the vehicle, it cannot be moved. Further, in this control device, even if the communication abnormality occurs and returns to a normal state, the vehicle cannot be controlled until the writing of the application program is completed. In particular, when the capacity of the application program is large, it takes a long time to write the program, and the vehicle cannot be controlled during that time.

また、基地局を制御する制御装置として、例えば特許文献2に開示されたものが知られている。この制御装置は、メモリカードおよびダウンロード格納エリアなどを備えており、上位局に接続されている。メモリカードは、第1メモリ部と第2メモリ部で構成されており、これらのメモリ部には基地局を制御するための制御プログラムが記憶されている。第1メモリ部に記憶された制御プログラムは、第2メモリ部よりも1世代前の制御プログラムである。また、第1および第2メモリ部にはそれぞれ、制御プログラムの更新が正常に行われたか否かを示す判定ビット領域が設けられている。   Further, as a control device for controlling a base station, for example, one disclosed in Patent Document 2 is known. This control device includes a memory card and a download storage area, and is connected to a higher station. The memory card is composed of a first memory unit and a second memory unit, and a control program for controlling the base station is stored in these memory units. The control program stored in the first memory unit is a control program one generation before the second memory unit. Each of the first and second memory units is provided with a determination bit area indicating whether or not the control program has been updated normally.

この制御装置では、上位局から更新用の制御プログラム(以下、「更新プログラム」という)が転送されたときに、メモリカードの第2メモリ部の制御プログラムを、更新プログラムに書き換え、更新する。具体的には、上位局からの更新プログラムをダウンロード格納エリアに記憶させる。次に、メモリカードの第2メモリ部の判定ビット領域の情報を無効に書き換えた後、ダウンロード格納エリアから更新プログラムを第2メモリ部に転送し、記憶させる。これにより、第2メモリ部の制御プログラムが更新される。また、制御プログラムの更新が正常に行われたときには、第2メモリ部の判定ビット領域の情報を有効に書き換える一方、更新が正常に行われないときには、判定ビット領域の情報は書き換えられることなく、無効のまま保持される。   In this control apparatus, when a control program for update (hereinafter referred to as “update program”) is transferred from the upper station, the control program in the second memory unit of the memory card is rewritten and updated with the update program. Specifically, the update program from the upper station is stored in the download storage area. Next, after the information in the determination bit area of the second memory unit of the memory card is rewritten to be invalid, the update program is transferred from the download storage area to the second memory unit and stored therein. Thereby, the control program of the second memory unit is updated. Further, when the control program is updated normally, the information in the determination bit area of the second memory unit is effectively rewritten. On the other hand, when the update is not performed normally, the information in the determination bit area is not rewritten. Retained invalid.

また、この制御装置では、第2メモリ部の判定ビット領域が有効の場合には、第2メモリ部の制御プログラムに基づいて基地局を制御する。一方、第2メモリ部の判定ビット領域が無効の場合には、第1メモリ部の判定ビット領域を判定し、それが有効のときに、第1メモリ部の制御プログラムに基づいて基地局を制御する。以上のように、第2メモリ部の制御プログラムの更新が正常に行われない場合には、第1メモリ部の制御プログラムに基づいて基地局が制御される。   Further, in this control apparatus, when the determination bit area of the second memory unit is valid, the base station is controlled based on the control program of the second memory unit. On the other hand, when the determination bit area of the second memory unit is invalid, the determination bit area of the first memory unit is determined. When the determination bit area is valid, the base station is controlled based on the control program of the first memory unit. To do. As described above, when the control program in the second memory unit is not normally updated, the base station is controlled based on the control program in the first memory unit.

しかし、この従来の制御装置では、更新前後の制御プログラムが第1メモリ部および第2メモリ部にそれぞれ記憶されるので、記憶すべき容量が個々の制御プログラムのほぼ2倍になり、非常に大きな容量のメモリカードが必要になる。また、第2メモリ部の制御プログラムの更新に伴って、第1メモリ部の制御プログラムを更新する場合、例えば、第1メモリ部と第2メモリ部にそれぞれ割り当てられたアドレスを、それぞれのアドレス空間に対応させて互いに入れ換えることが必要になり、その処理が非常に複雑化する。   However, in this conventional control device, the control programs before and after the update are stored in the first memory unit and the second memory unit, respectively, so the capacity to be stored is almost twice that of the individual control programs, which is very large. A memory card with a capacity is required. Further, when the control program of the first memory unit is updated along with the update of the control program of the second memory unit, for example, the addresses assigned to the first memory unit and the second memory unit are assigned to the respective address spaces. It is necessary to replace each other in accordance with the above, and the processing becomes very complicated.

本発明は、このような課題を解決するためになされたものであり、記憶するプログラムの容量をあまり増大させることなく、車両制御用のプログラムが正常に更新されなかった場合においても、車両を適切に制御することができる車両の制御装置および車両制御用プログラムの更新装置を提供することを目的とする。   The present invention has been made to solve such a problem. Even when the vehicle control program is not updated normally without increasing the capacity of the stored program, the vehicle is appropriately It is an object of the present invention to provide a vehicle control device and a vehicle control program update device that can be controlled automatically.

特開平11−7381号公報JP-A-11-7381 特許第2984649号公報Japanese Patent No. 2998449

上記の目的を達成するため、請求項1の発明に係る車両の制御装置は、書換可能エリアARPおよび書換不能エリアARIPを有する不揮発性メモリ(実施形態における(以下、本項において同じ)フラッシュROM14)と、書換可能エリアARPに記憶され、車両Vを通常制御するための車両制御用プログラム(通常制御用プログラムPRN)と、書換不能エリアARIPに記憶され、車両制御用プログラムの更新が正常に行われたか否かを判定するためのブートプログラムPRBと、書換不能エリアARIPに記憶されるとともに、車両制御用プログラムよりも容量が小さく、車両Vをフェールセーフ制御するためのフェールセーフ制御用プログラムPRFと、車両制御用プログラムを更新する車両制御用プログラム更新手段(CPU15、図3のステップ2、図4のステップ14,15)と、制御装置(ECU2)が起動されたときにブートプログラムPRBを実行するとともに、その実行による判定結果に応じ、車両制御用プログラムの更新が正常に行われたと判定されたときに、車両制御用プログラムを実行し、車両制御用プログラムの更新が正常に行われていないと判定されたときに、フェールセーフ制御用プログラムPRFを実行する制御手段(CPU15、図3のステップ3〜5)と、を備えることを特徴とする。   In order to achieve the above object, a vehicle control apparatus according to a first aspect of the present invention is a non-volatile memory having a rewritable area ARP and a non-rewritable area ARIP (flash ROM 14 in the embodiment (hereinafter the same in this section)). Are stored in the rewritable area ARP and stored in the rewritable area ARIP, and the vehicle control program is normally updated. A boot program PRB for determining whether the vehicle V has been stored, a fail-safe control program PRF for fail-safe control of the vehicle V, which is stored in the non-rewritable area ARIP, has a smaller capacity than the vehicle control program, Vehicle control program updating means (CPU for updating vehicle control program) 5, step 2 in FIG. 3, steps 14 and 15 in FIG. 4, and the boot program PRB is executed when the control device (ECU 2) is activated, and according to the determination result of the execution, When it is determined that the update has been normally performed, the vehicle control program is executed, and when it is determined that the update of the vehicle control program has not been normally performed, the fail safe control program PRF is executed. And a control means (CPU 15, steps 3 to 5 in FIG. 3).

この車両の制御装置は、不揮発性メモリを備えており、この不揮発性メモリの書換可能エリアには、車両制御用プログラムが記憶され、書換不能エリアには、ブートプログラムと、車両制御用プログラムよりも容量が小さいフェールセーフ制御用プログラムが記憶されている。これらのプログラムは、制御手段による制御によって実行される。車両制御用プログラムは、制御装置の作動時に、車両制御用プログラム更新手段によって更新される。   The vehicle control device includes a nonvolatile memory, and a rewritable area of the nonvolatile memory stores a vehicle control program, and the non-rewritable area includes a boot program and a vehicle control program. A fail-safe control program having a small capacity is stored. These programs are executed under the control of the control means. The vehicle control program is updated by the vehicle control program update means when the control device is operated.

また、制御装置が起動されたときには、まずブートプログラムが実行され、それにより、車両制御用プログラムの更新が正常に行われたか否かが判定される。この判定結果に応じ、車両制御用プログラムの更新が正常に行われたと判定されたときには、車両制御用プログラムを実行することによって、車両が通常制御される。一方、車両制御用プログラムの更新が正常に行われていないと判定されたときには、フェールセーフ制御用プログラムを実行することによって、車両がフェールセーフ制御される。   When the control device is activated, a boot program is first executed, thereby determining whether or not the vehicle control program has been updated normally. When it is determined that the update of the vehicle control program is normally performed according to the determination result, the vehicle is normally controlled by executing the vehicle control program. On the other hand, when it is determined that the vehicle control program is not normally updated, the vehicle is subjected to failsafe control by executing the failsafe control program.

フェールセーフ制御用プログラムは、書換不能エリアに記憶されていて、書き換えられたり消去されたりすることがないので、車両制御用プログラムの更新が正常に行われなかったために、車両制御用プログラムに基づいて車両を制御できない場合であっても、フェールセーフ制御用プログラムを実行することによって、車両を適切に制御することができ、例えば運転者が車両を安全な状態で移動させることができる。また、制御装置の起動時に、ブートプログラムが優先して実行され、車両制御用プログラムの更新の正否が判定されるので、その更新を正常に行えなかった場合に、車両のフェールセーフ制御を即座にかつ確実に実行することができる。   Since the fail-safe control program is stored in the non-rewritable area and is not rewritten or deleted, the vehicle control program has not been updated normally. Even when the vehicle cannot be controlled, the vehicle can be appropriately controlled by executing the fail-safe control program. For example, the driver can move the vehicle in a safe state. In addition, when the control device is started, the boot program is preferentially executed and it is determined whether the update of the vehicle control program is correct or not. Therefore, if the update cannot be performed normally, the failsafe control of the vehicle is immediately performed. And it can be executed reliably.

また、フェールセーフ制御用プログラムは、車両制御用プログラムよりも容量が小さいので、記憶されるプログラムの容量を削減することができる。さらに、フェールセーフ制御用プログラムは、車両のフェールセーフを目的とするので、車両の移動や安全を確保するのに必要な最小限のプログラム内容で足りるため、そのようなプログラム内容とすることにより、小容量化しても、それに基づくフェールセーフ制御を支障なく行うことができる。   Further, since the capacity of the fail safe control program is smaller than that of the vehicle control program, the capacity of the stored program can be reduced. Furthermore, since the program for fail-safe control aims at fail-safe of the vehicle, the minimum program content necessary for ensuring the movement and safety of the vehicle is sufficient. Even if the capacity is reduced, fail-safe control based on the capacity can be performed without any trouble.

請求項2の発明に係る車両制御用プログラムの更新装置は、車両Vを制御する車両Vの制御装置(ECU2)と、車両Vに搭載され、更新用プログラムPRUを取得するとともに、制御装置と通信可能に構成された書換装置9と、を備え、制御装置は、書換可能エリアARPおよび書換不能エリアARIPを有する不揮発性メモリ(フラッシュROM14)と、書換可能エリアARPに記憶され、車両Vを通常制御するための車両制御用プログラム(通常制御用プログラムPRN)と、書換不能エリアARIPに記憶され、車両制御用プログラムの更新が正常に行われたか否かを判定するためのブートプログラムPRBと、書換不能エリアARIPに記憶されるとともに、車両制御用プログラムよりも容量が小さく、車両Vをフェールセーフ制御するためのフェールセーフ制御用プログラムPRFと、車両制御用プログラムを、書換装置9から送信された更新用プログラムPRUに書き換えることにより、車両制御用プログラムを更新する車両制御用プログラム更新手段(CPU15、図3のステップ2、図4のステップ14,15)と、制御装置が起動されたときにブートプログラムPRBを実行するとともに、その実行による判定結果に応じ、車両制御用プログラムの更新が正常に行われたと判定されたときに、車両制御用プログラムを実行し、車両制御用プログラムの更新が正常に行われていないと判定されたときに、フェールセーフ制御用プログラムPRFを実行する制御手段(CPU15、図3のステップ3〜5)と、を有することを特徴とする。   A vehicle control program update device according to a second aspect of the present invention is mounted on the vehicle V and controls the vehicle V, and acquires the update program PRU and communicates with the control device. A rewritable device 9 configured so as to be capable of being controlled, and the control device is stored in the rewritable area ARP and the non-rewritable area ARIP, the nonvolatile memory (flash ROM 14), and the rewritable area ARP, and normally controls the vehicle V Vehicle control program (normal control program PRN) for storing the boot program PRB stored in the non-rewritable area ARIP and determining whether the vehicle control program has been normally updated or not rewritten It is stored in area ARIP and has a smaller capacity than the vehicle control program. The vehicle control program update means (CPU 15, CPU 15, and) updates the vehicle control program by rewriting the fail-safe control program PRF and the vehicle control program for control with the update program PRU transmitted from the rewriting device 9. 3 and steps 14 and 15 in FIG. 4 and the boot program PRB is executed when the control device is activated, and the vehicle control program is normally updated according to the determination result of the execution. When the vehicle control program is determined to be broken, the vehicle control program is executed. When it is determined that the vehicle control program is not normally updated, the control means (CPU 15, 3 to 5) of FIG.

この車両制御用プログラムの更新装置では、制御装置が不揮発性メモリを備えており、不揮発性メモリの書換可能エリアには、車両制御用プログラムが記憶されている。車両に搭載された書換装置は、車両制御用プログラムを更新するための更新用プログラムを取得する。車両制御用プログラムは、制御装置の作動時に、車両制御用プログラム更新手段によって、書換装置から送信された更新用プログラムに書き換えることにより、更新される。   In this vehicle control program update device, the control device includes a nonvolatile memory, and the vehicle control program is stored in the rewritable area of the nonvolatile memory. The rewriting device mounted on the vehicle acquires an update program for updating the vehicle control program. The vehicle control program is updated by rewriting the update program transmitted from the rewriting device by the vehicle control program updating means when the control device is operated.

また、請求項1の制御装置と同様、制御装置の起動時に、書換不能エリアに記憶されたブートプログラムが優先的に実行され、それにより、車両制御用プログラムの更新の正否が判定される。その更新が正常に行われたときには、車両制御用プログラムを実行することにより、車両が通常制御される一方、車両制御用プログラムが正常に更新されなかったときには、書換不能エリアに記憶されたフェールセーフ制御用プログラムを実行することによって、車両がフェールセーフ制御される。したがって、請求項1と同様、車両制御用プログラムが正常に更新されなかった場合に、フェールセーフ制御用プログラムの実行によって、車両のフェールセーフ制御を即座にかつ確実に行うことができる。例えば、修理工場から遠い場合でも、修理工場まで車両を安全に移動させることができる。   Similarly to the control device of claim 1, when the control device is started, the boot program stored in the non-rewritable area is preferentially executed, thereby determining whether the update of the vehicle control program is correct or not. When the update is normally performed, the vehicle is normally controlled by executing the vehicle control program. On the other hand, when the vehicle control program is not normally updated, the fail-safe stored in the non-rewritable area is stored. The vehicle is fail-safe controlled by executing the control program. Therefore, as in the first aspect, when the vehicle control program is not normally updated, the failsafe control of the vehicle can be performed immediately and reliably by executing the failsafe control program. For example, even when the vehicle is far from the repair shop, the vehicle can be safely moved to the repair shop.

また、請求項1の場合と同様、フェールセーフ制御用プログラムの小容量化によって、記憶されるプログラムの容量を削減できるとともに、フェールセーフ制御を支障なく行える。   Further, as in the case of the first aspect, the capacity of the stored program can be reduced and the fail safe control can be performed without any trouble by reducing the capacity of the fail safe control program.

以下、図面を参照しながら、本発明の好ましい実施形態を詳細に説明する。図1は、本発明の実施形態による更新装置1を、これを適用した内燃機関(以下「エンジン」という)3を搭載した車両Vとともに、概略的に示している。エンジン3は、例えば4つの気筒3a(1つのみ図示)を有する直列4気筒のガソリンエンジンである。各気筒3aのピストン3bとシリンダヘッド3cとの間には、燃焼室3dが形成されている。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 schematically shows an updating apparatus 1 according to an embodiment of the present invention, together with a vehicle V equipped with an internal combustion engine (hereinafter referred to as “engine”) 3 to which the updating apparatus 1 is applied. The engine 3 is, for example, an inline 4-cylinder gasoline engine having four cylinders 3a (only one is shown). A combustion chamber 3d is formed between the piston 3b and the cylinder head 3c of each cylinder 3a.

シリンダヘッド3cには、燃料噴射弁(以下「インジェクタ」という)5および点火プラグ6が、燃焼室3dに臨むように取り付けられている。エンジン3の燃料噴射量および燃料噴射時期は、後述するECU2(制御装置)からの駆動信号でインジェクタ5の開弁時間および開弁タイミングを、制御することによって制御される。また、点火時期、すなわち点火プラグ6の放電タイミングと、点火プラグ6への通電時間は、ECU2からの駆動信号で点火プラグ6の放電タイミングを制御することによって制御される。   A fuel injection valve (hereinafter referred to as “injector”) 5 and a spark plug 6 are attached to the cylinder head 3c so as to face the combustion chamber 3d. The fuel injection amount and fuel injection timing of the engine 3 are controlled by controlling the valve opening time and valve opening timing of the injector 5 with a drive signal from an ECU 2 (control device) described later. Further, the ignition timing, that is, the discharge timing of the spark plug 6 and the energization time to the spark plug 6 are controlled by controlling the discharge timing of the spark plug 6 with a drive signal from the ECU 2.

エンジン3の吸気管4には、エアフローメータ21が設けられている。エアフローメータ21は、吸気量QAを検出し、その検出信号をECU2に出力する。   An air flow meter 21 is provided in the intake pipe 4 of the engine 3. The air flow meter 21 detects the intake air amount QA and outputs a detection signal to the ECU 2.

エンジン3本体には、水温センサ22が設けられている。水温センサ22は、エンジン3のシリンダブロック(図示せず)内を循環する冷却水の温度(以下「エンジン水温」という)TWを検出し、その検出信号をECU2に出力する。   A water temperature sensor 22 is provided in the engine 3 main body. The water temperature sensor 22 detects the temperature (hereinafter referred to as “engine water temperature”) TW of cooling water circulating in a cylinder block (not shown) of the engine 3 and outputs a detection signal to the ECU 2.

ECU2には、エンジン回転数センサ23からエンジン回転数NEを表す検出信号が、車速センサ24から車速VPを表す検出信号が、アクセル開度センサ25からアクセルペダル(図示せず)の操作量(以下「アクセル開度」という)APを表す検出信号が、ポジションセンサ26から変速機(図示せず)のギヤ段を表す検出信号が、吸気温センサ27から吸気温TAを表す検出信号が、それぞれ出力される。   The ECU 2 has a detection signal indicating the engine speed NE from the engine speed sensor 23, a detection signal indicating the vehicle speed VP from the vehicle speed sensor 24, and an operation amount of an accelerator pedal (not shown) from the accelerator opening sensor 25 (hereinafter referred to as an operation amount). A detection signal indicating AP (referred to as “accelerator opening”), a detection signal indicating a gear of a transmission (not shown) from the position sensor 26, and a detection signal indicating the intake air temperature TA are output from the intake air temperature sensor 27, respectively. Is done.

更新装置1は、エンジン3を介して車両Vを通常制御する通常制御用プログラムPRN(車両制御用プログラム)を更新するためのものであり、車両Vに搭載されたECU2および書換装置9を備えている。これらのECU2および書換装置9は、イグニッションスイッチ7を介してバッテリ8に接続されており、イグニッションスイッチ7がONされたときに、バッテリ8から電力が供給されることによって、起動する。なお、書換装置9は、車両Vと別個に構成してもよい。   The update device 1 is for updating a normal control program PRN (vehicle control program) for normally controlling the vehicle V via the engine 3 and includes an ECU 2 and a rewriting device 9 mounted on the vehicle V. Yes. The ECU 2 and the rewriting device 9 are connected to the battery 8 via the ignition switch 7 and are activated when power is supplied from the battery 8 when the ignition switch 7 is turned on. Note that the rewriting device 9 may be configured separately from the vehicle V.

書換装置9は、ECU2と通信可能に構成されており、通常制御用プログラムPRNを更新する更新用プログラムPRUを取得し、ECU2に送信するためのものである。書換装置9には、更新用プログラムPRUなどを記録した記録媒体(図示せず)が装着されるようになっている。書換装置9は、この記録媒体から更新用プログラムPRUをブロック単位で読み出すことによって、更新用プログラムPRUを取得するとともに、取得した更新用プログラムPRUをブロック単位でECU2に送信する。なお、この記録媒体には、更新用プログラムPRUの他、ECU2のID番号を表す情報、更新用プログラムPRUのバージョンを表す情報、および更新用プログラムPRUのブロック数を表す情報が、ID情報として記録されている。   The rewriting device 9 is configured to be communicable with the ECU 2, and acquires the update program PRU for updating the normal control program PRN and transmits it to the ECU 2. The rewriting device 9 is loaded with a recording medium (not shown) in which the update program PRU and the like are recorded. The rewriting device 9 reads the update program PRU from the recording medium in units of blocks, thereby acquiring the update program PRU and transmits the acquired update program PRU to the ECU 2 in units of blocks. In addition to the update program PRU, information indicating the ID number of the ECU 2, information indicating the version of the update program PRU, and information indicating the number of blocks of the update program PRU are recorded as ID information on this recording medium. Has been.

この書換装置9では、更新用プログラムPRUの送信に先立ち、書換信号SRWおよびID情報をECU2に送信する。具体的には、記録媒体を装着した状態でイグニッションスイッチ7がONされたときに、書換信号SRWと、記録媒体から読み出したID情報を、ECU2に順次、送信する。   The rewriting device 9 transmits a rewrite signal SRW and ID information to the ECU 2 prior to transmission of the update program PRU. Specifically, when the ignition switch 7 is turned on with the recording medium mounted, the rewrite signal SRW and the ID information read from the recording medium are sequentially transmitted to the ECU 2.

ECU2は、I/Oインターフェース、RAM(いずれも図示せず)、通信用インターフェース(「通信用I/F」と図示)11、EEPROM12およびマイコン13で構成されており、前述した各種のセンサ21〜27からの検出信号は、I/OインターフェースでA/D変換や整形がなされた後、マイコン13の後述するCPU15に入力される。RAMは、CPU15による後述する更新処理時の作業領域として使用される。   The ECU 2 includes an I / O interface, a RAM (not shown), a communication interface (shown as “communication I / F”) 11, an EEPROM 12, and a microcomputer 13. The detection signal from 27 is A / D converted and shaped by the I / O interface, and then input to a CPU 15 (to be described later) of the microcomputer 13. The RAM is used as a work area when the CPU 15 performs update processing to be described later.

通信用インターフェース11は、書換装置9とマイコン13の間でCAN通信を行うためのものであり、書換信号SRW、ID情報および更新用プログラムPRUを受信し、マイコン13に送信する。   The communication interface 11 is for performing CAN communication between the rewrite device 9 and the microcomputer 13, receives the rewrite signal SRW, the ID information, and the update program PRU and transmits them to the microcomputer 13.

マイコン13は、上述したCPU15とフラッシュROM14(不揮発性メモリ)などで構成されている。   The microcomputer 13 includes the CPU 15 and the flash ROM 14 (nonvolatile memory) described above.

フラッシュROM14は、シングルポートタイプのものであり、図2に示すように、書換可能に構成された書換可能エリアARPと、書換不能に構成された書換不能エリアARIPを備えている。   The flash ROM 14 is of a single port type and includes a rewritable area ARP configured to be rewritable and a non-rewritable area ARIP configured to be rewritable as shown in FIG.

書換可能エリアARPには、前述した通常制御用プログラムPRNが記憶されている。通常制御用プログラムPRNは、燃料噴射量制御プログラムPRQINJ、燃料噴射時期制御プログラムPRTINJ、および点火時期制御プログラムPRTIGなどで構成されている。燃料噴射量制御プログラムPRQINJおよび燃料噴射時期制御プログラムPRTINJは、燃料噴射量および燃料噴射時期をそれぞれ設定するものであり、それらの設定を行うための吸気量QAやエンジン水温TW、吸気温TAなどをパラメータとする所定のマップをそれぞれ有している。また、点火時期制御プログラムPRTIGは、点火時期および通電時間を設定するものであり、それらの設定を行うためのエンジン回転数NEなどをパラメータとする所定のマップを有している。   In the rewritable area ARP, the aforementioned normal control program PRN is stored. The normal control program PRN includes a fuel injection amount control program PRQINJ, a fuel injection timing control program PRTINJ, an ignition timing control program PRTIG, and the like. The fuel injection amount control program PRQINJ and the fuel injection timing control program PRTINJ set the fuel injection amount and the fuel injection timing, respectively. The intake air amount QA, the engine water temperature TW, the intake air temperature TA, etc. for making these settings are set. Each has a predetermined map as a parameter. The ignition timing control program PRTIG sets ignition timing and energization time, and has a predetermined map using the engine speed NE and the like for setting these parameters as parameters.

これらの燃料噴射量制御プログラムPRQINJ、燃料噴射時期制御プログラムPRTINJおよび点火時期制御プログラムPRTIGは、書換可能エリアARPに割り当てられたアドレスによって指定されるアドレス空間にブロック単位でそれぞれ記憶されており、各アドレスはEEPROM12に記憶されている。   The fuel injection amount control program PRQINJ, the fuel injection timing control program PRTINJ, and the ignition timing control program PRTIG are stored in block units in the address space specified by the address assigned to the rewritable area ARP. Is stored in the EEPROM 12.

また、書換不能エリアARIPには、通常制御用プログラムPRNの更新が正常に行われたか否かを判定するためのブートプログラムPRBと、エンジン3をフェールセーフ制御するためのフェールセーフ制御用プログラムPRFが記憶されている。   Further, in the non-rewritable area ARIP, there are a boot program PRB for determining whether or not the normal control program PRN has been normally updated and a fail safe control program PRF for fail safe control of the engine 3. It is remembered.

フェールセーフ制御用プログラムPRFは、フェールセーフ制御用の燃料噴射量制御プログラムPRQINF、燃料噴射時期制御プログラムPRTINFおよび点火時期制御プログラムPRTIGFなどで構成されている。これらの燃料噴射量制御プログラムPRQINFおよび燃料噴射時期制御プログラムPRTINFは、上述した通常制御用のものと同様、燃料噴射量および燃料噴射時期を吸気量QAやエンジン水温TW、吸気温TAに応じて設定するための所定のマップをそれぞれ有している。なお、フェールセーフ制御用のマップは、通常制御用のマップと比較し、吸気量QAなどに対する格子点の数が少なく設定されている。点火時期制御プログラムPRTIGFは、エンジン回転数NEに応じて通電時間を設定するための所定のマップを有している。このマップは、通常制御用のマップと比較して、エンジン回転数NEに対する格子点の数が少なく設定されている。また、この点火時期制御プログラムPRTIGFでは、点火時期は固定値、例えば最遅角位置に設定されている。   The fail safe control program PRF includes a fuel injection amount control program PRQINF for fail safe control, a fuel injection timing control program PRTINF, an ignition timing control program PRTIGF, and the like. The fuel injection amount control program PRQINF and the fuel injection timing control program PRTINF set the fuel injection amount and the fuel injection timing according to the intake air amount QA, the engine water temperature TW, and the intake air temperature TA, similar to those for the normal control described above. Each of them has a predetermined map. Note that the map for fail-safe control is set to have a smaller number of grid points for the intake air amount QA or the like than the map for normal control. The ignition timing control program PRTIGF has a predetermined map for setting the energization time according to the engine speed NE. This map is set to have a smaller number of grid points with respect to the engine speed NE than the map for normal control. In the ignition timing control program PRTIGF, the ignition timing is set to a fixed value, for example, the most retarded position.

以上のように、フェールセーフ制御用プログラムPRFでは、フェールセーフ制御用のマップ格子点の数を少なくすることによって、フェールセーフの制御処理が簡略化されている。それに応じて、フェールセーフ制御用プログラムPRFが縮小され、その分、記憶されるプログラムの容量が削減されている。   As described above, in the fail-safe control program PRF, the fail-safe control process is simplified by reducing the number of map grid points for fail-safe control. Accordingly, the fail-safe control program PRF is reduced, and the capacity of the stored program is reduced accordingly.

これらのブートプログラムPRB、フェールセーフ制御用の燃料噴射量制御プログラムPRQINF、燃料噴射時期制御プログラムPRTINFおよび点火時期制御プログラムPRTIGFは、書換不能エリアARIPに割り当てられたアドレスによって指定されるアドレス空間にブロック単位でそれぞれ記憶されており、各アドレスはEEPROM12に記憶されている。   The boot program PRB, the fuel injection amount control program PRQINF for fail-safe control, the fuel injection timing control program PRTINF, and the ignition timing control program PRTIGF are in block units in the address space specified by the address assigned to the non-rewritable area ARIP. And each address is stored in the EEPROM 12.

また、EEPROM12には、書換装置9から受信したID情報、ECU2が所有するID番号、書換可能エリアARPに記憶された通常制御用プログラムPRNのバージョン情報、および後述する判定コードの「有効」または「無効」を表す情報が記憶されており、バージョン情報および判定コード情報は、CPU15によって更新される。なお、判定コードの初期値は「有効」に設定されている。   Further, the EEPROM 12 has ID information received from the rewriting device 9, ID number owned by the ECU 2, version information of the normal control program PRN stored in the rewritable area ARP, and “valid” or “ Information indicating “invalid” is stored, and the version information and the determination code information are updated by the CPU 15. The initial value of the determination code is set to “valid”.

CPU15は、通常制御用プログラムPRNまたはフェールセーフ制御用プログラムPRFを実行することによって、エンジン3の燃料噴射制御および点火時期制御などを実行する。また、CPU15は、ECU2の起動時、すなわちイグニッションスイッチ7がONされたときに、ブートプログラムPRBを実行する。なお、本実施形態では、CPU15が車両制御用プログラム更新手段および制御手段に相当する。   The CPU 15 executes fuel injection control and ignition timing control of the engine 3 by executing the normal control program PRN or the failsafe control program PRF. Further, the CPU 15 executes the boot program PRB when the ECU 2 is activated, that is, when the ignition switch 7 is turned on. In the present embodiment, the CPU 15 corresponds to a vehicle control program update unit and a control unit.

図3は、ブートプログラムPRBによって実行されるブート処理を示す。本処理は、ECU2の起動時に、エンジン3が停止されている状態で1回のみ実行される。本処理ではまず、ステップ1(「S1」と図示。以下同じ)において、書換装置9から書換信号SRWを受信したか否かを判別する。この判別結果がYESで、書換装置9に記録媒体が装着されているときには、通常制御用プログラムPRNを更新した(ステップ2)後、本処理を終了する。   FIG. 3 shows a boot process executed by the boot program PRB. This process is executed only once when the ECU 2 is activated while the engine 3 is stopped. In this process, first, in step 1 (illustrated as “S1”, hereinafter the same), it is determined whether or not the rewrite signal SRW is received from the rewrite device 9. If the determination result is YES and a recording medium is loaded in the rewrite device 9, the normal control program PRN is updated (step 2), and then this process is terminated.

図4は、この更新処理のサブルーチンを示している。本処理ではまず、ステップ11において、書換装置9から受信したID情報のうちのID番号が、ECU2のID番号と一致しているか否かを判別する。この判別結果がNOのときには、図3のステップ3に進む一方、YESのときには、通常制御用プログラムPRNの更新を開始するものとして、書換可能エリアARPに記憶された通常制御用プログラムPRNの内容を全部消去した(ステップ12)後、EEPROM12に記憶された判定コードを「無効」に書き換える(ステップ13)。   FIG. 4 shows a subroutine for this update process. In this process, first, in step 11, it is determined whether or not the ID number in the ID information received from the rewriting device 9 matches the ID number of the ECU 2. If the determination result is NO, the process proceeds to step 3 in FIG. 3, while if YES, the update of the normal control program PRN is started, and the contents of the normal control program PRN stored in the rewritable area ARP are read. After erasing all (step 12), the determination code stored in the EEPROM 12 is rewritten to “invalid” (step 13).

次に、書換装置9から更新用プログラムPRUをブロック単位で受信する(ステップ14)。次いで、受信した更新用プログラムPRUを、書換可能エリアARPの対応するアドレス空間にブロック単位で書き込む(ステップ15)。これにより、通常制御用プログラムPRNが順次、更新される。次に、この通常制御用プログラムPRNの更新に異常が発生しているか否かを判別する(ステップ16)。具体的には、ECU2と書換装置9の間で通信異常が発生したときや、フラッシュROM14への更新用プログラムPRUの書き込みが正常に行えなかったときに、更新異常が発生していると判別される。なお、後者の書込み異常は、例えばベリファイ処理を行うことによって判別され、具体的には、受信した更新用プログラムPRUと書き込んだ更新用プログラムPRUをブロック単位で比較し、両者が一致していないときに、書込み異常と判別される。   Next, the update program PRU is received in block units from the rewrite device 9 (step 14). Next, the received update program PRU is written in block units in the corresponding address space of the rewritable area ARP (step 15). As a result, the normal control program PRN is sequentially updated. Next, it is determined whether or not an abnormality has occurred in updating the normal control program PRN (step 16). Specifically, when a communication abnormality occurs between the ECU 2 and the rewriting device 9 or when the update program PRU is not normally written to the flash ROM 14, it is determined that an update abnormality has occurred. The The latter writing abnormality is determined by performing, for example, verify processing. Specifically, when the received update program PRU and the written update program PRU are compared in units of blocks, the two do not match. Therefore, it is determined that the writing is abnormal.

前記ステップ16の判別結果がNOのときには、通常制御用プログラムPRNの更新が完了したか否かを判別する(ステップ17)。具体的には、前記ステップ14で受信した更新用プログラムPRUのブロック数が、EEPROM12に記憶された更新用プログラムPRUのブロック数と一致したときに、更新が完了したと判別される。この判別結果がNOのときには、前記ステップ14に戻り、ステップ14以降の処理内容を繰り返し実行する。   When the determination result of step 16 is NO, it is determined whether or not the update of the normal control program PRN is completed (step 17). Specifically, when the number of blocks of the update program PRU received in step 14 matches the number of blocks of the update program PRU stored in the EEPROM 12, it is determined that the update has been completed. When the determination result is NO, the process returns to the step 14, and the processing contents after the step 14 are repeatedly executed.

一方、前記ステップ17の判別結果がYESのときには、更新用プログラムPRUの書き込みが最後のブロックまで正常に行われたとして、通常制御用プログラムPRNの更新が正常に行われたと判定し、そのことを表すために判定コードを「有効」に書き換えた(ステップ18)後、本処理を終了する。一方、前記ステップ16の判別結果がYESで、通常制御用プログラムPRNの更新異常が発生していると判別されたときには、それ以降の更新を行うことなく、そのまま本処理を終了する。その結果、判定コードは、「有効」に書き換えられることなく、前記ステップ13で書き換えられた「無効」に維持される。   On the other hand, when the determination result in step 17 is YES, it is determined that the normal control program PRN has been updated normally, assuming that the update program PRU has been normally written up to the last block. After the determination code is rewritten to “valid” for the purpose of representation (step 18), the present process is terminated. On the other hand, if the determination result in step 16 is YES and it is determined that the update abnormality of the normal control program PRN has occurred, the present process is terminated as it is without updating thereafter. As a result, the determination code is maintained to be “invalid” rewritten in step 13 without being rewritten to “valid”.

以上のような更新処理が終了すると、通常制御用プログラムPRNの更新の完了または更新の異常が表示され、この表示を受けて書換装置9から記録媒体が取り外される。これにより、書換装置9からの書換信号SRWの送信が停止される。その結果、次回のECU2の起動時には、図3の前記ステップ1の判別結果がNOになり、その場合には、ステップ3に進む。   When the update process as described above is completed, the update completion or update abnormality of the normal control program PRN is displayed, and the recording medium is removed from the rewrite device 9 in response to this display. As a result, transmission of the rewrite signal SRW from the rewrite device 9 is stopped. As a result, when the ECU 2 is activated next time, the determination result in Step 1 in FIG. 3 is NO, and in this case, the process proceeds to Step 3.

このステップ3では、EEPROM12に記憶された判定コードが「有効」であるか否かを判別する。この判別結果がYESのときには、通常制御用プログラムPRNの更新が正常に行われたとして、エンジン3の制御モードを通常制御に設定し(ステップ4)、本処理を終了する。このように通常制御に設定されると、書換可能エリアARPに記憶された更新された通常制御用プログラムPRNに基づいて、エンジン3の燃料噴射および点火時期の通常制御が実行される。   In step 3, it is determined whether or not the determination code stored in the EEPROM 12 is “valid”. When the determination result is YES, assuming that the normal control program PRN has been normally updated, the control mode of the engine 3 is set to normal control (step 4), and this process is terminated. When the normal control is set in this way, the normal control of the fuel injection and ignition timing of the engine 3 is executed based on the updated normal control program PRN stored in the rewritable area ARP.

一方、前記ステップ3の判別結果がNOで、通常制御用プログラムPRNの更新異常が発生していると判定されたときには、エンジン3の制御モードをフェールセーフ制御に設定し(ステップ5)、本処理を終了する。このようにフェールセーフ制御に設定されると、書換不能エリアARIPに記憶されたフェールセーフ制御用プログラムPRFに基づいて、エンジン3の燃料噴射および点火時期のフェールセーフ制御が実行される。   On the other hand, if the determination result in step 3 is NO and it is determined that an update abnormality of the normal control program PRN has occurred, the control mode of the engine 3 is set to fail-safe control (step 5). Exit. When the fail safe control is set in this way, the fuel safe injection control and the ignition timing fail safe control of the engine 3 are executed based on the fail safe control program PRF stored in the non-rewritable area ARIP.

以上のように、本実施形態によれば、ECU2の起動直後に、書換不能エリアARIPに記憶されたブートプログラムPRBが優先的に実行され、判定コードに基づいて通常制御用プログラムPRNの更新の正否が判定される。また、その更新が正常に行われたときには、通常制御用プログラムPRNに基づいて、エンジン3が通常制御される一方、通常制御用プログラムPRNの更新異常のときには、書換不能エリアARIPに記憶されたフェールセーフ制御用プログラムPRFに基づいて、エンジン3がフェールセーフ制御される。したがって、通常制御用プログラムPRNが正常に更新されなかった場合に、エンジン3のフェールセーフ制御を即座にかつ確実に行うことができ、修理工場から遠い場合でも、修理工場まで車両Vを安全に移動させることができる。   As described above, according to the present embodiment, immediately after the ECU 2 is started, the boot program PRB stored in the non-rewritable area ARIP is preferentially executed, and whether or not the normal control program PRN is updated based on the determination code is correct. Is determined. When the update is normally performed, the engine 3 is normally controlled based on the normal control program PRN. On the other hand, when the update of the normal control program PRN is abnormal, the failure stored in the non-rewritable area ARIP is stored. The engine 3 is fail-safe controlled based on the safe control program PRF. Therefore, when the normal control program PRN is not updated normally, fail-safe control of the engine 3 can be performed immediately and reliably, and the vehicle V can be safely moved to the repair shop even when it is far from the repair shop. Can be made.

また、フェールセーフ制御用プログラムPRFは、通常制御用プログラムPRNと比較して、マップの格子点の数が少なく、小容量化されているので、記憶されるプログラムの容量を削減することができる。   Further, the fail-safe control program PRF has a smaller number of map grid points and a smaller capacity than the normal control program PRN, so that the capacity of the stored program can be reduced.

次に、図5を参照しながら更新装置1の変形例を説明する。この変形例は、通常制御用プログラムPRNの更新を、エンジン3の運転時にも実行できるようにしたものである。このため、この変形例では、フラッシュROM14としてデュアルポートタイプのものを用い、フラッシュROM14からのフェールセーフ制御用プログラムPRFの読み出しと、フラッシュROM14への更新用プログラムPRUの書き込みを同時に行えるようにしている。   Next, a modification of the update device 1 will be described with reference to FIG. In this modification, the normal control program PRN can be updated even when the engine 3 is in operation. For this reason, in this modification, a dual port type flash ROM 14 is used so that the fail-safe control program PRF can be read from the flash ROM 14 and the update program PRU can be written to the flash ROM 14 at the same time. .

また、図5に示す更新処理は、図4の更新処理と比較し、通常制御用プログラムPRNの更新中に、エンジン3のフェールセーフ制御を実行する点のみが異なる。具体的には、書換装置9からの書換信号SRWの受信後、ID情報のうちのID番号が、ECU2のID番号と一致しているときには(ステップ11:YES)、ステップ21において、図3のステップ5と同様、エンジン3の制御モードをフェールセーフ制御に設定する。これにより、書換不能エリアARIPに記憶されたフェールセーフ制御用プログラムPRFに基づいて、エンジン3の燃料噴射および点火時期のフェールセーフ制御が実行される。それ以降の処理内容は、図4と同じであり、書換可能エリアARPに記憶された通常制御用プログラムPRNの全部を消去する(ステップ12)とともに、判定コードを「無効」に書き換えた(ステップ13)、通常制御用プログラムPRNを更新する(ステップ14,15)。この通常制御用プログラムPRNの更新が正常に行われたと判定されたときには、判定コードを「有効」に書き換えた後、更新異常が発生していると判定されたときには、判定コードを「無効」に維持したまま、本処理を終了する(ステップ16〜18)。   Further, the update process shown in FIG. 5 differs from the update process shown in FIG. 4 only in that the fail-safe control of the engine 3 is executed during the update of the normal control program PRN. Specifically, after the rewrite signal SRW is received from the rewrite device 9, when the ID number in the ID information matches the ID number of the ECU 2 (step 11: YES), in step 21, in FIG. As in step 5, the control mode of the engine 3 is set to fail-safe control. Thus, the fuel injection of the engine 3 and the fail safe control of the ignition timing are executed based on the fail safe control program PRF stored in the non-rewritable area ARIP. The subsequent processing contents are the same as in FIG. 4, and all of the normal control program PRN stored in the rewritable area ARP is erased (step 12) and the determination code is rewritten to “invalid” (step 13). The normal control program PRN is updated (steps 14 and 15). When it is determined that the normal control program PRN has been updated normally, the determination code is rewritten to “valid”. After that, when it is determined that an update abnormality has occurred, the determination code is set to “invalid”. This processing is terminated while maintaining the state (steps 16 to 18).

以上のように、この変形例によれば、通常制御用プログラムPRNの更新中に、エンジン3のフェールセーフ制御を実行するので、通常制御用プログラムPRNを更新しながら車両Vを移動させることができる。   As described above, according to this modified example, the fail-safe control of the engine 3 is executed while the normal control program PRN is being updated. Therefore, the vehicle V can be moved while the normal control program PRN is being updated. .

なお、本発明は、説明した実施形態に限定されることなく、種々の態様で実施することができる。例えば、実施形態では、通常制御用プログラムPRNの更新を制御するための更新制御プログラム(図4または図5の更新処理を実行するプログラム)は、ブートプログラムPRBに組み込まれているが、ブートプログラムと別個に構成してもよく、その場合には、フラッシュROMの書換不能エリアまたはEEPROMに記憶される。   In addition, this invention can be implemented in various aspects, without being limited to the described embodiment. For example, in the embodiment, the update control program for controlling the update of the normal control program PRN (the program for executing the update process of FIG. 4 or 5) is incorporated in the boot program PRB. It may be configured separately, in which case it is stored in the non-rewritable area of the flash ROM or in the EEPROM.

また、実施形態は、更新装置1による更新の対象が、エンジン3の制御プログラムの例であるが、これに限らず、車両Vを制御するためのエンジン以外の制御プログラム、例えばトランスミッションの制御プログラムやメータ情報を表示するためのプログラムでもよい。この場合のフェールセーフ制御用プログラムは、例えば、前者については、トランスミッションのギヤ段を車速に応じて第2速または第4速に変速するように構成され、後者については、車両の走行に最低限必要とされる車速、ギヤ段および故障情報のみを表示するように構成される。あるいは、スロットル弁の制御プログラムに適用してもよく、その場合、フェールセーフ制御用プログラムは、例えばアクセル開度に応じてスロットル弁を全閉位置と半開位置の間で制御するように構成される。   In the embodiment, the update target by the update device 1 is an example of a control program for the engine 3. However, the present invention is not limited thereto, and a control program other than the engine for controlling the vehicle V, such as a transmission control program, A program for displaying meter information may be used. The fail-safe control program in this case is, for example, configured to shift the transmission gear to the second speed or the fourth speed according to the vehicle speed, and the latter is a minimum for driving the vehicle. It is configured to display only the required vehicle speed, gear stage and failure information. Alternatively, the present invention may be applied to a throttle valve control program, in which case the fail-safe control program is configured to control the throttle valve between a fully closed position and a half-open position, for example, according to the accelerator opening. .

さらに、実施形態では、ID番号が一致した場合に通常制御用プログラムPRNの更新を行っているが、これに加え、書換装置9から送信されたバージョン情報とEEPROM12に記憶されたバージョン情報を比較し、書換装置9からのバージョン情報の方が新しいときに通常制御用プログラムPRNの更新を行うようにしてもよい。   Further, in the embodiment, when the ID numbers match, the normal control program PRN is updated. In addition, the version information transmitted from the rewriting device 9 and the version information stored in the EEPROM 12 are compared. The normal control program PRN may be updated when the version information from the rewriting device 9 is newer.

また、実施形態では、書換装置9による更新用プログラムPRNの取得を、書換装置9に着脱される記録媒体を介して行っているが、他の適当な手段、例えば無線通信によって行ってもよい。   In the embodiment, the update program PRN is acquired by the rewrite device 9 via a recording medium attached to and detached from the rewrite device 9, but may be acquired by other appropriate means, for example, wireless communication.

さらに、実施形態では、通常制御用プログラムPRNの更新を、更新異常が1回発生したときに直ちに中断しているが、更新異常の発生後、更新動作を繰り返し、更新異常の発生が所定回数、確認されたときに中断してもよい。   Further, in the embodiment, the update of the normal control program PRN is immediately interrupted when the update abnormality occurs once. However, after the update abnormality occurs, the update operation is repeated, and the occurrence of the update abnormality is performed a predetermined number of times. It may be interrupted when confirmed.

また、実施形態では、通常制御用プログラムPRNおよびフェールセーフ制御用プログラムPRFのアドレスを、EEPROM12に記憶しているが、これに限らず、例えばブートプログラムに組み込んでもよい。さらに、実施形態では、更新処理時の作業領域として、RAMを用いているが、フラッシュROMを用いてもよい。   In the embodiment, the addresses of the normal control program PRN and the failsafe control program PRF are stored in the EEPROM 12, but the present invention is not limited thereto, and may be incorporated in, for example, a boot program. Furthermore, in the embodiment, the RAM is used as the work area during the update process, but a flash ROM may be used.

また、実施形態は、本発明をエンジンを搭載した車両に適用した例であるが、本発明は、これに限らず、電気モータを用いた電気自動車や、エンジンおよび電気モータを併用したハイブリッド車両に適用してもよい。その他、本発明の趣旨の範囲内で、細部の構成を適宜、変更することが可能である。   The embodiment is an example in which the present invention is applied to a vehicle equipped with an engine. However, the present invention is not limited to this, and the present invention is not limited to this. You may apply. In addition, it is possible to appropriately change the detailed configuration within the scope of the gist of the present invention.

本発明の更新装置を、これを適用した内燃機関を搭載した車両とともに、概略的に示す図である。It is a figure which shows roughly the update apparatus of this invention with the vehicle carrying the internal combustion engine to which this is applied. フラッシュROMの構成を示すブロック図である。It is a block diagram which shows the structure of flash ROM. ブートプログラムによって実行されるブート処理を示すフローチャートである。It is a flowchart which shows the boot process performed with a boot program. 通常制御用プログラムの更新処理のサブルーチンである。This is a subroutine for updating the normal control program. 通常制御用プログラムの更新処理の変形例を示すサブルーチンである。It is a subroutine which shows the modification of the update process of the program for normal control.

符号の説明Explanation of symbols

1 更新装置
2 ECU(制御装置)
9 書換装置
14 フラッシュROM(不揮発性メモリ)
15 CPU(車両制御用プログラム更新手段および制御手段)
V 車両
ARP 書換可能エリア
ARIP 書換不能エリア
PRB ブートプログラム
PRU 更新用プログラム
PRN 通常制御用プログラム(車両制御用プログラム)
PRF フェールセーフ制御用プログラム
1 Update Device 2 ECU (Control Device)
9 Rewriting device 14 Flash ROM (nonvolatile memory)
15 CPU (vehicle control program update means and control means)
V vehicle ARP rewritable area ARIP non-rewritable area PRB boot program PRU update program PRN normal control program (vehicle control program)
Program for PRF fail-safe control

Claims (2)

書換可能エリアおよび書換不能エリアを有する不揮発性メモリと、
前記書換可能エリアに記憶され、車両を通常制御するための車両制御用プログラムと、
前記書換不能エリアに記憶され、前記車両制御用プログラムの更新が正常に行われたか否かを判定するためのブートプログラムと、
前記書換不能エリアに記憶されるとともに、前記車両制御用プログラムよりも容量が小さく、前記車両をフェールセーフ制御するためのフェールセーフ制御用プログラムと、
前記車両制御用プログラムを更新する車両制御用プログラム更新手段と、
制御装置が起動されたときに前記ブートプログラムを実行するとともに、その実行による判定結果に応じ、前記車両制御用プログラムの更新が正常に行われたと判定されたときに、前記車両制御用プログラムを実行し、前記車両制御用プログラムの更新が正常に行われていないと判定されたときに、前記フェールセーフ制御用プログラムを実行する制御手段と、
を備えることを特徴とする車両の制御装置。
A non-volatile memory having a rewritable area and a non-rewritable area;
A vehicle control program stored in the rewritable area for normal control of the vehicle;
A boot program that is stored in the non-rewritable area and for determining whether or not the vehicle control program has been successfully updated;
A program for fail-safe control that is stored in the non-rewritable area and has a capacity smaller than the program for vehicle control, and for fail-safe control of the vehicle;
Vehicle control program updating means for updating the vehicle control program;
The boot program is executed when the control device is activated, and the vehicle control program is executed when it is determined that the update of the vehicle control program is normally performed according to the determination result of the execution. And, when it is determined that the update of the vehicle control program is not normally performed, control means for executing the fail-safe control program;
A vehicle control apparatus comprising:
車両を制御する車両の制御装置と、
前記車両に搭載され、更新用プログラムを取得するとともに、前記制御装置と通信可能に構成された書換装置と、を備え、
前記制御装置は、
書換可能エリアおよび書換不能エリアを有する不揮発性メモリと、
前記書換可能エリアに記憶され、前記車両を通常制御するための車両制御用プログラムと、
前記書換不能エリアに記憶され、前記車両制御用プログラムの更新が正常に行われたか否かを判定するためのブートプログラムと、
前記書換不能エリアに記憶されるとともに、前記車両制御用プログラムよりも容量が小さく、前記車両をフェールセーフ制御するためのフェールセーフ制御用プログラムと、
前記車両制御用プログラムを、前記書換装置から送信された前記更新用プログラムに書き換えることにより、前記車両制御用プログラムを更新する車両制御用プログラム更新手段と、
前記制御装置が起動されたときに前記ブートプログラムを実行するとともに、その実行による判定結果に応じ、前記車両制御用プログラムの更新が正常に行われたと判定されたときに、前記車両制御用プログラムを実行し、前記車両制御用プログラムの更新が正常に行われていないと判定されたときに、前記フェールセーフ制御用プログラムを実行する制御手段と、を有することを特徴とする車両制御用プログラムの更新装置。
A vehicle control device for controlling the vehicle;
A rewriting device mounted on the vehicle and acquiring an update program and configured to be communicable with the control device;
The controller is
A non-volatile memory having a rewritable area and a non-rewritable area;
A vehicle control program stored in the rewritable area for normally controlling the vehicle;
A boot program that is stored in the non-rewritable area and for determining whether or not the vehicle control program has been successfully updated;
A program for fail-safe control that is stored in the non-rewritable area and has a capacity smaller than the program for vehicle control, and for fail-safe control of the vehicle;
Vehicle control program update means for updating the vehicle control program by rewriting the vehicle control program with the update program transmitted from the rewriting device;
The boot control program is executed when the control device is activated, and the vehicle control program is executed when it is determined that the update of the vehicle control program is normally performed according to the determination result of the execution. Updating the vehicle control program, comprising: control means for executing the fail-safe control program when it is determined that the vehicle control program is not normally updated. apparatus.
JP2007204783A 2007-08-06 2007-08-06 Control device for vehicle, and device for updating vehicle control program Withdrawn JP2009042850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007204783A JP2009042850A (en) 2007-08-06 2007-08-06 Control device for vehicle, and device for updating vehicle control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007204783A JP2009042850A (en) 2007-08-06 2007-08-06 Control device for vehicle, and device for updating vehicle control program

Publications (1)

Publication Number Publication Date
JP2009042850A true JP2009042850A (en) 2009-02-26

Family

ID=40443558

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007204783A Withdrawn JP2009042850A (en) 2007-08-06 2007-08-06 Control device for vehicle, and device for updating vehicle control program

Country Status (1)

Country Link
JP (1) JP2009042850A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013107497A (en) * 2011-11-21 2013-06-06 Denso Corp Data rewrite system for vehicle, in-vehicle apparatus used in data rewrite system, and rewrite apparatus
KR20160018635A (en) * 2016-01-29 2016-02-17 현대자동차주식회사 Method of restoring vehicle operating system and apparatus using the same
JP2018055206A (en) * 2016-09-27 2018-04-05 株式会社Subaru Vehicle electronic control system
CN109906311A (en) * 2016-10-27 2019-06-18 住友电气工业株式会社 Control device, method for updating program, computer program
DE102021101665A1 (en) 2020-04-03 2021-10-07 Toyota Jidosha Kabushiki Kaisha VEHICLE PROGRAM UPDATE SYSTEM AND VEHICLE PROGRAM UPDATE PROCEDURE

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9104522B2 (en) 2011-11-21 2015-08-11 Denso Corporation Data rewrite system for vehicle, in-vehicle apparatus and rewrite apparatus
JP2013107497A (en) * 2011-11-21 2013-06-06 Denso Corp Data rewrite system for vehicle, in-vehicle apparatus used in data rewrite system, and rewrite apparatus
KR20160018635A (en) * 2016-01-29 2016-02-17 현대자동차주식회사 Method of restoring vehicle operating system and apparatus using the same
KR101683655B1 (en) * 2016-01-29 2016-12-07 현대자동차주식회사 Method of restoring vehicle operating system and apparatus using the same
JP2018055206A (en) * 2016-09-27 2018-04-05 株式会社Subaru Vehicle electronic control system
CN109906311B (en) * 2016-10-27 2022-01-28 住友电气工业株式会社 Control apparatus, storage medium, and method of updating control program of in-vehicle control device
CN109906311A (en) * 2016-10-27 2019-06-18 住友电气工业株式会社 Control device, method for updating program, computer program
DE102021101665A1 (en) 2020-04-03 2021-10-07 Toyota Jidosha Kabushiki Kaisha VEHICLE PROGRAM UPDATE SYSTEM AND VEHICLE PROGRAM UPDATE PROCEDURE
JP2021160695A (en) * 2020-04-03 2021-10-11 トヨタ自動車株式会社 Program update system for vehicle
CN113553076A (en) * 2020-04-03 2021-10-26 丰田自动车株式会社 Vehicle program update system and vehicle program update method
US20210309237A1 (en) * 2020-04-03 2021-10-07 Toyota Jidosha Kabushiki Kaisha Vehicle program update system and vehicle program update method
JP7294217B2 (en) 2020-04-03 2023-06-20 トヨタ自動車株式会社 Vehicle program update system
US11820391B2 (en) 2020-04-03 2023-11-21 Toyota Jidosha Kabushiki Kaisha Vehicle program update system and vehicle program update method
CN113553076B (en) * 2020-04-03 2024-01-30 丰田自动车株式会社 Vehicle program update system and vehicle program update method

Similar Documents

Publication Publication Date Title
JP5176728B2 (en) Electronic control device for vehicle
US8140216B2 (en) Method of detecting manipulation of a programmable memory device of a digital controller
JP4135220B2 (en) Electronic control device for vehicle
JP4539757B2 (en) Electronic control unit
JP2003256228A (en) Program rewriting device
JP4225645B2 (en) Data rewrite device for vehicle control unit
JP2009042850A (en) Control device for vehicle, and device for updating vehicle control program
KR102278398B1 (en) Refresh of a storage area of a non-volatile random access memory
JP4248624B2 (en) Electronic control device for internal combustion engine.
JP2009248804A (en) Electronic control apparatus and vehicle control system
JP4552982B2 (en) Electronic control unit
JP3870563B2 (en) Electronic control device and non-volatile memory rewrite count method
JP2005338955A (en) Electronic control device
JP5908304B2 (en) Fuel injection control system
US11169828B2 (en) Electronic control unit and method for verifying control program
WO2003102961A1 (en) Electronic control apparatus
JPH11141391A (en) Controller for automobile
JP2006293650A (en) Backup device for vehicle information
JP2004151944A (en) Method for writing data in non-volatile storage device, its program and device, and onboard electronic controller
JP2002149412A (en) Electronic controller
JP2000257502A (en) Electronic controller for automobile
JP2009090940A (en) Updating device of vehicle control program
JP2004005152A (en) Rewriting device for nonvolatile memory
JP2019045952A (en) Vehicle information memory device
JPH09171459A (en) Electronic control equipment

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20101102