JP4636940B2 - Electronic control unit - Google Patents
Electronic control unit Download PDFInfo
- Publication number
- JP4636940B2 JP4636940B2 JP2005158293A JP2005158293A JP4636940B2 JP 4636940 B2 JP4636940 B2 JP 4636940B2 JP 2005158293 A JP2005158293 A JP 2005158293A JP 2005158293 A JP2005158293 A JP 2005158293A JP 4636940 B2 JP4636940 B2 JP 4636940B2
- Authority
- JP
- Japan
- Prior art keywords
- electronic control
- control device
- identification data
- area
- 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 - Fee Related
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Description
本発明は、制御プログラムや制御データを書き換え可能なフラッシュメモリを有する電子制御装置に関する。 The present invention relates to an electronic control device having a flash memory that can rewrite a control program and control data.
従来より、例えば特開平9−128229号公報に記載されているように、書き換え可能な領域の最後に特定のデータを設けチェックすることで、書き換えが異常終了したことを検出する技術が提案されている。更に、書き換えが異常終了した場合でも、書き換え可能でない領域に設けたプログラムによって、再書き換えを可能にしている。 Conventionally, as described in, for example, Japanese Patent Laid-Open No. 9-128229, a technique has been proposed for detecting that rewriting has ended abnormally by providing specific data at the end of a rewritable area and checking it. Yes. Furthermore, even if rewriting ends abnormally, rewriting is enabled by a program provided in a non-rewritable area.
しかしながら、プログラムの開発過程では、書き換え可能な領域に配置した制御プログラムのみを変更するだけでなく、時として書き換え可能でない領域に配置しているプログラムの変更が必要になる。書き換え可能な領域のプログラムが書き換え可能でない領域のプログラムまたはデータを参照する構成としている場合、書き換え可能な領域と書き換え可能でない領域の組み合わせを保証する必要が生じる。 However, in the program development process, it is necessary to change not only the control program arranged in the rewritable area but also change the program arranged in the non-rewritable area. When a program in a rewritable area refers to a program or data in a non-rewritable area, it is necessary to guarantee a combination of the rewritable area and the non-rewritable area.
プログラムの書き換えによって、書き換え可能な領域のプログラムのみが更新されることになるが、書き換え可能な領域のプログラムと書き換えが可能でない領域のプログラムが組み合わされた場合、書き換え可能でない領域のプログラムと書き換えが可能な領域のプログラムでは、例えばアドレスの参照先が一致しなくなり、期待した動作とならず再度書き換えができなくなる恐れがある。 By rewriting the program, only the program in the rewritable area is updated. However, when the program in the rewritable area and the program in the non-rewritable area are combined, the program in the non-rewritable area is rewritten. In a program in a possible area, for example, address reference destinations do not match, and there is a possibility that rewriting cannot be performed again without an expected operation.
本発明の目的は、書き換え可能な領域のプログラムと書き換え可能でない領域のプログラムの組み合わせを判断し、このような場合においても再書き換えができる手法を提供することにある。 An object of the present invention is to determine a combination of a program in a rewritable area and a program in a non-rewritable area, and to provide a method capable of rewriting even in such a case.
上記課題を解決するため、特許請求の範囲に記載の如く構成すればよい。In order to solve the above problems, the present invention may be configured as described in the claims.
本発明によれば、書き換え可能な領域のプログラムと書き換え可能でない領域のプログラムの組み合わせを誤った場合でも、これを検出し、制御プログラムの異常動作を防止することができる。 According to the present invention, even when a combination of a program in a rewritable area and a program in a non-rewritable area is wrong, this can be detected and an abnormal operation of the control program can be prevented.
以下、本発明が適用された実施例について図面を用いて説明する。 Embodiments to which the present invention is applied will be described below with reference to the drawings.
最初に図1を用いて、自動車に搭載されてエンジンの制御を行うエンジン制御装置1の全体構成を説明する。 First, an overall configuration of an engine control apparatus 1 that is mounted on a vehicle and controls an engine will be described with reference to FIG.
エンジン制御装置(以下、ECMという)1は、CPU2と、入力回路3と、出力回路4と通信回路5から構成されている。ECM1には、エンジンの動作状態を検出するセンサ6とエンジンに取り付けられた燃料噴射弁やイグナイタ等のアクチュエータ7が接続されている。具体的には、CPU2は複数のセンサ6からの信号を入力回路3を経由して取り込み、取り込んだ信号に基づきエンジンに対する制御量を演算し、その演算結果に基づいた制御信号を出力回路4を経由して出力しアクチュエータ7を駆動する。また、エンジン制御用プログラムやデータの書き換え時は、書き換え装置8をECM1に接続し、通信回路5を介してCPU2とデータのやり取りを行う。
An engine control device (hereinafter referred to as ECM) 1 includes a
CPU2は、MPU10と、I/O11と、不揮発性のROM12と、演算結果を一時的に記憶するRAM13を備えている。MPU10は、前記入力回路3または前記通信回路5からの信号の取り込み、および前記出力回路への信号の出力をI/O11を介して行う。これらの動作は、ROM12に記憶されたプログラムおよびデータに基づき実施される。また、RAM13は、プログラムの演算結果を一時的に記憶するのに用いる。
The
なお、ROM12は、一旦書き込んだデータを全て/一部消去することができ、再書き込みができるフラッシュROMを用いる。
The
次に、図2(a)を用いて前記ROM12の内容について説明する。
Next, the contents of the
ROM12は、書き換え可能なアプリケーション領域12Aと、書き換えを禁止したブート領域12Bとに区別される。
The
アプリケーション領域12Aには、エンジン制御用の制御プログラム12Aaと、制御データ12Abと、識別データ20を記憶している。ブート領域12Bには、イニシャライズプログラム12Baと、組み合わせチェックプログラム12Bbと、通信プログラム・データ12Bcと、フラッシュROM書き換え制御プログラム・データ12Bdを記憶している。
The
エンジン制御用の制御プログラム12Aaは、前述の通り、ECM1に接続された複数のセンサ6からの信号を取り込み、取り込んだ信号に基づきエンジンに対する制御量を演算しアクチュエータ7を駆動する。制御量を決定するための諸パラメータは制御データ
12Abとして記憶してある。
As described above, the engine control program 12Aa captures signals from the plurality of
ECM1に電源が投入されると、イニシャライズプログラム12Baが実行される。ここでは、CPU2を動作させるために必要な初期化処理を行う。その後、組み合わせチェックプログラム12Bbが図3に示すプログラムフローに従い実行される。
When the ECM 1 is powered on, the initialization program 12Ba is executed. Here, initialization processing necessary for operating the
通信プログラム・データ12Bcは、ECM1に接続される書き換え装置との通信制御を行うもので、書き換え装置からの書き換え要求を認識した時に、フラッシュROM書き換え制御プログラム・データ12Bdを実行する。フラッシュROM書き換え制御プログラム・データは、通信プログラム・データ12Bcを介して書き換え装置から送信される書き換えデータをROM12に書き込む処理を行う。
The communication program data 12Bc controls communication with the rewriting device connected to the ECM 1, and executes the flash ROM rewrite control program data 12Bd when a rewrite request from the rewriting device is recognized. The flash ROM rewrite control program data performs a process of writing the rewrite data transmitted from the rewrite device to the
次に、図3には、組み合わせチェックプログラム12Bbのプログラムフローを示す。これを用いてチェック組み合わせチェックの方法を説明する。 Next, FIG. 3 shows a program flow of the combination check program 12Bb. A check combination check method will be described using this.
組み合わせチェックプログラムが実行されるとS100において、ブート領域12Bのサム値を計算し、ブート領域識別データとしてRAM13に一時記憶しておく。S101においてはアプリケーション領域12Aに記憶してある識別データ20を読み出す。その後、S102において、RAM13に一時記憶したブート領域識別データと識別データ
20を比較し、値が一致した場合は組み合わせ正常と判断し、不一致の場合は組み合わせ異常と判断する。
When the combination check program is executed, the sum value of the boot area 12B is calculated in S100 and temporarily stored in the
ここで識別データ20には、予め机上で計算したブート領域のサム値をデータとして記憶させておく。また、机上での計算方法とS100におけるサム値の計算方法を同一にしておくことで、S102でのブート領域識別データと識別データ20の比較結果を一致させることができる。
Here, the
S102にて組み合わせが正常と判断できた場合は、S110にて通常の制御プログラムを実行し、エンジン制御を行う。異常と判断した場合は、S120の異常時処理を実行する。異常時処理では、ECM1に接続される書き換え装置8からの書き換え信号に応じてフラッシュROMの書き換え制御プログラム12Bdを起動しROMの書き換えを行うことで、組み合わせを正常な状態に戻すことができる。また、エンジン制御をフェールセーフモードとし、例えば制御プログラム12Aaで算出する制御量に対してフェールセーフ用の補正を掛け、アクチュエータ7に出力することで、エンジン回転数上限制限や車速上限制限を行うことができる。これにより、安全な車輌の移動が可能になる。
If it is determined that the combination is normal in S102, a normal control program is executed in S110 to perform engine control. If it is determined that there is an abnormality, the process at the time of abnormality in S120 is executed. In the abnormal process, the combination can be returned to a normal state by activating the flash ROM rewrite control program 12Bd in accordance with a rewrite signal from the
次に図4を用いて、組み合わせ結果異常が発生するケースについて説明する。 Next, a case where a combination result abnormality occurs will be described with reference to FIG.
(a)は、ブート領域12B1のサム値が$AAAAとなる場合のROMを例にしている。予め机上で計算したサム値も$AAAAとなるので、識別データ20aに$AAAAを記憶してある。この場合、ブート領域12B1のサム値を計算した結果と識別データ
20aは一致するので、組み合わせチェック結果は正常となるROMである。
(A) shows an example of a ROM when the sum value of the boot area 12B1 is $ AAAAA. Since the thumb value calculated in advance on the desk is also $ AAAAA, $ AAAAA is stored in the
(b)は、ブート領域12B2のサム値が$BBBBとなる場合のROMを例にしている。上記(a)と同様に識別データ20bに、ブート領域のサム値である$BBBBを記憶してあり、組み合わせチェック結果は正常となるROMである。
(B) shows an example of a ROM in the case where the sum value of the boot area 12B2 is $ BBBB. Similarly to (a) above, $ BBBB, which is the sum value of the boot area, is stored in the
(c)は、前記(a)のROMに前記(b)のROMを書き込んだ時のROMを示している。ブート領域12B1は、書き換えが禁止される領域であるため、(a)のROMのアプリケーション領域12A1が(b)のROMのアプリケーション領域12A2に置き換えられる。この場合、図3で示したプログラムフローS100において計算されるサム値は$AAAAとなるが、識別データ20bは、$BBBBを示しているため、これらを比較すると組み合わせ異常と判断できる。このようにプログラムの進化に伴い、ブート領域のプログラム内容が変更になった場合でも、プログラムフローS100でのサム値計算結果も変更になるため、組み合わせ異常と判断することができる。
(C) shows the ROM when the ROM (b) is written in the ROM (a). Since the boot area 12B1 is an area where rewriting is prohibited, the ROM application area 12A1 in (a) is replaced with the ROM application area 12A2 in (b). In this case, the sum value calculated in the program flow S100 shown in FIG. 3 is $ AAAA, but since the
前述の例では、ブート領域識別データにサム値を用いた例を示したが、図2(b)に示すように、ブート領域識別データ12BeをROMに記憶させて、アプリケーション領域12Aに記憶してある識別データ20と比較する方法もある。この場合、プログラムフローのブート領域のサム値を計算する処理S100が不要となり代わりにブート領域識別データ12Beを取得するだけで済むため、処理を簡素化することができる。
In the above example, the sum value is used for the boot area identification data. However, as shown in FIG. 2B, the boot area identification data 12Be is stored in the ROM and stored in the
また前述の例では、組み合わせチェックプログラムはECM1の起動時を例に説明したが、ROM12の書き換えが完了した時点で実行することもできる。この場合、書き換えが完了した時点で、ブート領域12Bとアプリケーション領域12Aの組み合わせの正常/異常を判断できるため、ECM1の再起動を待たなくてもエンジン制御を禁止またはフェールセーフモードとすることができる。
In the above-described example, the combination check program has been described by way of example when the ECM 1 is started. However, the combination check program can be executed when the rewriting of the
本発明は、制御プログラムや制御データを書き換え可能なフラッシュメモリを有する電子制御装置に関する。 The present invention relates to an electronic control device having a flash memory that can rewrite a control program and control data.
1…エンジン制御装置(ECM)、2…CPU、3…入力回路、4…出力回路、5…通信回路、6…センサ、7…アクチュエータ、8…書き換え装置、10…MPU、12…不揮発性のROM(フラッシュメモリ)、12A…アプリケーション領域、12B…ブート領域、13…RAM、20…識別データ。
DESCRIPTION OF SYMBOLS 1 ... Engine control apparatus (ECM), 2 ... CPU, 3 ... Input circuit, 4 ... Output circuit, 5 ... Communication circuit, 6 ... Sensor, 7 ... Actuator, 8 ... Rewriting device, 10 ... MPU, 12 ... Nonvolatile ROM (flash memory), 12A ... application area, 12B ... boot area, 13 ... RAM, 20 ... identification data.
Claims (7)
前記ブート領域識別データはブート領域の制御プログラムおよび制御データを識別するための番号をブート領域に記憶することを特徴とする電子制御装置。An electronic control device according to claim 1, wherein the boot area identification data stores a boot area control program and a number for identifying the control data in the boot area.
前記組み合わせチェック手段により比較された識別データが不一致のときは、前記制御プログラムの実行を禁止することを特徴とする電子制御装置。An electronic control device characterized in that execution of the control program is prohibited when the identification data compared by the combination check means does not match.
前記組み合わせチェック手段により比較された識別データが不一致のときは、前記制御プログラムを予め定めるフェールセーフモードとすることを特徴とする電子制御装置。An electronic control device according to claim 1, wherein when the identification data compared by the combination check means does not match, the control program is set to a predetermined fail-safe mode.
前記組み合わせ手段による比較は、前記電子制御装置の始動時に行うことを特徴とする電子制御装置。The comparison by the combination means is performed when the electronic control device is started.
前記始動時は、電子制御装置の起動毎とすることを特徴とする電子制御装置。The electronic control device according to claim 1, wherein the start is performed every time the electronic control device is started.
前記始動時は、前記外部装置からの指示に従い前記アプリケーション領域に記憶した制御プログラムおよび制御データの少なくともいずれかを書き換え毎とすることを特徴とする電子制御装置。The electronic control device according to claim 1, wherein at the time of start-up, at least one of a control program and control data stored in the application area is set for each rewrite according to an instruction from the external device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005158293A JP4636940B2 (en) | 2005-05-31 | 2005-05-31 | Electronic control unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005158293A JP4636940B2 (en) | 2005-05-31 | 2005-05-31 | Electronic control unit |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006338067A JP2006338067A (en) | 2006-12-14 |
JP4636940B2 true JP4636940B2 (en) | 2011-02-23 |
Family
ID=37558601
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005158293A Expired - Fee Related JP4636940B2 (en) | 2005-05-31 | 2005-05-31 | Electronic control unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4636940B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07219854A (en) * | 1994-02-03 | 1995-08-18 | Victor Co Of Japan Ltd | Microcomputer device containing nonvolatile memory |
JPH1083358A (en) * | 1996-09-09 | 1998-03-31 | Mitsubishi Electric Corp | Program rewriting method and controller provided with program rewriting function |
JPH11120083A (en) * | 1997-10-15 | 1999-04-30 | Toshiba Corp | Data processing device |
JPH11242505A (en) * | 1998-02-25 | 1999-09-07 | Canon Inc | Device with microcomputer |
-
2005
- 2005-05-31 JP JP2005158293A patent/JP4636940B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07219854A (en) * | 1994-02-03 | 1995-08-18 | Victor Co Of Japan Ltd | Microcomputer device containing nonvolatile memory |
JPH1083358A (en) * | 1996-09-09 | 1998-03-31 | Mitsubishi Electric Corp | Program rewriting method and controller provided with program rewriting function |
JPH11120083A (en) * | 1997-10-15 | 1999-04-30 | Toshiba Corp | Data processing device |
JPH11242505A (en) * | 1998-02-25 | 1999-09-07 | Canon Inc | Device with microcomputer |
Also Published As
Publication number | Publication date |
---|---|
JP2006338067A (en) | 2006-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3626328B2 (en) | Vehicle control device | |
JP4227149B2 (en) | Information storage method for electronic control unit | |
JP2009120054A (en) | Vehicle memory management device | |
US8190321B2 (en) | Electronic control unit with permission switching | |
CN110809755A (en) | Electronic control system | |
JP4600510B2 (en) | Control device and program | |
JP6663371B2 (en) | Electronic control unit | |
US6125309A (en) | Vehicle control device | |
JP4636940B2 (en) | Electronic control unit | |
JP6869743B2 (en) | Electronic control device for automobiles | |
JP6708596B2 (en) | Electronic control device and control program verification method | |
JP2005338955A (en) | Electronic control device | |
JP4784100B2 (en) | Processing device and firmware download method thereof. | |
JP2006268176A (en) | Data validity/invalidity deciding method for flash eeprom | |
JP2009026183A (en) | Electronic control unit for automobile | |
US20050034034A1 (en) | Control device with rewriteable control data | |
JP2002149412A (en) | Electronic controller | |
JP2003271420A (en) | Electronic control device | |
JP4479775B2 (en) | Vehicle control apparatus and program | |
JP7029366B2 (en) | Electronic control device for automobiles | |
JP6887277B2 (en) | Electronic control device for automobiles | |
JPH09171459A (en) | Electronic control equipment | |
JP2002323990A (en) | Electronic controller and method for initializing nonvolatile memory | |
JP2000192844A (en) | Engine control device | |
KR100230020B1 (en) | EPROM Diagnosis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070706 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20091222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100922 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100928 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101028 |
|
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: 20101116 |
|
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: 20101122 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131203 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4636940 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |