JP2006113985A - Data rewrite method for electronic control apparatus - Google Patents

Data rewrite method for electronic control apparatus Download PDF

Info

Publication number
JP2006113985A
JP2006113985A JP2004303466A JP2004303466A JP2006113985A JP 2006113985 A JP2006113985 A JP 2006113985A JP 2004303466 A JP2004303466 A JP 2004303466A JP 2004303466 A JP2004303466 A JP 2004303466A JP 2006113985 A JP2006113985 A JP 2006113985A
Authority
JP
Japan
Prior art keywords
data
written
area
rewriting
identification
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.)
Granted
Application number
JP2004303466A
Other languages
Japanese (ja)
Other versions
JP4812278B2 (en
Inventor
Yutaka Shobu
豊 菖蒲
Shigeki Soeda
茂樹 添田
Kenji Hashimoto
健次 橋本
Seiichi Kawasaki
征一 川崎
Takahisa Watabiki
貴央 綿引
Yoichi Ogawa
洋一 小川
Akiyoshi Takita
晃良 滝田
Kunihiro Tamura
邦宏 田村
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.)
Hitachi Ltd
Nissan Motor Co Ltd
Original Assignee
Hitachi Ltd
Nissan Motor Co Ltd
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 Hitachi Ltd, Nissan Motor Co Ltd filed Critical Hitachi Ltd
Priority to JP2004303466A priority Critical patent/JP4812278B2/en
Publication of JP2006113985A publication Critical patent/JP2006113985A/en
Application granted granted Critical
Publication of JP4812278B2 publication Critical patent/JP4812278B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data rewrite method for storage devices, which can write the same data as that which has been failed to be written when rewriting after write failure. <P>SOLUTION: Identification data to identify the relations between control data originally written in a flash memory 3 and that to be newly written is written into an identification ID area 3c assigned in the head of the outside of a loader area 3a which is used to make communication data to reside in a storage area of the flash memory 3. Thereby, if a communication error occurs, the possibility that identification data has been successfully written is high. Therefore, when rewriting, it is determined that identification data on the flash memory 3 matches that for data to be newly written and data stored in the flash memory 3 is deleted to rewrite new data, so that the same data as that which has been failed to be written can be written. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、電子制御装置(例えば車両制御用のマイコン)に実装された記憶装置にデータを再書き込みする方法に関し、特に書き込み失敗後の再書き込みの際に、書き込み失敗したデータと同じデータを書き込むことができる電子制御装置のデータ再書き込み方法に関する。   The present invention relates to a method for rewriting data in a storage device mounted on an electronic control device (for example, a microcomputer for vehicle control), and in particular, when rewriting after a write failure, the same data as the write failed data is written. The present invention relates to a data rewriting method for an electronic control device.

従来、車両においては、エンジンの制御や自動変速機を含む駆動系の制御などにマイコンが使用されており、その制御データ等は、電気的に書換え可能な不揮発性のメモリ(フラッシュメモリ)に記憶させている。車両開発段階あるいは市場(ディーラー)にて、車載されたマイコンの制御内容を変更する場合には、メモリに記憶されたデータの書換えが要求される。   Conventionally, in a vehicle, a microcomputer is used for controlling an engine and a drive system including an automatic transmission, and the control data is stored in an electrically rewritable nonvolatile memory (flash memory). I am letting. In the vehicle development stage or at the market (dealer), when the control content of the on-board microcomputer is changed, rewriting of data stored in the memory is required.

かかるデータの書換えを行う場合には、車載のマイコンに対し、非車載のメモリ書換装置(電子システム診断テスター等)の通信手段を介して接続し、マイコンのメモリに記憶されたデータの一部又は全部を一旦消去して、そこに新たなデータを書き込むようになっている。ここで、新たなデータの書換えの途中に、何らかのデータ不良、あるいはノイズ等による通信エラーが発生した場合には、データ書き込みが失敗することになる。   When rewriting such data, a part of the data stored in the memory of the microcomputer is connected to the in-vehicle microcomputer via the communication means of a non-in-vehicle memory rewriting device (such as an electronic system diagnostic tester). All data is erased once, and new data is written there. Here, if a data error or a communication error due to noise or the like occurs in the middle of rewriting new data, the data writing fails.

このように通信エラー等によりデータ書き込みが失敗した場合には、マイコンの電源を一度切ってから再立ち上げする必要があるので、特許文献1に記載の技術では、電源を切っても記憶内容が消去しないフラッシュメモリに通信用データを一旦確保しておき、この通信用データを用いて必要なデータの再書き込みを行うようになっていた。
特開平11−7381号公報
In this way, when data writing fails due to a communication error or the like, it is necessary to turn off the microcomputer and then restart it. Therefore, in the technique described in Patent Document 1, the stored contents are stored even when the power is turned off. Communication data is temporarily secured in a flash memory that is not erased, and necessary data is rewritten using the communication data.
JP-A-11-7381

しかし、上記特許文献1に記載の技術においては、データの書き込みに失敗したときでもデータの再書き込みを継続して行うことができるが、書き込み失敗後の再書き込みを行う際に、どのようなデータでも書き込みできる構成になっていた。
そして、メモリ書換装置には、例えばエンジンの排気量や、自動変速機(AT)か手動式の変速機(MT)か、あるいはオートクルーズ装置を搭載しているか否か等の車両の仕様に応じて、非常に多くの種類のデータやプログラム等が格納されているが、上記特許文献1に記載の技術は、データの再書き込みの際に、どのようなデータでも書き込み可能であり、書き込み失敗したデータと同じデータが書き込まれる保証がなかったため、改善の余地があった。
However, in the technique described in Patent Document 1, data rewriting can be continuously performed even when data writing fails, but any data can be used when rewriting after writing failure. But it was designed to be writable.
The memory rewriting device depends on vehicle specifications such as engine displacement, automatic transmission (AT) or manual transmission (MT), and whether an auto cruise device is installed. Although a great many types of data, programs, and the like are stored, the technique described in Patent Document 1 can write any data when the data is rewritten, and the writing has failed. Since there was no guarantee that the same data as the data was written, there was room for improvement.

そこで、本発明は、このような問題点に対処し、電子制御装置に実装された記憶装置にデータを再書き込みする際に、書き込み失敗したデータと同じデータを書き込むことができる電子制御装置のデータ再書き込み方法を提供することを目的とする。   Therefore, the present invention addresses such problems, and when rewriting data to a storage device mounted on the electronic control device, the data of the electronic control device that can write the same data as the data that failed to be written An object is to provide a rewriting method.

上記目的を達成するために、本発明による電子制御装置のデータ再書き込み方法は、記憶装置に元々書き込まれていた制御データと新たに書き込む制御データとの関係を識別する識別データを、該記憶装置の記憶領域にて常駐領域外の先頭の領域に割り付けて書き込んでおき、再書き込みの際に、記憶装置上の識別データと、新たに書き込むデータの識別データとの一致を判断してから、常駐領域外に書き込まれたデータを消去して新たなデータを再書き込みすることを特徴とするものである。   In order to achieve the above object, a data rewriting method for an electronic control device according to the present invention is provided with identification data for identifying a relationship between control data originally written in a storage device and newly written control data. Allocate and write to the first area outside the resident area in the storage area, and when rewriting, determine whether the identification data on the storage device matches the identification data of the newly written data, and then reside It is characterized in that data written outside the area is erased and new data is rewritten.

本願発明によれば、記憶装置の常駐領域外の先頭の領域に識別データが書き込まれるので、電子制御装置とメモリ書換装置との間で通信エラー等が発生したときでも、識別データについては書き込み完了している可能性が高くなり、記憶装置に元々書き込まれていたデータと新たに書き込むデータとの関係を識別できる可能性が向上する。したがって、電子制御装置にデータを再書き込みする際に、書き込み失敗したデータと同じデータを書き込むことができ、誤書き込みを防止することができる。   According to the present invention, the identification data is written in the first area outside the resident area of the storage device. Therefore, even when a communication error or the like occurs between the electronic control unit and the memory rewriting device, the identification data is completely written. This increases the possibility that the relationship between the data originally written in the storage device and the newly written data can be identified. Therefore, when rewriting data to the electronic control unit, the same data as the data that failed to be written can be written, and erroneous writing can be prevented.

