JPH11259371A - Electronic controller and program reloading method for the same - Google Patents

Electronic controller and program reloading method for the same

Info

Publication number
JPH11259371A
JPH11259371A JP10061409A JP6140998A JPH11259371A JP H11259371 A JPH11259371 A JP H11259371A JP 10061409 A JP10061409 A JP 10061409A JP 6140998 A JP6140998 A JP 6140998A JP H11259371 A JPH11259371 A JP H11259371A
Authority
JP
Japan
Prior art keywords
program
rewriting
memory
rewrite
stored
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
JP10061409A
Other languages
Japanese (ja)
Inventor
Yukari Terada
由香里 寺田
Masahiro Fukagawa
正浩 深川
Tadaharu Nishimura
忠治 西村
Eiji Tamada
英司 玉田
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 JP10061409A priority Critical patent/JPH11259371A/en
Publication of JPH11259371A publication Critical patent/JPH11259371A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Storage Device Security (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent stored contents in a reloadable non-volatile memory from being illegally reloaded by program runaway concerning an electronic controller in which a reloading program for reloading the stored contents in the reloadable non-volatile memory is built in at all the time. SOLUTION: Concerning the controller with which a loaded microcomputer performs reloading processing (S300-S330) for reloading a control program in a flash memory according to the reloading program in a mask ROM when reload permission conditions are established (S100: YES), the reloading program is stored with the arrangement of data, with which reloading processing can not be executed as it is, in the mask ROM and the microcomputer changes the reloading program in the mask ROM into original reloading processing enable data arrangement and transfers it to a RAM (S120). The reloading program in that RAM is executed and reloading processing is performed. Therefore, the stored contents in the flash memory are not changed even when the reloading program in the mask ROM is executed because of program runaway.

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 for controlling a predetermined control object, and more particularly to an electronic control device capable of rewriting a control program and control data used for control on board.

【0002】[0002]

【従来の技術】従来より、例えば自動車のエンジンやト
ランスミッション等を制御する電子制御装置として、電
気的に記憶内容の書き換え(詳しくは、データの消去及
び書き込み)が可能なフラッシュメモリやEEPROM
等の書換可能不揮発性メモリを備え、その書換可能不揮
発性メモリに記憶された制御プログラムや制御データ
を、当該装置の完成状態で書き換えることができるよう
にした所謂オンボード書き換え可能なものが提案されて
いる。
2. Description of the Related Art Conventionally, as an electronic control unit for controlling, for example, an engine or a transmission of a car, a flash memory or an EEPROM capable of electrically rewriting (specifically, erasing and writing data) the stored contents.
A so-called on-board rewritable memory which has a rewritable non-volatile memory such as the one described above and which can rewrite a control program and control data stored in the rewritable non-volatile memory in a completed state of the device has been proposed. ing.

【0003】即ち、この種の電子制御装置では、それに
搭載されたマイクロコンピュータの主要部を成すCPU
(中央演算処理装置)が、通常時には、書換可能不揮発
性メモリ内の制御プログラム及び制御データに従って、
エンジン等の制御対象を制御するための制御処理を行う
が、例えば別途接続される外部装置から書換信号を受け
ると、上記書換可能不揮発性メモリの記憶内容(つま
り、制御プログラムを構成するデータやその制御プログ
ラムの実行時に参照される制御データ)を上記外部装置
から送信されて来る新たなデータに書き換えるための書
換処理を行う。
That is, in this type of electronic control device, a CPU constituting a main part of a microcomputer mounted thereon is used.
(Central processing unit) normally, according to the control program and control data in the rewritable nonvolatile memory,
Control processing for controlling a control target such as an engine is performed. For example, when a rewrite signal is received from an external device that is separately connected, the storage contents of the rewritable nonvolatile memory (that is, data forming the control program and its A rewriting process for rewriting the control data referred to when the control program is executed) with new data transmitted from the external device is performed.

【0004】そして、このようなオンボード書き換え可
能な電子制御装置によれば、市場への供給後に、何等か
の原因で動作内容(制御内容)を変更しなければならな
い事態が起こったとしても、極めて簡単に対応すること
ができる。また、この種の電子制御装置としては、一般
に下記の,の形態がある。
According to such an on-board rewritable electronic control device, even if the operation contents (control contents) must be changed for some reason after being supplied to the market, It can be handled very easily. Further, as this type of electronic control device, there are generally the following modes.

【0005】:書換処理を行うための書換プログラム
が、書き換え対象でない不揮発性メモリ(例えば書き換
え不可能な不揮発性ROM)に予め記憶されており、C
PUが、上記書き換え対象でない不揮発性メモリ内の書
換プログラムを実行して書換処理を行う。
[0005] A rewriting program for performing a rewriting process is stored in advance in a non-rewritable non-volatile memory (for example, a non-rewritable non-volatile ROM).
The PU executes the rewriting program in the non-rewriting non-volatile memory to perform the rewriting process.

【0006】:書換処理を行うための書換プログラム
を、外部装置側から受信して揮発性のRAMに転送し、
CPUが、そのRAMに転送された書換プログラムを実
行して書換処理を行う。
[0006] A rewriting program for performing a rewriting process is received from an external device side and transferred to a volatile RAM,
The CPU performs the rewriting process by executing the rewriting program transferred to the RAM.

【0007】[0007]

【発明が解決しようとする課題】ここで、上記のよう
に、書換プログラムが所定の不揮発性メモリに常時内蔵
されている構成の電子制御装置(書換プログラム内蔵の
電子制御装置)によれば、上記のように書換プログラ
ムを外部装置側から送信してやる必要がないため、書換
可能不揮発性メモリの記憶内容を書き換えるために要す
る延べ時間を比較的短縮することができ、時間的効率が
良いという点で有利である。
Here, as described above, according to the electronic control device having the configuration in which the rewrite program is always built in the predetermined nonvolatile memory (the electronic control device with the built-in rewrite program), Since it is not necessary to transmit the rewriting program from the external device side as in the above, the total time required for rewriting the storage contents of the rewritable nonvolatile memory can be relatively shortened, which is advantageous in that time efficiency is good. It is.

【0008】しかしながら、こうした書換プログラム内
蔵の電子制御装置では、電気的ノイズ等によってマイク
ロコンピュータのCPUにプログラム暴走が生じると、
書換プログラムが不用意に実行されて、書換可能不揮発
性メモリ内の正常な制御プログラムや制御データが不適
当な内容に書き換えられてしまう虞がある。
However, in such an electronic control device with a built-in rewrite program, when a program runaway occurs in the CPU of the microcomputer due to electric noise or the like,
The rewrite program may be executed carelessly, and the normal control program and control data in the rewritable nonvolatile memory may be rewritten to inappropriate contents.

【0009】そして、制御プログラムや制御データが不
適当な内容に書き換えられてしまうと、その後は、周知
のウォッチドックタイマ回路等によってマイクロコンピ
ュータにリセット信号が与えられたとしても、正常な制
御動作を行うことができなくなってしまう。
If the control program or the control data is rewritten to inappropriate contents, then, even if a reset signal is given to the microcomputer by a well-known watchdog timer circuit or the like, a normal control operation is performed. You will not be able to do it.

【0010】本発明は、こうした問題に鑑みなされたも
のであり、書換可能不揮発性メモリの記憶内容を書き換
えるための書換プログラムが常時内蔵されている電子制
御装置において、プログラム暴走が生じても、上記書換
可能不揮発性メモリの記憶内容が不適当に書き換えられ
てしまうことを防止することを目的としている。
The present invention has been made in view of such a problem, and in an electronic control device in which a rewrite program for rewriting the storage contents of a rewritable nonvolatile memory is always incorporated, even if a program runaway occurs, An object of the present invention is to prevent the storage contents of a rewritable nonvolatile memory from being inappropriately rewritten.

【0011】[0011]

【課題を解決するための手段、及び発明の効果】上記目
的を達成するためになされた請求項1に記載の本発明の
電子制御装置は、プログラムに従って処理を行う演算処
理手段と、記憶内容の書き換えが可能であると共に、所
定の制御対象を制御するためのプログラムを記憶する書
換可能不揮発性メモリと、その書換可能不揮発性メモリ
の記憶内容を書き換えるための書換プログラムが記憶さ
れた書換プログラム記憶用メモリとを備えている。
Means for Solving the Problems and Effects of the Invention The electronic control apparatus of the present invention according to the first aspect of the present invention, which has been made to achieve the above object, comprises: an arithmetic processing means for performing processing according to a program; A rewritable nonvolatile memory that is rewritable and stores a program for controlling a predetermined control target, and a rewritable program storage that stores a rewritable program for rewriting the storage content of the rewritable nonvolatile memory. And a memory.

【0012】尚、本発明において、プログラムとは、そ
のプログラムを構成する命令やアドレス等のデータ(プ
ログラムコード)だけではなく、該プログラムの実行時
に参照されるデータを含むものである。そして、演算処
理手段は、通常時には、書換可能不揮発性メモリに記憶
されたプログラムに従って、前記制御対象を制御するた
めの制御処理を行い、特定の書換条件が成立した場合に
は、書換プログラム記憶用メモリに記憶された書換プロ
グラムに従って、書換可能不揮発性メモリの記憶内容を
書き換える書換処理を行う。
In the present invention, a program includes not only data (program code) such as instructions and addresses constituting the program, but also data referred to when the program is executed. The arithmetic processing means normally performs control processing for controlling the control target in accordance with a program stored in the rewritable nonvolatile memory, and when a specific rewrite condition is satisfied, a rewrite program storage According to the rewriting program stored in the memory, a rewriting process for rewriting the storage content of the rewritable nonvolatile memory is performed.

【0013】ここで特に、本発明の電子制御装置におい
て、前記書換プログラムは、当該プログラムを構成する
データの配列が予め定められた規則に基づき前記書換処
理を行うことができない配列に変更された状態で、書換
プログラム記憶用メモリに記憶されている。そして更
に、本発明の電子制御装置は、書換プログラム再生手段
を備えており、この書換プログラム再生手段は、書換条
件が成立した場合に、書換プログラム記憶用メモリに記
憶されている書換プログラムを読み出して、そのプログ
ラムのデータ配列を、前記規則に基づき書換処理を行う
ことができる正常な配列に変更すると共に、その配列変
更後の書換プログラムを記憶内容の読み出し及び書き込
みが可能な揮発性メモリに書き込み、演算処理手段に、
その揮発性メモリ内の書換プログラムに従って書換処理
を行わせる。
[0013] In the electronic control apparatus of the present invention, the rewriting program may be arranged such that an array of data constituting the program is changed to an array in which the rewriting process cannot be performed based on a predetermined rule. And stored in the memory for storing the rewriting program. Further, the electronic control device of the present invention includes a rewriting program reproducing unit. The rewriting program reproducing unit reads out the rewriting program stored in the rewriting program storage memory when the rewriting condition is satisfied. The data array of the program is changed to a normal array that can perform the rewriting process based on the rule, and the rewritten program after the array change is written to a volatile memory capable of reading and writing the stored content, In the arithmetic processing means,
The rewriting process is performed according to the rewriting program in the volatile memory.

【0014】つまり、本発明の電子制御装置では、請求
項3に記載のように、常時内蔵される書換プログラム
を、そのままでは書換処理を行うことができないデータ
配列に変更して、書換プログラム記憶用メモリに記憶さ
せておき、書換条件が成立した場合(即ち、書換可能不
揮発性メモリの記憶内容を書き換える場合)には、書換
プログラム記憶用メモリ内の書換プログラムを読み出し
て、そのプログラムのデータ配列を、書換処理が可能な
本来の正常な配列に変更すると共に、その配列変更後の
書換プログラムを揮発性メモリに書き込み、演算処理手
段に、該揮発性メモリ内の本来の書換プログラムに従っ
て書換処理を行わせる、というプログラム書き換え方法
を採用している。
That is, in the electronic control device of the present invention, the rewrite program which is always contained is changed to a data array which cannot be rewritten as it is, and the rewrite program for storing the rewrite program is stored. When the rewrite condition is satisfied (that is, when the storage content of the rewritable nonvolatile memory is rewritten), the rewrite program in the rewrite program storage memory is read, and the data array of the program is changed. In addition, the array is changed to an original normal array capable of rewriting, the rewriting program after the array is changed is written in the volatile memory, and the arithmetic processing means performs the rewriting in accordance with the original rewriting program in the volatile memory. Program rewriting method.

【0015】このため、演算処理手段にプログラム暴走
が生じて、書換プログラム記憶用メモリ内の書換プログ
ラムが実行されたとしても、書換可能不揮発性メモリの
記憶内容が不適当に書き換えられてしまうことがない。
また、当該電子制御装置への電力供給を遮断すれば、揮
発性メモリ内の記憶内容は消失されるため、書換処理可
能な本来の書換プログラムが揮発性メモリに記憶された
ままにならない。
For this reason, even if a program runaway occurs in the arithmetic processing means and the rewrite program in the rewrite program storage memory is executed, the storage contents of the rewritable nonvolatile memory may be inappropriately rewritten. Absent.
In addition, if the power supply to the electronic control device is cut off, the stored contents in the volatile memory are lost, so that the original rewrite program that can be rewritten is not stored in the volatile memory.

【0016】よって、本発明の電子制御装置及びプログ
ラム書き換え方法によれば、プログラム暴走が生じて
も、書換可能不揮発性メモリの記憶内容が不適当に書き
換えられてしまうことを防止することができる。ところ
で、書換プログラム記憶用メモリとしては、請求項2に
記載のように、記憶内容の書き換えが不可能な不揮発性
ROM(読み出し専用メモリ)を用いることができる。
Therefore, according to the electronic control device and the program rewriting method of the present invention, it is possible to prevent the storage contents of the rewritable nonvolatile memory from being improperly rewritten even if a program runaway occurs. By the way, as the memory for storing the rewrite program, a non-volatile ROM (read only memory) whose storage contents cannot be rewritten can be used as described in claim 2.

【0017】また、書換可能不揮発性メモリとしては、
フラッシュメモリ(フラッシュROM)やEEPROM
が一般的であるが、電気的に書き換え可能な他のROM
を用いても良い。一方、配列変更後の本来の書換プログ
ラムが書き込まれる揮発性メモリとしては、一般的なR
AMを用いることができる。
Further, as the rewritable nonvolatile memory,
Flash memory (flash ROM) and EEPROM
Is commonly used, but other electrically rewritable ROMs
May be used. On the other hand, as a volatile memory in which an original rewrite program after an array change is written, a general R
AM can be used.

【0018】[0018]

【発明の実施の形態】以下、本発明の一実施形態につい
て、図面を用いて説明する。まず図1は、自動車に搭載
されて内燃機関型エンジンの制御を行う、実施形態の電
子制御装置(以下、ECUという)1の構成を表すブロ
ック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. First, FIG. 1 is a block diagram illustrating a configuration of an electronic control unit (hereinafter, referred to as an ECU) 1 according to an embodiment, which is mounted on an automobile and controls an internal combustion engine.

【0019】図1に示すように、ECU1は、エンジン
の運転状態を検出する様々なセンサからの信号を入力し
て波形処理する入力回路3と、入力回路3からのセンサ
信号に基づき、エンジンを制御するための様々な処理を
行うマイクロコンピュータ(以下、マイコンという)5
と、マイコン5からの制御信号に応じて、エンジンに取
り付けられたインジェクタ(燃料噴射弁)やイグナイタ
等のアクチュエータへ駆動信号を出力する出力回路7と
を備えている。
As shown in FIG. 1, an ECU 1 inputs signals from various sensors for detecting the operating state of the engine and performs waveform processing on the signals. The ECU 1 controls the engine based on the sensor signals from the input circuit 3. A microcomputer (hereinafter, referred to as a microcomputer) 5 that performs various processes for control
And an output circuit 7 that outputs a drive signal to an actuator such as an injector (fuel injection valve) or an igniter attached to the engine in accordance with a control signal from the microcomputer 5.

【0020】そして、ECU1は、マイコン5がエンジ
ンを制御するために用いるプログラムを、オンボード書
き換え可能に構成されており、そのプログラムを書き換
える際には、当該ECU1にデータ書換装置9が接続さ
れる。次に、マイコン5は、プログラムに従って処理を
行う演算処理手段としてのCPU11と、CPU11に
よって実行されるプログラムを格納する不揮発性のマス
クROM13及びフラッシュメモリ15と、CPU11
の演算結果等を一時格納するための揮発性メモリとして
のRAM17と、前記入力回路3等からの信号を受け取
ると共に、出力回路7に制御信号を出力するためのI/
O19と、データ書換装置9との間でデータ通信を行う
ための通信回路21と、図示しない各種レジスタ等を備
えている。
The ECU 1 is configured so that a program used by the microcomputer 5 for controlling the engine can be rewritten on board. When rewriting the program, a data rewriting device 9 is connected to the ECU 1. . Next, the microcomputer 5 includes a CPU 11 as arithmetic processing means for performing processing according to the program, a non-volatile mask ROM 13 and a flash memory 15 for storing a program to be executed by the CPU 11,
And a RAM 17 as a volatile memory for temporarily storing the calculation result of the I / O and a signal for receiving a signal from the input circuit 3 and outputting a control signal to the output circuit 7.
A communication circuit 21 for performing data communication between the O19 and the data rewriting device 9 and various registers (not shown) are provided.

【0021】ここで、フラッシュメモリ15は、所定の
書換電圧が印加された状態でデータの書き換え(消去及
び書き込み)が可能な不揮発性ROMである。そして、
このフラッシュメモリ15には、エンジンを制御するた
めのプログラム(詳しくは、エンジン制御用の制御プロ
グラムを構成するデータと、その制御プログラムの実行
時に参照される制御データ)が記憶されている。尚、図
1には示されていないが、当該ECU1には、マイコン
5からの指令に応じてフラッシュメモリ15に上記書換
電圧を印加する電圧印加回路が設けられている。
Here, the flash memory 15 is a nonvolatile ROM capable of rewriting (erasing and writing) data while a predetermined rewriting voltage is applied. And
The flash memory 15 stores a program for controlling the engine (specifically, data constituting a control program for engine control and control data referred to when the control program is executed). Although not shown in FIG. 1, the ECU 1 is provided with a voltage application circuit for applying the rewrite voltage to the flash memory 15 in accordance with a command from the microcomputer 5.

【0022】これに対して、マスクROM13は、デー
タの書き換えが不可能な不揮発性ROMである。そし
て、このマスクROM13には、マイコン5のリセット
解除直後に実行されるブートプログラムと、フラッシュ
メモリ15の記憶内容(即ち、制御プログラムを構成す
るデータ及び制御データ)をデータ書換装置9から送信
されて来る新たなデータに書き換えるための書換プログ
ラムとが記憶されている。
On the other hand, the mask ROM 13 is a nonvolatile ROM from which data cannot be rewritten. The boot program executed immediately after the reset of the microcomputer 5 is released and the contents stored in the flash memory 15 (that is, data and control data constituting the control program) are transmitted from the data rewriting device 9 to the mask ROM 13. A rewriting program for rewriting with new data to come is stored.

【0023】但し、マスクROM13内において、上記
書換プログラムは、そのデータ配列が、予め定められた
規則に基づき、そのままではフラッシュメモリ15の記
憶内容を書き換えることができない配列に変更された状
態で格納されている。具体的に説明すると、まず前提と
して、本実施形態のマイコン5においては、CPU11
で解読/実行される1命令のデータ長が16ビットであ
るのに対して、マスクROM13,フラッシュメモリ1
5,及びRAM17の各1アドレスには、8ビットのデ
ータが格納される。このため、プログラムを格納するマ
スクROM13等のメモリにおいては、本来ならば、例
えば、偶数アドレスに1命令の前半部を成す8ビットデ
ータが格納され、その次の奇数アドレスに1命令の後半
部を成す8ビットデータが格納される。
However, in the mask ROM 13, the above-mentioned rewriting program is stored in a state in which the data arrangement is changed to an arrangement in which the stored contents of the flash memory 15 cannot be rewritten as it is, based on a predetermined rule. ing. Specifically, first, as a premise, in the microcomputer 5 of the present embodiment, the CPU 11
The data length of one instruction decoded / executed by the mask ROM 13 and the flash memory 1 is 16 bits.
5, and one address of the RAM 17 store 8-bit data. For this reason, in a memory such as the mask ROM 13 for storing a program, originally, for example, 8-bit data forming the first half of one instruction is stored in an even address, and the second half of one instruction is stored in the next odd address. The stored 8-bit data is stored.

【0024】ここで、本実施形態では、フラッシュメモ
リ15の記憶内容を書き換えることができる本来の書換
プログラムを構成する8ビットずつの単位データを、先
頭のものから順にD0 ,D1 ,D2 ,D3 ,…,Dn-3
,Dn-2 ,Dn-1 ,Dn とすると、図2(a)に示す
如く、マスクROM13には、上記単位データD0 〜D
n が、偶数番目のデータと奇数番目のデータとを夫々逆
にして記憶されている。
Here, in this embodiment, the 8-bit unit data constituting the original rewrite program capable of rewriting the storage contents of the flash memory 15 is sequentially assigned to D0, D1, D2, D3,. …, Dn-3
, Dn-2, Dn-1, and Dn, the mask data in the mask ROM 13 are stored in the mask ROM 13 as shown in FIG.
n is stored by reversing the even-numbered data and the odd-numbered data.

【0025】尚、図2において、A0 ,A2 ,…,An-
3 ,An-1 は偶数アドレスであり、A1 ,A3 ,…,A
n-2 ,An は奇数アドレスである。そして、D0 ,D2
,…,Dn-3 ,Dn-1 は、本来ならば偶数アドレスに
格納されるべき単位データであり、D1 ,D3 ,…,D
n-2 ,Dn は、本来ならば奇数アドレスに格納されるべ
き単位データである。
In FIG. 2, A0, A2,...
3, An-1 are even addresses, and A1, A3,.
n-2 and An are odd addresses. And D0, D2
,..., Dn-3, Dn-1 are unit data that should be stored in even addresses, and D1, D3,.
n-2 and Dn are unit data that should be stored at odd addresses.

【0026】このため、CPU11がマスクROM13
のアドレスA0 〜An をアクセスして、そのマスクRO
M13内の書換プログラムを実行したとしても、1命令
の前半部を成す8ビットデータと後半部を成す8ビット
データとが逆になっているため、フラッシュメモリ15
の記憶内容を書き換えることはできないのである。
For this reason, the CPU 11
To the address A0 to An of the mask RO
Even if the rewrite program in M13 is executed, the 8-bit data forming the first half of one instruction and the 8-bit data forming the second half of the instruction are reversed.
Cannot be rewritten.

【0027】また仮に、マスクROM13の1アドレス
当りに1命令分のデータが格納されるとしても(つま
り、1命令のデータ長が8ビットであるか、逆に、マス
クROM13の1アドレス当りに16ビットのデータが
格納されるとしても)、通常、この種のフラッシュメモ
リ15は、複数種類の命令が予め定められた順序で実行
された場合にのみ、データの消去や書き込みが可能とな
るように設計されているため、図2(a)のようにデー
タ配列が変更された書換プログラムが実行されても、フ
ラッシュメモリ15の記憶内容が書き換えられることは
ない。
Even if data for one instruction is stored per address of the mask ROM 13 (that is, the data length of one instruction is 8 bits, or conversely, 16 bits per address of the mask ROM 13). Normally, this type of flash memory 15 is configured such that data can be erased or written only when a plurality of types of instructions are executed in a predetermined order. Due to the design, even if the rewriting program in which the data arrangement is changed as shown in FIG. 2A is executed, the storage contents of the flash memory 15 are not rewritten.

【0028】このようなECU1において、マイコン5
のCPU11は、リセット解除直後に、マスクROM1
3内のブートプログラムを実行し、データ書換装置9が
接続されていない通常時には、そのブートプログラムに
てフラッシュメモリ15内の制御プログラムをコールし
て、エンジンを制御するための制御処理を行う。
In such an ECU 1, the microcomputer 5
Immediately after reset release, the mask ROM 1
When the boot program in the flash memory 15 is normally executed when the data rewriting device 9 is not connected, the control program in the flash memory 15 is called by the boot program to perform control processing for controlling the engine.

【0029】また、マイコン5のCPU11は、ブート
プログラムの実行時に、後述する書換許可条件が成立し
ていると判断すると、マスクROM13内の書換プログ
ラムを、フラッシュメモリ15の記憶内容を書き換える
ことができる本来のデータ配列に変更してRAM17に
書き込む。
When the CPU 11 of the microcomputer 5 determines that a rewriting permission condition described later is satisfied at the time of executing the boot program, the CPU 11 of the microcomputer 5 can rewrite the rewriting program in the mask ROM 13 with the contents stored in the flash memory 15. The data is changed to the original data array and written to the RAM 17.

【0030】そして、CPU11は、本来のデータ配列
に戻されたRAM17内の書換プログラムを実行するこ
とにより、フラッシュメモリ15内のデータをデータ書
換装置9から送信されて来る新たなデータ(即ち、新た
なエンジン制御用の制御プログラム及び制御データ)に
書き換える書換処理を行う。
Then, the CPU 11 executes the rewriting program in the RAM 17 which has been returned to the original data array, thereby rewriting the data in the flash memory 15 with new data transmitted from the data rewriting device 9 (ie, new data). (A control program and control data for controlling the engine).

【0031】一方、データ書換装置9は、ECU1側の
マイコン5にフラッシュメモリ15の書き換えを行わせ
るための処理を実行するマイコン(図示省略)を主要部
として構成されている。また、このデータ書換装置9に
は、ECU1の動作モードを、エンジンの制御を行う通
常モードからフラッシュメモリ15内のデータを書き換
える書換モードに変更させるためのモード切換スイッチ
SWが設けられている。
On the other hand, the data rewriting device 9 is mainly composed of a microcomputer (not shown) for executing a process for causing the microcomputer 5 of the ECU 1 to rewrite the flash memory 15. Further, the data rewriting device 9 is provided with a mode changeover switch SW for changing the operation mode of the ECU 1 from the normal mode for controlling the engine to the rewriting mode for rewriting data in the flash memory 15.

【0032】そして、このようなデータ書換装置9とE
CU1との接続は、図1に示す如く、データ書換装置9
側の雌コネクタ23FとECU1に設けられた雄コネク
タ23Mとを嵌合することにより行われる。即ち、上記
両コネクタ23F,23Mが嵌合されると、通信線25
を介して、データ書換装置9側のマイコンとECU1側
のマイコン5との間におけるシリアルデータ通信が可能
となる。また、データ書換装置9側でモード切換スイッ
チSWを介して接地電位(0V)に接続される信号線2
7が、ECU1側で抵抗器Rにより所定の電源電圧(本
実施形態では5V)にプルアップされたモード判定用信
号ラインLに接続される。よって、データ書換装置9側
でモード切換スイッチSWがONされると、ECU1側
においては上記モード判定用信号ラインLがハイレベル
(5V)からロウレベル(0V)に変化することとな
る。そして、ECU1のマイコン5は、ブートプログラ
ムの実行を開始した時に、モード判定用信号ラインLが
ロウレベルであれば、書換許可条件が成立したと判断し
て、自己の動作モードを通常モードから書換モードへと
移行させる。
The data rewriting device 9 and E
The connection with the CU 1 is established as shown in FIG.
This is performed by fitting the female connector 23F on the side with the male connector 23M provided in the ECU 1. That is, when the two connectors 23F and 23M are fitted, the communication line 25
, Serial data communication between the microcomputer on the data rewriting device 9 side and the microcomputer 5 on the ECU 1 side becomes possible. The signal line 2 connected to the ground potential (0 V) via the mode switch SW on the data rewriting device 9 side.
7 is connected to a mode determination signal line L which is pulled up to a predetermined power supply voltage (5 V in this embodiment) by a resistor R on the ECU 1 side. Therefore, when the mode switch SW is turned on on the data rewriting device 9 side, the mode determination signal line L changes from the high level (5 V) to the low level (0 V) on the ECU 1 side. If the mode determination signal line L is at the low level when the execution of the boot program is started, the microcomputer 5 of the ECU 1 determines that the rewrite permission condition has been satisfied, and changes its own operation mode from the normal mode to the rewrite mode. Move to

【0033】そこで次に、ECU1のマイコン5で実行
される処理について、図3を用いて説明する。尚、図3
は、ECU1のマイコン5で実行される処理を表すフロ
ーチャートであり、そのステップ(以下、単に「S」と
記す)100〜S130の処理が、マスクROM13内
のブートプログラムによって実行され、S200の処理
が、フラッシュメモリ15内の制御プログラムによって
実行される。そして、S300〜S330の処理が、マ
スクROM13からRAM17に転送される配列変更後
の書換プログラムによって実行される。
Next, the processing executed by the microcomputer 5 of the ECU 1 will be described with reference to FIG. FIG.
Is a flowchart showing the processing executed by the microcomputer 5 of the ECU 1. The processing of steps (hereinafter simply referred to as "S") 100 to S130 is executed by the boot program in the mask ROM 13, and the processing of S200 is executed. Is executed by a control program in the flash memory 15. Then, the processing of S300 to S330 is executed by the rewriting program after the array change transferred from the mask ROM 13 to the RAM 17.

【0034】ECU1では、車両のイグニッションスイ
ッチ(図示省略)のオンに伴い電源が投入されると、マ
イコン5のCPU11がリセット状態から動作を開始し
て、マスクROM13に格納されているブートプログラ
ムの実行を開始し、図3に示す如く、まずS100に
て、書換許可条件が成立しているか否かを、モード判定
用信号ラインLがロウレベルであるか否かによって判断
する。そして、モード判定用信号ラインLがロウレベル
でなければ、書換許可条件が非成立であると判断して、
通常モードの動作を行うためにS110へ進み、このS
110にて、フラッシュメモリ15内の制御プログラム
へジャンプする。
In the ECU 1, when the power is turned on in response to the turning on of an ignition switch (not shown) of the vehicle, the CPU 11 of the microcomputer 5 starts the operation from the reset state, and executes the boot program stored in the mask ROM 13. As shown in FIG. 3, first, in S100, it is determined whether or not the rewrite permission condition is satisfied, based on whether or not the mode determination signal line L is at a low level. If the mode determination signal line L is not at the low level, it is determined that the rewrite permission condition is not satisfied,
The process proceeds to S110 to perform the operation in the normal mode, and this S
At 110, the process jumps to the control program in the flash memory 15.

【0035】すると、その後は、S200に示すよう
に、フラッシュメモリ15内の制御プログラムが実行さ
れて、エンジンを制御するための制御処理が行われるこ
ととなる。尚、この制御処理は、入力回路3からの各種
センサ信号とフラッシュメモリ15に格納されている制
御データとに基づき、エンジンに対する最適な燃料噴射
量や点火時期等を演算し、その演算結果に応じて、イン
ジェクタやイグナイタ等のアクチュエータを駆動するた
めの制御信号を出力回路7に出力する、といった手順で
実行される。
Then, as shown in S200, the control program in the flash memory 15 is executed, and control processing for controlling the engine is performed. In this control process, the optimum fuel injection amount and ignition timing for the engine are calculated based on various sensor signals from the input circuit 3 and the control data stored in the flash memory 15, and according to the calculation results. Then, a control signal for driving an actuator such as an injector or an igniter is output to the output circuit 7.

【0036】一方、ブートプログラムにおいて、上記S
100で書換許可条件が成立していると判断した場合、
即ち、当該ECU1にデータ書換装置9が接続されてモ
ード切換スイッチSWがONされたことにより、モード
判定用信号ラインLがロウレベルであった場合には、書
換モードの動作を行うためにS120へ移行する。
On the other hand, in the boot program, the S
If it is determined in 100 that the rewrite permission condition is satisfied,
That is, when the data rewriting device 9 is connected to the ECU 1 and the mode changeover switch SW is turned on, and the signal line L for mode determination is at the low level, the process proceeds to S120 to perform the operation in the rewriting mode. I do.

【0037】そして、このS120にて、マスクROM
13に記憶されている書換プログラムを読み出して、そ
のプログラムのデータ配列を、前述した規則に基づき、
フラッシュメモリ15の記憶内容を書き換えることがで
きる本来の正常な配列に変更すると共に、その配列変更
後の書換プログラムをRAM17に書き込む(転送す
る)。
Then, in this S120, the mask ROM
13 is read out, and the data array of the program is read based on the above-described rules.
The memory array of the flash memory 15 is changed to an original normal array that can be rewritten, and a rewrite program after the array change is written (transferred) to the RAM 17.

【0038】具体的には、図2(a)及び図2(b)に
示すように、マスクROM13に記憶されている書換プ
ログラムの単位データD1 ,D0 ,D3 ,D2 ,…,D
n-2,Dn-3 ,Dn ,Dn-1 を、先頭のものから順に読
み出すと共に、連続する2個1組の単位データについ
て、偶数番目の単位データと奇数番目の単位データとを
逆にしてRAM17に書き込む。つまり、マスクROM
13の偶数アドレスに格納されていた単位データをRA
M17の奇数アドレスに転送し、マスクROM13の奇
数アドレスに格納されていた単位データをRAM17の
偶数アドレスに転送する。このため、図2(b)のよう
に、RAM17内の書換プログラムは、フラッシュメモ
リ15の記憶内容を書き換え可能な本来のデータ配列D
0 ,D1 ,D2 ,D3 ,…,Dn-3 ,Dn-2 ,Dn-1 ,
Dn となる。
More specifically, as shown in FIGS. 2A and 2B, the unit data D1, D0, D3, D2,..., D of the rewriting program stored in the mask ROM 13.
n-2, Dn-3, Dn, and Dn-1 are read out in order from the first one, and even-numbered unit data and odd-numbered unit data are inverted with respect to continuous two-unit data. Write to RAM17. That is, the mask ROM
The unit data stored in the even address of No. 13 is
The data is transferred to the odd address of M17, and the unit data stored at the odd address of the mask ROM 13 is transferred to the even address of the RAM 17. For this reason, as shown in FIG. 2B, the rewrite program in the RAM 17 is based on the original data array D which can rewrite the storage contents of the flash memory 15.
0, D1, D2, D3,..., Dn-3, Dn-2, Dn-1,.
Dn.

【0039】そして、続くS130にて、上記S120
でRAM17に転送した配列変更後の書換プログラムへ
ジャンプする。すると、CPU11は上記配列変更後の
書込プログラムをRAM17上で実行することとなり、
これによりS300〜S330の書換処理が行われる。
Then, in the following S130, the above-mentioned S120
To jump to the rewriting program after the sequence change transferred to the RAM 17. Then, the CPU 11 executes the write program after the array change on the RAM 17, and
Thereby, the rewriting process of S300 to S330 is performed.

【0040】即ち、まずS300にて、書換許可条件が
成立しているか否かを判断する。尚、このS300で判
断される書換許可条件としては、ブートプログラムのS
100と同じ条件(つまり、モード判定用信号ラインL
がロウレベルであるという条件)であっても良いし、ま
た、上記S100とは異なる条件でも良い。例えば、後
者の場合には、データ書換装置9からフラッシュメモリ
15の書き換え動作を要求するための要求メッセージが
送信されて来た場合に、書換許可条件が成立したと判断
するように構成することができる。
That is, first, in S300, it is determined whether or not the rewrite permission condition is satisfied. The rewrite permission condition determined in S300 includes the boot program S
100 (that is, the mode determination signal line L
May be a low level), or a condition different from S100 described above. For example, in the latter case, when a request message for requesting the rewriting operation of the flash memory 15 is transmitted from the data rewriting device 9, it is determined that the rewriting permission condition is satisfied. it can.

【0041】そして、上記S300で書換許可条件が成
立してないと判断した場合には、そのまま処理を終了し
て無処理状態となるが、書換許可条件が成立していると
判断した場合には、S310に進み、データ書換装置9
から送信されて来る所定バイト分の書換データ(つま
り、フラッシュメモリ15に格納すべき新たなデータの
うちの所定バイト分)を受信するまで待機する。
When it is determined in S300 that the rewrite permission condition is not satisfied, the process is terminated without any processing, and the process is terminated. When it is determined that the rewrite permission condition is satisfied, , S310, the data rewriting device 9
And waits for reception of predetermined bytes of rewrite data (that is, predetermined bytes of new data to be stored in the flash memory 15) transmitted from.

【0042】その後、上記S310で書換データを受信
したと判断すると、S320に進み、前述の電圧印加回
路からフラッシュメモリ15へ書換電圧を印加させると
共に、フラッシュメモリ15内のデータを上記S310
で受信した書換データに書き換える。尚、この処理は、
まず、フラッシュメモリ15の記憶領域うち、上記S3
10で受信した書換データを書き込むべき領域のデータ
を消去し、次いで、そのデータ消去を行った領域に上記
S310で受信した書換データを書き込む、といった手
順で実行される。
Thereafter, if it is determined in S310 that rewrite data has been received, the process proceeds to S320, in which a rewrite voltage is applied to the flash memory 15 from the above-described voltage application circuit, and the data in the flash memory 15 is written in S310.
To rewrite the received rewrite data. This processing is
First, in the storage area of the flash memory 15, the S3
In step 10, the data of the area to which the rewrite data is to be received is erased, and then the rewrite data received in step S310 is written in the area where the data was erased.

【0043】次に、S330に進んで、フラッシュメモ
リ15の全データの書き換えが完了したか否かを判断
し、全データの書き換えが完了していない場合には、S
310に戻る。また、上記S330にて、フラッシュメ
モリ15の全データの書き換えが完了したと判断した場
合には、処理を終了して無処理状態となる。
Next, the process proceeds to S330, in which it is determined whether or not all the data in the flash memory 15 has been rewritten.
Return to 310. If it is determined in S330 that the rewriting of all data in the flash memory 15 has been completed, the process is terminated and a non-processing state is set.

【0044】尚、本実施形態では、フラッシュメモリ1
5が、書換可能不揮発性メモリに相当し、マスクROM
13が、書換プログラム記憶用メモリに相当する。ま
た、図3のS100で判断される書換許可条件が、書換
条件に相当している。そして、図3におけるS120及
びS130の処理が、書換プログラム再生手段に相当し
ている。
In this embodiment, the flash memory 1
5 corresponds to a rewritable nonvolatile memory, and a mask ROM
Reference numeral 13 corresponds to a rewrite program storage memory. The rewrite permission condition determined in S100 of FIG. 3 corresponds to the rewrite condition. The processes in S120 and S130 in FIG. 3 correspond to a rewriting program reproducing unit.

【0045】以上詳述したように、本実施形態のECU
1では、マスクROM13に常時内蔵される元の書換プ
ログラムが、そのままでは書換処理(即ち、フラッシュ
メモリ15の記憶内容を書き換えるための処理であり、
特に図3におけるS320の処理)を行うことができな
いデータ配列となっている。換言すれば、書換プログラ
ムを、そのままでは書換処理を行うことができないデー
タ配列に変更して、マスクROM13に記憶させておく
ようにしている。
As described in detail above, the ECU of the present embodiment
In 1, the original rewriting program always contained in the mask ROM 13 is a rewriting process as it is (ie, a process for rewriting the storage contents of the flash memory 15,
In particular, the data array cannot perform the processing of S320 in FIG. 3). In other words, the rewriting program is changed to a data array that cannot be rewritten as it is, and stored in the mask ROM 13.

【0046】そして、フラッシュメモリ15の記憶内容
を書き換える場合には(S100:YES)、上記元の
書換プログラムのデータ配列を、書換処理が可能な本来
の正常な配列に戻して、その配列変更後の書換プログラ
ムを揮発性のRAM17に書き込み(S120)、RA
M17内の本来の書換プログラムに従って書換処理を行
うようにしている(S130)。
When the storage contents of the flash memory 15 are to be rewritten (S100: YES), the data array of the original rewriting program is returned to an original normal array in which the rewriting process can be performed. Is written in the volatile RAM 17 (S120), and RA
The rewriting process is performed according to the original rewriting program in M17 (S130).

【0047】このため、マイコン5のCPU11にプロ
グラム暴走が生じて、マスクROM13内の書換プログ
ラムが実行されたとしても、フラッシュメモリ15の記
憶内容が不適当に書き換えられてしまうことがない。ま
た、当該ECU1への電力供給を遮断すれば、RAM1
7内の記憶内容は消失されるため、書換処理可能な本来
の書換プログラムがRAM17に記憶されたままになら
ない。
Therefore, even if the program runaway occurs in the CPU 11 of the microcomputer 5 and the rewriting program in the mask ROM 13 is executed, the contents stored in the flash memory 15 are not rewritten inappropriately. If the power supply to the ECU 1 is cut off, the RAM 1
7 is lost, the original rewrite program that can be rewritten is not stored in the RAM 17.

【0048】よって、本実施形態のECU1によれば、
万一、プログラム暴走が生じても、フラッシュメモリ1
5内の制御プログラムや制御データが不適当に書き換え
られてしまうことを防止することができる。以上、本発
明の一実施形態について説明したが、本発明は、上記実
施形態に限定されるものではなく、種々の形態を採り得
ることは言うまでもない。
Therefore, according to the ECU 1 of the present embodiment,
Even if program runaway occurs, flash memory 1
5 can be prevented from being improperly rewritten. As mentioned above, although one Embodiment of this invention was described, it cannot be overemphasized that this invention is not limited to the said Embodiment, but can take various forms.

【0049】例えば、上記実施形態のECU1では、フ
ラッシュメモリ15の記憶内容を書き換え可能な本来の
書換プログラムを構成する8ビットずつの単位データD
0 ,D1 ,…,Dn-1 ,Dn を、偶数番目のデータと奇
数番目のデータとを互いに入れ替えた状態でマスクRO
M13に記憶させておくようにしたが、例えば図4
(a)に示すように、上記単位データD0 〜Dn の配列
を全く逆にして(つまり、Dn ,Dn-1 ,Dn-2 ,Dn-
3 ,…,D3 ,D2 ,D1 ,D0 の順に)、マスクRO
M13に記憶させておくようにしても良い。
For example, in the ECU 1 of the above embodiment, the 8-bit unit data D constituting the original rewrite program capable of rewriting the storage contents of the flash memory 15
0, D1,..., Dn-1 and Dn are masked with the even-numbered data and the odd-numbered data interchanged.
Although it is stored in M13, for example, FIG.
As shown in (a), the arrangement of the unit data D0 to Dn is completely reversed (that is, Dn, Dn-1, Dn-2, Dn-
,..., D3, D2, D1, D0), mask RO
You may make it memorize | store in M13.

【0050】そして、この場合に図3のS120では、
図4(a)及び図4(b)に示すように、マスクROM
13に記憶されている書換プログラムの単位データDn
,Dn-1 ,…,D1 ,D0 を読み出し、その読み出し
た各単位データを、全く逆の配列でRAM17に書き込
むようにすれば良い。すると、図4(b)のように、R
AM17内の書換プログラムは、フラッシュメモリ15
の記憶内容を書き換え可能な本来のデータ配列D0 ,D
1 ,…,Dn-1 ,Dn となる。
Then, in this case, in S120 of FIG.
As shown in FIGS. 4A and 4B, the mask ROM
13 is the unit data Dn of the rewriting program stored in
, Dn-1,..., D1 and D0 are read, and the read unit data may be written to the RAM 17 in a completely reversed arrangement. Then, as shown in FIG.
The rewrite program in the AM 17 is stored in the flash memory 15
Data arrays D0 and D which can rewrite the stored contents of
1,..., Dn-1 and Dn.

【0051】一方、上記実施形態のECU1では、書換
可能不揮発性メモリとして、フラッシュメモリ15を用
いたが、EEPROM等、電気的に書き換えが可能な他
のROMを用いても良い。また、上記実施形態のECU
1は、車両のエンジンを制御するものであったが、本発
明は、他の制御対象を制御する装置に対しても全く同様
に適用することができる。
On the other hand, although the flash memory 15 is used as the rewritable nonvolatile memory in the ECU 1 of the above embodiment, another electrically rewritable ROM such as an EEPROM may be used. In addition, the ECU of the above embodiment
1 controls the engine of the vehicle, but the present invention can be applied to devices for controlling other control objects in the same manner.

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

【図1】 実施形態の電子制御装置(ECU)の構成を
表すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an electronic control unit (ECU) according to an embodiment.

【図2】 書換プログラムの格納状態を説明する説明図
である。
FIG. 2 is an explanatory diagram illustrating a storage state of a rewrite program.

【図3】 実施形態のECUのマイコンで実行される処
理を表すフローチャートである。
FIG. 3 is a flowchart illustrating a process executed by a microcomputer of the ECU according to the embodiment.

【図4】 他の実施形態を説明する説明図である。FIG. 4 is an explanatory diagram illustrating another embodiment.

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

1…電子制御装置(ECU) 3…入力回路 7
…出力回路 5…マイクロコンピュータ(マイコン) 9…データ
書換装置 11…CPU 13…マスクROM 15…フラ
ッシュメモリ 17…RAM 19…I/O 21…通信回路 23F,23M…コネクタ 25…通信線 27
…信号線 L…モード判定用信号ライン SW…モード切換スイ
ッチ
DESCRIPTION OF SYMBOLS 1 ... Electronic control unit (ECU) 3 ... Input circuit 7
... Output circuit 5 ... Microcomputer (microcomputer) 9 ... Data rewriting device 11 ... CPU 13 ... Mask ROM 15 ... Flash memory 17 ... RAM 19 ... I / O 21 ... Communication circuit 23F, 23M ... Connector 25 ... Communication line 27
... Signal line L ... Mode determination signal line SW ... Mode switch

フロントページの続き (72)発明者 玉田 英司 愛知県刈谷市昭和町1丁目1番地 株式会 社デンソー内Continuation of front page (72) Inventor Eiji Tamada 1-1-1, Showa-cho, Kariya-shi, Aichi Prefecture Inside DENSO Corporation

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 プログラムに従って処理を行う演算処理
手段と、 記憶内容の書き換えが可能であると共に、所定の制御対
象を制御するためのプログラムを記憶する書換可能不揮
発性メモリと、 該書換可能不揮発性メモリの記憶内容を書き換えるため
の書換プログラムが記憶された書換プログラム記憶用メ
モリとを備え、 前記演算処理手段が、通常時には、前記書換可能不揮発
性メモリに記憶されたプログラムに従って、前記制御対
象を制御するための制御処理を行い、特定の書換条件が
成立した場合には、前記書換プログラム記憶用メモリに
記憶された書換プログラムに従って、前記書換可能不揮
発性メモリの記憶内容を書き換える書換処理を行うよう
に構成された電子制御装置において、 前記書換プログラムは、当該プログラムを構成するデー
タの配列が予め定められた規則に基づき前記書換処理を
行うことができない配列に変更された状態で、前記書換
プログラム記憶用メモリに記憶されており、 更に、前記書換条件が成立した場合に、前記書換プログ
ラム記憶用メモリに記憶されている前記書換プログラム
を読み出して、そのプログラムのデータ配列を、前記規
則に基づき前記書換処理を行うことができる正常な配列
に変更すると共に、その配列変更後の書換プログラムを
記憶内容の読み出し及び書き込みが可能な揮発性メモリ
に書き込み、前記演算処理手段に、前記揮発性メモリ内
の書換プログラムに従って前記書換処理を行わせる書換
プログラム再生手段を備えたこと、 を特徴とする電子制御装置。
1. An arithmetic processing means for performing processing according to a program, a rewritable nonvolatile memory capable of rewriting storage contents and storing a program for controlling a predetermined control target, and a rewritable nonvolatile memory. A memory for storing a rewriting program for storing a rewriting program for rewriting the storage content of the memory, wherein the arithmetic processing means normally controls the control target in accordance with the program stored in the rewritable nonvolatile memory When a specific rewriting condition is satisfied, a rewriting process for rewriting the storage contents of the rewritable nonvolatile memory is performed according to a rewriting program stored in the rewriting program storage memory. In the configured electronic control device, the rewriting program constitutes the program. The data array is stored in the rewrite program storage memory in a state where the array of data is changed to an array in which the rewrite process cannot be performed based on a predetermined rule, and further, when the rewrite condition is satisfied, The rewrite program stored in the rewrite program storage memory is read, and the data array of the program is changed to a normal array in which the rewrite process can be performed based on the rule, and the data array after the array change is performed. A rewriting program reproducing means for writing the rewriting program to a volatile memory capable of reading and writing stored contents, and causing the arithmetic processing means to perform the rewriting processing according to the rewriting program in the volatile memory. Electronic control device.
【請求項2】 請求項1に記載の電子制御装置におい
て、 前記書換プログラム記憶用メモリは、記憶内容の書き換
えが不可能な不揮発性ROMであること、 を特徴とする電子制御装置。
2. The electronic control device according to claim 1, wherein the memory for storing the rewrite program is a non-volatile ROM whose stored contents cannot be rewritten.
【請求項3】 プログラムに従って処理を行う演算処理
手段と、 記憶内容の書き換えが可能であると共に、所定の制御対
象を制御するためのプログラムを記憶する書換可能不揮
発性メモリと、 該書換可能不揮発性メモリの記憶内容を書き換えるため
の書換プログラムが記憶された書換プログラム記憶用メ
モリとを備え、 前記演算処理手段が、通常時には、前記書換可能不揮発
性メモリに記憶されたプログラムに従って、前記制御対
象を制御するための制御処理を行い、特定の書換条件が
成立した場合には、前記書換プログラム記憶用メモリに
記憶された書換プログラムに従って、前記書換可能不揮
発性メモリの記憶内容を書き換える書換処理を行うよう
に構成された電子制御装置に用いられ、 前記演算処理手段に前記書換処理を行わせるためのプロ
グラム書き換え方法であって、 前記書換プログラムを、そのままでは前記書換処理を行
うことができないデータ配列に変更して前記書換プログ
ラム記憶用メモリに記憶させておき、 前記書換条件が成立した場合には、前記書換プログラム
記憶用メモリに記憶されている前記書換プログラムを読
み出して、そのプログラムのデータ配列を、前記書換処
理を行うことができる正常な配列に変更すると共に、そ
の配列変更後の書換プログラムを記憶内容の読み出し及
び書き込みが可能な揮発性メモリに書き込み、前記演算
処理手段に、前記揮発性メモリ内の書換プログラムに従
って前記書換処理を行わせること、 を特徴とする電子制御装置のプログラム書き換え方法。
3. An arithmetic processing means for performing processing in accordance with a program, a rewritable nonvolatile memory capable of rewriting storage contents and storing a program for controlling a predetermined control target, and a rewritable nonvolatile memory. A memory for storing a rewriting program for storing a rewriting program for rewriting the storage content of the memory, wherein the arithmetic processing means normally controls the control target in accordance with the program stored in the rewritable nonvolatile memory When a specific rewriting condition is satisfied, a rewriting process for rewriting the storage contents of the rewritable nonvolatile memory is performed according to a rewriting program stored in the rewriting program storage memory. It is used in a configured electronic control unit, and causes the arithmetic processing unit to perform the rewriting process. In the program rewriting method, the rewriting program is changed to a data array that cannot be subjected to the rewriting process as it is, and stored in the rewriting program storage memory, and when the rewriting condition is satisfied, Reading the rewrite program stored in the rewrite program storage memory, changing the data array of the program to a normal array capable of performing the rewrite process, and rewriting the rewritten program after the array change. A program rewriting method for an electronic control unit, comprising: writing in a volatile memory capable of reading and writing stored content, and causing the arithmetic processing means to perform the rewriting process according to a rewriting program in the volatile memory.
JP10061409A 1998-03-12 1998-03-12 Electronic controller and program reloading method for the same Pending JPH11259371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10061409A JPH11259371A (en) 1998-03-12 1998-03-12 Electronic controller and program reloading method for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10061409A JPH11259371A (en) 1998-03-12 1998-03-12 Electronic controller and program reloading method for the same

Publications (1)

Publication Number Publication Date
JPH11259371A true JPH11259371A (en) 1999-09-24

Family

ID=13170310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10061409A Pending JPH11259371A (en) 1998-03-12 1998-03-12 Electronic controller and program reloading method for the same

Country Status (1)

Country Link
JP (1) JPH11259371A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006051692A1 (en) * 2004-11-10 2006-05-18 Sharp Kabushiki Kaisha Nonvolatile memory system
JP2007507020A (en) * 2003-06-24 2007-03-22 バイエリッシェ モートーレン ウエルケ アクチエンゲゼルシャフト Method for reloading software into the boot sector of a programmable read-only memory
JP2008140427A (en) * 2006-11-30 2008-06-19 Megachips Lsi Solutions Inc Semiconductor memory and information processing system
JP2012243257A (en) * 2011-05-24 2012-12-10 Denso Corp Electronic control unit

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007507020A (en) * 2003-06-24 2007-03-22 バイエリッシェ モートーレン ウエルケ アクチエンゲゼルシャフト Method for reloading software into the boot sector of a programmable read-only memory
WO2006051692A1 (en) * 2004-11-10 2006-05-18 Sharp Kabushiki Kaisha Nonvolatile memory system
JP2008140427A (en) * 2006-11-30 2008-06-19 Megachips Lsi Solutions Inc Semiconductor memory and information processing system
JP2012243257A (en) * 2011-05-24 2012-12-10 Denso Corp Electronic control unit

Similar Documents

Publication Publication Date Title
US5826211A (en) Electronic controller having excellent control program and control data overwriting capabilities
US7805562B2 (en) Microcomputer with configurable communication interfacing
JPH1136973A (en) Vehicle contorl device
US6401163B1 (en) Apparatus and method for rewriting data from volatile memory to nonvolatile memory
JP3893755B2 (en) Electronic control unit
JP2003256228A (en) Program rewriting device
JP3870563B2 (en) Electronic control device and non-volatile memory rewrite count method
US6182004B1 (en) Apparatus and method for controlling electric power supply in nonvolatile memory rewriting operation
JP2006323776A (en) Information processor
JPH11238005A (en) Electronic controller and control system
JP2000045858A (en) Rewriting number storing method for electronic control unit and non-volatile memory
JPH09128229A (en) Electronic controller
JP2009042850A (en) Control device for vehicle, and device for updating vehicle control program
JPH11259371A (en) Electronic controller and program reloading method for the same
JP3968876B2 (en) Electronic control unit
JPH1136974A (en) Controller for vehicle
JPH10247103A (en) Memory rewrite device
JP3937598B2 (en) Electronic control unit
JP2005338955A (en) Electronic control device
JPH1115741A (en) Electronic controller
JPH09171459A (en) Electronic control equipment
JP2002323990A (en) Electronic controller and method for initializing nonvolatile memory
JP2000257502A (en) Electronic controller for automobile
JP2000192844A (en) Engine control device
JP3551855B2 (en) Vehicle control device