JP3672755B2 - Control program rewriting system - Google Patents
Control program rewriting system Download PDFInfo
- Publication number
- JP3672755B2 JP3672755B2 JP35898398A JP35898398A JP3672755B2 JP 3672755 B2 JP3672755 B2 JP 3672755B2 JP 35898398 A JP35898398 A JP 35898398A JP 35898398 A JP35898398 A JP 35898398A JP 3672755 B2 JP3672755 B2 JP 3672755B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- rewrite
- control
- signal
- external device
- 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.)
- Expired - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
この発明は、車両に搭載する自動車用電子制御装置のフラッシュROMに記憶している制御プログラムの書き換えを行う制御プログラム書換システムに関するものである。
【0002】
【従来の技術】
図5は、例えば特開平9−134307号公報に示された従来のフラッシュROM書き換え機能を備えた電子制御装置のメモリ書き換えシステムを示す。図において、20はエンジン制御装置(ECU)、40はエンジン制御装置20に備えたフラッシュROMに対するメモリ書換装置、420は通信ライン440を介してエンジン制御装置20とメモリ書換装置40とを接続する接続用コネクタである。従来のメモリ書換システム60はエンジン制御装置20およびメモリ書換装置40から構成される。
【0003】
エンジン制御装置20は、エンジンの運転状態に応じた信号を出力する各種センサからの信号を入力する入力装置80,入力装置80からの信号に基づきエンジンに対する対する最適制御量を演算し、その演算結果による制御信号を出力するCPU100、CPU100からの制御信号を受けて、エンジンに取り付けられたインジェクタやイグナイタ等のアクチュエータを駆動する出力回路120,CPU100がエンジンを制御するのに必要な制御プログラムおよび制御データを格納するフラッシュROM140、CPU100が動作するのに必要なプログラムを格納するROM160、CPU100の演算結果等を一時格納するRAM180、メモリ書換装置40との間でシリアルデータ通信を行うための通信装置200とを備えている。
【0004】
一方、メモリ書換装置40は、エンジン制御装置20にフラッシュROM140の書き換えを行わせるためのCPU220、CPU220が動作するのに必要なプログラムを格納するROM240、CPU220の演算結果等を一時格納するRAM260、CPU220がエンジン制御装置20との間でシリアルデータ通信を行うための通信回路280、作業者が当該メモリ書換装置40に様々な指示入力を行うための入力装置300、各種メッセージを表示するための表示装置320、エンジン制御装置20のフラッシュROM140に書き込むために用意される新たな制御プログラム及び制御データを記憶する記憶装置340、CPU220と入力装置300、表示装置320、記憶装置340とを接続するインターフェース360を備えている。
【0005】
次に動作について説明する。メモリ書換装置40は、作業者によって記憶装置340内に用意された制御プログラムを通信ライン440を介してエンジン制御装置20のフラッシュROM140に送信する前に、その制御プログラムに適合する制御対象を示す識別コードをエンジン制御装置20に送信する。
【0006】
エンジン制御制御装置20のCPU100は、メモリ書換装置40からの識別コードと自己の制御対象を示す識別コードとが一致している場合のみ、フラッシュROM140を書き換えるための書換処理を実行する。
【0007】
【発明が解決しようする課題】
従来の装置は以上のように構成されているため、メモリ書換装置とエンジン制御装置は1対1のコマンドレスポンス通信を必要とし、複数のECUが同一通信回線上に接続されている場合では、書換対応が困難であった。
【0008】
この発明は上記のような問題点を解消するためになされたもので、複数のECUが同一通信ライン上および同一の書換電源ライン上に接続されている場合に、特定のECUに内蔵されたフラッシュROMに格納された制御プログラムを書換え、また、ECUに書換電源電圧が印加された場合にECUに内蔵された書換制御用のCPUを保護する制御プログラム書換システムに関するものである。
【0009】
【課題を解決するための手段】
請求項1の発明に係る制御プログラム書換システムは、同一電源用ラインと同一通信用ラインにそれぞれ接続されたCPU搭載型の複数の自動車用電子制御装置と、前記電源用ラインと通信用ラインに接続され電源用ラインを通して前記各自動車用電子制御装置にプログラム書換用電源を供給し、且つ、前記通信用ラインを通して書き換え制御信号の通信を行う外部装置を備え、前記複数の自動車用電子制御装置の特定の1つは、前記通信用ラインを通して前記外部装置より書換要求信号が入力されたことを検出したことに基づき、又は自身の制御動作に基づき、前記外部装置からのプログラム書換用電源の入力を禁止、許可する書換電源入力制御手段を有するとともに、前記外部装置は、自動車用電子制御装置における応答信号がない場合に、自動車用電子制御装置の書換電源入力制御手段を作動させてプログラム書換用電源を入力させるプログラム強制書換手段を有するものである。
【0010】
請求項2の発明に係る制御プログラム書換システムにおける書換電源入力制御手段は、各自動車用電子制御装置の制御動作時に前記外部装置からのプログラム書換用電源の入力を禁止するものである。
【0013】
請求項3の発明に係る制御プログラム書換システムにおける外部装置は、書換要求信号に対する肯定応答を所定時間経過しても受信されなかった時はプログラム異常と判定し、前記プログラム強制書換手段のON信号を認識すると前記書換電源入力制御手段を作動させる異常判定手段を有するものである。
【0014】
請求項4の発明に係る制御プログラム書換システムにおける外部装置は、自動車用電子制御装置に送信した既存のプログラムの消去要求に対する消去終了信号を所定時間経過しても受信されなかった時は書換不能を表示する表示手段を有するものである。
【0015】
【発明の実施の形態】
実施の形態1.
以下、この発明の実施の形態1を図について説明する。図1は本実施の形態に係る制御プログラム書換システムの全体構成図である。
図1において、1は自動車用電子制御装置(以下、ECUと記載する。)を示し、2は外部装置であり、この外部装置2はECU1のフラッシュROMに内蔵された制御プログラムの書換を行う際のコントロールコード、書換データを送受信するための通信機能、及び、フラッシュROM消去機能、書換用電源供給回路を有する。
【0016】
ECU1は1チップCPU11を内蔵し、このCPU11の内部には、車両制御及び外部装置2との通信を実行するためのプログラムを格納するフラッシュROMと、フラッシュROM書換用の通信プログラムとフラッシュROM書換実行プログラムを内蔵したブートROMと、制御情報、演算情報を一時的に格納するRAMと、制御信号を入力するための入力ポートPINと、演算結果による制御信号を出力するための出力ポートPOUT、書換許可信号出力ポートPCSと、フラッシュROM内蔵のプログラム書換用電源の入力ポートVP、外部装置2とECU1間で通信を実行するための受信ポートRXおよび送信ポートTX、動作プログラムとしてフラッシュROMか内蔵ブートROMかを選択するための入力ポートMODEを内蔵している。
【0017】
また、ECU1は書換電源入力回路12を内蔵し、この書換電源入力回路12は外部装置2から供給される書換電源の供給/遮断を制御し、CPU11内部のブートROM内蔵プログラムを起動するための信号を生成する。そして、書換電源入力回路12は、入力ポートCSの入力論理レベルによって、ON/OFFしてCPU11に対する書換電源電圧を供給/遮断するためのスイッチ回路121、ECU電源検出遅延出力回路122、CPU11からの書換許可信号とECU電源検出遅延出力回路122の信号との論理積を行いスイッチ回路121の制御信号を生成するANDゲート回路123、書換電源電圧がCPU11のVPポートに供給された際に、ブートROM内蔵プログラムを起動するために一定期間のリセットパルス信号を生成するモノマルチバイブレータ124、書換電源電圧がCPU11のポートVPに供給されると同時にポートMODEに信号を供給し、モノマルチバイブレータ124の立ち上がり信号と同期することによってCPU内部のブートROM内蔵プログラムを起動するためのインターフェース回路125、電源回路14からのパワーオンリセット信号と、モノマルチバイブレータ124からのリセット信号の論理積出力を行い、CPU11のポートRSTに信号を供給するためのANDゲート回路126を備えている。尚、127は書換許可信号出力ポートPCSに接続される電源VCCのプルアップ抵抗を示す。
【0018】
更に、ECU1は、外部装置2とECU1が通信を行う際の電気的信号レベルを整合させるための通信インターフェース回路13、車両搭載のバッテリ30より供給される電源電圧から、ECU1を動作させるのに必要とする定電圧を生成する電源回路14、ECU1が制御を行う際に入力情報として各種センサ、スイッチ情報から得られる電気的信号をCPUの入力信号レベルに変換するための制御入力インターフェース回路15、ECU1が制御の演算結果である各種アクチュエータを駆動するための出力信号を、アクチュエータ駆動信号レベルに変換するための制御出力インターフェース回路16を備えている。
【0019】
外部装置2はCPU21を内蔵しており、このCPU21内部には、ECU1に内蔵されたCPU11のフラッシュROM書換対応に必要な通信プログラムを記憶したROMおよび制御情報、演算情報を一時的に記憶するRAMを内蔵すると共に、書換電源供給回路23の制御を行う出力ポート、外部スイッチ信号入力ポート、外部装置2とECU1間で通信を実行するための受信ポートRXおよび送信ポートTX、書換対象フラッシュROMに転送するプログラムを記憶したROM24との接続ポートAX.DXを内蔵する。
【0020】
また、外部装置2は、外部装置2とECU1が通信を行う際の電気的信号レベルを整合するための通信インターフェース回路22、CPU21によって出力が制御されてECU1内部のCPU11に供給する書換電源供給回路23、ECU1内部のCPU11に内蔵されたフラッシュROMに書き込まれるプログラムコードを内蔵したROM24を備えている。
【0021】
尚、CPU21に設けられた外部スイッチ25a、25bは外部装置の書換動作を許可するための外部スイッチを示し、具体的には外部スイッチ25aは標準書換開始用であり、外部スイッチ25bは強制書換開始用である。強制書換は、ECU1内部CPU11のプログラムが異常な状態にある場合に強制的に書換を実行する際に使用する。
【0022】
また、CPU21に設けられたパイロットランプ26a、26bは書換終了結果を示すパイロットランプであり、具体的にはパイロットランプ26aは書換正常終了時に点灯し、パイロットランプ26bは書換不可能時に点灯する。
外部装置2に内蔵された電源回路27は車両に搭載されたバッテリ30から電圧を供給され、外部装置2を動作させるのに必要な定電圧を生成する。
【0023】
接続用コネクタ10を通して外部装置2とECU1間に接続されたラインは外部装置2とECU1間で通信インターフェース回路22,13を通して通信を行うための通信ライン3を示し、同じく接続用コネクタ10を通して外部装置2とECU1間に接続されたラインは外部装置2の書換電源供給回路23よりECU1内部の書き換え電源入力回路12を通してCPU11に書換電源を供給するための電源ライン4を示す。
【0024】
外部装置2より接続用コネクタ10を通してECU1側に引き出されたライン8は外部装置2を動作させるためにバッテリ30より外部装置2に内蔵された電源回路27の電源入力端子に電源を供給する電源ライン8である。この電源ライン8は負側が接地されたバッテリ30の正側に接続され、正側はIG(イグニッション)スイッチ5を通し、電源ライン6によりECU1に内蔵された電源回路14の電源入力端子に接続される。
【0025】
IGスイッチ5はECU1に電源を供給/遮断するために使用するスイッチを示し、IGスイッチ5がONの時のみECU1は制御動作可能となる。7はECU1のGNDラインを示す。9は外部装置2のGNDラインを示す。外部装置2のGNDライン9は、ECU1のGNDライン7と同一電位にある。
【0026】
次に本実施の形態の動作の詳細説明を図1〜3を用いて説明する。
図2はCUP11に内蔵されたフラッシュROM11の内蔵プログラムの書換を実行する際の手順を示し、図3は書換実行時の時系列図を示す。
【0027】
初めに、ECU1の動作について説明する。
図3において、先ず、IGスイッチ5をONすると電源回路14が起動し、バッテリ電圧をECU1内部回路の動作に必要な安定化電圧に変換し、安定化電圧をVCC出力端子から出力する。
【0028】
その後、期間T1後に電源回路14のポートRSTから論理1信号を出力し、またモノマルチバイブレータ124のポートRSTOからも同じく論理1信号を出力することにより、ゲート126の出力信号が論理0から論理1に変化し、CPU11のポートRSTの入力信号が論理0から論理1に変化することによって、CPU11内部のフラッシュROM内蔵プログラムが起動する。
【0029】
CPU11の書換許可信号出力用のポートPCSには、電源VCCに接続されたプルアップ抵抗127により、論理1の信号が供給されているため、プログラム動作によってポートPCSより論理0出力を行うまでは、論理1の信号がゲート123のポートAに供給される。
【0030】
もしも、プログラムが異常状態となった場合では、期間T3後に電源検出遅延出力回路122からの出力が論理1となるため、ゲート123の論理積結果出力Cが1となり、スイッチ回路121のCS入力が論理1となることによって、スイッチ回路121の内部スイッチがONとなり、ECU1内部で、書換電源の通電許可状態となる。
従って、CPU11内部プログラムが異常状態であってもフラッシュROM内蔵プログラムの書換が実行可能となる。
【0031】
図2のステップS51においてCPU11内蔵プログラムが正常かどうかを判定し、正常であれば、ステップS52に移行する。ステップS52では制御を実行する上で必要なCPU11内部レジスタ類、RAMデータの初期設定を実行する。
【0032】
次に、ステップS53においてCPU11の書換許可信号出力用のポートPCSから論理0の出力を行うが、ステップS53は図3のT2期間後の出力状態を示しており、期間T3以後に電源検出遅延出力回路122から論理1の出力がゲート123のポートBに供給されるが、既にポートAには論理0の信号が供給されているため、ゲート123の論理積出力結果Cが0となり、スイッチ回路121のCS入力が論理0となることによって、スイッチ回路121内部スイッチがOFFとなり、ECU1内部で、書換電源の通電を禁止する状態となる。
【0033】
従って、今後、通信手段を使用してECU1に書換要求信号が送られてくるまでは書換禁止状態となり、誤ってECU1内部のフラッシュROM内蔵プログラムを書き換えられることを防止する。
【0034】
次に、ステップS54において制御を実行する上で必要な入力情報をCPU11内部ポートPINから取り込み、内蔵RAMに記憶する。
次に、ステップS55において内蔵RAMに記憶された入力情報をベースにして、制御を実現するための各種演算処理を実行する。
次に、ステップS56において、ステップS55で得られた各種演算結果をCPU11内部ポートPOUTに出力する。
次に、ステップS57において、通信手段を用いて外部装置2からのフラッシュROM内蔵プログラム書換要求を受信したかどうかを判定し、書換要求がなければステップS53にもどり、上述のステップS53からS56を繰り返し実行し、書換要求があれば、ステップS58に移行する。
次に、ステップS58において、書換要求に対する肯定応答を外部装置2に通信手段を用いて返信する。
次に、ステップS59において、制御停止処理を実行し、フラッシュROMに内蔵されたプログラムの書換待ち状態とする。
次に、ステップS60において、CPU11の書換許可信号出力用のポートPCSから論理1の出力を行い、電源検出遅延出力回路122からの出力は論理1であることから、ゲート123の論理積結果出力Cが1となり、スイッチ回路121のCS入力が論理1となることによって、スイッチ回路121内部スイッチがONとなり、ECU1内部で、書換電源の通電許可状態となる。
【0035】
次に、ステップS61においてCPU11内部のブートROMに記憶されたプログラム(以後、ブートプログラムと称する)の起動待ち状態となる。
ブートプログラムの起動は、CPU11のポートMODEの入力論理が論理1、すなわち、外部装置2からの書換電源が供給された状態で、ポートRSTの入力論理が0から1に変化した場合に起動される。スイッチ回路121の内部スイッチがON状態において、外部装置2から書換電源が供給されるとCPU11のポートMODE、VP共に論理1となると同時にモノマルチバイブレータ124にも論理1の信号が供給され、モノマルチバイブレータ124から論理1→論理0→論理1の変化を示す一過性のパルス信号を出力し、CPU11のポートRSTに本パルス信号が供給される。
従って、本手順によって、CPU11内部のブートプログラムが起動されることになる。
【0036】
次に、ステップS63においてフラッシュROM内蔵プログラムの消去要求待ち状態となり、通信手段を用いて消去要求を受信すると、ステップS64に移行する。
次に、ステップS64においてフラッシュROM内蔵プログラムの消去をCPU11内部ブートプログラムが実行する。プログラムの消去、書換の電源はポートVPから供給される書換電源を使用する。本CPU11内部のブートプログラムはフラッシュROM内部には格納されていないため、消去の実行によって損壊することはない。
次に、ステップS65において、フラッシュROMの全プログラム領域が消去されたかを判定する。消去が完了していれば、ステップS66に移行する。
次に、ステップS66においてフラッシュROM内蔵プログラムの消去が終了したことを、通信手段を用いて書換装置である外部装置2に返信する。
【0037】
次に、ステップS67においてフラッシュROM内部にプログラムの書き込みを実行する。書換データは、通信手段によって書換装置から送信されてくるデータを受信し、順次書き込み実施する。ステップS68において、フラッシュROMの書換用データ受信が終了したかどうかを判定し、終了していなければ、再びステップS67を実行する。ステップS68において、書換終了信号を受信すると、ステップS69に移行する。
次に、ステップS69において書換終了信号に対する応答を送信し、ステップS70に移行する。ステップS70ではフラッシュROM内蔵プログラムの再起動を待つために、リセット入力待ち状態となる。リセット入力が実行されると、再びステップS50に戻る。
【0038】
引き続き、外部装置2の動作について説明する。
外部装置2が起動後、ステップS1において、標準書換実行を行うため、スイッチ25aをONし、ON信号を外部装置2内部のCPU21が認識すると、ステップS2において、フラッシュROM書換要求信号を通信手段を用いてECU1に送信する。
【0039】
次に、ステップS3において、フラッシュROM書換要求信号に対するECU1からの肯定応答待ちの状態となる。肯定応答を受信した場合は、ステップS4に移行し、CPU21のポートPOUTに論理1の出力を行い、ECU1に対する書換電源出力をONする。
【0040】
ステップS3にて、肯定応答を受信しない場合には、ステップS12にて受信待ちの時間切れを判断し、時間切れでなければ、ステップS3に戻る。時間切れであればステップS13に移行し、ステップS13にて書換不可能表示をパイロットランプ26bに表示出力する。
【0041】
ステップS14にて強制書換実行を行うため、スイッチ25bをONし、ON信号を外部装置2内部のCPU21が認識すると、ステップS15に移行し、CPU21のポートPOUTに論理1の出力を行い、ECU1に対する書換電源出力をONする。
次に、CPU21のポートPOUTからの論理1出力の後にステップS5において、通信手段を用いてフラッシュROM内蔵プログラムの消去要求をECU1に送信する。
次に、ステップS6において、ECU1からフラッシュROM内蔵プログラムの消去終了応答の受信待ちを行い、消去終了応答を受信すると、ステップS7に移行し、受信していない場合にはステップS16に移行する。ステップS16にて受信待ちの時間切れを判断し、時間切れでなければ、ステップS6に戻る。時間切れであればステップS17に移行し、ステップS17にて書換不可能表示をパイロットランプ26bに表示出力する。
【0042】
次に、ステップS7において、フラッシュROM内蔵用プログラムデータを通信手段を用いて送信し、ステップS8にてデータ送信が全て終了したかどうかを判断し、終了していなければステップS7に戻り、次のプログラムデータを送信する。データ送信が全て終了した場合には、ステップS9に移行する。
次に、ステップS9において、フラッシュROM内蔵用プログラムの書換終了信号を通信手段を用いてECU1へ送信する。
次に、ステップS10において、外部装置2の書換終了信号に対するECU1からの書換終了応答受信待ちとなり、書換応答を受信するとステップS11に移行する。ステップS11において、書換終了表示をパイロットランプ26aに表示出力する。
【0043】
実施の形態2.
尚、上記実施の形態1において、ECU1は電源電圧検出遅延出力回路122の遅延出力と書換許可信号との論理積を用いてスイッチ回路121のON/OFFを行っていたが、スイッチ回路121のON/OFF制御をCPU11と別の内蔵CPUの制御で行うことにより、実施の形態1と同等の効果を得ると共に回路構成を簡易化することができる。
【0044】
以下、本実施の形態を図4について、実施の形態1からの変更点を説明する。図において、130は実施の形態1における電源検出遅延出力回路122、ゲート123、モノマルチバイブレータ124の機能を包括したCPU130である。
【0045】
次に、本実施の形態の動作の詳細について説明する。
ECU1内部の電源VCCが立ち上がり後、CPU130はポートRSTOから論理1の信号を出力する。図3の期間T3を超えてもポートCSIの入力信号が論理1を継続した場合、CPU130はCPU11が異常状態と判断し、ポートCSOに論理1の信号を出力し、スイッチ回路121のポートCSの入力論理が論理1となることにより、スイッチ回路121内部のスイッチをON状態とする。
【0046】
従って、外部装置2から書換電源電圧をECU1内部のCPU11に供給可能となる。次に外部装置2から書換電源電圧が供給され、インターフェース回路125からの出力信号が論理1となると、CPU130のポートVPDへ論理1の信号が供給され、本信号の検出と同時にCPU130はポートRSTOに一定期間のパルス信号すなわち、論理1→論理0→論理1を出力し、CPU11の内部動作プログラムをブートプログラムに切り換える。
【0047】
以下、書換動作については、図2のステップS63以降と同じである。
CPU11が正常動作を行っている場合においては、図3の期間T2後、CPU11のポートPCSから論理0の信号を出力し、CPU130のポートCSIの入力信号が論理0となることによってCPU130は、ポートCSOに論理0の信号を出力する。スイッチ回路121のポートCSには論理0の信号が入力されるため、スイッチ回路121内部のスイッチはOFF状態となり、外部装置2からの書換電源電圧はCPU11に供給されない。
【0048】
CPU11のポートPCSから論理1の信号が出力されると、CPU130のポートCSIに論理0の信号が供給され、CPU130はポートCSOに論理1の信号を出力し、スイッチ回路121のポートCSの入力論理が論理1となることにより、スイッチ回路121内部のスイッチをON状態とする。
【0049】
従って、外部装置2から書換電源電圧をECU1内部のCPU11に供給可能となる。次に外部装置2から書換電源電圧が供給され、インターフェース回路125からの出力信号が論理1となると、CPU130のポートVPDへ論理1の信号が供給され、本信号の検出と同時にCPU130はポートRSTOに一定期間のパルス信号すなわち、論理1→論理0→論理1を出力し、CPU11の内部動作プログラムをブートプログラムに切り換える。
以下、書換動作については、図2のステップS63以降と同じである。
【0050】
実施の形態3.
尚、上記各実施の形態では、フラッシュROM内蔵プログラムの書換に書換電源を外部から供給することを必要としたが、書換電源用の別電源を必要としないCPUについては実施の形態1のCPU11のポートVPへの接続ラインを削除するだけで上記実施例と同等の効果を得ることが可能である。
【0051】
【発明の効果】
請求項1の発明によれば、同一電源用ラインと同一通信用ラインにそれぞれ接続されたCPU搭載型の複数の自動車用電子制御装置と、前記電源用ラインと通信用ラインに接続され電源用ラインを通して前記各自動車用電子制御装置にプログラム書換用電源を供給し、且つ、前記通信用ラインを通して書き換え制御信号の通信を行う外部装置を備え、前記複数の自動車用電子制御装置の特定の1つは、前記通信用ラインを通して前記外部装置より書換要求信号が入力されたことを検出したことに基づき、又は自身の制御動作に基づき、前記外部装置からのプログラム書換用電源の入力を禁止、許可する書換電源入力制御手段を有するとともに、前記外部装置は、自動車用電子制御装置における応答信号がない場合に、自動車用電子制御装置の書換電源入力制御手段を作動させてプログラム書換用電源を入力させるプログラム強制書換手段を有するので、自動車用電子制御装置に書換用電源電圧が外部装置より送られた場合でもCPUを保護することができるという効果がある。
【0052】
請求項2の発明によれば、書換電源入力制御手段は各自動車用電子制御装置の制御動作時に前記外部装置からのプログラム書換用電源の入力を禁止するようにしたので、制御プログラムの保護を計ることができるという効果がある。
【0055】
請求項3の発明によれば、外部装置は書換要求信号に対する肯定応答を所定時間経過しても受信されなかった時はプログラム異常と判定し、前記プログラム強制書換手段のON信号を認識すると前記書換電源入力制御手段を作動させる異常判定手段を有するので、自動車用電子制御装置は特にプログラム異常を監視する必要がないためソフトウェアの負担を軽減できるという効果がある。
【0056】
請求項4の発明によれば、外部装置は自動車用電子制御装置に送信した既存のプログラムの消去要求に対する消去終了信号を所定時間経過しても受信されなかった時は書換不能を表示する表示手段を有するので、ユーザにとっての使い勝手が向上するという効果がある。
【図面の簡単な説明】
【図1】 この発明の実施の形態1による外部装置とECU間の通信ライン接続状況と、ECU内部回路のブロック図を示す。
【図2】 この発明の実施の形態によるECU内部のフラッシュROM内蔵プログラムの書換手順であるフローチャートを示す。
【図3】 この発明の実施の形態によるECU内部のフラッシュROM内蔵プログラムの書換手順の時系列図を示す。
【図4】 この発明の他の実施の形態による外部装置とECU間の通信ライン接続状況と、ECU内部回路のブロック図を示す。
【図5】 従来のメモリ書換装置とECU間の通信ライン接続状況と、ECU内部回路ブロック図を示す。
【符号の説明】
1 ECU、2 外部装置、3 通信ライン、4 書換電源ライン、5 IGスイッチ、6,8 電源ライン、11,21,130 CPU、12 書換電源入力回路、13,22 通信インターフェース回路、23 書換電源供給回路、26a,26b パイロットランプ、121 スイッチ回路、122 電源検出遅延出力回路。[0001]
BACKGROUND 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 device for an automobile mounted on a vehicle.
[0002]
[Prior art]
FIG. 5 shows a memory rewriting system of an electronic control device having a conventional flash ROM rewriting function disclosed in, for example, Japanese Patent Laid-Open No. 9-134307. In the figure, 20 is an engine control unit (ECU), 40 is a memory rewrite device for a flash ROM provided in the
[0003]
The
[0004]
On the other hand, the
[0005]
Next, the operation will be described. Before the
[0006]
The
[0007]
[Problems to be solved by the invention]
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 rewriting is performed when multiple ECUs are connected on the same communication line. The response was difficult.
[0008]
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 rewrite power supply line, a flash built in a specific ECU is provided. Rewrite the control program stored in ROM, , E The present invention relates to a control program rewriting system for protecting a rewrite control CPU built in an ECU when a rewrite power supply voltage is applied to a CU.
[0009]
[Means for Solving the Problems]
A control program rewriting system according to a first aspect of the present invention is a plurality of CPU-equipped electronic control devices connected to the same power supply line and the same communication line, and connected to the power supply line and the communication line. A power supply for rewriting the program to each of the electronic control devices for automobiles through the power supply line, and an external device for communicating a rewrite control signal through the communication line. One of them prohibits the input of the program rewriting power supply from the external device based on the detection that the rewriting request signal is input from the external device through the communication line or based on its own control operation. , Having rewrite power input control means to allow In addition, the external device has a program forcible rewriting means for operating the rewriting power input control means of the automobile electronic control device and inputting the power for program rewriting when there is no response signal in the automotive electronic control device. Is.
[0010]
The rewrite power supply input control means in the control program rewrite system according to the invention of
[0013]
[0014]
[0015]
DETAILED DESCRIPTION OF THE INVENTION
In FIG. 1,
[0016]
The ECU 1 has a built-in one-
[0017]
Further, the ECU 1 has a built-in rewrite power
[0018]
Further, the
[0019]
The
[0020]
The
[0021]
The
[0022]
The
The
[0023]
A line connected between the
[0024]
A
[0025]
The
[0026]
Next, a detailed description of the operation of the present embodiment will be described with reference to FIGS.
FIG. 2 shows a procedure for executing rewriting of the built-in program in the
[0027]
First, the operation of the
In FIG. 3, first, when the
[0028]
Thereafter, after a period T1, a
[0029]
Since a
[0030]
If the program is in an abnormal state, the output from the power detection
Therefore, even if the internal program of the
[0031]
In step S51 of FIG. 2, it is determined whether the
[0032]
Next, in step S53, a logic 0 is output from the
[0033]
Therefore, until the rewrite request signal is sent to the
[0034]
Next, in step S54, input information necessary for executing the control is fetched from the internal port PIN of the
Next, based on the input information stored in the built-in RAM in step S55, various arithmetic processes for realizing control are executed.
Next, in step S56, the various calculation results obtained in step S55 are output to the
Next, in step S57, it is determined whether or not the flash ROM built-in program rewrite request is received from the
Next, in step S58, an affirmative response to the rewrite request is returned to the
Next, in step S59, a control stop process is executed to enter a state of waiting for rewriting of the program built in the flash ROM.
Next, in step S60, the
[0035]
Next, in step S61, the program enters a standby state for starting a program stored in the boot ROM in the CPU 11 (hereinafter referred to as a boot program).
The boot program is started when the input logic of the port MODE of the
Therefore, the boot program in the
[0036]
Next, in step S63, the flash ROM built-in program erasure request wait state is entered, and when an erasure request is received using the communication means, the process proceeds to step S64.
Next, in step S64, the
Next, in step S65, it is determined whether all program areas of the flash ROM have been erased. If the erasure is completed, the process proceeds to step S66.
Next, in step S66, the fact that the erase of the program stored in the flash ROM has been completed is sent back to the
[0037]
Next, in step S67, the program is written into the flash ROM. As the rewrite data, data transmitted from the rewrite device is received by the communication means, and written sequentially. In step S68, it is determined whether or not the reception of the data for rewriting the flash ROM has been completed. If it has not been completed, step S67 is executed again. In step S68, when a 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. In step S70, in order to wait for the flash ROM built-in program to be restarted, a reset input wait state is entered. When the reset input is executed, the process returns to step S50 again.
[0038]
Next, the operation of the
After the
[0039]
Next, in step S3, the
[0040]
If an affirmative response is not received in step S3, the reception waiting time-out is determined in step S12, and if not, the process returns to step S3. If the time expires, the process proceeds to step S13, and a non-rewritable display is displayed and output to the pilot lamp 26b in step S13.
[0041]
In order to perform forced rewriting in step S14, when the switch 25b is turned on and the
Next, after a
Next, in step S6, the
[0042]
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 data transmission is completed. Send program data. When all the data transmission is completed, the process proceeds to step S9.
Next, in step S9, a flash ROM built-in program rewrite end signal is transmitted to the
Next, in step S10, it waits for reception of a rewrite end response from the
[0043]
In the first embodiment, the
[0044]
Hereinafter, this embodiment will be described with reference to FIG. 4 with respect to changes from the first embodiment. In the figure,
[0045]
Next, details of the operation of the present embodiment will be described.
After the power supply VCC in the
[0046]
Therefore, the rewrite power supply voltage can be supplied from the
[0047]
Hereinafter, the rewriting operation is the same as that after step S63 in FIG.
When the
[0048]
When a
[0049]
Therefore, the rewrite power supply voltage can be supplied from the
Hereinafter, the rewriting operation is the same as that after step S63 in FIG.
[0050]
In each of the above-described embodiments, it is necessary to supply a rewriting power source from the outside for rewriting the flash ROM built-in program. However, a CPU that does not require a separate power source for the rewriting power source is the
[0051]
【The invention's effect】
According to the first aspect of the present invention, a plurality of CPU-equipped automotive electronic control devices respectively connected to the same power supply line and the same communication line, and the power supply line connected to the power supply line and the communication line. A power supply for program rewriting to each of the electronic control devices for automobiles, and an external device for communicating a rewrite control signal through the communication line, and a specific one of the plurality of electronic control devices for automobiles is Rewriting that prohibits / permits input of a power supply for program rewriting from the external device based on the detection that a rewrite request signal is input from the external device through the communication line or based on its own control operation Has power input control means In addition, the external device has a program forcible rewriting means for operating the rewriting power input control means of the automobile electronic control device and inputting the power for program rewriting when there is no response signal in the automotive electronic control device. Therefore, there is an effect that the CPU can be protected even when the rewrite power supply voltage is sent from the external device to the automobile electronic control device.
[0052]
According to the second aspect of the present invention, the rewrite power input control means prohibits the input of the program rewrite power from the external device during the control operation of each automobile electronic control device, so that the control program is protected. There is an effect that can be.
[0055]
[0056]
[Brief description of the drawings]
FIG. 1 shows a connection state of a communication line between an external device and an ECU according to
FIG. 2 is a flowchart showing a rewrite procedure of a flash ROM built-in program in the ECU according to the embodiment of the present invention.
FIG. 3 shows a time series diagram of a rewriting procedure of a flash ROM built-in program in the ECU according to the embodiment of the present invention.
FIG. 4 shows a connection state of communication lines between an external device and an ECU according to another embodiment of the present invention, and a block diagram of an ECU internal circuit.
FIG. 5 shows a communication line connection state between a conventional memory rewriting device and an ECU, and an ECU internal circuit block diagram.
[Explanation of symbols]
1 ECU, 2 External device, 3 Communication line, 4 Rewrite power line, 5 IG switch, 6, 8 Power line, 11, 21, 130 CPU, 12 Rewrite power input circuit, 13, 22 Communication interface circuit, 23 Rewrite power supply Circuit, 26a, 26b Pilot lamp, 121 switch circuit, 122 power supply detection delay output circuit.
Claims (4)
前記電源用ラインと通信用ラインに接続され電源用ラインを通して前記各自動車用電子制御装置にプログラム書換用電源を供給し、且つ、前記通信用ラインを通して書き換え制御信号の通信を行う外部装置を備え、
前記複数の自動車用電子制御装置の特定の1つは、前記通信用ラインを通して前記外部装置より書換要求信号が入力されたことを検出したことに基づき、又は自身の制御動作に基づき、前記外部装置からのプログラム書換用電源の入力を禁止、許可する書換電源入力制御手段を有するとともに、
前記外部装置は、自動車用電子制御装置における応答信号がない場合に、自動車用電子制御装置の書換電源入力制御手段を作動させてプログラム書換用電源を入力させるプログラム強制書換手段を有する
ことを特徴とする制御プログラム書換システム。A plurality of CPU-mounted electronic control devices connected to the same power supply line and the same communication line;
An external device connected to the power supply line and the communication line for supplying a program rewriting power to each of the automotive electronic control devices through the power supply line, and for communicating a rewrite control signal through the communication line;
The specific one of the plurality of automotive electronic control devices is based on detecting that a rewrite request signal is input from the external device through the communication line, or based on its own control operation. program input update-power from the prohibition, which has a rewrite power input control means for permitting,
The external device has program forcible rewriting means for operating the rewrite power input control means of the vehicle electronic control device and inputting the program rewrite power when there is no response signal in the vehicle electronic control device. Control program rewriting system.
ことを特徴とする請求項1に記載の制御プログラム書換システム。2. The control program rewriting system according to claim 1, wherein the rewrite power supply input control unit prohibits input of a program rewrite power supply from the external device during a control operation of each automobile electronic control device.
ことを特徴とする請求項1に記載の制御プログラム書換システム。When the external device does not receive an acknowledgment to the rewrite request signal even after a predetermined time, it is determined that the program is abnormal, and when the ON signal of the program forced rewrite means is recognized, the rewrite power input control means is activated. The control program rewriting system according to claim 1, further comprising a determination unit .
ことを特徴とする請求項1に記載の制御プログラム書換システム。The external device according when even the erase end signal for the erasure request for an existing program that sent the automobile electronic control device a predetermined time has elapsed has not been received, characterized in that it comprises a display means for displaying a non-rewritable Item 8. The control program rewriting system according to Item 1 .
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 JP2000181698A (en) | 2000-06-30 |
JP3672755B2 true 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) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3828484B2 (en) | 2002-11-29 | 2006-10-04 | 株式会社ザナヴィ・インフォマティクス | Data access method and data access apparatus for in-vehicle information equipment |
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 |
JP6415990B2 (en) * | 2015-01-08 | 2018-10-31 | 日立オートモティブシステムズ株式会社 | Electronic control unit for automobile |
-
1998
- 1998-12-17 JP JP35898398A patent/JP3672755B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2000181698A (en) | 2000-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5737711A (en) | Diagnosis system for motor vehicle | |
US5680625A (en) | Computer system for avoiding coincidence of port address on a bus during expansion | |
US6275911B1 (en) | Memory writing device for an electronic device | |
JP2753225B2 (en) | In-vehicle control device | |
JP2004357497A (en) | Method and apparatus for processing charging state in mobile electronic device | |
JPH09160766A (en) | Electronic controller | |
JPH086099A (en) | Camera system and communicating method | |
JP2000259420A (en) | Device for updating learning value for electronic controller | |
US6243627B1 (en) | Electronic control system and method for erasing abnormality data generated during controller reloading | |
JPH07107564A (en) | Abnormality detector for communications system for vehicle | |
US6636989B1 (en) | Electronic control apparatus and method for on-board rewriting of non-volatile memories | |
JP3881069B2 (en) | Electronic equipment | |
JP3672755B2 (en) | Control program rewriting system | |
US6256226B1 (en) | Eeprom write device | |
JP3234772B2 (en) | In-vehicle powertrain control device | |
JP3828335B2 (en) | Rewriting system for vehicle control device | |
EP0785508A2 (en) | Method of controlling data writing into on-board microcomputer | |
JP3841919B2 (en) | Display device and control method thereof | |
JP3796837B2 (en) | Memory writing device for electronic device | |
JPH09171459A (en) | Electronic control equipment | |
EP4020968A2 (en) | Vehicle control system, vehicle control method, controller, and non-transitory storage medium | |
JPH11212157A (en) | Electronic equipment | |
JP2002323990A (en) | Electronic controller and method for initializing nonvolatile memory | |
JP2005103789A (en) | Electronic apparatus | |
JP3924945B2 (en) | Electronic control unit |
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 |