[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JP2001084134A - On-vehicle electronic controller and program rewriting device - Google Patents

On-vehicle electronic controller and program rewriting device

Info

Publication number
JP2001084134A
JP2001084134A JP26243599A JP26243599A JP2001084134A JP 2001084134 A JP2001084134 A JP 2001084134A JP 26243599 A JP26243599 A JP 26243599A JP 26243599 A JP26243599 A JP 26243599A JP 2001084134 A JP2001084134 A JP 2001084134A
Authority
JP
Japan
Prior art keywords
program
storage
rewriting
stored
storage block
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.)
Pending
Application number
JP26243599A
Other languages
Japanese (ja)
Inventor
Mitsuru Hayakawa
満 早川
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP26243599A priority Critical patent/JP2001084134A/en
Publication of JP2001084134A publication Critical patent/JP2001084134A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electrical Control Of Air Or Fuel Supplied To Internal-Combustion Engine (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent the runaway of a CPU by preventing any rewriting miss at the time of rewriting with respect to a storage device storing each program while divided into plural blocks. SOLUTION: An on-vehicle electronic controller 2 is provided with a CPU 7 for executing a program, a peripheral circuit 6 for operating input processing from a sensor group 4 and output processing to an actuator group 5 and input and output processing with a program rewriting device 9 based on the command of the CPU 7, and a storage device 8 for storing the program or data of the input processing from the sensor group 4 and the output processing to the actuator group 5 and the arithmetic processing of the CPU 7 and storing each kind of program in each divided storage block. In this case, a flag indicating the validity/invalidity of the program or data is stored in each storage block of the storage device 8, and after the program is written, and the program is collated, and then the validity/invalidity of the program is confirmed, this flag is written.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は車両に搭載され、
エンジン制御や走行制御などに使用される電子制御装
置、特にプログラムの書き込みミスによる誤動作の防止
機能を有する車載用電子制御装置とそのプログラム書換
装置に関するものである。
TECHNICAL FIELD The present invention is mounted on a vehicle,
The present invention relates to an electronic control device used for engine control, travel control, and the like, and particularly to an in-vehicle electronic control device having a function of preventing a malfunction due to a mistake in writing a program, and a program rewriting device therefor.

【0002】[0002]

【従来の技術】図2は、一般的な車載用の電子制御装置
(以下ECUと称す)と、このECUのプログラムやデ
ータを書き換えるプログラム書換装置との接続状態を示
すブロック図である。図において、1はECU2を搭載
する車両、3は車両1に搭載されECU2などの電源を
なすバッテリ、4は車両1の各部の状態を検出するセン
サ類、5はECU2の指示により車両1の各部を操作す
るアクチュエータ類である。ECU2は、センサ類4か
らの入力回路や、アクチュエータ類5に対する出力回路
や、後述するプログラム書換装置との入出力回路などか
らなる周辺回路6と、ECU2の全体を制御する中央演
算処理装置(以下CPUと称す)7と、CPU7により
読み出されて実行されるプログラムやデータを格納する
記憶装置8とから構成され、記憶装置8には例えば書き
換えが可能なROMなどが使用され、複数のプログラム
やデータが各プログラム毎に複数に分割された記憶ブロ
ック8a、ないし、8d(図の場合、ブロックAからブ
ロックD)に格納されるように構成されている。
2. Description of the Related Art FIG. 2 is a block diagram showing a connection state between a general on-vehicle electronic control device (hereinafter referred to as an ECU) and a program rewriting device for rewriting programs and data of the ECU. In the figure, 1 is a vehicle on which the ECU 2 is mounted, 3 is a battery mounted on the vehicle 1 and serving as a power source of the ECU 2, 4 is sensors and the like for detecting the state of each part of the vehicle 1, 5 is each part of the vehicle 1 according to an instruction of the ECU 2 Actuators that operate. The ECU 2 includes an input circuit from the sensors 4, an output circuit to the actuators 5, a peripheral circuit 6 including an input / output circuit with a program rewriting device described later, and a central processing unit (hereinafter, referred to as a central processing unit) that controls the entire ECU 2. And a storage device 8 for storing programs and data read and executed by the CPU 7. The storage device 8 is, for example, a rewritable ROM or the like. Data is stored in a plurality of storage blocks 8a to 8d (blocks A to D in the figure) divided for each program.

【0003】9はプログラム書換装置であり、入出力回
路11と、プログラム書換装置9全体を制御する中央演
算処理装置(以下CPUと称す)12と、記憶部13
と、操作部14とで構成され、車両1に搭載されたEC
U2とはプログラム書き換え時にハーネス10により接
続される。記憶部13にはCPU12により読み出され
てプログラム書換装置9全体を制御するためのプログラ
ム、および、車両1に搭載されたECU2のプログラム
を書き換えるための書換プログラムとデータとが格納さ
れ、ハーネス10は車両1のバッテリ3からの電源供給
路と、CPU7とCPU12との通信回線とを構成して
いる。
A program rewriting device 9 includes an input / output circuit 11, a central processing unit (hereinafter referred to as a CPU) 12 for controlling the entire program rewriting device 9, and a storage unit 13
And an operation unit 14, and an EC mounted on the vehicle 1.
U2 is connected by the harness 10 when rewriting the program. The storage unit 13 stores a program that is read by the CPU 12 to control the entire program rewriting device 9, a rewriting program for rewriting a program of the ECU 2 mounted on the vehicle 1, and data. A power supply path from the battery 3 of the vehicle 1 and a communication line between the CPU 7 and the CPU 12 are configured.

【0004】このように構成された車載用電子制御装置
とプログラム書換装置において、車両1に搭載されたE
CU2に電源が投入されると、CPU7が記憶装置8の
特定の記憶ブロックに格納されたECU2全体を制御す
るプログラムを読み出して動作を開始する。記憶装置8
に格納されるプログラムには上記のECU2全体を制御
するプログラムの他、各種のセンサ類4による車両1の
各部の状態を検出するためのプログラムやデータと、ア
クチュエータ類5の制御手順や駆動時間などのプログラ
ムやデータとが、プログラム毎に各記憶ブロック8a、
ないし、8dに格納されており、CPU7はこれらのプ
ログラムを読み出し、周辺回路6を介してセンサ類4か
らデータを入力すると共に、アクチュエータ類5に対す
る制御や駆動の信号を出力し、車両1のエンジン制御
と、トランスミッションなどの走行系の制御とを行う。
In the vehicle-mounted electronic control device and program rewriting device configured as described above, the E-
When the power is supplied to the CU 2, the CPU 7 reads out a program for controlling the entire ECU 2 stored in a specific storage block of the storage device 8 and starts the operation. Storage device 8
In addition to the program for controlling the entire ECU 2, programs and data for detecting the state of each part of the vehicle 1 by various sensors 4, control procedures and driving times of the actuators 5, etc. Is stored in each storage block 8a for each program.
The CPU 7 reads out these programs, inputs data from the sensors 4 via the peripheral circuit 6, outputs control and drive signals for the actuators 5, and outputs signals to the engine 7 of the vehicle 1. Control and control of a traveling system such as a transmission.

【0005】予め記憶されたエンジン制御や走行系制御
の制御内容を変更したい場合、記憶装置8の該当する記
憶ブロックに格納されたプログラムやデータの内容を書
き換える必要がある。このような記憶された情報の変更
に当たっては、プログラム書換装置9をハーネス10を
介してECU2に接続し、プログラム書換装置9のCP
U12とECU2のCPU7とを入出力回路11および
周辺回路6を介して通信可能な状態とし、プログラム書
換装置9の記憶部13に格納された書き換えのためのプ
ログラムやデータ情報をECU2の記憶装置8の書き換
え対象の記憶ブロックに転送して書き換えが行われる。
When it is desired to change the control contents of the engine control and the traveling system control stored in advance, it is necessary to rewrite the contents of the programs and data stored in the corresponding storage blocks of the storage device 8. To change such stored information, the program rewriting device 9 is connected to the ECU 2 via the harness 10 and the CP of the program rewriting device 9 is changed.
U12 and the CPU 7 of the ECU 2 are made communicable via the input / output circuit 11 and the peripheral circuit 6, and the rewriting program and data information stored in the storage unit 13 of the program rewriting device 9 are stored in the storage device 8 of the ECU 2. Is transferred to the storage block to be rewritten and rewritten.

【0006】この書き換えの手順は次の通りである。ま
ず、プログラム書換装置9のCPU12が記憶部13に
記憶されたプログラムおよびデータを読み出す。このプ
ログラムとデータは、上記のようにプログラム書換装置
9全体を制御するためのプログラムとECU2のプログ
ラムを書き換えるための書換プログラムやデータであ
り、ECU2の記憶装置8のどの記憶ブロックにどのプ
ログラムやデータを書き込むかといった情報が含まれて
いる。つづいて、プログラム書換装置9側のCPU12
がこれらのプログラムに従い、ECU2側の記憶装置8
の書き換え対象の記憶ブロックの記憶内容を消去するた
めにブロック消去コマンドを送信し、ECU2側のCP
U7はこのコマンドを受信して、記憶装置8の指令のあ
った記憶ブロックの記憶内容を消去する。
The rewriting procedure is as follows. First, the CPU 12 of the program rewriting device 9 reads out programs and data stored in the storage unit 13. The program and the data are a program for controlling the entire program rewriting device 9 and a rewriting program and data for rewriting the program of the ECU 2 as described above, and which program and data are stored in which storage block of the storage device 8 of the ECU 2. Is written. Subsequently, the CPU 12 of the program rewriting device 9 side
According to these programs, the storage device 8 on the ECU 2 side
A block erase command is transmitted to erase the storage contents of the storage block to be rewritten, and the ECU 2 side CP
U7 receives this command and erases the storage contents of the storage block instructed by the storage device 8.

【0007】ECU2の記憶装置8の書き換え対象記憶
ブロックの記憶内容が消去されたことを検知すると、プ
ログラム書換装置9はこの記憶ブロックに書き込むプロ
グラムやデータをECU2に送信し、ECU2のCPU
7はこれを受信して記憶装置8の書き換え対象の記憶ブ
ロックに新たなプログラムやデータを書き込み、書き換
えが完了する。この書換プログラムやデータが、容易に
解析されてはならない場合には、暗号化されてプログラ
ム書換装置9の記憶部13に格納され、CPU7が受信
時に解読して記憶装置8の書き換え対象の記憶ブロック
に書き込むようにすることもできる。
Upon detecting that the storage contents of the storage block to be rewritten in the storage device 8 of the ECU 2 have been erased, the program rewriting device 9 sends a program or data to be written to this storage block to the ECU 2 and the CPU of the ECU 2
Receiving this, the new program and data are written in the storage block of the storage device 8 to be rewritten, and the rewriting is completed. If the rewriting program or data must not be easily analyzed, the rewriting program or data is encrypted and stored in the storage unit 13 of the program rewriting device 9, and is decoded by the CPU 7 upon reception and stored in the storage device 8 in the storage block to be rewritten. Can also be written to.

【0008】[0008]

【発明が解決しようとする課題】以上のようにECU2
の記憶装置8に格納され、また、書き換えられて保存さ
れるプログラムやデータは必要に応じて各記憶ブロック
から読み出され、CPU7が車両1を制御するが、これ
らのプログラムやデータに欠陥や欠落があるとプログラ
ムが暴走して車両1の安全性が確保できない状態に陥る
ことがある。プログラムの書き換えは、修正や変更が必
要な場合にオペレータが作業するものであるため、人的
な作業ミスが発生することがあり、記憶装置8の記憶ブ
ロック内のプログラムが消去されたままの状態となった
り、途中までの書き込み状態となったりすることがあ
る。また、プログラム書換装置9やハーネス10の故
障、あるいは、転送中のノイズなどによっても書き換え
られたプログラムに欠陥や欠落が発生することがあり、
これらのプログラムの欠陥が車両の制御に誤動作を生じ
たりプログラム暴走の原因となる。
As described above, the ECU 2
Programs and data that are stored in the storage device 8 and that are rewritten and stored are read from each storage block as needed, and the CPU 7 controls the vehicle 1. However, these programs and data are defective or missing. If there is, the program may run away and the vehicle 1 may fall into a state where safety cannot be ensured. Since the rewriting of the program is performed by the operator when a correction or change is necessary, a human error may occur, and the program in the storage block of the storage device 8 may remain in the erased state. Or a halfway write state. In addition, defects or omissions may occur in the rewritten program due to a failure of the program rewriting device 9 or the harness 10, or noise during transfer.
These program defects may cause malfunctions in vehicle control or cause program runaway.

【0009】記憶装置8には上記のように、分割された
各記憶ブロックに異なる制御のためのプログラムが格納
されているが、一部の記憶ブロックのみをプログラム変
更するときに上記の人的ミスが生じやすく、従来、特定
の記憶ブロックについてのみプログラム変更するときで
も、上記のような作業ミスなどによるプログラム暴走を
避けるため、特定の記憶ブロックのみの部分的な書き換
えを行わず、記憶装置8の全領域を消去して書き換える
手法が採られてきた。このために、プログラム書換装置
9の記憶部13には書き換えのための全情報量を格納す
る必要があり、記憶部13が大容量となってプログラム
書換装置9が高価格となり、また、書き換えのための時
間が増大し、さらに、この書き換え時間の増大が、ノイ
ズによるプログラム欠陥の生ずる危険性の増大につなが
るという問題を有していた。
As described above, the storage device 8 stores a program for different control in each of the divided storage blocks. However, when the program is changed in only some of the storage blocks, the above-mentioned human error is caused. Conventionally, even when the program is changed only for a specific storage block, in order to avoid a program runaway due to a work error as described above, the specific storage block is not partially rewritten, A technique of erasing and rewriting the entire area has been adopted. For this reason, it is necessary to store the entire amount of information for rewriting in the storage unit 13 of the program rewriting device 9, the storage unit 13 has a large capacity, the program rewriting device 9 becomes expensive, and In addition, there is a problem that the increase in the rewriting time leads to an increase in the risk of causing a program defect due to noise.

【0010】この発明は、このような課題を解決するた
めになされたもので、記憶装置のプログラムを格納する
複数の各記憶ブロックのそれぞれにプログラムの良否を
判定するフラグを設け、このフラグを判定することによ
りプログラムの書き換えミスを防止し、CPUの暴走な
どのトラブルを防止すると共に、変更対象の記憶ブロッ
クのみの書き換えを可能にし、書き換え時間の短縮を図
ることを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made to solve such a problem, and a flag for judging the quality of a program is provided in each of a plurality of storage blocks storing a program of a storage device. By doing so, it is possible to prevent rewriting errors of the program, prevent trouble such as runaway of the CPU, enable rewriting of only the storage block to be changed, and shorten the rewriting time.

【0011】[0011]

【課題を解決するための手段】この発明に係わる車載用
電子制御装置は、プログラムの実行を行うCPUと、こ
のCPUの指令に基づきセンサ類からの入力処理とアク
チュエータ類に対する出力処理とプログラム書換装置と
の入出力処理とを行う周辺回路と、センサ類からの入力
処理とアクチュエータ類に対する出力処理とCPUの演
算処理とのプログラムやデータが格納されると共に、複
数の記憶ブロックに分割されて記憶ブロック毎に各種プ
ログラムやデータが格納される記憶装置とを備え、この
記憶装置の各記憶ブロックには、格納された上記の各プ
ログラムやデータの良否を示すフラグが共に格納され、
このフラグが、記憶ブロックにプログラムが書き込ま
れ、このプログラムが照合されて良否が確認された後に
書き込まれるようにしたものである。
According to the present invention, there is provided an on-vehicle electronic control device which includes a CPU for executing a program, an input process from sensors, an output process for actuators, and a program rewriting device based on a command from the CPU. Peripheral circuits that perform input / output processing with the CPU, programs and data for input processing from sensors, output processing for actuators, and arithmetic processing of the CPU are stored, and are divided into a plurality of storage blocks. A storage device in which various programs and data are stored for each, and a flag indicating the quality of each of the stored programs and data is stored in each storage block of the storage device,
This flag is written after a program is written in the storage block and the program is checked to determine whether it is good or not.

【0012】また、プログラムの良否を示すフラグが、
記憶ブロック内のプログラムやデータが消去された状態
では正常でないと判定するようにしたものである。さら
に、複数に分割された記憶ブロックの少なくとも一つに
格納されたプログラムが、各記憶ブロックの良否を示す
フラグを判定し、いずれかのフラグがそのプログラムが
正常でないことを示すとき、アクチュエータ類に対する
出力処理を停止するようにしたものである。さらにま
た、フラグを判定してプログラムが正常でないと判定し
たとき、警告表示を出力するようにしたものである。ま
た、分割された各記憶ブロックに格納される各プログラ
ムが、一括消去されても他の記憶ブロックのプログラム
の機能に影響を及ぼさない最小単位で構成されるように
したものである。
A flag indicating the quality of the program is
When the program and data in the storage block are erased, it is determined that the storage block is not normal. Further, a program stored in at least one of the plurality of divided storage blocks determines a flag indicating the pass or fail of each storage block, and when any one of the flags indicates that the program is not normal, The output processing is stopped. Furthermore, when the flag is determined and the program is determined to be abnormal, a warning display is output. Further, each program stored in each divided storage block is constituted by the minimum unit which does not affect the function of the program of another storage block even if the program is erased collectively.

【0013】また、プログラム書換装置が、プログラム
の実行を行うCPUと、このCPUの指令に基づき書換
プログラムを出力する入出力回路と、この書換プログラ
ムとCPUの演算処理プログラムとを記憶する記憶部と
を備え、複数の記憶ブロックに分割されて記憶ブロック
毎に各種のプログラムが格納される記憶装置を有する車
載用電子制御装置のプログラムの書き換えにあたり、プ
ログラムの書き換えが記憶装置のプログラム変更対象の
記憶ブロックに対して行われると共に、書き換えられた
記憶ブロックを照合し、書き換えられたプログラムの良
否を判定するようにしたものである。
The program rewriting device includes a CPU for executing the program, an input / output circuit for outputting the rewriting program based on an instruction from the CPU, and a storage unit for storing the rewriting program and an arithmetic processing program for the CPU. In rewriting a program of a vehicle-mounted electronic control device having a storage device that is divided into a plurality of storage blocks and stores various programs for each storage block, the rewriting of the program is performed by a storage block that is a program change target of the storage device. And the rewritten storage blocks are collated to determine whether the rewritten program is good or bad.

【0014】さらに、書き換えられた記憶ブロックを照
合し、その記憶ブロックのプログラムが正常と判断され
た場合にはその記憶ブロックにプログラムが正常である
ことを示すフラグをセットするようにしたものである。
さらにまた、プログラム書換装置の記憶部に保持された
書換プログラムが、このプログラムの一括消去がなされ
ても他のプログラムの機能に影響を及ぼさない最小単位
で構成されるようにしたものである。
Further, the rewritten storage block is collated, and if the program of the storage block is determined to be normal, a flag indicating that the program is normal is set in the storage block. .
Still further, the rewriting program stored in the storage unit of the program rewriting device is constituted by a minimum unit which does not affect the functions of other programs even if the program is erased in a batch.

【0015】[0015]

【発明の実施の形態】実施の形態1.図1は、この発明
の実施の形態1の車載用電子制御装置の記憶装置に格納
されるプログラムの構成を示すもので、車載用電子制御
装置とプログラム書換装置とは従来例で説明した図2の
構成が使用される。図1において、8a、ないし、8d
は記憶装置8の記憶ブロックを示し、それぞれをブロッ
クA、ブロックB、ブロックC、ブロックDとして、記
憶装置8が四つの記憶ブロックに分割されている場合の
一例を示している。各記憶ブロック8a、ないし、8d
には車両の制御に必要なプログラムやデータが各プログ
ラム毎に異なる記憶ブロックに格納されており、これら
のプログラムはECU2全体を制御するプログラムと、
各種のセンサ類4による車両1の各部の状態を検出する
認識手順や制御値のプログラムやデータと、アクチュエ
ータ類5の制御手順や駆動時間などのプログラムやデー
タとである。この記憶ブロックの分割数はプログラムの
種類数により、また、記憶ブロックのサイズはプログラ
ムやデータの規模により決定されるものである。また、
プログラムなどの情報には格納場所を表すアドレスが付
与されており、CPU7はアドレスを指定してプログラ
ムやデータを読み出す。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 FIG. 1 shows a configuration of a program stored in a storage device of an on-vehicle electronic control device according to Embodiment 1 of the present invention. The on-vehicle electronic control device and the program rewriting device are described in FIG. Configuration is used. In FIG. 1, 8a to 8d
Indicates storage blocks of the storage device 8, and shows an example in which the storage device 8 is divided into four storage blocks, each of which is a block A, a block B, a block C, and a block D. Each storage block 8a or 8d
Stores programs and data necessary for controlling the vehicle in different storage blocks for each program. These programs include a program for controlling the entire ECU 2,
These are programs and data of recognition procedures and control values for detecting the state of each part of the vehicle 1 by various sensors 4 and programs and data of control procedures and driving times of the actuators 5. The number of divisions of the storage block is determined by the number of types of the program, and the size of the storage block is determined by the size of the program or data. Also,
An address indicating a storage location is assigned to information such as a program, and the CPU 7 reads out the program and data by designating the address.

【0016】15は、CPU7が動作を開始したときに
最初に読み出されるプログラム開始アドレスであり、記
憶装置8の例えば記憶ブロック8aに格納され、CPU
7はこの開始アドレス15を読み取り、これに格納され
た各プログラムのアドレスから実行すべきプログラムを
選択して読み取る。16は記憶ブロック8aにプログラ
ム開始アドレス15と共にに格納された最初に動作する
プログラムであり、CPU7が最初に読み出してECU
2を動作させるプログラムを示すものである。CPU7
はこのプログラム開始アドレス15が欠落しているとき
には機能しないか、もしくは、無限ループ状態となり、
アクチュエータ類5に動作司令が出されないように構成
されており、車両1は発進せず安全状態に保たれる。
Reference numeral 15 denotes a program start address which is read first when the CPU 7 starts operating, and is stored in, for example, the storage block 8a of the storage device 8,
7 reads the start address 15 and selects and reads a program to be executed from the addresses of the programs stored therein. Reference numeral 16 denotes a first operating program stored in the storage block 8a together with the program start address 15, which is read first by the CPU 7 and
2 shows a program for operating the program. CPU7
Does not function when the program start address 15 is missing, or enters an infinite loop state,
The operation command is not issued to the actuators 5, so that the vehicle 1 does not start and is kept in a safe state.

【0017】17、ないし、20は分割された各記憶ブ
ロック8a、ないし、8dに設けられた良否フラグを示
すもので、良否フラグ17、ないし、20は、サムチェ
ック値や暗号コードなどにより記述され、その記憶ブロ
ックに格納されたプログラムやデータに欠落や欠陥がな
ければ良の状態を示し、欠落や欠陥があれば、また、消
去された状態では否の状態を示すように構成される。上
記の最初に動作するプログラム16にはこれらの良否フ
ラグ17、ないし、20を読み出し、各フラグが良であ
れば継続して動作をさせ、いずれかのフラグが否の状態
であれば各アクチュエータ類5を動作させずに車両1の
安全を確保するように構成されている。また、この最初
に動作するプログラム16には車両1に設けられた図示
しない警告表示装置を動作させ、記憶装置8の記憶ブロ
ック8a、ないし、8dのいずれかにプログラムやデー
タの欠陥や欠落があればこれを表示する機能を持たせる
ことができる。
Reference numerals 17 to 20 indicate pass / fail flags provided in the divided storage blocks 8a to 8d. The pass / fail flags 17 to 20 are described by a sum check value, an encryption code, or the like. If the program or data stored in the storage block is not missing or defective, it indicates a good state, and if there is a missing or defect, it indicates a bad state if it is erased. The pass / fail flag 17 or 20 is read out to the program 16 which operates first, and if each flag is good, the operation is continuously performed. 5 is operated so that the safety of the vehicle 1 is ensured. In addition, the program 16 that operates first activates a warning display device (not shown) provided in the vehicle 1 and detects any defect or omission of the program or data in any of the storage blocks 8a to 8d of the storage device 8. For example, it can have a function of displaying this.

【0018】このように構成されたこの発明の実施の形
態1の構成において、車載用電子制御装置に使用される
プログラムなどを書き換えるとき、上記の従来例と同様
にECU2とプログラム書換装置9とをハーネス10に
より接続する。プログラム書換装置9のCPU12は記
憶部13から読み出されたプログラムに従い、ECU2
の記憶装置8の書き換え対象の記憶ブロックの記憶内容
を消去するために、ECU2のCPU7に対してブロッ
ク消去コマンドを送信し、CPU7はこのコマンドを受
け、指令された書き換え対象の記憶ブロックの記憶内容
を消去する。書き換え対象の記憶ブロックの記憶の消去
が認識されるとプログラム書換装置9は、消去された書
き換え対象の記憶ブロックに書き込むべきプログラムや
データをECU2のCPU7に送信し、CPU7は指令
された書き換え対象の記憶ブロックにプログラムやデー
タを書き込む。
In the configuration of the first embodiment of the present invention configured as described above, when rewriting a program or the like used for the on-vehicle electronic control unit, the ECU 2 and the program rewriting device 9 are connected in the same manner as in the above-described conventional example. Connected by harness 10. The CPU 12 of the program rewriting device 9 follows the program read from the storage unit 13 and
Sends a block erasure command to the CPU 7 of the ECU 2 in order to erase the storage contents of the storage block to be rewritten in the storage device 8, and the CPU 7 receives the command and receives the command to store the storage contents of the storage block to be rewritten. To delete. When the erasure of the storage of the storage block to be rewritten is recognized, the program rewriting device 9 transmits a program or data to be written to the erased storage block to be rewritten to the CPU 7 of the ECU 2, and the CPU 7 Write programs and data to storage blocks.

【0019】この書き込み手順は次の通りである。ま
ず、書き込みは、書き換え対象の記憶ブロックに書き込
むべき情報の内、良否フラグを除いたプログラムやデー
タ情報から開始され、プログラムやデータの書き込みが
完了すれば、プログラム書換装置9が書き込みが正常で
あるかどうかをサムやCRC方式など一般的な方法を使
用して書き換えられた記憶ブロック内を照合する。プロ
グラムやデータが正常に書き込まれていることが確認さ
れれば続けて良否フラグが書き込まれ、さらに、プログ
ラム開始アドレス15が書き込まれる。この書き込み完
了後の照合において、書き込まれたプログラムに欠落や
欠陥があれば該当記憶ブロックに対して再度消去と書き
込みとが行われ、書き込みが正常であると確認されるま
で良否フラグの書き込みがなされない。そして、この良
否フラグの書き込みがなされない状態では良否フラグは
否の状態と判定される。
The writing procedure is as follows. First, the writing is started from the program and data information excluding the pass / fail flag in the information to be written in the storage block to be rewritten, and when the writing of the program or data is completed, the writing is normally performed by the program rewriting device 9. Whether or not the rewritten memory block is checked using a general method such as a sum or a CRC method. If it is confirmed that the program and the data are normally written, the pass / fail flag is written and the program start address 15 is written. In the collation after the completion of the writing, if the written program is missing or defective, the corresponding storage block is erased and written again, and the pass / fail flag is not written until the writing is confirmed to be normal. Not done. If the pass / fail flag has not been written, the pass / fail flag is determined to be a rejected state.

【0020】以上のプログラム書き換えにおいて、例え
ば、図1の記憶ブロック8aに示される開始アドレス1
5が消去さたり欠陥がある場合、良否フラグ17は否の
状態となり、プログラム全体が実行されず、上記の通り
機能しないか、もしくは、無限ループ状態となり、動作
司令が出されないので車両1は安全状態に保たれる。ま
た、記憶ブロック8bのプログラムやデータが消去さた
り欠陥がある場合、良否フラグ18が否の状態となり、
最初に動作するプログラム16がこれを判定して車両1
の制御を中止し、車両1は安全状態に保たれる。記憶ブ
ロック8c、記憶ブロック8dにおいても記憶ブロック
8bの場合と同様であり、最初に動作するプログラム1
6のフラグの判定により車両1は安全状態に保たれる。
さらに、プログラムの書き換え途中においてトラブルに
より欠落部が発生したり、書き込みが中断された状態で
気付かずに使用に供した場合にも良否フラグが否の状態
を示すため、最初に動作するプログラム16が制御を中
止して車両1は安全状態に保たれる。
In the above program rewriting, for example, the start address 1 shown in the storage block 8a of FIG.
If 5 is erased or defective, the pass / fail flag 17 will be in a negative state, the entire program will not be executed, and will not function as described above, or will be in an infinite loop state, and no operation command will be issued, so the vehicle 1 will be safe. Kept in state. When the program or data in the storage block 8b is erased or has a defect, the pass / fail flag 18 is set to a negative state,
The program 16 that operates first determines this and determines whether the vehicle 1
Is stopped, and the vehicle 1 is maintained in a safe state. The storage block 8c and the storage block 8d are the same as the storage block 8b, and the program 1 that operates first
The vehicle 1 is kept in a safe state by the determination of the flag of No. 6.
Further, when a missing part is generated due to a trouble during rewriting of the program or when the program 16 is used without being noticed in a state where the writing is interrupted, the pass / fail flag indicates a negative state. The control is stopped and the vehicle 1 is kept in a safe state.

【0021】このように、プログラムが書き換えられた
記憶ブロックには書き換え後にプログラム書換装置9に
よる確認がなされ、書き換えが正常であることが確認さ
れるまで書き換えが繰り返され、正常であることが確認
された後に良否フラグが良の状態を示すようにしたの
で、変更を要する記憶ブロックの書き換えが確実に行わ
れるようになり、部分的な変更のために従来のように記
憶装置8全体の書き換えを行う必要はなく、変更対象の
プログラムが格納される記憶ブロックのみを書き換えて
もプログラムのミスが発生することなく、書き換え時間
を大幅に短縮することができる。例えば記憶装置8が1
6分割されており、1ブロックのみの書き換えでよい場
合には書き換え時間が1/16に短縮されることにな
る。
As described above, the memory block in which the program has been rewritten is checked by the program rewriting device 9 after the rewriting, and the rewriting is repeated until the rewriting is confirmed to be normal. After that, the pass / fail flag indicates a good state, so that the storage block that needs to be changed can be surely rewritten, and the entire storage device 8 is rewritten as in the prior art for a partial change. It is not necessary, and even if only the storage block storing the program to be changed is rewritten, the rewriting time can be greatly reduced without causing a program error. For example, if the storage device 8 is 1
When the data is divided into six parts and only one block needs to be rewritten, the rewriting time is reduced to 1/16.

【0022】さらに、プログラムやデータを消去しても
他のプログラムに影響を与えない最小単位を一つの機能
ブロックに格納するように分割しておけば、記憶ブロッ
クを一括消去しても他のプログラムの機能に障害を与え
ることなく、書き換え時のデータ量を最小とすることが
でき、書き換えに要する時間と、プログラム書換装置9
の記憶部13の記憶容量とを最小にすることができる。
なお、上記の書き込み手順は、書き換え対象の記憶ブロ
ックを書き換える場合を説明したが、記憶装置8の全領
域について実施する場合でも、同様の手順により書き換
えを実施することができるものである。
Furthermore, if the minimum unit which does not affect other programs even if the program or data is erased is divided so as to be stored in one functional block, other programs can be stored even if the memory blocks are erased collectively. The data amount at the time of rewriting can be minimized without impairing the function of the program rewriting device.
And the storage capacity of the storage unit 13 can be minimized.
Although the above-described writing procedure has been described for the case where the storage block to be rewritten is rewritten, the rewriting can be performed by the same procedure even when the rewriting is performed for the entire area of the storage device 8.

【0023】[0023]

【発明の効果】以上に説明したように、この発明の車載
用電子制御装置とプログラム書換装置によれば、ECU
に内蔵される記憶装置を複数の記憶ブロックに分割し、
プログラム開始アドレスと各種制御プログラムなどを分
割された各記憶ブロックに個別に格納し、各記憶ブロッ
ク毎にブロック内のプログラムに欠落や欠陥のないこと
を示す良否フラグを設け、プログラムの書き換えに当た
っては良否フラグ以外の情報から書き換えを行い、プロ
グラムが正常に書き込まれていることを確認の上良否フ
ラグが書き込まれるようにし、良否フラグの良否を判定
して制御の開始、または、中止を行わせるようにしたの
で、プログラムミスによるCPUの暴走などトラブルが
未然に防止でき、車両を安全な状態に維持できると共
に、プログラムの書き換えを各記憶ブロック毎に行うこ
とが可能になり、書き換え時間の短縮と、これに伴う書
き換え時のノイズなどによる書換ミスの低減と、プログ
ラム書換装置の記憶部の容量削減とが可能になるなど、
優れた車載用電子制御装置とプログラム書換装置とを得
ることができるものである。
As described above, according to the on-vehicle electronic control device and the program rewriting device of the present invention, the ECU
Divides the storage device built in to multiple storage blocks,
The program start address and various control programs are individually stored in each divided storage block, and a pass / fail flag is provided for each storage block to indicate that the program in the block is not missing or defective. Rewrite from information other than the flag, confirm that the program has been written correctly, write the pass / fail flag, determine the pass / fail of the pass / fail flag, and start or stop the control. As a result, troubles such as runaway of the CPU due to a program error can be prevented beforehand, the vehicle can be maintained in a safe state, and the program can be rewritten for each memory block. Of rewriting errors due to noise at the time of rewriting, and storage of program rewriting device Such as allowing the reduction of capacity and is,
An excellent in-vehicle electronic control device and program rewriting device can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 この発明の実施の形態1の車載用電子制御装
置に使用されるプログラムの構成を示すものである。
FIG. 1 shows a configuration of a program used in a vehicle-mounted electronic control device according to a first embodiment of the present invention.

【図2】 一般的な車載用の電子制御装置とプログラム
書換装置との接続状態を示すブロック図である。
FIG. 2 is a block diagram showing a connection state between a general in-vehicle electronic control device and a program rewriting device.

【符号の説明】[Explanation of symbols]

1 車両、2 車載用電子制御装置、3 バッテリ、4
センサ類、5 アクチュエータ類、6 周辺回路、7
CPU、8 記憶装置、8a、8b、8c、8d 記
憶ブロック 9 プログラム書換装置、10 ハーネス、11 入出
力回路、12 CPU、13 記憶部、14 操作部、
15 プログラム開始アドレス、16 最初に動作する
プログラム、17、18、19、20 良否フラグ。
1 vehicle, 2 electronic control unit for vehicle, 3 battery, 4
Sensors, 5 Actuators, 6 Peripheral circuits, 7
CPU, 8 storage devices, 8a, 8b, 8c, 8d storage block 9 program rewriting device, 10 harness, 11 input / output circuit, 12 CPU, 13 storage unit, 14 operation unit,
15 Program start address, 16 First running program, 17, 18, 19, 20 Pass / fail flag.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 プログラムの実行を行うCPU、このC
PUの指令に基づきセンサ類からの入力処理とアクチュ
エータ類に対する出力処理とプログラム書換装置との入
出力処理とを行う周辺回路、前記センサ類からの入力処
理と前記アクチュエータ類に対する出力処理と前記CP
Uの演算処理とのプログラムやデータが格納されると共
に、複数の記憶ブロックに分割されてこの記憶ブロック
毎に前記の各種プログラムやデータが格納された記憶装
置を備え、この記憶装置の各記憶ブロックには格納され
た前記各プログラムやデータの良否を示すフラグが共に
格納され、このフラグが前記記憶ブロックにプログラム
が書き込まれ、このプログラムが照合されて良否が確認
された後に書き込まれるように構成されたことを特徴と
する車載用電子制御装置。
A CPU for executing a program;
Peripheral circuit for performing input processing from sensors, output processing for actuators, and input / output processing for a program rewriting device based on a PU command, input processing from the sensors, output processing for the actuators, and the CP
A program and data for the arithmetic processing of U are stored, and a storage device is provided which is divided into a plurality of storage blocks and stores the various programs and data for each of the storage blocks. Is stored together with a flag indicating the pass / fail of each of the stored programs and data.The flag is written into the storage block, and is written after the program is checked to determine whether the pass / fail is good. An in-vehicle electronic control device, characterized in that:
【請求項2】 プログラムの良否を示すフラグが、記憶
ブロック内のプログラムやデータが消去された状態では
正常でないと判定するように構成されたことを特徴とす
る請求項1に記載の車載用電子制御装置。
2. The in-vehicle electronic device according to claim 1, wherein the flag indicating the quality of the program is determined to be abnormal when the program or data in the storage block is erased. Control device.
【請求項3】 複数に分割された記憶ブロックの少なく
とも一つに格納されたプログラムが、各記憶ブロックの
良否を示すフラグを判定し、いずれかのフラグがそのプ
ログラムが正常でないことを示すとき、アクチュエータ
類に対する出力処理を停止するように構成されたことを
特徴とする請求項1または請求項2に記載の車載用電子
制御装置。
3. A program stored in at least one of a plurality of divided storage blocks determines a flag indicating pass / fail of each storage block, and when any one of the flags indicates that the program is not normal, 3. The on-vehicle electronic control device according to claim 1, wherein output processing for the actuators is stopped.
【請求項4】 フラグを判定してそのプログラムが正常
でないと判定したとき、警告表示を出力するように構成
されたことを特徴とする請求項3に記載の車載用電子制
御装置。
4. The in-vehicle electronic control device according to claim 3, wherein a warning display is output when the flag is determined and the program is determined to be abnormal.
【請求項5】 分割された各記憶ブロックに格納された
各プログラムが、一括消去されても他の記憶ブロックの
プログラムの機能に影響を及ぼさない最小単位で構成さ
れていることを特徴とする請求項1〜請求項5のいずれ
か一項に記載の車載用電子制御装置。
5. The program according to claim 1, wherein each of the programs stored in each of the divided storage blocks is constituted by a minimum unit which does not affect the function of the program of another storage block even if the program is erased collectively. An in-vehicle electronic control device according to any one of claims 1 to 5.
【請求項6】 プログラムの実行を行うCPU、このC
PUの指令に基づき書換プログラムを出力する入出力回
路、前記書換プログラムと前記CPUの演算処理プログ
ラムとを記憶する記憶部を備え、複数の記憶ブロックに
分割されてこの記憶ブロック毎に各種のプログラムが格
納された記憶装置を有する車載用電子制御装置のプログ
ラムの書き換えにあたり、プログラムの書き換えが前記
記憶装置のプログラム変更対象の記憶ブロックに対して
行われると共に、書き換えられた前記記憶ブロックを照
合し、書き換えられたプログラムの良否を判定するよう
に構成されたことを特徴とするプログラム書換装置。
6. A CPU for executing a program;
An input / output circuit that outputs a rewrite program based on a PU command; and a storage unit that stores the rewrite program and an arithmetic processing program of the CPU. The storage unit is divided into a plurality of storage blocks, and various programs are stored in each of the storage blocks. In rewriting the program of the in-vehicle electronic control device having the stored storage device, the rewriting of the program is performed on the storage block to be changed of the program of the storage device, and the rewritten storage block is checked and rewritten. A program rewriting device configured to determine the quality of a program executed.
【請求項7】 書き換えられた記憶ブロックを照合し、
その記憶ブロックのプログラムが正常と判断された場合
にはその記憶ブロックにプログラムが正常であることを
示すフラグをセットするように構成されたことを特徴と
する請求項6に記載のプログラム書換装置。
7. The rewritten storage block is collated,
7. The program rewriting device according to claim 6, wherein when the program of the storage block is determined to be normal, a flag indicating that the program is normal is set in the storage block.
【請求項8】 記憶部に保持された書換プログラムが、
このプログラムの一括消去がなされても他のプログラム
の機能に影響を及ぼさない最小単位で構成されているこ
とを特徴とする請求項6または請求項7に記載のプログ
ラム書換装置。
8. The rewriting program stored in the storage unit,
8. The program rewriting device according to claim 6, wherein the program rewriting device is constituted by a minimum unit which does not affect functions of other programs even if the program is erased in a batch.
JP26243599A 1999-09-16 1999-09-16 On-vehicle electronic controller and program rewriting device Pending JP2001084134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26243599A JP2001084134A (en) 1999-09-16 1999-09-16 On-vehicle electronic controller and program rewriting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26243599A JP2001084134A (en) 1999-09-16 1999-09-16 On-vehicle electronic controller and program rewriting device

Publications (1)

Publication Number Publication Date
JP2001084134A true JP2001084134A (en) 2001-03-30

Family

ID=17375758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26243599A Pending JP2001084134A (en) 1999-09-16 1999-09-16 On-vehicle electronic controller and program rewriting device

Country Status (1)

Country Link
JP (1) JP2001084134A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002373083A (en) * 2001-06-14 2002-12-26 Pioneer Electronic Corp Device for reproducing information, method for correcting reproduction program, and information recording medium
JP2014044640A (en) * 2012-08-28 2014-03-13 Denso Corp Electronic controller
JP2016015020A (en) * 2014-07-02 2016-01-28 株式会社デンソー Microcomputer and security setting system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002373083A (en) * 2001-06-14 2002-12-26 Pioneer Electronic Corp Device for reproducing information, method for correcting reproduction program, and information recording medium
JP2014044640A (en) * 2012-08-28 2014-03-13 Denso Corp Electronic controller
JP2016015020A (en) * 2014-07-02 2016-01-28 株式会社デンソー Microcomputer and security setting system

Similar Documents

Publication Publication Date Title
KR100545131B1 (en) Control system
JP3626328B2 (en) Vehicle control device
KR20000023497A (en) Microcomputer provided with flash memory and method of storing program into flash memory
JPH11238005A (en) Electronic controller and control system
JP2001123874A (en) Program rewrite system or memory rewriting system for electronic control device
JP3972429B2 (en) Memory rewriting device for vehicle control
JP2003172199A (en) Program rewriting system for vehicular electronic control unit
JPH0633828A (en) On-vehicle electronic control
JP2001084134A (en) On-vehicle electronic controller and program rewriting device
JP4281808B2 (en) VEHICLE CONTROL DEVICE AND ITS CONTROL METHOD
KR19990013291A (en) Vehicle Control
JPH11175331A (en) ROM rewriting method and in-vehicle control device in vehicle LAN system
JP3296043B2 (en) Vehicle electronic control unit
JPH08178976A (en) Power breakage detector
US20190355188A1 (en) Method for authenticating a diagnostic trouble code generated by a motor vehicle system of a vehicle
JP3220005B2 (en) Fault diagnosis device
JPH10161941A (en) Flash memory rewriting device of controller for vehicle
US20020073408A1 (en) Method for writing and erasing a non-volatile memory area
JP2004142511A (en) Electronic control device for vehicle, electronic control unit, program, and recording medium
US20230177894A1 (en) Information processing apparatus and information processing method
EP2045779B1 (en) Vehicular control apparatus and program storage medium
JPH1196082A (en) Memory rewriting device for vehicle
JP2816312B2 (en) Fault diagnosis device
JP4998816B2 (en) Electronic controller program rewriting system
JPH04297350A (en) External memory control method in vehicle

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040727

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041019

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041111

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050329