以下に本発明の実施の形態を添付図面に基づいて詳細に説明する。
図1は電子制御装置(車両制御用のマイコン)のシステム構成を示している。車載のマイコン1は、CPU2、不揮発性のフラッシュメモリ(FLASH EEPROM)3、揮発性のRAM4、各種センサ・アクチュエータとの入出力のためのI/O5及び通信I/F6等を備えている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 shows a system configuration of an electronic control device (vehicle control microcomputer). The in-vehicle microcomputer 1 includes a CPU 2, a non-volatile flash memory (FLASH EEPROM) 3, a volatile RAM 4, an I / O 5 for communication with various sensors / actuators, a communication I / F 6, and the like.

この通信I/F6には、コネクタ7を介して、非車載のメモリ書換装置(電子システム診断テスター)8を接続可能である。なお、符号8aは表示用ディスプレイを示している。また、メモリ書換装置8には、例えばエンジンの排気量や、AT車かMT車か、あるいはオートクルーズ装置を搭載しているか否か等の車両の仕様に応じて、非常に多くの種類のデータやプログラム等が格納されている。   A non-vehicle-mounted memory rewriting device (electronic system diagnostic tester) 8 can be connected to the communication I / F 6 via a connector 7. Reference numeral 8a denotes a display for display. The memory rewriting device 8 has a great number of kinds of data depending on vehicle specifications such as engine displacement, whether it is an AT or MT vehicle, or whether an auto cruise device is installed. And programs are stored.

ここにおいて、マイコン1に実装されたフラッシュメモリ3は、何度でも電気的に記憶の書換えが可能な不揮発性の記憶装置であり、例えば1024Kバイトの容量で、一括またはブロック単位でデータを消去し、新たなデータをアドレス順に書き込むことができるようになっている。このフラッシュメモリ3の記憶領域には、図2に示すように、所定のアドレス位置に、通信用データや識別データ、制御データ、制御プログラム等を書き込む領域が割り付けられている。   Here, the flash memory 3 mounted on the microcomputer 1 is a non-volatile storage device that can be electrically rewritten any number of times. For example, the flash memory 3 has a capacity of 1024 Kbytes and erases data in a batch or block unit. New data can be written in the order of addresses. As shown in FIG. 2, an area for writing communication data, identification data, control data, a control program, and the like is allocated to the storage area of the flash memory 3 as shown in FIG.

図2の右側に示す本実施形態のメモリマップにおいては、フラッシュメモリ3の記憶領域のヘッド部に、ローダー領域3aが割り付けられている。このローダー領域3aは、マイコン1の立ち上げ直後に起動するプログラムを書き込む領域であって、少なくとも通信用データを常駐させており、この領域内の記憶内容はフラッシュメモリ3のデータ書換えを行うときでも消去されないようになっている。   In the memory map of the present embodiment shown on the right side of FIG. 2, the loader area 3 a is allocated to the head part of the storage area of the flash memory 3. The loader area 3a is an area in which a program to be started immediately after the start-up of the microcomputer 1 is written, and at least communication data is resident. The contents stored in this area are stored even when the flash memory 3 is rewritten. It is not erased.

このローダー領域3aより後ろのアドレスは、フラッシュメモリ3のデータ書換えを行うときに、元々書き込まれていたデータを消去して、そこに新たなデータを書き込み可能な領域であって、アドレスの先頭から順に、マイコン1の設定情報を書き込むベクター領域3b、識別データを書き込む識別ID領域3c、制御データ等を書き込むデータ領域3d、汎用サブルーチンを書き込むライブラリー領域3e、各種プログラムを書き込むプログラム領域3fが割り付けられており、フラッシュメモリ3内の記憶領域の割付が最適化されている。   The address after the loader area 3a is an area where data originally written when the data in the flash memory 3 is rewritten is erased and new data can be written therein. In order, a vector area 3b for writing the setting information of the microcomputer 1, an identification ID area 3c for writing identification data, a data area 3d for writing control data, a library area 3e for writing general subroutines, and a program area 3f for writing various programs are allocated. The allocation of the storage area in the flash memory 3 is optimized.

これに対し、図2の左側に示す参考例においては、フラッシュメモリ3の記憶領域には、先頭のアドレスから順に、ローダー領域、ベクター領域、第1のデータ領域、識別ID領域、第2のデータ領域、ライブラリー領域、第3のデータ領域、プログラム領域が割り付けられており、記憶領域の割付が最適化されていない。
これにより、図2の右側に示す本実施形態例においては、データ書き込みの途中で通信エラーが発生したときであっても、識別データについては、識別ID領域3cに書き込み完了している可能性が参考例のものと比べて高くなり、フラッシュメモリ3に元々書き込まれていたデータと、新たに書き込むデータとの関係を識別できる可能性が向上する。したがって、データを再書き込みする際に、書き込み失敗したデータと同じデータを書き込むことができ、誤書き込みを防止することができる。なお、データを再書き込みする方法については、図3を参照して後に詳しく述べる。
On the other hand, in the reference example shown on the left side of FIG. 2, in the storage area of the flash memory 3, the loader area, the vector area, the first data area, the identification ID area, and the second data are sequentially arranged from the top address. An area, a library area, a third data area, and a program area are allocated, and the allocation of the storage area is not optimized.
As a result, in the present embodiment shown on the right side of FIG. 2, even when a communication error occurs during data writing, there is a possibility that the identification data has been written to the identification ID area 3c. This is higher than that of the reference example, and the possibility of identifying the relationship between the data originally written in the flash memory 3 and the newly written data is improved. Therefore, when rewriting data, the same data as the data that failed to be written can be written, and erroneous writing can be prevented. A method for rewriting data will be described later in detail with reference to FIG.

また、本実施形態例においては、前記識別データは、ベクター領域3bの直後の識別ID領域3cに書き込まれるようになっており、ローダー領域3aに書き込まれるものでないので、上述したように、ローダー領域3a内の記憶内容はフラッシュメモリ3のデータ書換えを行うときでも消去されない。したがって、ローダー領域3aに常駐させる通信用データについては、車両の仕様に応じて多くの種類のものを用意しなくてもよく、共通化することができる。   In this embodiment, the identification data is written in the identification ID area 3c immediately after the vector area 3b and not in the loader area 3a. The contents stored in 3a are not erased even when data is rewritten in the flash memory 3. Therefore, it is not necessary to prepare many types of communication data resident in the loader area 3a in accordance with vehicle specifications, and they can be shared.

さらに、本実施形態においては、前記識別データは、1つの識別ID領域3cに冗長化して書き込まれている。具体的には、識別データとしては、例えばマイコン1の部品番号(例えば、「12345 AA000」)が用いられており、このような16進数の識別データが、識別ID領域3c内に、「12345 AA000 12345 AA000」のように、2回にわたって冗長化して書き込まれている。   Furthermore, in the present embodiment, the identification data is written redundantly in one identification ID area 3c. Specifically, as the identification data, for example, a part number of the microcomputer 1 (for example, “12345 AA000”) is used. Such hexadecimal identification data is stored in the identification ID area 3c as “12345 AA000. Like "12345 AA000", it is written redundantly twice.

次に、このように構成されたフラッシュメモリ3にデータを再書き込みする方法について説明する。図3は、フラッシュメモリ3のデータ書換えの流れを示すフローチャートである。この書換えのフローは、例えば車両のイグニションスイッチをONにすることによってスタートする。
まず、ステップS1において、図1に示す車載のマイコン1側で、制御データの書換え要求が有るか否かを判断する。マイコン1にメモリ書換装置8が接続されていない場合には、制御データの書換え要求が無いと判断して、ステップS1は“No”側に進んで終了する。このときは、通常のエンジン制御の動作に移行する。
Next, a method for rewriting data in the flash memory 3 configured as described above will be described. FIG. 3 is a flowchart showing the flow of data rewriting in the flash memory 3. This rewriting flow is started, for example, by turning on the ignition switch of the vehicle.
First, in step S1, it is determined whether or not there is a request for rewriting control data on the in-vehicle microcomputer 1 side shown in FIG. If the memory rewriting device 8 is not connected to the microcomputer 1, it is determined that there is no request for rewriting control data, and step S1 proceeds to “No” and ends. At this time, the routine shifts to a normal engine control operation.

これに対し、例えばディーラーにてサービスマンが、図1に示すように、マイコン1の通信I/F6にコネクタ7を介してメモリ書換装置8を接続した場合には、マイコン1側で制御データの書換え要求が有ると判断する。この場合には、ステップS1は“Yes”側に進み、前回のデータの書き込みが正常に終了したか否かを判断する(ステップS2)。
前回の書き込みが正常に終了していたと判断した場合には、ステップS2は“Yes”側に進み、ステップS3をジャンプしてステップS4に入る。それ以降の動作については後述する。一方、前回の書き込みが正常に終了していないと判断した場合には、ステップS2は“No”側に進み、前回の書き込みのときに、フラッシュメモリ3に識別データが正しく書き込まれたか否かを判断する(ステップS3)。このとき、図2を参照して説明したように、識別データを書き込む識別ID領域3cは、フラッシュメモリ3の記憶領域にてローダー領域3a外の先頭の領域に割り付けられているので、たとえ前回の書き込みの途中に通信エラー等が発生した場合であっても、識別データについては、書き込み完了している可能性が高い。
On the other hand, for example, when a serviceman at a dealer connects the memory rewrite device 8 to the communication I / F 6 of the microcomputer 1 via the connector 7 as shown in FIG. It is determined that there is a rewrite request. In this case, step S1 proceeds to the “Yes” side, and it is determined whether or not the previous data writing has been completed normally (step S2).
If it is determined that the previous writing has been completed normally, step S2 proceeds to "Yes", jumps to step S3, and enters step S4. Subsequent operations will be described later. On the other hand, if it is determined that the previous writing has not ended normally, step S2 proceeds to “No”, and it is determined whether or not the identification data has been correctly written in the flash memory 3 at the time of the previous writing. Judgment is made (step S3). At this time, as described with reference to FIG. 2, the identification ID area 3c in which the identification data is written is allocated to the first area outside the loader area 3a in the storage area of the flash memory 3. Even when a communication error or the like occurs in the middle of writing, there is a high possibility that writing of identification data has been completed.

また、上述したように、識別データは、識別ID領域3cに冗長化して書き込まれているので、前回の書き込みの途中に通信エラー等によってデータの書換えに失敗した場合であっても、それがどのようなタイミングで発生したかを判断することができる。
すなわち、データの書換えを行うときには、フラッシュメモリ3のローダー領域3a外の領域に記憶された全ての情報を一度消去する。実際には、ローダー領域3aの外の領域は、便宜的に「FFFFF FFFFF」と書き込まれる。なお、記号Fはマイコンの初期値を表すものである。
In addition, as described above, the identification data is written redundantly in the identification ID area 3c, so even if the data rewrite fails due to a communication error or the like during the previous writing, It is possible to determine whether it has occurred at such a timing.
That is, when data is rewritten, all information stored in the area outside the loader area 3a of the flash memory 3 is once erased. Actually, the area outside the loader area 3a is written as “FFFFF FFFFF” for convenience. The symbol F represents the initial value of the microcomputer.

そして、例えばデータの書き込みを行っているときに通信エラー等が発生した場合において、識別ID領域3cに書き込まれた2つの識別データがどちらも「FFFFF FFFFF」のままの場合には、識別ID領域3cに識別データを書き込む前に、通信エラー等が発生したことが分かる。
また、2つの識別データが、互いに異なっている場合には、識別ID領域3cに識別データを書き込む途中に、通信エラー等が発生したことが分かる。
For example, when a communication error or the like occurs while data is being written, if both of the two identification data written in the identification ID area 3c remain “FFFFF FFFFF”, the identification ID area It can be seen that a communication error or the like has occurred before writing the identification data in 3c.
Further, when the two identification data are different from each other, it is understood that a communication error or the like has occurred during the writing of the identification data in the identification ID area 3c.

また、2つの識別データが、いずれも「FFFFF FFFFF」でなく、かつ、互いに一致している場合には、識別ID領域3cに識別データを書き込みした後で、通信エラー等が発生したことが分かる。
このように、識別ID領域3cに書き込まれた2つの識別データを比較することによって、通信エラー等が発生して書換えが止まったタイミングが、識別データの書き込み途中又はメモリ消去後でデータ書き込み前(初期値の状態)であるか、あるいは、識別データの書換え終了後又はメモリ消去前であるか、を判断できる。
If the two identification data are not “FFFFF FFFFF” and match each other, it is understood that a communication error or the like has occurred after writing the identification data in the identification ID area 3c. .
Thus, by comparing the two pieces of identification data written in the identification ID area 3c, the timing at which rewriting is stopped due to the occurrence of a communication error or the like is during the writing of the identification data or before the data is written after the memory is erased ( It is possible to determine whether it is the state of the initial value), or after completion of rewriting the identification data or before erasing the memory.

そして、上記のように、識別データの書換え終了後又はメモリ消去前のタイミングで、データの書換えが止まった場合には、識別ID領域3cに識別データが書き込まれている状態となるので、フラッシュメモリ3に元々書き込まれていたデータと、新たに書き込むデータとの関係を識別することができる。
ここで、前回の書き込みの際に、フラッシュメモリ3に識別データが正しく書き込まれていると判断した場合には、ステップS3は“Yes”側に進む。すると、この識別データをマイコン1側のフラッシュメモリ3から読み込み(ステップS4)、メモリ書換装置8側に識別データを返信する(ステップS5)。そして、フラッシュメモリ3に書き込まれていた識別データと、メモリ書換装置8内にてこれから再書き込みを行う新たなデータの識別データとが一致するか否かを、該メモリ書換装置8で判断してから、再書き込みの動作を開始する。
As described above, when rewriting of data is stopped at the timing after completion of rewriting of the identification data or before erasing the memory, the identification data is written in the identification ID area 3c. 3 can identify the relationship between the data originally written in 3 and the newly written data.
Here, when it is determined that the identification data is correctly written in the flash memory 3 at the time of the previous writing, step S3 proceeds to the “Yes” side. Then, the identification data is read from the flash memory 3 on the microcomputer 1 side (step S4), and the identification data is returned to the memory rewriting device 8 side (step S5). Then, the memory rewriting device 8 determines whether or not the identification data written in the flash memory 3 matches the identification data of new data to be rewritten in the memory rewriting device 8. Then, the rewrite operation is started.

具体的には、フラッシュメモリ3のローダー領域3a外の領域に記憶されている古いデータを消去し、そこに新しいデータをアドレス順に書き込む。このようにデータを再書き込みする際にも、識別データは、前記フラッシュメモリ3のローダー領域3a外の先頭の領域に割り付けて書き込みしておく。そして、再書き込みが完了したときに、サム・パリティ・チェックを行い、データ通信におけるデータの誤り(エラー)を検出する。   Specifically, old data stored in an area outside the loader area 3a of the flash memory 3 is erased, and new data is written therein in the order of addresses. Even when data is rewritten in this way, the identification data is allocated and written in the leading area outside the loader area 3a of the flash memory 3. When rewriting is completed, a sum parity check is performed to detect a data error (error) in data communication.

そして、ステップS7において、サム・パリティ・チェックを行い、通信エラーを検出したか否かを判断する。通信エラーを検出した場合には、“Yes”側に進み、ステップS3に戻り、上述の動作(ステップS3〜S7)を繰り返す。また、ステップS7において、通信エラーを検出しなかった場合には、“No”側に進み、再書き込みの動作を終了する。   In step S7, a sum parity check is performed to determine whether a communication error has been detected. If a communication error is detected, the process proceeds to “Yes”, returns to step S3, and repeats the above-described operations (steps S3 to S7). If no communication error is detected in step S7, the process proceeds to "No" and the rewriting operation is terminated.

以上に説明したように、図1に示すマイコン1にデータを再書き込みする際に、書き込み失敗したデータと同じデータを書き込むことができ、誤書き込みを防止することができる。
なお、ステップS3において、識別データが正しく書き込まれていないと判断した場合には、“No”側に進んで終了する。このときは、これ以上の書き込みを禁止するメッセージをメモリ書換装置8の表示用ディスプレイ8aに表示し、マイコン1自体を交換する。これにより、誤った種類のデータを書き込んでしまうことを防止することができる。
As described above, when data is rewritten to the microcomputer 1 shown in FIG. 1, the same data as the failed data can be written, and erroneous writing can be prevented.
If it is determined in step S3 that the identification data is not correctly written, the process proceeds to “No” and ends. At this time, a message prohibiting further writing is displayed on the display 8a of the memory rewriting device 8 to replace the microcomputer 1 itself. As a result, it is possible to prevent an incorrect type of data from being written.

