JP2002334023A - Electronic controller - Google Patents

Electronic controller

Info

Publication number
JP2002334023A
JP2002334023A JP2001141573A JP2001141573A JP2002334023A JP 2002334023 A JP2002334023 A JP 2002334023A JP 2001141573 A JP2001141573 A JP 2001141573A JP 2001141573 A JP2001141573 A JP 2001141573A JP 2002334023 A JP2002334023 A JP 2002334023A
Authority
JP
Japan
Prior art keywords
data
rewriting
electronic control
nonvolatile memory
flash rom
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.)
Pending
Application number
JP2001141573A
Other languages
Japanese (ja)
Inventor
Eiji Mori
英治 森
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 JP2001141573A priority Critical patent/JP2002334023A/en
Publication of JP2002334023A publication Critical patent/JP2002334023A/en
Pending legal-status Critical Current

Links

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To appropriately rewrite data into a nonvolatile memory without any hindrance to normal control. SOLUTION: A battery 21 is connected to an ECU 10 through an IG switch 22 and when the IG switch 22 is turned on, the ECU 10 is supplied with electric power. The ECU 10 is equipped with a power circuit 11, a CPU 12, a RAM 13, a flash ROM 14, an EEPROM 15, and an input/output port 16. The flash ROM 14 stores various control programs and data. The CPU 12 judges whether data need to be rewritten to the flash ROM 14 when the IG switch 22 is turned on and writes the same data as the data written in the flash ROM 14 to the flash ROM 14 again when the data need to be rewritten. After the rewriting, normal engine control is started.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、電気的に書き換え
可能な不揮発性メモリを備える電子制御装置において、
不揮発性メモリに書き込まれているデータと同じデータ
を再度不揮発性メモリに書き込むこと、すなわち不揮発
性メモリのデータ再書き込みを実施するための改良技術
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic control device having an electrically rewritable nonvolatile memory,
The present invention relates to an improved technique for writing the same data as the data written in the non-volatile memory to the non-volatile memory again, that is, for rewriting data in the non-volatile memory.

【0002】[0002]

【従来の技術】近年、車両用の電子制御装置として、フ
ラッシュROM等、電気的に書き換え可能な不揮発性メ
モリを備えたエンジンECUが用いられており、同EC
Uでは、フラッシュROMのデータ化けに対処すべく、
当該フラッシュROMのデータ再書き込みを実施するこ
とが検討されている。つまり、フラッシュROMのデー
タ保証は20年程度であるが、データを正確に保持する
ためには再書き込みが有効な手段と考えられる。
2. Description of the Related Art In recent years, as an electronic control unit for a vehicle, an engine ECU having an electrically rewritable nonvolatile memory such as a flash ROM has been used.
In U, in order to deal with garbled data in flash ROM,
It is being studied to rewrite the data in the flash ROM. In other words, the data guarantee of the flash ROM is about 20 years, but rewriting is considered to be an effective means to hold data accurately.

【0003】その従来例として、特開平8−15339
7号公報のデータ再書き込み制御装置がある。同公報の
装置では、車載バッテリの交換時を検出し、バッテリ交
換後において車速が所定値以上で且つエンジン回転数が
所定値以上の時に、EEPROMの書き込みデータを読
み出すと共に、その読み出したデータを当該EEPRO
Mに再書き込みするようにしていた。つまり、バッテリ
遮断の可能性が無い通常のエンジン制御時において、デ
ータの再書き込みを確実に実施するようにしていた。
[0003] As a conventional example, Japanese Patent Application Laid-Open No. H8-15339 has been proposed.
There is a data rewrite control device disclosed in Japanese Patent Application Laid-Open No. 7-107. In the device disclosed in the publication, when the vehicle-mounted battery is replaced, when the vehicle speed is equal to or higher than a predetermined value and the engine speed is equal to or higher than the predetermined value after the battery replacement, the write data in the EEPROM is read, and the read data is read. EEPRO
M was rewritten. In other words, during normal engine control where there is no possibility of battery shutdown, data rewriting is reliably performed.

【0004】[0004]

【発明が解決しようとする課題】上記従来公報のデータ
再書き込み制御装置は、車両番号、仕向け地データやそ
の他に逐次更新されるデータを記憶するためのEEPR
OMには使用できるが、プログラムメモリとして用いら
れるフラッシュROMには適用できない。なぜならば、
フラッシュROMの書き換え時には、当該フラッシュR
OMのデータが広範囲に渡って一括消去される。そのた
め、通常のエンジン制御を持続しながらデータの再書き
込みを実施しようとすると、エンジン制御等に影響が及
ぶこととなる。
The data rewriting control device disclosed in the above-mentioned publication discloses an EEPR for storing a vehicle number, a destination data and other data which are sequentially updated.
It can be used for OM, but not for flash ROM used as program memory. because,
When rewriting the flash ROM, the flash R
OM data is collectively erased over a wide area. For this reason, if data is rewritten while maintaining normal engine control, the engine control and the like will be affected.

