JP3881069B2 - Electronic equipment - Google Patents

Electronic equipment Download PDF

Info

Publication number
JP3881069B2
JP3881069B2 JP26716596A JP26716596A JP3881069B2 JP 3881069 B2 JP3881069 B2 JP 3881069B2 JP 26716596 A JP26716596 A JP 26716596A JP 26716596 A JP26716596 A JP 26716596A JP 3881069 B2 JP3881069 B2 JP 3881069B2
Authority
JP
Japan
Prior art keywords
data
rewrite
electronic device
external device
control program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP26716596A
Other languages
Japanese (ja)
Other versions
JPH10111863A (en
Inventor
隆司 石田
芳明 木田
由香里 寺田
義博 川瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP26716596A priority Critical patent/JP3881069B2/en
Priority to US08/934,220 priority patent/US6275911B1/en
Priority to KR1019970047921A priority patent/KR100258147B1/en
Publication of JPH10111863A publication Critical patent/JPH10111863A/en
Priority to US09/625,402 priority patent/US6249848B1/en
Priority to US09/625,403 priority patent/US6477626B1/en
Priority to US09/843,821 priority patent/US6505280B2/en
Priority to US10/062,541 priority patent/US6957296B2/en
Priority to US10/270,578 priority patent/US20030041217A1/en
Priority to US11/217,385 priority patent/US7493455B2/en
Application granted granted Critical
Publication of JP3881069B2 publication Critical patent/JP3881069B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Microcomputers (AREA)
  • Read Only Memory (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、電気的にデータの書き換えが可能な不揮発性メモリに格納された制御プログラムや制御データを、該不揮発性メモリを電子装置に搭載した状態で書き換える技術に関する。
【0002】
【従来の技術】
従来より、例えば特開平4−114289号公報に開示されているように、制御プログラムや制御データを記憶しておくための記憶媒体として、電気的にデータの書き換えが可能なEEPROMやフラッシュEEPROM(以下、フラッシュROMという)等の不揮発性メモリを備え、この不揮発性メモリを組み付けた状態(実装した状態)で、制御プログラムや制御データを書き換え可能に構成された電子装置が提案されている。また、このような電子装置によれば、その製造工程において、不揮発性メモリを装置に実装してから、制御プログラム等を新規に書き込むことができる。
【0003】
即ち、この種の電子装置では、別途用意された外部装置が接続されて、この外部装置から所定の指令を受けると、上記外部装置からシリアルデータとして送信されて来る制御プログラムや制御データを受信し、その受信したデータを不揮発性メモリに順次書き込むようにしている。
【0004】
【発明が解決しようとする課題】
ところで、このような電子装置においては、外部装置との間で行うデータ通信の通信速度を上げるほど、通信に要する時間が短くなり、その分、不揮発性メモリ内のデータを書き換えるのに要するトータル時間を短縮することができる。
【0005】
しかしながら、上記従来の電子装置では、外部装置からのデータを受信して不揮発性メモリに書き込む、といった一連の処理を行うためのプログラムやハードウェアを、市場への供給後に容易に変更することはできず、この結果、外部装置との通信速度を変更して不揮発性メモリ内のデータを書き換えるのに要する時間を短縮する、といった手法を採ることができなかった。
【0006】
一方、従来より、この種の電子装置では、不揮発性メモリに一度に書き込むことが可能なビット数(例えば1バイトであり、以下、1バイトとして説明する)分のデータを外部装置から受信すると、その受信した1バイトデータを以下の手順で不揮発性メモリに書き込むようにしている。即ち、受信したデータを不揮発性メモリに書き込む処理を行った後、正常に書き込めたか否かをベリファイチェックし、このベリファイチェックにより正常に書き込めたと判定するまで、所定回数を限度に、データの書き込み処理を繰り返す。そして、受信したデータを正常に書き込むことができたならば、外部装置から次の1バイトデータが送信されて来るのを待つようにしている。
【0007】
このため、上記従来の電子装置に接続される外部装置は、図9に例示するように、1バイトデータDを予め定められた時間間隔Tで順次送信するようにしており、しかも、その時間間隔(送信間隔)Tは、電子装置側にてデータの書き込みに要する最大時間tmax よりも大きく設定されている。尚、図9において、左から右方向の矢印「→」は、外部装置から電子装置への1バイトデータDの送信を示している。
【0008】
つまり、この種の電子装置において、受信したデータの書き込みに要する時間(ベリファイチェックにより正常に書き込めたと判定するまでの時間)には、図9にて符号t1 ,t2 ,t3 ,t4 ,…に示すように、その都度ばらつきがあり、また、受信したデータの書き込みが終了するまでは次の1バイトデータDを受信することができないため、外部装置は、電子装置側にてデータの書き込みに要する最大時間tmaxよりも大きな時間間隔T(>tmax )で、1バイトデータDを送信する必要があった。
【0009】
しかしながら、通常、電子装置側にてデータの書き込みに要する時間は、図9にて符号t1 ,t2 ,t4 に例示するように、上記最大時間tmax (=t3 )よりも短い場合がほとんどであり、この結果、従来の電子装置では、データの受渡しに無駄な時間が生じてしまい、不揮発性メモリ内のデータを書き換えるのに要するトータル時間が長くなってしまっていた。
【0010】
本発明は、こうした問題に鑑みなされたものであり、不揮発性メモリ内のデータを、より速く書き換えることのできる電子装置を提供することを目的としている。
【0011】
【課題を解決するための手段、及び発明の効果】
上記目的を達成するためになされた請求項1に記載の電子装置は、電気的にデータの書き換えが可能な不揮発性メモリを備えており、通常時には、その不揮発性メモリに格納されたデータにより構成される制御プログラム及び制御データに従って動作するのであるが、外部からの書き換え指令を受けた場合には、前記不揮発性メモリ内のデータを外部装置から送信されて来る新たなデータに書き換える書換処理を行う。
【0012】
ここで特に、請求項1に記載の電子装置は、前記書換処理を行うための書換制御プログラムを前記外部装置から受信し、その受信した書換制御プログラムを書き換え対象でないメモリ領域に格納して実行することにより、前記不揮発性メモリ内のデータを前記外部装置から送信されて来る新たなデータに書き換えるよう構成されるものであって、前記電子装置は、動作モードが書換モードであると判断した後、前記外部装置との間で行われるデータ通信の通信速度が初期値に設定されている状態で、前記外部装置からのボーレート値要求を受けると、当該電子装置が対応可能な通信速度を表す信号を前記外部装置に送信し、当該通信速度を変更可能に構成されており、その後、設定された通信速度にて前記外部装置から送信されて来る前記書換制御プログラムを受信して前記書き換え対象でないメモリ領域に格納し、更に、該書換制御プログラムを受信し終えた後、前記外部装置との間で行うデータ通信の通信速度を、所定の変更命令を実行することで該変更命令に応じた前記書換制御プログラムを通信する際の通信速度より早く設定された値に変更可能に構成されている。
【0013】
そして、前記外部装置から送信されて来る書換制御プログラムには、前記書換処理を行うための命令群の前に、前記変更命令が配置されている。この請求項1に記載の電子装置によれば、動作モードが書換モードであると判断した後、外部装置から前記書換制御プログラムを、当該電子装置が対応可能な所定の通信速度に変更して送信できるものであり、この書換制御プログラムが、当該電子装置にて、書き換え対象でないメモリ領域に格納されれば、書換制御プログラムにて書換処理を行うための命令群の前に配置された変更命令が実行されることにより、外部装置との間で行うデータ通信の通信速度が、上記変更命令に応じた書換制御プログラムを通信する際の通信速度より早く設定された値に変更される。そして、この変更後の通信速度で、その後外部装置から送信されて来る新たなデータ(不揮発性メモリに書き込むべきデータ)の受信が行われる。
【0014】
このため、外部装置が書換制御プログラムを送信した後に新たなデータ(不揮発性メモリに書き込むべきデータ)を送信する時には、その新たなデータを、書換制御プログラムに配置した変更命令により設定される通信速度で送信することができ、この変更命令により設定される通信速度を、書換制御プログラムの通信を行う場合の通信速度よりも速く設定しておくことで、新たなデータをより速く電子装置側へ転送することができるようになる。
【0015】
このように請求項1に記載の電子装置によれば、外部装置との間で行うデータ通信の通信速度(詳しくは、不揮発性メモリに書き込むべき新たなデータの通信速度)を任意に高速化して、不揮発性メモリ内のデータを書き換えるのに要するトータル時間を短縮することが可能となる。
【0016】
尚、電気的にデータの書き換えが可能な不揮発性メモリとしては、EEPROM或いはフラッシュROMが一般的であるが、電気的に書き換え可能な他のROMでも良い。また、書換制御プログラムを格納する書き換え対象でないメモリ領域としては、RAMや書き換え可能なROMが挙げられる。
【0017】
次に、請求項2に記載の電子装置では、請求項1に記載の電子装置に対し、更に、前記書換制御プログラムには、前記変更命令の前に、該変更命令により設定される当該電子装置の通信速度を表す信号を前記外部装置に送信する送信命令が配置されており、当該電子装置は、前記送信命令を実行することで、前記外部装置に前記通信速度を表す信号を送信する。
【0018】
このような請求項2に記載の電子装置によれば、通信速度の変更命令が実行される前に、前記送信命令が実行されて、外部装置へ、その後に設定される当該電子装置の新たな通信速度を表す信号が、それまでの通信速度(即ち、書換制御プログラムの通信を行う場合の通信速度)と同じ通信速度で送信されることとなる。
【0019】
よって、外部装置は、上記信号を受信することで、当該電子装置側の新たな通信速度を知ることができ、この結果、請求項2に記載の電子装置によれば、外部装置との間の通信をより確実に行うことができるようになる。
つまり、請求項1に記載の電子装置では、書換制御プログラムに配置された変更命令によって設定される通信速度を、外部装置側で予め認識しておく必要があるが、請求項2に記載の電子装置によれば、外部装置は、当該電子装置からの信号によって変更後の通信速度を知ることができ、その変更後の通信速度に自動的に切り替えるように構成することが可能となるため、外部装置との間のデータ通信を、より確実に成立させることができるようになるのである。
【0020】
一方、請求項3に記載の電子装置も、電気的にデータの書き換えが可能な不揮発性メモリを備えており、外部からの書き換え指令を受けた場合には、その不揮発性メモリ内のデータを外部装置から送信されて来る新たなデータに書き換えるのであるが、前記不揮発性メモリ内のデータを新たなデータに書き換えるための手段として、データ取得手段、データ書込手段、書込状態判定手段、及び要求信号送信手段を備えている。
【0021】
即ち、データ取得手段が、外部装置から送信されて来る所定量のデータを受信して所定のバッファ領域に格納し、データ書込手段が、そのバッファ領域に格納されたデータを、前記不揮発性メモリに書き込み、書込状態判定手段が、データ書込手段により前記バッファ領域内のデータが不揮発性メモリに全て書き込まれたか否かを判定する。そして、この書込状態判定手段により肯定判定されると(つまり、バッファ領域内のデータが不揮発性メモリに全て書き込まれたと判定されると)、要求信号送信手段が、外部装置へ、不揮発性メモリに次に書き込むべき所定量のデータを要求するための要求信号を送信する。
【0022】
つまり、請求項3に記載の電子装置では、外部装置から送信されて来る所定量のデータを受信してバッファ領域に格納し、その格納したデータの不揮発性メモリへの書き込みが完了すると、外部装置へ、次に書き込むべき所定量のデータを要求するための要求信号を送信するようにしている。
【0023】
よって、外部装置は、不揮発性メモリに書き込むべき新たなデータを、最初に所定量だけ送信し、その後は、当該電子装置からの要求信号を受ける度に次の所定量のデータを送信する、といった手順で送信することができる。
このように、請求項3に記載の電子装置によれば、図9を用いて説明したように、外部装置が予め定められた時間間隔(電子装置側にてデータの書き込みに要する最大時間よりも大きな時間間隔)で新たなデータを順次送信する、といった送信方法を採る必要がなく、外部装置側の送信間隔を、当該電子装置側にてデータの書き込みに実際に要した時間に応じて最適に変化させることができるため、新たなデータを受渡しする時間に無駄が生じることがなく、この結果、不揮発性メモリ内のデータを短い時間で書き換えることができるようになる。
【0024】
尚、外部装置から受信する新たなデータの1単位であってバッファ領域に一度に格納するデータ量である上記所定量(換言すれば、バッファ領域のサイズ)は、不揮発性メモリに一度に書き込むことが可能なビット数に設定しても良いが、請求項に記載のように、前記所定量を、不揮発性メモリに一度に書き込むことが可能なデータのビット数を複数倍した値に設定し、データ書込手段が、バッファ領域から前記ビット数分のデータを順次取り出して、その取り出した各データ群を不揮発性メモリに順次書き込むようにすれば、より大きな効果を得ることができる。
【0025】
つまり、当該電子装置から外部装置へ要求信号を送信する回数を減らすことができ、その分、新たなデータを受渡しするのに必要な時間を短縮することができる。そして、この結果、不揮発性メモリ内のデータをより短い時間で書き換えることができるようになる。
【0026】
ここで更に、請求項に記載の電子装置では、前記データ取得手段、データ書込手段、書込状態判定手段、及び要求信号送信手段の機能を実現するための書換制御プログラムを外部装置から受信し、その書換制御プログラムを書き換え対象でないメモリ領域に格納して実行することにより、前記不揮発性メモリ内のデータを前記外部装置から送信されて来る新たなデータに書き換えるように構成されている。
【0027】
このため、上記各手段の機能を実現するための書換制御プログラムを実行して、不揮発性メモリ内のデータを外部装置から送信されて来る新たなデータに書き換える構成の場合に、その書換制御プログラムを予め内蔵しておく必要がなく、メモリの節約が可能となる。
【0028】
そして特に、請求項に記載の電子装置では、前記外部装置との間で行うデータ通信の通信速度を、所定の変更命令を実行することで該変更命令に応じた値に変更可能に構成されており、前記外部装置から送信されて来る書換制御プログラムには、データ取得手段、データ書込手段、書込状態判定手段、及び要求信号送信手段の機能を実現するための命令群の前に、前記変更命令が配置されている。
【0029】
このため、請求項1に記載の電子装置と同様に、動作モードが書換モードであると判断した後、外部装置から前記書換制御プログラムを当該電子装置が対応可能な所定の通信速度に変更して送信でき、この書換制御プログラムが、当該電子装置にて、書き換え対象でないメモリ領域に格納されれば、書換制御プログラムにて上記各手段の機能を実現するための命令群の前に配置された変更命令が実行されることにより、外部装置との間で行うデータ通信の通信速度が、上記変更命令に応じた書換制御プログラムを通信する際の通信速度より早く設定された値に変更される。そして、この変更後の通信速度により、少なくとも、その後外部装置から送信されて来る新たなデータの受信と、前記要求信号の外部装置への送信とが行われる。
【0030】
このような請求項3に記載の電子装置によれば、請求項1に記載の電子装置と同様に、外部装置から前記書換制御プログラムを当該電子装置が対応可能な所定の通信速度に変更して送信でき、さらに、外部装置との間で行うデータ通信の通信速度(詳しくは、新たなデータ及び要求信号の通信速度)を任意に変更することができるため、不揮発性メモリ内のデータを書き換えるのに要するトータル時間を、より一層短縮することができる。
【0031】
次に、請求項に記載の電子装置では、請求項に記載の電子装置に対し、更に、前記書換制御プログラムには、前記変更命令の前に、該変更命令により設定される当該電子装置の通信速度を表す信号を前記外部装置に送信する送信命令が配置されており、当該電子装置は、前記送信命令を実行することで、前記外部装置に前記通信速度を表す信号を送信する。
【0032】
この電子装置によれば、請求項2に記載の電子装置と同様に、通信速度の変更命令が実行される前に、前記送信命令が実行されて、外部装置へ、その後に設定される当該電子装置の新たな通信速度を表す信号が、それまでの通信速度(即ち、書換制御プログラムの通信を行う場合の通信速度)と同じ通信速度で送信されることとなる。よって、請求項2に記載の電子装置と同様の効果、即ち、外部装置は、当該電子装置からの信号によって変更後の通信速度を知ることができ、その変更後の通信速度に自動的に切り替えるように構成することが可能となるため、外部装置との間のデータ通信をより確実に成立させることができるようになる、という効果を得ることができる。
一方、請求項6の発明は、請求項1,2の電子装置において、前記新たなデータは、外部装置から所定量ずつパケット化されて送信されるようになっており、当該電子装置は、前記所定量のデータの前記不揮発性メモリへの書き込みを完了すると、外部装置へ、前記不揮発性メモリに次に書き込むべき所定量のデータを要求するための要求信号を送信すること、を特徴としている。
また、請求項の発明は、請求項1〜の電子装置において、当該電子装置は自動車用エンジン制御装置であることを特徴としている。
【0033】
【発明の実施の形態】
以下、本発明が適用された実施例について図面を用いて説明する。尚、本発明の実施の形態は、下記の実施例に何ら限定されることなく、本発明の技術的範囲に属する限り、種々の形態を採り得ることは言うまでもない。
【0034】
まず図1は、自動車に搭載されて内燃機関型エンジンの制御を行うエンジン制御装置(以下、ECUという)2と、ECU2に内蔵されたエンジン制御用のプログラムやデータを書き換える際、或いは新規に書き込む際にECU2に接続されるメモリ書換装置4とからなる、実施例の電子装置のメモリ書換システム5の全体構成を表すブロック図である。
【0035】
図1に示すように、ECU2は、エンジンの運転状態を検出する様々なセンサからの信号を入力して波形処理する入力回路6と、入力回路6からのセンサ信号に基づき、エンジンを制御するための様々な処理を実行するシングルチップマイクロコンピュータ(以下、マイコンという)8と、マイコン8からの制御信号に基づき、エンジンに取り付けられたインジェクタ(燃料噴射弁)やイグナイタ等のアクチュエータへ駆動信号を出力する出力回路10とを備えている。
【0036】
そして、マイコン8には、プログラムに従い動作する周知のCPU18と、CPU18を動作させるのに必要なプログラム及びデータを格納する不揮発性のROM20と、CPU18の演算結果等を一時格納するRAM22と、前記入力回路6等からの信号を受けると共に、出力回路10に制御信号を出力するためのI/O24と、メモリ書換装置4との間でシリアルデータ通信を行うための通信回路25とが備えられている。
【0037】
ここで、ROM20としては、電気的にデータの書き換え(詳しくは消去及び書き込み)が可能なフラッシュROM20aと、データの書き換えが不能なマスクROM20bとを備えている。
そして、フラッシュROM20aには、ECU2の製造工程において当該マイコン8がECU2へ実装された後に、エンジン制御用の制御プログラム及び制御データが新規に書き込まれ、また、マスクROM20bには、リセット直後に実行されるブートプログラムが、当該マイコン8のECU2への実装前に予め格納されている。尚、本実施例において、フラッシュROM20aには、アドレス1番地当りに1バイト(=8ビット)のデータが格納される。また、マスクROM20bに代えて、フラッシュROM20aと同様に電気的にデータの書き換えが可能な不揮発性メモリを用いても、データの書き換えが禁止されていれば良い。
【0038】
このようなECU2において、マイコン8(CPU18)は、リセット直後に、マスクROM20b内のブートプログラムを起動し、メモリ書換装置4が接続されていない通常時には、そのブートプログラムにてフラッシュROM20a内のエンジン制御プログラム(エンジン制御用の制御プログラム)をコールして、エンジンの制御を行う。
【0039】
また、マイコン8は、ブートプログラムを起動した際に、後述するように書換モードであると判定すると、フラッシュROM20a内の制御プログラムをコールすることなく、メモリ書換装置4から送信されて来る書換制御プログラムを受信してRAM22に格納し、その書換制御プログラムをコールしてRAM22上で実行することにより、フラッシュROM20a内に格納されている現在の制御プログラム及び制御データを、その後メモリ書換装置4から送信されて来る書込データ(新たな制御プログラム及び制御データを構成するデータ)に書き換える処理を行う。
【0040】
尚、フラッシュROM20aにエンジン制御用の制御プログラム及び制御データが未だ書き込まれていないECU2の製造時においても、フラッシュROM20aにエンジン制御用の制御プログラム及び制御データが新規に書き込まれるだけで全く同様である。よって、以下では、フラッシュROM20a内の制御プログラム及び制御データを書き換えるケースについて説明する。
【0041】
一方、メモリ書換装置4は、ECU2側のマイコン8にフラッシュROM20aの書き換えを行わせるための処理を実行するCPU,ROM,RAM等を内蔵したマイコン30と、このマイコン30からの指令に応じて、ECU2側のマイコン8へ、フラッシュROM20aのデータ書換時に必要な書換電圧(本実施例では12V)Vppを供給する電源回路32と、ECU2の動作モードを、エンジンの制御を行う通常モードからフラッシュROM20aのデータを書き換える(或いは新規に書き込む)書換モードに変更させるための書換スイッチSWとを備えている。
【0042】
そして更に、メモリ書換装置4は、ECU2へ送信する書換制御プログラム(詳しくは、書換制御プログラムを構成するプログラムコード及び書換制御プログラムの実行時に参照されるデータ)が格納された第1のROM34と、ECU2へ送信すべき書込データ(即ち、フラッシュROM20aに書き込むべき新たな制御プログラム及び制御データを構成するデータ)が格納された第2のROMと36と、作業者が当該メモリ書換装置4に様々な指示入力を行うための入力装置37とを備えている。尚、第1のROM34と第2のROM36は、夫々、周知のICソケット38,40によって、当該メモリ書換装置4に着脱可能に設けられている。
【0043】
このようなメモリ書換装置4とECU2との接続は、図1に示す如く、メモリ書換装置4側の雌コネクタ42FとECU2に設けられた雄コネクタ42Mとを嵌合することにより行われる。
即ち、上記両コネクタ42F,42Mが嵌合されると、通信線44を介して、メモリ書換装置4側のマイコン30とECU2側のマイコン8との間におけるシリアルデータ通信が可能となり、また、電源供給線46を介して、メモリ書換装置4側の電源回路32からECU2側のマイコン8へフラッシュROM20aのデータ書換時に必要な書換電圧Vppが供給される。そして更に、メモリ書換装置4側で書換スイッチSWを介して接地電位(0V)に接続される信号線48が、ECU2側で抵抗器Rにより5Vにプルアップされたモード判定用信号ラインLに接続され、これにより、メモリ書換装置4側で書換スイッチSWがONされると、ECU2側においては上記モード判定用信号ラインLがハイレベル(5V)からロウレベル(0V)に変化することとなる。そして、ECU2のマイコン8は、前述の如くブートプログラムを起動した際に、モード判定用信号ラインLがロウレベルであれば、書換モードと判定する。
【0044】
次に、メモリ書換装置4のマイコン30で実行される処理と、ECU2のマイコン8で実行される処理について、図2〜図5のフローチャートを用いて説明する。尚、図2及び図3は、メモリ書換装置4のマイコン30で実行される処理を表すフローチャートである。また、図4及び図5は、ECU2のマイコン8で実行される処理を表すフローチャートであり、そのステップ(以下、単に「S」と記す)300〜S350の処理が、マスクROM20b内のブートプログラムによって実行され、S400の処理が、フラッシュROM20a内のエンジン制御プログラムによって実行される。そして、S500〜S740の処理が、メモリ書換装置4から送信されてRAM22に格納される書換制御プログラムによって実行される。
【0045】
まず、メモリ書換装置4では、作業者によりECU2に接続されて書換スイッチSWがONされると、マイコン30が図2に示す処理を実行する。尚、本実施例において、メモリ書換装置4とECU2との間で行われるデータ通信の通信速度(以下、ボーレートともいう)は、最初は互いに9600bpsに設定されている。
【0046】
図2に示すように、メモリ書換装置4のマイコン30は、まず最初のS100にて、ECU2に対し該ECUが対応可能なボーレートの値を表す信号を要求するためのボーレート値要求を送信する。
そして、続くS110にて、ECU2からのデータを受信するまで待機し、データを受信すると、S120に進んで、その受信したデータが、ECU2が対応可能なボーレートの値を表す信号(以下、対応ボーレート値信号という)であるか否かを判定し、受信したデータが対応ボーレート値信号であれば、続くS130にて、当該メモリ書換装置4側のボーレートを、上記受信した対応ボーレート値信号の表す値に変更する。つまり、本実施例のECU2は、後述するように、当該メモリ書換装置4へ対応ボーレート値信号を送信した後、自己のボーレートを上記送信した対応ボーレート値信号の表す値に変更するため、当該メモリ書換装置4側でも、通信に用いるボーレートをECU2から受信した対応ボーレート値信号の表す値に変更して、その後の通信が成立するようにしている。
【0047】
そして、S130の処理を実行するか、或いは、前記S120にて、受信したデータが対応ボーレート値信号ではないと判定すると、S140に移行して、第1のROM34から書込制御プログラムを読み出し、その読み出した書換制御プログラムをECU2に送信する。尚、この書換制御プログラムの送信と、それ以降の通信は、S130の処理が実行されていれば(S120:YES)、S130で変更されたボーレートで行われ、S130の処理が実行されていなければ(S120:NO)、最初のS100と同じ9600bpsで行われる。
【0048】
このS140にて、書換制御プログラムの送信が全て終了すると、S150に進んで、ECU2から書換制御プログラムの受信が終了した旨を示す受信終了信号が送信されて来るのを待ち、その受信終了信号を受信すると、S160に進んで、S100の場合と同様に、ECU2へボーレート値要求を送信する。
【0049】
そして、続くS170にて、ECU2からのデータを受信するまで待機し、データを受信すると、続くS180にて、その受信したデータが対応ボーレート値信号であるか否かを判定する。そして、対応ボーレート値信号であれば、S190に進んで、当該メモリ書換装置4側のボーレートを、S170で受信した対応ボーレート値信号の表す値に変更する。つまり、S160〜S190では、前述したS100〜S130と全く同様の処理を行う。
【0050】
そして、S190の処理を実行するか、或いは、前記S180にて、受信したデータが対応ボーレート値信号ではないと判定すると、S200に移行して、書込データのパケット送信処理を実行し、その後、当該メモリ書換装置4側の処理を終了する。
【0051】
ここで、S200の書込データのパケット送信処理は、第2のROM36に格納された書込データをnバイトずつ読み出して、そのnバイトの書込データを図6に示す如くパケット化してECU2へ送信するものであり、図3に示す手順で実行される。尚、図6において、「HD」は、nバイトの書込データdata1,data2,…,datanに付される数バイトのヘッダであり、このヘッダHDには、当該送信データの転送先を示すコード等の通信制御用の情報が配置される。そして、「CS」は、通信誤りを検出するための1バイト或いは数バイトのチェックサム(検査用データ)である。また、このパケット送信処理におけるECU2との通信は、S190の処理が実行されていれば(S180:YES)、S190で変更されたボーレートで行われ、S190の処理が実行されていなければ(S180:NO)、S130で変更されたボーレート或いは最初のS100と同じ9600bpsで行われる。
【0052】
図3に示すように、書込データのパケット送信処理の実行が開始されると、まずS210にて、第2のROM36から書込データのうちの最初のnバイトを読み出し、そのnバイトの書込データに図6の如くヘッダHD及びチェックサムCSを付すことで1つのパケットを生成して、そのパケットをECU2へ送信する。
【0053】
そして、続くS220にて、ECU2から次のパケットを要求するための、要求信号としてのパケット要求が送信されて来るまで待機し、ECU2からのパケット要求を受信すると、S230に進んで、第2のROM36から書込データのうちの次のnバイトを読み出し、そのnバイトの書込データをS210の場合と同様にパケット化してECU2へ送信する。
【0054】
そして、続くS240にて、第2のROM36に格納された全ての書込データを送信し終えたか否かを判定し、全データを未だ送信していなければ、S220及びS230の処理を繰り返す。また、S240にて、全データの送信が終了したと判定した場合には、このパケット送信処理から図2の処理へ戻り、その後、当該メモリ書換装置4側の処理を終える。
【0055】
一方、次にECU2では、電源が投入されると、マイコン8がリセット状態から動作を開始して、図4に示す処理を実行する。
即ち、最初に、マスクROM20bに格納されたブートプログラムを起動して、まずS300にて、書換モードであるか否かを、モード判定用信号ラインLがロウレベルであるか否かによって判定する。そして、モード判定用信号ラインLがロウレベルでなければ(S300:NO)、書換モードではない通常モードであると判断して、エンジン制御プログラムへジャンプする。
【0056】
すると、フラッシュROM20aに格納されている制御プログラムが起動され、その後は、S400に示すように、エンジン制御用の制御データを参照して行われるエンジン制御処理が実行される。尚、このエンジン制御処理は、入力回路6からの各種センサ信号とフラッシュROM20aに格納された制御データとに基づき、エンジンに対する最適な燃料噴射量や点火時期等を演算し、その演算結果に応じて、インジェクタやイグナイタ等のアクチュエータを駆動するための制御信号を出力回路10に出力する、といった手順で繰り返し実行される。
【0057】
これに対し、ブートプログラムにおいて、上記S300で書換モードであると判断した場合、即ち、当該ECU2にメモリ書換装置4が接続されて書換スイッチSWがONされることにより、モード判定用信号ラインLがロウレベルであった場合には、S310に移行する。
【0058】
そして、このS310にて、前述した図2のS100でメモリ書換装置4から送信されて来るボーレート値要求を受信するまで待機し、ボーレート値要求を受信すると、S320に進んで、次のS330で変更・設定される自己のボーレートを表す信号(対応ボーレート値信号)を、メモリ書換装置4に送信し、続くS330で、自己のボーレートを上記送信した対応ボーレート値信号の表す値に変更する。
【0059】
すると、前述した図2のS140でメモリ書換装置4から書換制御プログラムが上記変更後のボーレートで送信されて来るため、続くS340にて、その書換制御プログラムを受信して、RAM22の所定領域に順次格納する。尚、この書換制御プログラムの受信と、それ以降の通信は、S330で変更されたボーレートで行われる。
【0060】
そして、このS340で書換制御プログラムのRAM22への格納が全て終了すると、続くS350にて、S340でRAM22に格納した書込制御プログラムへジャンプする。
これにより、メモリ書換装置4から送信されて来た書込制御プログラムがRAM22上で実行されて、S500〜S540(更には、図5のS550〜S740)の処理が行われる。
【0061】
即ち、まずS500にて、メモリ書換装置4へ、書換制御プログラムの受信が終了した旨を示す受信終了信号を送信し、続くS510にて、前述した図2のS160でメモリ書換装置4から送信されて来るボーレート値要求を受信するまで待機する。そして、ボーレート値要求を受信すると、S520に進んで、次のS530で変更・設定される自己のボーレートを表す対応ボーレート値信号を、メモリ書換装置4に送信し、続くS530で、自己のボーレートを上記送信した対応ボーレート値信号の表す値に変更する。
【0062】
すると、前述した図2のS200でメモリ書換装置4からパケット化された書込データが上記変更後のボーレートで送信されて来るため、続くS540にて、フラッシュROM20a内のデータをメモリ書換装置4から送信されて来る書込データに書き換えるためのデータ書換処理を実行し、その後、当該ECU2側の処理を終了する。
【0063】
ここで、S540のデータ書換処理は、図5に示す手順で実行される。尚、このデータ書換処理におけるメモリ書換装置4との通信は、S530で変更されたボーレートで行われる。
即ち、図5に示すように、データ書換処理の実行が開始されると、まずS550にて、フラッシュROM20aにおけるデータの書込先(書込アドレス)をカウントするためのアドレスカウンタに、フラッシュROM20aにて新たなデータの書き込みを開始すべき先頭アドレスの値をセットし、続くS560にて、1パケット分(即ち、nバイト)の書込データに対する処理が終了したか否かを判定するためのパケットカウンタをリセットする。
【0064】
そして、続くS570にて、前述した図3のパケット送信処理でメモリ書換装置4から送信されて来るシリアルデータを1バイト分受信し、続くS580にて、受信状態が正常であるか否かを判定する。そして、正常受信の場合には、S590に進み、S570で受信した1バイトのデータがフラッシュROM20aに書き込むべき書込データであれば(換言すれば、ヘッダHD及びチェックサムCS以外のデータであれば)、その1バイトの書込データをRAM22の所定領域に設定されたnバイト分のバッファ領域に先頭から順に格納し、続くS600にて、上記S560でリセットしておいたパケットカウンタをインクリメントする。
【0065】
そして、続くS610にて、パケットカウンタの値が「n」に達したか否かにより、1パケット分(nバイト)の書込データを受信してRAM22のバッファ領域に格納できたか否かを判定し、1パケット分の受信及び格納が未だ終了していない場合には、S570〜S600の処理を繰り返す。
【0066】
一方、S610にて、パケットカウンタの値が「n」に達したと判定した場合には、1パケット分の書込データを受信してバッファ領域に格納することができたことから、S620に進んで、パケットカウンタをリセットする。
そして、続くS630にて、バッファ領域の先頭から順に書込データを1バイト分だけ取り出し、続くS640にて、フラッシュROM20aに対する1バイト分のデータ書込操作を何回行ったかをカウントするための書込パルス数カウンタをリセットする。
【0067】
そして、続くS650にて、アドレスカウンタの現在値を書込アドレスとしてセットすると共に、S630でバッファ領域から取り出した1バイト分の書込データを、フラッシュROM20aに今回書き込む1バイトデータとしてセットし、続くS660にて、S650でセットした書込アドレスにより指定されるフラッシュROM20aのセルに対し、書込パルスを与える。
すると、S650でセットした1バイトデータが、同じくS650でセットした書込アドレスの領域に書き込まれることとなるが、書込パルスを1度与えただけではデータが正確に書き込めない可能性があるため、続くS670にて、S630でバッファ領域から今回取り出した書込データと、フラッシュROM20aに実際に書き込まれている1バイトデータとを比較する、所謂ベリファイチェックを行う。
【0068】
そして、S670のベリファイチェックにより、上記両データが一致していなければ(S670:NO)、S680に移行して、書込パルス数カウンタをインクリメントする。そして、続くS690にて、書込パルス数カウンタの値が所定値(本実施例では「10」)に達しているか否を判定し、所定値に達していなければ、S660に戻って、再度、フラッシュROM20aに書込パルスを与えることにより、S630でバッファ領域から今回取り出した書込データについて、データ書込操作を再び行う。
【0069】
また、S690にて、書込パルス数カウンタの値が所定値に達していると判定した場合には、同じ1バイトデータについてS660のデータ書込操作を所定回数だけ行ったにも拘らず、そのデータを正確に書き込めなかったということから、何等かの異常があると判断して、S700に進む。そして、このS700にて、所定のエラー処理を行った後、当該データ書換処理から図4の処理に戻り、その後、ECU2側の処理を終える。尚、S580にて、受信状態が正常でないと判定した場合にも、上記S700のエラー処理を行った後、図4の処理に戻って、その後、ECU2側の処理を終える。
【0070】
一方、S670のベリファイチェックにより、上記両データが一致していたならば(S670:YES)、S710に移行して、アドレスカウンタとパケットカウンタとを夫々インクリメントし、続くS720にて、パケットカウンタの値が「n」に達しているか否かにより、1パケット分の書込データをフラッシュROM20aに書き込めたか否か(1パケット分の書き込みが終了したか否か)を判定する。そして、1パケット分の書き込みが終了していなければ、前述したS630〜S710の処理を繰り返し、このような処理の繰り返しにより、1パケット分の書き込みが終了した場合には、S730に進む。
【0071】
そして、このS730にて、アドレスカウンタの値がフラッシュROM20aにて新たなデータの書き込みを終了すべき最終アドレスの値に達したか否かにより、全アドレス(換言すれば全データ)の書き込みが終了したか否かを判定し、全アドレスの書き込みが終了していなければ、続くS740に進んで、メモリ書換装置へ次のパケットを要求するためのパケット要求を送信する。
【0072】
すると、前述した図3の処理によりメモリ書換装置4から次のパケットが送信されて来るため、当該データ書換処理では、前述したS560〜S740の処理を繰り返す。そして、S730にて、全アドレスの書き込みが終了したと判定した場合には、当該データ書換処理から図4の処理に戻って、ECU2側の処理を終える。
【0073】
尚、本実施例では、S560〜S610が、データ取得手段としての機能を実現する処理に相当し、S550,S620〜S720が、データ書込手段としての機能を実現する処理に相当している。そして、S720の判定が、書込状態判定手段としての機能を実現する処理に相当し、S740が、要求信号送信手段としての機能を実現する処理に相当している。
【0074】
つまり、本実施例のECU2で実行される図5のデータ書換処理では、メモリ書換装置4からパケット化されて送信されて来るnバイトの書込データを受信してRAM22のバッファ領域に格納し(S560〜S610)、そのバッファ領域に格納されたnバイトの書込データを、1バイトずつ順次取り出してフラッシュROM20aに書き込むようにしており(S620〜S720)、バッファ領域内の書込データがフラッシュROM20aに全て書き込まれると(S720:YES)、メモリ書換装置4へ、次に書き込むべきnバイトの書込データを要求するためのパケット要求を送信するようにしている(S740)。
【0075】
このため、メモリ書換装置4は、図3のパケット送信処理を実行することで、第2のROM36に格納された書込データをnバイトずつパケット化してECU2へ送信するようにしており、詳しくは図7に示すように、最初のパケットPを送信した後は、当該ECU2からのパケット要求Yを受信する度に次のパケットPを送信する、といった手順で書込データをnバイトずつ送信するようにしている。尚、図7において、左から右方向の矢印「→」は、メモリ書換装置4からECU2へのパケットPの送信を示しており、右から左方向の矢印「←」は、ECU2からメモリ書換装置4へのパケット要求Yの送信を示している。
【0076】
従って、このようなECU2を備えたメモリ書換システム5によれば、従来技術のように、メモリ書換装置4が予め定められた時間間隔(即ち、ECU2側にて受信したデータを書き込むのに要する最大時間よりも大きな時間間隔)で新たな書込データを順次送信する、といった送信方法を採る必要がなく、図7に例示するように、メモリ書換装置4側の送信間隔を、当該ECU2側にてデータの書き込みに実際に要した時間ta ,tb ,tc ,td ,…に応じて最適に変化させることができるため、書込データを受渡しする時間に無駄が生じることがなく、この結果、フラッシュROM20a内のデータを短い時間で書き換えることができる。
【0077】
また、本実施例のECU2においては、メモリ書換装置4から送信される書込データの1単位であってRAM22のバッファ領域に一度に格納するデータ量(換言すれば、バッファ領域のサイズ)を、フラッシュROM20aに一度に書き込むことが可能なデータのビット数(本実施例では1バイト)をn倍した値に設定しており、バッファ領域から1バイト分のデータを順次取り出して、フラッシュROM20aに書き込むようにしている。
【0078】
従って、当該ECU2からメモリ書換装置4へパケット要求を送信する回数を減らして、その分、書換データを受渡しするのに必要な時間を短縮することができ、延いては、フラッシュROM20a内のデータをより短い時間で書き換えることが可能となる。つまり、メモリ書換装置4から書換データを1バイトずつ送信するようにしても良いが、この場合には、ECU2からメモリ書換装置4へのパケット要求の送信回数が多くなり、その分だけ不利である。これに対して、本実施例のようにすれば、より大きな効果を得ることができるのである。
【0079】
ところで、通常、本実施例の如きECU2では、実装面積やコスト等の面からRAM22の容量に制限があり、受信した書込データを格納しておくバッファ領域のサイズ(以下、バッファサイズという)にも自ずと限界が生じる。よって、ECU2からメモリ書換装置4へのパケット要求の送信回数を減らすためとは言え、バッファサイズを際限なく大きな設定することはできない。
【0080】
ここで、本実施例のECU2について、バッファサイズ(即ち、メモリ書換装置4から送信する1パケット内に配置される書込データのデータ量)と、送信時間(即ち、メモリ書換装置4からECU2へ全ての書込データを送信し終えるまでの時間であり、延いては、フラッシュROM20aの書き換えに要するトータル時間)との関係を調べてみると、図8に示すように、通信速度(ボーレート)が低い場合には、バッファサイズを大きくするほど、送信時間を短縮できる効果が大きいが、通信速度が高くなってくると、バッファサイズをそれほど大きくしなくても、大きな効果を得ることができる。
【0081】
尚、図8(a)は、メモリ書換装置4からECU2へ合計96kバイトの書込データを送信する場合の、送信時間(書換時間)の計算値であり、単位は「秒」である。また、ECU2側にて受信したデータを書き込むのに要する時間は、80μsとして見積っている。そして、図8(b)は、図8(a)の計算値をグラフ化したものである。
【0082】
従って、このような観点から、バッファサイズと通信速度とを、許される範囲内において最適な値に設定することにより、最小の資源で最大の効果を得ることができる。例えば、本実施例では、バッファサイズを128バイトに設定するとすると共に、通信速度を38.4kbpsに設定しており、96kバイト分のデータ送信時間を27.2秒までに短縮している。
【0083】
一方、本実施例のECU2では、フラッシュROM20a内のデータをメモリ書換装置4から送信されて来る新たなデータに書き換える処理を行うための書換制御プログラムを、メモリ書換装置4から受信し、その書換制御プログラムを書き換え対象でないRAM22に格納して実行することにより、フラッシュROM20aの書き換えを行うようにしている。よって、書換制御プログラムを予め内蔵しておく必要がなく、メモリ容量を大幅に節約することができる。
【0084】
一方更に、本実施例のECU2は、メモリ書換装置4との間で行うデータ通信のボーレートを、所定の変更命令(図4のS330,S530)を実行することで該変更命令に応じた値に変更可能に構成されている。そして、メモリ書換装置4から送信されて来る書換制御プログラムには、図4のS530に示されるように、フラッシュROM20a内のデータをメモリ書換装置4から送信されて来る新たなデータに書き換えるデータ書換処理(図5)を行うための命令群の前に、ボーレートを変更するための変更命令が配置されている。
【0085】
よって、本実施例のECU2によれば、メモリ書換装置4から書換制御プログラムを所定のボーレートで送信し、この書換制御プログラムがRAM22に格納されれば、書換制御プログラムにてデータ書換処理を行うための命令群の前に配置された変更命令(S530)が実行されることにより、メモリ書換装置4との間で行うデータ通信のボーレートが、上記変更命令に応じた値に変更される。そして、この変更後のボーレートにより、その後メモリ書換装置4から送信されて来る書込データ(パケット)の受信と、ポケット要求のメモリ書換装置4への送信とが行われる。
【0086】
このため、メモリ書換装置4が書換制御プログラムを送信した後に、書込データをパケット化して送信する時には、そのパケット化したデータを、書換制御プログラムに配置した変更命令により設定されるボーレートで送信することができ、この変更命令により設定されるボーレートを、書換制御プログラムの通信を行う場合のボーレートよりも速く設定しておくことで、書込データをより速くECU2側へ転送することができるようになる。
【0087】
このように本実施例のECU2によれば、メモリ書換装置4との間で行うデータ通信のボーレートを任意に高速化することができ、フラッシュROM20a内のデータを書き換えるのに要するトータル時間を、より一層短縮することが可能となる。
【0088】
そして更に、本実施例のECU2において、メモリ書換装置4から送信されて来る書換制御プログラムには、図4のS520に示されるように、S530の変更命令の前に、該変更命令により設定される当該ECU2のボーレートを表す信号(対応ボーレート値信号)をメモリ書換装置4に送信する送信命令が配置されており、当該ECU2は、その送信命令を実行することで、メモリ書換装置4に対応ボーレート値信号を送信するようにしている。
【0089】
よって、当該ECU2にてボーレートの変更が行われる前に、メモリ書換装置4へ、その後に設定される新たなボーレートを表す対応ボーレート値信号が、それまでのボーレート(即ち、書換制御プログラムの通信を行う場合のボーレート)で送信されることとなり、メモリ書換装置4は、図2のS180及びS190に示したように、当該ECU2からの対応ボーレート値信号に応じて、自己のボーレートを自動的に切り替えることができる。従って、このような本実施例のECU2によれば、メモリ書換装置4との間のデータ通信を確実に成立させることができるようになる。
【0090】
尚、本実施例のECU2では、図4に示したように、ブートプログラムのS310〜S330においても、書込制御プログラムのS510〜S530と全く同様のボーレート変更のための処理を行っており、これに対応して、メモリ書換装置4では、図2に示したように、S100〜S130においても、S160〜S190と全く同様の処理を行っている。そして、これにより、メモリ書換装置4からECU2へ書換制御プログラムを転送する際のボーレートをも、変更可能にしているのであるが、図4におけるS310〜S330の処理と、図2におけるS100〜S130の処理とを省略して、書換制御プログラムを通信初期のボーレートである9600bpsで転送するようにしても良い。
【0091】
また、本実施例のECU2は、電気的にデータの書き込みが可能な不揮発性メモリとして、フラッシュROM20aを備えたものであったが、EEPROMを用いても良いし、少なくとも1つ以上の書き込み領域を持つPROM(例えばワンタイムPROM)を用いても良い。
【図面の簡単な説明】
【図1】 実施例の電子装置のメモリ書換システムの全体構成を表すブロック図である。
【図2】 実施例のメモリ書換装置側で実行される処理を表すフローチャートである。
【図3】 図2の処理中で実行される書込データのパケット送信処理を表すフローチャートである。
【図4】 実施例のエンジン制御装置(ECU)側で実行される処理を表すフローチャートである。
【図5】 図4の処理中で実行されるデータ書換処理を表すフローチャートである。
【図6】 メモリ書換装置から送信されるデータのフォーマットを説明する説明図である。
【図7】 実施例の作用を説明する説明図である。
【図8】 実施例のメモリ書換システムによるデータの送信時間(書換時間)を説明する説明図である。
【図9】 従来技術の問題点を説明する説明図である。
【符号の説明】
2…エンジン制御装置(ECU) 4…メモリ書換装置
5…メモリ書換システム 6…入力回路
8,30…シングルチップマイクロコンピュータ(マイコン)
10…出力回路 18…CPU 20…ROM
20a…フラッシュROM 20b…マスクROM
22…RAM 24…I/O 25…通信回路 32…電源回路
34…第1のROM 36…第2のROM 37…入力装置
38,40…ICソケット 42F…雌コネクタ 42M…雄コネクタ
44…通信線 46…電源供給線 48…信号線
SW…書換スイッチ L…モード判定用信号ライン R…抵抗器
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for rewriting a control program and control data stored in a nonvolatile memory capable of electrically rewriting data while the nonvolatile memory is mounted on an electronic device.
[0002]
[Prior art]
Conventionally, as disclosed in, for example, Japanese Patent Laid-Open No. 4-114289, as a storage medium for storing a control program and control data, an electrically rewritable EEPROM or a flash EEPROM (hereinafter referred to as a data storage medium) There has been proposed an electronic device that includes a non-volatile memory such as a flash ROM and is configured such that a control program and control data can be rewritten in a state in which the non-volatile memory is assembled (mounted state). Also, according to such an electronic device, in the manufacturing process, a control program or the like can be newly written after the nonvolatile memory is mounted on the device.
[0003]
That is, in this type of electronic device, when a separately prepared external device is connected and a predetermined command is received from this external device, the control program and control data transmitted from the external device as serial data are received. The received data is sequentially written into the nonvolatile memory.
[0004]
[Problems to be solved by the invention]
By the way, in such an electronic device, the higher the communication speed of data communication performed with an external device, the shorter the time required for communication, and accordingly, the total time required for rewriting data in the nonvolatile memory. Can be shortened.
[0005]
However, in the above-described conventional electronic device, a program and hardware for performing a series of processes such as receiving data from an external device and writing it in a nonvolatile memory cannot be easily changed after being supplied to the market. As a result, it has not been possible to adopt a method of reducing the time required to rewrite data in the nonvolatile memory by changing the communication speed with the external device.
[0006]
On the other hand, conventionally, in this type of electronic device, when data from the external device is received for the number of bits that can be written to the nonvolatile memory at a time (for example, 1 byte, which will be described as 1 byte hereinafter), The received 1-byte data is written to the nonvolatile memory according to the following procedure. That is, after the received data is written to the non-volatile memory, a verify check is performed to determine whether or not the data has been normally written. repeat. Then, if the received data can be written normally, it waits for the next 1-byte data to be transmitted from the external device.
[0007]
For this reason, the external device connected to the conventional electronic device sequentially transmits 1-byte data D at a predetermined time interval T as illustrated in FIG. (Transmission interval) T is set larger than the maximum time tmax required for data writing on the electronic device side. In FIG. 9, an arrow “→” from left to right indicates transmission of 1-byte data D from the external device to the electronic device.
[0008]
That is, in this type of electronic apparatus, the time required for writing the received data (the time until it is determined that the data can be normally written by the verify check) is indicated by reference numerals t1, t2, t3, t4,. As described above, there is a variation each time, and since the next 1-byte data D cannot be received until the received data is completely written, the external device has a maximum required for writing data on the electronic device side. It was necessary to transmit 1-byte data D at a time interval T (> tmax) larger than the time tmax.
[0009]
However, in general, the time required for writing data on the electronic device side is almost shorter than the maximum time tmax (= t3), as illustrated by reference numerals t1, t2, and t4 in FIG. As a result, in the conventional electronic device, data is wasted and time is wasted, and the total time required to rewrite data in the nonvolatile memory has been increased.
[0010]
The present invention has been made in view of these problems, and an object thereof is to provide an electronic device that can rewrite data in a nonvolatile memory more quickly.
[0011]
[Means for solving the problems and effects of the invention]
The electronic device according to claim 1, which has been made to achieve the above object, includes a nonvolatile memory capable of electrically rewriting data, and normally includes data stored in the nonvolatile memory. In response to an external rewrite command, a rewrite process is performed to rewrite the data in the nonvolatile memory with new data transmitted from an external device. .
[0012]
Particularly, the electronic device according to claim 1 receives a rewrite control program for performing the rewrite processing from the external device, and stores the received rewrite control program in a memory area that is not a rewrite target and executes the rewrite control program. Thus, the data in the nonvolatile memory is rewritten with new data transmitted from the external device. After the electronic device determines that the operation mode is the rewrite mode, the electronic device is in a state in which the communication speed of data communication performed with the external device is set to an initial value. Upon receiving a baud rate value request from the external device, the electronic device is configured to transmit a signal indicating a communication speed that can be handled by the electronic device to the external device so that the communication speed can be changed. After receiving the rewrite control program transmitted from the external device at the communication speed and storing it in the memory area that is not the rewrite target, and after receiving the rewrite control program, The communication speed of data communication performed with the external device can be changed to a value set earlier than the communication speed when communicating the rewrite control program according to the change command by executing a predetermined change command. It is configured.
[0013]
In the rewrite control program transmitted from the external device, the change instruction is arranged before the instruction group for performing the rewrite process. According to the electronic device according to claim 1, After determining that the operation mode is the rewrite mode, The rewrite control program from an external device, The electronic device can be changed to a predetermined communication speed that can be transmitted and transmitted. If this rewrite control program is stored in a memory area that is not a rewrite target in the electronic device, a change instruction arranged before the instruction group for performing rewrite processing by the rewrite control program is executed. The communication speed of the data communication performed with the external device is changed to a value set earlier than the communication speed when communicating the rewrite control program according to the change command. Then, new data (data to be written to the nonvolatile memory) transmitted from the external device is received at the communication speed after the change.
[0014]
Therefore, when new data (data to be written to the nonvolatile memory) is transmitted after the external device transmits the rewrite control program, the communication speed set by the change command arranged in the rewrite control program By setting the communication speed set by this change command faster than the communication speed for rewrite control program communication, new data is transferred to the electronic device faster. Will be able to.
[0015]
As described above, according to the electronic device of the first aspect, the communication speed of data communication performed with the external device (specifically, the communication speed of new data to be written in the nonvolatile memory) is arbitrarily increased. Thus, it is possible to reduce the total time required for rewriting data in the nonvolatile memory.
[0016]
Note that an EEPROM or a flash ROM is generally used as an electrically rewritable nonvolatile memory, but another electrically rewritable ROM may be used. In addition, examples of the memory area that stores the rewrite control program and is not a rewrite target include a RAM and a rewritable ROM.
[0017]
Next, in the electronic device according to claim 2, in addition to the electronic device according to claim 1, the rewrite control program further includes the electronic device set by the change command before the change command. A transmission command for transmitting a signal representing the communication speed to the external device is arranged, and the electronic device transmits the signal representing the communication speed to the external device by executing the transmission command.
[0018]
According to the electronic device according to claim 2, before the transmission speed change command is executed, the transmission command is executed, and the new setting of the electronic device set thereafter is sent to the external device. The signal representing the communication speed is transmitted at the same communication speed as the communication speed up to that point (that is, the communication speed when communication of the rewrite control program is performed).
[0019]
Therefore, the external device can know the new communication speed on the electronic device side by receiving the signal. As a result, according to the electronic device according to claim 2, the external device can communicate with the external device. Communication can be performed more reliably.
In other words, in the electronic device according to claim 1, the communication speed set by the change command arranged in the rewrite control program needs to be recognized in advance on the external device side. According to the device, the external device can know the communication speed after the change by a signal from the electronic device and can be configured to automatically switch to the communication speed after the change. Data communication with the apparatus can be established more reliably.
[0020]
On the other hand, the electronic device according to claim 3 also includes a non-volatile memory capable of electrically rewriting data. When an external rewrite command is received, the data in the non-volatile memory is transferred to the external device. The data is rewritten to new data transmitted from the apparatus, and as means for rewriting the data in the nonvolatile memory with new data, data acquisition means, data writing means, writing state determination means, and request A signal transmission means is provided.
[0021]
That is, the data acquisition means receives a predetermined amount of data transmitted from the external device and stores it in a predetermined buffer area, and the data writing means stores the data stored in the buffer area in the nonvolatile memory. The write state determination unit determines whether all the data in the buffer area has been written to the nonvolatile memory by the data writing unit. When the writing state determination means makes an affirmative determination (that is, when it is determined that all the data in the buffer area has been written to the nonvolatile memory), the request signal transmission means sends the request to the external device to the nonvolatile memory. A request signal for requesting a predetermined amount of data to be written next is transmitted.
[0022]
That is, in the electronic device according to claim 3, when the predetermined amount of data transmitted from the external device is received and stored in the buffer area, and the writing of the stored data to the nonvolatile memory is completed, A request signal for requesting a predetermined amount of data to be written next is transmitted.
[0023]
Therefore, the external device first transmits new data to be written to the nonvolatile memory by a predetermined amount, and then transmits the next predetermined amount of data every time a request signal is received from the electronic device. It can be sent in the procedure.
Thus, according to the electronic device of the third aspect, as described with reference to FIG. 9, the external device has a predetermined time interval (more than the maximum time required for data writing on the electronic device side). It is not necessary to adopt a transmission method such as sequentially transmitting new data at a large time interval), and the transmission interval on the external device side is optimized according to the time actually required for data writing on the electronic device side. Since it can be changed, there is no waste in the time for delivering new data, and as a result, the data in the nonvolatile memory can be rewritten in a short time.
[0024]
still, The above predetermined amount (in other words, the size of the buffer area), which is a unit of new data received from the external device and stored in the buffer area at one time, can be written to the nonvolatile memory at one time. Can be set to any number of bits. 5 The predetermined amount is set to a value obtained by multiplying the number of bits of data that can be written to the nonvolatile memory at a plurality of times, and the data writing means stores data for the number of bits from the buffer area. If the data is sequentially extracted and the extracted data groups are sequentially written in the nonvolatile memory, a greater effect can be obtained.
[0025]
That is This The number of times that the request signal is transmitted from the electronic device to the external device can be reduced, and accordingly, the time required to deliver new data can be shortened. As a result, the data in the nonvolatile memory can be rewritten in a shorter time.
[0026]
Here And claims 3 In the electronic device described in ,in front Rewrite control program for realizing the functions of the data acquisition means, data write means, write state determination means, and request signal transmission means is received from an external device, and the rewrite control program is stored in a memory area that is not subject to rewrite. When executed, the data in the nonvolatile memory is rewritten with new data transmitted from the external device.
[0027]
this For, When the rewrite control program for realizing the function of each of the above means is executed and the data in the nonvolatile memory is rewritten with new data transmitted from the external device, the rewrite control program is built in in advance. This saves memory.
[0028]
And in particular, Claim 3 In the electronic device described in ,in front The communication speed of data communication performed with the external device can be changed to a value corresponding to the change command by executing a predetermined change command. And The rewrite control program transmitted from the external device includes the change command before the command group for realizing the functions of the data acquisition unit, the data write unit, the write state determination unit, and the request signal transmission unit. Is arranged.
[0029]
For this reason, like the electronic device according to claim 1, After determining that the operation mode is the rewrite mode, The rewrite control program from an external device The transmission can be changed to a predetermined communication speed that the electronic device can handle. If the rewrite control program is stored in a memory area that is not a rewrite target in the electronic device, a change instruction arranged before the instruction group for realizing the function of each means in the rewrite control program is As a result, the communication speed of the data communication performed with the external device is changed to a value set earlier than the communication speed when the rewrite control program corresponding to the change command is communicated. Then, at least the reception of new data transmitted from the external device thereafter and the transmission of the request signal to the external device are performed at the communication speed after the change.
[0030]
According to such an electronic device according to claim 3, similarly to the electronic device according to claim 1, The rewrite control program can be transmitted from an external device at a predetermined communication speed that can be supported by the electronic device, and Since the communication speed of data communication with external devices (specifically, the communication speed of new data and request signals) can be changed arbitrarily, the total time required to rewrite data in the nonvolatile memory can be reduced. , It can be further shortened.
[0031]
Next, the claim 4 An electronic device according to claim 3 The rewrite control program further includes a transmission command for transmitting a signal representing a communication speed of the electronic device set by the change command to the external device before the change command. The electronic device transmits a signal representing the communication speed to the external device by executing the transmission command.
[0032]
According to this electronic device, similarly to the electronic device according to claim 2, the transmission command is executed before the communication speed change command is executed, and the electronic device set thereafter is sent to the external device. A signal representing the new communication speed of the apparatus is transmitted at the same communication speed as the previous communication speed (that is, the communication speed when communication of the rewrite control program is performed). Therefore, the same effect as that of the electronic device according to claim 2, that is, the external device can know the changed communication speed by the signal from the electronic device, and automatically switches to the changed communication speed. Therefore, it is possible to obtain an effect that data communication with an external device can be established more reliably.
On the other hand, according to a sixth aspect of the present invention, in the electronic device according to the first or second aspect, the new data is packetized and transmitted by a predetermined amount from an external device. When the writing of a predetermined amount of data to the nonvolatile memory is completed, a request signal for requesting a predetermined amount of data to be written next to the nonvolatile memory is transmitted to the external device.
Claims 7 The invention of claim 1 to claim 1 6 The electronic device is an automobile engine control device.
[0033]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments to which the present invention is applied will be described below with reference to the drawings. Needless to say, the embodiments of the present invention are not limited to the following examples, and can take various forms as long as they belong to the technical scope of the present invention.
[0034]
First, FIG. 1 shows an engine control device (hereinafter referred to as ECU) 2 that is mounted on an automobile and controls an internal combustion engine, and an engine control program and data built in the ECU 2 when it is rewritten or newly written. It is a block diagram showing the whole structure of the memory rewriting system 5 of the electronic device of an Example which consists of the memory rewriting apparatus 4 connected to ECU2 in the meantime.
[0035]
As shown in FIG. 1, the ECU 2 controls the engine based on an input circuit 6 that receives signals from various sensors that detect the operating state of the engine and performs waveform processing, and a sensor signal from the input circuit 6. A single-chip microcomputer (hereinafter referred to as a microcomputer) 8 that executes various processes of the above, and a drive signal is output to an actuator such as an injector (fuel injection valve) or an igniter attached to the engine based on a control signal from the microcomputer 8 The output circuit 10 is provided.
[0036]
The microcomputer 8 includes a well-known CPU 18 that operates according to a program, a non-volatile ROM 20 that stores programs and data necessary for operating the CPU 18, a RAM 22 that temporarily stores calculation results of the CPU 18, and the input. An I / O 24 for receiving a signal from the circuit 6 and the like and outputting a control signal to the output circuit 10 and a communication circuit 25 for performing serial data communication with the memory rewriting device 4 are provided. .
[0037]
The ROM 20 includes a flash ROM 20a that can electrically rewrite data (specifically, erasing and writing) and a mask ROM 20b that cannot rewrite data.
Then, after the microcomputer 8 is mounted on the ECU 2 in the manufacturing process of the ECU 2, a control program and control data for engine control are newly written in the flash ROM 20a, and the mask ROM 20b is executed immediately after the reset. The boot program is stored in advance before the microcomputer 8 is mounted on the ECU 2. In the present embodiment, the flash ROM 20a stores 1 byte (= 8 bits) of data per address. Further, in place of the mask ROM 20b, even if a non-volatile memory capable of electrically rewriting data is used in the same manner as the flash ROM 20a, it is sufficient that data rewriting is prohibited.
[0038]
In such an ECU 2, the microcomputer 8 (CPU 18) starts the boot program in the mask ROM 20b immediately after resetting, and controls the engine in the flash ROM 20a with the boot program at normal times when the memory rewriting device 4 is not connected. Call a program (control program for engine control) to control the engine.
[0039]
Further, when the microcomputer 8 determines that it is in the rewrite mode as described later when the boot program is started, the rewrite control program transmitted from the memory rewrite device 4 without calling the control program in the flash ROM 20a. Is stored in the RAM 22, the rewrite control program is called and executed on the RAM 22, and the current control program and control data stored in the flash ROM 20 a are then transmitted from the memory rewrite device 4. A process of rewriting the incoming write data (new control program and data constituting the control data) is performed.
[0040]
It should be noted that even when the ECU 2 in which the engine control program and control data are not yet written in the flash ROM 20a is manufactured, the engine control program and control data are newly written in the flash ROM 20a. . Therefore, hereinafter, a case where the control program and control data in the flash ROM 20a are rewritten will be described.
[0041]
On the other hand, the memory rewriting device 4 has a microcomputer 30 with a built-in CPU, ROM, RAM, etc. for executing processing for causing the microcomputer 8 on the ECU 2 side to rewrite the flash ROM 20a, and in response to a command from the microcomputer 30. The power supply circuit 32 for supplying the rewriting voltage (12 V in this embodiment) Vpp necessary for rewriting the data in the flash ROM 20a to the microcomputer 8 on the ECU 2 side, and the operation mode of the ECU 2 are changed from the normal mode for controlling the engine to the flash ROM 20a. A rewrite switch SW for changing to a rewrite mode for rewriting (or newly writing) data is provided.
[0042]
The memory rewriting device 4 further includes a first ROM 34 in which a rewrite control program (specifically, a program code constituting the rewrite control program and data referred to when the rewrite control program is executed) to be transmitted to the ECU 2 is stored. The second ROM 36 storing the write data to be transmitted to the ECU 2 (that is, the new control program to be written to the flash ROM 20a and the data constituting the control data), and the operator can change the memory rewrite device 4 to various types. And an input device 37 for inputting various instructions. The first ROM 34 and the second ROM 36 are detachably attached to the memory rewriting device 4 by known IC sockets 38 and 40, respectively.
[0043]
Such a connection between the memory rewriting device 4 and the ECU 2 is performed by fitting a female connector 42F on the memory rewriting device 4 side and a male connector 42M provided on the ECU 2, as shown in FIG.
That is, when both the connectors 42F and 42M are fitted, serial data communication between the microcomputer 30 on the memory rewriting device 4 side and the microcomputer 8 on the ECU 2 side becomes possible via the communication line 44. A rewrite voltage Vpp necessary for rewriting data in the flash ROM 20a is supplied from the power supply circuit 32 on the memory rewrite device 4 side to the microcomputer 8 on the ECU 2 side via the supply line 46. Further, the signal line 48 connected to the ground potential (0V) via the rewrite switch SW on the memory rewrite device 4 side is connected to the mode determination signal line L pulled up to 5V by the resistor R on the ECU 2 side. Thus, when the rewrite switch SW is turned on on the memory rewrite device 4 side, the mode determination signal line L changes from the high level (5 V) to the low level (0 V) on the ECU 2 side. Then, when the boot program is started as described above, the microcomputer 8 of the ECU 2 determines the rewrite mode if the mode determination signal line L is at a low level.
[0044]
Next, the process executed by the microcomputer 30 of the memory rewriting device 4 and the process executed by the microcomputer 8 of the ECU 2 will be described with reference to the flowcharts of FIGS. 2 and 3 are flowcharts showing processing executed by the microcomputer 30 of the memory rewriting device 4. 4 and 5 are flowcharts showing processing executed by the microcomputer 8 of the ECU 2, and the processing of steps (hereinafter simply referred to as “S”) 300 to S350 is performed by the boot program in the mask ROM 20b. The process of S400 is executed by the engine control program in the flash ROM 20a. Then, the processing of S500 to S740 is executed by the rewrite control program transmitted from the memory rewriting device 4 and stored in the RAM 22.
[0045]
First, in the memory rewriting device 4, when the operator connects to the ECU 2 and the rewrite switch SW is turned on, the microcomputer 30 executes the process shown in FIG. In this embodiment, the communication speed (hereinafter also referred to as a baud rate) of data communication performed between the memory rewriting device 4 and the ECU 2 is initially set to 9600 bps.
[0046]
As shown in FIG. 2, the microcomputer 30 of the memory rewriting device 4 first transmits a baud rate value request for requesting a signal indicating a baud rate value that can be handled by the ECU 2 to the ECU 2 in the first S100.
In S110, the process waits until data from the ECU 2 is received. When the data is received, the process proceeds to S120, and the received data indicates a signal (hereinafter referred to as a corresponding baud rate) indicating a baud rate value that the ECU 2 can handle. If the received data is a corresponding baud rate value signal, in the subsequent S130, the baud rate on the memory rewriting device 4 side is set to a value represented by the received corresponding baud rate value signal. Change to That is, as will be described later, the ECU 2 of the present embodiment transmits the corresponding baud rate value signal to the memory rewriting device 4 and then changes its own baud rate to the value represented by the transmitted corresponding baud rate value signal. Also on the rewriting device 4 side, the baud rate used for communication is changed to a value represented by the corresponding baud rate value signal received from the ECU 2 so that the subsequent communication is established.
[0047]
If the process of S130 is executed or if it is determined in S120 that the received data is not a corresponding baud rate value signal, the process proceeds to S140, and the write control program is read from the first ROM 34, The read rewrite control program is transmitted to the ECU 2. The transmission of the rewrite control program and the subsequent communication are performed at the baud rate changed in S130 if the process of S130 is executed (S120: YES), and the process of S130 is not executed. (S120: NO), it is performed at the same 9600 bps as the first S100.
[0048]
When all transmissions of the rewrite control program are completed in S140, the process proceeds to S150 and waits for the reception end signal indicating that the reception of the rewrite control program is completed from the ECU 2, and the reception end signal is displayed. If it receives, it will progress to S160 and will transmit a baud rate value request | requirement to ECU2 similarly to the case of S100.
[0049]
In step S170, the process waits until data from the ECU 2 is received. When the data is received, it is determined in step S180 whether the received data is a corresponding baud rate value signal. If it is a corresponding baud rate value signal, the process proceeds to S190, and the baud rate on the memory rewriting device 4 side is changed to a value represented by the corresponding baud rate value signal received in S170. That is, in S160 to S190, the same processing as S100 to S130 described above is performed.
[0050]
Then, when the process of S190 is executed, or when it is determined in S180 that the received data is not the corresponding baud rate value signal, the process proceeds to S200, where the packet transmission process of the write data is executed. The processing on the memory rewriting device 4 side is terminated.
[0051]
Here, in the write data packet transmission processing of S200, the write data stored in the second ROM 36 is read n bytes at a time, and the n bytes of write data are packetized as shown in FIG. This is transmitted, and is executed according to the procedure shown in FIG. In FIG. 6, “HD” is a header of several bytes attached to n bytes of write data data1, data2,..., Datan, and this header HD includes a code indicating the transfer destination of the transmission data. The information for communication control such as is arranged. “CS” is a 1-byte or several-byte checksum (inspection data) for detecting a communication error. Further, the communication with the ECU 2 in this packet transmission process is performed at the baud rate changed in S190 if the process of S190 is executed (S180: YES), and if the process of S190 is not executed (S180: NO), the baud rate changed in S130 or the same 9600 bps as in the first S100.
[0052]
As shown in FIG. 3, when execution of the packet transmission process of write data is started, first, in S210, the first n bytes of the write data are read from the second ROM 36, and the write of the n bytes is performed. As shown in FIG. 6, a header HD and a checksum CS are attached to the embedded data to generate one packet, and the packet is transmitted to the ECU 2.
[0053]
Then, in S220, the ECU 2 waits until a packet request as a request signal for requesting the next packet is transmitted from the ECU 2. When the packet request from the ECU 2 is received, the process proceeds to S230, where the second request is sent. The next n bytes of the write data are read from the ROM 36, and the n bytes of write data are packetized and transmitted to the ECU 2 as in S210.
[0054]
In subsequent S240, it is determined whether or not all the write data stored in the second ROM 36 has been transmitted. If all the data has not yet been transmitted, the processes in S220 and S230 are repeated. If it is determined in S240 that the transmission of all data has been completed, the process returns from the packet transmission process to the process of FIG. 2, and then the process on the memory rewriting device 4 side is terminated.
[0055]
On the other hand, in the ECU 2 next, when the power is turned on, the microcomputer 8 starts its operation from the reset state and executes the processing shown in FIG.
That is, first, the boot program stored in the mask ROM 20b is activated, and first, in S300, it is determined whether or not the mode is the rewrite mode, depending on whether or not the mode determination signal line L is at the low level. If the mode determination signal line L is not low level (S300: NO), it is determined that the normal mode is not the rewrite mode, and the process jumps to the engine control program.
[0056]
Then, the control program stored in the flash ROM 20a is activated, and thereafter, as shown in S400, an engine control process performed with reference to engine control control data is executed. This engine control process calculates the optimum fuel injection amount, ignition timing, etc. for the engine based on various sensor signals from the input circuit 6 and control data stored in the flash ROM 20a, and according to the calculation result. The control signal is repeatedly executed by a procedure of outputting a control signal for driving an actuator such as an injector or an igniter to the output circuit 10.
[0057]
On the other hand, in the boot program, when it is determined that the rewrite mode is in S300, that is, when the memory rewrite device 4 is connected to the ECU 2 and the rewrite switch SW is turned on, the mode determination signal line L is changed. If it is the low level, the process proceeds to S310.
[0058]
In S310, the process waits until the baud rate value request transmitted from the memory rewriting device 4 in S100 of FIG. 2 is received. When the baud rate value request is received, the process proceeds to S320 and is changed in the next S330. A signal representing the set baud rate (corresponding baud rate value signal) is transmitted to the memory rewriting device 4, and in subsequent S330, the own baud rate is changed to a value represented by the transmitted corresponding baud rate value signal.
[0059]
Then, since the rewrite control program is transmitted from the memory rewriting device 4 at the baud rate after the change in S140 of FIG. 2 described above, the rewrite control program is received in the subsequent S340 and sequentially stored in a predetermined area of the RAM 22. Store. Note that the reception of this rewrite control program and the subsequent communication are performed at the baud rate changed in S330.
[0060]
When all the rewrite control programs are stored in the RAM 22 in S340, the process jumps to the write control program stored in the RAM 22 in S340.
As a result, the write control program transmitted from the memory rewriting device 4 is executed on the RAM 22, and the processing of S500 to S540 (and further S550 to S740 in FIG. 5) is performed.
[0061]
That is, first, in S500, a reception end signal indicating that reception of the rewrite control program has been completed is transmitted to the memory rewriting device 4, and in S510, it is transmitted from the memory rewriting device 4 in S160 of FIG. Wait until an incoming baud rate value request is received. When the baud rate value request is received, the process proceeds to S520, and the corresponding baud rate value signal indicating the own baud rate changed / set in the next S530 is transmitted to the memory rewriting device 4, and the subsequent baud rate is set in S530. The value is changed to a value represented by the transmitted corresponding baud rate value signal.
[0062]
Then, since the write data packetized from the memory rewriting device 4 in S200 of FIG. 2 is transmitted at the changed baud rate, the data in the flash ROM 20a is transferred from the memory rewriting device 4 in the subsequent S540. A data rewriting process for rewriting the transmitted writing data is executed, and then the process on the ECU 2 side is terminated.
[0063]
Here, the data rewriting process of S540 is executed according to the procedure shown in FIG. Note that communication with the memory rewriting device 4 in this data rewriting process is performed at the baud rate changed in S530.
That is, as shown in FIG. 5, when the execution of the data rewriting process is started, first, in S550, the address counter for counting the data write destination (write address) in the flash ROM 20a is set in the flash ROM 20a. A packet for determining whether or not the processing for the write data for one packet (that is, n bytes) has been completed in S560. Reset the counter.
[0064]
In subsequent S570, one byte of serial data transmitted from the memory rewriting device 4 in the packet transmission process of FIG. 3 described above is received, and in subsequent S580, it is determined whether or not the reception state is normal. To do. In the case of normal reception, the process proceeds to S590, and if the 1-byte data received in S570 is write data to be written to the flash ROM 20a (in other words, if it is data other than the header HD and the checksum CS). The 1-byte write data is sequentially stored in the n-byte buffer area set in the predetermined area of the RAM 22 from the top, and in step S600, the packet counter reset in step S560 is incremented.
[0065]
In subsequent S610, it is determined whether or not the write data for one packet (n bytes) has been received and stored in the buffer area of the RAM 22 depending on whether or not the value of the packet counter has reached “n”. If reception and storage for one packet has not been completed yet, the processing of S570 to S600 is repeated.
[0066]
On the other hand, if it is determined in S610 that the value of the packet counter has reached “n”, the write data for one packet can be received and stored in the buffer area, and the process proceeds to S620. To reset the packet counter.
In subsequent S630, write data is extracted by one byte sequentially from the beginning of the buffer area, and in subsequent S640, a write for counting how many times data write operation for one byte has been performed on the flash ROM 20a. Reset the counter for the number of embedded pulses.
[0067]
In subsequent S650, the current value of the address counter is set as a write address, and the write data for 1 byte taken out from the buffer area in S630 is set as 1-byte data to be written this time to the flash ROM 20a, and then continued. In S660, a write pulse is given to the cell of the flash ROM 20a designated by the write address set in S650.
Then, the 1-byte data set in S650 is written to the area of the write address set in S650. However, there is a possibility that data cannot be accurately written only by giving a write pulse once. In subsequent S670, a so-called verify check is performed in which the write data currently extracted from the buffer area in S630 is compared with 1-byte data actually written in the flash ROM 20a.
[0068]
If the two data do not match in the verify check in S670 (S670: NO), the process proceeds to S680, and the write pulse number counter is incremented. Then, in subsequent S690, it is determined whether or not the value of the write pulse number counter has reached a predetermined value (“10” in the present embodiment). If not, the process returns to S660, and again, By applying a write pulse to the flash ROM 20a, the data write operation is performed again for the write data currently extracted from the buffer area in S630.
[0069]
If it is determined in S690 that the value of the write pulse number counter has reached a predetermined value, the data write operation in S660 is performed a predetermined number of times for the same 1-byte data. Since the data could not be written correctly, it is determined that there is some abnormality, and the process proceeds to S700. Then, in S700, after performing a predetermined error process, the process returns from the data rewriting process to the process of FIG. 4, and then the process on the ECU 2 side is finished. Even when it is determined in S580 that the reception state is not normal, after the error processing of S700 is performed, the processing returns to the processing of FIG. 4 and thereafter the processing on the ECU 2 side is finished.
[0070]
On the other hand, if the two data match each other as a result of the verify check in S670 (S670: YES), the process proceeds to S710, where the address counter and the packet counter are respectively incremented. In the subsequent S720, the value of the packet counter is determined. It is determined whether or not the write data for one packet has been written to the flash ROM 20a (whether or not the writing for one packet has been completed). If the writing for one packet has not been completed, the processes of S630 to S710 described above are repeated. If the writing for one packet has been completed by repeating such processes, the process proceeds to S730.
[0071]
Then, in S730, writing of all addresses (in other words, all data) is completed depending on whether or not the value of the address counter has reached the value of the final address at which writing of new data should end in the flash ROM 20a. If the writing of all addresses has not been completed, the process proceeds to S740, where a packet request for requesting the next packet is transmitted to the memory rewriting device.
[0072]
Then, since the next packet is transmitted from the memory rewriting device 4 by the processing of FIG. 3 described above, the processing of S560 to S740 described above is repeated in the data rewriting processing. If it is determined in S730 that all addresses have been written, the process returns to the process of FIG. 4 from the data rewriting process, and the process on the ECU 2 side ends.
[0073]
In this embodiment, S560 to S610 correspond to processing for realizing the function as data acquisition means, and S550 and S620 to S720 correspond to processing for realizing the function as data writing means. The determination in S720 corresponds to a process for realizing a function as a writing state determination unit, and S740 corresponds to a process for realizing a function as a request signal transmission unit.
[0074]
That is, in the data rewriting process of FIG. 5 executed by the ECU 2 of the present embodiment, n bytes of write data that are packetized and transmitted from the memory rewriting device 4 are received and stored in the buffer area of the RAM 22 ( S560 to S610), n bytes of write data stored in the buffer area are sequentially fetched byte by byte and written to the flash ROM 20a (S620 to S720), and the write data in the buffer area is stored in the flash ROM 20a. Is written (S720: YES), a packet request for requesting n bytes of write data to be written next is transmitted to the memory rewriting device 4 (S740).
[0075]
For this reason, the memory rewriting device 4 is configured to packetize the write data stored in the second ROM 36 by n bytes and transmit it to the ECU 2 by executing the packet transmission process of FIG. As shown in FIG. 7, after the first packet P is transmitted, the write data is transmitted n bytes at a time in a procedure such that the next packet P is transmitted each time a packet request Y is received from the ECU 2. I have to. In FIG. 7, an arrow “→” from left to right indicates transmission of the packet P from the memory rewriting device 4 to the ECU 2, and an arrow “←” from right to left indicates an arrow “←” from the ECU 2 to the memory rewriting device. 4 shows the transmission of the packet request Y to 4.
[0076]
Therefore, according to the memory rewriting system 5 provided with such an ECU 2, as in the prior art, the memory rewriting device 4 has a predetermined time interval (that is, the maximum required for writing data received on the ECU 2 side). It is not necessary to adopt a transmission method of sequentially transmitting new write data at a time interval larger than the time). As illustrated in FIG. 7, the transmission interval on the memory rewriting device 4 side is set on the ECU 2 side. .. Can be optimally changed in accordance with the times ta, tb, tc, td,... Actually required for writing data, so that there is no waste in time for transferring write data, and as a result, the flash ROM 20a. Can be rewritten in a short time.
[0077]
In the ECU 2 of the present embodiment, the amount of data stored in the buffer area of the RAM 22 at one time (in other words, the size of the buffer area) is one unit of write data transmitted from the memory rewriting device 4. The number of bits of data that can be written to the flash ROM 20a at one time (1 byte in this embodiment) is set to a value multiplied by n, and 1 byte of data is sequentially extracted from the buffer area and written to the flash ROM 20a. I am doing so.
[0078]
Accordingly, it is possible to reduce the number of times that the packet request is transmitted from the ECU 2 to the memory rewriting device 4, thereby reducing the time required to deliver the rewritten data, and the data in the flash ROM 20 a can be reduced. It becomes possible to rewrite in a shorter time. That is, the rewrite data may be transmitted byte by byte from the memory rewriting device 4, but in this case, the number of packet requests transmitted from the ECU 2 to the memory rewriting device 4 increases, which is disadvantageous. . On the other hand, if the present embodiment is used, a greater effect can be obtained.
[0079]
By the way, normally, in the ECU 2 as in the present embodiment, the capacity of the RAM 22 is limited in terms of mounting area, cost, etc., and the size of the buffer area for storing received write data (hereinafter referred to as the buffer size). However, there is a limit. Therefore, although it is to reduce the number of packet request transmissions from the ECU 2 to the memory rewriting device 4, the buffer size cannot be set infinitely large.
[0080]
Here, regarding the ECU 2 of the present embodiment, the buffer size (that is, the amount of write data arranged in one packet transmitted from the memory rewriting device 4) and the transmission time (that is, from the memory rewriting device 4 to the ECU 2). When the relationship with the time until transmission of all the write data is completed and then the total time required for rewriting the flash ROM 20a is examined, the communication speed (baud rate) is as shown in FIG. When the buffer size is low, the effect of shortening the transmission time is larger as the buffer size is increased. However, when the communication speed is increased, a large effect can be obtained without increasing the buffer size so much.
[0081]
FIG. 8A shows a calculated value of the transmission time (rewrite time) when the write data of a total of 96 kbytes is transmitted from the memory rewriting device 4 to the ECU 2, and the unit is “second”. The time required to write the data received on the ECU 2 side is estimated as 80 μs. FIG. 8B is a graph of the calculated values of FIG.
[0082]
Therefore, from such a viewpoint, the maximum effect can be obtained with the minimum resources by setting the buffer size and the communication speed to optimum values within the allowable range. For example, in this embodiment, the buffer size is set to 128 bytes, the communication speed is set to 38.4 kbps, and the data transmission time for 96 kbytes is shortened to 27.2 seconds.
[0083]
On the other hand, the ECU 2 of the present embodiment receives a rewrite control program for performing a process of rewriting data in the flash ROM 20a with new data transmitted from the memory rewrite device 4, and the rewrite control is received. The flash ROM 20a is rewritten by storing and executing the program in the RAM 22 that is not the target of rewriting. Therefore, it is not necessary to incorporate a rewrite control program in advance, and the memory capacity can be saved greatly.
[0084]
On the other hand, the ECU 2 of the present embodiment further sets the baud rate of data communication performed with the memory rewriting device 4 to a value corresponding to the change command by executing a predetermined change command (S330, S530 in FIG. 4). It is configured to be changeable. The rewrite control program transmitted from the memory rewrite device 4 includes a data rewrite process for rewriting data in the flash ROM 20a with new data transmitted from the memory rewrite device 4 as shown in S530 of FIG. A change instruction for changing the baud rate is arranged before the instruction group for performing (FIG. 5).
[0085]
Therefore, according to the ECU 2 of the present embodiment, when the rewrite control program is transmitted from the memory rewrite device 4 at a predetermined baud rate and this rewrite control program is stored in the RAM 22, data rewrite processing is performed by the rewrite control program. By executing the change instruction (S530) arranged before the instruction group, the baud rate of data communication performed with the memory rewriting device 4 is changed to a value corresponding to the change instruction. Then, reception of the write data (packet) transmitted from the memory rewriting device 4 and transmission of the pocket request to the memory rewriting device 4 are performed at this changed baud rate.
[0086]
For this reason, when the memory rewriting device 4 transmits the rewrite control program after packetizing the write data, the packetized data is transmitted at the baud rate set by the change command arranged in the rewrite control program. The baud rate set by this change command can be set faster than the baud rate used for communication of the rewrite control program so that the write data can be transferred to the ECU 2 faster. Become.
[0087]
Thus, according to the ECU 2 of the present embodiment, the baud rate of data communication performed with the memory rewriting device 4 can be arbitrarily increased, and the total time required to rewrite data in the flash ROM 20a can be further increased. This can be further shortened.
[0088]
Further, in the ECU 2 of the present embodiment, the rewrite control program transmitted from the memory rewriting device 4 is set by the change command before the change command of S530 as shown in S520 of FIG. A transmission command for transmitting a signal representing the baud rate of the ECU 2 (corresponding baud rate value signal) to the memory rewriting device 4 is arranged, and the ECU 2 executes the transmission command so that the memory rewriting device 4 corresponds to the corresponding baud rate value. A signal is transmitted.
[0089]
Therefore, before the baud rate is changed in the ECU 2, the corresponding baud rate value signal indicating the new baud rate set thereafter is sent to the memory rewriting device 4 so that the baud rate (that is, the rewrite control program is communicated). The memory rewriting device 4 automatically switches its own baud rate according to the corresponding baud rate value signal from the ECU 2, as shown in S180 and S190 of FIG. be able to. Therefore, according to the ECU 2 of this embodiment, data communication with the memory rewriting device 4 can be established reliably.
[0090]
In the ECU 2 of the present embodiment, as shown in FIG. 4, in the boot programs S310 to S330, the same baud rate change processing is performed as in the write control programs S510 to S530. In response to the above, in the memory rewriting device 4, as shown in FIG. 2, the same processing as S160 to S190 is performed in S100 to S130. As a result, the baud rate at the time of transferring the rewrite control program from the memory rewrite device 4 to the ECU 2 can also be changed, but the processing of S310 to S330 in FIG. 4 and the processing of S100 to S130 in FIG. The processing may be omitted, and the rewrite control program may be transferred at 9600 bps, which is the initial baud rate of communication.
[0091]
Further, the ECU 2 of the present embodiment is provided with the flash ROM 20a as a nonvolatile memory capable of electrically writing data. However, an EEPROM may be used, and at least one writing area is provided. You may use PROM (for example, one-time PROM).
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an overall configuration of a memory rewriting system of an electronic device according to an embodiment.
FIG. 2 is a flowchart illustrating processing executed on the memory rewriting device side according to the embodiment.
FIG. 3 is a flowchart showing a write data packet transmission process executed during the process of FIG. 2;
FIG. 4 is a flowchart showing a process executed on the engine control unit (ECU) side of the embodiment.
FIG. 5 is a flowchart showing a data rewriting process executed in the process of FIG.
FIG. 6 is an explanatory diagram illustrating a format of data transmitted from a memory rewriting device.
FIG. 7 is an explanatory diagram for explaining the operation of the embodiment.
FIG. 8 is an explanatory diagram illustrating data transmission time (rewriting time) by the memory rewriting system according to the embodiment.
FIG. 9 is an explanatory diagram for explaining a problem of a conventional technique.
[Explanation of symbols]
2 ... Engine control unit (ECU) 4 ... Memory rewriting device
5 ... Memory rewrite system 6 ... Input circuit
8, 30 ... Single-chip microcomputer (microcomputer)
10 ... Output circuit 18 ... CPU 20 ... ROM
20a ... Flash ROM 20b ... Mask ROM
22 ... RAM 24 ... I / O 25 ... Communication circuit 32 ... Power supply circuit
34 ... 1st ROM 36 ... 2nd ROM 37 ... Input device
38, 40 ... IC socket 42F ... Female connector 42M ... Male connector
44 ... Communication line 46 ... Power supply line 48 ... Signal line
SW: Rewrite switch L: Signal line for mode determination R: Resistor

Claims (7)

電気的にデータの書き換えが可能な不揮発性メモリを備え、通常時には、前記不揮発性メモリに格納されたデータにより構成される制御プログラム及び制御データに従って動作し、外部からの書き換え指令を受けた場合には、前記不揮発性メモリ内のデータを外部装置から送信されて来る新たなデータに書き換える書換処理を行う電子装置において、
当該電子装置は、前記書換処理を行うための書換制御プログラムを前記外部装置から受信し、該書換制御プログラムを書き換え対象でないメモリ領域に格納して実行することにより、前記不揮発性メモリ内のデータを前記外部装置から送信されて来る新たなデータに書き換えるよう構成されるものであって、
前記電子装置は、動作モードが書換モードであると判断した後、前記外部装置との間で行われるデータ通信の通信速度が初期値に設定されている状態で、前記外部装置からのボーレート値要求を受けると、当該電子装置が対応可能な通信速度を表す信号を前記外部装置に送信し、当該通信速度を変更可能に構成されており、
その後、設定された通信速度にて前記外部装置から送信されて来る前記書換制御プログラムを受信して前記書き換え対象でないメモリ領域に格納し、
更に、該書換制御プログラムを受信し終えた後、前記外部装置との間で行うデータ通信の通信速度を、所定の変更命令を実行することで該変更命令に応じた前記書換制御プログラムを通信する際の通信速度より早く設定された値に変更可能に構成されており、
前記外部装置から送信されて来る前記書換制御プログラムには、前記書換処理を行うための命令群の前に、前記変更命令が配置されていること、
を特徴とする電子装置。
Equipped with a non-volatile memory that can electrically rewrite data, and normally operates according to a control program and control data composed of data stored in the non-volatile memory and receives a rewrite command from the outside Is an electronic device that performs a rewrite process of rewriting data in the nonvolatile memory with new data transmitted from an external device.
The electronic device receives a rewrite control program for performing the rewrite processing from the external device, stores the rewrite control program in a memory area that is not a rewrite target, and executes the rewrite control program to store data in the nonvolatile memory. It is configured to rewrite new data transmitted from the external device ,
After the electronic device determines that the operation mode is the rewrite mode, the baud rate value request from the external device is set while the communication speed of data communication performed with the external device is set to an initial value. Is received, a signal representing a communication speed that can be handled by the electronic device is transmitted to the external device, and the communication speed can be changed.
Thereafter, the rewrite control program transmitted from the external device at the set communication speed is received and stored in the memory area that is not the rewrite target,
Further, after receiving the rewrite control program, the communication speed of data communication performed with the external device is communicated with the rewrite control program according to the change command by executing a predetermined change command. It is configured so that it can be changed to a value set earlier than the communication speed at the time,
In the rewrite control program transmitted from the external device, the change command is arranged before a command group for performing the rewrite processing,
An electronic device characterized by the above.
請求項1に記載の電子装置において、
更に、前記書換制御プログラムには、前記変更命令の前に、該変更命令により設定される当該電子装置の通信速度を表す信号を前記外部装置に送信する送信命令が配置されており、
当該電子装置は、前記送信命令を実行することで、前記外部装置に前記通信速度を表す信号を送信すること、
を特徴とする電子装置。
The electronic device according to claim 1,
Furthermore, in the rewrite control program, a transmission command for transmitting a signal representing a communication speed of the electronic device set by the change command to the external device is arranged before the change command,
The electronic device transmits a signal representing the communication speed to the external device by executing the transmission command;
An electronic device characterized by the above.
電気的にデータの書き換えが可能な不揮発性メモリを備え、通常時には、前記不揮発性メモリに格納されたデータにより構成される制御プログラム及び制御データに従って動作し、外部からの書き換え指令を受けた場合には、前記不揮発性メモリ内のデータを外部装置から送信されて来る新たなデータに書き換える電子装置において、
前記不揮発性メモリ内のデータを前記新たなデータに書き換えるための手段として、
前記外部装置から送信されて来る所定量のデータを受信して所定のバッファ領域に格納するデータ取得手段と、
前記バッファ領域に格納されたデータを、前記不揮発性メモリに書き込むデータ書込手段と、
該データ書込手段により前記バッファ領域内のデータが前記不揮発性メモリに全て書き込まれたか否かを判定する書込状態判定手段と、
該書込状態判定手段により肯定判定されると、前記外部装置へ、前記不揮発性メモリに次に書き込むべき所定量のデータを要求するための要求信号を送信する要求信号送信手段とを備えると共に、
当該電子装置は、
前記データ取得手段、データ書込手段、書込状態判定手段、及び要求信号送信手段の機能を実現するための書換制御プログラムを前記外部装置から受信し、該書換制御プログラムを書き換え対象でないメモリ領域に格納して実行することにより、前記不揮発性メモリ内のデータを前記外部装置から送信されて来る新たなデータに書き換えるように構成されており、
更に、当該電子装置は、
動作モードが書換モードであると判断した後、前記外部装置との間で行われるデータ通信の通信速度が初期値に設定されている状態で、前記外部装置からのボーレート値要求を受けると、当該電子装置が対応可能な通信速度を表す信号を前記外部装置に送信し、当該通信速度を変更可能に構成されており、
その後、設定された通信速度にて前記外部装置から送信されて来る前記書換制御プログラムを受信して前記書き換え対象でないメモリ領域に格納し、
更に、該書換制御プログラムを受信し終えた後、
前記外部装置との間で行うデータ通信の通信速度を、所定の変更命令を実行することで該変更命令に応じた前記書換制御プログラムを通信する際の通信速度より早く設定された値に変更可能に構成されており、
前記外部装置から送信されて来る前記書換制御プログラムには、前記データ取得手段、データ書込手段、書込状態判定手段、及び要求信号送信手段の機能を実現するための命令群の前に、前記変更命令が配置されていること、
を特徴とする電子装置。
Equipped with a non-volatile memory that can electrically rewrite data, and normally operates according to a control program and control data composed of data stored in the non-volatile memory and receives a rewrite command from the outside Is an electronic device that rewrites data in the non-volatile memory to new data transmitted from an external device,
As means for rewriting the data in the nonvolatile memory with the new data,
Data acquisition means for receiving a predetermined amount of data transmitted from the external device and storing it in a predetermined buffer area;
Data writing means for writing the data stored in the buffer area to the nonvolatile memory;
Write state determination means for determining whether or not all data in the buffer area has been written to the nonvolatile memory by the data writing means;
When affirmative determination is made by the write state determination means, the request signal transmission means transmits a request signal for requesting a predetermined amount of data to be written next to the nonvolatile memory to the external device, and
The electronic device is
A rewrite control program for realizing the functions of the data acquisition means, data write means, write state determination means, and request signal transmission means is received from the external device, and the rewrite control program is stored in a memory area that is not to be rewritten. By storing and executing, the data in the nonvolatile memory is configured to be rewritten with new data transmitted from the external device,
Furthermore, the electronic device is
After determining that the operation mode is the rewrite mode and receiving a baud rate value request from the external device in a state where the communication speed of data communication performed with the external device is set to an initial value, A signal representing a communication speed that can be supported by the electronic device is transmitted to the external device, and the communication speed can be changed.
Thereafter, the rewrite control program transmitted from the external device at the set communication speed is received and stored in the memory area that is not the rewrite target,
Furthermore, after receiving the rewrite control program,
The communication speed of data communication performed with the external device can be changed to a value set earlier than the communication speed when communicating the rewrite control program according to the change command by executing a predetermined change command. Is composed of
In the rewrite control program transmitted from the external device, before the instruction group for realizing the functions of the data acquisition unit, the data writing unit, the writing state determination unit, and the request signal transmission unit, The change order is in place,
An electronic device characterized by the above.
請求項3に記載の電子装置において、
更に、前記書換プログラムには、前記変更命令の前に、該変更命令により設定される当該電子装置の通信速度を表す信号を前記外部装置に送信する送信命令が配置されており、 当該電子装置は、前記送信命令を実行することで、前記外部装置に前記通信速度を表す信号を送信すること、
を特徴とする電子装置。
The electronic device according to claim 3.
Further, in the rewriting program, a transmission command for transmitting a signal representing a communication speed of the electronic device set by the change command to the external device is arranged before the change command. Transmitting a signal representing the communication speed to the external device by executing the transmission command;
An electronic device characterized by the above.
請求項3又は請求項4に記載の電子装置において、
前記所定量は、前記データ書込手段が前記不揮発性メモリに一度に書き込むことが可能なデータのビット数を複数倍した値に設定されていると共に、
前記データ書込手段は、前記バッファ領域から前記ビット数分のデータを順次取り出し、その取り出した各データ群を前記不揮発性メモリに順次書き込むように構成されていること、
を特徴とする電子装置。
The electronic device according to claim 3 or claim 4,
The predetermined amount is set to a value obtained by multiplying the number of bits of data that can be written to the nonvolatile memory by the data writing means at a plurality of times,
The data writing means is configured to sequentially extract data corresponding to the number of bits from the buffer area, and sequentially write the extracted data groups to the nonvolatile memory;
An electronic device characterized by the above.
請求項1又は請求項2に記載の電子装置において、
前記新たなデータは、前記外部装置から所定量ずつパケット化されて送信されるようになっており、
当該電子装置は、前記所定量のデータの前記不揮発性メモリへの書き込みを完了すると、前記外部装置へ、前記不揮発性メモリに次に書き込むべき所定量のデータを要求するための要求信号を送信すること、
を特徴とする電子装置。
The electronic device according to claim 1 or 2,
The new data is packetized by a predetermined amount from the external device and transmitted.
When the electronic device completes the writing of the predetermined amount of data to the non-volatile memory, the electronic device transmits a request signal for requesting the predetermined amount of data to be written next to the non-volatile memory to the external device. thing,
An electronic device characterized by the above.
請求項1ないし請求項の何れか1項に記載の電子装置において、
当該電子装置は、自動車用エンジン制御装置であること、
を特徴とする電子装置。
The electronic device according to any one of claims 1 to 6 ,
The electronic device is an automobile engine control device;
An electronic device characterized by the above.
JP26716596A 1996-09-20 1996-10-08 Electronic equipment Expired - Lifetime JP3881069B2 (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP26716596A JP3881069B2 (en) 1996-10-08 1996-10-08 Electronic equipment
US08/934,220 US6275911B1 (en) 1996-09-20 1997-09-19 Memory writing device for an electronic device
KR1019970047921A KR100258147B1 (en) 1996-09-20 1997-09-20 Memory writing device for an electronic device
US09/625,403 US6477626B1 (en) 1996-09-20 2000-07-25 Memory writing device for an electronic device
US09/625,402 US6249848B1 (en) 1996-09-20 2000-07-25 Memory writing device for an electronic device
US09/843,821 US6505280B2 (en) 1996-09-20 2001-04-30 Memory writing device for an electronic device
US10/062,541 US6957296B2 (en) 1996-09-20 2002-02-05 Memory writing device for an electronic device
US10/270,578 US20030041217A1 (en) 1996-09-20 2002-10-16 Memory writing device for an electronic device
US11/217,385 US7493455B2 (en) 1996-09-20 2005-09-02 Memory writing device for an electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26716596A JP3881069B2 (en) 1996-10-08 1996-10-08 Electronic equipment

Publications (2)

Publication Number Publication Date
JPH10111863A JPH10111863A (en) 1998-04-28
JP3881069B2 true JP3881069B2 (en) 2007-02-14

Family

ID=17441009

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26716596A Expired - Lifetime JP3881069B2 (en) 1996-09-20 1996-10-08 Electronic equipment

Country Status (1)

Country Link
JP (1) JP3881069B2 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000181898A (en) 1998-12-14 2000-06-30 Nec Corp Flash memory mounted type single chip microcomputer
JP3948479B2 (en) * 2003-05-20 2007-07-25 日本ビクター株式会社 Computerized service manual display program, recording medium on which program is recorded, computerized service manual display control method, and computerized service manual display control device
US7613729B2 (en) 2003-05-20 2009-11-03 Victor Company Of Japan, Ltd. Electronic service manual display program and apparatus associated therewith
JP4003795B2 (en) * 2003-05-20 2007-11-07 日本ビクター株式会社 Computerized service manual display program, recording medium on which program is recorded, computerized service manual display control method, and computerized service manual display control device
JP2005004726A (en) * 2003-05-20 2005-01-06 Victor Co Of Japan Ltd Electronic service manual creating method, additional data generating method, program for creating electronic service manual, and program for generating additional data
US7725353B2 (en) 2003-05-20 2010-05-25 Victor Company Of Japan, Ltd. Electronic service manual display control device
EP1636700A1 (en) * 2003-06-24 2006-03-22 Bayerische Motoren Werke Aktiengesellschaft Method for booting up a software in the boot sector of a programmable read-only memory
JP4661382B2 (en) * 2005-06-14 2011-03-30 トヨタ自動車株式会社 Vehicle diagnostic device, vehicle diagnostic system, and vehicle diagnostic method
JP4367513B2 (en) 2007-03-28 2009-11-18 株式会社デンソー Electronic control unit
JP5641768B2 (en) * 2010-04-26 2014-12-17 伊東電機株式会社 controller
JP5547701B2 (en) * 2011-09-21 2014-07-16 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
JP2013068105A (en) 2011-09-21 2013-04-18 Hitachi Automotive Systems Ltd Electronic control device for vehicle
JP5956505B2 (en) * 2014-05-15 2016-07-27 日立オートモティブシステムズ株式会社 Electronic control unit for automobile
JP5945044B2 (en) * 2015-06-26 2016-07-05 日立オートモティブシステムズ株式会社 Electronic control device for automobile, writing system for electronic control device for automobile, and writing method of control program for vehicle control
JP6302004B2 (en) * 2016-06-16 2018-03-28 日立オートモティブシステムズ株式会社 Writing program

Also Published As

Publication number Publication date
JPH10111863A (en) 1998-04-28

Similar Documents

Publication Publication Date Title
JP3881069B2 (en) Electronic equipment
US6275911B1 (en) Memory writing device for an electronic device
JP4772992B2 (en) Open-loop control / closed-loop control system for vehicle drive sequence and initialization method thereof
KR100751141B1 (en) A Method and an Apparatus for Identifying a Battery
JP3785299B2 (en) Memory rewriting system for vehicle control device
JPH09160766A (en) Electronic controller
JPH086099A (en) Camera system and communicating method
US6636989B1 (en) Electronic control apparatus and method for on-board rewriting of non-volatile memories
JP2000045858A (en) Rewriting number storing method for electronic control unit and non-volatile memory
JP6443482B2 (en) In-vehicle device, relay device, and computer program
JP3835969B2 (en) Rewriting system for vehicle control device
JP2000038954A (en) Electronic controller and method of counting number of times in which nonvolatile memory is reloaded
JPH10149282A (en) Memory rewriting system for electronic device
EP1145912B1 (en) Rewriting system for vehicle controller
JP4473609B2 (en) Electronic system
JP3796837B2 (en) Memory writing device for electronic device
JP3672755B2 (en) Control program rewriting system
JP5543274B2 (en) Electronic control device for automobile and data writing method in electronic control device for automobile
JP2010250751A (en) Microcomputer chip
JP3089905B2 (en) Communication system for vehicle diagnosis
JP5454378B2 (en) Vehicle control system
JP3711936B2 (en) Water heater
JP2002323990A (en) Electronic controller and method for initializing nonvolatile memory
EP0989301B1 (en) Ignition timing control system for an internal combustion engine
EP2169200A2 (en) Engine setting system and engine setting method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040206

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041207

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050126

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050202

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20050520

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060925

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061109

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111117

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111117

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121117

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131117

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

EXPY Cancellation because of completion of term