JP4281222B2 - Nonvolatile memory writing device - Google Patents
Nonvolatile memory writing device Download PDFInfo
- Publication number
- JP4281222B2 JP4281222B2 JP2000205153A JP2000205153A JP4281222B2 JP 4281222 B2 JP4281222 B2 JP 4281222B2 JP 2000205153 A JP2000205153 A JP 2000205153A JP 2000205153 A JP2000205153 A JP 2000205153A JP 4281222 B2 JP4281222 B2 JP 4281222B2
- Authority
- JP
- Japan
- Prior art keywords
- microcomputer
- nonvolatile memory
- voltage
- writing
- power supply
- 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
- 230000007423 decrease Effects 0.000 claims description 11
- 230000005540 biological transmission Effects 0.000 claims description 9
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000000034 method Methods 0.000 description 36
- 238000003745 diagnosis Methods 0.000 description 23
- 230000007257 malfunction Effects 0.000 description 12
- 238000001514 detection method Methods 0.000 description 10
- 238000012937 correction Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 7
- 230000010355 oscillation Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000007689 inspection Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000002347 injection Methods 0.000 description 3
- 239000007924 injection Substances 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000000446 fuel Substances 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000007858 starting material Substances 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、不揮発性メモリ書き込み装置に関するものである。
【0002】
【従来の技術】
この種の従来装置として、例えば、車載エンジン等を制御する車載電子制御装置(ECU)が知られている。同ECUにおいて、不揮発性メモリとしてのEEPROMには、例えば、エンジン制御における学習値や各種センサの故障を判別するための故障コード(ダイアグコード)が記憶されるようになっている。
【0003】
また、車載ECUは、バッテリ電圧からマイクロコンピュータ(以下、マイコンという)等を作動させるための電源電圧(例えば、5V)を生成する電源ICを備える。同電源ICは、電源電圧を監視しており、その低下時においてマイコンに対してリセット信号を出力するようになっている。このリセット信号に基づいてマイコンによる初期化処理が実施されECUの誤作動が未然に防止されるようになっている。
【0004】
【発明が解決しようとする課題】
ところで、上記従来技術では、マイコンが誤作動する前にリセット信号を出力する必要があるため、電源ICのリセット電圧は、マイコンの最低作動電圧よりも高い電圧レベルで設定されている。
【0005】
一方、マイコンの最低作動電圧は、マイコンのクロック信号の周波数(クロック周波数)によって変動し、同クロック周波数が高くなるほど上昇する。このため、マイコンの処理負荷の増大に対応するためにマイコンのクロック周波数を高めると、そのマイコンの最低作動電圧が、電源ICのリセット電圧を上回ることが考えられる。
【0006】
この場合、電源電圧がマイコンの最低作動電圧まで低下してもリセットがかからず、ECUが誤作動してしまう。具体的には、例えばプログラムカウンタの値が、不適切な値となってマイコンにより誤ったプログラムが実行され、ひいてはEEPROMへ誤ったデータが書き込まれるおそれがある。EEPROMへ誤ったデータが書き込まれると、故障していないセンサの故障コードが出力されたり、誤った学習値でエンジン制御が実施されてしまうといった問題が生じる。
【0007】
本発明は、上記問題に着目してなされたものであって、その目的とするところは、不揮発性メモリの誤書き込みを防止することができる不揮発性メモリ書き込み装置を提供することである。
【0008】
【課題を解決するための手段】
本発明の不揮発性メモリ書き込み装置はその前提として、最低作動電圧がそれぞれ異なる第1のマイクロコンピュータ及び第2のマイクロコンピュータと、前記第2のマイクロコンピュータによりデータが書き込まれる不揮発性メモリと、電源電圧が所定のリセット電圧以下となったとき、第1のマイクロコンピュータに対してリセット信号を出力するリセット手段とを備え、前記第1のマイクロコンピュータの最低作動電圧が前記リセット電圧よりも低く、前記第2のマイクロコンピュータの最低作動電圧が前記リセット電圧よりも高くなっている。
【0009】
従って、電源電圧が低下して第2のマイクロコンピュータの最低作動電圧よりも低下したときには、第2のマイクロコンピュータが誤作動して第2のマイクロコンピュータにより不揮発性メモリに誤ったデータが書き込まれるおそれがある。しかしながら、本発明によれば、第2のマイクロコンピュータの最低作動電圧以下となる電圧域を含む領域まで電源電圧が低下すると、第1のマイクロコンピュータにて第2のマイクロコンピュータによる不揮発性メモリの書き込みが禁止される。この場合、電源電圧が第2のマイクロコンピュータの最低作動電圧以下となったとしても、この電源電圧で正常に作動する第1のマイクロコンピュータによって不揮発性メモリの書き込みが禁止され、第2のマイクロコンピュータによる不揮発性メモリの誤書き込みを防止できる。
【0010】
また、不揮発性メモリ書き込み装置において、電源スイッチのオフ時にも記憶データを保持し、電源電圧の低下時にデータの書き込みが制限されるバックアップメモリと、電源電圧を監視し、該電源電圧が、バックアップメモリの書き込みを制限するためのしきい値電圧まで低下したとき、電圧低下信号を出力する電圧監視手段を備えているものがある。このような装置では、請求項2に記載のように、電圧監視手段からの電圧低下信号に基づいて、不揮発性メモリの書き込みが禁止される。この場合、電源電圧の低下を検出するために新たな回路を設けることなく、不揮発性メモリの誤書き込みを防止することができ、コスト的にも有利なものとなる。
【0011】
請求項3に記載の発明によれば、電源電圧の低下に伴い不揮発性メモリの書き込みが禁止された場合、電源電圧が上昇し不揮発性メモリの書き込みが禁止される電圧域以上となった後所定時間の経過後に、不揮発性メモリの書き込みが許可される。この場合、電源電圧の低下により第2のマイクロコンピュータが誤作動したとしても、所定時間が経過するまでの間に第2のマイクロコンピュータが正常動作に復帰できる。そして、その状態で不揮発性メモリの書き込みが許可されるので、不揮発性メモリの誤書き込みを確実に防止できる。
【0012】
請求項4に記載の発明によれば、第1のマイクロコンピュータの出力端子から不揮発性メモリの書き込みを禁止または許可するための制御信号が出力され、第2のマイクロコンピュータの出力端子から不揮発性メモリにデータを書き込むための制御信号が出力される。これら出力端子がゲート回路を介して不揮発性メモリのチップセレクト端子に接続される。そして、第1のマイクロコンピュータの出力端子から書き込みを禁止するための制御信号が出力されるときに、不揮発性メモリのチップセレクト端子が非選択状態とされる。この場合、電圧低下時における誤作動により第2のマイクロコンピュータから不揮発性メモリにデータを書き込むための制御信号が出力されたとしても、その信号が無効となり不揮発性メモリの書き込みを禁止できる。
【0013】
また、請求項5に記載のように、第1のマイクロコンピュータにてエンジン制御が実施され、第2のマイクロコンピュータにてトランスミッション制御が実施される。こうした装置において、エンジンの始動性を確保するとともに、トランスミッション制御を高速に実施するためには、第2のマイクロコンピュータは、第1のマイクロコンピュータよりも高いクロック信号で動作させる必要がある。この場合、第2のマイクロコンピュータの最低作動電圧は第1のマイクロコンピュータよりも高くなるので、上記発明を適用すると、実用上好ましいものとなる。
【0014】
【発明の実施の形態】
以下、この発明を具体化した実施の形態を図面に従って説明する。
図1は、本実施の形態における電子制御装置(ECU)1の概略を示す構成図である。
【0015】
図1に示すように、ECU1は、電源IC2、メインマイコン3、サブマイコン4、メイン入出力回路5、サブ入出力回路6、EEPROM7、アンド回路8、メイン発振回路9、サブ発振回路10等を備えている。
【0016】
ECU1の電源IC2には、イグニッションスイッチ11を介してバッテリBが接続されており、イグニッションスイッチ11のオン操作によりバッテリ電圧が供給される。電源IC2は、バッテリ電圧から電源電圧Vcc(具体的には、5V)を生成し、その電圧Vccを電源ラインを介してメインマイコン3、サブマイコン4、メイン入出力回路5、サブ入出力回路6及びEEPROM7等に供給する。
【0017】
第1のマイクロコンピュータとしてのメインマイコン3は、噴射制御や点火制御等のエンジン制御を実施するためのマイコンであり、第2のマイクロコンピュータとしてのサブマイコン4は、トランスミッション制御やダイアグ制御(故障診断)を実施するためのマイコンである。メインマイコン3は、CPU3a、ROM3b、RAM3c、スタンバイRAM(SRAM)3d、I/O(入出力装置)3eを備えており、サブマイコン4も同様に、CPU4a、ROM4b、RAM4c、スタンバイRAM(SRAM)4d、I/O(入出力装置)4eを備えている。CPU3a,4aは、ROM3b,4b内に格納されている制御プログラムを実行し、制御データをRAM3c,4cに一時記憶する。SRAM3d,4dには、イグニッションスイッチ11のオフ時にもバックアップ用の電源電圧(図示せず)が印加され、それによりSRAM3d,4d内の記憶データが保持されるようになっている。なお、SRAM3d,4dがバックアップメモリに相当する。
【0018】
また、各マイコン3,4によるSRAM3d,4dへのデータの書き込みは、入力端子WIがLレベルとなる場合に禁止(制限)され、入力端子WIがHレベルとなる場合に許可されるようになっている。同入力端子WIは、前記電源IC2に接続されており、その電位レベルは、電源IC2によって制御される。具体的には、電源IC2は、電源電圧Vccを監視しており、電源電圧Vccが所定のしきい値電圧(書き込み禁止電圧)Vt以下にとなるとき、Lレベルの電圧低下信号S1をメインマイコン3及びサブマイコン4の入力端子WIに出力する。つまり、電源IC2は、Vcc≦Vtでは、入力端子WIをLレベルとし、Vcc>Vtでは、入力端子WIをHレベルとする。
【0019】
また、電源電圧Vccが前記しきい値電圧(書き込み禁止電圧)Vtよりもさらに低下して所定のリセット電圧Vr以下となると(Vcc≦Vr)、電源IC2は、Lレベルのリセット信号S2をメインマイコン3のリセット端子Rに対して出力する。これにより、メインマイコン3は、実行中の処理を停止するとともに初期化処理を実施してサブマイコン4をリセットするようになっている。なお、本実施の形態では、電源IC2が、リセット手段及び電圧監視手段に相当する。
【0020】
メイン入出力回路5には、回転センサ21、エアフロメータ22、水温センサ23、スロットルセンサ24、スタータスイッチ25、インジェクタ26、イグナイタ27等が接続されている。メインマイコン3は、これら各センサ・スイッチの検出信号をメイン入出力回路5を介して取り込み、その検出信号によりエンジン運転状態を判定する。そして、その運転状態に基づいて燃料噴射信号や点火信号等の駆動信号を算出し、それら駆動信号をメイン入出力回路5を介してインジェクタ26やイグナイタ27等に出力する。これにより、インジェクタ26による燃料噴射量やイグナイタ27による点火時期等が制御される。
【0021】
一方、サブ入出力回路6には、車速センサ28、シフトポジションセンサ29、油温センサ30、ブレーキランプスイッチ31、ダイアグテスタ32、ソレノイド33等が接続されている。サブマイコン4は、これら各センサ・スイッチの検出信号をサブ入出力回路6を介して取り込み、その検出信号によりトランスミッションの作動状態を判定する。そして、その作動状態に基づく駆動信号をサブ入出力回路6を介してソレノイド33に出力する。これにより、ソレノイド33が駆動されトランスミッション内の油圧経路が切り替えられ、トランスミッションの変速が制御される。
【0022】
メインマイコン3−サブマイコン4間では、ダイレクトメモリアクセス(DMA)方式にて前記センサ・スイッチの検出信号やその検出信号に基づく各種制御量等の授受が行われる。そして、サブマイコン4は、各センサ・スイッチの検出信号等に基づいて故障診断(ダイアグノーシス)を実施するとともに、その故障診断結果をサブ入出力回路6を介してダイアグテスタ32に出力する。
【0023】
サブマイコン4には、不揮発性メモリとしてのEEPROM7が接続されており、同EEPROM7には、故障診断に基づくダイアグ情報、ソレノイド33の個体差による制御バラツキを補正するためのソレノイド電流補正値等が記憶されている。また、EEPROM7のチップセレクト端子CSには、ゲート回路としてのアンド回路8の出力が接続されており、同アンド回路8の一方の入力はメインマイコン3の出力端子CS1に接続されるとともに、アンド回路8の他方の入力はサブマイコン4の出力端子CS2に接続されている。このEEPROM7のチップセレクト端子CSは、EEPROM7の書き込みを許可及び禁止するための端子であり、同端子CSがHレベル(選択状態)では書き込みが許可され、Lレベル(非選択状態)では書き込みが禁止される。つまり、メインマイコン3及びサブマイコン4の出力端子CS1,CS2からHレベルの制御信号SC1,SC2が出力されたとき、EEPROM7のチップセレクト端子CSがHレベル(選択状態)となる。そのとき、サブマイコン4とEEPROM7との間のデータ通信が有効となって、所望のデータがEEPROM7に書き込まれるようになっている。
【0024】
本実施の形態において、メインマイコン3には、メイン発振回路9が接続されており、メインマイコン3は、メイン発振回路9から出力される16MHzのクロック信号に基づいて作動する。一方、サブマイコン4には、サブ発振回路10が接続されており、サブマイコン4はサブ発振回路10から出力される20MHzのクロック信号に基づいて作動する。ここで、サブマイコン4が実施するトランスミッション制御において、過渡時の油圧制御でソレノイド33を高速に作動させる必要があるが、16MHzのクロック信号では、的確なタイミングでソレノイド33を制御できず、仕様通りの作動を得ることができない。このため、本実施の形態では、サブマイコン4のクロック信号を20MHzとし、要求仕様を満足させるようにしている。
【0025】
このように、メインマイコン3のクロック信号を16MHzとし、サブマイコン4のクロック信号を20MHzとした場合、図2に示すように、メインマイコン3の最低作動電圧Vmよりも、サブマイコン4の最低作動電圧Vsが高くなる。また、メインマイコン3に対してリセット信号を出力するためのリセット電圧Vrは、エンジンの始動性を確保するためにできる限り低くする必要があり、その電圧レベルは、メインマイコン3の最低作動電圧Vmとサブマイコン4の最低作動電圧Vsとの間に設定されている。つまり、リセット電圧Vrは、サブマイコン4の最低作動電圧Vsよりも低く設定されている。そのため、電源電圧Vccが低下して最低作動電圧Vsとリセット電圧Vrとの間の電圧値となる期間T1では、サブマイコン4が誤作動するおそれがあるが、メインマイコン3の出力端子CS1をLレベルとすることで、EEPROM7の書き込みを禁止するようにしている。
【0026】
また、本実施の形態において、SRAM3d,4dの書き込みを制限するためのしきい値電圧Vtは、サブマイコン4の最低作動電圧Vsより幾分高い電圧レベルで設定されている。よって、電源電圧Vccの低下時において、電源電圧Vccがサブマイコン最低作動電圧Vsに至る前に、電源IC2から電圧低下信号S1が出力されて入力端子WIがLレベルとなる。本実施の形態では、この入力端子WIの電位レベルに基づいて、メインマイコン3によるEEPROM7の書き込み禁止処理が実施されている。
【0027】
次に、上記のように構成されるECU1の作用を説明する。ここでは先ず、サブマイコン4により実施されるEEPROM7の書き込み処理の一例を、図3〜図6を用いて説明する。なお、図3の処理は、ダイアグ情報をEEPROM7に書き込むための処理であり、例えば64ミリ秒毎に実施される。また、図4の処理は、ソレノイド電流補正値をEEPROM7に書き込むための処理であり、例えば16ミリ秒毎に実施される。
【0028】
本実施の形態におけるEEPROM7は、図6に示すように、開始アドレス00〜終了アドレスfeまでの記憶領域を有している。その記憶領域うち00〜1eまでのアドレスがダイアグコードを記憶するための領域として確保され、fc〜feのアドレスがソレノイド電流補正値を記憶するための領域として確保されている。つまり、サブマイコン4にて各種センサ・スイッチ等の故障が判定されて、故障の有無を示す「1」または「0」のデータがアドレス00〜1eの各ビット(ビット0〜ビット15)に記憶される。また、工場出荷検査時にて、500mA又は1Aの基準電流がソレノイド33に流されその際に求められるソレノイド電流補正値がアドレスfc〜feに記憶される。
【0029】
図3において、ダイアグ前回値とは、前回処理時のダイアグ更新値を記憶したものである。また、イグニッションキーのオン時の初期化処理では、EEPROM7から読み出されたダイアグ情報が、ダイアグ前回値及びダイアグ更新値として記憶されている。よって、正常時にはダイアグ更新値とダイアグ前回値は一致しているが、図示しないダイアグ検出処理にて新たな故障が検出されたとき、ダイアグ更新値が更新され、その更新値がダイアグ前回値と一致しなくなる。
【0030】
そして、図3のステップ100にて、ダイアグ前回値がダイアグ更新値と一致するか否かが判定される。ここで、ダイアグ検出処理にて新たな故障が検出されていないときは、同ステップ100にて肯定判別され、書き込み処理(ステップ110,ステップ120の処理)を実施することなく本処理を終了する。一方、ダイアグ検出処理にて新たな故障が検出され、ステップ100にて否定判別された場合、ステップ110に移行する。そして、ダイアグ前回値とダイアグ更新値について、各ビット毎に論理和をとり、その結果をダイアグ前回値とする。なおここでは、新たに検出されたセンサ・スイッチの故障に対応したビットが、「0」から「1」に変更される。続くステップ120において、変更されたダイアグ前回値(データ)と、それを書き込むべきアドレスとを引数として、図5に示すEEPROM書込処理へ移行する。
【0031】
図5に示すように、ステップ310にてサブマイコン4は、入力端子WIがHレベルか否かを判定する。つまり、電源電圧Vccの低下時か否かを判定する。ここで、入力端子WIがLレベルであり、電源電圧Vccの低下時と判定したときには、ステップ320〜ステップ350の処理を実施することなく、ステップ360に移行する。一方、入力端子WIがHレベルであれば、電源電圧Vccの低下時ではないと判定し、ステップ320に移行する。そして、ステップ320にて、出力端子CS2からHレベルの制御信号SC2を出力するとともに、ステップ330にて、EEPROM7の動作モードを書き込みモードとすべく書き込み命令を送信する。続くステップ340にてアドレスを送信するとともにステップ350にてデータを送信した後、ステップ360に移行する。そして、同ステップ360にて、出力端子CS2からLレベルの制御信号SC2を出力した後本処理を終了する。
【0032】
次に、ソレノイド電流補正値の書き込み処理について説明する。
図4に示すように、サブマイコン4は、ステップ200にて、工場出荷検査モードか否かを判定する。なおここでは、ECU1に対して所定の検査モード信号が入力され、その信号に基づいて工場出荷検査モードが判定される。同ステップ200にて、否定判別された場合、書き込み処理(ステップ210〜230の処理)を実施することなく本処理を終了する。一方、ステップ200にて肯定判別された場合、ステップ210に移行して、ソレノイド33に流れる電流値を前記サブ入出力回路6に配設されるA/D変換器(図示せず)を用いてA/D変換する。そして、ステップ220において、ソレノイド電流A/D変換値からソレノイド電流基準値を減算することによって、ソレノイド電流補正値を求める。続くステップ230において、このソレノイド電流補正値(データ)と、それを書き込むべきアドレスとを引数として、既述した図5のEEPROM書込処理(ステップ310〜360の処理)を実施する。
【0033】
次いで、メインマイコン3にて実行されるEEPROM7の書き込み禁止処理を図7を用いて詳述する。なお、図7の処理は、例えば、4ミリ秒毎に実行される。
【0034】
メインマイコン3は、ステップ400にて、入力端子WIがLレベルか否かを判定する。そして、入力端子WIがLレベルである場合、ステップ410に移行してカウンタをクリアした後ステップ430に進む。一方、入力端子WIがHレベルである場合、ステップ420に移行してカウンタの値をカウントアップさせた後ステップ430に進む。なおこのカウンタは、入力端子WIがHレベルとなった後の時間を計測するカウンタであって、前記RAM3cの所定の記憶領域に確保されている。ステップ430において、カウンタの値に基づいて、入力端子WIがHレベルとなった後所定時間T2が経過しているか否かを判定する。ここで、所定時間T2が経過していなければ、ステップ440にて、EEPROM7の書き込みを禁止するために、出力端子CS1からLレベルの制御信号SC1を出力して本処理を終了する。一方、所定時間T2が経過している場合、ステップ450にて、EEPROM7の書き込みを許可するために、出力端子CS1からHレベルの制御信号SC1を出力した後本処理を終了する。
【0035】
ここで、本実施の形態におけるEEPROM7の書き込み許可及び禁止の動作を図2を用いて詳述する。図2において、例えば、t1のタイミング以前では電源電圧Vccがしきい値電圧Vtよりも高いため、出力端子CS1はHレベルに保持されている。そのとき、データの書き込み要求に伴い出力端子CS2がHレベルとなると、アンド回路8の出力はHレベルとなりEEPROM7の書き込みが許可されて、サブマイコン4から送信されるデータがEEPROM7に書き込まれる。
【0036】
これに対して、電源電圧Vccがしきい値電圧Vt以下となると、電源IC2により入力端子WIがLレベルとされ、それに従いカウンタがクリアされるとともに出力端子CS1がLレベルとされる。そして、出力端子CS1がLレベルになる期間(t1〜t3)では、出力端子CS2がHレベルになっても、アンド回路8の出力はLレベルとなりEEPROM7の書き込みが禁止される。特に、期間T1においては、電源電圧Vccがサブマイコン4の最低作動電圧Vsを下回るので、サブマイコン4が誤作動するおそれがある。このため、図3〜図5の処理が誤って実施され、サブマイコン4の出力端子CS2からHレベルの制御信号SC2が出力されるとともに、サブマイコン4からEEPROM7に通信データが送信されることがある。しかしながら、本実施の形態では、メインマイコン3により出力端子CS1がLレベルに制御され、EEPROM7のチップセレクト端子CSがLレベル(非選択状態)となる。これにより、サブマイコン4とEEPROM7間のデータ通信が無効となり、EEPROM7の書き込みが禁止される。
【0037】
また、電源電圧Vccがしきい値電圧Vt以上となると、カウンタがカウントアップされ、タイミングt2からの時間が計測される。そして、所定時間T2の経過後(t3のタイミング)に出力端子CS1がHレベルに制御される。このように、本実施の形態では、電源電圧Vccがしきい値電圧Vt以上に復帰してから出力端子CS1がHレベルとなるまでにディレー時間T2が設定されている。よって、期間T1にてサブマイコン4が誤作動したとしても、この時間T2が経過する間に、サブマイコン4が正常動作に確実に復帰する。その後、データの書き込み要求に伴い出力端子CS2がHレベルとなると、EEPROM7の書き込みが許可されて、サブマイコン4からEEPROM7に送信されるデータがEEPROM7に書き込まれる。
【0038】
以上詳述した本実施の形態によれば、以下に示す効果が得られる。
(1)電源電圧Vccがしきい値電圧Vtまで低下すると、電源IC2から電圧低下信号S1が出力され、入力端子WIがLレベルとなる。このとき、メインマイコン3によって電源電圧Vccの低下が判定され、出力端子CS1がLレベルに制御されてサブマイコン4によるEEPROM7の書き込みが禁止される。このようにすれば、電源電圧Vccがサブマイコン4の最低作動電圧Vs以下となったとしても、この電源電圧Vccで正常に作動するメインマイコン3によりEEPROM7の書き込みが禁止され、サブマイコン4の誤作動によるEEPROM7の誤書き込みを防止できる。
【0039】
(2)電源IC2からの電圧低下信号S1は、既述したようにSRAM3d,4dの書き込みを禁止(制限)するために従来から用いられているものある。つまり、本実施の形態では、電源電圧Vccの低下を検出するために新たな回路を設けることなく、EEPROM7の誤書き込みを防止することができ、コスト的にも有利なものとなる。
【0040】
(3)電源電圧Vccがサブマイコン4の最低作動電圧Vsまで低下し(図2の期間T1)サブマイコン4が誤作動したとしても、電源電圧Vccがしきい値電圧Vt以上に上昇し所定時間T2が経過するまでの間にサブマイコン4が正常動作に復帰する。そして、その状態でメインマイコン3の出力端子CS1がHレベルに制御されてEEPROM7の書き込みが許可される。このようにすれば、サブマイコン4によるEEPROM7の誤書き込みを確実に防止できる。
【0041】
(4)メインマイコン3は、EEPROM7の書き込みを禁止または許可するための制御信号SC1を出力する出力端子CS1を有し、サブマイコン4は、EEPROM7にデータを書き込むための制御信号SC2を出力する出力端子CS2を有し、各出力端子CS1,CS2をアンド回路8を介してEEPROM7のチップセレクト端子CSに接続するようにした。このようにすれば、メインマイコン3の出力端子CS1から書き込みを禁止するためのLレベルの制御信号SC1が出力されると、アンド回路8によりEEPROM7のチップセレクト端子CSが常にLレベル(非選択状態)とされる。この場合、電圧低下時における誤作動によりサブマイコン4の出力端子CS2からHレベルの制御信号SC2が出力されたとしても、該制御信号SC2が無効となりEEPROM7の書き込みを禁止できる。
【0042】
なお本発明は、上記以外に次の形態にて具体化できる。
上記実施の形態では、電圧監視手段として電源IC2を用い、SRAM3d,4dの書き込みを禁止するために電源IC2から出力される電圧低下信号S1を用いて、EEPROM7の書き込みを禁止する構成であったが、これに限定するものではない。例えば、電源IC2とは別に電源電圧Vccの低下を検出する電圧監視手段を新たに設けてもよい。なおこの場合、電源電圧Vccの低下を検出するためのしきい値電圧Vtをサブマイコン4の最低作動電圧Vsに近づけることが望ましい。つまり、図2に示すように、しきい値電圧Vtとサブマイコン最低作動電圧Vsとの電圧値が異なる場合、電源電圧Vccがしきい値電圧Vt以下に低下し、サブマイコン4の最低作動電圧Vsに至る前に上昇することが考えられる。この場合、サブマイコン4が誤作動しない範囲の電圧低下であるにも拘わらず、EEPROM7の書き込みが禁止されるが、しきい値電圧Vtをサブマイコン最低作動電圧Vsに近づけることによって、こうした不都合を回避できる。
【0043】
上記実施の形態では、ゲート回路としてアンド回路8を用いるものであったが、これに限定するものではない。例えば、EEPROM7のようにチップセレクト端子がHレベルのときに選択状態となるものではなく、Lレベルのときに選択状態となるEEPROMを使用する場合には、アンド回路8に代えてオア回路を用いる。そして、電源電圧Vccの低下時にて書き込み禁止する際には、メインマイコン3の出力端子からHレベルの制御信号をオア回路に出力する。このようにすれば、オア回路の出力は常にHレベルとなり、EEPROMのチップセレクト端子が非選択状態となる。よって、電源電圧Vccの低下時において、EEPROMの誤書き込みを防止できる。
【0044】
上記実施の形態では、不揮発性メモリとして、EEPROMを用いるものであったが、フラッシュメモリを用いることもできる。
上記実施の形態では、エンジン制御及びトランスミッション制御を実施するためのECU1に具体化したが、これに限ることなく、車両制御(例えば、ABS制御)やボディ制御(例えば、エアコン制御)等を実施するECUに具体化してもよい。要は、最低作動電圧の異なる2つのマイコンを用いて各種制御を実施し、最低作動電圧が高いマイコンにて不揮発性メモリの書き込みを行うECUに具体化するものであればよい。
【図面の簡単な説明】
【図1】発明の実施の形態におけるECUの概要を示す構成図。
【図2】電源電圧の低下時の動作を説明するための図。
【図3】ダイアグ情報の書込処理を示すフローチャート。
【図4】ソレノイド電流補正値の書込処理を示すフローチャート。
【図5】EEPROM書込処理を示すフローチャート。
【図6】EEPROMの格納データを説明するための図。
【図7】メインマイコンによる書込禁止処理を示すフローチャート。
【符号の説明】
1…不揮発性メモリ書き込み装置としてのECU、2…リセット手段及び電圧監視手段としての電源IC、3…第1のマイクロコンピュータとしてのメインマイコン、3d…バックアップメモリとしてのSRAM、4…第2のマイクロコンピュータとしてのサブマイコン、4d…バックアップメモリとしてのSRAM、7…不揮発性メモリとしてのEEPROM、8…ゲート回路としてのアンド回路、11…電源スイッチとしてのイグニッションスイッチ、CS…チップセレクト端子、CS1,CS2…出力端子、S1…電圧低下信号、S2…リセット信号、SC1,SC2…制御信号、Vcc…電源電圧、Vm…メインマイコン最低作動電圧、Vs…サブマイコン最低作動電圧、Vr…リセット電圧、Vt…しきい値電圧。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a nonvolatile memory writing device.
[0002]
[Prior art]
As this type of conventional device, for example, an in-vehicle electronic control unit (ECU) that controls an in-vehicle engine or the like is known. In the ECU, an EEPROM as a non-volatile memory stores, for example, a learning value in engine control and a failure code (diagnostic code) for determining failure of various sensors.
[0003]
The in-vehicle ECU includes a power supply IC that generates a power supply voltage (for example, 5 V) for operating a microcomputer (hereinafter referred to as a microcomputer) from the battery voltage. The power supply IC monitors the power supply voltage and outputs a reset signal to the microcomputer when the power supply voltage drops. Based on this reset signal, initialization processing by the microcomputer is performed to prevent malfunction of the ECU.
[0004]
[Problems to be solved by the invention]
By the way, in the above prior art, since it is necessary to output a reset signal before the microcomputer malfunctions, the reset voltage of the power supply IC is set at a voltage level higher than the minimum operating voltage of the microcomputer.
[0005]
On the other hand, the minimum operating voltage of the microcomputer varies depending on the clock signal frequency (clock frequency) of the microcomputer, and increases as the clock frequency increases. For this reason, when the clock frequency of the microcomputer is increased in order to cope with an increase in the processing load of the microcomputer, it is considered that the minimum operating voltage of the microcomputer exceeds the reset voltage of the power supply IC.
[0006]
In this case, even if the power supply voltage decreases to the minimum operating voltage of the microcomputer, the reset is not performed and the ECU malfunctions. Specifically, for example, the value of the program counter becomes an inappropriate value, and an erroneous program is executed by the microcomputer, and thus erroneous data may be written to the EEPROM. If incorrect data is written to the EEPROM, a failure code of a sensor that has not failed is output, or engine control is performed with an incorrect learning value.
[0007]
The present invention has been made paying attention to the above problems, and an object of the present invention is to provide a nonvolatile memory writing device capable of preventing erroneous writing of the nonvolatile memory.
[0008]
[Means for Solving the Problems]
The nonvolatile memory writing device according to the present invention is premised on a first microcomputer and a second microcomputer having different minimum operating voltages, a nonvolatile memory in which data is written by the second microcomputer, and a power supply voltage. Reset means for outputting a reset signal to the first microcomputer when the voltage becomes equal to or lower than a predetermined reset voltage, and the minimum operating voltage of the first microcomputer is lower than the reset voltage, The minimum operating voltage of the
[0009]
Therefore, when the power supply voltage is lowered to be lower than the minimum operating voltage of the second microcomputer, the second microcomputer may malfunction and erroneous data may be written to the nonvolatile memory by the second microcomputer. There is. However, according to the present invention, when the power supply voltage is reduced to a region including a voltage range that is lower than the minimum operating voltage of the second microcomputer, the first microcomputer writes the nonvolatile memory by the second microcomputer. Is prohibited. In this case, even if the power supply voltage becomes equal to or lower than the minimum operating voltage of the second microcomputer, the writing of the nonvolatile memory is prohibited by the first microcomputer that operates normally with this power supply voltage, and the second microcomputer Can prevent erroneous writing to the nonvolatile memory.
[0010]
In addition, in the nonvolatile memory writing device, the stored data is retained even when the power switch is turned off, the data writing is restricted when the power supply voltage is reduced, the power supply voltage is monitored, and the power supply voltage is Some have voltage monitoring means for outputting a voltage drop signal when the voltage drops to a threshold voltage for limiting the writing of. In such an apparatus, as described in
[0011]
According to the third aspect of the present invention, when writing to the nonvolatile memory is prohibited due to a decrease in the power supply voltage, the power supply voltage rises and exceeds a voltage range where writing to the nonvolatile memory is prohibited. After the elapse of time, writing to the nonvolatile memory is permitted. In this case, even if the second microcomputer malfunctions due to a decrease in the power supply voltage, the second microcomputer can return to normal operation until a predetermined time elapses. In this state, since writing to the nonvolatile memory is permitted, erroneous writing to the nonvolatile memory can be reliably prevented.
[0012]
According to the fourth aspect of the present invention, the control signal for prohibiting or permitting writing of the nonvolatile memory is output from the output terminal of the first microcomputer, and the nonvolatile memory is output from the output terminal of the second microcomputer. A control signal for writing data to is output. These output terminals are connected to the chip select terminal of the nonvolatile memory through the gate circuit. Then, when a control signal for prohibiting writing is output from the output terminal of the first microcomputer, the chip select terminal of the nonvolatile memory is brought into a non-selected state. In this case, even if a control signal for writing data to the nonvolatile memory is output from the second microcomputer due to a malfunction at the time of a voltage drop, the signal becomes invalid and writing to the nonvolatile memory can be prohibited.
[0013]
Further, as described in
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a configuration diagram showing an outline of an electronic control unit (ECU) 1 in the present embodiment.
[0015]
As shown in FIG. 1, the
[0016]
A battery B is connected to the
[0017]
The
[0018]
Further, data writing to the
[0019]
When the power supply voltage Vcc further falls below the threshold voltage (write inhibit voltage) Vt and falls below a predetermined reset voltage Vr (Vcc ≦ Vr), the power supply IC2 sends an L level reset signal S2 to the main microcomputer. 3 to the reset terminal R. As a result, the
[0020]
The main input /
[0021]
On the other hand, a vehicle speed sensor 28, a
[0022]
Between the
[0023]
The
[0024]
In the present embodiment, a
[0025]
Thus, when the clock signal of the
[0026]
In the present embodiment, the threshold voltage Vt for limiting the writing to the
[0027]
Next, the operation of the
[0028]
As shown in FIG. 6, the
[0029]
In FIG. 3, the previous diagnostic value is a value stored in the updated diagnostic value at the previous processing. In the initialization process when the ignition key is turned on, the diagnosis information read from the
[0030]
Then, in
[0031]
As shown in FIG. 5, in
[0032]
Next, the solenoid current correction value writing process will be described.
As shown in FIG. 4, the
[0033]
Next, the write prohibiting process of the
[0034]
In
[0035]
Here, the write permission / prohibition operation of the
[0036]
On the other hand, when the power supply voltage Vcc is equal to or lower than the threshold voltage Vt, the input terminal WI is set to L level by the power supply IC2, the counter is cleared accordingly, and the output terminal CS1 is set to L level. In the period (t1 to t3) when the output terminal CS1 is at the L level, the output of the AND circuit 8 is at the L level and writing to the
[0037]
When the power supply voltage Vcc becomes equal to or higher than the threshold voltage Vt, the counter is counted up and the time from the timing t2 is measured. Then, after the elapse of the predetermined time T2 (timing at t3), the output terminal CS1 is controlled to the H level. Thus, in the present embodiment, the delay time T2 is set from when the power supply voltage Vcc returns to the threshold voltage Vt or higher until the output terminal CS1 becomes H level. Therefore, even if the
[0038]
According to the embodiment described in detail above, the following effects can be obtained.
(1) When the power supply voltage Vcc is lowered to the threshold voltage Vt, the voltage drop signal S1 is output from the power supply IC2, and the input terminal WI becomes L level. At this time, the
[0039]
(2) The voltage drop signal S1 from the
[0040]
(3) Even if the power supply voltage Vcc drops to the minimum operating voltage Vs of the sub-microcomputer 4 (period T1 in FIG. 2), even if the
[0041]
(4) The
[0042]
In addition to the above, the present invention can be embodied in the following forms.
In the above embodiment, the power supply IC2 is used as the voltage monitoring means, and the writing of the
[0043]
In the above embodiment, the AND circuit 8 is used as the gate circuit, but the present invention is not limited to this. For example, when an EEPROM that is not in the selected state when the chip select terminal is at the H level as in the
[0044]
In the above embodiment, an EEPROM is used as the nonvolatile memory, but a flash memory can also be used.
In the above embodiment, the present invention is embodied in the
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing an outline of an ECU in an embodiment of the invention.
FIG. 2 is a diagram for explaining an operation when a power supply voltage decreases.
FIG. 3 is a flowchart showing a process for writing diagnosis information.
FIG. 4 is a flowchart showing a solenoid current correction value writing process.
FIG. 5 is a flowchart showing EEPROM write processing.
FIG. 6 is a diagram for explaining data stored in an EEPROM;
FIG. 7 is a flowchart showing a write prohibition process by the main microcomputer.
[Explanation of symbols]
DESCRIPTION OF
Claims (5)
第2のマイクロコンピュータの最低作動電圧以下となる電圧域を含む領域まで前記電源電圧が低下すると、前記第1のマイクロコンピュータは、第2のマイクロコンピュータによる不揮発性メモリの書き込みを禁止することを特徴とする不揮発性メモリ書き込み装置。A first microcomputer and a second microcomputer having different minimum operating voltages; a nonvolatile memory in which data is written by the second microcomputer; and a power supply voltage that is lower than or equal to a predetermined reset voltage. Reset means for outputting a reset signal to the microcomputer, wherein the minimum operating voltage of the first microcomputer is lower than the reset voltage, and the minimum operating voltage of the second microcomputer is lower than the reset voltage. In the high nonvolatile memory writing device,
When the power supply voltage decreases to a region including a voltage range that is equal to or lower than the minimum operating voltage of the second microcomputer, the first microcomputer prohibits writing of the nonvolatile memory by the second microcomputer. A nonvolatile memory writing device.
前記電源電圧を監視し、該電源電圧が、前記バックアップメモリの書き込みを制限するためのしきい値電圧以下となるとき、電圧低下信号を出力する電圧監視手段を備えた請求項1に記載の不揮発性メモリ書き込み装置において、
前記第1のマイクロコンピュータは、前記電圧監視手段からの電圧低下信号に基づいて、不揮発性メモリの書き込みを禁止することを特徴とする不揮発性メモリ書き込み装置。A backup memory that retains stored data even when the power switch is turned off, and data writing is restricted when the power supply voltage drops,
2. The nonvolatile memory according to claim 1, further comprising a voltage monitoring unit that monitors the power supply voltage and outputs a voltage drop signal when the power supply voltage is equal to or lower than a threshold voltage for restricting writing to the backup memory. In the memory writing device,
The non-volatile memory writing device, wherein the first microcomputer prohibits non-volatile memory writing based on a voltage drop signal from the voltage monitoring means.
前記第1のマイクロコンピュータは、前記電源電圧の低下に伴い不揮発性メモリの書き込みを禁止した際には、電源電圧が上昇し不揮発性メモリの書き込みが禁止される電圧域以上となった後所定時間の経過後に、不揮発性メモリの書き込みを許可することを特徴とする不揮発性メモリ書き込み装置。The nonvolatile memory writing device according to claim 1 or 2,
When the first microcomputer prohibits the writing of the nonvolatile memory with the decrease of the power supply voltage, a predetermined time after the power supply voltage rises and exceeds the voltage range in which the writing of the nonvolatile memory is prohibited. A nonvolatile memory writing device, wherein writing to the nonvolatile memory is permitted after the elapse of time.
前記第1のマイクロコンピュータは、前記不揮発性メモリの書き込みを禁止または許可するための制御信号を出力する出力端子を有し、
前記第2のマイクロコンピュータは、前記不揮発性メモリにデータを書き込むための制御信号を出力する出力端子を有し、
前記各出力端子をゲート回路を介して不揮発性メモリのチップセレクト端子に接続し、
前記ゲート回路は、第1のマイクロコンピュータの出力端子から書き込みを禁止するための制御信号が出力されたとき、不揮発性メモリのチップセレクト端子を非選択状態とすることを特徴とする不揮発性メモリ書き込み装置。The nonvolatile memory writing device according to any one of claims 1 to 3,
The first microcomputer has an output terminal that outputs a control signal for prohibiting or permitting writing to the nonvolatile memory;
The second microcomputer has an output terminal for outputting a control signal for writing data to the nonvolatile memory,
Each output terminal is connected to a chip select terminal of a nonvolatile memory through a gate circuit,
Nonvolatile memory write, wherein the gate circuit deselects the chip select terminal of the nonvolatile memory when a control signal for prohibiting writing is output from the output terminal of the first microcomputer. apparatus.
前記第1のマイクロコンピュータはエンジン制御用コンピュータであり、前記第2のマイクロコンピュータは、トランスミッション制御用コンピュータであることを特徴とする不揮発性メモリ書き込み装置。In the nonvolatile memory writing device according to any one of claims 1 to 4,
The nonvolatile memory writing device according to claim 1, wherein the first microcomputer is an engine control computer, and the second microcomputer is a transmission control computer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000205153A JP4281222B2 (en) | 2000-07-06 | 2000-07-06 | Nonvolatile memory writing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000205153A JP4281222B2 (en) | 2000-07-06 | 2000-07-06 | Nonvolatile memory writing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002024101A JP2002024101A (en) | 2002-01-25 |
JP4281222B2 true JP4281222B2 (en) | 2009-06-17 |
Family
ID=18702288
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000205153A Expired - Fee Related JP4281222B2 (en) | 2000-07-06 | 2000-07-06 | Nonvolatile memory writing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4281222B2 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4014212B2 (en) | 2003-11-19 | 2007-11-28 | 富士通テン株式会社 | Electronic control unit |
DE102006056593A1 (en) * | 2006-11-29 | 2008-06-05 | Endress + Hauser Gmbh + Co. Kg | Method for operating a field device of process and automation technology and corresponding field device |
JP4345845B2 (en) | 2007-05-16 | 2009-10-14 | 株式会社デンソー | Power supply |
JP4978476B2 (en) * | 2008-01-09 | 2012-07-18 | 株式会社デンソー | Power supply status detection device |
JP5051214B2 (en) | 2009-12-25 | 2012-10-17 | 株式会社デンソー | In-vehicle failure detection device |
JP5974907B2 (en) * | 2013-01-17 | 2016-08-23 | 株式会社デンソー | Vehicle equipment |
JP6227945B2 (en) * | 2013-09-17 | 2017-11-08 | 日立オートモティブシステムズ株式会社 | Electronic control unit for automobile |
JP2018031573A (en) * | 2016-08-26 | 2018-03-01 | 株式会社ノーリツ | Control device |
-
2000
- 2000-07-06 JP JP2000205153A patent/JP4281222B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002024101A (en) | 2002-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH11259375A (en) | Device and system for control for vehicle | |
JPH03500944A (en) | Data processing systems that include electrically erasable and reprogrammable non-volatile memory | |
JP2006323822A (en) | Electronic control apparatus | |
US6401163B1 (en) | Apparatus and method for rewriting data from volatile memory to nonvolatile memory | |
US8095263B2 (en) | Electronic control unit and vehicle control system | |
JP4281222B2 (en) | Nonvolatile memory writing device | |
US6636989B1 (en) | Electronic control apparatus and method for on-board rewriting of non-volatile memories | |
US6182004B1 (en) | Apparatus and method for controlling electric power supply in nonvolatile memory rewriting operation | |
JP3137012B2 (en) | Electronic control unit | |
JP3097580B2 (en) | Electronic control unit | |
JP3491358B2 (en) | Power cut-off detection device | |
US20030163245A1 (en) | Method and device for running up a control unit for a motor vehicle | |
US6168321B1 (en) | Electronic control unit having user breakable function | |
US6853295B2 (en) | Vehicular control unit with self shut-off function and abnormality detection function | |
JP3331880B2 (en) | Control device using microcomputer | |
JP3937598B2 (en) | Electronic control unit | |
JPH0822422A (en) | Memory device | |
JP6162011B2 (en) | Electronic control unit for automobile | |
JP2003196256A (en) | Electronic control unit | |
JP3662409B2 (en) | Power supply monitoring circuit and power supply monitoring method thereof | |
JPH09171459A (en) | Electronic control equipment | |
JPH0236003B2 (en) | ||
JP3924945B2 (en) | Electronic control unit | |
JP2005226494A (en) | Electronic control unit | |
JP3444295B2 (en) | Electronic control unit for vehicle engine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060913 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090217 |
|
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: 20090224 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090309 |
|
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: 20120327 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120327 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130327 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140327 Year of fee payment: 5 |
|
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 |