JP3960212B2 - Electronic control unit - Google Patents
Electronic control unit Download PDFInfo
- Publication number
- JP3960212B2 JP3960212B2 JP2002340878A JP2002340878A JP3960212B2 JP 3960212 B2 JP3960212 B2 JP 3960212B2 JP 2002340878 A JP2002340878 A JP 2002340878A JP 2002340878 A JP2002340878 A JP 2002340878A JP 3960212 B2 JP3960212 B2 JP 3960212B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- value
- stored
- electronic control
- continuously
- 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
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、動作中に更新される特定のデータの値を、電気的に記憶内容の書き換えが可能な不揮発性メモリを用いて継続的に保存及び更新していくようにした電子制御装置に関するものである。
【0002】
【従来の技術】
従来より、自動車用の電子制御装置においては、動作電源の供給が停止されても継続して保存すべき故障診断情報や制御学習値などの特定のデータであって、データ処理に用いられる処理作業用メモリ上で値が更新されるデータ(以下、継続保存対象データという)を、電気的に記憶内容の書き換えが可能なEEPROMなどの不揮発性メモリ(以下、書換可能不揮発性メモリともいう)に書き込んでおくことにより、そのデータ値を継続して保持及び更新することができるようにしている。
【0003】
例えば、バッテリバックアップされたRAM(以下、バックアップRAMともいう)を用いて常時処理を行うと共に、そのRAM内の所定領域のデータを、EEPROMにコピーして保存しておき、動作電源の投入に伴う動作開始時に、バックアップRAM内のデータが異常であれば、EEPROM内のデータをバックアップRAMへコピーして復元する装置が知られている(例えば、特許文献1参照)。
【0004】
また、EEPROMなどの書換可能不揮発性メモリには、データ書込回数に制限がある。よって、この種の電子制御装置では、その書換可能不揮発性メモリへのデータ書込回数を減らすために、予め定められた書込実施条件が成立した際にだけ、継続保存対象データの値を書換可能不揮発性メモリに記憶させるようにしている。
【0005】
例えば、上記例の装置のように、バックアップRAMが処理作業用メモリである場合には、動作停止中(即ち、動作電源の供給遮断中)でも、バッテリ上がりやバッテリ外れがなければ、とりあえずはそのバックアップRAM内に継続保存対象データが継続保存されるため、電子制御装置が複数回動作する毎に1回の頻度で、継続保存対象データの値を書換可能不揮発性メモリに記憶させるように構成することが考えられる。
【0006】
また例えば、自動車用電子制御装置では、イグニッションスイッチがオンされている時か、外部に設けられた給電用のメインリレーがオンされている時に、動作電源が供給されると共に、電子制御装置は、イグニッションスイッチのオンに伴い動作すると、メインリレーを自らオンさせることで、イグニッションスイッチのオフ後も動作を継続できるように構成されることがある。そして、このようなメインリレーが存在する場合、電子制御装置は、バッテリバックアップされていない通常のRAMが処理作業用メモリであっても、イグニッションスイッチがオフされたことを検知した際に、RAMから書換可能不揮発性メモリへ継続保存対象データの値をコピーし、その後メインリレーをオフさせるという手順により、書換可能不揮発性メモリへのデータ書き込みの実施を、電子制御装置が1回動作する毎に1回の頻度に(詳しくは、電子制御装置の動作停止直前時のみに)抑えることができる。尚、この場合には、動作電源の投入に伴う動作開始時に、書換可能不揮発性メモリ内のデータを処理作業用メモリとしてのRAMへコピーして復元すれば良い。
【0007】
一方、自動車用電子制御装置においては、CARB(カリフォルニア大気資源保護局)によるOBD(オンボードダイアグノスティック)2の法規に、RateBaseモニタ法があり、そのRateBaseモニタ法では、下記の式で示されるモニタ頻度を継続的に記憶し且つ更新していく必要がある。
【0008】
モニタ頻度=モニタリング実施回数/運転回数
尚、モニタ頻度は、故障診断を実施した頻度であり、触媒コンバータ,フューエルエバポレーションシステム,酸素センサ等といった複数の項目(即ち、診断対象)について各々存在する。そして、運転回数(以下、分母という)は、その項目について法規で定められた所定の走行条件が満たされたときに値がインクリメントされるデータであり、モニタリング実施回数(以下、分子という)は、その項目について自動車メーカで定めた故障診断実施条件が満たされて、正常又は異常の判定が終了した時点(即ち、故障診断が実施された時点)で値がインクリメントされるデータである。また、これら分母と分子は、両方共に、自動車のイグニッションスイッチがオンされてオフされるまでの間(即ち、故障診断を実施する電子制御装置に動作電源が投入されて該動作電源が遮断されるまでの1回の動作期間中)に、1回だけインクリメントされるか、或いは、インクリメントされずにそのままの値を維持するかの何れかである。そして更に、これらモニタ頻度のデータ(分母と分子のデータ)は、電子制御装置と通信可能に接続される車両外部の診断装置(診断ツールやダイアグチェッカーとも呼ばれる)によって読み出すことができなければならない。
【0009】
【特許文献1】
特開平4−336351号公報
【0010】
【発明が解決しようとする課題】
ところで、継続保存対象デーが、上記RateBaseモニタ法で規定されているモニタ頻度のように、外部装置による読み出しができなければならないものである場合、電子制御装置は、外部装置からの出力要求を受けると、処理作業用メモリに記憶されている継続保存対象データの値(即ち、そのデータの最新値)を外部装置に出力する、といった具合に構成されることとなるが、この場合に、以下の問題がある。
【0011】
即ち、まず、処理作業用メモリに記憶されている継続保存対象データの最新値が外部装置へ読み出された後、その最新値の書換可能不揮発性メモリへの記憶が実施される前に、何らかの原因で処理作業用メモリ内の継続保存対象データを失ったとする。すると、その後、前述したようなデータの復元機能により、書換可能不揮発性メモリ内のデータ値が処理作業用メモリへコピーされることとなるが、この場合、処理作業用メモリには、外部装置へ読み出された最新値よりも古いデータ値が書換可能不揮発性メモリからコピーされることとなる。よって、その後、再度、外部装置によりデータの読み出しが行われたとすると、その際に読み出されるデータ値が、前回に読み出されたデータ値よりも古いと見なされる値(過去に溯った値)になってしまう可能性があり、そのような読み出しデータ値の逆転現象は、電子制御装置の見た目の信頼性を大きく損ねるものとなる。
【0012】
尚、書換可能不揮発性メモリから処理作業用メモリへのデータの復元が行われたことを、電子制御装置の外部に設けられたチェックランプ等の報知器によって報知する、といった構成を採れば、電子制御装置の機能自体には異常が無いことを確認させることはできるが、故障でもないのに報知器を作動させるのは無駄なことであり、上記のような読み出しデータ値の逆転現象自体が起こらないようにすることが重要である。
【0013】
そこで、本発明は、特定のデータをEEPROM等の書換可能不揮発性メモリを用いて継続的に保存及び更新していくと共に、そのデータ値を外部装置によって読み出し可能な電子制御装置において、外部装置により読み出したデータ値が前回読み出したデータ値よりも古いと見なされる値になってしまう現象の発生を防止することを目的としている。
【0014】
【課題を解決するための手段及び発明の効果】
上記目的を達成するためになされた請求項1に記載の電子制御装置は、処理作業用メモリ上で値が更新される継続保存対象データを動作電源の供給が停止されても継続して保存するために、電気的に記憶内容の書き換えが可能な書換可能不揮発性メモリを備えている。
【0015】
そして、請求項1の電子制御装置では、データ保存手段が、予め定められた書込実施条件が成立した際に、処理作業用メモリに記憶されている継続保存対象データの値(即ち、その時点での継続保存対象データの最新値)を書換可能不揮発性メモリに記憶させ、データ復元手段が、予め定められたデータ復元実施条件が成立した際に、書換可能不揮発性メモリに記憶されている継続保存対象データの値を処理作業用メモリにコピーすることにより、処理作業用メモリ内の継続保存対象データが消失しても該継続保存対象データの値の継続的な更新ができるようにする。また、出力手段が、外部装置からの継続保存対象データの出力要求を受けた場合に、処理作業用メモリに記憶されている継続保存対象データの値を、その外部装置に出力する。
【0016】
そして特に、この請求項1の電子制御装置には、上記データ保存手段とは別に、第2のデータ保存手段が設けられており、その第2のデータ保存手段は、外部装置からの前記出力要求を受けた際にも、処理作業用メモリに記憶されている継続保存対象データの値を書換可能不揮発性メモリに記憶させる。
【0017】
このような請求項1の電子制御装置において、仮に、本装置の特徴部分である第2のデータ保存手段を有していないとすると、前述したように、処理作業用メモリに記憶されている継続保存対象データの最新値が外部装置へ読み出されてから、その最新値がデータ保存手段によって書換可能不揮発性メモリに記憶される前に(つまり、予め定められた書込実施条件が成立する前に)、何らかの原因で処理作業用メモリ内の継続保存対象データを失ってしまい、その後、データ復元実施条件が成立して、データ復元手段により、書換可能不揮発性メモリ内のデータ値が処理作業用メモリへコピーされ、更にその後、外部装置によって、再度、継続保存対象データの読み出しが行われたとすると、その際に読み出されるデータ値が、前回に読み出されたデータ値よりも古いと見なされる値になってしまう可能性がある。
【0018】
しかし、本請求項1の電子制御装置によれば、第2のデータ保存手段を備えており、外部装置からの出力要求を受けて継続保存対象データの最新値を外部装置に出力する際にも、処理作業用メモリに記憶されている継続保存対象データの最新値が不揮発性メモリに記憶されるため、処理作業用メモリに記憶されている継続保存対象データの最新値が外部装置へ読み出されてから、その最新値が書換可能不揮発性メモリに記憶される前に、処理作業用メモリ内の継続保存対象データが失われてしまう、という可能性を極めて低くすることができる。
【0019】
よって、書換可能不揮発性メモリへのデータ書込回数を減らすために、本来のデータ保存手段が動作する契機となる書込実施条件を成立頻度が小さいものに設定しても、外部装置によって読み出したデータ値が前回読み出したデータ値よりも古いと見なされる値になってしまう現象の発生を防止することができる。
【0020】
ところで、外部装置からの出力要求を受けた際に、まず出力手段が動作し、次いで第2のデータ保存手段が動作する、というように構成しても良いが、この場合には、外部装置へ継続保存対象データの最新値を出力してから該最新値が書換可能不揮発性メモリに記憶される前にその最新値を電源瞬断等によって失ってしまう、という可能性が少しは残る。
【0021】
そこで、その可能性を完全に無くすためには、請求項2に記載の如く、出力手段は、第2のデータ保存手段による書換可能不揮発性メモリへの継続保存対象データの値の記憶が終了してから、処理作業用メモリに記憶されている継続保存対象データの値を外部装置に出力するように構成すれば良い。つまり、外部装置からの出力要求を受けた際に、まず第2のデータ保存手段が動作し、その第2のデータ保存手段による書換可能不揮発性メモリへの継続保存対象データの値の記憶が終了してから、出力手段が動作するように構成すれば良い。
【0022】
尚、この請求項2の電子制御装置の場合、出力手段が動作する時点では、処理作業用メモリに記憶されている継続保存対象データの値と書換可能不揮発性メモリに記憶されている継続保存対象データの値とが必ず一致しているため、出力手段は、書換可能不揮発性メモリから継続保存対象データの値を読み出し、その読み出した値を、処理作業用メモリに記憶されている継続保存対象データの値として、外部装置に出力するように構成しても良い。
【0023】
一方、この請求項2の電子制御装置の場合、外部装置からの出力要求を受けてから、出力手段が動作を開始するまでの間に、第2のデータ保存手段による書換可能不揮発性メモリへの継続保存対象データの値の記憶が実施されるため、出力要求を受けてから外部装置に継続保存対象データの値を返すまでの応答時間が長くなる傾向となる。また、この種の電子制御装置に接続される外部装置は、要求を出してから規定時間以内に応答が返ってこないと、タイムアウト判定を行うように構成される場合がある。
【0024】
このため、請求項2の電子制御装置において、第2のデータ保存手段が書換可能不揮発性メモリへ継続保存対象データの値を記憶させるのに要する時間が長くなると、本当は正常であるにも拘わらず、外部装置側でタイムアウト判定がなされてしまう虞がある。
【0025】
そこで、請求項3に記載の電子制御装置では、請求項2の電子制御装置に対して先行応答手段を設け、その先行応答手段が、外部装置からの出力要求を受けた場合に、第2のデータ保存手段が動作する前又は該第2のデータ保存手段が動作している最中に動作して、外部装置側でタイムアウト判定がなされるのを防ぐための応答信号をその外部装置に出力するようにしている。そして、このような請求項3の電子制御装置によれば、継続保存対象データのデータ量が大きくて、第2のデータ保存手段が書換可能不揮発性メモリへ継続保存対象データの値を記憶させるのに要する時間が長くなっても、外部装置側でタイムアウト判定がなされてしまうことを防ぐことができる。
【0026】
次に、請求項4に記載の電子制御装置では、請求項1〜3の電子制御装置において、第2のデータ保存手段は、処理作業用メモリに記憶されている継続保存対象データの値と、書換可能不揮発性メモリに記憶されている継続保存対象データの値とを比較して、両値が異なっている場合にのみ、処理作業用メモリに記憶されている継続保存対象データの値を書換可能不揮発性メモリに記憶させる。
【0027】
そして、このような電子制御装置によれば、書換可能不揮発性メモリへのデータ書込回数を節約することができる。つまり、外部装置からの出力要求が頻繁に繰り返された場合に、その都度、継続保存対象データの最新値が更新されていないにも拘わらず書換可能不揮発性メモリへのデータ値の記憶を実施していると、その書換可能不揮発性メモリへのデータ書込回数を無駄に増加させてしまうこととなるが、請求項4の電子制御装置によれば、そのような無駄を無くすことができる。
【0028】
一方、処理作業用メモリとしては、データ保持用の電源が常時供給されたスタンバイRAM(前述のバックアップRAMに相当)と、電子制御装置への動作電源の供給に伴い当該電子制御装置が動作しているときにのみデータ保持用の電源が供給されるノーマルRAM(即ち、バッテリバックアップされていない通常のRAM)との何れを用いても良い。
【0029】
ここで、ノーマルRAMを処理作業用メモリとして用いるならば、例えば、「従来の技術」の欄で述べたように、給電用のメインリレーを設け、動作電源供給用のスイッチ(以下、給電用スイッチという)がオンされて動作を開始すると、メインリレーを自らオンさせて給電用スイッチのオフ後も動作を継続できるようにし、更に、給電用スイッチがオフされたことを検知した際に、書込実施条件が成立したとして、ノーマルRAMに記憶されている継続保存対象データの値を書換可能不揮発性メモリに記憶させ、その後メインリレーをオフさせる、というように構成することで、本来のデータ保存手段による書換可能不揮発性メモリへのデータ書込頻度を、電子制御装置が1回動作する毎に1回の割合にすることができる。そして、この場合には、動作開始時に、データ復元条件が成立したとして、書換可能不揮発性メモリに記憶されているデータ値を処理作業用メモリとしてのノーマルRAMへコピーして復元すれば良い。
【0030】
また、スタンバイRAMを処理作業用メモリとして用いれば、「従来の技術」の欄で述べたように、動作停止中(動作電源の供給遮断中)でも、とりあえずはそのスタンバイRAM内に継続保存対象データが継続保存されるため、本来のデータ保存手段が動作する頻度(即ち、書込実施条件の成立頻度)を、電子制御装置が複数回動作する毎に1回の割合に設定することができ、書換可能不揮発性メモリへのデータ書込回数を減らす上で有利である。そして、この場合には、動作電源の投入に伴う動作開始時に、スタンバイRAM内の記憶データが正常であるか否かを判定し、正常でないと判定したならば、データ復元条件が成立したとして、書換可能不揮発性メモリに記憶されているデータ値をスタンバイRAMへコピーして復元すれば良い。
【0031】
但し、スタンバイRAMの記憶容量を小さく抑えるためには、ノーマルRAMを処理作業用メモリとして用い、スタンバイRAMは継続保存対象データの保存のためだけに用いる、という構成を採ることもできる。
そこで、請求項5に記載の電子制御装置では、請求項1〜4の電子制御装置において、スタンバイRAMと、処理作業用メモリとしてのノーマルRAMと、そのノーマルRAMからスタンバイRAMへ継続保存対象データの最新値をコピーするコピー手段とを備えており、データ保存手段、第2のデータ保存手段、及び出力手段は、ノーマルRAM又はスタンバイRAMから継続保存対象データの値を読み出して、その読み出した値を、処理作業用メモリに記憶されている継続保存対象データの値(つまり、継続保存対象データの最新値)として処理するように構成されている。そして更に、データ復元手段は、当該電子制御装置が動作電源の供給に伴い起動した際に、スタンバイRAM内の記憶データが正常であるか否かを判定して、スタンバイRAM内の記憶データが正常であると判定したならば、そのスタンバイRAMからノーマルRAMへ継続保存対象データの値をコピーし、スタンバイRAM内の記憶データが正常でないと判定したならば、データ復元実施条件が成立したとして、書換可能不揮発性メモリに記憶されている継続保存対象データの値をスタンバイRAMとノーマルRAMとにコピーするように構成されている。
【0032】
このような請求項5に記載の電子制御装置によれば、スタンバイRAMを処理作業用メモリとして用いた場合と同様に、動作停止中(動作電源の供給遮断中)でも、バッテリ上がりやバッテリ外れがなければ、とりあえずはスタンバイRAM内に継続保存対象データが継続保存されるため、本来のデータ保存手段が動作する頻度を、電子制御装置が複数回動作する毎に1回の割合に設定することができ、しかも、スタンバイRAMの記憶容量が小さいもので済む。
【0033】
次に、請求項6に記載の電子制御装置は、請求項1〜5の電子制御装置を、車両に搭載された車載機器を制御する車両用電子制御装置に適用したものであり、車両が所定の運転状態となったことを検出する検出手段と、所定の故障診断実施条件が成立した場合に前記車載機器における診断対象の故障診断を実施する故障診断手段と、当該装置の起動から停止までの間に、検出手段により前記所定の運転状態が検出されたときに処理作業用メモリに記憶されている運転回数の値を1回分だけ更新した値に書き換えると共に、故障診断手段にて診断対象の故障診断が実施されたときに処理作業用メモリに記憶されている故障診断回数の値を1回分だけ更新した値に書き換えるデータ更新手段とを備えている。そして、この電子制御装置では、前記データ更新手段により処理作業用メモリ上で値が更新される運転回数と故障診断回数とが、継続保存対象データとなっている。
【0034】
このような請求項6の電子制御装置によれば、書換可能不揮発性メモリへのデータ書込回数を減らすために、本来のデータ保存手段が動作する契機となる書込実施条件を成立頻度が小さいものに設定しても、外部装置によって読み出した運転回数と故障診断回数の値が前回読み出した値よりも古いと見なされる値(具体的には、小さい値)になってしまう現象の発生を防止することができる。
【0035】
尚、この請求項6の電子制御装置において、外部装置としては、請求項7に記載のように、当該電子制御装置に接続可能な車両用の診断装置であることが考えられる。
【0036】
【発明の実施の形態】
以下、本発明の一実施形態について、図面を用いて説明する。
まず図1は、自動車に搭載された車載機器としての内燃機関型エンジンの制御を行う、第1実施形態の電子制御装置(以下、ECUという)1の構成を表すブロック図である。
【0037】
図1に示すように、ECU1は、エンジンの運転状態やエンジンの周辺機器の状態を検出するための様々なセンサ3からの信号を入力して波形処理する入力処理回路5と、入力処理回路5からのセンサ信号等に基づき、エンジン制御や故障診断等に関する様々な処理を行うマイクロコンピュータ(以下、マイコンという)7と、マイコン7と通信ライン9を介して接続され、そのマイコン7にて算出されるデータのうちで、当該ECU1への動作電源の供給が停止されても継続して保存すべきデータ(継続保存対象データ)が記憶される書換可能不揮発性メモリとしてのEEPROM11と、マイコン7からの制御信号に応じて、エンジンに取付けられた燃料噴射装置(インジェクタ)や点火装置(イグナイタ)等のアクチュエータ13を駆動する出力回路15と、自動車のイグニッションスイッチ17のオンに伴い供給されるバッテリ19からの動作電源としての電圧VDを受けて、マイコン7を始めとする当該ECU1内の各部に動作用の電源電圧(例えば5V)Vmを供給すると共に、バッテリ19から常時供給される電圧VBから、マイコン7内の後述するスタンバイRAM29が常時データを保持するための副電源電圧Vs(スタンバイRAMへのデータ保持用の電源に相当)を生成して出力する電源回路21とを備えている。
【0038】
尚、電源回路21は、給電用スイッチとしてのイグニッションスイッチ17がオンされて上記電源電圧Vmの供給を開始してから、その電源電圧Vmが安定すると見なされる所定時間だけマイコン7へリセット信号を出力する、所謂パワーオンリセット機能も有している。
【0039】
そして、マイコン7は、プログラムを実行する周知のCPU(中央演算処理装置)23と、CPU23によって実行されるプログラム(詳しくは、そのプログラムを構成する命令コードやそのプログラムの実行時に参照される固定のデータ)を記憶する不揮発性のROM25と、CPU23がデータ処理に用いる処理作業用メモリとしての揮発性RAM27と、電源回路21からの副電源電圧Vsを受けて常時データを保持可能なスタンバイRAM(バッテリバックアップされたRAMであり、以下、SRAMと記す)29と、入力処理回路5,EEPROM11,及び出力回路15等との間で信号やデータをやり取りするためのI/O31とを備えている。尚、RAM27には、バッテリバックアップがされておらず、電源回路21からの電源電圧Vmがデータ保持用の電源として供給される。そして、以下の説明において、このRAM27は、SRAM29との区別を明確にするために、NRAM(ノーマルRAM)27と呼ぶ。
【0040】
以上のような構成のECU1は、イグニッションスイッチ17がオンされている間、バッテリ19からの電圧VDを受けて動作する。
そして、ECU1では、イグニッションスイッチ17がオンされて、電源回路21からマイコン7へのリセット信号が解除されると、マイコン7が初期状態から動作を開始して、後述するイニシャル処理を行った後、エンジンを制御するための制御処理を行う。尚、マイコン7の動作は、CPU23がROM25内のプログラムを実行することによるものである。
【0041】
また、マイコン7は、前述したCARB・OBD2のRateBaseモニタ法で定められている故障診断対象項目の各々(触媒コンバータ,フューエルエバポレーションシステム,酸素センサ等)について、前述したモニタ頻度を表す分子(故障診断回数としてのモニタリング実施回数)と分母(運転回数)の値を、EEPROM11とSRAM29とを使用して継続的に保存及び更新していくようにしている。
【0042】
また更に、ECU1には、車両外部の診断ツール33(外部装置としての診断装置に相当)がダイアグコネクタ35を介して接続可能となっている。そして、ECU1は、診断ツール33からの故障診断に関する出力要求に応じて、その要求に応じた内容のデータを該診断ツール33に出力するようになっており、上記モニタ頻度に関わる情報の出力要求(即ち、モニタ頻度の分子及び分母の出力要求であり、以下、モニタ頻度情報出力要求という)を受けた場合には、NRAM27に記憶されている各故障診断対象項目についてのモニタ頻度の分子及び分母の最新値を診断ツール33に出力する。尚、図1において、符号37は、マイコン7が診断ツール33と通信を行うための通信回路である。
【0043】
そこで次に、ECU1のマイコン7が、各故障診断対象項目についてのモニタ頻度の分子と分母の各々である継続保存対象データの値を継続して保存及び更新していくために実行する処理の内容について、図2〜図5を用いて説明する。
まず、図2に示すように、本実施形態では、総数n個の各継続保存対象データに対して、0番から順に番号を付けている。例えば、0番目のデータは、フューエルエバポレーションシステム(以下単に、エバポという)についてのモニタ頻度の分子であり、1番目のデータは、エバポについてのモニタ頻度の分母であり、2番目のデータは、触媒コンバータ(以下単に、触媒という)についてのモニタ頻度の分子であり、3番目のデータは、触媒についてのモニタ頻度の分母であり、4番目のデータは、酸素センサについてのモニタ頻度の分子であり、5番目のデータは、酸素センサについてのモニタ頻度の分母である。
【0044】
また、特に図示はしていないが、EEPROM11とSRAM29との各々には、各故障診断対象項目毎に分子と分母とを記憶するための領域が夫々設定されており、上記各故障診断対象項目についての分子と分母の各データは、EEPROM11とSRAM29との各々において、そのデータが該当する故障診断対象項目用の領域に夫々記憶される。
【0045】
そして、マイコン7は、図3(a)に示すように、各故障診断対象項目について、その項目に対して法規で定められている所定の走行条件が満たされたか否か(換言すれば、車両が、その故障診断対象項目について法規で定められている所定の運転状態となったか否か)を例えば定期的に判定し(S110)、その走行条件が満たされたと判定すると(S110:YES)、該当する項目の分母(運転回数)の値をNRAM27上でインクリメントする(S120)。
【0046】
また、マイコン7は、図3(b)に示すように、各故障診断対象項目について、その項目の故障診断実施条件が成立したか否かを例えば定期的に判定し(S130)、故障診断実施条件が成立したと判定したならば(S130:YES)、該当する項目についての故障診断処理を実施して正常又は異常の判定を行い(S140)、次いで、その項目の分子(モニタリング実施回数)の値をNRAM27上でインクリメントする(S150)。
【0047】
尚、マイコン7は、何れかの故障診断対象項目の分子又は分母をインクリメントすると、そのインクリメントしたデータは、今回の動作期間中(即ち、今回の自動車の運転期間中)では、それ以上インクリメントしないようになっている。
そして、このような図3(a),(b)の処理により、NRAM27に記憶されている各継続保存対象データ(各故障診断対象項目についての分子,分母)の値が、そのデータについてのインクリメント条件が成立したときに、1回分だけ更新した値に書き換えられることとなる。
【0048】
次に、図4(a),(b)は、マイコン7が、NRAM27上で更新される継続保存対象データの値をSRAM29とEEPROM11との各々に記憶させるために実行する処理を表すフローチャートである。そして、図4(a)の処理は、一定時間毎(本実施形態では16ms毎)に繰り返し実行され、図4(b)の処理は、本ECU1が動作している期間中に1回だけ実行される。
【0049】
まず、マイコン7が図4(a)に示す処理の実行を開始すると、最初のS210にて、今回のタイミングが、SRAM更新タイミングであるか否かを判定する。尚、本実施形態では、当該処理の2回に1回の割合である32ms毎に、SRAM更新タイミングであると判定される。
【0050】
そして、上記S210でSRAM更新タイミングであると判定した場合には、S220に進んで、NRAM27内の0番目から「n−1」番目までの全ての継続保存対象データを読み出してSRAM29にコピーし、その後、本処理を終了する。
【0051】
また、上記S210でSRAM更新タイミングではないと判定した場合には、そのまま本処理を終了する。
一方、マイコン7が図4(b)に示す処理の実行を開始すると、まずS230にて、今回のタイミングが、EEPROM更新タイミングであるか否かを判定する。
【0052】
そして、EEPROM更新タイミングであると判定した場合には、S240に進んで、SRAM29内の0番目から「n−1」番目までの全ての継続保存対象データを読み出してEEPROM11にコピーし、その後、本処理を終了する。
よって、S240の処理が実行されたならば、その時点でNRAM27に記憶されている各継続保存対象データの値がEEPROM11にも記憶されることとなる。つまり、SRAM29には、図4(a)の処理により、常にNRAM27内の各継続保存対象データの最新値がコピーされているからである。
【0053】
また、上記S230でEEPROM更新タイミングではないと判定した場合には、そのまま本処理を終了する。
尚、本実施形態において、S230では、本ECU1がイグニッションスイッチ17のオンに伴い動作した回数を、SRAM29内のカウンタを用いて1日目→2回目→3回目→1回目…、といった具合に3回周期で繰り返し計数しており、その計数回数が3回目の時に、EEPROM更新タイミングであると判定するようになっている。よって、上記S240の処理は、本ECU1が3回動作する毎に1回の割合で実行されることとなる。
【0054】
次に、図5は、マイコン7がイグニッションスイッチ17のオンに伴い動作を開始した際に実行するイニシャル処理を表すフローチャートである。
図5に示すように、マイコン7がイニシャル処理の実行を開始すると、まずS310にて、NRAM27内のデータを初期化し、続くS320にて、SRAM29内の記憶データが正常であるか否かを判定する。尚、このS320では、バッテリ外れ(バッテリ19が外されたこと)の履歴があるか否かを判定すると共に、SRAM29内のデータ自体をパリティチェックやチェックサム等の方法で検査して、バッテリ外れの履歴が無く且つデータ自体も正常であったならば、SRAM29内の記憶データは正常であると判定する。
【0055】
そして、SRAM29内のデータが正常であると判定した場合には(S320:YES)、S330に進んで、SRAM29内の全ての(即ちn個の)継続保存対象データを読み出してNRAM27にコピーし、その後、エンジン制御処理や図3,図4の処理といった各種処理の実行へ移る。
【0056】
一方、上記S320にて、SRAM29内のデータが正常ではないと判定した場合には(S320:NO)、S340に移行して、EEPROM11内の全ての(n個の)継続保存対象データを読み出してSRAM29にコピーし、その後、上記S330の処理を行う。
【0057】
つまり、このイニシャル処理では、SRAM29内のデータが正常であれば(S320:YES)、そのSRAM29には、図4(a)のS220により、前回動作までの継続保存対象データの最終値が記憶されているため、S330の処理により、そのSRAM29内の全ての継続保存対象データを、インクリメント処理の作業用メモリであるNRAM27にコピーして、その各継続保存対象データが前回動作時までの値を継承しつつ更新され得るようにしている。
【0058】
また、EEPROM11にも、図4(b)のS240の処理により、少なくとも3回前の動作時における継続保存対象データの値が記憶されているため、SRAM29内のデータが正常でなければ(S320:NO)、そのEEPROM11内の全ての継続保存対象データをSRAM29にコピーしてから(S340)、S330の処理を行っている。このため、バッテリ上がりやバッテリ外れ等によってSRAM29内のデータが異常になっても、EEPROM11に記憶されていた継続保存対象データの値がSRAM29とNRAM27とにコピーされ、これにより、各継続保存対象データが継続して更新されていくこととなる。
【0059】
尚、本実施形態では、EEPROM11への継続保存対象データの書き込みを、当該ECU1が3回動作する毎に1回の割合で実施しているため、上記S340でEEPROM11からSRAM29とNRAM27とにデータを復元する際に、そのデータ値が必ずしも本当の最終値であるとは限らない。しかし、本実施形態では、そのことを承知の上で、EEPROM11へのデータ書込回数を減らすことを優先している。
【0060】
次に、図6は、マイコン7が、診断ツール33からのモニタ頻度情報出力要求を受信した際に実行する通信応答処理を表すフローチャートである。
図6に示すように、マイコン7が通信応答処理の実行を開始すると、まずS410にて、SRAM29から全ての継続保存対象データ(各故障診断対象項目についてのモニタ頻度の分母と分子のデータ)を読み出して、その読み出したデータを診断ツール33に送信する。つまり、本ECU1では、このS410の処理が実行されることで、診断ツール33による継続保存対象データの読み出しが実現される。
【0061】
そして、次のS420にて、図4(b)のS240と同様に、SRAM29から全ての継続保存対象データを読み出して、その読み出したデータ(つまり、診断ツール33に送信したのと同じデータを)をEEPROM11にコピーし、その後、本通信応答処理を終了する。
【0062】
尚、前述したように、SRAM29には、図4(a)の処理により、常にNRAM27内の各継続保存対象データと同じ値のデータがコピーされているため、上記図6のS420と図4(b)のS240では、SRAM29からでなく、NRAM27から継続保存対象データを読み出して、そのデータをEEPROM11にコピーし、上記図6のS410においても、SRAM29からでなく、NRAM27から継続保存対象データを読み出して、そのデータを診断ツール33に送信するようにしても良い。
【0063】
次に、以上のような本第1実施形態のECU1の作用について説明する。
まず、図6の通信応答処理にS420の処理が設けられていないものと仮定する。
この場合、診断ツール33によって継続保存対象データの読み出しが行われた後、図4(b)のS240の処理による継続保存対象データのEEPROM11への記憶が実施される前に、動作電源としての電圧VDの供給が停止されてECU1が動作を停止し、更に、その動作停止中に、バッテリ上がり等によってSRAM29内の記憶データが正常ではなくなったとする。
【0064】
すると、ECU1の次の動作開始時に、図5のS340とS330との処理がその順に実行されることにより、EEPROM11に記憶されていた継続保存対象データがSRAM29とNRAM27とにコピーされて、その後のデータ処理に用いられることとなるが、この場合、EEPROM11から両RAM27,29にコピーされるデータ値の何れかは、診断ツール33へ読み出されたデータ値よりも古いと見なされるデータ値(小さい値)である可能性がある。
【0065】
よって、その後、再度、診断ツール33によって継続保存対象データの読み出しが行われたとすると、その際に読み出されるデータ値が、前回に読み出されたデータ値よりも小さい値(過去に溯った値)になってしまう可能性がある。
そして、このような読み出しデータ値の逆転現象が生じると、ECU1の動作自体は正常であるにも拘わらず信頼性に疑問を持たれてしまう。
【0066】
そこで、本第1実施形態のECU1では、図6の通信応答処理内に、図4(b)のS240と同様のS420の処理を設け、診断ツール33からのモニタ頻度情報出力要求を受けて、NRAM27に記憶されている継続保存対象データの最新値を診断ツール33に出力する際にも、その継続保存対象データの最新値をEEPROM11に記憶させるようにしている。
【0067】
このため、NRAM27上で更新されている継続保存対象データの最新値が診断ツール33へ読み出されてから、その最新値がEEPROM11に記憶される前に、その継続保存対象データの最新値がNRAM27及びSRAM29から失われてしまう、という可能性を極めて低くすることができる。よって、EEPROM11へのデータ書込回数を減らすために、EEPROM11への本来のデータ書込処理である図4(b)のS240の実行頻度を、ECU1が3回動作する毎に1回の割合といった具合に小さく設定しても、診断ツール33によって読み出したデータ値が前回読み出したデータ値よりも古いと見なされる値になってしまう逆転現象の発生を防止することができる。
【0068】
尚、本実施形態では、図4(b)のS240が、データ保存手段としての処理に相当し、図5のS320〜S340が、データ復元手段としての処理に相当し、図6のS410が、出力手段としての処理に相当し、図6のS420が、第2のデータ保存手段としての処理に相当している。また、図4(a)の処理が、コピー手段としての処理に相当している。そして、図3(a)のS110が、検出手段としての処理に相当し、図3(b)のS130及びS140が、故障診断手段としての処理に相当し、図3(a)のS120と図3(b)のS150とが、データ更新手段としての処理に相当している。
【0069】
ところで、上記第1実施形態のECU1では、極めて希であると考えられるが、図6のS410が実行されてから図6のS420が終了するまでの僅かな期間に、万一、バッテリ外れや電源瞬断が起こると、継続保存対象データの最新値を失ってしまう(つまり、EEPROM11への記憶に失敗してしまう)可能性がある。
【0070】
そこで次に、そのような可能性を無くすことが可能な第2実施形態について説明する。
第2実施形態のECUは、第1実施形態のECU1と比較すると、マイコン7が、図6の通信応答処理に代えて、図7の通信応答処理を実行する点のみが異なっている。
【0071】
そして、図7に示すように、本第2実施形態における通信応答処理では、まず最初のS510にて、図6のS420と同じ処理を行い、次のS520にて、図6のS410と同じ処理を行う。
つまり、本第2実施形態のECUでは、診断ツール33からのモニタ頻度情報出力要求を受けた際に、まず、SRAM29から全ての継続保存対象データを読み出してEEPROM11にコピーし(S510)、次いで、SRAM29からEEPROM11にコピーした継続保存対象データを診断ツール33へ送信するようにしている(S520)。
【0072】
そして、このような本第2実施形態のECUによれば、診断ツール33へ継続保存対象データの最新値を出力してから該最新値がEEPROM11に記憶される前にその最新値をバッテリ外れや電源瞬断等によって失ってしまう、という可能性を完全に無くすことができる。
【0073】
尚、本第2実施形態においても、図7のS510では、SRAM29からではなく、NRAM27から継続保存対象データを読み出して、そのデータをEEPROM11にコピーし、図7のS520でも、SRAM29からではなく、NRAM27から継続保存対象データを読み出して、そのデータを診断ツール33に送信するようにしても良い。そして、このことは、後述する第3実施形態についても同様である。
【0074】
次に、第3実施形態について説明する。
第3実施形態のECUは、第2実施形態のECUと比較すると、マイコン7が、図7の通信応答処理に代えて、図8の通信応答処理を実行する点のみが異なっている。
【0075】
そして、図8に示すように、本第3実施形態における通信応答処理では、図7の通信応答処理に対して、S510の前にS505の処理が追加されており、そのS505にて、診断ツール33へ、EEPROM11への記憶処理中であることを示す応答信号であって、診断ツール33側でタイムアウト判定がなされるのを防ぐための応答信号を送信する。
【0076】
つまり、診断ツール33は、出力要求を出してから規定時間以内に応答が返ってこないと、タイムアウト判定を行うように構成されている。
そして、前述した第2実施形態のECUでは、診断ツール33からのモニタ頻度情報出力要求を受けてからS520で診断ツール33へ要求されたデータを送信する前に、EEPROM11へのデータ書き込み処理(S510)が実施されるため、その書き込み処理で書き込むべき継続保存対象データが多くなると、モニタ頻度情報出力要求を受けてから診断ツール33にデータを返すまでの応答時間が上記規定時間よりも長くなって、本当は正常であるにも拘わらず、診断ツール33側でタイムアウト判定がなされてしまう虞がある。
【0077】
そこで、本第3実施形態の通信応答処理では、第2実施形態の通信応答処理(図7)に対して、S510の前にS505を追加し、そのS505にて、診断ツール33へ、タイムアウト判定がなされるのを防ぐための応答信号を出力するようにしている。
【0078】
よって、このような第3実施形態のECUによれば、継続保存対象データの全データ量が大きくて、その継続保存対象データを通信応答処理のS510でEEPROM11に書き込むのに要する時間が長くなっても、外部装置側でタイムアウト判定がなされてしまうことを防ぐことができる。
【0079】
尚、本第3実施形態では、図8のS505が、先行応答手段としての処理に相当している。また、継続保存対象データのEEPROM11への書き込みに要する時間が更に長くなる場合には、例えば、S510でEEPROM11へのデータ書き込みを実施している最中に、診断ツール33へ例えば定期的に上記S505と同様の応答信号を送信するようにしても良い。
【0080】
次に、第4実施形態について説明する。
第4実施形態のECUは、上記第3実施形態のECUと比較すると、マイコン7が、図8の通信応答処理に代えて、図9の通信応答処理を実行する点のみが異なっている。
【0081】
そして、図9に示すように、本第4実施形態における通信応答処理では、図8の通信応答処理に対して、S510の代わりに、S610〜S650の処理を実施するようになっている。尚、図9において、図8と同じ処理については、同一のステップ番号を付している。
【0082】
即ち、図9に示すように、マイコン7は、通信応答処理の実行を開始して、S505で診断ツール33にタイムアウト判定防止用の応答信号を送信すると、次にS610へ進んで、継続保存対象データの番号を示す変数iを0に設定する。
そして、続くS620にて、変数iの値が継続保存対象データの総数(データ数)nよりも小さいか否かを判定し、変数iの値がデータ数nよりも小さいと判定した場合には(S620:YES)、S630に進む。
【0083】
S630では、SRAM29から変数iの値に該当するi番目の継続保存対象データのSRAM値(即ち、SRAM29に記憶されているi番目の継続保存対象データの値)S[i]を読み出すと共に、EEPROM11からもi番目の継続保存対象データのEEPROM値(即ち、EEPROM11に記憶されているi番目の継続保存対象データの値)E[i]を読み出し、「E[i]≠S[i]」であるか否か(即ち、E[i]とS[i]とが異なっているか否か)を判定する。
【0084】
そして、「E[i]≠S[i]」でなければ(S630:NO)、S640に移行して、変数iの値を1インクリメントした後、S620に戻る。
また、上記S630にて、「E[i]≠S[i]」であると判定した場合には(S630:YES)、S650に進んで、S[i]をEEPROM11にE[i]として書き込む。そして、その後、上記S640に移行して、変数iの値を1インクリメントした後、S620に戻る。
【0085】
一方、上記S620にて、変数iの値がデータ数nよりも小さくない(即ち、i≧nである)と判定した場合には(S620:NO)、S520に移行して、SRAM29から全ての継続保存対象データを読み出して、その読み出したデータを診断ツール33に送信し、その後、本通信応答処理を終了する。
【0086】
つまり、この通信応答処理では、EEPROM11へのデータ書き込みを必ず実施するのではなく、S610〜S650の処理により、EEPROM値とSRAM値とが一致していない継続保存対象データを探し出し、両値が一致していないデータがあった場合にのみ、そのデータのEEPROM値はNRAM27に記憶されている最新値ではないと判断して、その最新値として扱っているSRAM値をEEPROM11に記憶させるようにしている。
【0087】
そして、このような本第4実施形態のECUによれば、診断ツール33からのモニタ頻度情報出力要求を受けた際に、EEPROM11に既に継続保存対象データの最新値が記憶されているのに(換言すれば、継続保存対象データの値がNRAM27上で更新されていないのに)EEPROM11への書き込みが実施される、ということがないため、そのEEPROM11へのデータ書込回数を効果的に節約することができる。
【0088】
尚、本第4実施形態においても、SRAM値をNRAM27内の最新値として扱っているが、図9のS630では、SRAM29から読み出したS[i]を用いるのではなく、NRAM27からi番目の継続保存対象データの値N[i]を読み出して、「E[i]≠N[i]」であるか否かを判定し、図9のS650では、そのNRAM27から読み出した値N[i]をEEPROM11にE[i]として書き込むようにしても良い。そして同様に、図9のS520でも、NRAM27から継続保存対象データを読み出して診断ツール33に送信するようにしても良い。
【0089】
次に、第5実施形態のECUについて説明する。
まず図10は、第5実施形態のECU41の構成を表すブロック図である。尚、本第5実施形態のECU41も、前述した各実施形態のECUと同様に、自動車のエンジンを制御するものである。また、図10において、図1と同じ構成要素については、同一の符号を付しているため、詳細な説明を省略する。
【0090】
図10に示すように、本第5実施形態のECU41は、前述した第1〜第4実施形態のうちの何れかのECUに対して、下記の(1)〜(5)の点が異なっている。
(1)バッテリ19からの電圧VDが、イグニッションスイッチ17を介してではなく、本ECU41の外部に設けられた給電用スイッチング手段としてのメインリレー43を介して供給されるようになっている。つまり、メインリレー43がオンする(詳しくは、メインリレー43の接点が短絡する)と、バッテリ19から電源回路21へ電圧VDが供給されて、マイコン7を始めとする当該ECU41内の各部に電源電圧Vmが供給される。
【0091】
(2)ECU41には、上記メインリレー43をオン/オフさせるためのメインリレー制御回路45が設けられている。
このメインリレー制御回路45は、イグニッションスイッチ17を介してECU41に入力されるバッテリ19からの電圧VGと、マイコン7からの駆動信号Sdとが、ダイオード等によりワイヤードオアされてベースに供給されるNPNトランジスタ47を主要部として構成されている。そして、一端がバッテリ19のプラス端子に接続されたメインリレー43のコイルLの他端に、上記NPNトランジスタ47のコレクタが接続されている。
【0092】
このため、メインリレー制御回路45では、イグニッションスイッチ17がオンされるか、マイコン7から駆動信号Sdが出力されると、トランジスタ47がオンして、そのトランジスタ47がメインリレー43のコイルLから電流を引き込むこととなり、それに伴いメインリレー43がオンすることとなる。
【0093】
よって、ECU41には、イグニッションスイッチ17がオンされている時、又は、マイコン7からの駆動信号Sdによってメインリレー43がオンされている時に、動作電源としての電圧VDが供給されることとなる。このため、本ECU41は、イグニッションスイッチ17のオンに伴い動作すると、メインリレー43を自らオンさせることで、イグニッションスイッチ17のオフ後も動作を継続することができる。
【0094】
尚、メインリレー制御回路45のトランジスタ47がマイコン7からの駆動信号Sdだけで駆動されると共に、イグニッションスイッチ17を介して入力されるバッテリ19からの電圧VGと、メインリレー43を介して入力されるバッテリ19からの電圧VDとがワイヤードオアされて、そのワイヤードオアされた電圧が、ECU41の動作電源となるように構成しても良い。
【0095】
(3)本第5実施形態では、継続保存対象データを継続的に更新していくために、SRAM29を用いておらず、マイコン7は、図4(a)及び図4(b)の各処理を実施しない。尚、このため、図10ではマイコン7内にSRAM29を記載しているが、そのSRAM29と、電源回路21が副電源電圧Vsを出力する機能とは削除しても良い。
【0096】
(4)マイコン7は、イグニッションスイッチ17のオンに伴い動作を開始した際に、図5のイニシャル処理に代えて、図11のイニシャル処理を実行する。そして、図11に示すように、マイコン7がイニシャル処理の実行を開始すると、まずS710にて、メインリレー制御回路45へ駆動信号Sdを出力して、メインリレー43をオンさせる。但し、この時点で、メインリレー43は、イグニッションスイッチ17のオンによって既にオンしている。そして、このようにマイコン7から駆動信号Sdが出力されることで、その後にイグニッションスイッチ17がオフされても、メインリレー43はオンしたままとなる。
【0097】
次に、S720にて、NRAM27内のデータを初期化する。
そして、続くS730にて、EEPROM11内の全ての継続保存対象データを読み出してNRAM27にコピーすることで、その各継続保存対象データが前回動作時までの値を継承しつつ更新され得るようにし、その後、エンジン制御処理等の各種処理の実行へ移る。
【0098】
(5)マイコン7は、一定時間毎にイグニッションスイッチ17のオン/オフを判定しており、その判定処理にて、イグニッションスイッチ17がオンからオフされたことを検知すると、図12に示す動作終了時処理を実行する。尚、イグニッションスイッチ17のオン/オフは、上記電圧VGから判定する。
【0099】
そして、マイコン7が図12の動作終了時処理の実行を開始すると、まずS810にて、NRAM27内の全ての継続保存対象データを読み出してEEPROM11にコピーし、その後、S820に進んで、メインリレー制御回路45への駆動信号Sdの出力を停止して、メインリレー43をオフさせる。すると、メインリレー43からの動作電源VDが遮断され、本ECU41の動作が停止することとなる。
【0100】
つまり、本第5実施形態のECU41では、イグニッションスイッチ17がオンされて動作を開始すると、メインリレー43に対する駆動信号Sdを出力することで(S710)、イグニッションスイッチ17のオフ後も動作を継続できるようにし、イグニッションスイッチ17がオフされたことを検知した際に、書込実施条件が成立したとして、NRAM17に記憶されている継続保存対象データの値をEEPROM11に記憶させ(S810)、その後、メインリレー43をオフさせて動作を停止するようにし(S820)、また、イグニッションスイッチ17のオンに伴う動作開始時に、データ復元条件が成立したとして、EEPROM11に記憶されているデータ値をNRAM27にコピーして復元するようにしている(S730)。尚、本第5実施形態では、図12のS810が、データ保存手段としての処理に相当し、図11のS730が、データ復元手段としての処理に相当している。
【0101】
そして、このような第5実施形態のECU41によれば、EEPROM11へのデータ書込回数を減らすために、EEPROM11への本来のデータ書込処理である図12のS810を動作停止直前時のみに実施するようにしているが、診断ツール33からのモニタ頻度情報出力要求を受信した際には、マイコン7が図6〜図9のうちの何れかの通信応答処理を実行するため、前述した第1〜第4実施形態のうちの何れかと同様に、診断ツール33によって読み出したデータ値が前回読み出したデータ値よりも古いと見なされる値になってしまう現象の発生を防止することができる。
【0102】
以上、本発明の一実施形態について説明したが、本発明は、種々の形態を採り得ることは言うまでもない。
例えば、第1〜第4実施形態において、NRAM27を設けずに、継続保存対象データのインクリメント処理を含む各種データ処理をSRAM29上で実施するのであれば(つまり、SRAM29を処理作業用メモリとして用いるのであれば)、図4(a)の処理と図5のS310及びS330とが不要になる。但し、上記第1〜第4実施形態のように、NRAM27を処理作業用メモリとして用い、SRAM29は継続保存対象データの保存のためだけに用いるという構成を採れば、SRAM29の記憶容量を小さく抑えることができるという点で有利である。
【0103】
一方、継続保存対象データは、RateBaseモニタ法で定められているモニタ頻度の分子及び分母のように値が1ずつ増加されるものに限らず、例えば、ある単位変化量ずつ増加又は減少されていくものであっても良く、また、その単位変化量も常に同じ値である必要はない。
【0104】
また更に、書換可能不揮発性メモリとしては、EEPROMに限らず、例えばフラッシュROMを用いても良い。
【図面の簡単な説明】
【図1】 第1実施形態のECU(電子制御装置)の構成を表すブロック図である。
【図2】 継続保存対象データを説明する説明図である。
【図3】 第1実施形態のECUのマイコンが継続保存対象データをNRAM上でインクリメントする際の処理を表すフローチャートである。
【図4】 第1実施形態のECUのマイコンがNRAM上で更新される継続保存対象データの値をSRAMとEEPROMとの各々に記憶させるために実行する処理を表すフローチャートである。
【図5】 第1実施形態のECUのマイコンで実行されるイニシャル処理を表すフローチャートである。
【図6】 第1実施形態のECUのマイコンで実行される通信応答処理を表すフローチャートである。
【図7】 第2実施形態のECUのマイコンで実行される通信応答処理を表すフローチャートである。
【図8】 第3実施形態のECUのマイコンで実行される通信応答処理を表すフローチャートである。
【図9】 第4実施形態のECUのマイコンで実行される通信応答処理を表すフローチャートである。
【図10】 第5実施形態のECU(電子制御装置)の構成を表すブロック図である。
【図11】 第5実施形態のECUのマイコンで実行されるイニシャル処理を表すフローチャートである。
【図12】 第5実施形態のECUのマイコンで実行される動作終了時処理を表すフローチャートである。
【符号の説明】
1,41…電子制御装置(ECU)、3…センサ、5…入力処理回路、7…マイコン、9…通信ライン、11…EEPROM、13…アクチュエータ、15…出力回路、17…イグニッションスイッチ、19…バッテリ、21…電源回路、23…CPU、25…ROM、27…ノーマルRAM(NRAM)、29…スタンバイRAM(SRAM)、31…I/O、33…診断ツール、43…メインリレー、45…メインリレー制御回路、47…NPNトランジスタ、L…コイル[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an electronic control unit that continuously saves and updates the value of specific data updated during operation using a nonvolatile memory capable of electrically rewriting stored contents. It is.
[0002]
[Prior art]
Conventionally, in an electronic control device for automobiles, specific data such as failure diagnosis information and control learning values that should be continuously stored even when the supply of operating power is stopped, and used for data processing Data whose value is updated in the memory (hereinafter referred to as data to be continuously saved) is written in a non-volatile memory (hereinafter also referred to as rewritable non-volatile memory) such as an EEPROM that can be electrically rewritten. The data value can be held and updated continuously.
[0003]
For example, a battery-backed RAM (hereinafter also referred to as a backup RAM) is used to perform processing at all times, and data in a predetermined area in the RAM is copied and stored in an EEPROM. There is known an apparatus that copies data in an EEPROM to a backup RAM and restores the data if the data in the backup RAM is abnormal at the start of operation (see, for example, Patent Document 1).
[0004]
Further, a rewritable nonvolatile memory such as an EEPROM has a limit on the number of data writing. Therefore, in this type of electronic control unit, in order to reduce the number of times of data writing to the rewritable nonvolatile memory, the value of the data to be continuously saved is rewritten only when a predetermined write execution condition is satisfied. The data is stored in a non-volatile memory.
[0005]
For example, when the backup RAM is a processing work memory as in the above example device, even if the operation is stopped (that is, the operation power supply is cut off), if there is no battery exhaustion or battery disconnection, for the time being, Since the data to be continuously saved is continuously saved in the backup RAM, the value of the data to be continuously saved is stored in the rewritable nonvolatile memory at a frequency of once every time the electronic control unit operates a plurality of times. It is possible.
[0006]
Further, for example, in an automotive electronic control device, when an ignition switch is turned on or when an external power supply main relay is turned on, operation power is supplied, and the electronic control device is When the ignition switch is turned on, the main relay may be turned on by itself so that the operation can be continued even after the ignition switch is turned off. When such a main relay is present, the electronic control unit reads from the RAM when detecting that the ignition switch is turned off even if the normal RAM that is not backed up by the battery is a processing work memory. Each time the electronic control unit operates, the data write to the rewritable nonvolatile memory is performed by the procedure of copying the value of the data to be continuously saved to the rewritable nonvolatile memory and then turning off the main relay. Can be suppressed to the frequency of the operation (specifically, only immediately before the operation of the electronic control device is stopped). In this case, the data in the rewritable non-volatile memory may be copied and restored to the RAM as the processing work memory when the operation is started when the operation power is turned on.
[0007]
On the other hand, in the electronic control device for automobiles, there is a RateBase monitoring method in the regulation of OBD (Onboard Diagnostics) 2 by CARB (California Air Resources Protection Bureau), and the RateBase monitoring method is expressed by the following formula. It is necessary to continuously store and update the monitoring frequency.
[0008]
Monitoring frequency = number of monitoring operations / number of operations
Note that the monitoring frequency is a frequency at which failure diagnosis is performed, and exists for each of a plurality of items (that is, a diagnosis target) such as a catalytic converter, a fuel evaporation system, and an oxygen sensor. The number of driving times (hereinafter referred to as the denominator) is data in which a value is incremented when a predetermined traveling condition defined by the law for the item is satisfied, and the number of times of monitoring (hereinafter referred to as numerator) is The data is incremented when a failure diagnosis execution condition determined by the automobile manufacturer is satisfied for the item and the determination of normality or abnormality is completed (that is, when the failure diagnosis is performed). Both the denominator and the numerator are between the time when the ignition switch of the automobile is turned on and the time it is turned off (that is, the operating power is turned on to shut down the operating power to the electronic control unit that performs the fault diagnosis). During one operation period), or is incremented only once, or is maintained as it is without being incremented. Furthermore, these monitoring frequency data (denominator and numerator data) must be able to be read out by a diagnostic device (also called a diagnostic tool or diagnostic checker) externally connected to the electronic control unit.
[0009]
[Patent Document 1]
JP-A-4-336351
[0010]
[Problems to be solved by the invention]
By the way, when the data to be continuously saved is one that must be readable by an external device, such as the monitoring frequency defined by the RateBase monitoring method, the electronic control device receives an output request from the external device. In this case, the value of the data to be continuously stored (that is, the latest value of the data) stored in the processing work memory is output to an external device. There's a problem.
[0011]
That is, first, after the latest value of the data to be continuously saved stored in the processing work memory is read to the external device, before the latest value is stored in the rewritable nonvolatile memory, Suppose that the data to be continuously saved in the processing work memory has been lost. Thereafter, the data value in the rewritable nonvolatile memory is copied to the processing work memory by the data restoration function as described above. In this case, the processing work memory is transferred to the external device. A data value older than the latest read value is copied from the rewritable nonvolatile memory. Therefore, after that, if data is read again by the external device, the data value read at that time is a value that is considered to be older than the data value read last time (a value that has passed in the past). Such a reversal phenomenon of the read data value greatly impairs the apparent reliability of the electronic control device.
[0012]
In addition, if a configuration in which an alarm such as a check lamp provided outside the electronic control device notifies that the data has been restored from the rewritable nonvolatile memory to the processing work memory, the electronic Although it is possible to confirm that there is no abnormality in the function of the control device itself, it is useless to operate the alarm device even if it is not a failure, and the above-described inversion phenomenon of the read data value itself occurs. It is important not to.
[0013]
Therefore, the present invention continuously saves and updates specific data using a rewritable non-volatile memory such as an EEPROM, and at the same time, an electronic device that can read the data value by an external device. The purpose is to prevent the occurrence of a phenomenon in which the read data value becomes a value that is considered to be older than the previously read data value.
[0014]
[Means for Solving the Problems and Effects of the Invention]
The electronic control device according to
[0015]
In the electronic control device according to the first aspect, when the data storage means satisfies a predetermined write execution condition, the value of the data to be continuously stored (that is, the time point) Continuation stored in the rewritable non-volatile memory when the predetermined data restoration execution condition is satisfied, and the data restoration means is stored in the rewritable non-volatile memory. By copying the value of the storage target data to the processing work memory, the value of the continuous storage target data can be continuously updated even if the continuous storage target data in the processing work memory is lost. Further, when the output unit receives an output request for data to be continuously saved from an external device, it outputs the value of the data to be continuously saved stored in the processing work memory to the external device.
[0016]
In particular, the electronic control device according to
[0017]
In such an electronic control device according to
[0018]
However, according to the electronic control device of the first aspect of the invention, the second data storage unit is provided, and when the output request from the external device is received, the latest value of the data to be continuously stored is output to the external device. Since the latest value of the data to be continuously saved stored in the processing work memory is stored in the non-volatile memory, the latest value of the data to be continuously saved stored in the processing work memory is read to the external device. Then, before the latest value is stored in the rewritable nonvolatile memory, the possibility that the data to be continuously saved in the processing work memory is lost can be extremely reduced.
[0019]
Therefore, in order to reduce the number of data writes to the rewritable non-volatile memory, even if the write execution condition that triggers the operation of the original data storage means is set to a low establishment frequency, the data is read by the external device Occurrence of a phenomenon that the data value becomes a value that is considered to be older than the previously read data value can be prevented.
[0020]
By the way, when an output request is received from an external device, the output unit may be operated first, and then the second data storage unit may be operated. However, in this case, to the external device There is a slight possibility that the latest value will be lost due to a power interruption or the like before the latest value of the data to be continuously saved is output and stored in the rewritable nonvolatile memory.
[0021]
Therefore, in order to completely eliminate the possibility, as described in claim 2, the output means finishes storing the value of the data to be continuously saved in the rewritable nonvolatile memory by the second data saving means. After that, the value of the data to be continuously stored stored in the processing work memory may be output to the external device. That is, when an output request is received from an external device, the second data storage unit operates first, and the storage of the value of the data to be continuously stored in the rewritable nonvolatile memory by the second data storage unit is completed. Then, the output means may be configured to operate.
[0022]
In the case of the electronic control device according to the second aspect, at the time when the output means operates, the value of the continuous storage target data stored in the processing work memory and the continuous storage target stored in the rewritable nonvolatile memory are provided. Since the data value always matches, the output means reads the value of the data to be continuously saved from the rewritable nonvolatile memory and uses the read value as the data to be continuously saved stored in the processing work memory. The value may be output to an external device.
[0023]
On the other hand, in the case of the electronic control device according to the second aspect, the second data storage means stores the rewritable nonvolatile memory between the time when the output request is received from the external device and the time when the output means starts operating. Since the value of the data to be continuously saved is stored, the response time from when the output request is received until the value of the data to be continuously saved is returned to the external device tends to be long. Further, an external device connected to this type of electronic control device may be configured to make a timeout determination if a response is not returned within a specified time after a request is issued.
[0024]
For this reason, in the electronic control device according to claim 2, if the time required for the second data storage means to store the value of the data to be continuously stored in the rewritable nonvolatile memory becomes long, it is actually normal. There is a risk that a timeout determination may be made on the external device side.
[0025]
Therefore, in the electronic control device according to
[0026]
Next, in the electronic control device according to a fourth aspect, in the electronic control device according to the first to third aspects, the second data storage means includes a value of the data to be continuously stored stored in the processing work memory, Comparing the value of the continuous storage target data stored in the rewritable non-volatile memory, the value of the continuous storage target data stored in the processing work memory can be rewritten only when both values are different Store in non-volatile memory.
[0027]
According to such an electronic control device, the number of times of data writing to the rewritable nonvolatile memory can be saved. In other words, whenever an output request from an external device is frequently repeated, the data value is stored in the rewritable nonvolatile memory each time the latest value of the data to be continuously saved is not updated. If this happens, the number of times of data writing to the rewritable non-volatile memory will be increased unnecessarily, but according to the electronic control device of claim 4, such waste can be eliminated.
[0028]
On the other hand, as a processing work memory, a standby RAM (corresponding to the above-mentioned backup RAM) to which data holding power is constantly supplied, and the electronic control device operates in accordance with the supply of operating power to the electronic control device. Any normal RAM (that is, a normal RAM that is not backed up by a battery) to which power for holding data is supplied only when it is in use may be used.
[0029]
Here, if the normal RAM is used as a processing work memory, for example, as described in the section of “Prior Art”, a main relay for power supply is provided, and a switch for supplying operating power (hereinafter referred to as a power supply switch). Is turned on and the main relay is turned on so that the operation can be continued even after the power supply switch is turned off. Further, when it is detected that the power supply switch is turned off, writing is performed. By assuming that the execution condition is satisfied, the value of the data to be continuously stored stored in the normal RAM is stored in the rewritable nonvolatile memory, and then the main relay is turned off, so that the original data storage means The frequency of writing data into the rewritable non-volatile memory can be set to a rate of once every time the electronic control unit operates once. In this case, assuming that the data restoration condition is satisfied at the start of operation, the data value stored in the rewritable nonvolatile memory may be copied and restored to the normal RAM as the processing work memory.
[0030]
Further, if the standby RAM is used as a processing work memory, as described in the section of “Prior Art”, even if the operation is stopped (the operation power supply is cut off), the data to be continuously stored in the standby RAM is for the time being. Is continuously stored, the frequency at which the original data storage means operates (that is, the frequency at which the write execution condition is established) can be set to a ratio of once every time the electronic control unit operates a plurality of times. This is advantageous in reducing the number of data writes to the rewritable nonvolatile memory. In this case, it is determined whether or not the data stored in the standby RAM is normal at the start of operation associated with turning on the operation power. If it is determined that the data is not normal, the data restoration condition is satisfied. The data value stored in the rewritable nonvolatile memory may be copied to the standby RAM and restored.
[0031]
However, in order to keep the storage capacity of the standby RAM small, it is possible to adopt a configuration in which the normal RAM is used as a processing work memory and the standby RAM is used only for storing the data to be continuously stored.
Therefore, in the electronic control device according to claim 5, in the electronic control device according to
[0032]
According to such an electronic control device according to claim 5, as in the case where the standby RAM is used as the processing work memory, even when the operation is stopped (when the operation power supply is cut off), the battery is discharged or the battery is disconnected. Otherwise, for the time being, the data to be continuously stored is continuously stored in the standby RAM. Therefore, the frequency at which the original data storage unit operates can be set to a ratio of once every time the electronic control unit operates a plurality of times. In addition, the storage capacity of the standby RAM may be small.
[0033]
Next, an electronic control device according to a sixth aspect is obtained by applying the electronic control device according to the first to fifth aspects to a vehicle electronic control device that controls an in-vehicle device mounted on the vehicle. Detection means for detecting that the operation state of the vehicle has been established, failure diagnosis means for performing failure diagnosis of a diagnosis target in the in-vehicle device when a predetermined failure diagnosis execution condition is satisfied, and from start to stop of the device In the meantime, when the predetermined operating state is detected by the detecting means, the value of the number of times of operation stored in the processing work memory is rewritten with a value updated by one time, and the failure to be diagnosed by the failure diagnosing means Data updating means for rewriting the value of the number of times of failure diagnosis stored in the processing work memory when the diagnosis is performed to a value updated only once. In this electronic control device, the number of operations and the number of times of failure diagnosis whose values are updated on the processing work memory by the data updating means are the data to be continuously saved.
[0034]
According to such an electronic control device of
[0035]
In the electronic control device according to
[0036]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
First, FIG. 1 is a block diagram showing a configuration of an electronic control unit (hereinafter referred to as ECU) 1 of a first embodiment for controlling an internal combustion engine as an in-vehicle device mounted on an automobile.
[0037]
As shown in FIG. 1, the
[0038]
The power supply circuit 21 outputs a reset signal to the
[0039]
The
[0040]
The
In the
[0041]
In addition, the
[0042]
Furthermore, a diagnostic tool 33 (corresponding to a diagnostic device as an external device) outside the vehicle can be connected to the
[0043]
Therefore, next, the contents of processing executed by the
First, as shown in FIG. 2, in the present embodiment, a total number of n pieces of data to be continuously saved is numbered sequentially from the 0th. For example, the 0th data is the numerator of the monitoring frequency for the fuel evaporation system (hereinafter simply referred to as “evaporation”), the first data is the denominator of the monitoring frequency for the evaporation, and the second data is The numerator of the monitoring frequency for the catalytic converter (hereinafter simply referred to as the catalyst), the third data is the denominator of the monitoring frequency for the catalyst, and the fourth data is the numerator of the monitoring frequency for the oxygen sensor. The fifth data is the denominator of the monitoring frequency for the oxygen sensor.
[0044]
Although not specifically shown, each of the EEPROM 11 and the
[0045]
Then, as shown in FIG. 3 (a), the
[0046]
Further, as shown in FIG. 3B, the
[0047]
Note that when the
3 (a) and 3 (b), the value of each continuation save target data (numerator and denominator for each failure diagnosis target item) stored in the
[0048]
Next, FIGS. 4A and 4B are flowcharts showing processing executed by the
[0049]
First, when the
[0050]
If it is determined in S210 that it is the SRAM update timing, the process proceeds to S220, where all the data to be continuously saved from the 0th to the “n−1” th in the
[0051]
If it is determined in S210 that the SRAM update timing is not reached, the process is terminated.
On the other hand, when the
[0052]
If it is determined that it is the EEPROM update timing, the process proceeds to S240, where all the data to be continuously saved from the 0th to the “n−1” th in the
Therefore, if the process of S240 is executed, the value of each continuous storage target data stored in the
[0053]
If it is determined in S230 that it is not the EEPROM update timing, this process is terminated.
In the present embodiment, in S230, the number of times that the
[0054]
Next, FIG. 5 is a flowchart showing an initial process that is executed when the
As shown in FIG. 5, when the
[0055]
If it is determined that the data in the
[0056]
On the other hand, if it is determined in S320 that the data in the
[0057]
That is, in this initial process, if the data in the
[0058]
Also, since the EEPROM 11 stores the value of the data to be continuously saved at the time of the previous operation at least three times by the process of S240 in FIG. 4B, the data in the
[0059]
In the present embodiment, since the data to be continuously stored in the EEPROM 11 is written once every time the
[0060]
Next, FIG. 6 is a flowchart showing a communication response process executed when the
As shown in FIG. 6, when the
[0061]
Then, in the next S420, similar to S240 in FIG. 4B, all the data to be continuously stored is read from the
[0062]
As described above, since the data of the same value as the data to be continuously saved in the
[0063]
Next, the operation of the
First, it is assumed that the process of S420 is not provided in the communication response process of FIG.
In this case, after the continuous storage target data is read out by the
[0064]
Then, when the
[0065]
Therefore, if the data to be continuously saved is read again by the
When such a read data value reversal phenomenon occurs, the reliability of the
[0066]
Therefore, in the
[0067]
For this reason, after the latest value of the data to be continuously saved updated on the
[0068]
In this embodiment, S240 in FIG. 4B corresponds to processing as a data storage unit, S320 to S340 in FIG. 5 correspond to processing as a data restoration unit, and S410 in FIG. This corresponds to the processing as the output means, and S420 in FIG. 6 corresponds to the processing as the second data storage means. Further, the process of FIG. 4A corresponds to a process as a copy unit. 3A corresponds to the processing as the detecting means, and S130 and S140 in FIG. 3B correspond to the processing as the failure diagnosing means, and FIG. Step S150 in 3 (b) corresponds to processing as data updating means.
[0069]
By the way, in the
[0070]
Then, next, 2nd Embodiment which can eliminate such a possibility is described.
The ECU of the second embodiment differs from the
[0071]
As shown in FIG. 7, in the communication response processing in the second embodiment, first, the same processing as S420 in FIG. 6 is performed in the first S510, and the same processing as S410 in FIG. 6 is performed in the next S520. I do.
That is, in the ECU of the second embodiment, when receiving the monitor frequency information output request from the
[0072]
Then, according to the ECU of the second embodiment, the latest value of the data to be continuously saved is output to the
[0073]
Also in the second embodiment, in S510 of FIG. 7, the data to be continuously saved is read from the
[0074]
Next, a third embodiment will be described.
The ECU of the third embodiment differs from the ECU of the second embodiment only in that the
[0075]
As shown in FIG. 8, in the communication response process in the third embodiment, the process of S505 is added before S510 with respect to the communication response process of FIG. 33, a response signal indicating that the storage process to the EEPROM 11 is being performed, and a response signal for preventing the
[0076]
That is, the
In the ECU according to the second embodiment described above, the data write process to the EEPROM 11 (S510) is performed after the monitoring frequency information output request from the
[0077]
Therefore, in the communication response process of the third embodiment, S505 is added before S510 with respect to the communication response process (FIG. 7) of the second embodiment, and in S505, the
[0078]
Therefore, according to the ECU of the third embodiment, the total amount of data to be continuously saved is large, and the time required for writing the data to be continuously saved in the EEPROM 11 in S510 of the communication response process becomes long. However, it is possible to prevent the timeout determination from being made on the external device side.
[0079]
In the third embodiment, S505 in FIG. 8 corresponds to the processing as the preceding response means. Further, when the time required for writing the data to be continuously saved to the EEPROM 11 becomes longer, for example, during the data writing to the EEPROM 11 in S510, for example, the above-mentioned S505 is periodically sent to the
[0080]
Next, a fourth embodiment will be described.
The ECU of the fourth embodiment differs from the ECU of the third embodiment only in that the
[0081]
As shown in FIG. 9, in the communication response process according to the fourth embodiment, the processes of S610 to S650 are performed instead of S510 with respect to the communication response process of FIG. In FIG. 9, the same processes as those in FIG. 8 are given the same step numbers.
[0082]
That is, as shown in FIG. 9, when the
In subsequent S620, it is determined whether or not the value of the variable i is smaller than the total number (data number) n of the data to be continuously saved, and if it is determined that the value of the variable i is smaller than the data number n. (S620: YES), go to S630.
[0083]
In S630, the SRAM value of the i-th continuous storage target data corresponding to the value of the variable i (that is, the value of the i-th continuous storage target data stored in the SRAM 29) S [i] is read from the
[0084]
If “E [i] ≠ S [i]” is not satisfied (S630: NO), the process proceeds to S640, the value of the variable i is incremented by 1, and the process returns to S620.
If it is determined in S630 that “E [i] ≠ S [i]” (S630: YES), the process proceeds to S650, and S [i] is written in the EEPROM 11 as E [i]. . Thereafter, the process proceeds to S640, and after the value of the variable i is incremented by 1, the process returns to S620.
[0085]
On the other hand, if it is determined in S620 that the value of the variable i is not smaller than the number of data n (i.e., i ≧ n) (S620: NO), the process proceeds to S520, and all of the
[0086]
That is, in this communication response process, data writing to the EEPROM 11 is not necessarily performed, but the data to be continuously saved whose EEPROM value and SRAM value do not match are searched for by the processes of S610 to S650, and both values are equal. Only when there is data that is not correct, it is determined that the EEPROM value of the data is not the latest value stored in the
[0087]
According to the ECU of the fourth embodiment, when the monitoring frequency information output request from the
[0088]
In the fourth embodiment, the SRAM value is handled as the latest value in the
[0089]
Next, an ECU according to a fifth embodiment will be described.
First, FIG. 10 is a block diagram showing the configuration of the
[0090]
As shown in FIG. 10, the
(1) The voltage VD from the
[0091]
(2) The
The main
[0092]
For this reason, in the main
[0093]
Therefore, the
[0094]
The
[0095]
(3) In the fifth embodiment, the
[0096]
(4) The
[0097]
Next, in S720, data in the
In subsequent S730, all the data to be continuously saved in the EEPROM 11 are read out and copied to the
[0098]
(5) The
[0099]
Then, when the
[0100]
That is, in the
[0101]
And according to ECU41 of such 5th Embodiment, in order to reduce the frequency | count of data writing to EEPROM11, S810 of FIG. 12 which is the original data writing process to EEPROM11 is implemented only just before operation stop. However, when the monitor frequency information output request from the
[0102]
As mentioned above, although one Embodiment of this invention was described, it cannot be overemphasized that this invention can take a various form.
For example, in the first to fourth embodiments, if the
[0103]
On the other hand, the data to be continuously stored is not limited to data whose value is incremented by one, such as the numerator and denominator of the monitoring frequency defined by the RateBase monitoring method, but increases or decreases by a certain unit change amount, for example. The unit change amount need not always be the same value.
[0104]
Furthermore, the rewritable nonvolatile memory is not limited to the EEPROM, and for example, a flash ROM may be used.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an ECU (electronic control unit) according to a first embodiment.
FIG. 2 is an explanatory diagram for explaining data to be continuously saved.
FIG. 3 is a flowchart showing a process when the microcomputer of the ECU according to the first embodiment increments the data to be continuously saved on the NRAM.
FIG. 4 is a flowchart showing a process executed by the microcomputer of the ECU according to the first embodiment to store the value of the data to be continuously saved updated on the NRAM in each of the SRAM and the EEPROM.
FIG. 5 is a flowchart showing an initial process executed by the microcomputer of the ECU according to the first embodiment.
FIG. 6 is a flowchart showing a communication response process executed by the microcomputer of the ECU according to the first embodiment.
FIG. 7 is a flowchart showing a communication response process executed by the microcomputer of the ECU according to the second embodiment.
FIG. 8 is a flowchart showing a communication response process executed by the microcomputer of the ECU according to the third embodiment.
FIG. 9 is a flowchart showing a communication response process executed by the microcomputer of the ECU according to the fourth embodiment.
FIG. 10 is a block diagram illustrating a configuration of an ECU (electronic control unit) according to a fifth embodiment.
FIG. 11 is a flowchart showing an initial process executed by the microcomputer of the ECU according to the fifth embodiment.
FIG. 12 is a flowchart showing an operation end time process executed by a microcomputer of an ECU according to a fifth embodiment.
[Explanation of symbols]
DESCRIPTION OF
Claims (7)
動作電源の供給が停止されても継続して保存すべき特定のデータであって、前記処理作業用メモリ上で値が更新されるデータ(以下、継続保存対象データという)を継続的に保存するために設けられ、電気的に記憶内容の書き換えが可能な不揮発性メモリと、
予め定められた書込実施条件が成立した際に、前記処理作業用メモリに記憶されている前記継続保存対象データの値を前記不揮発性メモリに記憶させるデータ保存手段と、
予め定められたデータ復元実施条件が成立した際に、前記不揮発性メモリに記憶されている前記継続保存対象データの値を前記処理作業用メモリにコピーすることにより、前記処理作業用メモリ内の前記継続保存対象データが消失しても該継続保存対象データの値の継続的な更新を可能にするデータ復元手段と、
外部装置からの前記継続保存対象データの出力要求を受けた場合に、前記処理作業用メモリに記憶されている前記継続保存対象データの値を前記外部装置に出力する出力手段と、
を備えた電子制御装置において、
前記データ保存手段とは別に、前記外部装置からの前記出力要求を受けた際にも、前記処理作業用メモリに記憶されている前記継続保存対象データの値を前記不揮発性メモリに記憶させる第2のデータ保存手段が設けられていること、
を特徴とする電子制御装置。Processing work memory used for data processing;
Specific data that should be continuously stored even after the supply of operating power is stopped, and data whose value is updated in the processing work memory (hereinafter referred to as data to be continuously stored) is continuously stored. A non-volatile memory that is electrically provided and capable of electrically rewriting stored contents;
Data storage means for storing the value of the continuous storage target data stored in the processing work memory in the nonvolatile memory when a predetermined writing execution condition is satisfied;
When a predetermined data restoration execution condition is satisfied, the value of the data to be continuously stored stored in the nonvolatile memory is copied to the processing work memory, thereby the processing work memory in the processing work memory is copied. Data restoration means for enabling continuous update of the value of the data to be continuously saved even if the data to be continuously saved is lost;
An output means for outputting, to the external device, the value of the continuous storage target data stored in the processing work memory when receiving an output request for the continuous storage target data from an external device;
In an electronic control device comprising:
Separately from the data storage means, when receiving the output request from the external device, the non-volatile memory stores the value of the data to be continuously stored stored in the processing work memory. Data storage means are provided,
An electronic control device.
前記出力手段は、前記第2のデータ保存手段による前記不揮発性メモリへの前記継続保存対象データの値の記憶が終了してから、前記処理作業用メモリに記憶されている前記継続保存対象データの値を前記外部装置に出力すること、
を特徴とする電子制御装置。The electronic control device according to claim 1.
The output unit stores the value of the continuous storage target data stored in the processing work memory after the second data storage unit finishes storing the value of the continuous storage target data in the nonvolatile memory. Outputting a value to the external device;
An electronic control device.
前記外部装置からの前記出力要求を受けた場合に、前記第2のデータ保存手段が動作する前又は該第2のデータ保存手段が動作している最中に動作して、前記外部装置側でタイムアウト判定がなされるのを防ぐための応答信号を前記外部装置に出力する先行応答手段を備えていること、
を特徴とする電子制御装置。The electronic control device according to claim 2,
When the output request is received from the external device, the external device is operated before the second data storage unit is operating or while the second data storage unit is operating. Comprising a preceding response means for outputting a response signal for preventing a time-out determination from being made to the external device;
An electronic control device.
前記第2のデータ保存手段は、前記処理作業用メモリに記憶されている前記継続保存対象データの値と、前記不揮発性メモリに記憶されている前記継続保存対象データの値とを比較して、両値が異なっている場合にのみ、前記処理作業用メモリに記憶されている前記継続保存対象データの値を前記不揮発性メモリに記憶させるように構成されていること、
を特徴とする電子制御装置。The electronic control device according to any one of claims 1 to 3,
The second data storage means compares the value of the data to be continuously stored stored in the processing work memory with the value of the data to be continuously stored stored in the nonvolatile memory, Only when both values are different, the value of the data to be continuously stored stored in the processing work memory is configured to be stored in the nonvolatile memory,
An electronic control device.
データ保持用の電源が常時供給されたRAM(以下、スタンバイRAMという)と、前記動作電源の供給に伴い当該電子制御装置が動作しているときにのみデータ保持用の電源が供給されるRAM(以下、ノーマルRAMという)とを備えると共に、前記処理作業用メモリは前記ノーマルRAMであり、
更に、前記ノーマルRAMから前記スタンバイRAMへ前記継続保存対象データの最新値をコピーするコピー手段を備え、
前記データ保存手段、前記第2のデータ保存手段、及び前記出力手段は、前記ノーマルRAM又は前記スタンバイRAMから前記継続保存対象データの値を読み出して、その読み出した値を、前記処理作業用メモリに記憶されている前記継続保存対象データの値として処理するように構成されており、
前記データ復元手段は、当該電子制御装置が前記動作電源の供給に伴い起動した際に、前記スタンバイRAM内の記憶データが正常であるか否かを判定して、前記スタンバイRAM内の記憶データが正常であると判定したならば、前記スタンバイRAMから前記ノーマルRAMへ前記継続保存対象データの値をコピーし、前記スタンバイRAM内の記憶データが正常でないと判定したならば、前記データ復元実施条件が成立したとして、前記不揮発性メモリに記憶されている前記継続保存対象データの値を前記スタンバイRAMと前記ノーマルRAMとにコピーするように構成されていること、
を特徴とする電子制御装置。The electronic control device according to any one of claims 1 to 4,
A RAM (hereinafter referred to as a standby RAM) to which data holding power is constantly supplied, and a RAM (to which data holding power is supplied only when the electronic control unit is operating in accordance with the supply of the operation power) ( Hereinafter referred to as normal RAM), and the processing work memory is the normal RAM,
Furthermore, a copy means for copying the latest value of the data to be continuously saved from the normal RAM to the standby RAM,
The data storage means, the second data storage means, and the output means read the value of the data to be continuously saved from the normal RAM or the standby RAM, and store the read value in the processing work memory. It is configured to process as a value of the stored data to be continuously saved,
The data restoring means determines whether or not the stored data in the standby RAM is normal when the electronic control unit is activated with the supply of the operating power, and the stored data in the standby RAM is If it is determined to be normal, the value of the data to be continuously saved is copied from the standby RAM to the normal RAM, and if it is determined that the stored data in the standby RAM is not normal, the data restoration execution condition is It is configured that the value of the data to be continuously stored stored in the nonvolatile memory is copied to the standby RAM and the normal RAM as being established.
An electronic control device.
当該装置は、車両に搭載された車載機器を制御する車両用電子制御装置であると共に、
車両が所定の運転状態となったことを検出する検出手段と、
所定の故障診断実施条件が成立した場合に前記車載機器における診断対象の故障診断を実施する故障診断手段と、
当該装置の起動から停止までの間に、前記検出手段により前記所定の運転状態が検出されたときに前記処理作業用メモリに記憶されている運転回数の値を1回分だけ更新した値に書き換えると共に、前記故障診断手段にて前記故障診断が実施されたときに前記処理作業用メモリに記憶されている故障診断回数の値を1回分だけ更新した値に書き換えるデータ更新手段とを備え、
更に、前記継続保存対象データが、前記運転回数と前記故障診断回数であること、
を特徴とする電子制御装置。The electronic control device according to any one of claims 1 to 5,
The device is an electronic control device for a vehicle that controls an in-vehicle device mounted on the vehicle,
Detecting means for detecting that the vehicle is in a predetermined driving state;
A failure diagnosis means for performing failure diagnosis of a diagnosis target in the in-vehicle device when a predetermined failure diagnosis execution condition is satisfied;
When the predetermined operating state is detected by the detecting means between the start and stop of the apparatus, the value of the number of operations stored in the processing work memory is rewritten to a value updated by one time. Data updating means for rewriting the value of the number of times of failure diagnosis stored in the processing work memory when the failure diagnosis is performed by the failure diagnosis means to a value updated only once,
Furthermore, the data to be continuously stored is the number of operations and the number of failure diagnosis,
An electronic control device.
前記外部装置は、当該電子制御装置に接続可能な車両用の診断装置であることを特徴とする電子制御装置。The electronic control device according to claim 6.
The external control device is a vehicle diagnostic device connectable to the electronic control device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002340878A JP3960212B2 (en) | 2002-11-25 | 2002-11-25 | Electronic control unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002340878A JP3960212B2 (en) | 2002-11-25 | 2002-11-25 | Electronic control unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004178067A JP2004178067A (en) | 2004-06-24 |
JP3960212B2 true JP3960212B2 (en) | 2007-08-15 |
Family
ID=32703391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002340878A Expired - Fee Related JP3960212B2 (en) | 2002-11-25 | 2002-11-25 | Electronic control unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3960212B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010013004A (en) * | 2008-07-04 | 2010-01-21 | Denso Corp | Electronic control device for vehicle |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008038741A1 (en) * | 2006-09-28 | 2008-04-03 | Fujitsu Ten Limited | Vehicle-mounted device, frequency collection device, and frequency collection method |
JP4345860B2 (en) | 2007-09-14 | 2009-10-14 | 株式会社デンソー | Vehicle memory management device |
JP4978476B2 (en) * | 2008-01-09 | 2012-07-18 | 株式会社デンソー | Power supply status detection device |
JP6851110B2 (en) | 2016-10-31 | 2021-03-31 | 日立Astemo株式会社 | Electronic control device |
-
2002
- 2002-11-25 JP JP2002340878A patent/JP3960212B2/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010013004A (en) * | 2008-07-04 | 2010-01-21 | Denso Corp | Electronic control device for vehicle |
US8306688B2 (en) | 2008-07-04 | 2012-11-06 | Denso Corporation | Electronic control device |
Also Published As
Publication number | Publication date |
---|---|
JP2004178067A (en) | 2004-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5176728B2 (en) | Electronic control device for vehicle | |
JP4345860B2 (en) | Vehicle memory management device | |
US10964135B2 (en) | In-vehicle electronic control unit and method for abnormality response processing thereof | |
US7203581B2 (en) | Electronic control unit for controlling updating of data in non-volatile memory | |
US9110842B2 (en) | Control device for vehicle and error processing method in control device for vehicle | |
JP4539757B2 (en) | Electronic control unit | |
US6401163B1 (en) | Apparatus and method for rewriting data from volatile memory to nonvolatile memory | |
US9080530B2 (en) | Electronic control apparatus and vehicle control system | |
US7831678B2 (en) | Electronic control apparatus | |
JPH11272498A (en) | Electronic controller | |
JP2009276820A (en) | Electronic apparatus and program | |
JP6011162B2 (en) | Electronic control unit | |
JP4552982B2 (en) | Electronic control unit | |
JPH11238005A (en) | Electronic controller and control system | |
JP4001088B2 (en) | Electronic control unit | |
JP3960212B2 (en) | Electronic control unit | |
US11314634B2 (en) | Electronic control unit and data protection method therefor | |
WO2008099276A1 (en) | Vehicle control device | |
WO2015076012A1 (en) | Electronic control device and software rewriting system | |
JP2004151944A (en) | Method for writing data in non-volatile storage device, its program and device, and onboard electronic controller | |
JP7029366B2 (en) | Electronic control device for automobiles | |
JP2004021520A (en) | Electronic controller for vehicle | |
JP3211708B2 (en) | Vehicle control device | |
JPH09171459A (en) | Electronic control equipment | |
JP6887277B2 (en) | Electronic control device for automobiles |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050324 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070417 |
|
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: 20070424 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070507 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3960212 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110525 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120525 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120525 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130525 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140525 Year of fee payment: 7 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |