JP4066499B2 - Electronic control device, electronic control system, and conformity determination method - Google Patents

Electronic control device, electronic control system, and conformity determination method Download PDF

Info

Publication number
JP4066499B2
JP4066499B2 JP07923998A JP7923998A JP4066499B2 JP 4066499 B2 JP4066499 B2 JP 4066499B2 JP 07923998 A JP07923998 A JP 07923998A JP 7923998 A JP7923998 A JP 7923998A JP 4066499 B2 JP4066499 B2 JP 4066499B2
Authority
JP
Japan
Prior art keywords
identification information
control
external
electronic control
control 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 - Fee Related
Application number
JP07923998A
Other languages
Japanese (ja)
Other versions
JPH11280536A (en
Inventor
伴三 重森
幸一 金原
敏明 岩下
良男 小沼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP07923998A priority Critical patent/JP4066499B2/en
Publication of JPH11280536A publication Critical patent/JPH11280536A/en
Application granted granted Critical
Publication of JP4066499B2 publication Critical patent/JP4066499B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、電気的にデータの書き換えが可能な不揮発性メモリに格納された制御プログラムや制御データを書き換える技術に関する。
【0002】
【従来の技術】
従来より、例えば特開平6−272611号公報に開示されているように、自動車のエンジン等を制御する電子制御装置として、電気的にデータの書き換え(詳しくはデータの消去及び書き込み)が可能な不揮発性メモリに制御用のプログラム及びデータを格納しておき、このような制御プログラムや制御データを、市場への供給後でも書き換え可能に構成されたものが提案されている。
【0003】
すなわち、この種の電子制御装置は、通常時には、不揮発性メモリに格納された制御プログラム及び制御データに従ってエンジン等の制御対象を制御するための制御処理を実行するのであるが、別途用意されたメモリ書換装置が接続されて、そのメモリ書換装置から書き換え指令が送信されて来ると、所定の通信手順を踏んだ後に、不揮発性メモリの内容を書き換えるように構成されている。なお、不揮発性メモリの内容の書き換えは、不揮発性メモリに格納されている制御プログラム又は制御データの一部又は全部を消去し、その消去したメモリ領域に、メモリ書換装置から送信されて来る新たな制御プログラム又は制御データを書き込むという手順で行われる。
【0004】
メモリ書換装置は、書き換えるべき新たな制御プログラムや制御データを記憶する記憶媒体(フロッピーディスク,ハードディスク,CD−ROM等)を備えており、作業者によって所定の操作が行われると、電子制御装置へ書き換え指令を送信した後、記憶媒体に記憶されている新たな制御プログラムや制御データを電子制御装置へ送信するように構成されている。なお、記憶媒体に複数の制御プログラム又は制御データが記憶されており、作業者によって選択された制御プログラム等を電子制御装置へ送信するという構成も考えられる。
【0005】
このような電子制御装置では、不揮発性メモリに格納される制御プログラムや制御データをメモリ書換装置を用いて新たな制御プログラムや制御データに書き換えることができるため、動作内容(制御内容)を任意に変更することができるという点で有利である。このため、最近では、電子制御装置の備えるCPUに上述したような不揮発性メモリが内蔵されることも多くなってきている。
【0006】
ところが、例えば自動車においては、異なる車種間ではもちろんであるが、同一車種であっても、グレード(搭載装備)やエンジンの型式、あるいは仕向地(輸出国)等の違いによって、電子制御装置が行うべき制御の内容は異なっている。換言するならば、電子制御装置の不揮発性メモリに格納すべき制御プログラムや制御データは、その電子制御装置が制御する制御対象毎に異なっている。
【0007】
従って、この種の電子制御装置では、作業者が、電子制御装置の制御対象に不適合な制御プログラム等がメモリ書換装置側の記憶媒体に記憶されていることを知らずに、あるいは、メモリ書換装置側の記憶媒体に記憶されている複数の制御プログラム等の中から電子制御装置の制御対象に不適合なものを誤って選択し、メモリ書換装置から電子制御装置へ制御対象に不適合な制御プログラムや制御データを送信させてしまう可能性がある。そして、このような作業ミスが発生すると、電子制御装置が制御対象を適切に制御することができなくなる。
【0008】
例えば、型式Aのエンジンを制御する電子制御装置の制御プログラムを書き換える際に、作業者が、メモリ書換装置側の記憶媒体に型式Bのエンジンに適合する制御プログラムが記憶されていることを知らずに、あるいは、メモリ書換装置側の記憶媒体に記憶されている複数の制御プログラムの中から型式Bのエンジンに適合する制御プログラムを誤って選択し、書き換え作業を行ってしまった場合には、電子制御装置の制御内容が実際の制御対象である型式Aのエンジンに適合せずに、エンジンが動作しなくなったり、あるいは、エンジンが動作したとしても本来の性能を発揮できなくなる。
【0009】
このため、出願人は、電子制御装置へ制御対象に不適合な制御プログラムや制御データを誤って書き込んだ場合に、適切な処置を講じることができるように、制御処理の実行に先だって、異常時対応処理を実行可能とする以下に示すような方法を考えた。
【0010】
その方法は、制御プログラム及び制御データに、適合する制御対象を示す識別情報(以下「データ適合対象識別情報」という。)を含めるようにし、この識別情報を含む制御プログラム又は制御データを不揮発性メモリに書き込むようにしておき、一方、電子制御装置には、その電子制御装置の制御対象を示す識別情報(以下「制御対象識別情報」という。)を記憶しておき、制御処理の実行に先だって、制御対象識別情報と不揮発性メモリに書き込まれた前記制御プログラム又は制御データに含まれるデータ適合対象識別情報とが一致しているか否かを判断し、一致していない場合には例えば外部に一致していない旨を報知するというような異常時対応処理を実行するというものである。
【0011】
この方法によれば、不揮発性メモリに記憶された制御プログラム又は制御データを書き換えた場合であっても、書き換えられた制御プログラム又は制御データが制御対象に不適合なものである場合には、制御処理の実行に先だって、異常時対応処理が実行されることになり、結果として、適切な処置を講じることができる。
【0012】
【発明が解決しようとする課題】
しかしながら、上述した方法では、故障などによって電子制御装置が交換された場合には以下のような問題が発生する。
電子制御装置の故障時には、電子制御装置は補給用の電子制御装置と取り替えられるのが一般的であり、メモリ書換装置を用いて補給用の電子制御装置に制御プログラム又は制御データを新たに書き込むことになる。このとき、上述の方法によって、書き込まれた制御プログラム又は制御データが制御対象に適合したものであるか否かを判断するためには、補給用の電子制御装置に制御対象を示す制御対象識別情報を予め書き込んでおく必要がある。つまり、出荷当初から車両に搭載されない補給用の電子制御装置を、上述したような車種の違いによって、また、グレード、エンジンの型式、あるいは仕向地等の違いによって区別する必要が出てくるのである。その結果、ある補給用の電子制御装置は、型式Aのエンジンを制御するための電子制御装置とは交換できるが、型式Bのエンジンを制御する電子制御装置とは交換できないという状況が発生する。
【0013】
また、補給用の電子制御装置に制御対象を示す制御対象識別情報を予め書き込んでおいた場合、作業者が、故障した電子制御装置の制御対象とは別の制御対象を示す制御対象識別情報の記憶された補給用の電子制御装置を誤って選択し交換してしまうことも考えられる。この場合、書き込まれた制御プログラム又は制御データが制御対象に適合するものであったとしても、その制御プログラム又は制御データに含まれるデータ適合対象識別情報が予め記憶された制御対象識別情報と一致しないため、例えば外部に一致していない旨を報知するというような異常時対応処理が実行されてしまう。
【0014】
このような点を考慮すれば、車両への搭載以前に電子制御装置の制御対象を特定する制御対象識別情報を記憶しておくことは好ましくない。つまり、補給用の電子制御装置にあっては、制御対象識別情報を記憶しておく必要をなくし、補給用の電子制御装置を制御対象の違いに関係なく共通化することが望まれる。
【0015】
そこで、本発明は、電子制御装置において、このような共通化を実現し、さらに、制御対象に不適合な制御プログラムや制御データが不揮発性メモリに書き込まれた場合、制御処理の実行に先だって異常時対応処理を実行できるようにすることを目的する。
【0016】
【課題を解決するための手段及び発明の効果】
上述した目的を達成するためになされた第1の構成に係る電子制御装置は、データの書き換えが可能な不揮発性メモリを備え、通常時には、不揮発性メモリに格納された制御プログラム及び制御データに従って所定の制御対象を制御するための制御処理を実行するのであるが、メモリ書換装置が接続されて、そのメモリ書換装置から送信される書き換え指令を受けた場合には、不揮発性メモリに格納されている制御プログラム又は制御データの一部又は全部を、その後メモリ書換装置から送信されて来る新たな制御プログラム又は制御データに書き換える。なお、データの書き換えが可能な不揮発性メモリとしては、フラッシュEEPROM(通称、フラッシュROM)あるいはEEPROMが一般的であるが、電気的に書き換え可能な他のROMでも良い。
【0017】
本発明の電子制御装置では、制御プログラム及び制御データが、当該制御プログラム及び制御データに適合する制御対象を示す識別情報であるデータ適合対象識別情報を含むように作成されている。例えば、制御プログラム及び制御データの先頭位置に制御内容に関係しないデータ適合対象識別情報が記憶されているという具合である。
【0018】
ここで特に、本発明の電子制御装置は、データ通信可能な外部装置と共に用いられるもので、本発明の電子制御装置には、当該電子制御装置の制御対象を記憶するための識別情報記憶手段が設けられている。そして、識別情報送信手段は、この識別情報記憶手段に記憶される制御対象識別情報を上述した外部装置へ送信する。外部装置は、識別情報送信手段によって送信された制御対象識別情報を受信して記憶しておき、この制御対象識別情報を電子制御装置へ送信する。これに対応して、本発明の電子制御装置では、外部装置から送信された制御対象識別情報を識別情報受信手段が受信し、一致判断手段が、制御処理の実行に先だって、識別情報受信手段によって受信された制御対象識別情報と制御プログラム又は制御データに含まれるデータ適合対象識別情報とが一致しているか否かを判断する。この判断結果に基づいて、異常時処理実行手段は、両識別情報が一致していない場合には異常時対応処理を実行する。
【0019】
上述した識別情報記憶手段には、例えば工場出荷時に制御対象識別情報が記憶されることが考えられる。このように識別情報記憶手段に記憶された制御対象識別情報を外部装置へ送信し記憶させておき、そして、外部装置から送信されてくる制御対象識別情報を用いて上述した一致判断を行う。例えば故障等によって電子制御装置が交換されてしまえば、識別情報記憶手段には制御対象識別情報が記憶されていないことになるが、外部装置に制御対象識別情報が記憶されていれば、識別情報受信手段が外部装置から送信されてくる制御対象識別情報を用いて上述した一致判断を行う。
【0020】
なお、外部装置としては、例えば電子制御装置が車両に搭載される場合、その車両に共に搭載される装置である。例えば、当該電子制御装置とは別の電子制御装置を外部装置として採用することも考えられるし、例えば、メモリ装置を内蔵し通信機能を備えたイグニッションキーを外部装置として採用することも考えられる。また、上述した「制御対象」は、例えば型式Aのエンジン、型式Bのエンジンというように、同じエンジンであっても制御プログラム又は制御データを異にする対象をそれぞれ示すものである。
【0021】
このように本発明の電子制御装置では、制御処理の実行に先だって、制御プログラム及び制御データに適合する制御対象を示す識別情報であるデータ適合対象識別情報と電子制御装置の制御対象を示す識別情報である制御対象識別情報とが一致しているか否かを判断し、一致していない場合には異常時対応処理を実行する。従って、不揮発性メモリに書き込まれた制御プログラム又は制御データが制御対象に適合していない場合には、制御処理の実行に先だって異常時対応処理が実行される。
【0022】
このとき、判断基準となる制御対象識別情報を電子制御装置に記憶しておいた場合、故障時には、交換した電子制御装置に新たに制御対象識別情報を書き込む必要が生じ、又は既に制御対象識別情報が書き込んである電子制御装置に交換する必要が生じる。
【0023】
そのため、本発明の電子制御装置では、外部装置に記憶されている制御対象識別情報を用いて、すなわち、識別情報受信手段によって受信される制御対象識別情報を用いて上述した一致判断を行うのである。従って、電子制御装置が故障して補給用の電子制御装置に取り換えられた場合であっても、補給用の電子制御装置には予め制御対象識別情報を記憶しておく必要がなくなり、車両等に搭載される以前に電子制御装置の制御対象は特定されないことになる。結果として、例えば補給用の電子制御装置を、車種、グレード、エンジンの型式、仕向地等により異なる制御対象によって区別することなく共通化することができる。
【0024】
ところで、外部装置から送信されてくる制御対象識別情報を信頼性の高いものにするという観点から見れば、例えば、電子制御装置が車両に搭載される場合、その車両の工場出荷時に電子制御装置に記憶される制御対象識別情報を外部装置に記憶することが望ましい。
【0025】
そこで、本発明の電子制御装置においては、識別情報送信手段が、識別情報記憶手段に記憶された制御対象識別情報を外部装置へ送信する。その結果、外部装置には、信頼性の高い制御対象識別情報が記憶されることになる。また、外部装置が故障して交換された場合であっても、電子制御装置が交換されなければ、電子制御装置に記憶されている制御対象識別情報が送信されることによって、交換後の外部装置に再び信頼性の高い制御対象識別情報を記憶することができる。
【0026】
なお、上述した異常時処理実行手段によって実行される異常時対応処理は、例えば、制御プログラムや制御データが制御対象に適合していない旨を報知する処理であることが考えられる。この場合、作業者は、書き換えた制御プログラム又は制御データが電子制御装置の制御対象に適合していないことを、電子制御装置の報知動作によって確実に知ることができ、適切な処置を講じることができる。適切な処置としては、例えばメモり書換装置を用いて再度制御プログラム又は制御データの書き換えを行う処置が挙げられる。
【0027】
また、異常時処理実行手段によって実行される異常時対応処理は、制御処理への移行を許可しない処理であることも考えられる。この場合、制御対象に不適合な制御プログラム又は制御データに基づいて制御処理が実行され、制御対象に何らかの悪影響が出ることを防止できる。
【0028】
異常時処理実行手段によって実行される異常時対応処理は、上述した処理に限られるわけではなく、その制御対象に合わせた個別の処理であることも考えられる。例えば制御対象がエンジンである場合、エンジンへの燃料カットを行いエンジンの運転を停止させる処理とすることが考えられる。この場合、利用者は、不適合な制御プログラムに基づくエンジン制御がなされた状態で車両を運転することがなくなるため、利用者の安全性を向上させることができる。
【0029】
ところで、上述した電子制御装置では、識別情報送信手段は、所定タイミングで制御対象識別情報を外部装置へ送信することが考えられる。ところが、外部装置が故障などで交換された場合には、なるべく早く制御対象識別情報を外部装置へ送信しておく必要がある。しかしながら、外部装置に制御対象識別情報が一度記憶されてしまった場合、電子制御装置から外部装置への制御対象識別情報の送信は無駄になってしまう。
【0030】
そこで、第2の構成のように、識別情報送信手段は、外部装置から制御対象識別情報の送信が要求されると、識別情報記憶手段に記憶した制御対象識別情報を外部装置へ送信するよう構成することが好ましい。この場合、識別情報送信手段は、外部装置の交換時等に外部装置から制御対象識別情報の送信要求があると、制御対象識別情報を外部装置へ送信する。これによって、外部装置の交換時等には制御対象識別情報が速やかに送信され、また、外部装置に既に制御対象識別情報が記憶されているにも拘わらず制御対象識別情報を送信するという無駄もなくなる。
【0031】
また、上述の電子制御装置は、外部装置から送信される制御対象識別情報を用いて一致判断するよう構成されていた。それは、上述したように、外部装置に記憶される制御対象識別情報は、電子制御装置から送信される信頼性の高いものだからである。ところで、電子制御装置が交換されないうちは、その電子制御装置に記憶された制御対象識別情報が同様に信頼性の高いものとなる。そこで、第5の構成のように、一致判断手段は、識別情報記憶手段から制御対象識別情報が読み出せる場合には、識別情報記憶手段に記憶された制御対象識別情報を用いてデータ適合対象識別情報との一致判断を行い、一方、識別情報記憶手段から制御対象識別情報が読み出せない場合には、識別情報受信手段によって受信された制御対象識別情報を用いてデータ適合対象識別情報との一致判断を行うよう構成するとよい。
【0032】
ここで識別対象記憶手段から制御対象識別情報が読み出せる場合とは、電子制御装置が交換されていない場合であり、一方、識別情報記憶手段から制御対象識別情報が読み出せない場合とは、何らかの要因で読み出しエラーとなってしまう場合や電子制御装置の故障によって電子制御装置が交換されてしまった場合である。
【0033】
このように識別情報記憶手段に記憶された制御対象識別情報を用いて一致判断をするようにすれば、外部装置とのデータ通信によって制御対象識別情報を取得する場合に比べて、その取得時間が短縮され、また、ノイズ等の影響を受けにくくなる点で有利である。
【0034】
ところで、上述の電子制御装置においては、外部装置が制御対象識別情報を送信してくると、識別情報受信手段がその制御対象識別情報を受信する構成であった。この場合、電子制御装置が制御対象識別情報を必要とするか否かに拘わらず、外部装置が制御対象識別情報を送信することが考えられる。このとき、外部装置から頻繁に制御対象識別情報が送信される場合には無駄な送受信が多くなってしまう。
【0035】
そこで、第6の構成のように、さらに、識別情報記憶手段から制御対象識別情報が読み出せない場合には、外部装置に対して制御対象識別情報の送信を要求する識別情報要求手段を備える構成とするとよい。この場合、制御対象識別情報が読み出せないと、識別情報要求手段が、外部装置に対して制御対象識別情報の送信を要求し、この送信要求に対して、外部装置から制御対象識別情報が送信されてくると、上述した識別情報受信手段が制御対象識別情報を受信する。従って、電子制御装置が必要とする場合に制御対象識別情報を受信できる可能性が高くなる。
【0036】
なお、例えば補給用の電子制御装置にあっては、識別情報記憶手段に制御対象識別情報が記憶されていないため、制御処理の実行に先だって、毎回、外部装置から受信した制御対象識別情報を用いて一致判断を行うことが必要となる。そこで、第7の構成のように、識別情報受信手段によって受信された制御対象識別情報を識別情報記憶手段に記憶するよう構成することが望ましい。これによって、外部装置から制御対象識別情報を一度受信すれば、識別情報記憶手段から制御対象識別情報が読み出せるため、外部装置からの制御対象識別情報を受信しなくてよくなる。
【0037】
ところで、電子制御装置の不揮発性メモリに記憶された制御プログラム又は制御データは、上述したように作業ミスで誤って書き換えられる場合も考えられるが、利用者が制御プログラム又は制御データの定数等を故意に書き換える場合も考えられる。例えば、エンジンを制御する電子制御装置では、車速の上限値を予め設定しておき、車速がその上限値を越えた場合には、燃料をカットするというような制御を行うのが一般的であるが、このとき、利用者が、予め設定された車速の上限値を故意に書き換えることが考えられる。
【0038】
このような利用者による不正な制御プログラム又は制御データの書き換えを防止するため、第8の構成のように、データ適合対象識別情報は、制御プログラム及び制御データを構成するコードから唯一決定されるものとするとよい。ここで制御プログラム及び制御データを構成するコードから唯一決定されるものは、例えばチェックサムが挙げられる。つまり、制御プログラム又は制御データの一部を変更しただけでも値が変わってくるような情報をデータ適合対象識別情報としておくのである。例えば、データ適合対象識別情報を制御プログラム又は制御データのチェックサムとしておけば、一部のコードが不正に書き換えられた場合にもデータ対象識別情報が変わるために不一致判断がなされ、制御の実行に先だって所定処理が実行される。その結果、上述したように利用者が故意に制御プログラム又は制御データの書き換えを行うことを防止することができる。
【0039】
なお、メーカー側が正規に制御プログラム又は制御データを書き換える場合には、新たな制御プログラム及び制御データのチェックサムが、書き換え前の制御プログラム及び制御データのチェックサムと一致するように、制御処理の実行に影響しないダミーコードを含めて制御プログラム又は制御データを作成すればよい。
【0040】
ところで、1〜8に示した構成に加えて、第9の構成のように、さらに、外部装置としての他の電子制御装置から送信されてくる当該他の電子制御装置の制御対象を示す識別情報である外部情報を受信する外部情報受信手段と、外部情報受信手段によって受信された外部情報を記憶するための外部情報記憶手段と、外部情報記憶手段に記憶された外部情報を他の電子制御装置へ送信する外部情報送信手段とを備え、他の電子制御装置に対する外部装置としても動作可能に構成することが考えられる。
【0041】
この場合、外部情報受信手段が、外部装置としての他の電子制御装置の識別情報送信手段によって送信されてくる当該他の電子制御装置の制御対象を示す外部情報を受信する。受信された外部情報は、外部情報記憶手段に記憶され、外部情報送信手段によって外部装置へ送信される。その結果、本発明の電子制御装置は、他の電子制御装置に対して上述した外部装置としても動作することになる。
【0042】
例えば、このように構成されたX,Yの2台の電子制御装置を考えると、Y電子制御装置がX電子制御装置に対する外部装置として動作すると共に、X電子制御装置がY電子制御装置に対する外部装置として動作することになる。つまり、X電子制御装置は、X電子制御装置の制御対象を示す制御対象識別情報を外部装置としてのY電子制御装置へ送信することによってY電子制御装置に記憶される制御対象識別情報を用いて一致判断を行うことができ、一方、Y電子制御装置は、Y電子制御装置の制御対象を示す制御対象識別情報を外部装置としてのX電子制御装置へ送信することによってX電子制御装置に記憶される制御対象識別情報を用いて一致判断を行うことができるのである。
【0043】
ここで外部装置としてのY電子制御装置から当該Y電子制御装置の制御対象を示す識別情報である外部情報をX電子制御装置が受信する場合を考える。
このとき、Y電子制御装置は、所定の間隔で繰り返し外部情報を送信することが考えられる。ところで、X電子制御装置が交換された場合を考えれば、Y電子制御装置は、なるべく早いタイミングでX電子制御装置の外部情報記憶手段に外部情報を記憶させるよう比較的短い間隔で外部情報を送信することが望ましい。その理由は、X電子制御装置に外部情報が記憶される前にY電子制御装置も交換されてしまうと、Y電子制御装置及びX電子制御装置のいずれにも外部情報がなくなってしまうからである。そうかと言って、あまり短い間隔で外部情報を送信すれば、外部情報がX電子制御装置に一度記憶された後では、無駄な送受信が多くなってしまう。
【0044】
そこで、第10の構成のように、さらに、外部情報記憶手段に外部情報が記憶されていない場合には、他の電子制御装置へ外部情報の送信を要求する外部情報要求手段を備える構成とすることが考えられる。ここで外部情報記憶手段に外部情報が記憶されていない場合は、上述したように電子制御装置が故障等によって交換された場合等が考えられる。この場合、外部情報要求手段が他の電子制御装置へ外部情報の送信を要求する。この送信要求に対して他の電子制御装置が外部情報を送信すれば、その外部情報は速やかに記憶されることになり、上述したような送受信の無駄もなくなる。
【0045】
また、ノイズ等の影響によって他の電子制御装置から送信された外部情報が正確に受信されない可能性も考えられる。このような可能性が高くなれば、Y電子制御装置における一致判断に用いられる外部情報、すなわちY電子制御装置の制御対象を示す制御対象識別情報の信頼性が低下することになる。
【0046】
そこで、第11の構成のように、外部情報受信手段によって外部情報が受信された場合、外部情報の再送信を要求するように、上述した外部情報要求手段を構成すると共に、最初に受信された外部情報と、再送信要求に基づき受信された外部情報とが一致しているか否かを判断し、一致している場合に外部情報を外部情報記憶手段に記憶する外部情報記憶制御手段を備える構成としてもよい。例えば、X電子制御装置の外部情報要求手段は、Y電子制御装置からの外部情報を受信した場合、Y電子制御装置へ外部情報の再送信を要求し、この要求に応じて、Y電子制御装置から外部情報が再び送信されてくると、X電子制御装置の外部情報記憶制御手段は、最初に受信した外部情報と再送信を要求して受信した外部情報との一致を判断して、一致している場合に外部情報を記憶するという具合である。その結果、X電子制御装置に記憶されるY電子制御装置の制御対象を示す制御対象識別情報の信頼性を向上させることができる。
【0047】
また、X電子制御装置が、外部装置としてのY電子制御装置へY電子制御装置の制御対象を示す識別情報である外部情報を送信する場合を考える。X電子制御装置の外部情報送信手段は、外部情報記憶手段に記憶したY電子制御装置の外部情報を例えば所定の間隔で繰り返しY電子制御装置へ送信することも考えられるが、このような送信が頻繁に行われると送受信の無駄が多くなる。
【0048】
そこで、第12の構成のように、外部情報送信手段は、外部装置から外部情報の送信要求があると、外部情報記憶手段に記憶した外部情報を送信するよう構成するとよい。例えばX,Yの2台の電子制御装置で説明すれば、X電子制御装置の外部情報送信手段は、Y電子制御装置による外部情報の送信要求があると、外部情報記憶手段に記憶したY電子制御装置の外部情報を送信するという具合である。その結果、Y電子制御装置は、外部情報、すなわちY電子制御装置の制御対象識別情報を必要とする場合にその外部情報を取得することができる。
【0049】
以上、1〜12の構成では電子制御装置の発明として説明したが、9〜12の構成のように他の電子制御装置に対する外部装置としても動作するような電子制御装置を考えれば、第13の構成のように、9〜12のいずれか構成の電子制御装置を複数台備えることによって、各電子制御装置に対して少なくとも他の1台の電子制御装置が外部装置として動作するよう構成した電子制御システムの発明として実現することができる。
【0050】
この場合、複数台の電子制御装置の中で、各電子制御装置に対して少なくとも他の1台の電子制御装置が外部装置として動作する。すなわち、一の電子制御装置の制御対象を示す制御対象識別情報は、少なくとも他の1台の電子制御装置に待避されることになる。ここで、一の電子制御装置の制御対象識別情報が他の2台以上の電子制御装置に待避される場合、その一の電子制御装置と、外部装置として動作する2台以上の電子制御装置とが全て同時に交換されない限りその電子制御装置の制御対象識別情報は消失しないため、その信頼性を高く維持することができる。さらに各電子制御装置の制御対象識別情報を他の全ての電子制御装置に待避させるようにすれば、全ての電子制御装置が同時に交換されない限り各電子制御装置の制御対象識別情報は消失しないことになり、さらにその信頼性を高く維持できる。
【0051】
【発明の実施の形態】
以下、本発明を具体化した実施形態を図面を参照して説明する。
[第1実施形態]
図1は、第1実施形態の電子制御システム1の電気的な構成を示すブロック図である。図1には、電子制御装置(以下「ECU」という。)10と、このECU10と共に車両に搭載される「外部装置」としてのイグニッションキー部50と、ECU10に接続されたメモリ書換装置80とが示されている。ここで、ECU10は、自動車に搭載されて内燃機関型エンジンの制御を行う。メモリ書換装置80は、ECU10に内蔵されたエンジン制御用のプログラムやデータを書き換える際にECU10に接続される。
【0052】
図1に示すように、ECU10は、エンジンの運転状態に応じた信号を出力する種々のセンサからの信号を入力する入力回路13と、入力回路13からの信号に基づきエンジンに対する最適制御量を演算し、その演算結果に基づき制御信号を出力するCPU11と、CPU11からの制御信号を受けて、エンジンに取付けられたインジェクタやイグナイタ等のアクチュエータを駆動する出力回路14と、CPU11が制御を行うのに必要なデータを格納するEEPROM12と、メモリ書換装置80及びイグニッションキー部50との間でシリアルデータ通信を行うための入出力ポート15とを備えている。この入出力ポート15には、ECU10からの信号を受けて点灯するワーニングランプ31が接続されている。ワーニングランプ31は、例えば車室内のインストメントパネルに設けることが考えられる。さらに、CPU11は、エンジンを制御するのに必要な制御プログラム及び制御データを格納するフラッシュEEPROM(以下「フラッシュROM」という。)11と、バッテリからの電源供給によって、車両のイグニッションスイッチのオフ時にも、格納されたデータを保持可能なスタンバイRAM11bとを内蔵している。
【0053】
ここで、CPU11の内蔵するフラッシュROM11aは、電気的にデータの消去及び書き込みが可能な不揮発性メモリであり、このフラッシュROM11aには、エンジン制御用の制御プログラム及び制御データが、既に格納されている。そして、図2に示すように、フラッシュROM11aに格納された制御プログラム及び制御データは、コード(プログラムコード、データコード)で構成される。このコードには、制御に影響しないダミーコードが含まれており、制御プログラム及び制御データを作成する際、このダミーコードを調整することによって、コードのチェックサムが、当該制御プログラム及び制御データに適合するエンジンの型式を示す識別コードとなるようにしている。なお、この識別コードが、制御プログラム及び制御データに適合する制御対象を示す識別情報である「データ適合対象識別情報」に相当する。
【0054】
また、EEPROM12も、電気的にデータの消去及び書き込みが可能な不揮発性メモリである。このEEPROM12及びCPU11の内蔵するスタンバイRAM11bには、ECU10が制御するエンジンの型式を示す識別コードが記憶されている。本第1実施形態では、このようにスタンバイRAM11b及びEEPROM12の両方に識別コードを記憶しておき、スタンバイRAM11bをアクセスして識別コードを読み出し、スタンバイRAM11bに記憶された識別コードが消失した場合に、EEPROM12をアクセスし、EEPROM12に記憶された識別コードをスタンバイRAM11bにコピーする。なお、この識別コードが、ECU10の制御対象を示す識別情報である「制御対象識別情報」に相当する。そして、この識別コードを記憶するスタンバイRAM11b及びEEPROM12が「識別情報記憶手段」に相当する。
【0055】
以下、上述した両識別コードを区別するために、制御プログラム及び制御データに適合するエンジンの型式を示す識別コードをA識別コードと記述し、ECU10の制御対象を示す識別コードをB識別コードと記述することとする。なお、本第1実施形態では、識別コードは、型式の異なるエンジンを区別するように設定されるものであるが、車種名や車のグレード名、あるいは車の仕向地等を区別するように設定されるものであってもよい。
【0056】
メモリ書換装置80は、ECU10にフラッシュROM11aの書き換えを行わせるためのものであり、フラッシュROM11aに書き込むために用意される新たな制御プログラム及び制御データを、フロッピーディスク,ハードディスク,CD−ROM,メモリカートリッジ等に記憶している。メモリ書換装置80は、作業者によって所定の操作が行われると、電子制御装置へ書き換え指令を送信した後、上述した記憶媒体に記憶されている新たな制御プログラムや制御データをECU10へ送信する。ECU10は、メモリ書換装置80からの書き換え指令に対し、後述するように、フラッシュROM11aの内容を書き換えるように動作する。
ここで、CPU11のフラッシュROM11aに既に格納された制御プログラム及び制御データと全く同様に、メモリ書換装置80に記憶される新たな制御プログラム及び制御データも、図2に示すように、制御プログラム及び制御データを構成するコードのチェックサムが、当該制御プログラム及び制御データに適合するエンジンの型式を示すA識別コードとなっている。
【0057】
そして、このようなメモリ書換装置80とECU10との接続は、接続用コネクタ91を介して、互いの通信ライン92がそれぞれ接続されることにより行われる。すなわち、接続用コネクタ91が嵌合されると、通信ライン92を介して、メモリ書換装置80とECU10との間における双方向のシリアル通信が可能となる。
【0058】
また、イグニッションキー部50は、イグニッションキー60と、このイグニッションキー60を挿入して車両のイグニッションスイッチをオン/オフするためのキーシリンダ70とから構成されている。本第1実施形態におけるキーシリンダ70は通信用の電子制御装置(以下「通信用ECU」という。)71を備えており、この通信用ECU71は、図1に示すようにECU10の入出力ポート15に通信ライン93を介して接続され、ECU10との間で双方向のシリアル通信を行うように構成されている。イグニッションキー60には、EEPROM61が搭載されている。上述したキーシリンダ70の通信用ECU71は、さらに、イグニッションキー60との間で無線による通信を行う構成となっており、ECU10へB識別コードの送信を要求し、ECU10から送信されてくるB識別コードを受信してイグニッションキー60のEEPROM61へ記憶する。また、ECU10からB識別コードの送信要求があると、イグニッションキー60のEEPROM61に記憶したデータを読み出してECU10へ送信する。この動作については後述する。なお、イグニッションキー部50とECU10とのデータ通信の構成は公知であるため詳しい構成の説明は省略する。
【0059】
このように構成されたECU10のCPU11は、車両のイグニッションスイッチがオンされて、ECU10内の電源回路(図示省略)から動作電圧(5V)が供給されると、リセット状態から動作を開始する。動作を開始した際にメモリ書換装置80からの書き換え指令としての書換要求信号を受信すると、フラッシュROM11a内の制御プログラムをコールすることなく、フラッシュROM11aに格納されている現在の制御プログラム及び制御データを、その後メモリ書換装置80から送信されて来る新たな制御プログラム及び制御データに書き換える。このような動作によって、ECU10のフラッシュROM11aに格納される制御プログラム及び制御データは、メモリ書換装置80に記憶された新たな制御プログラム及び制御データに書き換えられる。
【0060】
また、CPU11は、メモリ書換装置80が接続されていない通常時にあっては、フラッシュROM11a内の制御プログラムをコールして、エンジンの制御を行うのであるが、この制御プログラムの最初の処理において、すなわちフラッシュROM11a内の制御プログラム及び制御データに基づくエンジンの制御処理の実行に先だって、フラッシュROM11a内の制御プログラム及び制御データがエンジンの型式に適合しているか否かを判断し、適合していない場合には異常時対応処理を実行する。
【0061】
次に、図3及び図4に示すフローチャートに基づいて、上述したイグニッションキー部50のキーシリンダ70の備える通信用ECU71にて実行される処理を説明する。
図3は、コード要求処理を示すフローチャートである。この処理は、例えば8msというような所定タイミングで実行されるものである。
【0062】
まず最初のステップS400において、コード記憶フラグFeが「0」またはコード送信要求フラグFrが「1」であるか否かを判断するものである。両フラグFe,Frは「0」又は「1」のいずれかの値をとる。通信用ECU71は、イグニッションキー60のEEPROM61にECU10からのB識別コードを記憶するとコード記憶フラグFeを「1」にセットする。また、通信用ECU71は、後述するコード記憶処理においてB識別コードの再送信を要求する際、コード送信要求フラグFrを「1」にセットする。従って、この処理は、イグニッションキー60のEEPROM61にECU10からのB識別コードが記憶されていない場合、または、ECU10へB識別コードの再送信の要求がある場合を判断するものである。ここでFe=0又はFr=1である場合(S400:YES)、S410へ移行する。一方、Fe=1かつFr=0である場合(S400:NO)、本コード要求処理を終了する。
【0063】
S410では、ECU10へB識別コードの送信要求を出力する。その後、本コード要求処理を終了する。
図4は、コード記憶処理を示すフローチャートである。この処理は、ECU10からB識別コードを受信した場合に実行されるものである。
【0064】
まず最初のステップS500において、コード記憶フラグFeが「1」であるか否かを判断する。上述したようにコード記憶フラグFeは、イグニッションキー60のEEPROM61にECU10からのB識別コードが記憶されると「1」にセットされる。ここでFe=1である場合(S500:YES)、すなわち既にイグニッションキー60のEEPROM61にB識別コードが記憶されている場合には、本コード記憶処理を終了する。一方、Fe=0である場合(S500:NO)、すなわちイグニッションキー60のEEPROM61にB識別コードが記憶されていない場合には、S510へ移行する。
【0065】
S510では、コード受信フラグF1が「0」であるか否かを判断する。コード受信フラグF1は、ECU10から送信されてくるB識別コードを最初に受信して記憶したときに「1」にセットされる。従って、この処理は、ECU10からのB識別コードを1回も受信していない場合を判断するものである。ここでF1=0である場合(S510:YES)、S530へ移行する。一方、F1=1である場合(S510:NO)、すなわちB識別コードの受信が2回目以降である場合には、S520へ移行する。
【0066】
S520では、前回受信したB識別コードと今回受信したB識別コードとが一致しているか否かを判断する。この処理は、データ通信途中のノイズ等の影響によるデータエラーの発生を確認するものである。ここで一致している場合(S520:YES)、S550へ移行する。一方、一致していない場合(S520:NO)、S530へ移行する。
【0067】
S530では、コード送信要求フラグFrを「1」にセットする。その結果、図3に示したコード要求処理のS400において肯定判断されることになり、ECU10へB識別コードの再送信が要求されることになる。
S540では、今回受信したB識別コードを一時的に記憶する。本第1実施形態では、通信用ECU71の内部RAM(図示省略)に記憶する。また、コード受信フラグF1を「1」にセットする。その後、本コード記憶処理を終了する。
【0068】
一方、S520で肯定判断された場合に移行するS550では、受信したコードを不揮発性のメモリに記憶する。本第1実施形態では、イグニッションキー60のEEPROM61に記憶する。その後、本コード記憶処理を終了する。
次に、図5に示すフローチャートに基づいて、図3及び図4のフローチャートを用いて説明した通信用ECU71にて実行される処理に対応するECU10のCPU11にて実行される送信処理を説明する。この送信処理は、例えば16msというような所定タイミングで実行されるものである。
【0069】
まず最初のステップS600において、コード送信済フラグFsが「0」、又は、コード送信要求フラグFrが「1」であるか否かを判断する。両方のフラグFs,Frは、それぞれ「0」あるいは「1」のいずれかの値をとる。コード送信済フラグFsは、ECU10のEEPROM12及びスタンバイRAM11bに記憶されたB識別コードを一度でも送信すると「1」にセットされる。また、コード送信要求フラグFrは、上述した図3中のS410にて通信用ECU71からB識別コードの送信要求があった場合に「1」にセットされる。従って、この処理は、B識別コードを一度も送信していない場合、又は、B識別コードの送信要求があった場合を判断するものである。ここでFs=0又はFr=1である場合(S600:YES)、S610へ移行する。一方、Fs=1かつFr=0である場合(S610:NO)、本送信処理を終了する。
【0070】
S610では、エンジン回転数NE=0で、かつ、スタータSTA=OFFであるか否かを判断する。この処理は、入力回路13を介して入力されるセンサからの信号に基づく判断処理であり、ノイズの少ない状態であるか否かを判断するものである。ここでNE=0かつSTA=OFFである場合(S610:YES)、S620へ移行する。一方、NE≠0またはSTA=ONである場合(S620:NO)、本送信処理を終了する。
【0071】
S620では、B識別コードが「0」であるか否かを判断する。この処理は、スタンバイRAM11b及びEEPROM12の両方にB識別コードが記憶されていない場合、あるいは、スタンバイRAM11bの故障などによってB識別コードが読み出せない場合を判断するものである。ここでB識別コード=0である場合(S620:YES)、本送信処理を終了する。一方、B識別コード≠0である場合(S620:NO)、S630へ移行する。
【0072】
S630では、イグニッションキー部50のキーシリンダ70の備える通信用ECU71へB識別コードを送信する。通信用ECU71は、送信されるB識別コードを受信すると図4のフローチャートに示したコード記憶処理を実行することになる。続くS630では、コード送信済フラグFsを「1」にセットし、このコード送信済フラグFsをECU10のスタンバイRAM11b及びEEPROM12に記憶して、その後、本送信処理を終了する。
【0073】
以上説明した通信用ECU71及びECU10にて実行される処理によって、ECU10のスタンバイRAM11b及びEEPROM12に記憶されたECU10の制御対象であるエンジンの型式を示すB識別コードがイグニッションキー部50のイグニッションキー60に搭載されたEEPROM61に記憶される。
【0074】
次に、図6、図7及び図8に示すフローチャートに基づいて、ECU10のCPU11にて、エンジン制御処理の実行に先だって実行される処理を説明する。図6はECU10のCPU11にて実行される送信要求処理を示すフローチャートである。この処理は、上述したように、制御プログラムをコールした直後に実行されるものである。
【0075】
まず最初のステップS100において、B識別コードが「0」であるか否かを判断する。この処理は、図5中のS620と同様、スタンバイROM12及びEEPROM12の両方にB識別コードが記憶されていない場合、あるいは、スタンバイRAM11bの故障などによってB識別コードが読み出せない場合を判断するものである。ここでB識別コード=0である場合(S100:YES)、S110へ移行する。一方、B識別コード≠0である場合(S100:NO)、本送信要求処理を終了する。
【0076】
S110では、イグニッションキー部50のキーシリンダ70の備える通信用ECU71へB識別コードの送信を要求する。その後、本送信要求処理を終了する。通信用ECU71へB識別コードの送信を要求すると、通信用ECU71は、イグニッションキー60との間で無線による通信を行うことによってイグニッションキー60のEEPROM61に記憶されているB識別コードを取得し、このB識別コードをECU10へ送信する。
【0077】
続いて図7に示すフローチャートに基づき、ECU10のCPU11にて実行される受信処理を説明する。この受信処理は、上述したように図6中のS110にてキーシリンダ70の備える通信用ECU71に対してB識別コードの送信を要求した結果、通信用ECU71から送信されてくるB識別コードを受信するものである。
【0078】
まず最初のステップS200において、ECU10の入出力ポート15に入力される通信用ECU71からの信号がスタートビットであるか否かを判断する。この処理は、通信ライン93を介して送信されるB識別コードの受信開始を判断するものである。ここでスタートビットであると判断された場合(S200:YES)、S210へ移行する。一方、スタートビットでないと判断された場合(S200:NO)、スタートビットが判断されるまで、S200の判断処理を繰り返す。
【0079】
S210では、受信信号を記憶する。そして、続くS220では、ストップビットであるか否かを判断する。この処理は、通信ライン93を介して送信されるB識別コードの受信終了を判断するものである。ここでストップビットであると判断された場合(S220:YES)、S230にて、記憶した一連の受信信号をB識別コードとしてスタンバイRAM11b及びEEPROM12に記憶し、その後、本受信処理を終了する。一方、ストップビットでないと判断された場合(S220:NO)、受信が完了していないため、上述のS210からの処理を繰り返す。
【0080】
さらに続けて、図8に示すフローチャートに基づき、ECU10のCPU11にて実行される一致判断処理を説明する。この一致判断処理は、上述した受信処理に続いて、又は、送信要求処理において送信要求がなされなかった場合には送信要求処理に続いて実行されるものである。
【0081】
まず最初のステップS300において、チェックフラグXCが「1」であるか否かを判断する。チェックフラグXCは、「0」又は「1」のいずれかの値を取るフラグであり、車両のイグニッションスイッチがオンされた直後は「0」となっている。ここでXC=1であると判断された場合(S300:YES)、本一致判断処理を終了する。一方、XC=0であると判断された場合(S300:NO)、S310へ移行する。
【0082】
S310では、エンジン回転数NE=0で、かつ、スタータSTA=OFFであるか否かを判断する。この処理は、入力回路13を介して入力されるセンサからの信号に基づく判断処理であり、ノイズの少ない状態であるか否かを判断するものである。ここでNE=0かつSTA=OFFである場合(S310:YES)、S320へ移行する。一方、NE≠0またはSTA=ONである場合(S320:NO)、本一致判断処理を終了する。
【0083】
S320では、A識別コードを作成する。上述したように、A識別コードは、制御プログラム及び制御データの適合するエンジンの型式を示す識別コードであり、制御プログラム及び制御データを構成するコードのチェックサムである。従って、この処理は、CPU11に内蔵されたフラッシュROM11aに記憶されている制御プログラム及び制御データからチェックサムを作成するものである。
【0084】
続くS330では、A識別コードとB識別コードとが一致しているか否かを判断する。つまり、CPU11の内蔵するフラッシュROM11aに記憶された制御プログラム及び制御データに適合するエンジンの型式と、ECU10の制御対象であるエンジンの型式と同一であるか否かを判断するのである。ここで、A識別コード=B識別コードである場合(S330:YES)、S350にてチェックフラグXCに「1」を代入し、その後、本一致判断処理を終了する。一方、A識別コード≠B識別コードである場合(S330:NO)、S340にて入出力ポート15に接続されたワーニングランプ31を点灯し、その後、本一致判断処理を終了する。
【0085】
本一致判断処理終了後、制御プログラム及び制御データに基づきエンジンの制御を行うための制御処理が実行される。
なお、以上説明した処理を実行するECU10のCPU11が、「識別情報送信手段」、「識別情報受信手段」、「識別情報要求手段」、「一致判断手段」及び「異常時処理実行手段」に相当し、図5中のS600〜S640の処理が識別情報送信手段としての処理に相当し、図6中のS100及びS110の処理が識別情報要求手段としての処理に相当し、図7中のS200〜S220の処理が識別情報受信手段としての処理に相当し、図8中のS330の処理が一致判断手段としての処理に相当し、図8中のS340の処理が異常時処理実行手段としての処理に相当する。
【0086】
次に本第1実施形態の電子制御システム1の発揮する効果を説明する。
本第1実施形態のECU10では、制御プログラム及び制御データを構成するコードのチェックサムがその制御プログラム及び制御データに適合するエンジンの型式を示すA識別コードとなっており(図2参照)、制御プログラム及び制御データに基づく制御処理の実行に先だって、その制御プログラム及び制御データからA識別コードを作成し(図8中のS320)、作成したA識別コードとECU10の制御対象であるエンジンの型式を示すB識別コードとが一致しているか否かを判断し(図8中のS330)、一致していない場合には(図8中のS330:NO)、ワーニングランプ31を点灯させる。(図8中のS340)。従って、本第1実施形態のECU10によれば、メモリ書換装置80によって書き換えを行う作業者は、CPU11に内蔵されたフラッシュROM11aに書き込んだ制御プログラム又は制御データがエンジンの型式に適合していないことを、ワーニングランプ31の点灯によって確実に知ることができ、適切な処置を講じることができる。例えばメモり書換装置80を用いて再度制御プログラム又は制御データの書き換えを行うという具合である。
【0087】
また、本第1実施形態では、車両の工場出荷時に、ECU10の制御するエンジンの型式を示すB識別コードをECU10内のスタンバイRAM11b及びEEPROM12に記憶される。そして、このB識別コードをECU10と共に車両に搭載されるイグニッションキー部50へ送信することによって(図5中のS630)、ECU10内のスタンバイRAM11b及びEEPROM12に記憶しておくだけでなく、イグニッションキー部50のイグニッションキー60に搭載されたEEPROM61にも記憶しておく。
【0088】
そして、スタンバイRAM11bからB識別コードが読み出せない場合には(図6中のS100:YES)、イグニッションキー60のEEPROM61に記憶されているB識別コードを用いて上述した一致判断を行う。その結果、ECU10内のスタンバイRAM11b及びEEPROM12にB識別コードが記憶されていなくても、CPU11に内蔵されたフラッシュROM11aに書き込んだ制御プログラム又は制御データがエンジンの型式に適合していないことを判断でき、ワーニングランプ31を点灯させることができる。従って、ECU10の故障時に交換される補給用のECU10のスタンバイRAM11b及びEEPROM12にB識別コードを予め記憶しておく必要がない。すなわち、車両に搭載される以前にECU10の制御するエンジンの型式は特定されないことになる。これによって、補給用のECU10をエンジンの型式によって区別することなく共通化することができる。
【0089】
一方、スタンバイRAM11bからB識別コードが読み出せる場合には(図3中のS100:NO)、スタンバイRAM11bに記憶されたB識別コードを用いて上述した一致判断を行う。つまり、原則としては、ECU10内にB識別コードを記憶しておき、このECU10内のB識別コードを一致判断に用いるのである。その結果、相対的に取得に時間がかかり、ノイズの影響を受け易いイグニッションキー部50からのB識別コードの取得回数を減少させることができる。
【0090】
さらにまた、本第1実施形態のECU10では、スタンバイRAM11bからB識別コードが読み出せない場合に(図6中のS100)、イグニッションキー部50のキーシリンダ70の備える通信用ECU71へ送信要求を行い(図6中のS110)、この送信要求に対応してイグニッションキー部50から送信されてくるB識別コードを受信する(図7中のS200,S210,S220)。つまり、通信用ECU71は、ECU10からの送信要求があった場合にだけB識別コードを送信し、ECU10は、B識別コードの送信を要求したときだけ受信処理を実行する。また、ECU10では、受信したB識別情報をECU10内のCPU11に内蔵されるスタンバイRAM11b及びEEPROM12に記憶する(図4中のS230)。従って、例えばECU10の交換後であるため、スタンバイRAM11b及びEEPROM12にB識別コードが記憶されていない場合、一度イグニッションキー部50からのB識別コードを受信した後は、ECU10内のスタンバイRAM11b及びEEPROM12に記憶されたB識別コードを用いて一致判断をすることになる。このように本第1実施形態のECU10では、送受信処理を減少させることができる。
【0091】
また、イグニッションキー部50が故障等によって交換されてしまい、イグニッションキー60のEEPROM61に記憶されたB識別コードが消失してしまった場合には(S400:YES)、イグニッションキー部50のキーシリンダ70の備える通信用ECU71がB識別コードの送信をECU10に対して要求する(図3中のS410)。また、通信用ECU71は、B識別コードを最初に受信すると(S510:YES)、B識別コードの再送信を要求し、前回受信したB識別コードと再送信されたB識別コードとの一致を判断して(図4中のS520)、一致した場合にイグニッションキー60のEEPROM61へ記憶する(図4中のS550)。これによって、イグニッションキー部50が交換されてしまった場合であっても、確実に信頼性の高いB識別コードがイグニッションキー60のEEPROM61に記憶されることになる。つまり、本第1実施形態のECU10においては、イグニッションキー部50及びECU10の両方が同時に交換されてしまわない限りB識別コードが消失してしまうことがなく、また、B識別コードの信頼性を高く保持することができる。その結果、このB識別コードに基づく一致判断処理の信頼性が向上させることができる。
【0092】
また、本第1実施形態においては、制御プログラム及び制御データに適合するエンジンの型式を示すA識別情報を、その制御プログラム及び制御データを構成するコードのチェックサムとしている。そのため、制御プログラム及び制御データの一部を不正に書き換えた場合、チェックサム、すなわちA識別コードが変更されることになる。従って、利用者が故意に制御プログラム又は制御データを書き換えることを防止することができる。なお、制御プログラム及び制御データを構成するコードには、図2に示したように制御処理の実行に影響しないダミーコードが含まれている。従って、正規に制御プログラム又は制御データを作成する場合には、このダミーコードを調節することによって、新たな制御プログラム及び制御データのチェックサムを、書き換え前の制御プログラム及び制御データのチェックサムと一致させる。
【0093】
さらにまた、本第1実施形態のECU10では、CPU11の内蔵するスタンバイRAM11b及びEEPROM12の両方にB識別コードを記憶しておき、スタンバイRAM11bをアクセスするようにしており、スタンバイRAM11bに記憶されたB識別コードが消失した場合に、EEPROM12に記憶されたB識別コードをコピーするようにしている。これによって、アクセス回数に限界があるEEPROM12へのアクセス回数を減らすことができる。
[第2実施形態]
上記第1実施形態では、ECU10の制御対象であるエンジンの型式を示すB識別コードを記憶させる外部装置としてイグニッションキー部50を採用した構成であった。このイグニッションキー部50に代えて、ECU10と共に車両に搭載され、所定の制御対象を制御する別のECUを外部装置として採用することも考えられる。
【0094】
図9は、第2実施形態の電子制御システム2の電気的な構成を示すブロック図である。図9には、2台の電子制御装置(以下「ECU」という。)10,20と、メモリ書換装置80と、ワーニングランプ31,32とが示されている。2台のECU10,20は、通信ライン94を介してデータ通信可能な状態で自動車に搭載される。そして、一方のECU10は、内燃機関型エンジンの制御を行い、他方のECU20は、ブレーキ装置の制御、いわゆるアンチスキッド制御を行う。メモリ書換装置80は、ECU10,20に内蔵されたエンジン制御用又はブレーキ制御用のプログラムやデータを書き換える際にECU10,20に接続される(図9ではECU10に接続されている。)。なお、2台のECU10,20を区別するため、X−ECU10、Y−ECU20と以下記述する。
【0095】
なお、X−ECU10のハード構成については、上記第1実施形態におけるECU10のハード構成と全く同様であるため、ここでの説明は省略する。
また、Y−ECU20は、上述したようにブレーキ装置を制御するのであるが、ハード構成については、X−ECU10と同様になっている。すなわち、車速センサ等の種々のセンサからの信号を入力する入力回路23と、入力回路23からの信号に基づき演算を行い、ブレーキ油圧の制御信号を出力するCPU21と、CPU21からの制御信号を受けてアクチュエータを駆動する出力回路24と、CPU21が制御を行うのに必要なデータを格納するEEPROM22と、メモリ書換装置80及びX−ECU10との間でデータ通信を行うための入出力ポート25とを備えている。また、入出力ポート25にはY−ECU20からの信号を受けて点灯するワーニングランプ32が接続され、CPU21には、ブレーキ装置を制御するのに必要な制御プログラム及び制御データを格納するフラッシュROM21aと、バッテリからの電源供給によって、車両のイグニッションスイッチのオフ時にも、格納されたデータを保持可能なスタンバイRAM21bとを内蔵している。
【0096】
上記第1実施形態と同様に、X−ECU10のCPU11に内蔵されたフラッシュROM11aには、エンジン制御用の制御プログラム及び制御データが、既に格納されている。そして、図2に示すように、フラッシュROM11aに格納された制御プログラム及び制御データは、コード(プログラムコード、データコード)で構成される。このコードには、制御に影響しないダミーコードが含まれており、制御プログラム及び制御データを作成する際、このダミーコードを調整することによって、コードのチェックサムが、当該制御プログラム及び制御データに適合するエンジンの型式を示す識別コードとなるようにしている。以下、この識別コードをA識別コードと記述する。
【0097】
また、X−ECU10のEEPROM12及びCPU11に内蔵されたスタンバイRAM11bには、X−ECU10が制御するエンジンの型式を示す識別コードが記憶されている。本第2実施形態においても、上記第1実施形態と同様に、スタンバイRAM11b及びEEPROM12の両方に識別コードを記憶しておき、通常時は、スタンバイRAM11bをアクセスして識別コードを読み出し、スタンバイRAM11bに記憶された識別コードが消失した場合に、EEPROM12をアクセスし、EEPROM12に記憶された識別コードをスタンバイRAM11bにコピーする。以下、この識別コードをB識別コードと記述する。
【0098】
さらにまた、Y−ECU20のCPU21に内蔵されるフラッシュROM21aには、ブレーキ装置制御用の制御プログラム及び制御データが、既に格納されている。そして、X−ECU10のフラッシュROM11aに記憶された制御プログラム及び制御データと同様に、図2に示す如く、ダミーコードを含むコードで構成されており、コードのチェックサムが、適合するブレーキ装置の型式を示す識別コードとなるようにしている。以下、この識別コードをC識別コードと記述する。
【0099】
また、Y−ECU20のEEPROM22及びCPU21の内蔵するスタンバイRAM21には、Y−ECU20が制御するブレーキ装置の型式を示す識別コードが記憶されている。以下、この識別コードをD識別コードと記述する。なお、ここで、スタンバイRAM21bに記憶された識別コードが消失するとEEPROM22がアクセスされる点は、X−ECU10と同様である。
【0100】
なお、本第2実施形態では、識別コードは、型式の異なるエンジン及びブレーキ装置を区別するように設定されるものであるが、車種名や車のグレード名、あるいは車の仕向地等を区別するように設定されるものであってもよい。
メモリ書換装置80は、上記第1実施形態と同様に構成されており、メモリ書換装置80に記憶される新たな制御プログラム及び制御データも、図2に示すように、制御プログラム及び制御データを構成するコードのチェックサムが、当該制御プログラム及び制御データに適合するエンジンやブレーキ装置の型式を示す識別コードとなっている。
【0101】
このように構成されたX−ECU10のCPU11及びY−ECU20のCPU21は、車両のイグニッションスイッチがオンされて、X−ECU10及びY−ECU20内のそれぞれの電源回路(図示省略)から動作電圧(5V)が供給されると、リセット状態から動作を開始する。
【0102】
上記第1実施形態では、ECU10に対する外部装置としてのイグニッションキー部50の通信用ECU71が、図3及び図4のフローチャートに示す処理を実行し、ECU10は、図5〜図8のフローチャートに示す処理を実行した。
これに対して、本第2実施形態では、X−ECU10に対する外部装置としてのY−ECU20のCPU21が、上記第1実施形態のイグニッションキー部50の通信用ECU71にて実行される処理と同様の処理、すなわち図3及び図4のフローチャートに示した処理と同様の処理を実行する。一方、X−ECU10のCPU11は、上記第1実施形態のECU10のCPU11にて実行される処理と同様の処理、すなわち図5〜図8のフローチャートに示した処理と同様の処理を実行する。
【0103】
そして、さらに、本第2実施形態では、X−ECU10が、Y−ECU20に対する外部装置としても動作する。従って、X−ECU10のCPU11は、上記第1実施形態のイグニッションキー部50の通信用ECU71にて実行される処理と同様の処理、すなわち図3及び図4のフローチャートに示した処理と同様の処理を実行する。一方、Y−ECU20のCPU21は、上記第1実施形態のECU10のCPU11にて実行される処理と同様の処理、すなわち図5〜図8のフローチャートに示した処理と同様の処理を実行する。
【0104】
つまり、本第2実施形態では、Y−ECU20がX−ECU10の外部装置として動作すると共に、X−ECU10がY−ECU20の外部装置として動作するのである。すなわち、X−ECU10は、X−ECU10のスタンバイRAM11b及びEEPROM12にX−ECU10の制御対象であるエンジンの型式を示すB識別コードを記憶すると共に、Y−ECU20から送信されてくるY−ECU20の制御対象であるブレーキ装置の型式を示すD識別コードを記憶する。同様に、Y−ECU20は、Y−ECU20のスタンバイRAM21b及びEEPROM22にY−ECU20の制御対象を示すD識別コードを記憶すると共に、X−ECU10から送信されてくるX−ECU10の制御対象を示すB識別コードを記憶する。これによって、X−ECU10は、スタンバイRAM11b及びEEPROM12からB識別コードが読み出せない場合、Y−ECU20のスタンバイRAM21b及びEEPROM22に記憶されたB識別コードを用いて一致判断を行う。同様に、Y−ECU20は、D識別コードが読み出せない場合、X−ECU10のスタンバイRAM11b及びEEPROM12に記憶されたD識別コードを用いて一致判断を行う。
【0105】
このとき、例えばX−ECU10が故障によって補給用のX−ECU10と交換された場合、X−ECU10は、Y−ECU20に対してD識別コードの送信を要求する(図3中のS410)。そして、Y−ECU20からのD識別コードを受信すると再送信を要求し(図4中のS530,図3中のS410)、ノイズ等による通信エラーがないことを確認して(図4中のS520)、Y−ECU20の制御対象を示すD識別コードをX−ECU10のスタンバイRAM11b及びEEPROM12に記憶する(図4中のS550)。また、X−ECU10は、エンジン制御処理の実行に先だって、X−ECU10の制御対象を示すB識別コードの送信をY−ECU20に要求し(図6中のS110)、Y−ECU20から送信されてくるB識別コードをX−ECU10のスタンバイRAM11b及びEEPROM12に記憶し(図7中のS230)、このB識別コードを用いて制御プログラム及び制御データが制御対象に適合しているか否かを一致判断を行う(図8中のS330)。なお、Y−ECU20が交換された場合も、同様である。
【0106】
従って、本第2実施形態の場合には、X−ECU10のCPU11が、「識別情報送信手段」、「識別情報受信手段」、「識別情報要求手段」、「一致判断手段」、「異常時処理実行手段」に相当すると共に、「外部情報受信手段」、「外部情報送信手段」、「外部情報要求手段」及び「外部情報記憶制御手段」に相当する。そして、図5中のS600〜S640の処理が識別情報送信手段としての処理に相当し、図6中のS100及びS110の処理が識別情報要求手段としての処理に相当し、図7中のS200〜S220の処理が識別情報受信手段としての処理に相当し、図8中のS330の処理が一致判断手段としての処理に相当し、図8中のS340の処理が異常時処理実行手段としての処理に相当する。さらに、図4中のS500〜S550の処理が外部情報記憶制御手段としての処理に相当し、図3中のS400及びS410の処理が外部情報要求手段としての処理に相当する。また、X−ECU10のスタンバイRAM11b及びEEPROM12が「識別情報記憶手段」及び「外部情報記憶手段」に相当する。なお、Y−ECU20のCPU21も、X−ECU10のCPU11と同様の処理を実行するため、上述したのと同様の対応関係となる。
【0107】
以上説明した本第2実施形態の電子制御システム1によれば、X,Yの2台のECU10,20がそれぞれ上記第1実施形態のECU10と全く同様の効果を奏することになる。
以上、本発明はこのような実施形態に何等限定されるものではなく、本発明の主旨を逸脱しない範囲において種々なる形態で実施し得る。
【0108】
上記第1実施形態では、ECU10の外部装置としてイグニッションキー部50を採用する構成であり、上記第2実施形態では、X−ECU10の外部装置としてY−ECU20を採用する構成であったが、X−ECU10及びY−ECU20の外部装置としてイグニッションキー部50及びY−ECU20の両方を採用する構成としてもよい。この場合、X−ECU10のB識別コードは、イグニッションキー部50及びY−ECU20の両方に記憶されることになる。従って、X−ECU10、Y−ECU20、イグニッションキー部50の全てが同時に交換されない限りB識別コードを外部から入力しなおす必要がなくB識別コードの信頼性をより向上させることができる。また、例えば上記第2実施形態で説明したような動作を行うECUを3台以上備える構成としてもよい。
【0109】
また、例えば、上記第1及び第2実施形態においては、CPU11に内蔵されたフラッシュROM11aあるいはCPU21に内蔵されたフラッシュROM21aに書き込まれた制御プログラム及び制御データが制御対象に適合していないことを判断した場合(図8中のS330:NO)、入出力ポート15を介してワーニングランプ31を点灯させ(図8中のS340)、その後、制御処理に移行させるようにしていた。これに対して、制御プログラム及び制御データが制御対象のエンジンの型式に適合していない場合、上述した一致判断処理終了後に制御処理に移行させないようにすることも考えられる。この場合、制御対象に不適合な制御プログラム又は制御データに基づいて制御処理を実行することによって制御対象に何らかの悪影響が出ることを防止できる。また、上記実施形態のようにエンジンを制御対象としている場合、エンジンへの燃料供給をカットする処理を実行するようにしてもよい。この場合、利用者は、不適合な制御プログラムに基づくエンジン制御がなされた状態で車両を運転することがなくなるため、利用者の安全性を向上させることができる。
【図面の簡単な説明】
【図1】実施形態のECUの電気的な構成を示すブロック図である。
【図2】制御プログラム及び制御データの構成を示す説明図である。
【図3】実施形態のイグニッションキー部又はECUにて実行されるコード要求処理を示すフローチャートである。
【図4】実施形態のイグニッションキー部又はECUにて実行されるコード記憶処理を示すフローチャートである。
【図5】実施形態のECUにて実行される送信処理を示すフローチャートである。
【図6】実施形態のECUにて実行される送信要求処理を示すフローチャートである。
【図7】実施形態のECUにて実行される受信処理を示すフローチャートである。
【図8】実施形態のECUにて実行される一致判断処理を示すフローチャートである。
【図9】第2実施形態の電子制御システムの電気的な構成を示すブロック図である。
【符号の説明】
1…電子制御システム 10…ECU,X−ECU
20…Y−ECU 11,21…CPU
11a,21a…フラッシュROM 11b,21b…スタンバイRAM
12,22…EEPROM 13,23…入力回路
14,24…出力回路 15,25…入出力ポート
31,32…ワーニングランプ 50…イグニッションキー部
60…イグニッションキー 61…EEPROM
70…キーシリンダ 71…通信用ECU
80…メモリ書換装置 91…通信用コネクタ
92,93,94…通信ライン
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for rewriting a control program and control data stored in a nonvolatile memory capable of electrically rewriting data.
[0002]
[Prior art]
Conventionally, as disclosed in, for example, Japanese Patent Application Laid-Open No. 6-272611, as an electronic control device for controlling an automobile engine or the like, nonvolatile data that can be electrically rewritten (specifically, erasing and writing data) It has been proposed that a control program and data are stored in a volatile memory, and such control program and control data can be rewritten even after being supplied to the market.
[0003]
That is, this type of electronic control device normally executes a control process for controlling a controlled object such as an engine in accordance with a control program and control data stored in a non-volatile memory. When a rewrite device is connected and a rewrite command is transmitted from the memory rewrite device, the content of the nonvolatile memory is rewritten after following a predetermined communication procedure. The rewriting of the contents of the non-volatile memory is performed by erasing a part or all of the control program or control data stored in the non-volatile memory, and new data transmitted from the memory rewriting device to the erased memory area. This is done by writing a control program or control data.
[0004]
The memory rewriting device has a storage medium (floppy disk, hard disk, CD-ROM, etc.) for storing a new control program and control data to be rewritten, and when a predetermined operation is performed by an operator, the electronic control device After the rewrite command is transmitted, a new control program and control data stored in the storage medium are transmitted to the electronic control device. A configuration in which a plurality of control programs or control data is stored in the storage medium and a control program selected by the operator is transmitted to the electronic control device is also conceivable.
[0005]
In such an electronic control device, the control program and control data stored in the non-volatile memory can be rewritten to a new control program and control data using the memory rewriting device, so that the operation content (control content) can be arbitrarily set. This is advantageous in that it can be changed. For this reason, recently, a non-volatile memory as described above is often built in a CPU included in an electronic control unit.
[0006]
However, in an automobile, for example, it is of course between different car models, but even with the same car model, the electronic control unit performs it depending on the grade (equipment), engine type, or destination (exporting country). The content of control to be different is different. In other words, the control program and control data to be stored in the nonvolatile memory of the electronic control device are different for each control target controlled by the electronic control device.
[0007]
Therefore, in this type of electronic control device, the operator does not know that a control program or the like that is incompatible with the control target of the electronic control device is stored in the storage medium on the memory rewrite device side, or the memory rewrite device side. A control program or control data that is incompatible with the control target of the electronic control device is erroneously selected from a plurality of control programs stored in the storage medium, and is not compatible with the control target from the memory rewrite device to the electronic control device. May be sent. When such a work mistake occurs, the electronic control device cannot properly control the control target.
[0008]
For example, when rewriting a control program of an electronic control device that controls a type A engine, an operator does not know that a control program suitable for the type B engine is stored in the storage medium on the memory rewriting device side. Alternatively, if a control program that matches the type B engine is erroneously selected from among a plurality of control programs stored in the storage medium on the memory rewriting device side and rewriting is performed, electronic control The control content of the apparatus is not compatible with the type A engine that is the actual control target, and the engine does not operate or even if the engine operates, the original performance cannot be exhibited.
[0009]
For this reason, the applicant must respond to an abnormal situation prior to the execution of the control process so that appropriate measures can be taken when a control program or control data that is incompatible with the control target is erroneously written to the electronic control unit. The following method for making the process executable is considered.
[0010]
According to the method, identification information (hereinafter referred to as “data matching target identification information”) indicating a matching control target is included in the control program and control data, and the control program or control data including the identification information is stored in a nonvolatile memory. On the other hand, in the electronic control unit, identification information indicating the control target of the electronic control unit (hereinafter referred to as “control target identification information”) is stored, and prior to execution of the control process, It is determined whether or not the control target identification information matches the data matching target identification information included in the control program or control data written in the nonvolatile memory. An abnormality handling process, such as notifying that there is no error, is executed.
[0011]
According to this method, even when the control program or control data stored in the nonvolatile memory is rewritten, if the rewritten control program or control data is incompatible with the control target, the control process Prior to the execution of the process, an emergency response process is executed, and as a result, an appropriate action can be taken.
[0012]
[Problems to be solved by the invention]
However, in the above-described method, the following problem occurs when the electronic control device is replaced due to a failure or the like.
In the event of a failure of the electronic control device, the electronic control device is generally replaced with a replenishment electronic control device, and a new control program or control data is written to the replenishment electronic control device using a memory rewriting device. become. At this time, in order to determine whether or not the written control program or control data is suitable for the control target by the above-described method, the control target identification information indicating the control target to the replenishment electronic control device Must be written in advance. In other words, it is necessary to distinguish the electronic control device for replenishment that is not installed in the vehicle from the beginning of shipment according to the difference in the vehicle type as described above, or according to the difference in grade, engine type, destination, etc. . As a result, a certain replenishment electronic control unit can be replaced with an electronic control unit for controlling the type A engine, but cannot be replaced with an electronic control unit for controlling the type B engine.
[0013]
In addition, when control target identification information indicating a control target is written in advance in the replenishment electronic control device, the operator can specify control target identification information indicating a control target different from the control target of the failed electronic control device. It is also conceivable to mistakenly select and replace the stored electronic control device for supply. In this case, even if the written control program or control data matches the control target, the data match target identification information included in the control program or control data does not match the control target identification information stored in advance. For this reason, for example, an abnormality handling process such as notifying the outside that it does not match is executed.
[0014]
Considering such points, it is not preferable to store control target identification information for specifying a control target of the electronic control device before mounting on the vehicle. That is, it is desired that the replenishment electronic control device does not need to store the control target identification information, and the replenishment electronic control device is made common regardless of the difference in the control target.
[0015]
Therefore, the present invention realizes such commonality in the electronic control device, and further, when a control program or control data that is incompatible with the control target is written in the nonvolatile memory, an abnormal time prior to the execution of the control processing is obtained. The purpose is to be able to execute corresponding processing.
[0016]
[Means for Solving the Problems and Effects of the Invention]
Made to achieve the above-mentioned objectives According to the first configuration The electronic control device includes a nonvolatile memory capable of rewriting data, and normally executes a control process for controlling a predetermined control target in accordance with a control program and control data stored in the nonvolatile memory. When a memory rewrite device is connected and receives a rewrite command transmitted from the memory rewrite device, a part or all of the control program or control data stored in the nonvolatile memory is transferred to the memory rewrite device thereafter. Is rewritten to a new control program or control data transmitted from. The nonvolatile memory capable of rewriting data is generally a flash EEPROM (commonly called a flash ROM) or an EEPROM, but may be another electrically rewritable ROM.
[0017]
In the electronic control device of the present invention, the control program and the control data are created so as to include data matching target identification information that is identification information indicating a control target matching the control program and the control data. For example, data matching target identification information not related to the control content is stored at the head position of the control program and control data.
[0018]
Here, in particular, the electronic control device of the present invention is used together with an external device capable of data communication, and the electronic control device of the present invention has an identification information storage means for storing a control target of the electronic control device. Is provided. Then, the identification information transmitting unit transmits the control target identification information stored in the identification information storage unit to the external device described above. The external device receives and stores the control target identification information transmitted by the identification information transmitting means, and transmits this control target identification information to the electronic control device. Correspondingly, in the electronic control device of the present invention, the identification information receiving means receives the control object identification information transmitted from the external device, and the coincidence determining means is executed by the identification information receiving means prior to execution of the control processing. It is determined whether or not the received control target identification information matches the data matching target identification information included in the control program or control data. Based on the determination result, the abnormal time process execution means executes an abnormal time response process when the two pieces of identification information do not match.
[0019]
It is conceivable that the above-described identification information storage means stores control target identification information at the time of factory shipment, for example. In this way, the control object identification information stored in the identification information storage means is transmitted to and stored in the external device, and the above-described matching determination is performed using the control object identification information transmitted from the external device. For example, if the electronic control device is replaced due to a failure or the like, the control object identification information is not stored in the identification information storage unit, but if the control target identification information is stored in the external device, the identification information is stored. The receiving unit performs the above-described matching determination using the control target identification information transmitted from the external device.
[0020]
As an external device, for example, when an electronic control device is mounted on a vehicle, the external device is a device mounted on the vehicle. For example, an electronic control device different from the electronic control device may be adopted as the external device, and for example, an ignition key with a built-in memory device and a communication function may be adopted as the external device. Further, the above-mentioned “control target” indicates a target for which a control program or control data is different even for the same engine, such as a model A engine and a model B engine.
[0021]
As described above, in the electronic control device of the present invention, prior to the execution of the control processing, the data matching target identification information that is the identification information indicating the control target matching the control program and the control data, and the identification information indicating the control target of the electronic control device It is determined whether or not the control target identification information matches, and if not, an abnormality handling process is executed. Therefore, when the control program or control data written in the nonvolatile memory is not suitable for the control target, the abnormality handling process is executed prior to the execution of the control process.
[0022]
At this time, if the control target identification information serving as the judgment criterion is stored in the electronic control device, it is necessary to write the control target identification information to the replaced electronic control device at the time of failure, or the control target identification information has already been stored. Needs to be replaced with an electronic control device on which is written.
[0023]
Therefore, in the electronic control device of the present invention, the above-described matching determination is performed using the control target identification information stored in the external device, that is, using the control target identification information received by the identification information receiving means. . Therefore, even when the electronic control device fails and is replaced with a replenishment electronic control device, it is no longer necessary to store control target identification information in advance in the replenishment electronic control device. Before being installed, the control target of the electronic control device is not specified. As a result, for example, the electronic control device for replenishment can be made common without being distinguished by different control objects depending on the vehicle type, grade, engine type, destination, and the like.
[0024]
By the way, from the viewpoint of making the control object identification information transmitted from the external device highly reliable, for example, when the electronic control device is mounted on a vehicle, the electronic control device is not installed at the time of shipment of the vehicle from the factory. It is desirable to store the control target identification information stored in an external device.
[0025]
Therefore, in the electronic control device of the present invention, the identification information transmitting unit transmits the control target identification information stored in the identification information storage unit to the external device. As a result, highly reliable control target identification information is stored in the external device. Even if the external device is failed and replaced, if the electronic control device is not replaced, the control target identification information stored in the electronic control device is transmitted, so that the replaced external device The highly reliable control object identification information can be stored again.
[0026]
Note that the abnormal time response processing executed by the abnormal time processing execution unit described above may be, for example, processing for notifying that the control program or control data is not suitable for the control target. In this case, the operator can reliably know that the rewritten control program or control data is not compatible with the control target of the electronic control device by the notification operation of the electronic control device, and can take appropriate measures. it can. As an appropriate measure, for example, a measure for rewriting the control program or the control data again using a memory rewriting device can be cited.
[0027]
Further, the abnormality handling process executed by the abnormality process execution means may be a process that does not permit the shift to the control process. In this case, the control process is executed based on a control program or control data that is incompatible with the control target, and any adverse effects on the control target can be prevented.
[0028]
The abnormal time response processing executed by the abnormal time processing execution means is not limited to the above-described processing, but may be individual processing according to the control target. For example, when the control target is an engine, it is conceivable to perform a process of cutting the fuel to the engine and stopping the operation of the engine. In this case, the user does not drive the vehicle in a state where the engine control based on the non-conforming control program is performed, so that the safety of the user can be improved.
[0029]
By the way, in the electronic control apparatus mentioned above, it is possible that an identification information transmission means transmits control object identification information to an external device at a predetermined timing. However, when the external device is replaced due to a failure or the like, it is necessary to transmit the control target identification information to the external device as soon as possible. However, if the control target identification information is once stored in the external device, transmission of the control target identification information from the electronic control device to the external device is wasted.
[0030]
Therefore, Of the second configuration As described above, it is preferable that the identification information transmission unit transmits the control target identification information stored in the identification information storage unit to the external device when the transmission of the control target identification information is requested from the external device. In this case, the identification information transmitting means transmits the control target identification information to the external device when there is a request for transmission of the control target identification information from the external device when the external device is replaced. As a result, when the external device is replaced, the control target identification information is promptly transmitted, and there is also a waste of transmitting the control target identification information even though the control target identification information is already stored in the external device. Disappear.
[0031]
In addition, the above-described electronic control device is configured to make a coincidence determination using control target identification information transmitted from an external device. This is because, as described above, the control target identification information stored in the external device is highly reliable transmitted from the electronic control device. By the way, as long as the electronic control device is not replaced, the control target identification information stored in the electronic control device is similarly highly reliable. Therefore, Of the fifth configuration As described above, when the control target identification information can be read from the identification information storage unit, the match determination unit performs a match determination with the data matching target identification information using the control target identification information stored in the identification information storage unit. On the other hand, when the control target identification information cannot be read from the identification information storage unit, it is preferable that the control target identification information received by the identification information receiving unit is used to make a match determination with the data matching target identification information. .
[0032]
Here, the case where the control target identification information can be read from the identification target storage means is a case where the electronic control device has not been exchanged. On the other hand, the case where the control target identification information cannot be read from the identification information storage means means This is a case where a read error occurs due to a cause or a case where the electronic control device is replaced due to a failure of the electronic control device.
[0033]
In this manner, if the control object identification information stored in the identification information storage unit is used to make a match determination, the acquisition time is longer than when the control object identification information is acquired by data communication with an external device. This is advantageous in that it is shortened and is less susceptible to noise and the like.
[0034]
By the way, in the above-described electronic control device, when the external device transmits the control target identification information, the identification information receiving unit receives the control target identification information. In this case, it is conceivable that the external device transmits the control target identification information regardless of whether or not the electronic control device requires the control target identification information. At this time, when control target identification information is frequently transmitted from an external device, unnecessary transmission / reception increases.
[0035]
Therefore, Of the sixth configuration As described above, when the control target identification information cannot be read from the identification information storage unit, it is preferable to include an identification information request unit that requests the external device to transmit the control target identification information. In this case, if the control target identification information cannot be read, the identification information requesting unit requests the external device to transmit the control target identification information, and the control target identification information is transmitted from the external device in response to this transmission request. Then, the identification information receiving means described above receives the control target identification information. Therefore, there is a high possibility that the control target identification information can be received when the electronic control device requires it.
[0036]
Note that, for example, in the electronic control device for replenishment, since the control target identification information is not stored in the identification information storage unit, the control target identification information received from the external device is used every time prior to execution of the control process. It is necessary to make a coincidence judgment. Therefore, Of the seventh configuration As described above, it is desirable that the control object identification information received by the identification information receiving unit is stored in the identification information storage unit. As a result, once the control object identification information is received from the external device, the control object identification information can be read from the identification information storage means, so that it is not necessary to receive the control object identification information from the external device.
[0037]
By the way, the control program or control data stored in the non-volatile memory of the electronic control device may be mistakenly rewritten due to an operation error as described above, but the user deliberately sets the control program or control data constant, etc. It may be possible to rewrite to. For example, in an electronic control device that controls an engine, it is common to set an upper limit value of the vehicle speed in advance and perform control such as cutting fuel when the vehicle speed exceeds the upper limit value. However, at this time, the user may intentionally rewrite the preset upper limit value of the vehicle speed.
[0038]
To prevent unauthorized rewriting of control programs or control data by such users, Of the eighth configuration Thus, it is preferable that the data matching target identification information is uniquely determined from the codes constituting the control program and the control data. Here, the only thing determined from the codes constituting the control program and control data is, for example, a checksum. That is, information whose value changes even if only a part of the control program or control data is changed is set as the data matching target identification information. For example, if the data matching target identification information is used as a checksum for the control program or control data, the data target identification information is changed even when some codes are illegally rewritten, so that a mismatch judgment is made and control is executed. Predetermined processing is executed in advance. As a result, it is possible to prevent the user from intentionally rewriting the control program or control data as described above.
[0039]
When the manufacturer rewrites the control program or control data properly, execute the control process so that the checksum of the new control program and control data matches the checksum of the control program and control data before rewriting. A control program or control data may be created including dummy code that does not affect the control.
[0040]
by the way, First In addition to the configurations shown in 1-8, Of the ninth configuration As described above, the external information receiving means for receiving the external information which is identification information indicating the control target of the other electronic control apparatus transmitted from the other electronic control apparatus as the external apparatus, and the external information receiving means External information storage means for storing received external information, and external information transmission means for transmitting external information stored in the external information storage means to another electronic control device, and external to the other electronic control device It is conceivable that the apparatus can be configured to be operable.
[0041]
In this case, the external information receiving unit receives the external information indicating the control target of the other electronic control device transmitted by the identification information transmitting unit of the other electronic control device as the external device. The received external information is stored in the external information storage unit and transmitted to the external device by the external information transmission unit. As a result, the electronic control device of the present invention also operates as the external device described above with respect to other electronic control devices.
[0042]
For example, considering the two electronic control devices X and Y configured as described above, the Y electronic control device operates as an external device for the X electronic control device, and the X electronic control device is external to the Y electronic control device. It will operate as a device. That is, the X electronic control device uses the control target identification information stored in the Y electronic control device by transmitting the control target identification information indicating the control target of the X electronic control device to the Y electronic control device as an external device. On the other hand, the Y electronic control device is stored in the X electronic control device by transmitting control target identification information indicating the control target of the Y electronic control device to the X electronic control device as an external device. It is possible to make a coincidence determination using the control object identification information.
[0043]
Here, consider a case where the X electronic control device receives external information, which is identification information indicating the control target of the Y electronic control device, from the Y electronic control device as an external device.
At this time, it is conceivable that the Y electronic control device repeatedly transmits external information at a predetermined interval. By the way, considering the case where the X electronic control device is replaced, the Y electronic control device transmits external information at a relatively short interval so as to store the external information in the external information storage means of the X electronic control device as soon as possible. It is desirable to do. The reason is that if the Y electronic control device is also replaced before the external information is stored in the X electronic control device, the external information will be lost in both the Y electronic control device and the X electronic control device. . If it says so, if external information is transmitted at a very short interval, after external information is once memorize | stored in X electronic control unit, useless transmission / reception will increase.
[0044]
Therefore, Of the tenth configuration As described above, when external information is not stored in the external information storage means, it is conceivable to include external information requesting means for requesting transmission of external information to another electronic control device. Here, when the external information is not stored in the external information storage means, the case where the electronic control device is replaced due to a failure or the like as described above can be considered. In this case, the external information requesting unit requests the other electronic control device to transmit the external information. If another electronic control unit transmits external information in response to this transmission request, the external information is quickly stored, and transmission / reception as described above is eliminated.
[0045]
In addition, there is a possibility that external information transmitted from another electronic control device may not be received correctly due to the influence of noise or the like. If such a possibility becomes high, the reliability of the external information used for the coincidence determination in the Y electronic control unit, that is, the control target identification information indicating the control target of the Y electronic control unit decreases.
[0046]
Therefore, Of the eleventh configuration As described above, when the external information is received by the external information receiving means, the external information requesting means described above is configured to request retransmission of the external information, and the external information received first and the retransmission request are configured. It may be configured to include an external information storage control unit that determines whether or not the received external information matches based on the information and stores the external information in the external information storage unit when they match. For example, when the external information request means of the X electronic control device receives the external information from the Y electronic control device, it requests the Y electronic control device to retransmit the external information, and in response to this request, the Y electronic control device When the external information is transmitted again from the external information storage means, the external information storage control means of the X electronic control unit determines that the first received external information matches the external information received by requesting retransmission. If so, the external information is stored. As a result, the reliability of the control target identification information indicating the control target of the Y electronic control device stored in the X electronic control device can be improved.
[0047]
Further, consider a case where the X electronic control device transmits external information that is identification information indicating a control target of the Y electronic control device to a Y electronic control device as an external device. The external information transmission unit of the X electronic control unit may repeatedly transmit the external information of the Y electronic control unit stored in the external information storage unit to the Y electronic control unit at a predetermined interval, for example. If performed frequently, transmission / reception becomes wasteful.
[0048]
Therefore, Of the twelfth configuration As described above, the external information transmission unit may be configured to transmit the external information stored in the external information storage unit when there is a request for transmission of the external information from the external device. For example, in the case of two electronic control devices X and Y, the external information transmission means of the X electronic control device, when there is a request for transmission of external information by the Y electronic control device, stores Y electrons stored in the external information storage means. For example, external information of the control device is transmitted. As a result, the Y electronic control device can acquire the external information when the external information, that is, the control target identification information of the Y electronic control device is required.
[0049]
more than, First 1-12 Configuration In the explanation of the invention of the electronic control device, First 9-12 Of configuration Considering an electronic control device that also operates as an external device for other electronic control devices, Of the 13th configuration like, First Any of 9-12 Constitution By providing a plurality of the electronic control devices, it is possible to realize an electronic control system in which at least one other electronic control device operates as an external device for each electronic control device.
[0050]
In this case, among the plurality of electronic control devices, at least one other electronic control device operates as an external device for each electronic control device. That is, the control target identification information indicating the control target of one electronic control device is saved in at least one other electronic control device. Here, when the control object identification information of one electronic control device is saved in two or more other electronic control devices, the one electronic control device and two or more electronic control devices operating as external devices As long as they are not exchanged at the same time, the control target identification information of the electronic control device will not be lost, so that the reliability can be maintained high. Furthermore, if the control object identification information of each electronic control device is saved in all other electronic control devices, the control object identification information of each electronic control device will not be lost unless all electronic control devices are replaced at the same time. Furthermore, the reliability can be maintained high.
[0051]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, embodiments of the invention will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a block diagram showing an electrical configuration of the electronic control system 1 of the first embodiment. FIG. 1 shows an electronic control unit (hereinafter referred to as “ECU”) 10, an ignition key unit 50 as an “external device” mounted on the vehicle together with the ECU 10, and a memory rewriting device 80 connected to the ECU 10. It is shown. Here, ECU10 is mounted in a motor vehicle and controls an internal combustion engine type engine. The memory rewriting device 80 is connected to the ECU 10 when rewriting an engine control program or data built in the ECU 10.
[0052]
As shown in FIG. 1, the ECU 10 calculates an optimum control amount for the engine based on an input circuit 13 that inputs signals from various sensors that output signals according to the operating state of the engine, and signals from the input circuit 13. The CPU 11 outputs a control signal based on the calculation result, the output circuit 14 that receives the control signal from the CPU 11 and drives an actuator such as an injector or an igniter attached to the engine, and the CPU 11 performs control. The EEPROM 12 for storing necessary data and the input / output port 15 for performing serial data communication between the memory rewriting device 80 and the ignition key unit 50 are provided. The input / output port 15 is connected with a warning lamp 31 that is turned on in response to a signal from the ECU 10. For example, the warning lamp 31 may be provided on an instrument panel in the vehicle interior. Further, the CPU 11 is provided with a flash EEPROM (hereinafter referred to as “flash ROM”) 11 for storing a control program and control data necessary for controlling the engine and a power supply from a battery, even when the ignition switch of the vehicle is turned off. And a standby RAM 11b capable of holding the stored data.
[0053]
Here, the flash ROM 11a built in the CPU 11 is a nonvolatile memory capable of electrically erasing and writing data, and a control program and control data for engine control are already stored in the flash ROM 11a. . As shown in FIG. 2, the control program and control data stored in the flash ROM 11a are configured by codes (program codes, data codes). This code includes a dummy code that does not affect control. When creating a control program and control data, the code checksum is adjusted to match the control program and control data by adjusting this dummy code. The identification code indicates the type of engine to be used. This identification code corresponds to “data matching target identification information” which is identification information indicating a control target matching the control program and control data.
[0054]
The EEPROM 12 is also a nonvolatile memory that can electrically erase and write data. In the EEPROM 12 and the standby RAM 11b built in the CPU 11, an identification code indicating the type of engine controlled by the ECU 10 is stored. In the first embodiment, when the identification code is stored in both the standby RAM 11b and the EEPROM 12 as described above, the standby RAM 11b is accessed to read the identification code, and the identification code stored in the standby RAM 11b is lost, The EEPROM 12 is accessed, and the identification code stored in the EEPROM 12 is copied to the standby RAM 11b. This identification code corresponds to “control target identification information” which is identification information indicating a control target of the ECU 10. The standby RAM 11b and the EEPROM 12 for storing the identification code correspond to “identification information storage means”.
[0055]
Hereinafter, in order to distinguish between the above-described two identification codes, an identification code indicating an engine type conforming to the control program and the control data is described as an A identification code, and an identification code indicating a control target of the ECU 10 is described as a B identification code. I decided to. In the first embodiment, the identification code is set so as to distinguish between engines of different types, but is set so as to distinguish the model name, the grade of the car, the destination of the car, and the like. It may be done.
[0056]
The memory rewriting device 80 is for causing the ECU 10 to rewrite the flash ROM 11a. A new control program and control data prepared for writing to the flash ROM 11a are stored in a floppy disk, a hard disk, a CD-ROM, and a memory cartridge. I remember it. When a predetermined operation is performed by the operator, the memory rewriting device 80 transmits a rewrite command to the electronic control device, and then transmits a new control program and control data stored in the above-described storage medium to the ECU 10. The ECU 10 operates to rewrite the contents of the flash ROM 11a in response to a rewrite command from the memory rewriting device 80, as will be described later.
Here, in the same manner as the control program and control data already stored in the flash ROM 11a of the CPU 11, the new control program and control data stored in the memory rewriting device 80 are also shown in FIG. The checksum of the code constituting the data is an A identification code indicating the engine type that matches the control program and control data.
[0057]
Such a connection between the memory rewriting device 80 and the ECU 10 is performed by connecting the communication lines 92 to each other via the connection connector 91. In other words, when the connection connector 91 is fitted, bidirectional serial communication between the memory rewriting device 80 and the ECU 10 becomes possible via the communication line 92.
[0058]
The ignition key unit 50 includes an ignition key 60 and a key cylinder 70 for inserting the ignition key 60 and turning on / off an ignition switch of the vehicle. The key cylinder 70 in the first embodiment includes a communication electronic control unit (hereinafter referred to as “communication ECU”) 71, which is connected to the input / output port 15 of the ECU 10 as shown in FIG. 1. The communication line 93 is connected to the ECU 10 so as to perform bidirectional serial communication. An EEPROM 61 is mounted on the ignition key 60. The above-described communication ECU 71 of the key cylinder 70 is configured to perform wireless communication with the ignition key 60, requests the ECU 10 to transmit a B identification code, and receives the B identification transmitted from the ECU 10. The code is received and stored in the EEPROM 61 of the ignition key 60. When there is a request for transmission of the B identification code from the ECU 10, the data stored in the EEPROM 61 of the ignition key 60 is read and transmitted to the ECU 10. This operation will be described later. The configuration of data communication between the ignition key unit 50 and the ECU 10 is well known, and thus detailed description of the configuration is omitted.
[0059]
The CPU 11 of the ECU 10 configured as described above starts operating from the reset state when the ignition switch of the vehicle is turned on and an operating voltage (5 V) is supplied from a power supply circuit (not shown) in the ECU 10. When a rewrite request signal is received as a rewrite command from the memory rewrite device 80 when the operation is started, the current control program and control data stored in the flash ROM 11a are read without calling the control program in the flash ROM 11a. Then, it is rewritten with a new control program and control data transmitted from the memory rewriting device 80. By such an operation, the control program and control data stored in the flash ROM 11a of the ECU 10 are rewritten with a new control program and control data stored in the memory rewriting device 80.
[0060]
Further, the CPU 11 calls the control program in the flash ROM 11a to control the engine during normal times when the memory rewriting device 80 is not connected. In the first process of this control program, Prior to execution of the engine control process based on the control program and control data in the flash ROM 11a, it is determined whether or not the control program and control data in the flash ROM 11a are compatible with the engine type. Performs the process for handling an abnormality.
[0061]
Next, processing executed by the communication ECU 71 provided in the key cylinder 70 of the ignition key unit 50 described above will be described based on the flowcharts shown in FIGS. 3 and 4.
FIG. 3 is a flowchart showing the code request process. This process is executed at a predetermined timing such as 8 ms.
[0062]
First, in step S400, it is determined whether the code storage flag Fe is “0” or the code transmission request flag Fr is “1”. Both flags Fe and Fr take a value of “0” or “1”. When the communication ECU 71 stores the B identification code from the ECU 10 in the EEPROM 61 of the ignition key 60, the communication ECU 71 sets the code storage flag Fe to “1”. Further, the communication ECU 71 sets the code transmission request flag Fr to “1” when requesting retransmission of the B identification code in a code storage process described later. Therefore, this process determines when the B identification code from the ECU 10 is not stored in the EEPROM 61 of the ignition key 60 or when there is a request for retransmission of the B identification code to the ECU 10. If Fe = 0 or Fr = 1 (S400: YES), the process proceeds to S410. On the other hand, when Fe = 1 and Fr = 0 (S400: NO), this code request process is terminated.
[0063]
In S410, a request for transmitting the B identification code is output to the ECU 10. Thereafter, the code request process is terminated.
FIG. 4 is a flowchart showing the code storage process. This process is executed when the B identification code is received from the ECU 10.
[0064]
First, in step S500, it is determined whether or not the code storage flag Fe is “1”. As described above, the code storage flag Fe is set to “1” when the B identification code from the ECU 10 is stored in the EEPROM 61 of the ignition key 60. If Fe = 1 (S500: YES), that is, if the B identification code is already stored in the EEPROM 61 of the ignition key 60, this code storage process is terminated. On the other hand, when Fe = 0 (S500: NO), that is, when the B identification code is not stored in the EEPROM 61 of the ignition key 60, the process proceeds to S510.
[0065]
In S510, it is determined whether or not the code reception flag F1 is “0”. The code reception flag F1 is set to “1” when the B identification code transmitted from the ECU 10 is first received and stored. Therefore, this process determines a case where the B identification code from the ECU 10 has not been received even once. If F1 = 0 (S510: YES), the process proceeds to S530. On the other hand, if F1 = 1 (S510: NO), that is, if the B identification code is received for the second time or later, the process proceeds to S520.
[0066]
In S520, it is determined whether or not the previously received B identification code matches the B identification code received this time. This process confirms the occurrence of a data error due to the influence of noise or the like during data communication. If they match (S520: YES), the process proceeds to S550. On the other hand, when it does not correspond (S520: NO), it transfers to S530.
[0067]
In S530, the code transmission request flag Fr is set to “1”. As a result, an affirmative determination is made in S400 of the code request process shown in FIG. 3, and the ECU 10 is requested to retransmit the B identification code.
In S540, the B identification code received this time is temporarily stored. In the first embodiment, it is stored in the internal RAM (not shown) of the communication ECU 71. Further, the code reception flag F1 is set to “1”. Thereafter, the present code storage process is terminated.
[0068]
On the other hand, in S550 to which the process proceeds when an affirmative determination is made in S520, the received code is stored in the nonvolatile memory. In the first embodiment, the data is stored in the EEPROM 61 of the ignition key 60. Thereafter, the present code storage process is terminated.
Next, based on the flowchart shown in FIG. 5, the transmission process performed by CPU11 of ECU10 corresponding to the process performed by communication ECU71 demonstrated using the flowchart of FIG.3 and FIG.4 is demonstrated. This transmission process is executed at a predetermined timing such as 16 ms.
[0069]
First, in step S600, it is determined whether the code transmission completion flag Fs is “0” or the code transmission request flag Fr is “1”. Both of the flags Fs and Fr have a value of “0” or “1”, respectively. The code transmission completion flag Fs is set to “1” when the B identification code stored in the EEPROM 12 and the standby RAM 11b of the ECU 10 is transmitted even once. Further, the code transmission request flag Fr is set to “1” when there is a B identification code transmission request from the communication ECU 71 in S410 in FIG. 3 described above. Therefore, this process determines when the B identification code has never been transmitted, or when the B identification code is requested to be transmitted. If Fs = 0 or Fr = 1 (S600: YES), the process proceeds to S610. On the other hand, when Fs = 1 and Fr = 0 (S610: NO), this transmission process is terminated.
[0070]
In S610, it is determined whether engine speed NE = 0 and starter STA = OFF. This process is a determination process based on a signal from the sensor input via the input circuit 13, and determines whether or not the state is low in noise. If NE = 0 and STA = OFF (S610: YES), the process proceeds to S620. On the other hand, if NE ≠ 0 or STA = ON (S620: NO), this transmission process is terminated.
[0071]
In S620, it is determined whether or not the B identification code is “0”. This process determines whether the B identification code is not stored in both the standby RAM 11b and the EEPROM 12, or the B identification code cannot be read due to a failure of the standby RAM 11b. Here, if B identification code = 0 (S620: YES), this transmission process is terminated. On the other hand, if B identification code ≠ 0 (S620: NO), the process proceeds to S630.
[0072]
In S630, the B identification code is transmitted to the communication ECU 71 provided in the key cylinder 70 of the ignition key unit 50. When the communication ECU 71 receives the transmitted B identification code, the communication ECU 71 executes the code storage process shown in the flowchart of FIG. In the subsequent S630, the code transmission completion flag Fs is set to “1”, the code transmission completion flag Fs is stored in the standby RAM 11b and the EEPROM 12 of the ECU 10, and then the transmission processing is terminated.
[0073]
By the processing executed by the communication ECU 71 and the ECU 10 described above, the B identification code indicating the model of the engine controlled by the ECU 10 stored in the standby RAM 11b and the EEPROM 12 of the ECU 10 is applied to the ignition key 60 of the ignition key unit 50. It is stored in the mounted EEPROM 61.
[0074]
Next, a process executed by the CPU 11 of the ECU 10 prior to the execution of the engine control process will be described based on the flowcharts shown in FIGS. FIG. 6 is a flowchart showing a transmission request process executed by the CPU 11 of the ECU 10. As described above, this process is executed immediately after calling the control program.
[0075]
First, in the first step S100, it is determined whether or not the B identification code is “0”. In this process, as in S620 in FIG. 5, it is determined whether the B identification code is not stored in both the standby ROM 12 and the EEPROM 12, or the case where the B identification code cannot be read due to a failure of the standby RAM 11b or the like. is there. If B identification code = 0 (S100: YES), the process proceeds to S110. On the other hand, if B identification code is not equal to 0 (S100: NO), the transmission request process is terminated.
[0076]
In S110, the communication ECU 71 of the key cylinder 70 of the ignition key unit 50 is requested to transmit the B identification code. Thereafter, the transmission request process is terminated. When requesting transmission of the B identification code to the communication ECU 71, the communication ECU 71 obtains the B identification code stored in the EEPROM 61 of the ignition key 60 by performing wireless communication with the ignition key 60. The B identification code is transmitted to the ECU 10.
[0077]
Next, a reception process executed by the CPU 11 of the ECU 10 will be described based on the flowchart shown in FIG. As described above, the reception process receives the B identification code transmitted from the communication ECU 71 as a result of requesting the communication ECU 71 of the key cylinder 70 to transmit the B identification code in S110 in FIG. To do.
[0078]
First, in step S200, it is determined whether or not a signal from the communication ECU 71 input to the input / output port 15 of the ECU 10 is a start bit. This process determines the start of reception of the B identification code transmitted via the communication line 93. If it is determined here that it is a start bit (S200: YES), the process proceeds to S210. On the other hand, when it is determined that it is not the start bit (S200: NO), the determination process of S200 is repeated until the start bit is determined.
[0079]
In S210, the received signal is stored. In subsequent S220, it is determined whether or not it is a stop bit. This process determines the end of reception of the B identification code transmitted via the communication line 93. If it is determined that the bit is a stop bit (S220: YES), the stored series of received signals is stored as a B identification code in the standby RAM 11b and the EEPROM 12 in S230, and then the present receiving process is terminated. On the other hand, when it is determined that the bit is not a stop bit (S220: NO), since the reception has not been completed, the processing from S210 described above is repeated.
[0080]
Further, the coincidence determination process executed by the CPU 11 of the ECU 10 will be described based on the flowchart shown in FIG. This coincidence determination process is executed subsequent to the above-described reception process or following the transmission request process when no transmission request is made in the transmission request process.
[0081]
First, in the first step S300, it is determined whether or not the check flag XC is “1”. The check flag XC is a flag that takes either a value of “0” or “1”, and is “0” immediately after the ignition switch of the vehicle is turned on. If it is determined that XC = 1 (S300: YES), the match determination process is terminated. On the other hand, when it is determined that XC = 0 (S300: NO), the process proceeds to S310.
[0082]
In S310, it is determined whether engine speed NE = 0 and starter STA = OFF. This process is a determination process based on a signal from the sensor input via the input circuit 13, and determines whether or not the state is low in noise. If NE = 0 and STA = OFF (S310: YES), the process proceeds to S320. On the other hand, if NE ≠ 0 or STA = ON (S320: NO), this match determination process is terminated.
[0083]
In S320, an A identification code is created. As described above, the A identification code is an identification code indicating the engine type to which the control program and the control data are compatible, and is a checksum of the code constituting the control program and the control data. Therefore, this process creates a checksum from the control program and control data stored in the flash ROM 11a built in the CPU 11.
[0084]
In subsequent S330, it is determined whether or not the A identification code matches the B identification code. That is, it is determined whether or not the engine type that conforms to the control program and control data stored in the flash ROM 11a built in the CPU 11 is the same as the engine type to be controlled by the ECU 10. Here, if A identification code = B identification code (S330: YES), “1” is substituted into the check flag XC in S350, and then this match determination process is terminated. On the other hand, if A identification code ≠ B identification code (S330: NO), the warning lamp 31 connected to the input / output port 15 is turned on in S340, and then the match determination process is terminated.
[0085]
After the match determination process is completed, a control process for controlling the engine is executed based on the control program and control data.
Note that the CPU 11 of the ECU 10 that executes the processing described above corresponds to “identification information transmitting means”, “identification information receiving means”, “identification information requesting means”, “match determination means”, and “abnormality process execution means”. 5 corresponds to the processing as the identification information transmitting means, the processing of S100 and S110 in FIG. 6 corresponds to the processing as the identification information requesting means, and S200 to S200 in FIG. The process of S220 corresponds to the process as the identification information receiving unit, the process of S330 in FIG. 8 corresponds to the process as the coincidence determination unit, and the process of S340 in FIG. Equivalent to.
[0086]
Next, effects exhibited by the electronic control system 1 of the first embodiment will be described.
In the ECU 10 of the first embodiment, the checksum of the code constituting the control program and control data is an A identification code indicating the engine type that matches the control program and control data (see FIG. 2). Prior to the execution of the control process based on the program and control data, an A identification code is created from the control program and control data (S320 in FIG. 8), and the created A identification code and the model of the engine to be controlled by the ECU 10 are changed. It is determined whether or not the B identification code shown matches (S330 in FIG. 8). If they do not match (S330: NO in FIG. 8), the warning lamp 31 is turned on. (S340 in FIG. 8). Therefore, according to the ECU 10 of the first embodiment, the operator who performs rewriting by the memory rewriting device 80 does not match the control program or control data written in the flash ROM 11a built in the CPU 11 with the engine type. Can be ascertained by turning on the warning lamp 31 and appropriate measures can be taken. For example, the control program or the control data is rewritten again using the memory rewriting device 80.
[0087]
In the first embodiment, the B identification code indicating the model of the engine controlled by the ECU 10 is stored in the standby RAM 11b and the EEPROM 12 in the ECU 10 when the vehicle is shipped from the factory. The B identification code is transmitted to the ignition key unit 50 mounted on the vehicle together with the ECU 10 (S630 in FIG. 5), so that it is not only stored in the standby RAM 11b and the EEPROM 12 in the ECU 10, but also the ignition key unit. The information is also stored in the EEPROM 61 mounted on the 50 ignition keys 60.
[0088]
If the B identification code cannot be read from the standby RAM 11b (S100: YES in FIG. 6), the above-described matching determination is performed using the B identification code stored in the EEPROM 61 of the ignition key 60. As a result, even if the B identification code is not stored in the standby RAM 11b and the EEPROM 12 in the ECU 10, it can be determined that the control program or control data written in the flash ROM 11a built in the CPU 11 does not conform to the engine type. The warning lamp 31 can be turned on. Therefore, it is not necessary to previously store the B identification code in the standby RAM 11b and the EEPROM 12 of the replenishment ECU 10 that are replaced when the ECU 10 fails. That is, the type of the engine controlled by the ECU 10 before being mounted on the vehicle is not specified. As a result, the replenishment ECU 10 can be made common without being distinguished by the engine type.
[0089]
On the other hand, when the B identification code can be read from the standby RAM 11b (S100: NO in FIG. 3), the above-described matching determination is performed using the B identification code stored in the standby RAM 11b. That is, in principle, the B identification code is stored in the ECU 10, and the B identification code in the ECU 10 is used for matching determination. As a result, it takes a relatively long time for acquisition, and the number of acquisition times of the B identification code from the ignition key unit 50 that is easily affected by noise can be reduced.
[0090]
Furthermore, when the B identification code cannot be read from the standby RAM 11b (S100 in FIG. 6), the ECU 10 of the first embodiment makes a transmission request to the communication ECU 71 provided in the key cylinder 70 of the ignition key unit 50. (S110 in FIG. 6), the B identification code transmitted from the ignition key unit 50 in response to this transmission request is received (S200, S210, S220 in FIG. 7). That is, the communication ECU 71 transmits the B identification code only when there is a transmission request from the ECU 10, and the ECU 10 executes the reception process only when the transmission of the B identification code is requested. Further, the ECU 10 stores the received B identification information in the standby RAM 11b and the EEPROM 12 built in the CPU 11 in the ECU 10 (S230 in FIG. 4). Therefore, for example, after replacement of the ECU 10, if the B identification code is not stored in the standby RAM 11 b and the EEPROM 12, once the B identification code is received from the ignition key unit 50, the standby RAM 11 b and the EEPROM 12 in the ECU 10 are received. A match determination is made using the stored B identification code. As described above, the ECU 10 according to the first embodiment can reduce transmission / reception processing.
[0091]
Further, when the ignition key unit 50 is replaced due to a failure or the like and the B identification code stored in the EEPROM 61 of the ignition key 60 is lost (S400: YES), the key cylinder 70 of the ignition key unit 50 is lost. The communication ECU 71 included in the request requests the ECU 10 to transmit the B identification code (S410 in FIG. 3). Further, when the communication ECU 71 receives the B identification code for the first time (S510: YES), the communication ECU 71 requests retransmission of the B identification code and determines whether the previously received B identification code matches the retransmitted B identification code. (S520 in FIG. 4), if they match, the data is stored in the EEPROM 61 of the ignition key 60 (S550 in FIG. 4). Thus, even when the ignition key unit 50 has been replaced, a reliable B identification code is reliably stored in the EEPROM 61 of the ignition key 60. That is, in the ECU 10 of the first embodiment, the B identification code is not lost unless both the ignition key unit 50 and the ECU 10 are replaced at the same time, and the reliability of the B identification code is increased. Can be held. As a result, the reliability of the matching determination process based on the B identification code can be improved.
[0092]
In the first embodiment, the A identification information indicating the engine type compatible with the control program and control data is used as the checksum of the code constituting the control program and control data. Therefore, when a part of the control program and control data is rewritten illegally, the checksum, that is, the A identification code is changed. Therefore, it is possible to prevent the user from intentionally rewriting the control program or control data. Note that the codes constituting the control program and the control data include dummy codes that do not affect the execution of the control process as shown in FIG. Therefore, when the control program or control data is created normally, the checksum of the new control program and control data is matched with the checksum of the control program and control data before rewriting by adjusting this dummy code. Let
[0093]
Furthermore, in the ECU 10 of the first embodiment, the B identification code is stored in both the standby RAM 11b and the EEPROM 12 built in the CPU 11, and the standby RAM 11b is accessed, and the B identification stored in the standby RAM 11b is stored. When the code is lost, the B identification code stored in the EEPROM 12 is copied. As a result, the number of accesses to the EEPROM 12 with a limited number of accesses can be reduced.
[Second Embodiment]
In the first embodiment, the ignition key unit 50 is employed as an external device that stores a B identification code indicating the model of the engine that is the control target of the ECU 10. Instead of the ignition key unit 50, another ECU that is mounted on the vehicle together with the ECU 10 and controls a predetermined control object may be adopted as an external device.
[0094]
FIG. 9 is a block diagram showing an electrical configuration of the electronic control system 2 of the second embodiment. FIG. 9 shows two electronic control units (hereinafter referred to as “ECUs”) 10, 20, a memory rewrite device 80, and warning lamps 31, 32. The two ECUs 10 and 20 are mounted on the vehicle in a state where data communication is possible via the communication line 94. One ECU 10 controls the internal combustion engine type engine, and the other ECU 20 performs control of the brake device, so-called anti-skid control. The memory rewriting device 80 is connected to the ECU 10 or 20 when rewriting the program or data for engine control or brake control incorporated in the ECU 10 or 20 (in FIG. 9, it is connected to the ECU 10). In order to distinguish the two ECUs 10 and 20, the following description will be made as X-ECU10 and Y-ECU20.
[0095]
The hardware configuration of the X-ECU 10 is exactly the same as the hardware configuration of the ECU 10 in the first embodiment, and a description thereof is omitted here.
The Y-ECU 20 controls the brake device as described above, but the hardware configuration is the same as that of the X-ECU 10. That is, an input circuit 23 for inputting signals from various sensors such as a vehicle speed sensor, a CPU 21 for performing a calculation based on a signal from the input circuit 23 and outputting a control signal for brake hydraulic pressure, and a control signal from the CPU 21. An output circuit 24 that drives the actuator, an EEPROM 22 that stores data necessary for the CPU 21 to perform control, and an input / output port 25 for performing data communication between the memory rewriting device 80 and the X-ECU 10. I have. The input / output port 25 is connected to a warning lamp 32 that is turned on in response to a signal from the Y-ECU 20, and the CPU 21 includes a flash ROM 21a that stores a control program and control data necessary for controlling the brake device. A standby RAM 21b capable of holding stored data even when the ignition switch of the vehicle is turned off by supplying power from a battery is incorporated.
[0096]
As in the first embodiment, a control program and control data for engine control are already stored in the flash ROM 11a built in the CPU 11 of the X-ECU 10. As shown in FIG. 2, the control program and control data stored in the flash ROM 11a are configured by codes (program codes, data codes). This code includes a dummy code that does not affect control. When creating a control program and control data, the code checksum is adjusted to match the control program and control data by adjusting this dummy code. The identification code indicates the type of engine to be used. Hereinafter, this identification code is described as an A identification code.
[0097]
The EEPROM 12 of the X-ECU 10 and the standby RAM 11b built in the CPU 11 store an identification code indicating the type of engine controlled by the X-ECU 10. Also in the second embodiment, as in the first embodiment, the identification code is stored in both the standby RAM 11b and the EEPROM 12, and the identification code is read out by accessing the standby RAM 11b in the normal state. When the stored identification code is lost, the EEPROM 12 is accessed, and the identification code stored in the EEPROM 12 is copied to the standby RAM 11b. Hereinafter, this identification code is described as a B identification code.
[0098]
Furthermore, a control program and control data for controlling the brake device are already stored in the flash ROM 21a built in the CPU 21 of the Y-ECU 20. Like the control program and control data stored in the flash ROM 11a of the X-ECU 10, as shown in FIG. 2, the code is composed of a code including a dummy code. It is made to become the identification code which shows. Hereinafter, this identification code is described as a C identification code.
[0099]
The EEPROM 22 of the Y-ECU 20 and the standby RAM 21 built in the CPU 21 store an identification code indicating the type of brake device controlled by the Y-ECU 20. Hereinafter, this identification code is described as a D identification code. Here, the point that the EEPROM 22 is accessed when the identification code stored in the standby RAM 21b disappears is the same as in the X-ECU 10.
[0100]
In the second embodiment, the identification code is set so as to distinguish between different types of engines and brake devices, but distinguishes the vehicle type name, the vehicle grade name, the destination of the vehicle, and the like. It may be set as follows.
The memory rewriting device 80 is configured in the same manner as in the first embodiment, and the new control program and control data stored in the memory rewriting device 80 also configure the control program and control data as shown in FIG. The checksum of the code to be used is an identification code indicating the model of the engine or brake device conforming to the control program and control data.
[0101]
The CPU 11 of the X-ECU 10 and the CPU 21 of the Y-ECU 20 configured as described above are operated with the operating voltage (5 V) from the respective power supply circuits (not shown) in the X-ECU 10 and Y-ECU 20 when the vehicle ignition switch is turned on. ) Is supplied, the operation starts from the reset state.
[0102]
In the first embodiment, the communication ECU 71 of the ignition key unit 50 as an external device for the ECU 10 executes the processes shown in the flowcharts of FIGS. 3 and 4. The ECU 10 performs the processes shown in the flowcharts of FIGS. 5 to 8. Was executed.
On the other hand, in the second embodiment, the CPU 21 of the Y-ECU 20 as an external device for the X-ECU 10 is similar to the process executed by the communication ECU 71 of the ignition key unit 50 of the first embodiment. Processing, that is, processing similar to the processing shown in the flowcharts of FIGS. 3 and 4 is executed. On the other hand, the CPU 11 of the X-ECU 10 executes the same process as the process executed by the CPU 11 of the ECU 10 of the first embodiment, that is, the same process as the process shown in the flowcharts of FIGS.
[0103]
Further, in the second embodiment, the X-ECU 10 also operates as an external device for the Y-ECU 20. Accordingly, the CPU 11 of the X-ECU 10 performs the same process as the process executed by the communication ECU 71 of the ignition key unit 50 of the first embodiment, that is, the same process as the process shown in the flowcharts of FIGS. Execute. On the other hand, the CPU 21 of the Y-ECU 20 executes the same process as the process executed by the CPU 11 of the ECU 10 of the first embodiment, that is, the same process as the process shown in the flowcharts of FIGS.
[0104]
That is, in the second embodiment, the Y-ECU 20 operates as an external device of the X-ECU 10 and the X-ECU 10 operates as an external device of the Y-ECU 20. That is, the X-ECU 10 stores the B identification code indicating the model of the engine that is the control target of the X-ECU 10 in the standby RAM 11b and the EEPROM 12 of the X-ECU 10, and controls the Y-ECU 20 transmitted from the Y-ECU 20 A D identification code indicating the model of the target brake device is stored. Similarly, the Y-ECU 20 stores the D identification code indicating the control target of the Y-ECU 20 in the standby RAM 21b and the EEPROM 22 of the Y-ECU 20, and B indicating the control target of the X-ECU 10 transmitted from the X-ECU 10. The identification code is stored. As a result, when the B identification code cannot be read from the standby RAM 11b and the EEPROM 12, the X-ECU 10 makes a coincidence determination using the B identification code stored in the standby RAM 21b and the EEPROM 22 of the Y-ECU 20. Similarly, when the D identification code cannot be read, the Y-ECU 20 performs a match determination using the D identification code stored in the standby RAM 11b and the EEPROM 12 of the X-ECU 10.
[0105]
At this time, for example, when the X-ECU 10 is replaced with the replenishment X-ECU 10 due to a failure, the X-ECU 10 requests the Y-ECU 20 to transmit a D identification code (S410 in FIG. 3). When a D identification code is received from the Y-ECU 20, a retransmission is requested (S530 in FIG. 4, S410 in FIG. 3), and it is confirmed that there is no communication error due to noise or the like (S520 in FIG. 4). ), The D identification code indicating the control target of the Y-ECU 20 is stored in the standby RAM 11b and the EEPROM 12 of the X-ECU 10 (S550 in FIG. 4). Prior to the execution of the engine control process, the X-ECU 10 requests the Y-ECU 20 to transmit a B identification code indicating the control target of the X-ECU 10 (S110 in FIG. 6), and is transmitted from the Y-ECU 20 The B identification code is stored in the standby RAM 11b and the EEPROM 12 of the X-ECU 10 (S230 in FIG. 7), and this B identification code is used to determine whether the control program and control data are suitable for the control target. This is performed (S330 in FIG. 8). The same applies when the Y-ECU 20 is replaced.
[0106]
Therefore, in the case of the second embodiment, the CPU 11 of the X-ECU 10 performs “identification information transmitting means”, “identification information receiving means”, “identification information requesting means”, “matching determination means”, “processing when abnormal” It corresponds to “execution means” and also corresponds to “external information reception means”, “external information transmission means”, “external information request means”, and “external information storage control means”. 5 corresponds to the process as the identification information transmitting unit, the processes of S100 and S110 in FIG. 6 correspond to the process as the identification information request unit, and S200 to S200 in FIG. The process of S220 corresponds to the process as the identification information receiving unit, the process of S330 in FIG. 8 corresponds to the process as the coincidence determination unit, and the process of S340 in FIG. Equivalent to. Furthermore, the processing of S500 to S550 in FIG. 4 corresponds to the processing as external information storage control means, and the processing of S400 and S410 in FIG. 3 corresponds to the processing as external information requesting means. Further, the standby RAM 11b and the EEPROM 12 of the X-ECU 10 correspond to “identification information storage means” and “external information storage means”. Note that the CPU 21 of the Y-ECU 20 also executes the same processing as the CPU 11 of the X-ECU 10, and therefore has the same correspondence as described above.
[0107]
According to the electronic control system 1 of the second embodiment described above, the two ECUs 10 and 20 of X and Y have the same effects as the ECU 10 of the first embodiment.
As described above, the present invention is not limited to such an embodiment, and can be implemented in various forms without departing from the gist of the present invention.
[0108]
In the first embodiment, the ignition key unit 50 is adopted as an external device of the ECU 10, and in the second embodiment, the Y-ECU 20 is adopted as an external device of the X-ECU 10, -It is good also as a structure which employ | adopts both the ignition key part 50 and Y-ECU20 as an external apparatus of ECU10 and Y-ECU20. In this case, the B identification code of the X-ECU 10 is stored in both the ignition key unit 50 and the Y-ECU 20. Therefore, unless all of the X-ECU 10, Y-ECU 20, and ignition key unit 50 are exchanged at the same time, it is not necessary to re-input the B identification code from the outside, and the reliability of the B identification code can be further improved. For example, it is good also as a structure provided with three or more ECUs which perform operation | movement as demonstrated in the said 2nd Embodiment.
[0109]
Further, for example, in the first and second embodiments, it is determined that the control program and control data written in the flash ROM 11a built in the CPU 11 or the flash ROM 21a built in the CPU 21 are not suitable for the control target. In this case (S330: NO in FIG. 8), the warning lamp 31 is turned on via the input / output port 15 (S340 in FIG. 8), and then the control process is performed. On the other hand, when the control program and the control data are not compatible with the model of the engine to be controlled, it may be possible not to shift to the control process after the above-described match determination process. In this case, it is possible to prevent the control target from being adversely affected by executing the control process based on a control program or control data that is incompatible with the control target. Further, when the engine is a control target as in the above-described embodiment, a process of cutting fuel supply to the engine may be executed. In this case, the user does not drive the vehicle in a state where the engine control based on the non-conforming control program is performed, so that the safety of the user can be improved.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an electrical configuration of an ECU according to an embodiment.
FIG. 2 is an explanatory diagram showing a configuration of a control program and control data.
FIG. 3 is a flowchart illustrating a code request process executed by an ignition key unit or an ECU according to the embodiment.
FIG. 4 is a flowchart illustrating a code storage process executed by an ignition key unit or an ECU according to the embodiment.
FIG. 5 is a flowchart showing a transmission process executed by the ECU of the embodiment.
FIG. 6 is a flowchart showing a transmission request process executed by the ECU of the embodiment.
FIG. 7 is a flowchart showing a reception process executed by the ECU of the embodiment.
FIG. 8 is a flowchart showing a coincidence determination process executed by the ECU of the embodiment.
FIG. 9 is a block diagram illustrating an electrical configuration of an electronic control system according to a second embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Electronic control system 10 ... ECU, X-ECU
20 ... Y-ECU 11,21 ... CPU
11a, 21a ... Flash ROM 11b, 21b ... Standby RAM
12, 22 ... EEPROM 13, 23 ... Input circuit
14, 24 ... Output circuit 15, 25 ... Input / output port
31, 32 ... Warning lamp 50 ... Ignition key part
60 ... Ignition key 61 ... EEPROM
70: Key cylinder 71 ... Communication ECU
80 ... Memory rewriting device 91 ... Communication connector
92, 93, 94 ... communication line