【0005】また、上記従来技術の他に、エンジン制御
中にフラッシュROM内のデータのチェックサムを計算
してデータの正当性を確認し、異常発生時にはフェイル
セーフ処理を実施する方法も考えられる。しかしながら
その場合には、フェイルセーフ処理は実施できてもメモ
リデータを復旧させることはできない。そのため、EC
Uとして高い信頼性を確保することができない。
[0005] In addition to the above-mentioned prior art, a method of calculating the checksum of the data in the flash ROM during engine control to confirm the validity of the data, and performing a fail-safe process when an abnormality occurs can be considered. However, in that case, the memory data cannot be restored even if the fail-safe processing can be performed. Therefore, EC
As U, high reliability cannot be secured.

【0006】本発明は、上記問題に着目してなされたも
のであって、その目的とするところは、通常制御に支障
なく、不揮発性メモリのデータ再書き込みを適正に実施
することができる電子制御装置を提供することである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide an electronic control system capable of properly rewriting data in a non-volatile memory without affecting normal control. It is to provide a device.

【0007】[0007]

【課題を解決するための手段】本発明の電子制御装置は
前提として、電気的に書き換え可能な不揮発性メモリを
備え、その不揮発性メモリには各種の制御プログラムが
保持されている。また、該電子制御装置には、電源スイ
ッチを介して電源が供給される。そして、請求項1に記
載の発明では、電源スイッチがオンに操作された時に不
揮発性メモリのデータ再書き込みの要否が判断され、再
書き込み要であれば、不揮発性メモリに書き込まれてい
るデータと同じデータを再度不揮発性メモリに書き込む
ことが実施される。また、その再書き込みの後、通常制
御が開始される。本発明によれば、不揮発性メモリのデ
ータ再書き込みを電源スイッチのオン操作時に限定して
おり、書き込み完了後に通常制御が開始されるので、通
常制御に支障なく、不揮発性メモリのデータ再書き込み
を適正に実施することができる。
The electronic control unit of the present invention is provided with an electrically rewritable non-volatile memory, and the non-volatile memory holds various control programs. In addition, power is supplied to the electronic control device via a power switch. According to the first aspect of the present invention, when the power switch is turned on, it is determined whether or not the data in the nonvolatile memory needs to be rewritten. If the data needs to be rewritten, the data written in the nonvolatile memory is determined. The same data as described above is written into the non-volatile memory again. After the rewriting, the normal control is started. According to the present invention, the data rewriting of the nonvolatile memory is limited to the ON operation of the power switch, and the normal control is started after the writing is completed. It can be implemented properly.

【0008】また、請求項2に記載の発明では、電源デ
ィレイ処理に際して不揮発性メモリのデータ再書き込み
の要否が判断され、再書き込み要であれば、不揮発性メ
モリに書き込まれているデータと同じデータを再度不揮
発性メモリに書き込むことが実施される。また、その再
書き込みの後、当該電子制御装置への電源供給が遮断さ
れる。本発明によれば、不揮発性メモリのデータ再書き
込みを電源ディレイ処理時に限定することにより、請求
項1と同様に、通常制御に支障なく、不揮発性メモリの
データ再書き込みを適正に実施することができる。
According to the second aspect of the present invention, it is determined whether or not data rewriting of the nonvolatile memory is necessary at the time of the power supply delay processing, and if rewriting is necessary, the same as the data written in the nonvolatile memory is determined. Writing data to the non-volatile memory again is performed. After the rewriting, the power supply to the electronic control unit is cut off. According to the present invention, by limiting the data rewriting of the nonvolatile memory at the time of the power supply delay processing, the data rewriting of the nonvolatile memory can be appropriately performed without hindering the normal control as in the first aspect. it can.

【0009】より具体的には、請求項3に記載したよう
に、再書き込み要と判断された時、書き込み対象となる
不揮発性メモリのデータをRAMに一時保管し、その
後、前記一時保管したデータを当該不揮発性メモリに書
き込むと良い。
More specifically, as described in claim 3, when it is determined that rewriting is necessary, the data of the nonvolatile memory to be written is temporarily stored in the RAM, and thereafter, the temporarily stored data is stored. May be written in the nonvolatile memory.

【0010】上記請求項3の発明では、請求項4に記載
したように、不揮発性メモリを複数の記憶領域にて構成
し、再書き込み要と判断された時、個々の記憶領域毎に
再書き込みを実施すると良い。この場合、一時保管領域
として必要なRAM領域が小さくて済むという利点が得
られる。
According to the third aspect of the present invention, as described in the fourth aspect, the nonvolatile memory is composed of a plurality of storage areas, and when it is determined that rewriting is necessary, rewriting is performed for each individual storage area. It is good to carry out. In this case, there is an advantage that a RAM area required as a temporary storage area can be small.

【0011】データ再書き込みの判断基準としては、請
求項5に記載したように、電源スイッチがオン又はオフ
に操作された回数をカウントし、そのカウント値により
データ再書き込みの要否を判断すると良い。この場合、
データの再書き込みタイミングとして所定のカウント値
を設定しておけば、所望とするタイミングでのデータ再
書き込みが可能となる。
As a criterion for rewriting data, it is preferable to count the number of times the power switch is turned on or off and determine whether data rewriting is necessary based on the count value. . in this case,
If a predetermined count value is set as the data rewriting timing, the data can be rewritten at a desired timing.

【0012】請求項6に記載の発明では、不揮発性メモ
リのデータ再書き込みに引き続き、当該データが検査さ
れ、その検査結果が正常であることを条件に通常制御に
移行される。この場合、データの誤書き込みがチェック
され、再書き込み後におけるメモリデータの信頼性が向
上する。
In the invention described in claim 6, following the rewriting of the data in the nonvolatile memory, the data is inspected, and the control is shifted to the normal control on condition that the inspection result is normal. In this case, erroneous writing of data is checked, and the reliability of memory data after rewriting is improved.

【0013】請求項7に記載の発明では、不揮発性メモ
リに保持される各種データのうち、重要度の高いデータ
だけを再書き込みの対象とする。この場合、重要度に応
じて選択的にデータ再書き込みが実施されるので、デー
タ再書き込みに要する時間を短縮することができる。
According to the present invention, of the various data held in the non-volatile memory, only the data of high importance is to be rewritten. In this case, since the data rewriting is selectively performed according to the importance, the time required for the data rewriting can be reduced.

【0014】[0014]

【発明の実施の形態】以下、この発明を車載ディーゼル
エンジンの電子制御装置に具体化した一実施の形態を図
面に従って説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is embodied in an electronic control unit for a vehicle-mounted diesel engine will be described below with reference to the drawings.

【0015】図1には、電子制御装置(以下、ECUと
いう)10及びその周辺機器の構成を示す。図1に示す
ECU10は、ディーゼルエンジンの運転状態を制御す
るためのエンジンECUとして構成されており、燃料噴
射量や燃料噴射時期を最適に制御するものである。図1
において、ECU10には、イグニッションスイッチ
(以下、IGスイッチという)22を介してバッテリ2
1が接続されており、運転者による車両の始動操作に伴
いIGスイッチ22がオンされると、ECU10に電源
が供給される。
FIG. 1 shows the configuration of an electronic control unit (hereinafter referred to as an ECU) 10 and its peripheral devices. The ECU 10 shown in FIG. 1 is configured as an engine ECU for controlling the operation state of the diesel engine, and controls the fuel injection amount and the fuel injection timing optimally. FIG.
In the ECU 10, the battery 2 is connected to an ECU 10 via an ignition switch (hereinafter referred to as an IG switch) 22.
1 is connected, and power is supplied to the ECU 10 when the IG switch 22 is turned on in response to a driver's starting operation of the vehicle.

【0016】ECU10は周知の論理演算回路として構
成され、電源回路11、CPU12、RAM13、フラ
ッシュROM14、EEPROM15及び入出力ポート
16を備える。電源回路11は、IGスイッチ22のオ
ン時にバッテリ21からの入力電圧から所定の定電圧V
DD(例えば、5ボルト)を生成し、この定電圧VDD
をCPU12、RAM13、フラッシュROM14及び
EEPROM15にそれぞれ供給する。フラッシュRO
M14及びEEPROM15は何れも、電気的にデータ
の書き込み及び消去が可能な不揮発性メモリである。
The ECU 10 is configured as a well-known logical operation circuit, and includes a power supply circuit 11, a CPU 12, a RAM 13, a flash ROM 14, an EEPROM 15, and an input / output port 16. When the IG switch 22 is turned on, the power supply circuit 11 outputs a predetermined constant voltage V from the input voltage from the battery 21.
DD (for example, 5 volts), and the constant voltage VDD
Are supplied to the CPU 12, the RAM 13, the flash ROM 14, and the EEPROM 15, respectively. Flash RO
Each of the M14 and the EEPROM 15 is a nonvolatile memory capable of electrically writing and erasing data.

【0017】ここで、フラッシュROM14は、比較的
大容量(例えば512キロバイト)のプログラムメモリ
であり、各種の制御プログラムとデータとを保管する。
また、このフラッシュROM14は、複数のブロック
(記憶領域)に分割されており、ブロック毎にデータが
消去される。個々のブロックサイズは、例えば16キロ
バイトである。これに対し、EEPROM15は、比較
的小容量(例えば256バイト)のデータメモリであ
り、作動中に書き換えたいデータや、その他に車両毎の
固有ナンバー(車両番号)、車両の仕向け地に関するデ
ータ(仕向地データ)等を保管する。
The flash ROM 14 is a relatively large-capacity (for example, 512 kilobytes) program memory for storing various control programs and data.
The flash ROM 14 is divided into a plurality of blocks (storage areas), and data is erased for each block. Each block size is, for example, 16 kilobytes. On the other hand, the EEPROM 15 is a data memory having a relatively small capacity (for example, 256 bytes), and includes data to be rewritten during operation, data unique to each vehicle (vehicle number), and data relating to the destination of the vehicle (destination). Location data).

【0018】また、ECU10には、車載機器23が電
気的に接続されている。車載機器23は、各種センサ、
燃料噴射量制御用アクチュエータ、燃料噴射時期制御用
アクチュエータ等からなる。各種センサには、エンジン
回転数センサを含むエンジン運転状態を検出するための
センサや車速センサが含まれる。
The vehicle-mounted device 23 is electrically connected to the ECU 10. The on-vehicle device 23 includes various sensors,
It comprises a fuel injection amount control actuator, a fuel injection timing control actuator, and the like. The various sensors include a sensor for detecting an engine operation state including an engine speed sensor and a vehicle speed sensor.

【0019】次に、上記ECU10におけるフラッシュ
ROM14のデータ再書き込み動作を説明する。図2
は、CPU12により実施されるデータ再書き込み手順
を示すフローチャートであり、同ルーチンはIGスイッ
チ22のオン操作に伴い起動される。
Next, the operation of rewriting data in the flash ROM 14 in the ECU 10 will be described. FIG.
Is a flowchart showing a data rewriting procedure performed by the CPU 12, and this routine is started when the IG switch 22 is turned on.

【0020】さて図2が起動されると、先ずステップ1
01では、IGスイッチ22のオン回数をカウントす
る。続くステップ102では、前記ステップ101のカ
ウント値(IGオン回数)をEEPROM15に記憶す
る。
When FIG. 2 is started, first, in step 1
In 01, the number of times the IG switch 22 is turned on is counted. In the following step 102, the count value (the number of times the IG is turned on) in step 101 is stored in the EEPROM 15.

【0021】その後、ステップ103では、IGオン回
数のカウント値に基づき、今現在フラッシュROM14
の再書き込みタイミングであるか否かを判別する。すな
わち、IGオン回数が所定値(本実施の形態では100
0回)に達したか否かを判別し、所定値に達していなけ
れば再書き込みタイミングでないと判断し、所定値に達
していれば再書き込みタイミングであると判断する。再
書き込みタイミングでない場合、そのままステップ11
1まで進み、通常のエンジン制御に移行する。これによ
り、エンジンの始動準備が整うようになる。また、再書
き込みタイミングである場合、後続のステップ104に
進み、フラッシュROM14の再書き込みを実施する。
Thereafter, in step 103, the current flash ROM 14 is set based on the count value of the number of times the IG is turned on.
It is determined whether or not it is the rewrite timing. That is, the number of times the IG is turned on is a predetermined value (100 in the present embodiment).
0), it is determined that it is not the rewrite timing if the predetermined value is not reached, and it is determined that the rewrite timing is reached if the predetermined value is reached. If it is not the rewrite timing, step 11
The routine proceeds to 1 and shifts to normal engine control. As a result, the engine is ready for starting. If it is a rewrite timing, the process proceeds to the subsequent step 104 to rewrite the flash ROM 14.

