JP2000181698A - Control program rewriting system - Google Patents

Control program rewriting system

Info

Publication number
JP2000181698A
JP2000181698A JP10358983A JP35898398A JP2000181698A JP 2000181698 A JP2000181698 A JP 2000181698A JP 10358983 A JP10358983 A JP 10358983A JP 35898398 A JP35898398 A JP 35898398A JP 2000181698 A JP2000181698 A JP 2000181698A
Authority
JP
Japan
Prior art keywords
rewriting
program
power supply
external device
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.)
Granted
Application number
JP10358983A
Other languages
Japanese (ja)
Other versions
JP3672755B2 (en
Inventor
Kazunari Mori
一功 森
Kazuyori Katayama
和頼 片山
Jiro Sumitani
次郎 隅谷
Mitsuru Hayakawa
満 早川
Yusuke Hara
祐輔 原
Yoshinori Ono
佳紀 大野
Shinichi Kuratani
真一 鞍谷
Kenji Hayase
憲児 早瀬
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
Mitsubishi Motors Corp
Original Assignee
Mitsubishi Electric Corp
Mitsubishi Motors 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, Mitsubishi Motors Corp filed Critical Mitsubishi Electric Corp
Priority to JP35898398A priority Critical patent/JP3672755B2/en
Publication of JP2000181698A publication Critical patent/JP2000181698A/en
Application granted granted Critical
Publication of JP3672755B2 publication Critical patent/JP3672755B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To rewrite a control program included in a flash ROM of a specific ECU (engine control unit) and also to prevent a rewriting power supply voltage from being applied to an ECU in a nonconductive state in a configuration where plural ECUs are connected onto the same communication line and onto the same writing power supply line. SOLUTION: This system is provided with plural CPU mounted electronic controllers 1 for an automobile which is respectively connected to a line 4 of the same power source and a line 3 for communication and an external device 2 which is connected to the lines 4 and 3, supplies power supply for program rewriting to each electronic controller 1 for an automobile through the line 4 and also communicates a rewriting control signal through the line 3, and the controller 1 is provided with rewriting power supply input controlling means 121 and 123 which prohibit the input of power supply for program rewriting from the device 2 when a main power supply is OFF.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、車両に搭載する
自動車用電子制御装置のフラッシュROMに記憶してい
る制御プログラムの書き換えを行う制御プログラム書換
システムに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control program rewriting system for rewriting a control program stored in a flash ROM of an electronic control unit for a vehicle mounted on a vehicle.

【0002】[0002]

【従来の技術】図5は、例えば特開平9−134307
号公報に示された従来のフラッシュROM書き換え機能
を備えた電子制御装置のメモリ書き換えシステムを示
す。図において、20はエンジン制御装置(ECU)、
40はエンジン制御装置20に備えたフラッシュROM
に対するメモリ書換装置、420は通信ライン440を
介してエンジン制御装置20とメモリ書換装置40とを
接続する接続用コネクタである。従来のメモリ書換シス
テム60はエンジン制御装置20およびメモリ書換装置
40から構成される。
2. Description of the Related Art FIG.
1 shows a conventional memory rewriting system of an electronic control device having a flash ROM rewriting function, which is disclosed in Japanese Patent Application Laid-Open Publication No. HEI 10-209, 1988. In the figure, reference numeral 20 denotes an engine control device (ECU),
40 is a flash ROM provided in the engine control device 20
A memory rewriting device 420 is a connection connector for connecting the engine control device 20 and the memory rewriting device 40 via the communication line 440. The conventional memory rewriting system 60 includes the engine control device 20 and the memory rewriting device 40.

【0003】エンジン制御装置20は、エンジンの運転
状態に応じた信号を出力する各種センサからの信号を入
力する入力装置80,入力装置80からの信号に基づき
エンジンに対する対する最適制御量を演算し、その演算
結果による制御信号を出力するCPU100、CPU1
00からの制御信号を受けて、エンジンに取り付けられ
たインジェクタやイグナイタ等のアクチュエータを駆動
する出力回路120,CPU100がエンジンを制御す
るのに必要な制御プログラムおよび制御データを格納す
るフラッシュROM140、CPU100が動作するの
に必要なプログラムを格納するROM160、CPU1
00の演算結果等を一時格納するRAM180、メモリ
書換装置40との間でシリアルデータ通信を行うための
通信装置200とを備えている。
[0003] The engine control device 20 calculates an optimum control amount for the engine based on a signal from the input device 80 and a signal from the input device 80 for inputting signals from various sensors for outputting a signal corresponding to the operation state of the engine. CPU 100, CPU 1 for outputting a control signal based on the calculation result
In response to the control signal from the CPU 00, an output circuit 120 for driving an actuator such as an injector or an igniter attached to the engine, a flash ROM 140 for storing a control program and control data necessary for the CPU 100 to control the engine, and a CPU 100 ROM 160 for storing programs required for operation, CPU 1
The RAM 180 is provided with a RAM 180 for temporarily storing the calculation result of 00 and the like, and a communication device 200 for performing serial data communication with the memory rewriting device 40.

【0004】一方、メモリ書換装置40は、エンジン制
御装置20にフラッシュROM140の書き換えを行わ
せるためのCPU220、CPU220が動作するのに
必要なプログラムを格納するROM240、CPU22
0の演算結果等を一時格納するRAM260、CPU2
20がエンジン制御装置20との間でシリアルデータ通
信を行うための通信回路280、作業者が当該メモリ書
換装置40に様々な指示入力を行うための入力装置30
0、各種メッセージを表示するための表示装置320、
エンジン制御装置20のフラッシュROM140に書き
込むために用意される新たな制御プログラム及び制御デ
ータを記憶する記憶装置340、CPU220と入力装
置300、表示装置320、記憶装置340とを接続す
るインターフェース360を備えている。
On the other hand, the memory rewriting device 40 includes a CPU 220 for causing the engine control device 20 to rewrite the flash ROM 140, a ROM 240 for storing programs necessary for the CPU 220 to operate, and a CPU 22.
RAM 260, CPU 2 for temporarily storing the operation result of 0, etc.
A communication circuit 280 for performing serial data communication with the engine control device 20; and an input device 30 for allowing an operator to input various instructions to the memory rewriting device 40
0, a display device 320 for displaying various messages,
A storage device 340 for storing a new control program and control data prepared for writing in the flash ROM 140 of the engine control device 20, an interface 360 for connecting the CPU 220 to the input device 300, the display device 320, and the storage device 340 are provided. I have.

【0005】次に動作について説明する。メモリ書換装
置40は、作業者によって記憶装置340内に用意され
た制御プログラムを通信ライン440を介してエンジン
制御装置20のフラッシュROM140に送信する前
に、その制御プログラムに適合する制御対象を示す識別
コードをエンジン制御装置20に送信する。
Next, the operation will be described. Before transmitting the control program prepared in the storage device 340 by the operator to the flash ROM 140 of the engine control device 20 via the communication line 440, the memory rewriting device 40 identifies the control target that matches the control program. The code is transmitted to the engine control device 20.

【0006】エンジン制御制御装置20のCPU100
は、メモリ書換装置40からの識別コードと自己の制御
対象を示す識別コードとが一致している場合のみ、フラ
ッシュROM140を書き換えるための書換処理を実行
する。
The CPU 100 of the engine control unit 20
Executes the rewriting process for rewriting the flash ROM 140 only when the identification code from the memory rewriting device 40 and the identification code indicating the object to be controlled by itself match.

【0007】[0007]

【発明が解決しようする課題】従来の装置は以上のよう
に構成されているため、メモリ書換装置とエンジン制御
装置は1対1のコマンドレスポンス通信を必要とし、複
数のECUが同一通信回線上に接続されている場合で
は、書換対応が困難であった。
Since the conventional device is configured as described above, the memory rewriting device and the engine control device require one-to-one command response communication, and a plurality of ECUs are connected on the same communication line. When connected, rewriting was difficult.

【0008】この発明は上記のような問題点を解消する
ためになされたもので、複数のECUが同一通信ライン
上および同一の書換電源ライン上に接続されている場合
に、特定のECUに内蔵されたフラッシュROMに格納
された制御プログラムを書換え、また、非通電状態のE
CUに書換電源電圧が印加された場合にECUに内蔵さ
れた書換制御用のCPUを保護する制御プログラム書換
システムに関するものである。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems. When a plurality of ECUs are connected to the same communication line and the same rewriting power supply line, the ECU is built in a specific ECU. Rewrites the control program stored in the flash ROM that has been
The present invention relates to a control program rewriting system for protecting a rewriting control CPU built in an ECU when a rewriting power supply voltage is applied to a CU.

【0009】[0009]

【課題を解決するための手段】請求項1の発明に係る制
御プログラム書換システムは、同一電源用ラインと通信
用ラインにそれぞれ接続されたCPU搭載型の複数の自
動車用電子制御装置と、前記電源用ラインと通信用ライ
ンに接続され電源用ラインを通して前記各自動車用電子
制御装置にプログラム書換用電源を供給し、且つ、前記
通信用ラインを通して書き換え制御信号の通信を行う外
部装置を備え、前記自動車用電子制御装置は主電源OF
F時に前記外部装置からのプログラム書換用電源の入力
を禁止する書換電源入力制御手段を備えたものである。
According to a first aspect of the present invention, there is provided a control program rewriting system, comprising: a plurality of CPU-equipped electronic control units for a vehicle connected to the same power supply line and communication line; An external device that is connected to a communication line and a communication line, supplies program renewal power to each of the vehicle electronic control devices through a power supply line, and communicates a rewrite control signal through the communication line. Electronic control unit is main power OF
A rewriting power supply input control means for prohibiting the input of the program rewriting power from the external device at the time of F is provided.

【0010】請求項2の発明に係る制御プログラム書換
システムにおける書換電源入力制御手段は、各自動車用
電子制御装置の制御動作時に前記外部装置からのプログ
ラム書換用電源の入力を禁止するものである。
The rewriting power supply input control means in the control program rewriting system according to the second aspect of the present invention prohibits the input of program rewriting power from the external device during the control operation of each vehicle electronic control unit.

【0011】請求項3の発明に係る制御プログラム書換
システムにおける外部装置は、自動車用電子制御装置に
おけるプログラム異常判定時に、自動車用電子制御装置
の書換電源入力制御手段を作動させてプログラム書換用
電源を入力させるプログラム強制書換手段を備えたもの
である。
The external device in the control program rewriting system according to the third aspect of the present invention operates the rewriting power supply input control means of the vehicle electronic control device when the program abnormality is determined in the vehicle electronic control device, thereby supplying the program rewriting power. A program forced rewriting means for inputting is provided.

【0012】請求項4の発明に係る制御プログラム書換
システムにおける自動車用電子制御装置は、通信用ライ
ンを通して外部装置より書換要求信号が入力されると、
書換条件成立時に肯定応答を外部装置に送信する信号送
信手段を備えたものである。
According to a fourth aspect of the present invention, in the control program rewriting system according to the present invention, the electronic control unit for a vehicle receives a rewrite request signal from an external device through a communication line.
A signal transmitting means for transmitting an acknowledgment to the external device when the rewriting condition is satisfied is provided.

【0013】請求項5の発明に係る制御プログラム書換
システムにおける外部装置は、書換要求信号に対する肯
定応答を所定時間経過しても受信されなかった時はプロ
グラム異常と判定し、プログラム強制書換手段を作動さ
せる異常判定手段を備えたものである。
An external device in the control program rewriting system according to the fifth aspect of the present invention determines that the program is abnormal when an acknowledgment to the rewrite request signal is not received within a predetermined time, and activates the program forced rewriting means. This is provided with an abnormality determining means for causing the abnormality to be determined.

【0014】請求項6の発明に係る制御プログラム書換
システムにおける外部装置は、自動車用電子制御装置に
送信した既存のプログラムの消去要求に対する消去終了
信号を所定時間経過しても受信されなかった時は書換不
能を表示する表示手段を備えたものである。
The external device in the control program rewriting system according to the invention of claim 6 is configured such that when an erasure end signal in response to an erasure request for an existing program transmitted to the electronic control unit for a vehicle is not received even after a predetermined time has elapsed, It is provided with display means for displaying rewriting disabled.

【0015】[0015]

【発明の実施の形態】実施の形態1.以下、この発明の
実施の形態1を図について説明する。図1は本実施の形
態に係る制御プログラム書換システムの全体構成図であ
る。図1において、1は自動車用電子制御装置(以下、
ECUと記載する。)を示し、2は外部装置であり、こ
の外部装置2はECU1のフラッシュROMに内蔵され
た制御プログラムの書換を行う際のコントロールコー
ド、書換データを送受信するための通信機能、及び、フ
ラッシュROM消去機能、書換用電源供給回路を有す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is an overall configuration diagram of a control program rewriting system according to the present embodiment. In FIG. 1, reference numeral 1 denotes an electronic control unit for a vehicle (hereinafter, referred to as an electronic control unit)
It is described as ECU. 2 is an external device. The external device 2 is a control code for rewriting a control program built in the flash ROM of the ECU 1, a communication function for transmitting and receiving rewrite data, and a flash ROM erasing. It has a function and a power supply circuit for rewriting.

【0016】ECU1は1チップCPU11を内蔵し、
このCPU11の内部には、車両制御及び外部装置2と
の通信を実行するためのプログラムを格納するフラッシ
ュROMと、フラッシュROM書換用の通信プログラム
とフラッシュROM書換実行プログラムを内蔵したブー
トROMと、制御情報、演算情報を一時的に格納するR
AMと、制御信号を入力するための入力ポートPIN
と、演算結果による制御信号を出力するための出力ポー
トPOUT、書換許可信号出力ポートPCSと、フラッ
シュROM内蔵のプログラム書換用電源の入力ポートV
P、外部装置2とECU1間で通信を実行するための受
信ポートRXおよび送信ポートTX、動作プログラムと
してフラッシュROMか内蔵ブートROMかを選択する
ための入力ポートMODEを内蔵している。
The ECU 1 has a one-chip CPU 11 built therein.
Inside the CPU 11, a flash ROM for storing a program for executing vehicle control and communication with the external device 2, a boot ROM containing a communication program for flash ROM rewriting and a flash ROM rewriting execution program, R for temporarily storing information and calculation information
AM and an input port PIN for inputting a control signal
An output port POUT for outputting a control signal based on the operation result, a rewrite enable signal output port PCS, and an input port V of a program rewrite power supply with a built-in flash ROM.
P, a reception port RX and a transmission port TX for executing communication between the external device 2 and the ECU 1, and an input port MODE for selecting a flash ROM or a built-in boot ROM as an operation program.

【0017】また、ECU1は書換電源入力回路12を
内蔵し、この書換電源入力回路12は外部装置2から供
給される書換電源の供給/遮断を制御し、CPU11内
部のブートROM内蔵プログラムを起動するための信号
を生成する。そして、書換電源入力回路12は、入力ポ
ートCSの入力論理レベルによって、ON/OFFして
CPU11に対する書換電源電圧を供給/遮断するため
のスイッチ回路121、ECU電源検出遅延出力回路1
22、CPU11からの書換許可信号とECU電源検出
遅延出力回路122の信号との論理積を行いスイッチ回
路121の制御信号を生成するANDゲート回路12
3、書換電源電圧がCPU11のVPポートに供給され
た際に、ブートROM内蔵プログラムを起動するために
一定期間のリセットパルス信号を生成するモノマルチバ
イブレータ124、書換電源電圧がCPU11のポート
VPに供給されると同時にポートMODEに信号を供給
し、モノマルチバイブレータ124の立ち上がり信号と
同期することによってCPU内部のブートROM内蔵プ
ログラムを起動するためのインターフェース回路12
5、電源回路14からのパワーオンリセット信号と、モ
ノマルチバイブレータ124からのリセット信号の論理
積出力を行い、CPU11のポートRSTに信号を供給
するためのANDゲート回路126を備えている。尚、
127は書換許可信号出力ポートPCSに接続される電
源VCCのプルアップ抵抗を示す。
Further, the ECU 1 has a built-in rewrite power supply input circuit 12, which controls the supply / interruption of the rewrite power supply supplied from the external device 2 and activates a boot ROM built-in program in the CPU 11. Generate a signal for The rewrite power supply input circuit 12 is turned on / off according to the input logic level of the input port CS to switch on / off to supply / cut off the rewrite power supply voltage to the CPU 11, and the ECU power supply detection delay output circuit 1
22, an AND gate circuit 12 that performs a logical product of a rewrite permission signal from the CPU 11 and a signal from the ECU power supply detection delay output circuit 122 to generate a control signal for the switch circuit 121
3. When the rewrite power supply voltage is supplied to the VP port of the CPU 11, a mono-multivibrator 124 that generates a reset pulse signal for a predetermined period to start the boot ROM built-in program, and the rewrite power supply voltage is supplied to the port VP of the CPU 11 At the same time, a signal is supplied to the port MODE to synchronize with the rising signal of the mono-multivibrator 124, thereby activating the boot ROM built-in program in the CPU.
5. An AND gate circuit 126 for outputting a logical product of a power-on reset signal from the power supply circuit 14 and a reset signal from the monomultivibrator 124 and supplying the signal to the port RST of the CPU 11 is provided. still,
127 denotes a pull-up resistor of the power supply VCC connected to the rewrite permission signal output port PCS.

【0018】更に、ECU1は、外部装置2とECU1
が通信を行う際の電気的信号レベルを整合させるための
通信インターフェース回路13、車両搭載のバッテリ3
0より供給される電源電圧から、ECU1を動作させる
のに必要とする定電圧を生成する電源回路14、ECU
1が制御を行う際に入力情報として各種センサ、スイッ
チ情報から得られる電気的信号をCPUの入力信号レベ
ルに変換するための制御入力インターフェース回路1
5、ECU1が制御の演算結果である各種アクチュエー
タを駆動するための出力信号を、アクチュエータ駆動信
号レベルに変換するための制御出力インターフェース回
路16を備えている。
Further, the ECU 1 comprises the external device 2 and the ECU 1
A communication interface circuit 13 for matching an electric signal level when communication is performed, a battery 3 mounted on a vehicle
A power supply circuit 14 for generating a constant voltage necessary for operating the ECU 1 from a power supply voltage supplied from the ECU 0;
1 is a control input interface circuit 1 for converting an electrical signal obtained from various sensor and switch information as input information into an input signal level of the CPU when performing control.
5. The ECU 1 includes a control output interface circuit 16 for converting an output signal for driving various actuators, which is a calculation result of the control, into an actuator drive signal level.

【0019】外部装置2はCPU21を内蔵しており、
このCPU21内部には、ECU1に内蔵されたCPU
11のフラッシュROM書換対応に必要な通信プログラ
ムを記憶したROMおよび制御情報、演算情報を一時的
に記憶するRAMを内蔵すると共に、書換電源供給回路
23の制御を行う出力ポート、外部スイッチ信号入力ポ
ート、外部装置2とECU1間で通信を実行するための
受信ポートRXおよび送信ポートTX、書換対象フラッ
シュROMに転送するプログラムを記憶したROM24
との接続ポートAX.DXを内蔵する。
The external device 2 has a built-in CPU 21.
The CPU 21 includes a CPU built in the ECU 1.
11, an output port for controlling the rewrite power supply circuit 23, an external port for inputting an external switch signal, a ROM for storing a communication program necessary for flash ROM rewriting, and a RAM for temporarily storing control information and operation information. , A reception port RX and a transmission port TX for executing communication between the external device 2 and the ECU 1, and a ROM 24 storing a program to be transferred to a flash ROM to be rewritten.
Connection port AX. Built-in DX.

【0020】また、外部装置2は、外部装置2とECU
1が通信を行う際の電気的信号レベルを整合するための
通信インターフェース回路22、CPU21によって出
力が制御されてECU1内部のCPU11に供給する書
換電源供給回路23、ECU1内部のCPU11に内蔵
されたフラッシュROMに書き込まれるプログラムコー
ドを内蔵したROM24を備えている。
The external device 2 comprises an external device 2 and an ECU.
1 is a communication interface circuit 22 for matching an electric signal level when performing communication, a rewriting power supply circuit 23 whose output is controlled by the CPU 21 and is supplied to the CPU 11 inside the ECU 1, and a flash built in the CPU 11 inside the ECU 1 A ROM 24 having a program code stored in the ROM is provided.

【0021】尚、CPU21に設けられた外部スイッチ
25a、25bは外部装置の書換動作を許可するための
外部スイッチを示し、具体的には外部スイッチ25aは
標準書換開始用であり、外部スイッチ25bは強制書換
開始用である。強制書換は、ECU1内部CPU11の
プログラムが異常な状態にある場合に強制的に書換を実
行する際に使用する。
The external switches 25a and 25b provided in the CPU 21 are external switches for permitting a rewriting operation of the external device. Specifically, the external switch 25a is for starting standard rewriting, and the external switch 25b is This is for starting forced rewriting. The forced rewriting is used when forcibly executing rewriting when the program of the CPU 11 in the ECU 1 is in an abnormal state.

【0022】また、CPU21に設けられたパイロット
ランプ26a、26bは書換終了結果を示すパイロット
ランプであり、具体的にはパイロットランプ26aは書
換正常終了時に点灯し、パイロットランプ26bは書換
不可能時に点灯する。外部装置2に内蔵された電源回路
27は車両に搭載されたバッテリ30から電圧を供給さ
れ、外部装置2を動作させるのに必要な定電圧を生成す
る。
The pilot lamps 26a and 26b provided in the CPU 21 are pilot lamps indicating the end of rewriting. Specifically, the pilot lamp 26a is turned on when the rewriting is normally completed, and the pilot lamp 26b is turned on when rewriting is impossible. I do. The power supply circuit 27 incorporated in the external device 2 is supplied with a voltage from a battery 30 mounted on the vehicle, and generates a constant voltage necessary for operating the external device 2.

【0023】接続用コネクタ10を通して外部装置2と
ECU1間に接続されたラインは外部装置2とECU1
間で通信インターフェース回路22,13を通して通信
を行うための通信ライン3を示し、同じく接続用コネク
タ10を通して外部装置2とECU1間に接続されたラ
インは外部装置2の書換電源供給回路23よりECU1
内部の書き換え電源入力回路12を通してCPU11に
書換電源を供給するための電源ライン4を示す。
The line connected between the external device 2 and the ECU 1 through the connection connector 10 is connected to the external device 2 and the ECU 1
A communication line 3 for performing communication through the communication interface circuits 22 and 13 between the external device 2 and the ECU 1 through the connection connector 10 is connected to the ECU 1 by the rewriting power supply circuit 23 of the external device 2.
A power supply line 4 for supplying rewrite power to the CPU 11 through an internal rewrite power supply input circuit 12 is shown.

【0024】外部装置2より接続用コネクタ10を通し
てECU1側に引き出されたライン8は外部装置2を動
作させるためにバッテリ30より外部装置2に内蔵され
た電源回路27の電源入力端子に電源を供給する電源ラ
イン8である。この電源ライン8は負側が接地されたバ
ッテリ30の正側に接続され、正側はIG(イグニッシ
ョン)スイッチ5を通し、電源ライン6によりECU1
に内蔵された電源回路14の電源入力端子に接続され
る。
A line 8 drawn from the external device 2 to the ECU 1 through the connection connector 10 supplies power from a battery 30 to a power input terminal of a power supply circuit 27 built in the external device 2 to operate the external device 2. Power supply line 8. The power supply line 8 is connected to the positive side of a battery 30 whose negative side is grounded, the positive side passes through an IG (ignition) switch 5, and the power supply line 6
Is connected to a power supply input terminal of a power supply circuit 14 incorporated in the power supply circuit.

【0025】IGスイッチ5はECU1に電源を供給/
遮断するために使用するスイッチを示し、IGスイッチ
5がONの時のみECU1は制御動作可能となる。7は
ECU1のGNDラインを示す。9は外部装置2のGN
Dラインを示す。外部装置2のGNDライン9は、EC
U1のGNDライン7と同一電位にある。
The IG switch 5 supplies power to the ECU 1 /
A switch used to cut off is shown, and the ECU 1 can perform a control operation only when the IG switch 5 is ON. Reference numeral 7 denotes a GND line of the ECU 1. 9 is the GN of the external device 2
The D line is shown. The GND line 9 of the external device 2 is connected to the EC
It is at the same potential as the GND line 7 of U1.

【0026】次に本実施の形態の動作の詳細説明を図1
〜3を用いて説明する。図2はCUP11に内蔵された
フラッシュROM11の内蔵プログラムの書換を実行す
る際の手順を示し、図3は書換実行時の時系列図を示
す。
Next, the operation of the present embodiment will be described in detail with reference to FIG.
This will be described with reference to FIGS. FIG. 2 shows a procedure for executing rewriting of a built-in program in the flash ROM 11 built in the CUP 11, and FIG. 3 shows a time-series diagram at the time of executing rewriting.

【0027】初めに、ECU1の動作について説明す
る。図3において、先ず、IGスイッチ5をONすると
電源回路14が起動し、バッテリ電圧をECU1内部回
路の動作に必要な安定化電圧に変換し、安定化電圧をV
CC出力端子から出力する。
First, the operation of the ECU 1 will be described. In FIG. 3, first, when the IG switch 5 is turned on, the power supply circuit 14 is activated, converts the battery voltage into a stabilized voltage necessary for the operation of the internal circuit of the ECU 1, and converts the stabilized voltage to V
Output from CC output terminal.

【0028】その後、期間T1後に電源回路14のポー
トRSTから論理1信号を出力し、またモノマルチバイ
ブレータ124のポートRSTOからも同じく論理1信
号を出力することにより、ゲート126の出力信号が論
理0から論理1に変化し、CPU11のポートRSTの
入力信号が論理0から論理1に変化することによって、
CPU11内部のフラッシュROM内蔵プログラムが起
動する。
Thereafter, after a period T1, a logical 1 signal is output from the port RST of the power supply circuit 14, and a logical 1 signal is also output from the port RSTO of the mono-multivibrator 124, so that the output signal of the gate 126 becomes logical 0. From the logic 0 to the logic 1 and the input signal of the port RST of the CPU 11 changes from the logic 0 to the logic 1.
The flash ROM built-in program in the CPU 11 starts.

【0029】CPU11の書換許可信号出力用のポート
PCSには、電源VCCに接続されたプルアップ抵抗1
27により、論理1の信号が供給されているため、プロ
グラム動作によってポートPCSより論理0出力を行う
までは、論理1の信号がゲート123のポートAに供給
される。
A port PCS for outputting a rewrite enable signal of the CPU 11 has a pull-up resistor 1 connected to a power supply VCC.
Since the signal of logic 1 is supplied by 27, the signal of logic 1 is supplied to the port A of the gate 123 until the logic 0 is output from the port PCS by the program operation.

【0030】もしも、プログラムが異常状態となった場
合では、期間T3後に電源検出遅延出力回路122から
の出力が論理1となるため、ゲート123の論理積結果
出力Cが1となり、スイッチ回路121のCS入力が論
理1となることによって、スイッチ回路121の内部ス
イッチがONとなり、ECU1内部で、書換電源の通電
許可状態となる。従って、CPU11内部プログラムが
異常状態であってもフラッシュROM内蔵プログラムの
書換が実行可能となる。
If the program is in an abnormal state, the output from the power supply detection delay output circuit 122 becomes logic 1 after the period T3, so that the logical product result output C of the gate 123 becomes 1 and the output of the switch circuit 121 becomes When the CS input becomes logic 1, the internal switch of the switch circuit 121 is turned on, and the rewriting power supply is permitted to be energized inside the ECU 1. Therefore, even if the internal program of the CPU 11 is in an abnormal state, it is possible to rewrite the flash ROM built-in program.

【0031】図2のステップS51においてCPU11
内蔵プログラムが正常かどうかを判定し、正常であれ
ば、ステップS52に移行する。ステップS52では制
御を実行する上で必要なCPU11内部レジスタ類、R
AMデータの初期設定を実行する。
In step S51 of FIG.
It is determined whether the built-in program is normal. If the program is normal, the process proceeds to step S52. In step S52, the CPU 11 internal registers required for executing the control, R
Perform initial setting of AM data.

【0032】次に、ステップS53においてCPU11
の書換許可信号出力用のポートPCSから論理0の出力
を行うが、ステップS53は図3のT2期間後の出力状
態を示しており、期間T3以後に電源検出遅延出力回路
122から論理1の出力がゲート123のポートBに供
給されるが、既にポートAには論理0の信号が供給され
ているため、ゲート123の論理積出力結果Cが0とな
り、スイッチ回路121のCS入力が論理0となること
によって、スイッチ回路121内部スイッチがOFFと
なり、ECU1内部で、書換電源の通電を禁止する状態
となる。
Next, in step S53, the CPU 11
A logic 0 is output from the port PCS for outputting the rewrite enable signal of step S53, and step S53 shows an output state after the period T2 in FIG. 3, and the output of the logic 1 from the power supply detection delay output circuit 122 after the period T3. Is supplied to the port B of the gate 123, but since a signal of logic 0 is already supplied to the port A, the logical product output result C of the gate 123 becomes 0, and the CS input of the switch circuit 121 becomes As a result, the internal switch of the switch circuit 121 is turned off, and the ECU 1 enters a state in which the supply of the rewrite power is prohibited.

【0033】従って、今後、通信手段を使用してECU
1に書換要求信号が送られてくるまでは書換禁止状態と
なり、誤ってECU1内部のフラッシュROM内蔵プロ
グラムを書き換えられることを防止する。
Therefore, in the future, the ECU will be
Until the rewrite request signal is sent to the ECU 1, the rewrite prohibition state is set to prevent the flash ROM built-in program in the ECU 1 from being rewritten by mistake.

【0034】次に、ステップS54において制御を実行
する上で必要な入力情報をCPU11内部ポートPIN
から取り込み、内蔵RAMに記憶する。次に、ステップ
S55において内蔵RAMに記憶された入力情報をベー
スにして、制御を実現するための各種演算処理を実行す
る。次に、ステップS56において、ステップS55で
得られた各種演算結果をCPU11内部ポートPOUT
に出力する。次に、ステップS57において、通信手段
を用いて外部装置2からのフラッシュROM内蔵プログ
ラム書換要求を受信したかどうかを判定し、書換要求が
なければステップS53にもどり、上述のステップS5
3からS56を繰り返し実行し、書換要求があれば、ス
テップS58に移行する。次に、ステップS58におい
て、書換要求に対する肯定応答を外部装置2に通信手段
を用いて返信する。次に、ステップS59において、制
御停止処理を実行し、フラッシュROMに内蔵されたプ
ログラムの書換待ち状態とする。次に、ステップS60
において、CPU11の書換許可信号出力用のポートP
CSから論理1の出力を行い、電源検出遅延出力回路1
22からの出力は論理1であることから、ゲート123
の論理積結果出力Cが1となり、スイッチ回路121の
CS入力が論理1となることによって、スイッチ回路1
21内部スイッチがONとなり、ECU1内部で、書換
電源の通電許可状態となる。
Next, in step S54, input information necessary for executing the control is input to the CPU 11 internal port PIN.
And store it in the built-in RAM. Next, in step S55, various arithmetic processes for realizing control are executed based on the input information stored in the built-in RAM. Next, in step S56, the various calculation results obtained in step S55 are
Output to Next, in step S57, it is determined whether or not a request for rewriting the program with a built-in flash ROM from the external device 2 has been received by using the communication means.
Steps S56 to S56 are repeated, and if there is a rewrite request, the process proceeds to step S58. Next, in step S58, an acknowledgment of the rewrite request is returned to the external device 2 using the communication unit. Next, in step S59, a control stop process is executed to wait for rewriting of a program stored in the flash ROM. Next, step S60
, A port P for outputting a rewrite permission signal of the CPU 11
The logic 1 is output from CS and the power supply detection delay output circuit 1
Since the output from 22 is a logical one, the gate 123
Becomes logical 1 and the CS input of the switch circuit 121 becomes logical 1, so that the switch circuit 1
The internal switch 21 is turned on, and the rewriting power supply is permitted to be energized inside the ECU 1.

【0035】次に、ステップS61においてCPU11
内部のブートROMに記憶されたプログラム(以後、ブ
ートプログラムと称する)の起動待ち状態となる。ブー
トプログラムの起動は、CPU11のポートMODEの
入力論理が論理1、すなわち、外部装置2からの書換電
源が供給された状態で、ポートRSTの入力論理が0か
ら1に変化した場合に起動される。スイッチ回路121
の内部スイッチがON状態において、外部装置2から書
換電源が供給されるとCPU11のポートMODE、V
P共に論理1となると同時にモノマルチバイブレータ1
24にも論理1の信号が供給され、モノマルチバイブレ
ータ124から論理1→論理0→論理1の変化を示す一
過性のパルス信号を出力し、CPU11のポートRST
に本パルス信号が供給される。従って、本手順によっ
て、CPU11内部のブートプログラムが起動されるこ
とになる。
Next, in step S61, the CPU 11
The program (hereinafter referred to as a boot program) stored in the internal boot ROM is in a state of waiting for activation. The boot program is started when the input logic of the port MODE of the CPU 11 is logic 1, that is, when the input logic of the port RST changes from 0 to 1 while the rewrite power is supplied from the external device 2. . Switch circuit 121
When the rewrite power is supplied from the external device 2 in the ON state of the internal switch, the ports MODE, V
At the same time as P becomes logic 1, mono multivibrator 1
24 is also supplied with a signal of logic 1, and a monopulse pulse signal indicating a change of logic 1 → logic 0 → logic 1 is output from the monomultivibrator 124, and the port RST of the CPU 11
Is supplied with this pulse signal. Therefore, the boot program in the CPU 11 is started by this procedure.

【0036】次に、ステップS63においてフラッシュ
ROM内蔵プログラムの消去要求待ち状態となり、通信
手段を用いて消去要求を受信すると、ステップS64に
移行する。次に、ステップS64においてフラッシュR
OM内蔵プログラムの消去をCPU11内部ブートプロ
グラムが実行する。プログラムの消去、書換の電源はポ
ートVPから供給される書換電源を使用する。本CPU
11内部のブートプログラムはフラッシュROM内部に
は格納されていないため、消去の実行によって損壊する
ことはない。次に、ステップS65において、フラッシ
ュROMの全プログラム領域が消去されたかを判定す
る。消去が完了していれば、ステップS66に移行す
る。次に、ステップS66においてフラッシュROM内
蔵プログラムの消去が終了したことを、通信手段を用い
て書換装置である外部装置2に返信する。
Next, in step S63, the flash ROM built-in program waits for an erasure request. When an erasure request is received using the communication means, the process proceeds to step S64. Next, in step S64, the flash R
The internal boot program of the CPU 11 executes the deletion of the OM built-in program. As the power for erasing and rewriting the program, rewriting power supplied from the port VP is used. This CPU
Since the boot program inside the flash ROM 11 is not stored in the flash ROM, the boot program is not damaged by erasing. Next, in step S65, it is determined whether the entire program area of the flash ROM has been erased. If the erasure has been completed, the process moves to step S66. Next, in step S66, the fact that the erasure of the program with built-in flash ROM has been completed is returned to the external device 2, which is a rewriting device, using communication means.

【0037】次に、ステップS67においてフラッシュ
ROM内部にプログラムの書き込みを実行する。書換デ
ータは、通信手段によって書換装置から送信されてくる
データを受信し、順次書き込み実施する。ステップS6
8において、フラッシュROMの書換用データ受信が終
了したかどうかを判定し、終了していなければ、再びス
テップS67を実行する。ステップS68において、書
換終了信号を受信すると、ステップS69に移行する。
次に、ステップS69において書換終了信号に対する応
答を送信し、ステップS70に移行する。ステップS7
0ではフラッシュROM内蔵プログラムの再起動を待つ
ために、リセット入力待ち状態となる。リセット入力が
実行されると、再びステップS50に戻る。
Next, in step S67, a program is written in the flash ROM. As the rewrite data, the data transmitted from the rewrite device by the communication means is received and sequentially written. Step S6
At 8, it is determined whether or not the reception of the rewrite data in the flash ROM has been completed, and if not, the step S67 is executed again. In step S68, when the rewrite end signal is received, the process proceeds to step S69.
Next, a response to the rewrite end signal is transmitted in step S69, and the process proceeds to step S70. Step S7
At 0, a reset input wait state is set in order to wait for the restart of the flash ROM built-in program. When the reset input is executed, the process returns to step S50.

【0038】引き続き、外部装置2の動作について説明
する。外部装置2が起動後、ステップS1において、標
準書換実行を行うため、スイッチ25aをONし、ON
信号を外部装置2内部のCPU21が認識すると、ステ
ップS2において、フラッシュROM書換要求信号を通
信手段を用いてECU1に送信する。
Next, the operation of the external device 2 will be described. After the external device 2 is started, in step S1, the switch 25a is turned on to perform standard rewriting, and the switch 25a is turned on.
When the signal is recognized by the CPU 21 inside the external device 2, in step S2, a flash ROM rewrite request signal is transmitted to the ECU 1 using communication means.

【0039】次に、ステップS3において、フラッシュ
ROM書換要求信号に対するECU1からの肯定応答待
ちの状態となる。肯定応答を受信した場合は、ステップ
S4に移行し、CPU21のポートPOUTに論理1の
出力を行い、ECU1に対する書換電源出力をONす
る。
Next, in step S3, a state of waiting for an affirmative response from the ECU 1 to the flash ROM rewrite request signal is entered. If an affirmative response is received, the process proceeds to step S4, where a logic 1 is output to the port POUT of the CPU 21, and the rewrite power output to the ECU 1 is turned on.

【0040】ステップS3にて、肯定応答を受信しない
場合には、ステップS12にて受信待ちの時間切れを判
断し、時間切れでなければ、ステップS3に戻る。時間
切れであればステップS13に移行し、ステップS13
にて書換不可能表示をパイロットランプ26bに表示出
力する。
If no acknowledgment is received in step S3, it is determined in step S12 whether the reception waiting time has expired. If not, the process returns to step S3. If the time has expired, the process proceeds to step S13, and step S13
To output a rewrite impossible display to the pilot lamp 26b.

【0041】ステップS14にて強制書換実行を行うた
め、スイッチ25bをONし、ON信号を外部装置2内
部のCPU21が認識すると、ステップS15に移行
し、CPU21のポートPOUTに論理1の出力を行
い、ECU1に対する書換電源出力をONする。次に、
CPU21のポートPOUTからの論理1出力の後にス
テップS5において、通信手段を用いてフラッシュRO
M内蔵プログラムの消去要求をECU1に送信する。次
に、ステップS6において、ECU1からフラッシュR
OM内蔵プログラムの消去終了応答の受信待ちを行い、
消去終了応答を受信すると、ステップS7に移行し、受
信していない場合にはステップS16に移行する。ステ
ップS16にて受信待ちの時間切れを判断し、時間切れ
でなければ、ステップS6に戻る。時間切れであればス
テップS17に移行し、ステップS17にて書換不可能
表示をパイロットランプ26bに表示出力する。
In order to execute the forced rewriting in step S14, the switch 25b is turned on, and when the CPU 21 in the external device 2 recognizes the ON signal, the process shifts to step S15 to output the logic 1 to the port POUT of the CPU 21. The rewrite power output to the ECU 1 is turned ON. next,
After outputting a logical 1 from the port POUT of the CPU 21, in step S5, the flash RO
A request to delete the M built-in program is transmitted to the ECU 1. Next, in step S6, the flash R
Waits for the erasing completion response of the OM built-in program,
If an erasure end response is received, the process proceeds to step S7, and if not, the process proceeds to step S16. It is determined in step S16 whether the reception waiting time has expired, and if not, the process returns to step S6. If the time has expired, the flow shifts to step S17, and in step S17, a rewrite impossible display is displayed on the pilot lamp 26b.

【0042】次に、ステップS7において、フラッシュ
ROM内蔵用プログラムデータを通信手段を用いて送信
し、ステップS8にてデータ送信が全て終了したかどう
かを判断し、終了していなければステップS7に戻り、
次のプログラムデータを送信する。データ送信が全て終
了した場合には、ステップS9に移行する。次に、ステ
ップS9において、フラッシュROM内蔵用プログラム
の書換終了信号を通信手段を用いてECU1へ送信す
る。次に、ステップS10において、外部装置2の書換
終了信号に対するECU1からの書換終了応答受信待ち
となり、書換応答を受信するとステップS11に移行す
る。ステップS11において、書換終了表示をパイロッ
トランプ26aに表示出力する。
Next, in step S7, the flash ROM built-in program data is transmitted using the communication means. In step S8, it is determined whether or not all the data transmission has been completed. If not, the process returns to step S7. ,
Send the next program data. If all data transmissions have been completed, the process moves to step S9. Next, in step S9, a rewriting end signal for the flash ROM built-in program is transmitted to the ECU 1 using the communication means. Next, in step S10, the process waits for a rewrite end response from the ECU 1 in response to the rewrite end signal from the external device 2, and upon receiving a rewrite response, the process proceeds to step S11. In step S11, a rewriting completion display is displayed on the pilot lamp 26a.

【0043】実施の形態2.尚、上記実施の形態1にお
いて、ECU1は電源電圧検出遅延出力回路122の遅
延出力と書換許可信号との論理積を用いてスイッチ回路
121のON/OFFを行っていたが、スイッチ回路1
21のON/OFF制御をCPU11と別の内蔵CPU
の制御で行うことにより、実施の形態1と同等の効果を
得ると共に回路構成を簡易化することができる。
Embodiment 2 In the first embodiment, the ECU 1 turns ON / OFF the switch circuit 121 using the logical product of the delay output of the power supply voltage detection delay output circuit 122 and the rewrite permission signal.
ON / OFF control of CPU 21 and built-in CPU separate from CPU 11
By performing the above control, the same effect as in the first embodiment can be obtained, and the circuit configuration can be simplified.

【0044】以下、本実施の形態を図4について、実施
の形態1からの変更点を説明する。図において、130
は実施の形態1における電源検出遅延出力回路122、
ゲート123、モノマルチバイブレータ124の機能を
包括したCPU130である。
Hereinafter, the present embodiment will be described with reference to FIG. In the figure, 130
Is the power supply detection delay output circuit 122 in the first embodiment,
The CPU 130 includes functions of the gate 123 and the mono multivibrator 124.

【0045】次に、本実施の形態の動作の詳細について
説明する。ECU1内部の電源VCCが立ち上がり後、
CPU130はポートRSTOから論理1の信号を出力
する。図3の期間T3を超えてもポートCSIの入力信
号が論理1を継続した場合、CPU130はCPU11
が異常状態と判断し、ポートCSOに論理1の信号を出
力し、スイッチ回路121のポートCSの入力論理が論
理1となることにより、スイッチ回路121内部のスイ
ッチをON状態とする。
Next, the operation of this embodiment will be described in detail. After the power supply VCC inside the ECU 1 rises,
The CPU 130 outputs a logical 1 signal from the port RSTO. If the input signal of the port CSI continues to be logic 1 even after the period T3 in FIG.
Is determined to be in an abnormal state, a signal of logic 1 is output to the port CSO, and the input logic of the port CS of the switch circuit 121 becomes logic 1, so that the switch inside the switch circuit 121 is turned on.

【0046】従って、外部装置2から書換電源電圧をE
CU1内部のCPU11に供給可能となる。次に外部装
置2から書換電源電圧が供給され、インターフェース回
路125からの出力信号が論理1となると、CPU13
0のポートVPDへ論理1の信号が供給され、本信号の
検出と同時にCPU130はポートRSTOに一定期間
のパルス信号すなわち、論理1→論理0→論理1を出力
し、CPU11の内部動作プログラムをブートプログラ
ムに切り換える。
Accordingly, the external device 2 changes the rewrite power supply voltage to E.
It can be supplied to the CPU 11 inside the CU 1. Next, when a rewrite power supply voltage is supplied from the external device 2 and an output signal from the interface circuit 125 becomes logic 1, the CPU 13
A logic 1 signal is supplied to the port VPD of 0, and upon detection of this signal, the CPU 130 outputs a pulse signal for a certain period, that is, logic 1 → logic 0 → logic 1 to the port RSTO, and boots up the internal operation program of the CPU 11. Switch to program.

【0047】以下、書換動作については、図2のステッ
プS63以降と同じである。CPU11が正常動作を行
っている場合においては、図3の期間T2後、CPU1
1のポートPCSから論理0の信号を出力し、CPU1
30のポートCSIの入力信号が論理0となることによ
ってCPU130は、ポートCSOに論理0の信号を出
力する。スイッチ回路121のポートCSには論理0の
信号が入力されるため、スイッチ回路121内部のスイ
ッチはOFF状態となり、外部装置2からの書換電源電
圧はCPU11に供給されない。
The rewriting operation is the same as that after step S63 in FIG. When the CPU 11 is performing a normal operation, after the period T2 in FIG.
1 outputs a logic 0 signal from the port PCS 1
The CPU 130 outputs a logical 0 signal to the port CSO when the input signal of the 30 port CSI becomes logical 0. Since a logic 0 signal is input to the port CS of the switch circuit 121, the switch inside the switch circuit 121 is turned off, and the rewrite power supply voltage from the external device 2 is not supplied to the CPU 11.

【0048】CPU11のポートPCSから論理1の信
号が出力されると、CPU130のポートCSIに論理
0の信号が供給され、CPU130はポートCSOに論
理1の信号を出力し、スイッチ回路121のポートCS
の入力論理が論理1となることにより、スイッチ回路1
21内部のスイッチをON状態とする。
When a logical 1 signal is output from the port PCS of the CPU 11, a logical 0 signal is supplied to the port CSI of the CPU 130, the CPU 130 outputs a logical 1 signal to the port CSO, and the port CS
Of the switch circuit 1
The switch inside 21 is turned on.

【0049】従って、外部装置2から書換電源電圧をE
CU1内部のCPU11に供給可能となる。次に外部装
置2から書換電源電圧が供給され、インターフェース回
路125からの出力信号が論理1となると、CPU13
0のポートVPDへ論理1の信号が供給され、本信号の
検出と同時にCPU130はポートRSTOに一定期間
のパルス信号すなわち、論理1→論理0→論理1を出力
し、CPU11の内部動作プログラムをブートプログラ
ムに切り換える。以下、書換動作については、図2のス
テップS63以降と同じである。
Therefore, the external device 2 changes the rewrite power supply voltage to E.
It can be supplied to the CPU 11 inside the CU 1. Next, when a rewrite power supply voltage is supplied from the external device 2 and an output signal from the interface circuit 125 becomes logic 1, the CPU 13
A logic 1 signal is supplied to the port VPD of 0, and upon detection of this signal, the CPU 130 outputs a pulse signal for a certain period, that is, logic 1 → logic 0 → logic 1 to the port RSTO, and boots up the internal operation program of the CPU 11. Switch to program. Hereinafter, the rewriting operation is the same as that after step S63 in FIG.

【0050】実施の形態3.尚、上記各実施の形態で
は、フラッシュROM内蔵プログラムの書換に書換電源
を外部から供給することを必要としたが、書換電源用の
別電源を必要としないCPUについては実施の形態1の
CPU11のポートVPへの接続ラインを削除するだけ
で上記実施例と同等の効果を得ることが可能である。
Embodiment 3 In each of the above-described embodiments, a rewrite power supply was required to be externally supplied to rewrite a program with a built-in flash ROM. However, a CPU that does not require a separate power supply for the rewrite power supply is the same as the CPU 11 of the first embodiment. An effect equivalent to that of the above embodiment can be obtained only by deleting the connection line to the port VP.

【0051】[0051]

【発明の効果】請求項1の発明によれば、同一電源用ラ
インと通信用ラインにそれぞれ接続されたCPU搭載型
の複数の自動車用電子制御装置と、前記電源用ラインと
通信用ラインに接続され電源用ラインを通して前記各自
動車用電子制御装置にプログラム書換用電源を供給し、
且つ、前記通信用ラインを通して書き換え制御信号の通
信を行う外部装置を備え、前記自動車用電子制御装置は
主電源OFF時に前記外部装置からのプログラム書換用
電源の入力を禁止する書換電源入力制御手段を備えたの
で、非通電状態の自動車用電子制御装置に書換用電源電
圧が外部装置より送られた場合でもCPUを保護するこ
とができるという効果がある。
According to the first aspect of the present invention, a plurality of CPU-equipped electronic control units for automobiles connected to the same power supply line and communication line, respectively, are connected to the power supply line and the communication line. And supplying a power supply for rewriting the program to each of the vehicle electronic control devices through a power supply line,
The vehicle electronic control device further includes an external device that communicates a rewrite control signal through the communication line, and the vehicle electronic control device includes a rewrite power input control unit that prohibits input of a program rewrite power from the external device when main power is turned off. With this configuration, the CPU can be protected even when the power supply voltage for rewriting is sent from an external device to the electronic control unit for a vehicle in a non-energized state.

【0052】請求項2の発明によれば、書換電源入力制
御手段は各自動車用電子制御装置の制御動作時に前記外
部装置からのプログラム書換用電源の入力を禁止するよ
うにしたので、制御プログラムの保護を計ることができ
るという効果がある。
According to the second aspect of the present invention, the rewriting power supply input control means inhibits the input of the program rewriting power supply from the external device during the control operation of each vehicle electronic control device. The effect is that protection can be measured.

【0053】請求項3の発明によれば、外部装置は自動
車用電子制御装置におけるプログラム異常判定時に、自
動車用電子制御装置の書換電源入力制御手段を作動させ
てプログラム書換用電源の入力させるプログラム強制書
換手段を備えたので、異常プログラムにより制御動作が
暴走することを阻止できるという効果がある。
According to the third aspect of the present invention, the external device activates the rewriting power supply input control means of the electronic control unit for the vehicle and inputs the power supply for rewriting the program when the abnormality is determined in the electronic control unit for the vehicle. Since the rewriting means is provided, it is possible to prevent the control operation from running away due to the abnormal program.

【0054】請求項4の発明によれば、自動車用電子制
御装置は通信用ラインを通して外部装置より書換要求信
号が入力されると、書換条件成立時に肯定応答を外部装
置に送信する信号送信手段を備えたので、不用意に書換
電源電圧が印加されることがなく制御プログラムの保護
を計ることができるという効果がある。
According to the fourth aspect of the present invention, when a rewrite request signal is input from an external device through a communication line, the electronic control unit for a vehicle transmits signal transmission means for transmitting an acknowledgment to the external device when the rewrite condition is satisfied. With this arrangement, there is an effect that the control program can be protected without applying the rewrite power supply voltage carelessly.

【0055】請求項5の発明によれば、外部装置は書換
要求信号に対する肯定応答を所定時間経過しても受信さ
れなかった時はプログラム異常と判定し、プログラム強
制書換手段を作動させる異常判定手段を備えたので、自
動車用電子制御装置は特にプログラム異常を監視する必
要がないためソフトウェアの負担を軽減できるという効
果がある。
According to the fifth aspect of the present invention, when the external device does not receive an acknowledgment for the rewrite request signal within a predetermined time, it determines that the program is abnormal, and activates the program forced rewrite device. Therefore, the electronic control unit for a vehicle does not need to monitor a program abnormality in particular, so that there is an effect that the load on software can be reduced.

【0056】請求項6の発明によれば、外部装置は自動
車用電子制御装置に送信した既存のプログラムの消去要
求に対する消去終了信号を所定時間経過しても受信され
なかった時は書換不能を表示する表示手段を備えたの
で、ユーザにとっての使い勝手が向上するという効果が
ある。
According to the sixth aspect of the present invention, when the external device does not receive an erasure end signal in response to the erasure request of the existing program transmitted to the electronic control unit for a vehicle even after a predetermined time has elapsed, it indicates that rewriting is impossible. Since the display means is provided, the usability for the user is improved.

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

【図1】 この発明の実施の形態1による外部装置とE
CU間の通信ライン接続状況と、ECU内部回路のブロ
ック図を示す。
FIG. 1 shows an external device and an external device according to a first embodiment of the present invention.
FIG. 3 shows a connection state of communication lines between CUs and a block diagram of an ECU internal circuit.

【図2】 この発明の実施の形態によるECU内部のフ
ラッシュROM内蔵プログラムの書換手順であるフロー
チャートを示す。
FIG. 2 is a flowchart showing a procedure for rewriting a flash ROM built-in program in the ECU according to the embodiment of the present invention;

【図3】 この発明の実施の形態によるECU内部のフ
ラッシュROM内蔵プログラムの書換手順の時系列図を
示す。
FIG. 3 is a time series diagram of a procedure for rewriting a flash ROM built-in program in the ECU according to the embodiment of the present invention.

【図4】 この発明の他の実施の形態による外部装置と
ECU間の通信ライン接続状況と、ECU内部回路のブ
ロック図を示す。
FIG. 4 shows a connection state of a communication line between an external device and an ECU according to another embodiment of the present invention, and a block diagram of an ECU internal circuit.

【図5】 従来のメモリ書換装置とECU間の通信ライ
ン接続状況と、ECU内部回路ブロック図を示す。
FIG. 5 shows a connection state of a communication line between a conventional memory rewriting device and an ECU, and a block diagram of an ECU internal circuit.

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

1 ECU、2 外部装置、3 通信ライン、4 書換
電源ライン、5 IGスイッチ、6,8 電源ライン、
11,21,130 CPU、12 書換電源入力回
路、13,22 通信インターフェース回路、23 書
換電源供給回路、26a,26b パイロットランプ、
121 スイッチ回路、122 電源検出遅延出力回
路。
1 ECU, 2 external device, 3 communication line, 4 rewriting power line, 5 IG switch, 6, 8 power line,
11, 21, 130 CPU, 12 rewriting power input circuit, 13, 22 communication interface circuit, 23 rewriting power supply circuit, 26a, 26b pilot lamp,
121 switch circuit, 122 power supply detection delay output circuit.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 片山 和頼 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 (72)発明者 隅谷 次郎 東京都千代田区丸の内二丁目2番3号 三 菱電機株式会社内 (72)発明者 早川 満 兵庫県神戸市兵庫区浜山通6丁目1番2号 三菱電機コントロールソフトウエア株式 会社内 (72)発明者 原 祐輔 東京都港区芝五丁目33番8号 三菱自動車 工業株式会社内 (72)発明者 大野 佳紀 東京都港区芝五丁目33番8号 三菱自動車 工業株式会社内 (72)発明者 鞍谷 真一 東京都港区芝五丁目33番8号 三菱自動車 工業株式会社内 (72)発明者 早瀬 憲児 東京都港区芝五丁目33番8号 三菱自動車 工業株式会社内 Fターム(参考) 5B017 AA02 BB03 CA12 5B076 EB03  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Kazuyori Katayama 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Mitsui Electric Co., Ltd. (72) Inventor Jiro Sumitani 2-3-2 Marunouchi, Chiyoda-ku, Tokyo Inside Mitsubishi Electric Corporation (72) Inventor Mitsuru Hayakawa 6-1, 1-2 Hamayama-dori, Hyogo-ku, Kobe City, Hyogo Prefecture Inside Mitsubishi Electric Control Software Co., Ltd. (72) Yusuke Hara 5-33 Shiba, Minato-ku, Tokyo No. 8 Inside Mitsubishi Motors Corporation (72) Yoshinori Ono 5-33-8 Shiba, Minato-ku, Tokyo Inside Mitsubishi Motors Corporation (72) Shinichi Kuraya 5-33-8 Shiba, Minato-ku, Tokyo No. Mitsubishi Motors Corporation (72) Inventor Kenji Hayase 5-33-8 Shiba, Minato-ku, Tokyo Mitsubishi Motors Corporation F-term (reference) 5B 017 AA02 BB03 CA12 5B076 EB03

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 同一電源用ラインと通信用ラインにそれ
ぞれ接続されたCPU搭載型の複数の自動車用電子制御
装置と、前記電源用ラインと通信用ラインに接続され電
源用ラインを通して前記各自動車用電子制御装置にプロ
グラム書換用電源を供給し、且つ、前記通信用ラインを
通して書き換え制御信号の通信を行う外部装置を備え、
前記自動車用電子制御装置は主電源OFF時に前記外部
装置からのプログラム書換用電源の入力を禁止する書換
電源入力制御手段を備えたことを特徴とする制御プログ
ラム書換システム。
1. A plurality of CPU-equipped vehicle electronic control units connected to the same power supply line and communication line, respectively, and each of the vehicle electronic control units connected to the power supply line and the communication line through the power supply line. An external device that supplies a power supply for program rewriting to the electronic control device and performs communication of a rewrite control signal through the communication line,
A control program rewriting system, characterized in that the vehicle electronic control device comprises a rewriting power input control means for prohibiting the input of program rewriting power from the external device when the main power is turned off.
【請求項2】 書換電源入力制御手段は、各自動車用電
子制御装置の制御動作時に前記外部装置からのプログラ
ム書換用電源の入力を禁止することを特徴とする請求項
1に記載の制御プログラム書換システム。
2. The control program rewriting device according to claim 1, wherein said rewriting power supply input control means prohibits the input of a program rewriting power supply from said external device during a control operation of each vehicle electronic control device. system.
【請求項3】外部装置は自動車用電子制御装置における
プログラム異常判定時に、自動車用電子制御装置の書換
電源入力制御手段を作動させてプログラム書換用電源を
入力させるプログラム強制書換手段を備えたことを特徴
とする請求項1に記載の制御プログラム書換システム。
3. An external device comprising a program forcible rewriting means for activating a rewriting power supply input control means of the vehicle electronic control device to input a program rewriting power when a program abnormality is judged in the vehicle electronic control device. The control program rewriting system according to claim 1, wherein:
【請求項4】 自動車用電子制御装置は通信用ラインを
通して外部装置より書換要求信号が入力されると、書換
条件成立時に肯定応答を外部装置に送信する信号送信手
段を備えたことを特徴とする請求項1に記載の制御プロ
グラム書換システム。
4. The electronic control unit for a vehicle further comprises a signal transmitting means for transmitting an acknowledgment to the external device when a rewrite condition is satisfied when a rewrite request signal is input from an external device through a communication line. The control program rewriting system according to claim 1.
【請求項5】 外部装置は書換要求信号に対する肯定応
答を所定時間経過しても受信されなかった時はプログラ
ム異常と判定し、プログラム強制書換手段を作動させる
異常判定手段を備えたことを特徴とする請求項3に記載
の制御プログラム書換システム。
5. An external device comprising an abnormality determining means for determining that the program is abnormal when an acknowledgment to the rewrite request signal is not received within a predetermined time, and for activating the program forcible rewriting means. The control program rewriting system according to claim 3, which performs the control program rewriting.
【請求項6】 外部装置は自動車用電子制御装置に送信
した既存のプログラムの消去要求に対する消去終了信号
を所定時間経過しても受信されなかった時は書換不能を
表示する表示手段を備えたことを特徴とする請求項1に
記載の制御プログラム書換システム。
6. An external device having display means for displaying rewriting disabled when an erasure end signal in response to an existing program erasure request transmitted to the vehicle electronic control unit is not received within a predetermined time. The control program rewriting system according to claim 1, wherein:
JP35898398A 1998-12-17 1998-12-17 Control program rewriting system Expired - Lifetime JP3672755B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35898398A JP3672755B2 (en) 1998-12-17 1998-12-17 Control program rewriting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35898398A JP3672755B2 (en) 1998-12-17 1998-12-17 Control program rewriting system

Publications (2)

Publication Number Publication Date
JP2000181698A true JP2000181698A (en) 2000-06-30
JP3672755B2 JP3672755B2 (en) 2005-07-20

Family

ID=18462133

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35898398A Expired - Lifetime JP3672755B2 (en) 1998-12-17 1998-12-17 Control program rewriting system

Country Status (1)

Country Link
JP (1) JP3672755B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7099750B2 (en) 2002-11-29 2006-08-29 Xanavi Informatics Corporation Data access method and data access apparatus for accessing data at on-vehicle information device
JP2006257915A (en) * 2005-03-15 2006-09-28 Fujitsu Ten Ltd Machine control device, maintenance control system and maintenance control method
CN104077547A (en) * 2014-06-25 2014-10-01 中国电子科技集团公司第三十研究所 Data power down protection circuit for electronic device
JP2016126699A (en) * 2015-01-08 2016-07-11 日立オートモティブシステムズ株式会社 Electronic control unit for vehicle

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7099750B2 (en) 2002-11-29 2006-08-29 Xanavi Informatics Corporation Data access method and data access apparatus for accessing data at on-vehicle information device
JP2006257915A (en) * 2005-03-15 2006-09-28 Fujitsu Ten Ltd Machine control device, maintenance control system and maintenance control method
JP4578289B2 (en) * 2005-03-15 2010-11-10 富士通テン株式会社 Machine control device, maintenance control system, and maintenance control method
CN104077547A (en) * 2014-06-25 2014-10-01 中国电子科技集团公司第三十研究所 Data power down protection circuit for electronic device
JP2016126699A (en) * 2015-01-08 2016-07-11 日立オートモティブシステムズ株式会社 Electronic control unit for vehicle

Also Published As

Publication number Publication date
JP3672755B2 (en) 2005-07-20

Similar Documents

Publication Publication Date Title
KR100258147B1 (en) Memory writing device for an electronic device
US5826211A (en) Electronic controller having excellent control program and control data overwriting capabilities
JPH11259375A (en) Device and system for control for vehicle
US6243627B1 (en) Electronic control system and method for erasing abnormality data generated during controller reloading
JP2003256228A (en) Program rewriting device
JP2753225B2 (en) In-vehicle control device
JP2000259420A (en) Device for updating learning value for electronic controller
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
US6636989B1 (en) Electronic control apparatus and method for on-board rewriting of non-volatile memories
JP3234772B2 (en) In-vehicle powertrain control device
JP2001123874A (en) Program rewrite system or memory rewriting system for electronic control device
JP2000038954A (en) Electronic controller and method of counting number of times in which nonvolatile memory is reloaded
US6256226B1 (en) Eeprom write device
JP2000181698A (en) Control program rewriting system
JP3828335B2 (en) Rewriting system for vehicle control device
JPH10171644A (en) Electronic controller
US6907495B2 (en) Rewriting system for rewriting a memory on a vehicle controller
US20190315405A1 (en) Apparatus and method for controlling lane change in vehicle
JP3915411B2 (en) Electronic control device for vehicle
JP2003104138A (en) System for monitoring vehicle control device for rewriting of data
JP2003271420A (en) Electronic control device
JPH1120576A (en) Memory writing method of control device for automobile and control device for automobile
JPH09171459A (en) Electronic control equipment
JP5516509B2 (en) Program writing system
JP2002323990A (en) Electronic controller and method for initializing nonvolatile memory

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040921

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050201

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050323

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050420

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080428

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090428

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110428

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140428

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term