Claims (13)

データの書き換えが可能な不揮発性メモリを備え、通常時には、前記不揮発性メモリに格納された制御プログラム及び制御データに従って所定の制御対象を制御するための制御処理を実行し、外部からの書き換え指令を受けた場合には、前記不揮発性メモリに格納されている制御プログラム又は制御データの一部又は全部を、外部から送信されて来る新たな制御プログラム又は制御データに書き換えるよう構成された電子制御装置において、
前記制御プログラム及び制御データは、当該制御プログラム及び制御データに従って制御すべき制御対象を示す識別情報であるデータ適合対象識別情報を含むよう作成されており
当該電子制御装置の制御対象を示す識別情報である制御対象識別情報を記憶するための識別情報記憶手段と、
前記識別情報記憶手段に記憶された制御対象識別情報を、下記外部記憶装置側で記憶させるために該外部記憶装置へと送信する識別情報送信手段と、
前記制御処理の実行に先だって、前記外部装置に対して前記制御対象識別情報を要求し、該要求を受けた前記外部装置から送信されてくる前記制御対象識別情報を受信する識別情報受信手段と、
記識別情報受信手段によって受信された制御対象識別情報と前記制御プログラム又は制御データに含まれたデータ適合対象識別情報とが一致しているか否かを判断する一致判断手段と、
該一致判断手段によって前記両識別情報が一致していないと判断された場合には異常時対応処理を実行する異常時処理実行手段と、を備え
前記一致判断手段は、前記識別情報記憶手段から制御対象識別情報が読み出せる場合には、前記識別情報記憶手段に記憶された制御対象識別情報を用いて前記データ適合対象識別情報との一致判断を行い、一方、前記識別情報記憶手段から制御対象識別情報が読み出せない場合には、前記識別情報受信手段によって受信された制御対象識別情報を用いて前記データ適合対象識別情報との一致判断を行うよう構成されている
ことを特徴とする電子制御装置。
外部装置:前記制御対象識別情報を記憶するためのメモリを有し、該メモリに記憶された前記制御対象識別情報を当該電子制御装置からの要求を受けて当該電子制御装置へ送信するように構成された装置
A non-volatile memory capable of rewriting data is provided. In normal times, a control process for controlling a predetermined control object is executed according to a control program and control data stored in the non-volatile memory, and an external rewrite command is issued. In the electronic control device configured to rewrite a part or all of the control program or control data stored in the nonvolatile memory to a new control program or control data transmitted from the outside when received ,
The control program and the control data is created to include data Main subject identification information is identification information indicating the control target should therefore controlled to the control program and control data,
Identification information storage means for storing control object identification information which is identification information indicating a control object of the electronic control device ;
The controlled object identification information stored in the identification information storage unit, an identification information transmission means for transmitting to the external storage device in order to store the following external storage apparatus,
Prior to the execution of the control process, identification information receiving means for requesting the control target identification information from the external device and receiving the control target identification information transmitted from the external device that has received the request ;
A matching determination means for determining whether or not the previous SL identification information receiving means data Main subject identification information included the in the control program or control data and the control object identification information received by the match,
An abnormality processing execution means for executing an abnormality handling process when the identification information is determined not to match by the matching determination means ;
When the control object identification information can be read from the identification information storage means, the match determination means performs a match determination with the data matching target identification information using the control object identification information stored in the identification information storage means. On the other hand, if the control object identification information cannot be read from the identification information storage means, the control object identification information received by the identification information reception means is used to make a match determination with the data matching object identification information. An electronic control device configured as described above .
External device: having a memory for storing the control target identification information, and configured to transmit the control target identification information stored in the memory to the electronic control device in response to a request from the electronic control device Equipment
請求項1に記載の電子制御装置において、
前記異常時処理実行手段によって実行される異常時対応処理は、前記制御プログラム又は制御データが前記所定の制御対象に適合していない旨を報知する処理である
ことを特徴とする電子制御装置。
The electronic control device according to claim 1.
The electronic control device, wherein the abnormal time response processing executed by the abnormal time processing execution means is a process of notifying that the control program or control data is not suitable for the predetermined control target.
請求項1又は2に記載の電子制御装置において、
前記異常時処理実行手段によって実行される異常時対応処理は、前記制御処理への移行を許可しない処理である
ことを特徴とする電子制御装置。
The electronic control device according to claim 1 or 2,
The electronic control device, wherein the abnormality handling process executed by the abnormality process execution means is a process that does not permit the shift to the control process.
請求項1〜3のいずれかに記載の電子制御装置において、
前記識別情報送信手段は、前記外部装置から前記制御対象識別情報の送信が要求されると、前記識別情報記憶手段に記憶した制御対象識別情報を前記外部装置へ送信するよう構成されている
ことを特徴とする電子制御装置。
The electronic control device according to any one of claims 1 to 3,
The identification information transmitting unit is configured to transmit the control target identification information stored in the identification information storage unit to the external device when the transmission of the control target identification information is requested from the external device. Electronic control device characterized.
請求項1から4のいずれかに記載の電子制御装置において、
さらに、前記識別情報記憶手段から制御対象識別情報が読み出せない場合には、前記外部装置に前記制御対象識別情報の送信を要求する識別情報要求手段を備えた
ことを特徴とする電子制御装置。
The electronic control device according to any one of claims 1 to 4 ,
And an identification information requesting unit that requests the external device to transmit the control target identification information when the control target identification information cannot be read from the identification information storage unit.
請求項1から5のいずれかに記載の電子制御装置において、
前記識別情報受信手段によって受信された制御対象識別情報を前記識別情報記憶手段に記憶するよう構成されている
ことを特徴とする電子制御装置。
The electronic control device according to any one of claims 1 to 5 ,
An electronic control device characterized in that the control object identification information received by the identification information receiving means is stored in the identification information storage means.
請求項1〜のいずれかに記載の電子制御装置において、
前記データ適合対象識別情報を、前記制御プログラム及び制御データを構成するコードから唯一決定されるものとした
ことを特徴とする電子制御装置。
The electronic control device according to any one of claims 1 to 6 ,
The electronic control device, wherein the data matching target identification information is uniquely determined from codes constituting the control program and control data.
請求項1〜のいずれかに記載の電子制御装置において、
さらに、
前記外部装置としての他の電子制御装置から送信されてくる当該他の電子制御装置の制御対象を示す識別情報である外部識別情報を受信する外部情報受信手段と、
該外部情報受信手段によって受信された外部識別情報を記憶するための外部情報記憶手段と、
該外部情報記憶手段に記憶された外部識別情報を前記他の電子制御装置へ送信する外部情報送信手段とを備え、
前記他の電子制御装置に対する外部装置としても動作可能に構成されている
ことを特徴とする電子制御装置。
In the electronic control unit according to any one of claims 1 to 7 ,
further,
External information receiving means for receiving external identification information that is identification information indicating a control target of the other electronic control device transmitted from another electronic control device as the external device;
External information storage means for storing external identification information received by the external information receiving means;
External information transmission means for transmitting external identification information stored in the external information storage means to the other electronic control device,
An electronic control device configured to be operable as an external device for the other electronic control device.
請求項に記載の電子制御装置において、
前記外部情報記憶手段に前記外部情報が記憶されていない場合には、前記他の電子制御装置へ前記外部識別情報の送信を要求する外部情報要求手段を備えた
ことを特徴とする電子制御装置。
The electronic control device according to claim 8 .
An electronic control device comprising: external information requesting means for requesting transmission of the external identification information to the other electronic control device when the external information is not stored in the external information storage means.
請求項又はに記載の電子制御装置において、
前記外部情報要求手段は、前記外部情報受信手段によって外部情報が受信された場合、前記外部情報の再送信を要求するよう構成され、
さらに、最初に受信された外部情報と、前記再送信要求に基づき前記外部情報受信手段によって受信される外部情報とが一致しているか否かを判断し、一致していると判断された場合、前記外部情報を前記外部情報記憶手段に記憶する外部情報記憶制御手段
を備えたことを特徴とする電子制御装置。
The electronic control device according to claim 8 or 9 ,
The external information requesting means is configured to request retransmission of the external information when the external information is received by the external information receiving means;
Further, it is determined whether the external information received first matches the external information received by the external information receiving means based on the retransmission request. An electronic control device comprising: external information storage control means for storing the external information in the external information storage means.
請求項〜1のいずれかに記載の電子制御装置において、
前記外部情報送信手段は、前記他の電子制御装置から前記外部情報の送信要求があると、記外部情報記憶手段に記憶した外部情報を送信するよう構成されている
ことを特徴とする電子制御装置。
The electronic control device according to any one of claims 8 to 10 ,
The external information transmission unit is configured to transmit the external information stored in the external information storage unit when there is a request for transmission of the external information from the other electronic control unit. .
請求項〜1のいずれかに記載の電子制御装置を複数台備えることによって、各電子制御装置に対して少なくとも他の1台の電子制御装置が外部装置として動作するよう構成されている
ことを特徴とする電子制御システム。
By providing a plurality of electronic control devices according to any one of claims 1 to 11, at least one other electronic control device is configured to operate as an external device for each electronic control device. Electronic control system characterized by
データの書き換えが可能な不揮発性メモリを備え、通常時には、前記不揮発性メモリに格納された制御プログラム及び制御データに従って所定の制御対象を制御するための制御処理を実行し、外部からの書き換え指令を受けた場合には、前記不揮発性メモリに格納さA non-volatile memory capable of rewriting data is provided. In normal times, a control process for controlling a predetermined control object is executed according to a control program and control data stored in the non-volatile memory, and an external rewrite command is issued. If received, it is stored in the non-volatile memory. れている制御プログラム又は制御データの一部又は全部を、外部から送信されて来る新たな制御プログラム又は制御データに書き換えるよう構成された電子制御装置により、前記不揮発性メモリに書き込まれている制御プログラム又は制御データが制御対象に適合しているか否かを判断させるための適合判断方法であって、Control program written in the non-volatile memory by an electronic control device configured to rewrite a part or all of the control program or control data to a new control program or control data transmitted from the outside Or a conformity determination method for determining whether or not the control data conforms to a control object,
当該電子制御装置が制御する制御対象を示す識別情報である制御対象識別情報を記憶するための識別情報記憶手段に記憶された制御対象識別情報を、下記外部記憶装置側で記憶させるために該外部装置に対して送信する識別情報送信手順と、In order to store the control target identification information stored in the identification information storage means for storing the control target identification information, which is identification information indicating the control target controlled by the electronic control device, on the external storage device side described below, An identification information transmission procedure to be transmitted to the device;
前記制御処理の実行に先だって、前記外部装置に対して前記制御対象識別情報を要求し、該要求を受けた前記外部装置から送信されてくる前記制御対象識別情報を受信する識別情報受信手順と、Prior to execution of the control process, an identification information receiving procedure for requesting the control target identification information from the external device and receiving the control target identification information transmitted from the external device that has received the request;
前記制御プログラム又は制御データに含まれた識別情報であって当該制御プログラム及び制御データに従って制御すべき制御対象を示すデータ適合対象識別情報、および、前記識別情報受信手順にて受信した制御対象識別情報、が一致しているか否かを判断する一致判断手順と、Identification information included in the control program or control data, data adaptation target identification information indicating a control target to be controlled according to the control program and control data, and control target identification information received in the identification information receiving procedure Match determination procedure for determining whether or not match,
該一致判断手順にて両識別情報が一致していれば、前記不揮発性メモリに書き込まれている制御プログラム又は制御データが制御対象に適合していると判断し、両識別情報が一致していなければ、前記不揮発性メモリに書き込まれている制御プログラム又は制御データが制御対象に適合していないと判断と判断する適合判断手順と、からなり、If both identification information matches in the matching determination procedure, it is determined that the control program or control data written in the non-volatile memory is suitable for the control target, and both identification information must match. For example, the control program or control data written in the non-volatile memory comprises a determination procedure for determining that the control program or control data is not compatible with the control target, and
前記一致判断手順においては、前記識別情報記憶手段から制御対象識別情報が読み出せる場合には、前記識別情報記憶手段に記憶された制御対象識別情報を用いて前記データ適合対象識別情報との一致判断を行い、一方、前記識別情報記憶手段から制御対象識別情報が読み出せない場合には、前記識別情報受信手順にて受信された制御対象識別情報を用いて前記データ適合対象識別情報との一致判断を行うIn the matching determination procedure, when the control target identification information can be read from the identification information storage unit, the matching determination with the data matching target identification information is performed using the control target identification information stored in the identification information storage unit. On the other hand, if the control object identification information cannot be read from the identification information storage unit, the control object identification information received in the identification information reception procedure is used to determine whether the data match target identification information matches. I do
ことを特徴とする適合判断方法。A conformity judgment method characterized by that.
外部装置:前記制御対象識別情報を記憶するためのメモリを有し、該メモリに記憶された前記制御対象識別情報を当該電子制御装置からの要求を受けて当該電子制御装置へ送信するように構成された装置External device: having a memory for storing the control target identification information, and configured to transmit the control target identification information stored in the memory to the electronic control device in response to a request from the electronic control device Equipment
JP07923998A 1998-03-26 1998-03-26 Electronic control device, electronic control system, and conformity determination method Expired - Fee Related JP4066499B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP07923998A JP4066499B2 (en) 1998-03-26 1998-03-26 Electronic control device, electronic control system, and conformity determination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP07923998A JP4066499B2 (en) 1998-03-26 1998-03-26 Electronic control device, electronic control system, and conformity determination method

Publications (2)

Publication Number Publication Date
JPH11280536A JPH11280536A (en) 1999-10-12
JP4066499B2 true JP4066499B2 (en) 2008-03-26

Family

ID=13684319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP07923998A Expired - Fee Related JP4066499B2 (en) 1998-03-26 1998-03-26 Electronic control device, electronic control system, and conformity determination method

Country Status (1)

Country Link
JP (1) JP4066499B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10008974B4 (en) * 2000-02-25 2005-12-29 Bayerische Motoren Werke Ag signature methods
JP2003058285A (en) * 2001-08-10 2003-02-28 Fujitsu Ten Ltd Control system
JP2006178859A (en) * 2004-12-24 2006-07-06 Denso Corp Controller
JP2007321624A (en) * 2006-05-31 2007-12-13 Iseki & Co Ltd Electronic part confirming device of engine
JP5024096B2 (en) * 2008-02-08 2012-09-12 株式会社デンソー Vehicle control device
JP2010223153A (en) * 2009-03-25 2010-10-07 Kubota Corp Engine-mounting machine
JP5811865B2 (en) * 2012-01-27 2015-11-11 トヨタ自動車株式会社 Control device and program execution method
JP6393905B2 (en) * 2013-12-12 2018-09-26 パナソニックIpマネジメント株式会社 Motor drive device
JP6156242B2 (en) 2014-04-14 2017-07-05 株式会社デンソー Electronic control device for vehicle
JP6280856B2 (en) * 2014-10-31 2018-02-14 株式会社シマノ Bicycle control system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3550834B2 (en) * 1995-11-13 2004-08-04 株式会社デンソー Memory rewriting system for vehicle electronic control unit, vehicle electronic control unit and memory rewriting device