【0022】詳しくは、ステップ104では、フラッシ
ュROM14のある記憶領域をデータの再書き込み対象
として指定する。この場合、フラッシュROM14のデ
ータ再書き込みは、当該フラッシュROM14のブロッ
ク単位で実施されるようになっており、ステップ104
ではフラッシュROM14の各記憶領域(各ブロック)
が一つずつ指定される。続くステップ105では、前記
指定された記憶領域内の全てのプログラム及びデータを
RAM13に一時的に保管する。RAM13に一時保管
されるデータ量はフラッシュROM14の一ブロック分
であるため、RAM13の記憶領域が小さくてもフラッ
シュROMデータの一時保管が可能となる。
More specifically, in step 104, a storage area in the flash ROM 14 is designated as a data rewrite target. In this case, the data rewriting of the flash ROM 14 is performed in units of blocks of the flash ROM 14.
Then, each storage area (each block) of the flash ROM 14
Are specified one by one. In the following step 105, all programs and data in the specified storage area are temporarily stored in the RAM 13. Since the amount of data temporarily stored in the RAM 13 is one block of the flash ROM 14, even if the storage area of the RAM 13 is small, flash ROM data can be temporarily stored.

【0023】その後、ステップ106では、前記ステッ
プ104で指定したフラッシュROM14の記憶領域を
一括消去する。そして、ステップ107では、RAM1
3に保管したデータによりフラッシュROM14への再
書き込みを実施する。
Thereafter, in step 106, the storage area of the flash ROM 14 designated in step 104 is erased collectively. Then, in step 107, the RAM1
Then, rewriting to the flash ROM 14 is performed using the data stored in the flash ROM 14.

【0024】ステップ108では、再書き込みデータを
対象にチェックサムを計算し、続くステップ109で
は、前記算出したチェックサムを正常なサム値と比較す
る。そして、それらが一致すれば再書き込みが正常に行
われたとみなしてステップ110に進む。ステップ11
0では、フラッシュROM14の全ての記憶領域につい
てデータ再書き込みが完了したか否かを判別し、NOで
あればステップ104に戻って次の記憶領域について再
書き込みを実施する。フラッシュROM14の全ての記
憶領域についてデータ再書き込みが完了した時点でステ
ップ111に進み、通常のエンジン制御に移行する。
In step 108, a checksum is calculated for the rewritten data, and in step 109, the calculated checksum is compared with a normal sum value. If they match, it is considered that rewriting has been performed normally, and the process proceeds to step 110. Step 11
At 0, it is determined whether or not data rewriting has been completed for all storage areas of the flash ROM 14. If NO, the process returns to step 104 and rewrites data for the next storage area. When the data rewriting has been completed for all the storage areas of the flash ROM 14, the process proceeds to step 111, and shifts to normal engine control.

【0025】一方、ステップ109でチェックサムが正
常なサム値と一致せず、同ステップがNOとなる場合、
書き込み異常が発生したとしてステップ112に進み、
所定のフェイルセーフ処理を実施する。具体的には、警
告ランプを点灯させたり、エンジン始動を禁止したりす
る。なお、再書き込みデータのチェックサムが正常なサ
ム値と一致しない場合には、例えば3回ほど再書き込み
を繰り返し、それでも正常に再書き込みが実施できなけ
ればステップ109をNO(書き込み異常)と判別する
と良い。
On the other hand, if the checksum does not match the normal sum value in step 109 and the step is NO,
Proceeding to step 112 assuming that a writing error has occurred,
Perform predetermined fail-safe processing. Specifically, a warning lamp is turned on, and starting of the engine is prohibited. If the checksum of the rewrite data does not match the normal sum value, the rewrite is repeated, for example, about three times. If the rewrite still cannot be performed normally, it is determined that the step 109 is NO (abnormal write). good.

【0026】因みに、図2のデータ再書き込み手順を示
すプログラムもフラッシュROM14に記憶保持されて
おり、必要に応じて再書き込みが実施される。当該再書
き込みプログラムについて再書き込みを実施する場合に
は、このプログラム自身をRAM13に移動してRAM
エリアにて動作させ、再書き込みを実施すると良い。
Incidentally, a program indicating the data rewriting procedure of FIG. 2 is also stored and held in the flash ROM 14, and rewriting is performed as necessary. When rewriting the rewriting program, the program itself is moved to the RAM 13 and
It is better to operate in the area and execute rewriting.

【0027】以上詳述した本実施の形態によれば、以下
に示す効果が得られる。フラッシュROM14のデータ
再書き込みをIGスイッチ22のオン操作時に限定し、
書き込み完了後に通常のエンジン制御を開始するので、
エンジン制御に支障なくフラッシュROM14のデータ
再書き込みを適正に実施することができる。
According to the embodiment described above, the following effects can be obtained. Rewriting of data in the flash ROM 14 is limited to the time when the IG switch 22 is turned on,
Normal engine control starts after writing is completed,
Data rewriting of the flash ROM 14 can be appropriately performed without any trouble in engine control.

【0028】また、フラッシュROM14のブロック単
位でデータ再書き込みを実施するので、一時保管領域と
して必要なRAM領域が小さくて済むという利点が得ら
れる。
Further, since data is rewritten in units of blocks of the flash ROM 14, there is an advantage that a RAM area required as a temporary storage area can be small.

【0029】フラッシュROM14のデータ再書き込み
に引き続き、その再書き込み分のデータを対象にチェッ
クサムによるデータ検査を実施するので、データの誤書
き込みが判定できる。それ故に、再書き込み後における
メモリデータの信頼性が向上する。
After rewriting the data in the flash ROM 14, a data check using a checksum is performed on the rewritten data, so that erroneous writing of data can be determined. Therefore, the reliability of the memory data after rewriting is improved.

【0030】なお本発明は、上記以外に次の形態にて具
体化できる。IGスイッチ22のオフ操作時にフラッシ
ュROM14のデータ再書き込みを実施する。すなわ
ち、ECU10の電源系の構成として、一般にはIGス
イッチ22と並列にリレー回路(図示せず)が設けられ
ており、IGスイッチ22のオフ操作時にはその後一定
時間だけECU10の電源遮断を遅らせる、いわゆるメ
インリレー制御(電源ディレイ処理)が実施される。か
かる場合、メインリレー制御(電源ディレイ処理)に際
してフラッシュROM14のデータ再書き込みの要否を
判断し、再書き込み要であればデータ再書き込みを実施
する。また、その再書き込みの後、ECU10への電源
供給を遮断する。本構成においても、上記実施の形態と
同様に、通常制御に支障なくフラッシュROM14のデ
ータ再書き込みを適正に実施することができる。
The present invention can be embodied in the following modes other than the above. When the IG switch 22 is turned off, the data in the flash ROM 14 is rewritten. That is, as a configuration of the power supply system of the ECU 10, a relay circuit (not shown) is generally provided in parallel with the IG switch 22, and when the IG switch 22 is turned off, the power supply of the ECU 10 is delayed for a certain period of time. Main relay control (power supply delay processing) is performed. In such a case, at the time of main relay control (power supply delay processing), it is determined whether or not data rewriting of the flash ROM 14 is necessary. If rewriting is necessary, data rewriting is performed. After the rewriting, the power supply to the ECU 10 is cut off. Also in this configuration, similarly to the above-described embodiment, data rewriting of the flash ROM 14 can be appropriately performed without hindering normal control.

【0031】上記実施の形態では、IGオン回数をカウ
ントし、そのカウント値が所定値に達した時に再書き込
みタイミングであると判断したが、これを以下のように
変更しても良い。 (1)IGスイッチ22のオフ回数をカウントし、その
カウント値が所定値に達した時に再書き込みタイミング
であると判断する。 (2)ECUに時計機能を持たせ、データ再書き込みの
時間間隔を計測する。そして、IGオン時又はIGオフ
時において、前回のデータ再書き込み時からの経過時間
が所定値(例えば一ヶ月)に達していれば再書き込みタ
イミングであると判断する。 (3)IGオン時又はIGオフ時において、前回のデー
タ再書き込み時からの車両走行距離が所定距離に達して
いれば再書き込みタイミングであると判断する。 (4)車載バッテリの交換時にその交換履歴を残してお
く。そして、IGオン時又はIGオフ時において、バッ
テリ交換の履歴があれば再書き込みタイミングであると
判断する。 (5)ディーラ等での車両の定期点検時において、外部
ツール(例えばダイアグツール)からの要求により再書
き込みタイミングであると判断する。なおこの場合に
は、フラッシュROMのデータをRAMに一時保管して
再書き込みを実施するのではなく、外部ツールからプロ
グラムデータを受信し、その受信データにより再書き込
みを実施するようにしても良い。外部ツールからの受信
データにより再書き込みを実施する場合、再書き込みデ
ータの信頼性が向上する。
In the above embodiment, the number of times the IG is turned on is counted, and it is determined that the rewrite timing is reached when the count value reaches a predetermined value. However, this may be changed as follows. (1) The number of times the IG switch 22 is turned off is counted, and when the count value reaches a predetermined value, it is determined that it is a rewrite timing. (2) The ECU is provided with a clock function to measure the time interval of data rewriting. Then, when the IG is turned on or the IG is turned off, if the elapsed time from the previous data rewriting has reached a predetermined value (for example, one month), it is determined that it is the rewriting timing. (3) When the IG is turned on or the IG is turned off, if the vehicle travel distance from the previous data rewrite has reached a predetermined distance, it is determined that it is the rewrite timing. (4) When the vehicle-mounted battery is replaced, the replacement history is kept. Then, if there is a history of battery replacement when the IG is turned on or when the IG is turned off, it is determined that it is the rewrite timing. (5) At the time of periodic inspection of the vehicle by a dealer or the like, it is determined that it is a rewrite timing according to a request from an external tool (for example, a diagnostic tool). In this case, instead of temporarily storing data in the flash ROM in the RAM and performing rewriting, program data may be received from an external tool and rewriting may be performed using the received data. When rewriting is performed using data received from an external tool, the reliability of the rewritten data is improved.

【0032】フラッシュROMに保持される各種データ
のうち、重要度の高いデータだけを再書き込みの対象と
する。この場合、重要度に応じて選択的にデータ再書き
込みが実施されるので、データ再書き込みに要する時間
を短縮することができる。
Of the various data held in the flash ROM, only the data of high importance is to be rewritten. In this case, since the data rewriting is selectively performed according to the importance, the time required for the data rewriting can be reduced.

【0033】更に、上記実施の形態では、「不揮発性メ
モリ」としてフラッシュROMを用いたが、これに限定
されない。例えば、不揮発性メモリとして比較的大容量
のEEPROMを用いても良い。
Further, in the above embodiment, the flash ROM is used as the "non-volatile memory", but the present invention is not limited to this. For example, a relatively large capacity EEPROM may be used as the nonvolatile memory.

【図面の簡単な説明】[Brief description of the drawings]

【図1】ECUとその周辺機器を示す構成図。FIG. 1 is a configuration diagram showing an ECU and its peripheral devices.

【図2】フラッシュROMのデータ再書き込み手順を示
すフローチャート。
FIG. 2 is a flowchart showing a procedure for rewriting data in a flash ROM.

【符号の説明】[Explanation of symbols]

10…ECU(電子制御装置)、12…CPU、13…
RAM、14…フラッシュROM(不揮発性メモリ)、
15…EEPROM、21…バッテリ、22…IGスイ
ッチ(電源スイッチ)。
10 ECU (electronic control unit), 12 CPU, 13
RAM, 14 ... Flash ROM (non-volatile memory),
15 ... EEPROM, 21 ... battery, 22 ... IG switch (power switch).

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】各種の制御プログラムを保持し且つ電気的
に書き換え可能な不揮発性メモリを備え、電源スイッチ
を介して電源が供給される電子制御装置において、 電源スイッチがオンに操作された時に前記不揮発性メモ
リのデータ再書き込みの要否を判断し、再書き込み要で
あれば、不揮発性メモリに書き込まれているデータと同
じデータを再度不揮発性メモリに書き込むことを実施
し、その再書き込みの後、通常制御を開始することを特
徴とする電子制御装置。
1. An electronic control device comprising a nonvolatile memory which retains various control programs and is electrically rewritable, and which is supplied with power via a power switch, wherein when the power switch is turned on, Judgment of the necessity of rewriting the data in the non-volatile memory is performed. If rewriting is necessary, the same data as the data written in the non-volatile memory is written into the non-volatile memory again. An electronic control unit for starting normal control.
【請求項2】各種の制御プログラムを保持し且つ電気的
に書き換え可能な不揮発性メモリを備え、電源スイッチ
のオフ時には、実際の電源供給の遮断を一時的に遅らせ
るための電源ディレイ処理を実施する電子制御装置にお
いて、 前記電源ディレイ処理に際して前記不揮発性メモリのデ
ータ再書き込みの要否を判断し、再書き込み要であれ
ば、不揮発性メモリに書き込まれているデータと同じデ
ータを再度不揮発性メモリに書き込むことを実施し、そ
の再書き込みの後、電源供給を遮断することを特徴とす
る電子制御装置。
2. A power supply delay process for temporarily delaying actual power supply interruption when a power switch is turned off, comprising a nonvolatile memory which holds various control programs and is electrically rewritable. The electronic control unit determines whether or not it is necessary to rewrite data in the non-volatile memory at the time of the power supply delay process. If rewriting is necessary, the same data as the data written in the non-volatile memory is again stored in the non-volatile memory. An electronic control device, which performs writing and shuts off power supply after rewriting.
【請求項3】再書き込み要と判断された時、書き込み対
象となる前記不揮発性メモリのデータをRAMに一時保
管し、その後、前記一時保管したデータを当該不揮発性
メモリに書き込む請求項1又は2に記載の電子制御装
置。
3. The method according to claim 1, wherein when it is determined that rewriting is necessary, data in said nonvolatile memory to be written is temporarily stored in a RAM, and then said temporarily stored data is written into said nonvolatile memory. An electronic control unit according to claim 1.
【請求項4】請求項3に記載の電子制御装置において、
前記不揮発性メモリは複数の記憶領域にて構成され、再
書き込み要と判断された時、個々の記憶領域毎に再書き
込みを実施する電子制御装置。
4. The electronic control device according to claim 3, wherein
An electronic control device, wherein the non-volatile memory includes a plurality of storage areas, and performs rewriting for each storage area when it is determined that rewriting is necessary.
【請求項5】電源スイッチがオン又はオフに操作された
回数をカウントする手段を備え、そのカウント値が所定
値に達していれば、前記不揮発性メモリのデータ再書き
込み要と判断する請求項1〜4の何れかに記載の電子制
御装置。
5. A nonvolatile memory according to claim 1, further comprising means for counting the number of times the power switch has been turned on or off, and if the count value has reached a predetermined value, it is determined that rewriting of data in said nonvolatile memory is necessary. An electronic control unit according to any one of claims 1 to 4.
【請求項6】前記不揮発性メモリのデータ再書き込みに
引き続き、当該データを検査し、検査結果が正常である
ことを条件に通常制御に移行する請求項1に記載の電子
制御装置。
6. The electronic control unit according to claim 1, wherein, following the rewriting of the data in the nonvolatile memory, the data is inspected, and the control is shifted to normal control on condition that the inspection result is normal.
【請求項7】前記不揮発性メモリに保持される各種デー
タのうち、重要度の高いデータだけを再書き込みの対象
とする請求項1〜6の何れかに記載の電子制御装置。
7. The electronic control device according to claim 1, wherein only data having a high degree of importance among various data stored in said nonvolatile memory is to be rewritten.
JP2001141573A 2001-05-11 2001-05-11 Electronic controller Pending JP2002334023A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001141573A JP2002334023A (en) 2001-05-11 2001-05-11 Electronic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001141573A JP2002334023A (en) 2001-05-11 2001-05-11 Electronic controller

Publications (1)

Publication Number Publication Date
JP2002334023A true JP2002334023A (en) 2002-11-22

Family

ID=18988009

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001141573A Pending JP2002334023A (en) 2001-05-11 2001-05-11 Electronic controller

Country Status (1)

Country Link
JP (1) JP2002334023A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009184609A (en) * 2008-02-08 2009-08-20 Nsk Ltd Electric power steering device
JP2013179808A (en) * 2012-02-29 2013-09-09 Denso Corp Control device
WO2016056255A1 (en) * 2014-10-07 2016-04-14 三菱重工業株式会社 Engine control system, vehicle system, and engine control method
JP2016224866A (en) * 2015-06-03 2016-12-28 株式会社デンソー Electronic controller

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009184609A (en) * 2008-02-08 2009-08-20 Nsk Ltd Electric power steering device
JP2013179808A (en) * 2012-02-29 2013-09-09 Denso Corp Control device
WO2016056255A1 (en) * 2014-10-07 2016-04-14 三菱重工業株式会社 Engine control system, vehicle system, and engine control method
JP2016075223A (en) * 2014-10-07 2016-05-12 三菱重工業株式会社 Engine control system, vehicle system, and engine control method
US10683824B2 (en) 2014-10-07 2020-06-16 Mitsubishi Heavy Industries, Ltd. Engine control system, vehicle system, and engine control method
JP2016224866A (en) * 2015-06-03 2016-12-28 株式会社デンソー Electronic controller

Similar Documents

Publication Publication Date Title
JP4065790B2 (en) In-vehicle electronic control unit
JP3626328B2 (en) Vehicle control device
JP2002082841A (en) Control data storage device of electronic controller
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
JP2002163895A (en) Device and method for safe operation of flush memory at high temperature
US7210055B2 (en) Electronic control apparatus
JP4248624B2 (en) Electronic control device for internal combustion engine.
JPH11238005A (en) Electronic controller and control system
JP4001088B2 (en) Electronic control unit
JP2002041367A (en) Vehicle controller
US6168321B1 (en) Electronic control unit having user breakable function
JP2002334023A (en) Electronic controller
JP5915490B2 (en) Electronic control unit
US11314634B2 (en) Electronic control unit and data protection method therefor
JP2002323902A (en) Electronic controller
WO2008099276A1 (en) Vehicle control device
JP2007062632A (en) Electronic control unit and storing method of data for abnormality generated time storage
JPH11141391A (en) Controller for automobile
JP2009116521A (en) Data rewriting method for memory
JP3644058B2 (en) Electronic control device for vehicle engine and data rewrite control device for EEPROM
JP2003104138A (en) System for monitoring vehicle control device for rewriting of data
JP7029366B2 (en) Electronic control device for automobiles
JP2012226674A (en) Electronic controller for automobile
JPH0962885A (en) Data recording device for vehicle
JP2004021520A (en) Electronic controller for vehicle