また、上記書き込み禁止のメッセージに代わりに、全ての書き込みを許可する特殊なIDをメモリ書換装置8に返信して、これを表示用ディスプレイ8aに表示することもできる。この場合には、フラッシュメモリ3にどのような制御データでも書き込むことができるようになるのが、ディーラーのサービスマンが、メモリ書換装置8を操作して書き込み失敗したデータと同じデータを選択し、これをマイコン1に書き込むことができる。この場合には、マイコン1を交換しなくてもよくなり、コストの削減を図ることができる。   Also, instead of the write prohibition message, a special ID permitting all writing can be returned to the memory rewriting device 8 and displayed on the display 8a. In this case, any control data can be written in the flash memory 3, but the dealer's serviceman operates the memory rewriting device 8 to select the same data as the data that failed to be written, This can be written into the microcomputer 1. In this case, it is not necessary to replace the microcomputer 1, and the cost can be reduced.

本発明を実施する電子制御装置の一実施形態を示すシステム図The system diagram which shows one Embodiment of the electronic control apparatus which implements this invention フラッシュメモリのデータ割り付けを示すメモリマップMemory map showing flash memory data allocation 電子制御装置のデータ書換えの流れを示すフローチャートFlow chart showing flow of data rewriting of electronic control unit

符号の説明Explanation of symbols

1…車両制御用マイコン
2…CPU
3…フラッシュメモリ(FLASH EEPROM)
4…RAM
5…I/O
6…通信I/F
7…コネクタ
8…メモリ書換装置(電子システム診断テスター)
1 ... microcomputer for vehicle control 2 ... CPU
3. Flash memory (FLASH EEPROM)
4 ... RAM
5 ... I / O
6 ... Communication I / F
7 ... Connector 8 ... Memory rewrite device (electronic system diagnostic tester)

Claims (3)

電子制御装置に実装された記憶装置にデータを再書き込みする方法において、
前記記憶装置に元々書き込まれていた制御データと新たに書き込む制御データとの関係を識別する識別データを、該記憶装置の記憶領域にて少なくとも通信用データを常駐させる常駐領域外の先頭の領域に割り付けて書き込んでおき、
再書き込みの際に、前記記憶装置に書き込まれた識別データと、データ書き込みを行うメモリ書換装置に格納された新たなデータの識別データとの一致を判断してから、前記常駐領域外に書き込まれたデータを消去し、
前記新たなデータを再書き込みすることを特徴とする電子制御装置のデータ再書き込み方法。
In a method of rewriting data in a storage device mounted on an electronic control unit,
The identification data for identifying the relationship between the control data originally written in the storage device and the newly written control data is stored in the storage area of the storage device at least in the first area outside the resident area where the communication data resides. Allocate and write,
At the time of rewriting, it is determined that the identification data written in the storage device matches the identification data of new data stored in the memory rewriting device that performs data writing, and then written outside the resident area. Erase the data
A data rewriting method for an electronic control device, wherein the new data is rewritten.
前記識別データは、ベクター領域の直後に割り付けて書き込むことを特徴とする請求項1記載の電子制御装置のデータ再書き込み方法。   2. The data rewriting method for an electronic control device according to claim 1, wherein the identification data is allocated and written immediately after the vector area. 前記識別データは、冗長化して書き込むことを特徴とする請求項1又は請求項2記載の電子制御装置のデータ再書き込み方法。   3. The data rewriting method for an electronic control device according to claim 1, wherein the identification data is written in redundancy.
JP2004303466A 2004-10-18 2004-10-18 Data rewriting method for electronic control unit Active JP4812278B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004303466A JP4812278B2 (en) 2004-10-18 2004-10-18 Data rewriting method for electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004303466A JP4812278B2 (en) 2004-10-18 2004-10-18 Data rewriting method for electronic control unit

Publications (2)

Publication Number Publication Date
JP2006113985A true JP2006113985A (en) 2006-04-27
JP4812278B2 JP4812278B2 (en) 2011-11-09

Family

ID=36382437

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004303466A Active JP4812278B2 (en) 2004-10-18 2004-10-18 Data rewriting method for electronic control unit

Country Status (1)

Country Link
JP (1) JP4812278B2 (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0268623A (en) * 1988-09-02 1990-03-08 Nec Corp Program correction system
JPH04145596A (en) * 1990-10-08 1992-05-19 Fuji Photo Film Co Ltd Memory card and data management system therefor
JPH04290000A (en) * 1991-03-18 1992-10-14 Casio Comput Co Ltd Card data processor
JPH04367047A (en) * 1991-06-14 1992-12-18 Matsushita Electric Ind Co Ltd Memory check method after recovery of power supply
JPH1049445A (en) * 1996-07-29 1998-02-20 Saitama Nippon Denki Kk Id data backup method and portable terminal using the backup method
JPH10214183A (en) * 1997-01-30 1998-08-11 Nec Corp Computer bios updating system
JPH10333996A (en) * 1997-06-02 1998-12-18 Matsushita Electric Ind Co Ltd Recording/reproducing device and its method
JPH11141394A (en) * 1997-11-07 1999-05-25 Nissan Motor Co Ltd Memory rewriting device for controlling vehicle
JP2000020400A (en) * 1998-07-02 2000-01-21 Matsushita Electric Ind Co Ltd Memory reloading system for disk device
JP2003006057A (en) * 2001-06-21 2003-01-10 Noritsu Koki Co Ltd System and program for managing data record
JP2004265275A (en) * 2003-03-04 2004-09-24 Dainippon Printing Co Ltd Ic card and ic card program

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0268623A (en) * 1988-09-02 1990-03-08 Nec Corp Program correction system
JPH04145596A (en) * 1990-10-08 1992-05-19 Fuji Photo Film Co Ltd Memory card and data management system therefor
JPH04290000A (en) * 1991-03-18 1992-10-14 Casio Comput Co Ltd Card data processor
JPH04367047A (en) * 1991-06-14 1992-12-18 Matsushita Electric Ind Co Ltd Memory check method after recovery of power supply
JPH1049445A (en) * 1996-07-29 1998-02-20 Saitama Nippon Denki Kk Id data backup method and portable terminal using the backup method
JPH10214183A (en) * 1997-01-30 1998-08-11 Nec Corp Computer bios updating system
JPH10333996A (en) * 1997-06-02 1998-12-18 Matsushita Electric Ind Co Ltd Recording/reproducing device and its method
JPH11141394A (en) * 1997-11-07 1999-05-25 Nissan Motor Co Ltd Memory rewriting device for controlling vehicle
JP2000020400A (en) * 1998-07-02 2000-01-21 Matsushita Electric Ind Co Ltd Memory reloading system for disk device
JP2003006057A (en) * 2001-06-21 2003-01-10 Noritsu Koki Co Ltd System and program for managing data record
JP2004265275A (en) * 2003-03-04 2004-09-24 Dainippon Printing Co Ltd Ic card and ic card program

Also Published As

Publication number Publication date
JP4812278B2 (en) 2011-11-09

Similar Documents

Publication Publication Date Title
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
US6598114B2 (en) Electronic control unit including flash memory and method and apparatus for storing control data group into flash memory
JP3838840B2 (en) Computer
JP4480815B2 (en) Memory rewriting method and computer system
US6883060B1 (en) Microcomputer provided with flash memory and method of storing program into flash memory
JP4227149B2 (en) Information storage method for electronic control unit
JP2003256228A (en) Program rewriting device
US5933595A (en) Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
JP4302113B2 (en) In-vehicle control device
JP2006268176A (en) Data validity/invalidity deciding method for flash eeprom
JP4880105B2 (en) Memory function protection method for control device and control device
JP2001043101A (en) Method and device for changing memory contents of controller
JP2010113409A (en) Onboard electronic control device
JP4281808B2 (en) VEHICLE CONTROL DEVICE AND ITS CONTROL METHOD
US11169828B2 (en) Electronic control unit and method for verifying control program
JP4812278B2 (en) Data rewriting method for electronic control unit
JP2009026183A (en) Electronic control apparatus for automobile
US6973530B2 (en) Method for writing and erasing a non-volatile memory area
JP2019008693A (en) Vehicle-purpose electronic control unit
US7353348B2 (en) Nonvolatile memory and card reader provided with the same
JP2002175193A (en) Device and method for rewriting program
US20050034034A1 (en) Control device with rewriteable control data
US7299315B2 (en) Control device including connecting device for rewriting memory region
JP2004005152A (en) Rewriting device for nonvolatile memory
JP2009223449A (en) Vehicular electronic controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070829

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20090828

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20090828

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110105

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110307

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110307

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110307

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20110325

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110415

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110816

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110823

R150 Certificate of patent or registration of utility model

Ref document number: 4812278

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140902

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350