Also Published As

Publication number Publication date
JPH11280536A (en) 1999-10-12

Similar Documents

Publication Publication Date Title
KR100258147B1 (en) Memory writing device for an electronic device
US8458689B2 (en) Method and apparatus for reprogramming engine controllers
EP2241479B1 (en) A rewriting system for a vehicle
JP4539757B2 (en) Electronic control unit
US20070005204A1 (en) Vehicle-mounted data rewriting control system
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
JP4066499B2 (en) Electronic control device, electronic control system, and conformity determination method
JP2003256228A (en) Program rewriting device
JPH0883176A (en) Controller
JP4302113B2 (en) In-vehicle control device
JPH09134307A (en) Memory rewriting system for electronic controller, the electronic controller and memory rewriting device
JP4061694B2 (en) Electronic control device and control system
JP3870563B2 (en) Electronic control device and non-volatile memory rewrite count method
EP0954863A1 (en) System and method for memory reset of a vehicle controller
JP4475345B2 (en) Electronic control unit
JPH10149282A (en) Memory rewriting system for electronic device
JP3568704B2 (en) Electronic control device, memory rewriting device, and memory rewriting system for electronic control device
JPH11141391A (en) Controller for automobile
JPH11257151A (en) Electronic controller
JPH09171459A (en) Electronic control equipment
JP2003276528A (en) Electronic control device for vehicle
JP2004021520A (en) Electronic controller for vehicle
JP2002323990A (en) Electronic controller and method for initializing nonvolatile memory
JP2004178067A (en) Electronic control device
JPH11203115A (en) Controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070731

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070807

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071004

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071231

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140118

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees