JPH10105468A - Electronic controller, memory rewriting device and memory rewriting system of electronic controller - Google Patents
Electronic controller, memory rewriting device and memory rewriting system of electronic controllerInfo
- Publication number
- JPH10105468A JPH10105468A JP8254592A JP25459296A JPH10105468A JP H10105468 A JPH10105468 A JP H10105468A JP 8254592 A JP8254592 A JP 8254592A JP 25459296 A JP25459296 A JP 25459296A JP H10105468 A JPH10105468 A JP H10105468A
- Authority
- JP
- Japan
- Prior art keywords
- identification information
- control program
- rewriting
- electronic control
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Storage Device Security (AREA)
- Stored Programmes (AREA)
Abstract
Description
【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION
【0001】[0001]
【発明の属する技術分野】本発明は、電気的にデータの
書き換えが可能な不揮発性メモリに格納された制御プロ
グラムや制御データを、該不揮発性メモリを電子制御装
置に搭載した状態で書き換える技術に関する。The present invention relates to a technique for rewriting control programs and control data stored in an electrically rewritable nonvolatile memory while the nonvolatile memory is mounted on an electronic control unit. .
【0002】[0002]
【従来の技術】従来より、例えば自動車のエンジンを制
御する電子制御装置として、電気的にデータの書き換え
(詳しくはデータの消去及び書き込み)が可能な不揮発
性メモリにエンジン制御用の制御プログラム及び制御デ
ータを格納しておき、このような制御プログラムや制御
データを、市場への供給後でも書き換え可能に構成され
たものが提案されている。2. Description of the Related Art Conventionally, as an electronic control unit for controlling, for example, an engine of an automobile, a control program and control for engine control are provided in a nonvolatile memory capable of electrically rewriting data (specifically, erasing and writing data). There has been proposed a configuration in which data is stored and such a control program or control data can be rewritten even after being supplied to the market.
【0003】即ち、この種の電子制御装置は、通常時に
は、不揮発性メモリに格納されたデータにより構成され
る制御プログラム及び制御データに従ってエンジン等の
制御対象を制御するのであるが、別途用意されたメモリ
書換装置が接続されて、そのメモリ書換装置から書き換
え指令を受けると、不揮発性メモリに格納されている現
在のデータを消去し、その消去した領域に上記メモリ書
換装置から送信されて来る新たなデータ(新たな制御プ
ログラム及び制御データ)を書き込む、といった書換処
理を行うように構成されている。That is, this type of electronic control unit normally controls a control target such as an engine according to a control program and control data constituted by data stored in a nonvolatile memory, but is separately prepared. When the memory rewriting device is connected and receives a rewriting command from the memory rewriting device, the current data stored in the nonvolatile memory is erased, and a new area transmitted from the memory rewriting device to the erased area is erased. It is configured to perform a rewriting process such as writing data (new control program and control data).
【0004】一方、このような電子制御装置に接続され
る上記メモリ書換装置は、書き換えるべき新たなデータ
を記憶する記憶媒体を備えており、作業者によって所定
の操作が行われると、上記記憶媒体に記憶されている新
たなデータを電子制御装置へ送信するように構成されて
いる。On the other hand, the memory rewriting device connected to such an electronic control device includes a storage medium for storing new data to be rewritten, and when a predetermined operation is performed by an operator, the storage medium is rewritten. Is transmitted to the electronic control unit.
【0005】そして、こうした電子制御装置とメモリ書
換装置とからなる、電子制御装置のメモリ書換システム
では、電子制御装置の不揮発性メモリに格納される制御
プログラムや制御データを、メモリ書換装置から電子制
御装置へ送信する新たな制御プログラムや制御データに
書き換えることができ、これによって、電子制御装置の
動作内容(制御内容)を任意に変更することができる。In a memory rewriting system for an electronic control device comprising such an electronic control device and a memory rewriting device, a control program and control data stored in a nonvolatile memory of the electronic control device are electronically controlled by the memory rewriting device. It can be rewritten with a new control program or control data to be transmitted to the device, whereby the operation content (control content) of the electronic control device can be arbitrarily changed.
【0006】[0006]
【発明が解決しようとする課題】ところが、例えば自動
車においては、異なる車種間ではもちろんであるが、同
一車種であっても、グレード(搭載装備)やエンジンの
型式、或いは仕向地(輸出国)等の違いによって、電子
制御装置が行うべき制御の内容は異なっている。換言す
るならば、電子制御装置の不揮発性メモリに格納すべき
制御プログラムや制御データは、その電子制御装置が制
御する制御対象毎に異なっている。However, for example, in the case of automobiles, the grade (mounted equipment), engine model, destination (exporting country), etc. of the same type of vehicle as well as between different types of vehicles, etc. The content of the control to be performed by the electronic control device differs depending on the difference. In other words, control programs and control data to be stored in the non-volatile memory of the electronic control device are different for each control target controlled by the electronic control device.
【0007】よって、この種の電子制御装置のメモリ書
換システムでは、作業者が、電子制御装置(詳しくは、
その制御対象)に不適合な制御プログラム等を構成する
データがメモリ書換装置側の記憶媒体に記憶されている
ことを知らずに、メモリ書換装置から電子制御装置へ、
その不適合なデータを送信させてしまう可能性がある。
そして、このような作業ミスが発生すると、電子制御装
置が制御対象を適切に制御することができなくなるとい
う問題があった。Therefore, in this type of memory rewriting system for an electronic control unit, a worker operates the electronic control unit (more specifically,
From the memory rewriting device to the electronic control device without knowing that data constituting a control program or the like that is incompatible with the (control target) is stored in the storage medium on the memory rewriting device side,
There is a possibility that the inappropriate data may be transmitted.
Then, when such an operation error occurs, there is a problem that the electronic control device cannot appropriately control the control target.
【0008】しかも、従来の電子制御装置では、不揮発
性メモリの内容を書き換える書換処理を行うために実行
される書換制御プログラムが、書き換え対象でない不揮
発性メモリ(マスクROM等)に予め内蔵されているた
め、通常時においてCPUが暴走し、上記書換制御プロ
グラムが誤って起動されると、不揮発性メモリに格納さ
れていた正規の制御プログラムや制御データが失われた
り変化したりしてしまうという可能性があった。In addition, in the conventional electronic control device, a rewrite control program executed for performing a rewrite process for rewriting the contents of the nonvolatile memory is previously stored in a non-rewriteable non-volatile memory (such as a mask ROM). Therefore, if the CPU runs out of control at normal times and the rewrite control program is erroneously started, the normal control program and control data stored in the nonvolatile memory may be lost or changed. was there.
【0009】本発明は、このような問題に鑑みなされた
ものであり、不揮発性メモリに格納される制御プログラ
ムや制御データが不適合なものに書き換えられてしまう
ことを確実に防止できる電子制御装置と、この電子制御
装置の不揮発性メモリに格納される制御プログラムや制
御データを書き換えるのに好適なメモリ書換装置及び電
子制御装置のメモリ書換システムを提供することを目的
としている。SUMMARY OF THE INVENTION The present invention has been made in view of such a problem, and an electronic control device capable of reliably preventing a control program or control data stored in a nonvolatile memory from being rewritten to an inappropriate one. It is another object of the present invention to provide a memory rewriting device suitable for rewriting a control program and control data stored in a nonvolatile memory of the electronic control device and a memory rewriting system of the electronic control device.
【0010】[0010]
【課題を解決するための手段、及び発明の効果】上記目
的を達成するためになされた請求項1に記載の電子制御
装置は、電気的にデータの書き換えが可能な不揮発性メ
モリを備えており、通常時には、その不揮発性メモリに
格納されたデータにより構成される制御プログラム及び
制御データに従って所定の制御対象を制御するのである
が、外部からの書き換え指令を受けた場合には、外部装
置から送信されて来る書換制御プログラムを揮発性のメ
モリ領域に転送して起動することにより、前記不揮発性
メモリ内のデータを前記外部装置から送信されて来る新
たなデータに書き換えるための書換処理を行う。Means for Solving the Problems and Advantages of the Invention The electronic control device according to the first aspect of the present invention has an electrically rewritable nonvolatile memory. Normally, a predetermined control target is controlled in accordance with a control program and control data constituted by data stored in the non-volatile memory. The rewriting control program is transferred to a volatile memory area and activated to perform a rewriting process for rewriting data in the nonvolatile memory with new data transmitted from the external device.
【0011】そして、請求項1に記載の電子制御装置
は、当該電子制御装置の識別情報を予め記憶する識別情
報記憶手段と、判定手段と、転送許可手段とを備えてお
り、判定手段は、外部からの前記書き換え指令を受ける
と、外部装置から前記書換制御プログラムが送信されて
来る前に、前記外部装置との間で通信を行うことによ
り、前記外部装置側にて前記新たなデータ(即ち、不揮
発性メモリに書き込むべき新たなデータ)と対応して予
め記憶された情報であって当該新たなデータに適合する
装置を示す識別情報と、識別情報記憶手段に記憶された
識別情報とが一致しているか否かを判定し、転送許可手
段が、上記判定手段により前記両識別情報が一致してい
ると判定された場合にのみ、前記書換制御プログラムの
前記メモリ領域への転送を許可する。The electronic control unit according to the first aspect includes an identification information storage unit that stores identification information of the electronic control unit in advance, a determination unit, and a transfer permission unit. When the external device receives the rewrite command, the external device communicates with the external device before the rewrite control program is transmitted from the external device. New information to be written to the non-volatile memory), identification information indicating a device that is stored in advance and corresponding to the new data, and identification information stored in the identification information storage unit. It is determined whether or not the rewriting control program is transferred to the memory area only when the transfer permission means determines that the two pieces of identification information match each other. Allow.
【0012】つまり、請求項1に記載の電子制御装置で
は、外部からの書き換え指令を受けると、まず、外部装
置との間で通信を行うことにより、外部装置側にて新た
なデータと対応して予め記憶された識別情報と、識別情
報記憶手段に記憶された自己の識別情報とが一致してい
るか否かを判定し、その両識別情報が一致している場合
にのみ、外部装置から送信されて来る書換制御プログラ
ムを揮発性のメモリ領域に転送して起動するようにして
いる。そして、この書換制御プログラムを起動して実行
することにより、不揮発性メモリ内のデータを外部装置
から送信されて来る新たなデータに書き換える書換処理
を行うようにしている。In other words, in the electronic control device according to the first aspect, when a rewrite command is received from the outside, first, communication is performed with the external device so that the external device can correspond to new data. It is determined whether or not the identification information stored in advance and the own identification information stored in the identification information storage means match, and only when the two pieces of identification information match, transmission from the external device is performed. The rewriting control program is transferred to a volatile memory area and activated. Then, by starting and executing the rewriting control program, a rewriting process for rewriting data in the nonvolatile memory with new data transmitted from the external device is performed.
【0013】このような請求項1に記載の電子制御装置
によれば、外部装置側にて、当該電子制御装置に適合し
ない制御プログラム及び制御データを構成する新たなデ
ータが記憶されており、その不適合なデータが電子制御
装置へ送信されそうな場合には、外部装置側の識別情報
(即ち、外部装置側にて新たなデータと対応して予め記
憶された情報であって当該新たなデータに適合する装置
を示す識別情報)と、識別情報記憶手段に記憶された自
己の識別情報とが一致しないため、当該電子制御装置
は、書換制御プログラムを揮発性のメモリ領域へ転送し
なくなる。According to the electronic control device of the first aspect, the external device stores a control program and new data constituting control data that are not compatible with the electronic control device. If the incompatible data is likely to be transmitted to the electronic control unit, the identification information on the external device side (that is, the information stored in advance in the external device corresponding to the new data, Since the identification information indicating a compatible device) does not match the identification information of the electronic control device stored in the identification information storage means, the electronic control device does not transfer the rewrite control program to the volatile memory area.
【0014】従って、請求項1に記載の電子制御装置に
よれば、不揮発性メモリ内の制御プログラムや制御デー
タが、その電子制御装置に適合しない制御プログラムや
制御データに、誤って書き換えられてしまうことを確実
に防止することができる。しかも、請求項1に記載の電
子制御装置では、外部装置から送信されて来る書換制御
プログラムを揮発性のメモリ領域に転送して起動するこ
とにより、不揮発性メモリ内のデータを書き換える書換
処理を行うように構成されているため、不揮発性メモリ
の内容を書き換える作業を終了した後に、当該電子制御
装置の電源を一旦遮断すれば、揮発性のメモリ領域に転
送された書換制御プログラムは消失する。Therefore, according to the electronic control device of the first aspect, the control program or control data in the nonvolatile memory is erroneously rewritten to a control program or control data that is not compatible with the electronic control device. This can be reliably prevented. Moreover, in the electronic control device according to the first aspect, the rewrite control program transmitted from the external device is transferred to the volatile memory area and activated to perform the rewrite process for rewriting the data in the nonvolatile memory. With this configuration, if the power of the electronic control unit is once turned off after the operation of rewriting the contents of the nonvolatile memory is completed, the rewrite control program transferred to the volatile memory area disappears.
【0015】よって、請求項1に記載の電子制御装置に
よれば、所定の制御対象を制御する通常時において、当
該電子制御装置への電源供給を開始した後、万が一、プ
ログラムを実行するCPUが暴走したとしても、書換処
理を行うための書換制御プログラムは内蔵されていない
ため、不揮発性メモリに格納されている正規の制御プロ
グラムや制御データが失われたり変化したりしてしまう
ことを確実に防止できる。Therefore, according to the electronic control device of the first aspect, in a normal time when a predetermined control target is controlled, after the power supply to the electronic control device is started, the CPU that executes the program should be executed. Even if a runaway occurs, the rewrite control program for performing the rewrite process is not built-in, so it is ensured that the normal control program and control data stored in the nonvolatile memory are lost or changed. Can be prevented.
【0016】尚、電気的にデータの書き換えが可能な不
揮発性メモリとしては、フラッシュEEPROM(以
下、フラッシュROMという)或いはEEPROMが一
般的であるが、電気的に書き換え可能な他のROMでも
良い。また、書換制御プログラムが転送される揮発性の
メモリ領域としては、データの読み出し及び書き込みが
可能なRAMを用いることができる。As the electrically rewritable nonvolatile memory, a flash EEPROM (hereinafter referred to as a flash ROM) or an EEPROM is generally used, but another electrically rewritable ROM may be used. As a volatile memory area to which the rewrite control program is transferred, a RAM from which data can be read and to which data can be written can be used.
【0017】ところで、請求項1に記載の電子制御装置
において、判定手段としては、請求項2に記載のよう
に、外部装置から送信されて来る前記外部装置側の識別
情報を受信し、その受信した識別情報と識別情報記憶手
段に記憶された識別情報とを比較することにより、前記
外部装置側の識別情報と識別情報記憶手段に記憶された
識別情報とが一致しているか否かを判定するように構成
することができる。In the electronic control device according to the first aspect, the determining means receives the identification information of the external device transmitted from the external device and receives the information. By comparing the obtained identification information with the identification information stored in the identification information storage means, it is determined whether or not the identification information on the external device side matches the identification information stored in the identification information storage means. It can be configured as follows.
【0018】そして、請求項2に記載のように構成した
電子制御装置に接続される外部装置は、請求項3に記載
のメモリ書換装置の如く構成すれば良い。即ち、請求項
3に記載のメモリ書換装置は、請求項2に記載の電子制
御装置へ、前記書換制御プログラムと前記新たなデータ
とを送信するのであるが、前記新たなデータを、当該新
たなデータに適合する装置を示す識別情報と対応させて
予め記憶するデータ記憶手段を備えており、前記書換制
御プログラムを送信する前に、前記新たなデータに対応
する前記識別情報を前記電子制御装置へ送信する。The external device connected to the electronic control unit configured as described in claim 2 may be configured as a memory rewriting device described in claim 3. That is, the memory rewriting device according to claim 3 transmits the rewrite control program and the new data to the electronic control device according to claim 2, and stores the new data in the new data. A data storage unit for storing the identification information corresponding to the new data before transmitting the rewrite control program to the electronic control device. Send.
【0019】そして更に、請求項4に記載された本発明
のように、このような請求項3に記載のメモリ書換装置
と、請求項2に記載の電子制御装置とから、電子制御装
置に搭載された不揮発性メモリの内容を書き換えるため
の電子制御装置のメモリ書換システムを構成すれば、メ
モリ書換装置から電子制御装置へ、書換制御プログラム
が送信される前に、新たなデータに適合する装置を示す
識別情報が送信され、電子制御装置側では、メモリ書換
装置からの識別情報と、識別情報記憶手段に記憶された
自己の識別情報とが一致している場合にのみ、書換制御
プログラムの揮発性のメモリ領域への転送が許可される
こととなり、前述した請求項1に記載の電子制御装置に
よる効果を確実に得ることができる。Furthermore, as in the present invention described in claim 4, the memory rewriting device according to claim 3 and the electronic control device according to claim 2 are mounted on an electronic control device. By configuring the memory rewriting system of the electronic control device for rewriting the contents of the non-volatile memory, the device that matches the new data before the rewriting control program is transmitted from the memory rewriting device to the electronic control device. Only when the identification information from the memory rewriting device and the self identification information stored in the identification information storage means match, the electronic control unit transmits the volatile information of the rewriting control program. Is permitted to be transferred to the memory area, and the effect of the electronic control device according to the first aspect can be reliably obtained.
【0020】一方、請求項1に記載の電子制御装置にお
いて、判定手段としては、請求項5に記載のように、識
別情報記憶手段に記憶されている識別情報を外部装置へ
送信し、その後、外部装置側の識別情報と前記送信した
識別情報とが一致しているか否かを表す応答信号を前記
外部装置から受信することにより、前記外部装置側の識
別情報と識別情報記憶手段に記憶された識別情報とが一
致しているか否かを判定するように構成することができ
る。On the other hand, in the electronic control device according to the first aspect, as the determination means, the identification information stored in the identification information storage means is transmitted to an external device, and thereafter, By receiving from the external device a response signal indicating whether or not the identification information on the external device side and the transmitted identification information match, the identification information on the external device side and the identification information stored on the identification information storage means are stored. It can be configured to determine whether or not the identification information matches.
【0021】そして、請求項5に記載のように構成した
電子制御装置に接続される外部装置は、請求項6に記載
のメモリ書換装置の如く構成すれば良い。即ち、請求項
6に記載のメモリ書換装置は、請求項5に記載の電子制
御装置へ、前記書換制御プログラムと前記新たなデータ
とを送信するのであるが、前記新たなデータを、当該新
たなデータに適合する装置を示す識別情報と対応させて
予め記憶するデータ記憶手段を備えており、前記電子制
御装置からの識別情報が、前記新たなデータに対応する
識別情報と一致しているか否かを判定して、前記両識別
情報が一致している場合に、前記電子制御装置へ、当該
メモリ書換装置側の識別情報と前記電子制御装置の識別
情報記憶手段に記憶された識別情報とが一致しているこ
とを表す前記応答信号を送信し、その後、前記書換制御
プログラムを送信する。The external device connected to the electronic control device configured as described in claim 5 may be configured as a memory rewriting device described in claim 6. That is, the memory rewriting device according to claim 6 transmits the rewriting control program and the new data to the electronic control device according to claim 5, and stores the new data in the new data. Data storage means for storing in advance in association with identification information indicating a device conforming to the data, and determining whether or not the identification information from the electronic control device matches the identification information corresponding to the new data. Is determined, and when the two pieces of identification information match each other, the identification information on the memory rewriting device side and the identification information stored in the identification information storage means of the electronic control device are transmitted to the electronic control device. The retransmission control program transmits the response signal indicating that the rewriting is performed, and then transmits the rewrite control program.
【0022】そして更に、請求項7に記載された本発明
のように、このような請求項6に記載のメモリ書換装置
と、請求項5に記載の電子制御装置とから、電子制御装
置に搭載された不揮発性メモリの内容を書き換えるため
の電子制御装置のメモリ書換システムを構成すれば、ま
ず、電子制御装置からメモリ書換装置へ、識別情報記憶
手段に記憶された識別情報が送信され、メモリ書換装置
側にて、その電子制御装置からの識別情報と、新たなデ
ータに対応する識別情報とが一致しているか否かが判定
される。そして、両識別情報が一致している場合に、メ
モリ書換装置から電子制御装置へ、メモリ書換装置側の
識別情報と電子制御装置の識別情報記憶手段に記憶され
た識別情報とが一致していることを表す応答信号が送信
され、その後、書換制御プログラムが送信される。Further, as in the present invention described in claim 7, the memory rewriting device according to claim 6 and the electronic control device according to claim 5 are mounted on an electronic control device. If the memory rewriting system of the electronic control device for rewriting the contents of the non-volatile memory is configured, first, the identification information stored in the identification information storage means is transmitted from the electronic control device to the memory rewriting device, and the memory rewriting is performed. On the device side, it is determined whether or not the identification information from the electronic control device matches the identification information corresponding to the new data. When the two pieces of identification information match, the identification information on the memory rewriting device side matches the identification information stored in the identification information storage means of the electronic control device from the memory rewriting device to the electronic control device. Is transmitted, and then the rewrite control program is transmitted.
【0023】すると、電子制御装置側では、メモリ書換
装置からの応答信号に応じて、メモリ書換装置側の識別
情報と識別情報記憶手段に記憶された識別情報とが一致
している場合にのみ(即ち、メモリ書換装置からの応答
信号が、メモリ書換装置側の識別情報と電子制御装置の
識別情報記憶手段に記憶された識別情報とが一致してい
ることを表している場合にのみ)、書換制御プログラム
の揮発性のメモリ領域への転送が許可されることとな
り、前述した請求項1に記載の電子制御装置による効果
を確実に得ることができる。Then, the electronic control unit responds to the response signal from the memory rewriting device only when the identification information of the memory rewriting device matches the identification information stored in the identification information storage means ( That is, only when the response signal from the memory rewriting device indicates that the identification information on the memory rewriting device side matches the identification information stored in the identification information storage means of the electronic control device) The transfer of the control program to the volatile memory area is permitted, so that the effect of the electronic control device according to the first aspect can be reliably obtained.
【0024】但し、請求項2に記載の如く構成した電子
制御装置、或いは請求項4に記載の電子制御装置のメモ
リ書換システムによれば、識別情報記憶手段に記憶され
た識別情報が、電子制御装置の外部に送信されることが
無いため、電子制御装置側に記憶された識別情報を解読
して不揮発性メモリに格納されたデータを故意に他のデ
ータに書き換える、といった行為をより確実に防止する
ことができ、このような点では、請求項5に記載の電子
制御装置、或いは請求項7に記載の電子制御装置のメモ
リ書換システムよりも優れている。However, according to the electronic control device configured as described in claim 2, or according to the memory rewriting system of the electronic control device described in claim 4, the identification information stored in the identification information storage means is electronically controlled. Since it is not transmitted to the outside of the device, the act of decrypting the identification information stored in the electronic control unit and intentionally rewriting the data stored in the non-volatile memory with other data is more reliably prevented. In such a point, it is superior to the electronic control device according to claim 5 or the memory rewriting system of the electronic control device according to claim 7.
【0025】一方、請求項8に記載の電子制御装置は、
請求項1に記載の電子制御装置と同様に、通常時には、
電気的にデータの書き換えが可能な不揮発性メモリに格
納されたデータにより構成される制御プログラム及び制
御データに従って所定の制御対象を制御し、外部からの
書き換え指令を受けた場合には、外部装置から送信され
て来る書換制御プログラムを揮発性のメモリ領域に転送
して起動することにより、前記不揮発性メモリ内のデー
タを前記外部装置から送信されて来る新たなデータに書
き換えるための書換処理を行う。On the other hand, the electronic control device according to claim 8 is
Like the electronic control device according to claim 1, at normal time,
A predetermined control target is controlled in accordance with a control program and control data constituted by data stored in an electrically rewritable non-volatile memory, and when an external rewrite command is received, The rewriting control program transmitted is transferred to a volatile memory area and activated, thereby performing a rewriting process for rewriting data in the nonvolatile memory with new data transmitted from the external device.
【0026】そして、請求項8に記載の電子制御装置
は、当該電子制御装置の識別情報を予め記憶する識別情
報記憶手段と、判定手段と、転送許可手段とを備えてお
り、判定手段は、外部からの前記書き換え指令を受ける
と、外部装置から前記書換制御プログラムが送信されて
来る前に、前記外部装置から送信されて来る識別情報を
受信して、その受信した識別情報と、識別情報記憶手段
に記憶された識別情報とが一致しているか否かを判定
し、転送許可手段が、上記判定手段により前記両識別情
報が一致していると判定された場合にのみ、前記書換制
御プログラムの前記メモリ領域への転送を許可する。The electronic control unit according to the present invention includes an identification information storage unit for storing identification information of the electronic control unit in advance, a determination unit, and a transfer permission unit. Upon receiving the rewrite command from the outside, before the rewrite control program is transmitted from the external device, the identification information transmitted from the external device is received, and the received identification information and the identification information storage are received. It is determined whether the identification information stored in the rewriting control program matches the identification information stored in the rewriting control program. The transfer to the memory area is permitted.
【0027】このような請求項8に記載の電子制御装置
によれば、外部装置から書換制御プログラムを送信する
前に、当該電子制御装置の識別情報記憶手段に記憶され
た識別情報と同一の識別情報を外部装置から送信してや
らなければ、書換制御プログラムの揮発性のメモリ領域
への転送が許可されない。よって、不揮発性メモリ内の
データ(制御プログラム及び制御データ)を、不用意に
書き換えてしまうことや、故意に他のデータに書き換え
ることを確実に防止することができる。According to the electronic control device of the eighth aspect, before transmitting the rewrite control program from the external device, the same identification information as the identification information stored in the identification information storage means of the electronic control device is provided. Unless the information is transmitted from the external device, the transfer of the rewrite control program to the volatile memory area is not permitted. Therefore, it is possible to reliably prevent data (control program and control data) in the nonvolatile memory from being carelessly rewritten or intentionally rewritten with other data.
【0028】また、請求項8に記載の電子制御装置によ
れば、請求項1に記載の電子制御装置と同様に、外部装
置から送信されて来る書換制御プログラムを揮発性のメ
モリ領域に転送して起動することにより、不揮発性メモ
リ内のデータを書き換える書換処理を行うように構成さ
れているため、通常時において、プログラムを実行する
CPUが暴走したとしても、不揮発性メモリに格納され
ている正規の制御プログラムや制御データが失われたり
変化したりしてしまうことを確実に防止できる。According to the electronic control unit of the present invention, similarly to the electronic control unit of the first aspect, the rewriting control program transmitted from the external device is transferred to the volatile memory area. Is configured to perform a rewriting process of rewriting data in the non-volatile memory by starting up. Loss or change of the control program or control data can be reliably prevented.
【0029】[0029]
【発明の実施の形態】以下、本発明が適用された実施例
について図面を用いて説明する。尚、本発明の実施の形
態は、下記の実施例に何ら限定されることなく、本発明
の技術的範囲に属する限り、種々の形態を採り得ること
は言うまでもない。Embodiments of the present invention will be described below with reference to the drawings. It is needless to say that the embodiments of the present invention are not limited to the following examples, and can take various forms as long as they belong to the technical scope of the present invention.
【0030】[第1実施例]まず、図1は、自動車に搭
載されて内燃機関型エンジンの制御を行うエンジン制御
装置(以下、ECUという)2と、ECU2に内蔵され
たエンジン制御用のプログラムやデータを書き換える
際、或いは新規に書き込む際にECU2に接続されるメ
モリ書換装置4とからなる、実施例の電子制御装置のメ
モリ書換システム5の全体構成を表すブロック図であ
る。First Embodiment First, FIG. 1 shows an engine control device (hereinafter referred to as an ECU) 2 mounted on an automobile for controlling an internal combustion engine, and an engine control program built in the ECU 2. FIG. 3 is a block diagram illustrating an overall configuration of a memory rewriting system 5 of the electronic control device of the embodiment, which includes a memory rewriting device 4 connected to the ECU 2 when rewriting data or writing new data.
【0031】図1に示すように、ECU2は、エンジン
の運転状態を検出する様々なセンサからの信号を入力し
て波形処理する入力回路6と、入力回路6からのセンサ
信号に基づき、エンジンを制御するための様々な処理を
実行するシングルチップマイクロコンピュータ(以下、
マイコンという)8と、マイコン8からの制御信号に基
づき、エンジンに取り付けられたインジェクタ(燃料噴
射弁)やイグナイタ等のアクチュエータへ駆動信号を出
力する出力回路10とを備えている。As shown in FIG. 1, the ECU 2 receives signals from various sensors for detecting the operating state of the engine and performs waveform processing on the signals. The ECU 2 controls the engine based on the sensor signals from the input circuit 6. A single-chip microcomputer that executes various processes for controlling
A microcomputer 8, and an output circuit 10 that outputs a drive signal to an actuator such as an injector (fuel injection valve) or an igniter attached to the engine based on a control signal from the microcomputer 8.
【0032】そして、マイコン8には、プログラムに従
い動作する周知のCPU18と、CPU18を動作させ
るのに必要なプログラム及びデータを格納する不揮発性
のROM20と、CPU18の演算結果等を一時格納す
るRAM22と、前記入力回路6等からの信号を受ける
と共に、出力回路10に制御信号を出力するためのI/
O24と、メモリ書換装置4との間でデータ通信を行う
ための通信回路25とが備えられている。The microcomputer 8 includes a well-known CPU 18 that operates according to a program, a non-volatile ROM 20 that stores programs and data necessary for operating the CPU 18, and a RAM 22 that temporarily stores calculation results of the CPU 18 and the like. I / O for receiving a signal from the input circuit 6 and the like and outputting a control signal to the output circuit 10
A communication circuit 25 for performing data communication between the O24 and the memory rewriting device 4 is provided.
【0033】ここで、ROM20としては、電気的にデ
ータの消去及び書き込みが可能なフラッシュROM(フ
ラッシュEEPROM)20aと、データの書き換えが
不能なマスクROM20bとを備えている。そして、フ
ラッシュROM20aには、ECU2の製造工程におい
て当該マイコン8がECU2へ実装された後に、エンジ
ン制御用の制御プログラム及び制御データが新規に書き
込まれ、また、マスクROM20bには、リセット直後
に実行されるブートプログラムと、当該マイコン8が搭
載されるECU2の識別コード(以下、IDという)と
が、当該マイコン8のECU2への実装前に予め格納さ
れている。Here, the ROM 20 includes a flash ROM (flash EEPROM) 20a in which data can be electrically erased and written, and a mask ROM 20b in which data cannot be rewritten. Then, after the microcomputer 8 is mounted on the ECU 2 in the manufacturing process of the ECU 2, a control program and control data for engine control are newly written in the flash ROM 20 a, and are executed in the mask ROM 20 b immediately after the reset. The boot program and an identification code (hereinafter, referred to as ID) of the ECU 2 on which the microcomputer 8 is mounted are stored in advance before the microcomputer 8 is mounted on the ECU 2.
【0034】尚、上記IDは、ECU2が制御するエン
ジンの型式や仕様、或いは、ECU2が搭載される車種
名や車のグレード名など毎に設定されている。また、マ
スクROM20bに代えて、フラッシュROM20aと
同様に電気的にデータの消去及び書き込みが可能な不揮
発性メモリを用いても、データの書き換えが禁止されて
いれば良い。The ID is set for each model or specification of the engine controlled by the ECU 2, or for a vehicle type name or a vehicle grade name on which the ECU 2 is mounted. Further, instead of the mask ROM 20b, a non-volatile memory capable of electrically erasing and writing data as well as the flash ROM 20a may be used as long as data rewriting is prohibited.
【0035】このようなECU2において、マイコン8
(CPU18)は、リセット直後に、マスクROM20
b内のブートプログラムを起動し、メモリ書換装置4が
接続されていない通常時には、そのブートプログラムに
てフラッシュROM20a内のエンジン制御プログラム
(エンジン制御用の制御プログラム)をコールして、エ
ンジンの制御を行う。In such an ECU 2, the microcomputer 8
(CPU 18) immediately after the reset, the mask ROM 20
b), and at normal times when the memory rewriting device 4 is not connected, the boot program calls the engine control program (control program for engine control) in the flash ROM 20a to control the engine. Do.
【0036】また、マイコン8は、ブートプログラムを
起動した際に、後述するように書換モードであると判定
すると、フラッシュROM20a内の制御プログラムを
コールすることなく、そのままブートプログラムを実行
する。そして、後述する所定条件が成立すると、メモリ
書換装置4から送信されて来る書込制御プログラムを受
信してRAM22に格納し、その書込制御プログラムを
コールしてRAM22上で実行することにより、フラッ
シュROM20aに格納されている現在の制御プログラ
ム及び制御データを、その後メモリ書換装置4から送信
されて来る新たな制御プログラム及び制御データに書き
換える書換処理を行う。When the microcomputer 8 determines that the rewriting mode is set as described later when the boot program is started, the microcomputer 8 executes the boot program without calling the control program in the flash ROM 20a. When a predetermined condition described later is satisfied, a write control program transmitted from the memory rewriting device 4 is received and stored in the RAM 22, and the write control program is called and executed on the RAM 22, whereby the flash memory is read. A rewrite process is performed to rewrite the current control program and control data stored in the ROM 20a with a new control program and control data transmitted from the memory rewriting device 4 thereafter.
【0037】尚、フラッシュROM20aにエンジン制
御用の制御プログラム及び制御データが未だ書き込まれ
ていないECU2の製造時においても、フラッシュRO
M20aにエンジン制御用の制御プログラム及び制御デ
ータが新規に書き込まれるだけで全く同様である。It should be noted that even when the ECU 2 in which the control program and the control data for engine control have not yet been written in the flash ROM 20a, the flash RO 20a is manufactured.
The same is true except that a control program and control data for engine control are newly written in M20a.
【0038】一方、メモリ書換装置4は、ECU2側の
マイコン8にフラッシュROM20aの書き換えを行わ
せるための処理を実行するCPU,ROM,RAM等を
内蔵したマイコン30と、このマイコン30からの指令
に応じて、ECU2側のマイコン8へ、フラッシュRO
M20aのデータ書換時に必要な書換電圧(本実施例で
は12V)Vppを供給する電源回路32と、ECU2
の動作モードを、エンジンの制御を行う通常モードから
フラッシュROM20aのデータを書き換える(或いは
新規に書き込む)書換モードに変更させるための書換ス
イッチSWとを備えている。On the other hand, the memory rewriting device 4 has a microcomputer 30 having a built-in CPU, ROM, RAM and the like for executing a process for causing the microcomputer 8 of the ECU 2 to rewrite the flash ROM 20a, and a command from the microcomputer 30. Accordingly, the flash RO is sent to the microcomputer 8 on the ECU 2 side.
A power supply circuit 32 for supplying a rewrite voltage (12 V in this embodiment) Vpp required for rewriting the data of M20a;
And a rewrite switch SW for changing the operation mode from the normal mode for controlling the engine to the rewrite mode for rewriting (or newly writing) the data in the flash ROM 20a.
【0039】そして更に、メモリ書換装置4は、ECU
2へ送信する書換制御プログラム(詳しくは、書換制御
プログラムを構成するプログラムコード)が格納された
第1のROM34と、ECU2のフラッシュROM20
aに書き込むために用意される新たな制御プログラム及
び制御データが格納された第2のROM36とを備えて
いる。尚、第1のROM34と第2のROM36は、夫
々、周知のICソケット38,40によって、当該メモ
リ書換装置4に着脱可能に設けられている。Further, the memory rewriting device 4 includes an ECU
A first ROM 34 storing a rewrite control program (specifically, a program code constituting the rewrite control program) to be transmitted to the ECU 2, and a flash ROM 20 of the ECU 2
and a second ROM 36 in which a new control program and control data prepared for writing to a are stored. The first ROM 34 and the second ROM 36 are detachably provided to the memory rewriting device 4 by well-known IC sockets 38 and 40, respectively.
【0040】また、上記第2のRAM36には、それに
格納されたエンジン制御用の制御プログラム及び制御デ
ータに適合するECUのID、即ち、データ書き換え対
象であるECUのIDが格納されている。このようなメ
モリ書換装置4とECU2との接続は、図1に示す如
く、メモリ書換装置4側の雌コネクタ42FとECU2
に設けられた雄コネクタ42Mとを嵌合することにより
行われる。The second RAM 36 stores the ID of the ECU that matches the engine control program and the control data stored in the second RAM 36, that is, the ID of the ECU whose data is to be rewritten. As shown in FIG. 1, the connection between the memory rewriting device 4 and the ECU 2 is established by connecting the female connector 42F of the memory rewriting device 4 to the ECU 2 as shown in FIG.
This is performed by fitting the male connector 42M provided in the connector.
【0041】即ち、上記両コネクタ42F,42Mが嵌
合されると、通信線44を介して、メモリ書換装置4側
のマイコン30とECU2側のマイコン8との間におけ
るシリアルデータ通信が可能となり、また、電源供給線
46を介して、メモリ書換装置4側の電源回路32から
ECU2側のマイコン8へフラッシュROM20aのデ
ータ書換時に必要な書換電圧Vppが供給される。そし
て更に、メモリ書換装置4側で書換スイッチSWを介し
て接地電位(0V)に接続される信号線48が、ECU
2側で抵抗器Rにより5Vにプルアップされたモード判
定用信号ラインLに接続され、これにより、メモリ書換
装置4側で書換スイッチSWがONされると、ECU2
側においては上記モード判定用信号ラインLがハイレベ
ル(5V)からロウレベル(0V)に変化することとな
る。そして、ECU2のマイコン8は、前述の如くブー
トプログラムを起動した際に、モード判定用信号ライン
Lがロウレベルであれば、書換モードと判定する。That is, when the two connectors 42F and 42M are fitted, serial data communication between the microcomputer 30 on the memory rewriting device 4 side and the microcomputer 8 on the ECU 2 becomes possible via the communication line 44. In addition, a rewrite voltage Vpp necessary for rewriting data in the flash ROM 20a is supplied from the power supply circuit 32 of the memory rewrite device 4 to the microcomputer 8 of the ECU 2 via the power supply line 46. Further, a signal line 48 connected to the ground potential (0 V) via the rewriting switch SW on the memory rewriting device 4 side is connected to the ECU.
When the rewriting switch SW is turned on on the memory rewriting device 4 side, the ECU 2 is connected to the mode determination signal line L pulled up to 5 V by the resistor R on the 2 side.
On the side, the mode determination signal line L changes from the high level (5 V) to the low level (0 V). When the mode determination signal line L is at the low level when the boot program is started as described above, the microcomputer 8 of the ECU 2 determines that the rewrite mode is set.
【0042】次に、ECU2のマイコン8で実行される
処理と、メモリ書換装置4のマイコン30で実行される
処理について、図2及び図3を用いて説明する。尚、図
2は、ECU2のマイコン8で実行される処理を表すフ
ローチャートであり、そのステップ(以下、単に「S」
と記す)100〜S170の処理が、マスクROM20
b内のブートプログラムによって実行され、S200の
処理が、フラッシュROM20a内のエンジン制御プロ
グラムによって実行される。そして、S300の処理
が、メモリ書換装置4から送信されてRAM22に転送
される書換制御プログラムによって実行される。また、
図3は、メモリ書換装置4のマイコン30で実行される
処理を表すフローチャートである。Next, the processing executed by the microcomputer 8 of the ECU 2 and the processing executed by the microcomputer 30 of the memory rewriting device 4 will be described with reference to FIGS. FIG. 2 is a flowchart showing the processing executed by the microcomputer 8 of the ECU 2, and its steps (hereinafter simply referred to as "S") are shown.
The processing from 100 to S170 is performed by the mask ROM 20.
b, and the processing of S200 is executed by the engine control program in the flash ROM 20a. Then, the process of S300 is executed by the rewriting control program transmitted from the memory rewriting device 4 and transferred to the RAM 22. Also,
FIG. 3 is a flowchart illustrating a process executed by the microcomputer 30 of the memory rewriting device 4.
【0043】まず、ECU2では、車両のイグニッショ
ンスイッチがONされるなどして電源が投入され、マイ
コン8がリセット状態から動作を開始すると、マスクR
OM20bに格納されたブートプログラムが起動する。
そして、図2に示すように、まずS100にて、書換モ
ードであるか否かを、モード判定用信号ラインLがロウ
レベルであるか否かによって判定し、モード判定用信号
ラインLがロウレベルでなければ、書換モードではない
通常モードであると判断して、S110に進み、エンジ
ン制御プログラムへジャンプする。First, in the ECU 2, when the power is turned on by turning on the ignition switch of the vehicle and the microcomputer 8 starts operating from the reset state, the mask R
The boot program stored in the OM 20b starts.
Then, as shown in FIG. 2, first, in S100, it is determined whether or not the mode is the rewrite mode based on whether or not the mode determination signal line L is at a low level. For example, it is determined that the normal mode is not the rewriting mode, the process proceeds to S110, and jumps to the engine control program.
【0044】すると、フラッシュROM20aに格納さ
れている制御プログラムが起動され、その後は、S20
0に示すように、エンジン制御用の制御データを参照し
て行われるエンジン制御処理が実行される。尚、S20
0のエンジン制御処理は、入力回路6からの各種センサ
信号とフラッシュROM20aに格納された制御データ
とに基づき、エンジンに対する最適な燃料噴射量や点火
時期等を演算し、その演算結果に応じて、インジェクタ
やイグナイタ等のアクチュエータを駆動するための制御
信号を出力回路10に出力する、といった手順で繰り返
し実行される。そして、このようなエンジン制御処理が
実行されることにより、エンジンの運転が可能となる。Then, the control program stored in the flash ROM 20a is started.
As shown by 0, an engine control process performed with reference to engine control data is executed. S20
The engine control process of 0 calculates an optimal fuel injection amount, an ignition timing, and the like for the engine based on various sensor signals from the input circuit 6 and control data stored in the flash ROM 20a. The control signal for driving an actuator such as an injector or an igniter is output to the output circuit 10 repeatedly. Then, by executing such an engine control process, the engine can be operated.
【0045】一方、ブートプログラムにおいて、上記S
100で書換モードであると判断した場合、即ち、当該
ECU2にメモリ書換装置4が接続されて書換スイッチ
SWがONされることにより、モード判定用信号ライン
Lがロウレベルであった場合には、フラッシュROM2
0a内のエンジン制御プログラムへジャンプすることな
く、そのままS120に移行する。On the other hand, in the boot program,
If it is determined at 100 that the mode is the rewriting mode, that is, if the memory rewriting device 4 is connected to the ECU 2 and the rewriting switch SW is turned on, the mode determination signal line L is at a low level, ROM2
The process directly proceeds to S120 without jumping to the engine control program in 0a.
【0046】そして、このS120にて、後述するよう
にメモリ書換装置4から送信されて来るIDを受信する
まで待機し、メモリ書換装置4からのIDを受信する
と、次のS130に進んで、受信したメモリ書換装置4
からのID(受信ID)と、マスクROM20bに格納
されている自己のID(内蔵ID)とが一致しているか
否かを判定する。そして、両IDが一致していると判定
した場合には、S140に進んで、メモリ書換装置4
へ、書換制御プログラムの送信を要求するための要求信
号を送信する。In step S120, as described later, the process waits until an ID transmitted from the memory rewriting device 4 is received. When an ID from the memory rewriting device 4 is received, the process proceeds to the next step S130, where the reception is performed. Memory rewriting device 4
Then, it is determined whether or not the ID (received ID) from the server and its own ID (built-in ID) stored in the mask ROM 20b match. If it is determined that the two IDs match, the process proceeds to S140, where the memory rewriting device 4
, A request signal for requesting transmission of the rewrite control program is transmitted.
【0047】すると、後述するようにメモリ書換装置4
から当該ECU2へ書換制御プログラムが送信されて来
るため、続くS150にて、メモリ書換装置4からの書
換制御プログラムを受信して、RAM22の所定領域に
転送・格納する。そして、続くS160にて、S150
でRAM22に格納した書換制御プログラムへジャンプ
する。Then, as described later, the memory rewriting device 4
The rewrite control program is transmitted from the memory rewrite device 4 to the ECU 2. The rewrite control program is received from the memory rewrite device 4 and transferred and stored in a predetermined area of the RAM 22 in S150. Then, in subsequent S160, S150
To jump to the rewrite control program stored in the RAM 22.
【0048】これにより、メモリ書換装置4から送信さ
れて来た書換制御プログラムがRAM22上で実行され
て、フラッシュROM20aに格納されている現在の制
御プログラム及び制御データを、メモリ書換装置4から
送信されて来る新たな制御プログラム及び制御データに
書き換えるための、S300の書換処理が行われる。As a result, the rewriting control program transmitted from the memory rewriting device 4 is executed on the RAM 22, and the current control program and control data stored in the flash ROM 20a are transmitted from the memory rewriting device 4. The rewriting process of S300 for rewriting the new control program and control data to be performed is performed.
【0049】尚、S300の書換処理は、例えば次のよ
うな手順で実行される。1.まず、メモリ書換装置4か
らの消去指令に応じて、フラッシュROM20aに格納
されているプログラム及びデータを消去する。2.次
に、メモリ書換装置4から新たな制御プログラム及び制
御データが送信されて来るのを待ち、それらを受信する
と、その受信した制御プログラム及び制御データを、旧
来のプログラム及びデータが格納されていたフラッシュ
ROM20aの記憶領域に順次書き込んで行く。The rewriting process in S300 is executed, for example, in the following procedure. 1. First, a program and data stored in the flash ROM 20a are erased in response to an erase command from the memory rewriting device 4. 2. Next, it waits for a new control program and control data to be transmitted from the memory rewriting device 4, and upon receiving them, the received control program and control data are replaced with the flash memory in which the old programs and data are stored. The data is sequentially written to the storage area of the ROM 20a.
【0050】3.そして、メモリ書換装置4からの全て
の制御プログラム及び制御データを受信して、フラッシ
ュROM20aの書き換えが完了すれば、その後、全て
の処理を終了する。そして、このようなS300の書換
処理が実行されることにより、フラッシュROM20a
に格納された制御プログラム及びデータが、メモリ書換
装置4からの新たな制御プログラム及び制御データに書
き換えられる。3. Then, when all the control programs and control data from the memory rewriting device 4 are received and the rewriting of the flash ROM 20a is completed, all the processes are thereafter terminated. When the rewriting process in S300 is performed, the flash ROM 20a
Is rewritten with a new control program and control data from the memory rewriting device 4.
【0051】一方、ブートプログラムのS130にて、
メモリ書換装置4から送信されて来たID(受信ID)
と、マスクROM20bに格納されている自己のID
(内蔵ID)とが一致していないと判定した場合には、
S170に移行する。そして、このS170にて、メモ
リ書換装置4からのIDと当該ECU2側のIDとが一
致していない旨を示すエラー信号を、メモリ書換装置4
へ送信し、その後、当該ECU2側の処理を終了する。On the other hand, in S130 of the boot program,
ID (reception ID) transmitted from the memory rewriting device 4
And its own ID stored in the mask ROM 20b
(Internal ID) does not match,
The process moves to S170. In S170, an error signal indicating that the ID from the memory rewriting device 4 does not match the ID on the ECU 2 side is output to the memory rewriting device 4.
And then the ECU 2 ends the process.
【0052】次に、メモリ書換装置4では、作業者によ
りECU2に接続されて書換スイッチSWがONされる
と、マイコン30が、図3に示す処理を実行する。即
ち、まずS400にて、第2のRAM36に格納された
新たな制御プログラム及び制御データに適合するECU
のID(データ書き換え対象であるECUのID)を、
第2のROM36から読み出し、その読み出したID
(内蔵ID)をECU2へ送信する。Next, in the memory rewriting device 4, when the worker is connected to the ECU 2 and turns on the rewriting switch SW, the microcomputer 30 executes the processing shown in FIG. That is, first, in S400, an ECU that matches the new control program and control data stored in the second RAM 36
(The ID of the ECU whose data is to be rewritten)
Read from the second ROM 36 and read the ID
(Built-in ID) is transmitted to the ECU 2.
【0053】すると、前述したように、ECU2側で
は、当該メモリ書換装置4からECU2へ送信したID
と、自己のマスクROM20bに格納されているIDと
が一致しているか否かを判定し(S130)、両IDが
一致していれば、当該メモリ書換装置4へ書換制御プロ
グラムの要求信号を送信し(S140)、両IDが一致
していなければ、当該メモリ書換装置4へエラー信号を
送信するため(S170)、メモリ書換装置4側では、
続くS410にて、ECU2から送信されて来る信号
(要求信号或いはエラー信号)を受信し、その信号の種
類を判定する。Then, as described above, the ECU 2 transmits the ID transmitted from the memory rewriting device 4 to the ECU 2.
And whether the ID stored in its own mask ROM 20b matches (S130). If both IDs match, a request signal of the rewrite control program is transmitted to the memory rewriting device 4. If the two IDs do not match (S140), an error signal is transmitted to the memory rewriting device 4 (S170).
At S410, a signal (request signal or error signal) transmitted from ECU 2 is received, and the type of the signal is determined.
【0054】そして、ECU2からの信号が書換制御プ
ログラムの要求信号であれば、S420に進んで、第1
のROM34に格納されている書換制御プログラムをE
CU2へ送信する。そして更に、続くS430にて、E
CU2へ、前述した消去指令を送信した後、第2のRO
M36に格納されている新たな制御プログラム及び制御
データを送信する。If the signal from the ECU 2 is a request signal of the rewrite control program, the process proceeds to S420, where the first
The rewrite control program stored in the ROM 34 of
Send to CU2. Further, in the following S430, E
After transmitting the above-mentioned erase command to CU2, the second RO
The new control program and control data stored in M36 are transmitted.
【0055】すると、ECU2側では、前述した図2に
おけるS300の書換処理により(即ち、書換制御プロ
グラムの実行により)、フラッシュROM20a内の制
御プログラム及び制御データが、当該メモリ書換装置4
から送信される新たな制御プログラム及び制御データに
書き換えられることとなる。Then, on the ECU 2 side, the control program and the control data in the flash ROM 20a are transferred to the memory rewriting device 4 by the rewriting process of S300 in FIG. 2 (that is, by executing the rewriting control program).
Will be rewritten with a new control program and control data transmitted from.
【0056】そして、メモリ書換装置4では、上記S4
30の処理を終えると、全ての処理が終了する。一方、
S410にて、ECU2からの信号がエラー信号である
と判断した場合には、S440に移行して、所定の表示
装置(図示省略)に、データの書き換えが出来ないこと
を示すエラー表示を行い、その後、当該メモリ書換装置
4側の処理を終了する。Then, in the memory rewriting device 4, the S4
When the process of 30 is completed, all the processes are completed. on the other hand,
If it is determined in step S410 that the signal from the ECU 2 is an error signal, the process proceeds to step S440, and an error display indicating that data cannot be rewritten is displayed on a predetermined display device (not shown). After that, the processing on the memory rewriting device 4 side ends.
【0057】尚、本第1実施例では、ECU2におい
て、フラッシュROM20aが、電気的にデータの書き
換えが可能な不揮発性メモリに相当し、RAM22が、
揮発性のメモリ領域に相当し、マスクROM20bが、
識別情報記憶手段に相当している。そして、図2におけ
るS120及びS130の処理が、判定手段及び転送許
可手段に相当している。また、メモリ書換装置4におい
て、第2のROM36が、データ記憶手段に相当してい
る。In the first embodiment, in the ECU 2, the flash ROM 20a corresponds to an electrically rewritable nonvolatile memory, and the RAM 22
The mask ROM 20b corresponds to a volatile memory area,
It corresponds to identification information storage means. Then, the processes of S120 and S130 in FIG. 2 correspond to the determination unit and the transfer permission unit. In the memory rewriting device 4, the second ROM 36 corresponds to a data storage unit.
【0058】このような第1実施例のメモリ書換システ
ム5において、ECU2のフラッシュROM20aに格
納された制御プログラム及び制御データを書き換える場
合には、作業者は、まず、メモリ書換装置4のICソケ
ット38に、ECU2側で実行させる書換制御プログラ
ムが格納された第1のROM34を装着すると共に、I
Cソケット40に、新たな制御プログラム及び制御デー
タと、それに適合するECUのIDとが格納された第2
のROM36を装着する。そして、メモリ書換装置4を
ECU2に接続して、メモリ書換装置4の書換スイッチ
SWをONすると共に、車両のイグニッションスイッチ
をONしてECU2を初期状態から作動させる。In the memory rewriting system 5 of the first embodiment, when rewriting the control program and the control data stored in the flash ROM 20a of the ECU 2, the operator first needs to rewrite the IC socket 38 of the memory rewriting device 4. A first ROM 34 in which a rewrite control program to be executed by the ECU 2 is stored is mounted.
A second control program in which a new control program and control data and an ID of an ECU conforming thereto are stored in the C socket 40.
Is mounted. Then, the memory rewriting device 4 is connected to the ECU 2, the rewriting switch SW of the memory rewriting device 4 is turned on, and the ignition switch of the vehicle is turned on to operate the ECU 2 from the initial state.
【0059】すると、メモリ書換装置4からECU2
へ、第2のRAM36に格納された新たな制御プログラ
ム及び制御データに適合するECUのIDが送信され
(S400)、ECU2では、メモリ書換装置4からの
IDと、マスクROM20bに格納されている自己のI
Dとが一致しているか否かを判定する(S130)。Then, from the memory rewriting device 4 to the ECU 2
The ECU ID that is compatible with the new control program and control data stored in the second RAM 36 is transmitted to the ECU 2 (S400), and the ECU 2 sends the ID from the memory rewriting device 4 and the self ID stored in the mask ROM 20b. I
It is determined whether or not D matches (S130).
【0060】そして、両IDが一致している場合(S1
30:YES)には、ECU2からメモリ書換装置4
へ、書換制御プログラムの要求信号が送信され(S14
0)、これに応答して、メモリ書換装置4からECU2
へ、書換制御プログラムが送信される(S410:要求
信号,S420)。When both IDs match (S1
30: YES), the ECU 2 sends the memory rewriting device 4
To the request signal of the rewrite control program (S14).
0), and in response to this, the memory rewriting device 4
The rewrite control program is transmitted to (S410: request signal, S420).
【0061】その後、ECU2においては、メモリ書換
装置4からの書換制御プログラムがRAM22に転送さ
れて実行され(S150,S160,S300)、ま
た、メモリ書換装置4においては、ECU2への新たな
制御プログラム及び制御データの送信が行われ(S43
0)、このような両装置の動作により、ECU2に搭載
されたフラッシュROM20aのデータ書き換えが行わ
れる。Thereafter, in the ECU 2, the rewriting control program from the memory rewriting device 4 is transferred to the RAM 22 and executed (S150, S160, S300). In the memory rewriting device 4, a new control program for the ECU 2 is transmitted. And transmission of control data is performed (S43).
0), the data of the flash ROM 20a mounted on the ECU 2 is rewritten by the operation of both devices.
【0062】これに対して、メモリ書換装置4からEC
U2へ送信されたIDとECU2に内蔵されたIDとが
一致していない場合には(S130:NO)、ECU2
は、メモリ書換装置4へエラー信号を送信して、全ての
処理を終了し(S170)、メモリ書換装置4は、EC
U2からのエラー信号を受けると(S410:エラー信
号)、ECU2へ書換制御プログラムを送信することな
く、エラー表示を行う(S440)。On the other hand, the memory rewriting device 4
If the ID transmitted to U2 does not match the ID stored in ECU2 (S130: NO), ECU2
Sends an error signal to the memory rewriting device 4 and ends all the processing (S170).
When an error signal is received from U2 (S410: error signal), an error is displayed without transmitting a rewrite control program to the ECU 2 (S440).
【0063】以上詳述したように、第1実施例のメモリ
書換システム5では、まず、メモリ書換装置4が、新た
な制御プログラム及び制御データに適合するECUのI
Dを送信し、ECU2は、メモリ書換装置4から送信さ
れて来たIDと、マスクROM20bに格納されている
自己のIDとが一致しているか否かを判定する。そし
て、ECU2は、メモリ書換装置4からのIDと自己の
IDとが一致している場合にのみ、メモリ書換装置4へ
書換制御プログラムの送信要求を送信すると共に、それ
に応答してメモリ書換装置4から送信されて来る書換制
御プログラムをRAM22に転送して実行し、これによ
り、フラッシュROM20a内の制御プログラム及び制
御データを、その後、メモリ書換装置4から送信されて
来る新たな制御プログラム及び制御データに書き換える
ようにしている。As described in detail above, in the memory rewriting system 5 of the first embodiment, first, the memory rewriting device 4 is configured so that the I / O of the ECU adapted to the new control program and control data
D is transmitted, and the ECU 2 determines whether or not the ID transmitted from the memory rewriting device 4 matches its own ID stored in the mask ROM 20b. Only when the ID from the memory rewriting device 4 matches the ID of the own device, the ECU 2 transmits a transmission request of the rewriting control program to the memory rewriting device 4 and responds to the request. Is transferred to the RAM 22 and executed, thereby converting the control program and control data in the flash ROM 20a into a new control program and control data subsequently transmitted from the memory rewriting device 4. I try to rewrite.
【0064】従って、このような第1実施例のECU2
及びメモリ書換システム5によれば、作業者が、メモリ
書換装置4のICソケット40に、ECU2に適合しな
い制御プログラム及び制御データが格納されたROM
(第2のROM)36を装着してしまい、その不適合な
制御プログラム及び制御データがECU2へ送信されそ
うな場合には、メモリ書換装置4側のID(即ち、第2
のROM36にて新たな制御プログラム等と対応して予
め記憶されたID)と、マスクROM20bに記憶され
たECU2のIDとが一致しないため、ECU2では、
書換制御プログラムのRAM22への転送動作へ移行し
なくなる。よって、フラッシュROM20a内の制御プ
ログラムや制御データが、そのECU2に適合しない制
御プログラムや制御データに、誤って書き換えられてし
まうことを確実に防止することができる。Accordingly, the ECU 2 according to the first embodiment has the following features.
According to the memory rewriting system 5, a worker stores in the IC socket 40 of the memory rewriting device 4 a control program and control data that are not compatible with the ECU 2.
If the (second ROM) 36 is mounted and the incompatible control program and control data are likely to be transmitted to the ECU 2, the ID of the memory rewriting device 4 (that is, the second
Of the ECU 2 stored in the mask ROM 20b does not match with the ID stored in advance in the ROM 36 in correspondence with the new control program or the like.
The operation does not shift to the transfer operation of the rewrite control program to the RAM 22. Therefore, it is possible to reliably prevent the control program and the control data in the flash ROM 20a from being erroneously rewritten to the control program and the control data that are not suitable for the ECU 2.
【0065】尚、このように制御プログラム及び制御デ
ータの書き換えが行われない場合には、作業者は、メモ
リ書換装置4側の第2のROM36を、ECU2に適合
した制御プログラム及び制御データを記憶したものに変
更してから、再度、書き換えのための作業を行えばよ
い。そして更に、第1実施例のECU2では、メモリ書
換装置4から送信されて来る書換制御プログラムを揮発
性のRAM22に転送して起動することにより、フラッ
シュROM20a内のデータを書き換える書換処理を行
うように構成されているため、フラッシュROM20a
の内容を書き換える作業を終了した後に、当該ECU2
の電源を一旦遮断すれば、RAM22に転送された書換
制御プログラムは消失する。よって、第1実施例のEC
U2によれば、エンジンを制御する通常時において、当
該ECU2への電源供給を開始した後、万が一、プログ
ラムを実行するCPU18が暴走したとしても、書換処
理を行うための書換制御プログラムは内蔵されていない
ため、フラッシュROM20aに格納されている正規の
制御プログラムや制御データが失われたり変化したりし
てしまうことを確実に防止できる。When the control program and the control data are not rewritten, the operator stores the control program and the control data suitable for the ECU 2 in the second ROM 36 of the memory rewriting device 4. After that, the rewriting operation may be performed again. Further, in the ECU 2 of the first embodiment, the rewriting control program transmitted from the memory rewriting device 4 is transferred to the volatile RAM 22 and activated to perform the rewriting process for rewriting the data in the flash ROM 20a. The flash ROM 20a
After the operation of rewriting the contents of
Once the power supply to the RAM 22 is turned off, the rewrite control program transferred to the RAM 22 disappears. Therefore, the EC of the first embodiment
According to U2, a rewriting control program for performing a rewriting process is built in even if the CPU 18 that executes the program runs out of control after the power supply to the ECU 2 is started during the normal time of controlling the engine. Therefore, it is possible to reliably prevent the normal control program and control data stored in the flash ROM 20a from being lost or changed.
【0066】また、第1実施例のECU2及びメモリ書
換システム5では、ECU2が、メモリ書換装置4から
のIDを受信して、そのIDと自己のID(即ち、マス
クROM20bに格納されたID)とが一致しているか
否かを判定するようにしており、マスクROM20bに
格納されたIDはECU2の外部に送信されることが無
いため、当該ECU2側のIDを解読して、フラッシュ
ROM20a内の制御プログラム等を故意に他のものに
書き換える、といった行為を確実に防止することができ
る。Further, in the ECU 2 and the memory rewriting system 5 of the first embodiment, the ECU 2 receives the ID from the memory rewriting device 4, and receives the ID and its own ID (ie, the ID stored in the mask ROM 20b). Is determined, and since the ID stored in the mask ROM 20b is not transmitted to the outside of the ECU 2, the ID on the ECU 2 side is decoded and the ID in the flash ROM 20a is read. The act of intentionally rewriting the control program or the like with another one can be reliably prevented.
【0067】そして、同様の理由により、例えば、フラ
ッシュROM20a内のデータを読み出して外部へ送信
するといった読出処理を行うためのプログラムを、EC
U2のRAM22に転送させて実行させ、フラッシュR
OM20aの記憶内容を不正に読み取る、といった行為
も防止でき、機密性を高めることができる。For the same reason, for example, a program for performing a read process such as reading data in the flash ROM 20a and transmitting the read data to the outside is stored in an EC.
U2 is transferred to the RAM 22 and executed.
The act of illegally reading the stored contents of the OM 20a can also be prevented, and the confidentiality can be increased.
【0068】一方、上記第1実施例のメモリ書換システ
ム5では、ECU2は、メモリ書換装置4からのIDと
自分側のIDとが一致していないと判定すると、メモリ
書換装置4へエラー信号を送信し、メモリ書換装置4
は、ECU2からのエラー信号を受けると、表示装置に
エラー表示を行うようにしている。On the other hand, in the memory rewriting system 5 of the first embodiment, if the ECU 2 determines that the ID from the memory rewriting device 4 does not match its own ID, the ECU 2 sends an error signal to the memory rewriting device 4. Transmit and rewrite memory 4
Receives an error signal from the ECU 2 and displays an error on a display device.
【0069】従って、作業者は、書き換えようとして用
意した新たな制御プログラム及び制御データがECU2
に適合していないことを、メモリ書換装置4側のエラー
表示によって、確実に知ることができる。 [第2実施例]次に、第2実施例の電子制御装置のメモ
リ書換システムについて説明する。第2実施例のメモリ
書換システムは、上述した第1実施例のメモリ書換シス
テム5に対して、ECU2側とメモリ書換装置4側とで
夫々実行される処理が異なるだけであり、ハードウェア
上の構成については全く同じである。Therefore, the operator needs to renew the new control program and control data prepared for rewriting.
Is not surely confirmed by the error display on the memory rewriting device 4 side. [Second Embodiment] Next, a memory rewriting system for an electronic control unit according to a second embodiment will be described. The memory rewriting system of the second embodiment differs from the memory rewriting system 5 of the first embodiment only in the processing executed on the ECU 2 side and the memory rewriting device 4 side, respectively. The configuration is exactly the same.
【0070】そこで以下、第2実施例のメモリ書換シス
テムにおいて、ECU2側のマイコン8で実行される処
理と、メモリ書換装置4側のマイコン30で実行される
処理について、図4及び図5を用いて説明する。尚、図
4は、ECU2のマイコン8で実行される処理を表すフ
ローチャートであり、第1実施例の図2と同じ処理につ
いては、同じステップ番号を付しているため、詳細な説
明は省略する。また、図5は、メモリ書換装置4のマイ
コン30で実行される処理を表すフローチャートであ
り、第1実施例の図3と同じ処理については、同じステ
ップ番号を付しているため、詳細な説明は省略する。Therefore, in the memory rewriting system of the second embodiment, the processing executed by the microcomputer 8 of the ECU 2 and the processing executed by the microcomputer 30 of the memory rewriting device 4 will be described with reference to FIGS. Will be explained. FIG. 4 is a flowchart showing a process executed by the microcomputer 8 of the ECU 2. The same processes as those in FIG. 2 of the first embodiment are denoted by the same step numbers, and therefore detailed description is omitted. . FIG. 5 is a flowchart showing processing executed by the microcomputer 30 of the memory rewriting device 4. Since the same steps as those in FIG. 3 of the first embodiment are denoted by the same step numbers, detailed description will be made. Is omitted.
【0071】まず、図4に示すように、ECU2のマイ
コン8は、リセットスタート直後のS100にて書換モ
ードであると判定した場合には、フラッシュROM20
a内の制御プログラムへジャンプすることなく、S12
5に移行する。そして、このS125にて、マスクRO
M20bに格納されている自己のIDをメモリ書換装置
4へ送信し、続くS135にて、後述するようにメモリ
書換装置4から送信されて来る信号(応答信号)が、正
常信号であるかエラー信号であるかを判定する。First, as shown in FIG. 4, when the microcomputer 8 of the ECU 2 determines that the rewrite mode is set in S100 immediately after the reset start, the microcomputer 8 executes the flash ROM 20 operation.
S12 without jumping to the control program in
Move to 5. Then, in this S125, the mask RO
The self-ID stored in M20b is transmitted to the memory rewriting device 4, and in S135, as described later, the signal (response signal) transmitted from the memory rewriting device 4 is a normal signal or an error signal. Is determined.
【0072】そして、S135にて、メモリ書換装置4
からの信号が正常信号であると判定した場合には、S1
50,S160,S300の処理、即ち、メモリ書換装
置4からの書換制御プログラムを受信してRAM22に
転送・格納し、その書換制御プログラムをRAM22上
で実行することにより、フラッシュROM20aに格納
されている制御プログラム及び制御データを、メモリ書
換装置4から送信されて来る新たな制御プログラム及び
制御データに書き換える処理を行う。Then, in S135, the memory rewriting device 4
Is determined to be a normal signal from S1
50, S160, and S300, that is, the rewrite control program from the memory rewriting device 4 is received, transferred and stored in the RAM 22, and the rewrite control program is executed on the RAM 22 to be stored in the flash ROM 20a. A process of rewriting the control program and control data with a new control program and control data transmitted from the memory rewriting device 4 is performed.
【0073】これに対し、S135にて、メモリ書換装
置4からの信号がエラー信号であると判定した場合に
は、そのまま当該ECU2側の処理を終了する。尚、本
第2実施例では、S125及びS135の処理が、判定
手段及び転送許可手段に相当している。On the other hand, if it is determined in S135 that the signal from the memory rewriting device 4 is an error signal, the processing on the ECU 2 side is terminated. In the second embodiment, the processes in S125 and S135 correspond to the determination unit and the transfer permission unit.
【0074】次に、図5に示すように、メモリ書換装置
4のマイコン30は、まずS405にて、ECU2から
送信されて来るIDを受信するまで待機し、ECU2か
らのIDを受信すると、S415に進んで、受信したE
CU2からのID(受信ID)と、第2のRAM36に
格納されているECUのID(内蔵ID)とが一致して
いるか否かを判定する。Next, as shown in FIG. 5, the microcomputer 30 of the memory rewriting device 4 first waits in step S405 until an ID transmitted from the ECU 2 is received. To the received E
It is determined whether or not the ID (reception ID) from the CU 2 matches the ID (built-in ID) of the ECU stored in the second RAM 36.
【0075】そして、両IDが一致していると判定した
場合には、S417に進んで、ECU2へ、当該メモリ
書換装置4側のIDとECU2側のIDとが一致してい
ることを表す正常信号を送信する。すると、前述したよ
うに、ECU2側のマイコン8は図4のS150以降の
処理実行を開始するため、当該メモリ書換装置4側で
は、上記S417で正常信号を送信した後、第1実施例
の場合と同様に、S420及びS430の処理を実行し
て、第1のROM34に格納されている書換制御プログ
ラムと、第2のROM36に格納されている新たな制御
プログラム及び制御データとを、ECU2に順次送信す
る。If it is determined that the two IDs match, the process proceeds to S417, in which the ECU 2 informs the ECU 2 that the ID of the memory rewriting device 4 and the ID of the ECU 2 match. Send a signal. Then, as described above, the microcomputer 8 on the ECU 2 side starts the processing after S150 in FIG. 4, so that the memory rewriting device 4 transmits the normal signal in S417, and then returns to the case of the first embodiment. Similarly, the processes of S420 and S430 are executed, and the rewrite control program stored in the first ROM 34 and the new control program and control data stored in the second ROM 36 are sequentially transmitted to the ECU 2. Send.
【0076】一方、S415にて、ECU2からのID
(受信ID)と、第2のRAM36に格納されているE
CUのID(内蔵ID)とが一致していないと判定した
場合には、S445に移行して、ECU2へ、当該メモ
リ書換装置4側のIDとECU2側のIDとが一致して
いないことを表すエラー信号を送信した後、そのまま当
該メモリ書換装置4側の処理を終了する。すると、EC
U2では、前述したように、図4のS150以降の処理
が実行されることなく、全ての処理が終了される。On the other hand, at S415, the ID
(Reception ID) and E stored in the second RAM 36.
If it is determined that the ID (built-in ID) of the CU does not match, the process proceeds to S445, and the ECU 2 is informed that the ID of the memory rewriting device 4 and the ID of the ECU 2 do not match. After transmitting the error signal, the processing on the memory rewriting device 4 side is terminated. Then EC
In U2, as described above, all the processes are terminated without executing the processes in and after S150 in FIG.
【0077】つまり、第2実施例のメモリ書換システム
では、第1実施例のメモリ書換システム5とは逆に、E
CU2が、メモリ書換装置4へ自己のIDを送信し(S
125)、メモリ書換装置4が、ECU2からのID
と、新たな制御プログラム及び制御データに適合するE
CUのIDとが一致しているか否かを判定するようにし
ている(S415)。そして、メモリ書換装置4は、両
IDが一致している場合に(S415:YES)、EC
U2へ、正常信号を送信し(S417)、その後、書換
制御プログラムと新たな制御プログラム及び制御データ
を送信するようにしており(S420,S430)、E
CU2は、メモリ書換装置4からの正常信号を受信した
場合にのみ(S135:正常信号)、メモリ書換装置4
側のIDと自己のIDとが一致していると判断して、メ
モリ書換装置4からの書換制御プログラムをRAM22
に転送して実行する処理(S150,S160)を行う
ようにしている。That is, in the memory rewriting system of the second embodiment, contrary to the memory rewriting system 5 of the first embodiment, E
The CU 2 transmits its own ID to the memory rewriting device 4 (S2).
125), the memory rewriting device 4 transmits the ID from the ECU 2
And E adapted to the new control program and control data
It is determined whether or not the ID of the CU matches (S415). If the two IDs match (S415: YES), the memory rewriting device 4
A normal signal is transmitted to U2 (S417), and thereafter, a rewrite control program, a new control program and control data are transmitted (S420, S430), and E
Only when the CU 2 receives a normal signal from the memory rewriting device 4 (S135: normal signal), the CU 2
The rewriting control program from the memory rewriting device 4 is determined to be identical to the ID of the
(S150, S160).
【0078】そして、このような第2実施例のECU2
及びメモリ書換システムによっても、第1実施例のもの
と同様に、作業者が、メモリ書換装置4のICソケット
40に、ECU2に適合しない制御プログラム及び制御
データが格納されたROM36を装着してしまい、その
不適合な制御プログラム及び制御データがECU2へ送
信されそうな場合には、メモリ書換装置4側のID(即
ち、第2のROM36にて新たな制御プログラム等と対
応して予め記憶されたID)と、マスクROM20bに
記憶されたECU2のIDとが一致しないため、ECU
2では、書換制御プログラムのRAM22への転送動作
へ移行しなくなる。よって、フラッシュROM20a内
の制御プログラムや制御データが、そのECU2に適合
しない制御プログラムや制御データに、誤って書き換え
られてしまうことを確実に防止することができる。Then, the ECU 2 according to the second embodiment is used.
Also, according to the memory rewriting system, similarly to the first embodiment, the operator mounts the ROM 36 storing the control program and the control data that are not compatible with the ECU 2 into the IC socket 40 of the memory rewriting device 4. If the incompatible control program and control data are likely to be transmitted to the ECU 2, the ID of the memory rewriting device 4 (that is, the ID stored in advance in the second ROM 36 corresponding to the new control program or the like). ) Does not match the ID of the ECU 2 stored in the mask ROM 20b.
In No. 2, the operation does not shift to the operation of transferring the rewrite control program to the RAM 22. Therefore, it is possible to reliably prevent the control program and the control data in the flash ROM 20a from being erroneously rewritten to the control program and the control data that are not suitable for the ECU 2.
【0079】また、第2実施例のECU2も、第1実施
例のECU2と同様に、メモリ書換装置4から送信され
て来る書換制御プログラムを揮発性のRAM22に転送
して起動することにより、フラッシュROM20aの書
換処理を行うように構成されているため、エンジンを制
御する通常時において、プログラムを実行するCPU1
8が暴走したとしても、フラッシュROM20aに格納
されている正規の制御プログラムや制御データが失われ
たり変化したりしてしまうことを確実に防止できる。Also, similarly to the ECU 2 of the first embodiment, the ECU 2 of the second embodiment transfers the rewrite control program transmitted from the memory rewriting device 4 to the volatile RAM 22 and starts the flash control. Since the rewriting process of the ROM 20a is performed, the CPU 1 that executes a program during normal operation of controlling the engine is used.
Even if the controller 8 runs away, it is possible to reliably prevent the normal control program and control data stored in the flash ROM 20a from being lost or changed.
【0080】[その他]前述した第1実施例において、
メモリ書換装置4側のIDは、第2のROM36に予め
格納しておくのではなく、作業者が所定の入力装置を操
作して入力するようにしても良い。[Others] In the first embodiment described above,
The ID of the memory rewriting device 4 may not be stored in the second ROM 36 in advance, but may be input by an operator operating a predetermined input device.
【0081】そして、このようなメモリ書換システムに
よっても、メモリ書換装置4からECU2へ、ECU2
のマスクROM20bに格納されたIDと同一のIDを
送信してやらなければ、ECU2にて、書換制御プログ
ラムのRAM22への転送が許可されないため、フラッ
シュROM20a内のデータ(制御プログラム及び制御
データ)を、不用意に書き換えてしまうことや、故意に
他のデータに書き換えようとする行為を確実に防止する
ことができる。Further, even with such a memory rewriting system, the memory rewriting device 4 sends the ECU 2
If the same ID as the ID stored in the mask ROM 20b is not transmitted, the transfer of the rewriting control program to the RAM 22 is not permitted by the ECU 2, so that the data (the control program and the control data) in the flash ROM 20a cannot be transferred. It is possible to reliably prevent the data from being easily rewritten or intentionally rewriting the data with another data.
【0082】一方、前述した各実施例のECU2は、電
気的にデータの書き込みが可能な不揮発性メモリとし
て、フラッシュROM20aを備えたものであったが、
EEPROMを用いても良い。また、上記実施例では、
ECU2内にマスクROM20bとフラッシュROM2
0aとをそれぞれ持つ例を示したが、フラッシュROM
20aのみとして、フラッシュROM20a内に、前述
したマスクROM20bの内容(プログラムやID等)
を、エンジン制御プログラムと領域を分けて記憶させて
も良い。On the other hand, the ECU 2 of each of the above-described embodiments has the flash ROM 20a as a nonvolatile memory to which data can be electrically written.
An EEPROM may be used. In the above embodiment,
The mask ROM 20b and the flash ROM 2 in the ECU 2
0a respectively, but the flash ROM
The contents (programs, IDs, etc.) of the above-described mask ROM 20b are stored in the flash ROM 20a only as 20a.
May be stored separately from the engine control program.
【0083】また、上記各実施例では、エンジンを制御
するECU2について説明したが、本発明の適用範囲
は、これに限られない。即ち、例えばブレーキ、トラン
スミッション、サスペンション等の制御対象を制御する
電子制御装置に対しても、全く同様に適用することがで
きる。In the above embodiments, the ECU 2 for controlling the engine has been described. However, the scope of the present invention is not limited to this. That is, the present invention can be applied to an electronic control device that controls a control target such as a brake, a transmission, and a suspension.
【図1】 第1実施例の電子制御装置のメモリ書換シス
テムの全体構成を表すブロック図である。FIG. 1 is a block diagram illustrating an overall configuration of a memory rewriting system of an electronic control device according to a first embodiment.
【図2】 第1実施例のエンジン制御装置(ECU)側
で実行される処理を表すフローチャートである。FIG. 2 is a flowchart illustrating a process executed on the engine control device (ECU) side of the first embodiment.
【図3】 第1実施例のメモリ書換装置側で実行される
処理を表すフローチャートである。FIG. 3 is a flowchart illustrating a process executed on the memory rewriting device side of the first embodiment.
【図4】 第2実施例のエンジン制御装置(ECU)側
で実行される処理を表すフローチャートである。FIG. 4 is a flowchart illustrating a process executed on an engine control device (ECU) according to a second embodiment.
【図5】 第2実施例のメモリ書換装置側で実行される
処理を表すフローチャートである。FIG. 5 is a flowchart illustrating a process executed on the memory rewriting device side of the second embodiment.
2…エンジン制御装置(ECU) 4…メモリ書換装
置 5…メモリ書換システム 6…入力回路 8,30…シングルチップマイクロコンピュータ(マイ
コン) 10…出力回路 18…CPU 20…ROM 20a…フラッシュROM 20b…マスクROM 22…RAM 24…I/O 25…通信回路
32…電源回路 34…第1のROM 36…第2のROM 38,
40…ICソケット 42F…雌コネクタ 42M…雄コネクタ 44…
通信線 46…電源供給線 48…信号線 SW…書換スイ
ッチ L…モード判定用信号ライン R…抵抗器2 ... Engine control device (ECU) 4 ... Memory rewriting device 5 ... Memory rewriting system 6 ... Input circuit 8, 30 ... Single chip microcomputer (microcomputer) 10 ... Output circuit 18 ... CPU 20 ... ROM 20a ... Flash ROM 20b ... Mask ROM 22 RAM 24 I / O 25 Communication circuit
32 power supply circuit 34 first ROM 36 second ROM 38
40 ... IC socket 42F ... female connector 42M ... male connector 44 ...
Communication line 46 ... Power supply line 48 ... Signal line SW ... Rewrite switch L ... Mode determination signal line R ... Resistor
───────────────────────────────────────────────────── フロントページの続き (72)発明者 石田 隆司 愛知県刈谷市昭和町1丁目1番地 日本電 装株式会社内 ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Takashi Ishida 1-1-1 Showa-cho, Kariya-shi, Aichi Prefecture Nippon Denso Co., Ltd.
Claims (8)
が可能な不揮発性メモリに格納されたデータにより構成
される制御プログラム及び制御データに従って所定の制
御対象を制御し、外部からの書き換え指令を受けた場合
には、前記不揮発性メモリ内のデータを外部装置から送
信されて来る新たなデータに書き換えるための書換処理
を行う電子制御装置において、 当該電子制御装置は、前記外部装置から送信されて来る
書換制御プログラムを、揮発性のメモリ領域に転送して
起動することにより、前記書換処理を行うように構成さ
れていると共に、 当該電子制御装置の識別情報を予め記憶する識別情報記
憶手段と、 前記書き換え指令を受けると、前記外部装置から前記書
換制御プログラムが送信されて来る前に、前記外部装置
との間で通信を行うことにより、前記外部装置側にて前
記新たなデータと対応して予め記憶された情報であって
当該新たなデータに適合する装置を示す識別情報と、前
記識別情報記憶手段に記憶された識別情報とが一致して
いるか否かを判定する判定手段と、 該判定手段により前記両識別情報が一致していると判定
された場合にのみ、前記書換制御プログラムの前記メモ
リ領域への転送を許可する転送許可手段と、 を備えていることを特徴とする電子制御装置。In a normal state, a predetermined control target is controlled in accordance with a control program and control data constituted by data stored in an electrically rewritable nonvolatile memory, and receives a rewrite command from outside. In the case where the electronic control unit performs a rewriting process for rewriting data in the nonvolatile memory to new data transmitted from an external device, the electronic control device transmits the data from the external device. An identification information storage unit configured to perform the rewrite processing by transferring the rewrite control program to a volatile memory area and activating the rewrite control program, and storing identification information of the electronic control device in advance; When a rewrite command is received, communication with the external device is performed before the rewrite control program is transmitted from the external device. By performing the above, identification information that is stored in advance in association with the new data on the external device side and indicates a device that matches the new data, and that is stored in the identification information storage unit. Determining means for determining whether or not the identification information matches; and transferring the rewrite control program to the memory area only when the determination means determines that the two pieces of identification information match. An electronic control device comprising: a transfer permission unit that permits the transfer.
て、 前記判定手段は、 前記外部装置から送信されて来る前記外部装置側の識別
情報を受信し、該受信した識別情報と前記識別情報記憶
手段に記憶された識別情報とを比較することにより、前
記外部装置側の識別情報と前記識別情報記憶手段に記憶
された識別情報とが一致しているか否かを判定するこ
と、 を特徴とする電子制御装置。2. The electronic control device according to claim 1, wherein the determination unit receives identification information of the external device transmitted from the external device, and stores the received identification information and the identification information. Comparing the identification information stored in the means with the identification information stored in the external device and the identification information stored in the identification information storage means. Electronic control unit.
部装置として接続され、前記電子制御装置へ、前記書換
制御プログラムと前記新たなデータとを送信するメモリ
書換装置であって、 前記新たなデータを、当該新たなデータに適合する装置
を示す識別情報と対応させて予め記憶するデータ記憶手
段を備えると共に、前記書換制御プログラムを送信する
前に、前記新たなデータに対応する前記識別情報を前記
電子制御装置へ送信するように構成されていること、 を特徴とするメモリ書換装置。3. A memory rewriting device that is connected to the electronic control device according to claim 2 as the external device and that transmits the rewriting control program and the new data to the electronic control device. Data storing means for storing the new data in advance in association with identification information indicating a device conforming to the new data, and before transmitting the rewriting control program, the identification information corresponding to the new data. Is transmitted to the electronic control unit.
項3に記載のメモリ書換装置と、を備えたことを特徴と
する電子制御装置のメモリ書換システム。4. A memory rewriting system for an electronic control device, comprising: the electronic control device according to claim 2; and the memory rewriting device according to claim 3.
て、 前記判定手段は、 前記識別情報記憶手段に記憶されている識別情報を前記
外部装置へ送信し、その後、前記外部装置側の識別情報
と前記送信した識別情報とが一致しているか否かを表す
応答信号を前記外部装置から受信することにより、前記
外部装置側の識別情報と前記識別情報記憶手段に記憶さ
れた識別情報とが一致しているか否かを判定するように
構成されていること、 を特徴とする電子制御装置。5. The electronic control device according to claim 1, wherein the determination unit transmits identification information stored in the identification information storage unit to the external device, and thereafter, the identification information on the external device side. Receiving from the external device a response signal indicating whether or not the transmitted identification information matches the identification information on the external device side and the identification information stored in the identification information storage means. An electronic control device, wherein the electronic control device is configured to determine whether or not the operation is performed.
部装置として接続され、前記電子制御装置へ、前記書換
制御プログラムと前記新たなデータとを送信するメモリ
書換装置であって、 前記新たなデータを、当該新たなデータに適合する装置
を示す識別情報と対応させて予め記憶するデータ記憶手
段を備えると共に、前記電子制御装置からの識別情報
が、前記新たなデータに対応する識別情報と一致してい
るか否かを判定して、前記両識別情報が一致している場
合に、前記電子制御装置へ、当該メモリ書換装置側の識
別情報と前記電子制御装置の識別情報記憶手段に記憶さ
れた識別情報とが一致していることを表す前記応答信号
を送信し、その後、前記書換制御プログラムを送信する
ように構成されていること、 を特徴とするメモリ書換装置。6. A memory rewriting device that is connected to the electronic control device according to claim 5 as the external device and transmits the rewriting control program and the new data to the electronic control device. Data is stored in advance in association with the identification data indicating the device conforming to the new data, and the identification information from the electronic control unit is provided with identification information corresponding to the new data. It is determined whether or not they match, and when the two pieces of identification information match, the identification information on the memory rewriting device side and the identification information stored in the identification information storage means of the electronic control device are stored in the electronic control device. And transmitting the response signal indicating that the identification information matches the rewriting control program, and thereafter transmitting the rewrite control program. .
項6に記載のメモリ書換装置と、を備えたことを特徴と
する電子制御装置のメモリ書換システム。7. A memory rewriting system for an electronic control device, comprising: the electronic control device according to claim 5; and the memory rewriting device according to claim 6.
が可能な不揮発性メモリに格納されたデータにより構成
される制御プログラム及び制御データに従って所定の制
御対象を制御し、外部からの書き換え指令を受けた場合
には、前記不揮発性メモリ内のデータを外部装置から送
信されて来る新たなデータに書き換えるための書換処理
を行う電子制御装置において、 当該電子制御装置は、前記外部装置から送信されて来る
書換制御プログラムを、揮発性のメモリ領域に転送して
起動することにより、前記書換処理を行うように構成さ
れていると共に、 当該電子制御装置の識別情報を予め記憶する識別情報記
憶手段と、 前記書き換え指令を受けると、前記外部装置から前記書
換制御プログラムが送信されて来る前に、前記外部装置
から送信されて来る識別情報を受信し、該受信した識別
情報と前記識別情報記憶手段に記憶された識別情報とが
一致しているか否かを判定する判定手段と、 該判定手段により前記両識別情報が一致していると判定
された場合にのみ、前記書換制御プログラムの前記メモ
リ領域への転送を許可する転送許可手段と、 を備えていることを特徴とする電子制御装置。8. Normally, a predetermined control target is controlled in accordance with a control program and control data constituted by data stored in an electrically rewritable nonvolatile memory, and a rewrite command is received from the outside. In the case where the electronic control unit performs a rewriting process for rewriting data in the nonvolatile memory to new data transmitted from an external device, the electronic control device transmits the data from the external device. An identification information storage unit configured to perform the rewrite processing by transferring the rewrite control program to a volatile memory area and activating the rewrite control program, and storing identification information of the electronic control device in advance; When a rewrite command is received, the rewrite control program is transmitted from the external device before the rewrite control program is transmitted from the external device. Determining means for receiving the received identification information and determining whether the received identification information matches the identification information stored in the identification information storage means. Transfer permitting means for permitting the transfer of the rewrite control program to the memory area only when it is determined that the rewrite control program is performed.
Priority Applications (9)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP25459296A JP3568704B2 (en) | 1996-09-26 | 1996-09-26 | Electronic control device, memory rewriting device, and memory rewriting system for electronic control device |
US08/934,220 US6275911B1 (en) | 1996-09-20 | 1997-09-19 | Memory writing device for an electronic device |
KR1019970047921A KR100258147B1 (en) | 1996-09-20 | 1997-09-20 | Memory recorder for electronics |
US09/625,402 US6249848B1 (en) | 1996-09-20 | 2000-07-25 | Memory writing device for an electronic device |
US09/625,403 US6477626B1 (en) | 1996-09-20 | 2000-07-25 | Memory writing device for an electronic device |
US09/843,821 US6505280B2 (en) | 1996-09-20 | 2001-04-30 | Memory writing device for an electronic device |
US10/062,541 US6957296B2 (en) | 1996-09-20 | 2002-02-05 | Memory writing device for an electronic device |
US10/270,578 US20030041217A1 (en) | 1996-09-20 | 2002-10-16 | Memory writing device for an electronic device |
US11/217,385 US7493455B2 (en) | 1996-09-20 | 2005-09-02 | Memory writing device for an electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP25459296A JP3568704B2 (en) | 1996-09-26 | 1996-09-26 | Electronic control device, memory rewriting device, and memory rewriting system for electronic control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH10105468A true JPH10105468A (en) | 1998-04-24 |
JP3568704B2 JP3568704B2 (en) | 2004-09-22 |
Family
ID=17267190
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP25459296A Expired - Lifetime JP3568704B2 (en) | 1996-09-20 | 1996-09-26 | Electronic control device, memory rewriting device, and memory rewriting system for electronic control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3568704B2 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10112056A1 (en) * | 2001-03-14 | 2002-09-26 | Jungheinrich Ag | Data modification method for nonvolatile electrically erasable memory by receiving modification routines via bus and storing in volatile memory |
EP1134747A3 (en) * | 2000-03-16 | 2002-10-30 | Honda Giken Kogyo Kabushiki Kaisha | Memory rewriting system for vehicle controller |
JP2006079168A (en) * | 2004-09-07 | 2006-03-23 | Denso Corp | Electronic control unit and memory rewriting method thereof |
JP2006171803A (en) * | 2004-12-10 | 2006-06-29 | Denso Corp | Program rewrite system for on-vehicle electronic controller, boot loader for computer for on-vehicle electronic controller, recording medium and on-vehicle electronic controller |
JP2007148651A (en) * | 2005-11-25 | 2007-06-14 | Sanyo Electric Co Ltd | Content distribution system |
US7869917B2 (en) | 2007-02-09 | 2011-01-11 | Toyota Jidosha Kabushiki Kaisha | Vehicle control apparatus and control method of same |
JP2011034369A (en) * | 2009-08-03 | 2011-02-17 | Denso Corp | Electronic control device |
-
1996
- 1996-09-26 JP JP25459296A patent/JP3568704B2/en not_active Expired - Lifetime
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1134747A3 (en) * | 2000-03-16 | 2002-10-30 | Honda Giken Kogyo Kabushiki Kaisha | Memory rewriting system for vehicle controller |
DE10112056A1 (en) * | 2001-03-14 | 2002-09-26 | Jungheinrich Ag | Data modification method for nonvolatile electrically erasable memory by receiving modification routines via bus and storing in volatile memory |
JP2006079168A (en) * | 2004-09-07 | 2006-03-23 | Denso Corp | Electronic control unit and memory rewriting method thereof |
JP2006171803A (en) * | 2004-12-10 | 2006-06-29 | Denso Corp | Program rewrite system for on-vehicle electronic controller, boot loader for computer for on-vehicle electronic controller, recording medium and on-vehicle electronic controller |
US7904896B2 (en) | 2004-12-10 | 2011-03-08 | Denso Corporation | Program rewriting system, boot loader, storage medium, and electronic control unit |
JP2007148651A (en) * | 2005-11-25 | 2007-06-14 | Sanyo Electric Co Ltd | Content distribution system |
US7869917B2 (en) | 2007-02-09 | 2011-01-11 | Toyota Jidosha Kabushiki Kaisha | Vehicle control apparatus and control method of same |
JP2011034369A (en) * | 2009-08-03 | 2011-02-17 | Denso Corp | Electronic control device |
Also Published As
Publication number | Publication date |
---|---|
JP3568704B2 (en) | 2004-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7493455B2 (en) | Memory writing device for an electronic device | |
JP3550834B2 (en) | Memory rewriting system for vehicle electronic control unit, vehicle electronic control unit and memory rewriting device | |
US5912512A (en) | Engine start control apparatus | |
JP3932654B2 (en) | Vehicle control device and vehicle control system | |
JP3491419B2 (en) | Electronic control unit | |
JP4061694B2 (en) | Electronic control device and control system | |
US20030188303A1 (en) | Method and apparatus for reprogramming engine controllers | |
JPH11272498A (en) | Electronic controller | |
JP2000259420A (en) | Device for updating learning value for electronic controller | |
JP3870563B2 (en) | Electronic control device and non-volatile memory rewrite count method | |
US20060218340A1 (en) | Data validity determining method for flash EEPROM and electronic control system | |
JP3568704B2 (en) | Electronic control device, memory rewriting device, and memory rewriting system for electronic control device | |
US8078352B2 (en) | Electronic control unit for vehicle | |
JP2000235487A (en) | Electronic controller | |
JPH10149282A (en) | Memory rewriting system for electronic device | |
US6907495B2 (en) | Rewriting system for rewriting a memory on a vehicle controller | |
EP1145912B1 (en) | Rewriting system for vehicle controller | |
JP2001123874A (en) | Program rewrite system or memory rewriting system for electronic control device | |
JP4066499B2 (en) | Electronic control device, electronic control system, and conformity determination method | |
JPH10171644A (en) | Electronic controller | |
JP3796837B2 (en) | Memory writing device for electronic device | |
JP2002323990A (en) | Electronic controller and method for initializing nonvolatile memory | |
JPH09171459A (en) | Electronic control equipment | |
JP2003276528A (en) | Electronic control device for vehicle | |
JP2002106408A (en) | Electronic controller for vehicle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040616 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100625 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110625 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110625 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120625 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120625 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130625 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140625 Year of fee payment: 10 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |