JP2003196256A - Electronic control unit - Google Patents

Electronic control unit

Info

Publication number
JP2003196256A
JP2003196256A JP2001393965A JP2001393965A JP2003196256A JP 2003196256 A JP2003196256 A JP 2003196256A JP 2001393965 A JP2001393965 A JP 2001393965A JP 2001393965 A JP2001393965 A JP 2001393965A JP 2003196256 A JP2003196256 A JP 2003196256A
Authority
JP
Japan
Prior art keywords
microcomputer
data
writing
memory
microcomputers
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
JP2001393965A
Other languages
Japanese (ja)
Inventor
Junko Tomita
純子 冨田
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 JP2001393965A priority Critical patent/JP2003196256A/en
Publication of JP2003196256A publication Critical patent/JP2003196256A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an electronic control unit (ECU) capable of certainly rewriting a control program in each microcomputer regardless of the type of each of a plurality of microcomputers. <P>SOLUTION: This ECU 1 is provided with two microcomputers 5 and 7 each having a flash memory 19, and those microcomputers 5 and 7 communicate with a memory writing device 3 by sharing a communication line 23. Just after the operation is started, when a command signal FCP to be commonly inputted from the memory writing device 3 through a signal line 25 different from the communication line 23 is changed from a low state to a high state, each microcomputer 5 and 7 measures the high level time of the signal FCP, and when the measured value is a time specific to its own device, the microcomputer judges that its own device is the target of data writing. Then, respective microcomputers 5 and 7 exchange their judgement results in the output levels of output ports D1 and D2, and when those judgement results are not contradictory, the microcomputer which judges that its own device is the target of data writing executes processing to update the writing data from the memory writing device 3 and write the updated data in the memory 19. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコンピュ
ータを複数備えた電子制御装置に関し、特に、各マイク
ロコンピュータに内蔵された制御プログラムや制御デー
タを書き換え可能な電子制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic control device having a plurality of microcomputers, and more particularly to an electronic control device capable of rewriting control programs and control data contained in each microcomputer.

【0002】[0002]

【従来の技術】従来より、例えば自動車用の電子制御装
置として、電気的にデータの書き換えが可能なEEPR
OMやフラッシュEEPROM(以下、フラッシュメモ
リという)などの不揮発性メモリを有するマイクロコン
ピュータを備え、その不揮発性メモリに格納された自動
車制御用の制御プログラムや制御データを、市場への供
給後でも書き換えることができるようにしたものが実用
化されている。
2. Description of the Related Art Conventionally, for example, as an electronic control unit for automobiles, EEPR in which data can be electrically rewritten
A microcomputer having a non-volatile memory such as an OM or a flash EEPROM (hereinafter referred to as a flash memory) is provided, and the control program and control data for vehicle control stored in the non-volatile memory can be rewritten even after being supplied to the market. It has been put into practical use.

【0003】即ち、この種の電子制御装置において、マ
イクロコンピュータは、通常時には、不揮発性メモリに
格納されたデータにより構成される制御プログラム及び
制御データに従って、エンジン等の制御対象を制御する
ための制御処理を実行する。これに対して、不揮発性メ
モリ内のデータ(制御プログラムや制御データ)を書き
換える場合(或いはデータを新規に書き込む場合)に
は、電子制御装置に、別途用意された外部装置としての
メモリ書込装置が接続され、これにより、上記メモリ書
込装置とマイクロコンピュータとが、通信ラインを介し
て接続されるようになっている。そして、マイクロコン
ピュータは、予め定められた書込実施条件が成立したと
判断すると、メモリ書込装置から送信されて来る書込デ
ータ(つまり、新たな制御プログラムや制御データを構
成するデータ)を受信して、その書込データを不揮発性
メモリに更新して書き込む、といった書込処理を実行す
るようになっている。よって、このような電子制御装置
によれば、市場への供給後に、何等かの原因で動作内容
(制御内容)を変更しなければならない事態が起こった
としても、容易に対応することができる。
That is, in this type of electronic control unit, the microcomputer normally controls a control target such as an engine according to a control program and control data constituted by data stored in a non-volatile memory. Execute the process. On the other hand, when the data (control program or control data) in the non-volatile memory is rewritten (or when the data is newly written), a memory writing device as an external device separately prepared in the electronic control device. Are connected, whereby the memory writing device and the microcomputer are connected via a communication line. Then, when the microcomputer determines that the predetermined write execution condition is satisfied, it receives the write data (that is, the data forming the new control program or control data) transmitted from the memory writing device. Then, a writing process such as updating and writing the write data in the nonvolatile memory is executed. Therefore, according to such an electronic control device, even if a situation in which the operation content (control content) has to be changed for some reason after being supplied to the market, it is possible to easily cope with the situation.

【0004】そして更に、近年、この種の電子制御装置
では、制御内容の複雑化に伴って、複数のマイクロコン
ピュータを搭載したものが主流となっており、このよう
な電子制御装置においては、複数のマイクロコンピュー
タの各々について、制御プログラムや制御データを書き
込み可能にすることが要求される。
Further, in recent years, in this type of electronic control device, a plurality of microcomputers have been mainly installed due to the complicated control contents. In such an electronic control device, a plurality of electronic control devices are installed. It is required that the control program and control data be writable for each of the microcomputers.

【0005】そこで、電子制御装置に搭載された各マイ
クロコンピュータが、1つの通信ラインを共用してメモ
リ書込装置とデータ通信を行うように構成しつつ、上記
要求を満足させるためには、メモリ書込装置からの書込
データを不揮発性メモリに書き込むべき書込対象のマイ
クロコンピュータ(即ち、書込処理を実行すべきマイク
ロコンピュータ)を択一的に指定できるようにする必要
があり、その技術として、例えば特許第3137012
号には、不揮発性メモリへのデータ書き込み時に必要な
書込電圧(通常動作用の電源電圧よりも高い所定電圧)
を、書込対象のマイクロコンピュータだけに供給すると
共に、各マイクロコンピュータは、自分に書込電圧が供
給されたことを検知すると、書込実施条件が成立したと
して書込処理を実行する、というように構成することが
記載されている。
Therefore, in order to satisfy the above-mentioned requirements, it is necessary to configure each of the microcomputers mounted on the electronic control unit so as to perform data communication with the memory writing device by sharing one communication line. It is necessary to be able to selectively specify the microcomputer to be written (that is, the microcomputer to execute the writing process) in which the write data from the writing device should be written in the nonvolatile memory. For example, Japanese Patent No. 3137012
The write voltage required to write data to the non-volatile memory (predetermined voltage higher than the power supply voltage for normal operation)
Is supplied only to the microcomputer to be written, and when each microcomputer detects that the write voltage is supplied to itself, the microcomputer executes the write process assuming that the write execution condition is satisfied. It is described that it is configured.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、近年で
は、不揮発性メモリへのデータ書き込み時に特別な書込
電圧を必要としないマイクロコンピュータ(以下、書込
電圧不要のマイクロコンピュータという)も存在し、そ
のような書込電圧不要のマイクロコンピュータが1つで
も搭載される電子制御装置に対しては、上記特許第31
37012号に記載の技術を適用することができない。
However, in recent years, there have been microcomputers that do not require a special write voltage when writing data to a non-volatile memory (hereinafter referred to as microcomputers that do not require a write voltage). For the electronic control device in which at least one microcomputer which does not require a write voltage is mounted, the above-mentioned Patent No. 31 is used.
The technique described in No. 37012 cannot be applied.

【0007】そこで本発明は、複数備えられるマイクロ
コンピュータのタイプに拘わらず、その各マイクロコン
ピュータ内の制御プログラムや制御データを確実に書き
換えることができる電子制御装置を提供することを目的
としている。
Therefore, an object of the present invention is to provide an electronic control device capable of surely rewriting the control program and control data in each microcomputer regardless of the type of microcomputer provided.

【0008】[0008]

【課題を解決するための手段及び発明の効果】上記目的
を達成するためになされた請求項1に記載の電子制御装
置は、電気的にデータの書き換えが可能な不揮発性メモ
リを有したマイクロコンピュータを、複数備えていると
共に、その各マイクロコンピュータが1つの通信ライン
を共用して外部のメモリ書込装置とデータ通信を行うよ
うに構成されている。
Means for Solving the Problems and Effects of the Invention The electronic control unit according to claim 1 made to achieve the above object is a microcomputer having an electrically rewritable non-volatile memory. Is provided, and each of the microcomputers is configured to share one communication line and perform data communication with an external memory writing device.

【0009】そして、各マイクロコンピュータは、通常
時には、自分の不揮発性メモリに格納されたデータによ
り構成される制御プログラム及び制御データに従って、
所定の機能を果たすための制御処理を実行し、これによ
って、当該電子制御装置の制御動作が行われる。
Then, each microcomputer normally operates according to a control program and control data composed of data stored in its non-volatile memory.
A control process for performing a predetermined function is executed, whereby the control operation of the electronic control unit is performed.

【0010】また、各マイクロコンピュータは、書込実
施条件が成立したと判断すると、外部のメモリ書込装置
から上記通信ラインを介して送信されて来る書込データ
を受信して前記不揮発性メモリに更新して書き込むため
の書込処理を実行する。ここで特に、請求項1の電子制
御装置において、各マイクロコンピュータには、メモリ
書込装置から、上記通信ラインとは別の信号線を介し
て、二値振幅の指令信号が共通に入力される。
Further, each microcomputer, when judging that the write execution condition is satisfied, receives the write data transmitted from the external memory writing device through the communication line and stores the write data in the non-volatile memory. A writing process for updating and writing is executed. Particularly, in the electronic control unit according to claim 1, a binary amplitude command signal is commonly input to each microcomputer from the memory writing unit via a signal line different from the communication line. .

【0011】そして、各マイクロコンピュータは、上記
指令信号が特定の論理レベルになっている継続時間(以
下、指令信号のパルス幅ともいう)を測定する測定処理
と、その測定処理で測定した時間が、自分に対して予め
定められた固有の時間であって、自分がメモリ書込装置
からの書込データを不揮発性メモリに書き込むべき書込
対象のマイクロコンピュータであることを示す時間であ
るか否かを判定する判定処理とを行い、その判定処理で
肯定判定した場合に、書込実施条件が成立したと判断し
て(つまり、自分が書込対象のマイクロコンピュータで
あると判断して)、上記書込処理を実行する。
Then, each of the microcomputers performs a measuring process for measuring a duration time (hereinafter, also referred to as a pulse width of the command signal) in which the command signal has a specific logic level, and a time measured by the measuring process. , Whether or not the time is a predetermined specific time for itself and indicates that the user is a microcomputer to be written in which the write data from the memory writing device should be written in the nonvolatile memory. If a positive determination is made in the determination processing, it is determined that the write execution condition is satisfied (that is, it is determined that the microcomputer to be written is). The above writing process is executed.

【0012】こような請求項1の電子制御装置によれ
ば、メモリ書込装置から上記信号線を介して各マイクロ
コンピュータに共通に出力する指令信号のパルス幅によ
り、書込対象のマイクロコンピュータを択一的に指定す
ることができる。よって、各マイクロコンピュータが1
つの通信ラインを共用しているにも拘らず、所望のマイ
クロコンピュータの不揮発性メモリに適切なデータを確
実に書き込むことができ、しかも、その効果を、マイク
ロコンピュータのタイプに拘わらず得ることができる。
According to the electronic control unit of the first aspect, the writing target microcomputer is controlled by the pulse width of the command signal commonly output from the memory writing unit to the respective microcomputers through the signal line. It can be specified as an alternative. Therefore, each microcomputer has one
Despite sharing one communication line, it is possible to surely write appropriate data to the nonvolatile memory of the desired microcomputer, and the effect can be obtained regardless of the type of microcomputer. .

【0013】また、上記特許第3137012号に記載
の技術では、各マイクロコンピュータが、自分に書込電
圧が供給された否かを判定するために、一般には、自分
への書込電圧の供給ラインの電圧をA/D変換してモニ
タすることとなる。そして、そのためには、各マイクロ
コンピュータの外にA/D変換器を設けるか、各マイク
ロコンピュータに備えられたA/Dポート(詳しくは、
内蔵のA/D変換器により入力信号をA/D変換可能な
入力ポート)を使用することとなるが、請求項1の電子
制御装置によれば、そのようなA/D変換器やA/Dポ
ートが不要となり非常に有利である。
Further, in the technique described in the above-mentioned Japanese Patent No. 3137012, in order for each microcomputer to judge whether or not the write voltage is supplied to itself, in general, a write voltage supply line to itself is supplied. Will be A / D converted and monitored. For that purpose, an A / D converter is provided outside each microcomputer, or an A / D port (for details,
Although an input port capable of A / D converting an input signal by a built-in A / D converter is used, according to the electronic control unit of claim 1, such an A / D converter or A / D converter is used. This is very advantageous because the D port is unnecessary.

【0014】尚、メモリ書込装置から通信ラインを介し
て、何れかのマイクロコンピュータを示す識別コードを
送信すると、その識別コードに該当するマイクロコンピ
ュータが書込処理を実行する、というように構成するこ
とも考えられる。しかし、この手法の場合、各マイクロ
コンピュータは、書込処理の実行時以外にも、メモリ書
込装置とデータ通信を行わなければならず、その分、比
較的複雑な通信処理のプログラムが増加してしまう。ま
た更に、マイクロコンピュータを1つだけ備えた電子制
御装置のマイクロコンピュータ用プログラム(つまり、
自分が書込対象のマイクロコンピュータであるか否かを
判断する必要が無いプログラム)を流用しようとした場
合には、変更すべき部分が複雑且つ多くなってしまう。
Incidentally, when an identification code indicating any one of the microcomputers is transmitted from the memory writing device through the communication line, the microcomputer corresponding to the identification code executes the writing process. It is also possible. However, in the case of this method, each microcomputer has to perform data communication with the memory writing device other than the time of executing the writing process, and the program of the relatively complicated communication process increases accordingly. Will end up. Furthermore, a program for a microcomputer of an electronic control unit having only one microcomputer (that is,
When trying to divert a program that does not need to determine whether or not the microcomputer is a writing target microcomputer, the portion to be changed becomes complicated and many.

【0015】これに対して、請求項1の電子制御装置に
よれば、各マイクロコンピュータは、自分が書込対象の
マイクロコンピュータであるか否かを、メモリ書込装置
とデータ通信を行うことなく判断することができ、上記
各問題を回避することができる。しかも、メモリ書込装
置からの指令信号を入力するマイクロコンピュータの入
力端子につながる入力ラインに、電圧平滑化効果が比較
的大きなローパスフィルタを設けても、各マイクロコン
ピュータは、自分が書込対象のマイクロコンピュータで
あるか否か(即ち、指令信号のパルス幅が自分に固有の
時間であるか否か)を正確に判定でき、ノイズの影響に
よって本来の書込対象とは違うマイクロコンピュータが
誤って書込処理を実行してしまうのを、簡単に防止する
ことができる。
On the other hand, according to the electronic control device of the first aspect, each microcomputer determines whether or not it is the microcomputer to be written without performing data communication with the memory writing device. It is possible to make a judgment and avoid the above problems. Moreover, even if a low-pass filter having a relatively large voltage smoothing effect is provided on the input line connected to the input terminal of the microcomputer for inputting the command signal from the memory writing device, each microcomputer does not write to itself. Whether or not it is a microcomputer (that is, whether or not the pulse width of the command signal is its own time) can be accurately determined, and due to the influence of noise, a microcomputer different from the original write target will be It is possible to easily prevent the writing process from being executed.

【0016】次に、請求項2に記載の電子制御装置で
は、請求項1の電子制御装置において、各マイクロコン
ピュータは、上記判定処理の判定結果を示す判定結果報
知信号を、他のマイクロコンピュータへ出力するように
なっている。そして更に、各マイクロコンピュータは、
上記判定処理で肯定判定し、且つ、他のマイクロコンピ
ュータからの上記判定結果報知信号に基づいて、該他の
マイクロコンピュータが上記判定処理で肯定判定してい
ないことを確認した場合(即ち、他のマイクロコンピュ
ータが、書込実施条件が成立したと判断していないこと
を確認した場合)に、書込処理を実行するようになって
いる。
Next, in the electronic control unit according to the second aspect, in the electronic control unit according to the first aspect, each microcomputer sends a determination result notification signal indicating a determination result of the determination process to another microcomputer. It is designed to output. And furthermore, each microcomputer
When a positive determination is made in the determination processing, and based on the determination result notification signal from the other microcomputer, it is confirmed that the other microcomputer has not made a positive determination in the determination processing (that is, other The writing process is executed when the microcomputer confirms that the writing execution condition is not satisfied).

【0017】このような請求項2の電子制御装置によれ
ば、ノイズ等の影響によるマイクロコンピュータでの誤
判定により、本来の書込対象のマイクロコンピュータA
とは違うマイクロコンピュータBが、メモリ書込装置か
らのマイクロコンピュータA用の書込データを誤って自
分の不揮発性メモリに書き込んでしまうのを、確実に防
止することができる。
According to the electronic control device of the second aspect, the microcomputer A which is the original writing target is erroneously determined by the microcomputer due to the influence of noise or the like.
It is possible to reliably prevent the microcomputer B different from that from accidentally writing the write data for the microcomputer A from the memory writing device into its own nonvolatile memory.

【0018】つまり、ノイズ等の影響により、本来の書
込対象のマイクロコンピュータAだけでなく、それ以外
のマイクロコンピュータBも、上記判定処理で肯定判定
した場合には、マイクロコンピュータAからマイクロコ
ンピュータBへの判定結果報知信号と、マイクロコンピ
ュータBからマイクロコンピュータAへの判定結果報知
信号との両方が、判定処理で肯定判定したこと(即ち、
自分が書込対象のマイクロコンピュータであると判断し
たこと)を示すこととなる。そして、このように、各マ
イクロコンピュータA,Bからの判定結果報知信号に論
理的な矛盾が生じた場合、マイクロコンピュータA,B
は両方共に書込処理を実行しないからである。
In other words, due to the influence of noise or the like, not only the microcomputer A that is the original writing target but also the other microcomputers B are positive from the microcomputer A to the microcomputer B when a positive determination is made in the above determination process. That both the determination result notification signal to the microcomputer B and the determination result notification signal from the microcomputer B to the microcomputer A are affirmative in the determination processing (that is,
It means that the user has determined that he is the microcomputer to be written). Then, when a logical contradiction occurs in the determination result notification signals from the respective microcomputers A and B as described above, the microcomputers A and B
This is because neither of them performs the writing process.

【0019】[0019]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図面を用いて説明する。まず図1は、自動車に搭載
されてエンジンを制御する電子制御装置(以下、ECU
という)1と、ECU1に内蔵されたエンジン制御に関
する制御プログラムや制御データを書き換える際或いは
それらを新規に書き込む際に、ECU1に接続されるメ
モリ書込装置3とからなる、実施形態の電子制御装置の
メモリ書換システムの全体構成を表すブロック図であ
る。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. First, FIG. 1 shows an electronic control unit (hereinafter referred to as an ECU) mounted on a vehicle to control an engine.
1) and a memory writing device 3 connected to the ECU 1 when rewriting or newly writing a control program or control data relating to engine control built in the ECU 1. 3 is a block diagram showing the overall configuration of the memory rewriting system of FIG.

【0020】図1に示すように、ECU1は、エンジン
の運転状態を表す様々なセンサ信号等に基づいてエンジ
ンを制御するための制御処理を実行するシングルチップ
マイクロコンピュータ(以下、メインマイコン或いは単
にマイコンという)5と、そのメインマイコン5と連携
して電子スロットルの異常検出のための制御処理を実行
するシングルチップマイクロコンピュータ(以下、サブ
マイコン或いは単にマイコンという)7と、車両に搭載
されたバッテリ9から車両のイグニッションスイッチ1
1を介して供給される電圧VIGを受けて、上記両マイ
コン5,7に動作用の電源電圧VDD(本実施形態では
5V)を供給する電源回路13とを備えている。
As shown in FIG. 1, the ECU 1 is a single-chip microcomputer (hereinafter, referred to as a main microcomputer or simply a microcomputer) that executes a control process for controlling the engine based on various sensor signals indicating the operating state of the engine. 5), a single-chip microcomputer (hereinafter referred to as a sub-microcomputer or simply microcomputer) 7 that executes control processing for detecting an abnormality in the electronic throttle in cooperation with the main microcomputer 5, and a battery 9 mounted on the vehicle. From vehicle ignition switch 1
The power supply circuit 13 receives the voltage VIG supplied via 1 and supplies a power supply voltage VDD (5 V in this embodiment) for operation to both the microcomputers 5 and 7.

【0021】尚、電源回路13は、イグニッションスイ
ッチ11がオンされて電源電圧VDDの出力を開始して
から、その電源電圧VDDが安定すると見なされる所定
時間が経過するまでの間、両マイコン5,7へリセット
信号を出力する、いわゆるパワーオンリセット機能も有
している。
In the power supply circuit 13, both microcomputers 5 and 5 are operated from when the ignition switch 11 is turned on to start outputting the power supply voltage VDD until a predetermined time when the power supply voltage VDD is considered stable. It also has a so-called power-on reset function, which outputs a reset signal to 7.

【0022】そして、メインマイコン5は、プログラム
に従い動作する周知のCPU15と、そのCPU15に
よって実行されるプログラム及び該プログラムの実行時
に参照されるデータを格納する不揮発性のマスクROM
17及びフラッシュメモリ19と、CPU15の演算結
果などを一時記憶するためのRAM21と、信号の入出
力を行うためのI/Oポート(図示省略)等とを備えて
いる。
The main microcomputer 5 includes a well-known CPU 15 that operates according to a program, a nonvolatile mask ROM that stores a program executed by the CPU 15 and data referred to when the program is executed.
17 and a flash memory 19, a RAM 21 for temporarily storing the calculation result of the CPU 15, etc., an I / O port (not shown) for inputting and outputting signals, and the like.

【0023】また、図示はされていないが、サブマイコ
ン7も、メインマイコン5と同様に、CPU15,マス
クROM17,フラッシュメモリ19,RAM21,及
びI/Oポート等を備えている。ここで、フラッシュメ
モリ19は、電気的にデータの書き換え(詳しくは、デ
ータの消去及び書き込み)が可能な不揮発性ROMであ
る。
Although not shown, the sub-microcomputer 7 is also provided with a CPU 15, a mask ROM 17, a flash memory 19, a RAM 21, an I / O port, etc., like the main microcomputer 5. Here, the flash memory 19 is a nonvolatile ROM capable of electrically rewriting data (specifically, erasing and writing of data).

【0024】そして、メインマイコン5では、このフラ
ッシュメモリ19に、エンジン制御用の制御プログラム
及び制御データが既に格納されており、サブマイコン7
では、このフラッシュメモリ19に、電子スロットル監
視用(異常検出用)の制御プログラム及び制御データが
既に格納されている。
In the main microcomputer 5, the control program and control data for controlling the engine are already stored in the flash memory 19, and the sub microcomputer 7
Then, the control program and control data for electronic throttle monitoring (for abnormality detection) are already stored in the flash memory 19.

【0025】また、本実施形態において、サブマイコン
7のフラッシュメモリ19は、所定の書込電圧(本実施
形態では例えば13.5V)VPPが供給された状態に
おいてデータの書き込みが可能なものであるが、メイン
マイコン5のフラッシュメモリ19は、そのような書込
電圧VPPを供給しなくてもデータの書き込みが可能な
ものである。
Further, in the present embodiment, the flash memory 19 of the sub-microcomputer 7 is capable of writing data in the state where a predetermined write voltage (for example, 13.5V in this embodiment) VPP is supplied. However, the flash memory 19 of the main microcomputer 5 can write data without supplying such a write voltage VPP.

【0026】一方、マスクROM17は、データの書き
換えが不能な不揮発性ROMであり、このマスクROM
17には、マイコン5,7のリセット(初期化)解除の
直後に実行されるブートプログラムが既に格納されてい
る。尚、マスクROM17に代えて、フラッシュメモリ
19と同様に電気的にデータの書き換えが可能な不揮発
性ROMを用いても、データの書き換えが禁止されてい
れば良い。
On the other hand, the mask ROM 17 is a non-volatile ROM in which data cannot be rewritten.
A boot program to be executed immediately after the reset (initialization) of the microcomputers 5 and 7 is released is stored in the memory 17. Note that, instead of the mask ROM 17, a non-volatile ROM in which data can be electrically rewritten like the flash memory 19 may be used as long as the data rewriting is prohibited.

【0027】このようなECU1において、各マイコン
5,7のCPU15は、リセット解除の直後に、マスク
ROM17内のブートプログラムの実行を開始し、メモ
リ書込装置3が接続されていない通常時には、そのブー
トプログラムにてフラッシュメモリ19内の制御プログ
ラム(メインマイコン5であれば、エンジン制御用の制
御プログラムであり、サブマイコン7であれば、電子ス
ロットル監視用の制御プログラム)をコールして、各自
の機能を果たすための制御処理を行う。
In such an ECU 1, the CPU 15 of each of the microcomputers 5 and 7 starts the execution of the boot program in the mask ROM 17 immediately after the reset is released, and when the memory writing device 3 is not connected, the CPU 15 normally executes the boot program. The boot program calls the control program in the flash memory 19 (in the case of the main microcomputer 5, the control program for controlling the engine, and in the case of the sub microcomputer 7, the control program for monitoring the electronic throttle), each Performs control processing to fulfill the function.

【0028】また、各マイコン5,7のCPU15は、
ブートプログラムの実行を開始した際に、後述するよう
にデータ書込モードであると判定すると、フラッシュメ
モリ19内の制御プログラムをコールすることなくブー
トプログラムの実行を続け、更に、自分がデータ書込対
象のマイコンであると判断すると、フラッシュメモリ1
9内に格納されている現在のデータを、その後メモリ書
込装置3から送信されて来る書込データ(新たな制御プ
ログラム及び制御データを構成するデータ)に書き換え
るための書込処理を行う。
The CPU 15 of each of the microcomputers 5 and 7 is
When the execution of the boot program is started, if it is determined that the mode is the data write mode as described later, the boot program continues to be executed without calling the control program in the flash memory 19 If it is determined that the target microcomputer, the flash memory 1
A writing process for rewriting the current data stored in 9 into the write data (data forming a new control program and control data) subsequently transmitted from the memory writing device 3 is performed.

【0029】一方、メモリ書込装置3は、CPU,RO
M,RAMなどを備えた周知のマイクロコンピュータを
主要部として構成されており、図示しないコネクタを介
してECU1に外部装置として接続される。そして、こ
の接続時において、メモリ書込装置3は、ECU1に対
し、図1に示すように、通信ラインとしてのシリアル通
信線23と、ECU1における両マイコン5,7の動作
モードをデータ書込モードにすると共に、その両マイコ
ン5,7のうちの何れか1つをデータ書込対象に指定す
るための指令信号FCP用の信号線25と、当該メモリ
書込装置3からサブマイコン7に前述の書込電圧VPP
を供給するための電源線27との、3つの接続線を持っ
ている。
On the other hand, the memory writing device 3 includes a CPU, RO
A known microcomputer provided with M, RAM and the like is configured as a main part, and is connected to the ECU 1 as an external device via a connector (not shown). At the time of this connection, the memory writing device 3 sets the operation mode of the serial communication line 23 as a communication line and the operation modes of both the microcomputers 5 and 7 in the ECU 1 to the ECU 1, as shown in FIG. In addition, the signal line 25 for the command signal FCP for designating any one of the two microcomputers 5 and 7 as a data writing target, and the memory writing device 3 from the memory writing device 3 to the sub-microcomputer 7 described above. Write voltage VPP
It has three connection lines with the power supply line 27 for supplying the.

【0030】尚、ECU1の各マイコン5,7は、上記
1つのシリアル通信線23を共用してメモリ書込装置3
とデータ通信を行う。また、各マイコン5,7には、メ
モリ書込装置3から上記信号線25に出力される二値振
幅の指令信号FCPが、その信号線25を介して共通に
入力される。また更に、サブマイコン7には、メモリ書
込装置3から上記電源線27に出力される書込電圧VP
Pが、その電源線27を介して供給される。
The microcomputers 5 and 7 of the ECU 1 share the one serial communication line 23 and share the memory writing device 3 with each other.
And data communication. A command signal FCP having a binary amplitude output from the memory writing device 3 to the signal line 25 is commonly input to each of the microcomputers 5 and 7 via the signal line 25. Furthermore, the sub-microcomputer 7 has a write voltage VP output from the memory writing device 3 to the power supply line 27.
P is supplied through the power supply line 27.

【0031】そして、本実施形態のメモリ書換システム
において、ECU1に搭載されたマイコン5,7のうち
の何れかの制御プログラム及び制御データを書き換える
(或いは新規に書き込む)際には、メモリ書込装置3
が、信号線25に出力する指令信号FCPのレベルを、
図2に示すように操作する。尚、以下では、制御プログ
ラム及び制御データを書き換える場合について説明する
が、制御プログラム及び制御データを新規に書き込む場
合についても全く同様である。
In the memory rewriting system of this embodiment, when rewriting (or newly writing) the control program and control data of any one of the microcomputers 5 and 7 mounted on the ECU 1, the memory writing device is used. Three
Is the level of the command signal FCP output to the signal line 25,
The operation is performed as shown in FIG. In the following, the case of rewriting the control program and the control data will be described, but the same applies to the case of newly writing the control program and the control data.

【0032】即ち、メモリ書込装置3は、イグニッショ
ンスイッチ11がオンされてから予め定められた時間T
w後に、指令信号FCPをローレベル(Low)から一
定時間だけ特定の論理レベルとしてのハイレベル(H
i)にすることで、両マイコン5,7の動作モードをデ
ータ書込モードにする。尚、上記時間Twは、イグニッ
ションスイッチ11がオンされてからECU1のマイコ
ン5,7が動作を開始するまでの時間よりも長い時間に
設定されている。
That is, the memory writing device 3 has a predetermined time T after the ignition switch 11 is turned on.
After w, the command signal FCP is changed from the low level (Low) to the high level (H
By setting i), the operation mode of both microcomputers 5 and 7 is set to the data write mode. The time Tw is set to be longer than the time from when the ignition switch 11 is turned on until the microcomputers 5 and 7 of the ECU 1 start operating.

【0033】そして、両マイコン5,7のうち、メイン
マイコン5の制御プログラム及び制御データだけを書き
換える場合(つまり、メインマイコン5だけをデータ書
込対象にする場合)には、図2の2段目に示すように、
指令信号FCPのハイレベル時間(以下、パルス幅とも
いう)をT1(本実施形態では200ms)にする。
In the case of rewriting only the control program and control data of the main microcomputer 5 of the two microcomputers 5 and 7 (that is, when only the main microcomputer 5 is the data writing target), the two stages of FIG. As you can see,
The high level time (hereinafter, also referred to as a pulse width) of the command signal FCP is set to T1 (200 ms in this embodiment).

【0034】また、サブマイコン7の制御プログラム及
び制御データだけを書き換える場合(つまり、サブマイ
コン7だけをデータ書込対象にする場合)には、図2の
3段目に示すように、指令信号FCPのハイレベル時間
をT2(本実施形態では500ms)にする。
Further, when only the control program and control data of the sub-microcomputer 7 are rewritten (that is, only the sub-microcomputer 7 is the data writing target), as shown in the third row of FIG. The high level time of the FCP is set to T2 (500 ms in this embodiment).

【0035】一方、メインマイコン5の制御プログラム
及び制御データを書き換えた後、イグニッションスイッ
チ11をオンしたままで、引き続きサブマイコン7の制
御プログラム及び制御データを書き換える場合(両マイ
コン5,7への順次書込を行う場合)には、図2の4段
目に示すように、指令信号FCPのハイレベル時間をT
3(本実施形態では700ms)にし、更にその後、メ
インマイコン5の制御プログラム及び制御データの書き
換えが終了したら、指令信号FCPを再びT2(=50
0ms)だけハイレベルにする。
On the other hand, when the control program and control data of the main microcomputer 5 are rewritten, and then the control program and control data of the sub-microcomputer 7 are continuously rewritten with the ignition switch 11 kept on (sequential to both microcomputers 5 and 7) (When writing), the high level time of the command signal FCP is set to T as shown in the fourth row of FIG.
3 (700 ms in this embodiment), and after that, when the rewriting of the control program and control data of the main microcomputer 5 is completed, the command signal FCP is set to T2 (= 50) again.
0 ms) for a high level.

【0036】そして更に、メモリ書込装置3は、上記の
如く指令信号FCPを一定時間(T1,T2,T3の何
れか)だけハイレベルにした後、シリアル通信線23に
書込データを送出することにより、その書込データを書
込対象のマイコンに書き込ませる。また、メモリ書込装
置3は、サブマイコン7をデータ書込対象にした場合に
は、電源線27を介してサブマイコン7に書込電圧VP
Pを供給する。
Further, the memory writing device 3 sends the write data to the serial communication line 23 after setting the command signal FCP to the high level for a certain period of time (either T1, T2 or T3) as described above. As a result, the write data is written in the write target microcomputer. Further, when the sub-microcomputer 7 is targeted for data writing, the memory writing device 3 writes the write voltage VP to the sub-microcomputer 7 via the power supply line 27.
Supply P.

【0037】次に、ECU1の各マイコン5,7で実行
される処理について、図3,図4のフローチャートを用
いて説明する。尚、図3は、メインマイコン5で実行さ
れる処理を表すフローチャートであり、そのステップ
(以下、単に「S」と記す)S105〜S190の処理
が、マスクROM17内のブートプログラムによって実
行され、S195の処理が、フラッシュメモリ19内の
制御プログラムによって実行される。また、図4は、サ
ブマイコン7で実行される処理を表すフローチャートで
あり、そのS205〜S290の処理が、マスクROM
17内のブートプログラムによって実行され、S295
の処理が、フラッシュメモリ19内の制御プログラムに
よって実行される。
Next, the processing executed by each of the microcomputers 5 and 7 of the ECU 1 will be described with reference to the flow charts of FIGS. FIG. 3 is a flowchart showing the processing executed by the main microcomputer 5, and the processing of steps (hereinafter, simply referred to as “S”) S105 to S190 is executed by the boot program in the mask ROM 17, and S195 is executed. The process of is executed by the control program in the flash memory 19. FIG. 4 is a flowchart showing the processing executed by the sub-microcomputer 7, the processing of S205 to S290 is the mask ROM.
It is executed by the boot program in 17 and S295
The process of is executed by the control program in the flash memory 19.

【0038】ECU1においては、イグニッションスイ
ッチ11がオンされると、両マイコン5,7の各々が、
前述した電源回路13のパワーオンリセット機能によ
り、初期状態から動作を開始する。そして、メインマイ
コン5が動作を開始すると、そのメインマイコン5のC
PU15が図3の処理を実行する。
In the ECU 1, when the ignition switch 11 is turned on, each of the microcomputers 5 and 7
The power-on reset function of the power supply circuit 13 starts the operation from the initial state. When the main microcomputer 5 starts operating, C of the main microcomputer 5
PU15 performs the process of FIG.

【0039】即ち、メインマイコン5のCPU15は、
最初に、マスクROM17に格納されたブートプログラ
ムの実行を開始し、まずS105にて、信号線25を介
して入力されるメモリ書込装置3からの指令信号FCP
がローレベルであるか否かを判定し、このS105で肯
定判定した場合には、続くS110にて、メモリ書込装
置3からの指令信号FCPが所定時間以内にハイレベル
になったか否かを判定する。尚、イグニッションスイッ
チ11がオンされた時点で、当該ECU1にメモリ書込
装置3が接続されており、しかも、メモリ書込装置3が
図2に示したように指令信号FCPをハイレベルにした
ならば、このS110にて肯定判定されることとなる。
That is, the CPU 15 of the main microcomputer 5 is
First, the execution of the boot program stored in the mask ROM 17 is started. First, in S105, the command signal FCP input from the memory writing device 3 via the signal line 25.
Is a low level, and if an affirmative decision is made in S105, it is checked in a succeeding S110 whether the command signal FCP from the memory writing device 3 has become a high level within a predetermined time. judge. If the memory writing device 3 is connected to the ECU 1 at the time when the ignition switch 11 is turned on and the memory writing device 3 sets the command signal FCP to the high level as shown in FIG. If so, an affirmative determination is made in S110.

【0040】そして、S110で肯定判定した場合に
は、データ書込モードであると判断して、S120に進
み、このS120にて、指令信号FCPのパルス幅(ハ
イレベル時間)THを測定する。次に、メインマイコン
5のCPU15は、S130にて、上記S120で測定
した指令信号FCPのパルス幅THが、当該メインマイ
コン5がデータ書込対象であることを示すT1又はT3
であるか否かを判定する。
Then, if an affirmative decision is made in S110, it is decided that the data writing mode is in effect, and the flow proceeds to S120, in which the pulse width (high level time) TH of the command signal FCP is measured. Next, in S130, the CPU 15 of the main microcomputer 5 indicates that the pulse width TH of the command signal FCP measured in S120 indicates that the main microcomputer 5 is a data writing target T1 or T3.
Or not.

【0041】このS130にてパルス幅THがT1又は
T3であると肯定判定した場合には、当該メインマイコ
ン5がデータ書込対象であると判断して、S140に進
む。そして、S140にて、当該メインマイコン5の出
力ポートD1の出力レベルを論理1(=ハイレベル)に
し、続くS150にて、サブマイコン7の出力ポートD
2の出力レベルが論理1(=ハイレベル)であるか否か
を判定する。
When an affirmative determination is made in step S130 that the pulse width TH is T1 or T3, it is determined that the main microcomputer 5 is a data write target, and the process proceeds to step S140. Then, in S140, the output level of the output port D1 of the main microcomputer 5 is set to logic 1 (= high level), and in the subsequent S150, the output port D of the sub-microcomputer 7 is set.
It is determined whether or not the output level of 2 is logic 1 (= high level).

【0042】尚、図1に示すように、メインマイコン5
の出力ポートD1はサブマイコン7の入力ポートに接続
されており、サブマイコン7の出力ポートD2はメイン
マイコン5の入力ポートに接続されている。そして、上
記S150で出力ポートD2の出力レベルが論理1であ
ると判定した場合(つまり、当該メインマイコン5の出
力ポートD1とサブマイコン7の出力ポートD2との両
方の出力レベルが、論理1である場合)には、S160
に進んで、メモリ書込装置3からシリアル通信線23を
介して送信されて来る書込データ(制御プログラムや制
御データを構成するデータ)を受信し、その受信したデ
ータをフラッシュメモリ19内に更新して書き込む、と
いった書込処理を実行する。
As shown in FIG. 1, the main microcomputer 5
Is connected to the input port of the sub-microcomputer 7, and the output port D2 of the sub-microcomputer 7 is connected to the input port of the main microcomputer 5. When it is determined in S150 that the output level of the output port D2 is logical 1 (that is, the output levels of both the output port D1 of the main microcomputer 5 and the output port D2 of the sub-microcomputer 7 are logical 1). If there is, S160
Then, the write data (data forming the control program or control data) transmitted from the memory writing device 3 via the serial communication line 23 is received, and the received data is updated in the flash memory 19. Then, a writing process such as writing is performed.

【0043】この書込処理を終えると、次のS165に
て、上記S120で測定した指令信号FCPのパルス幅
THがT1であるか否かを判定し、パルス幅THがT1
であれば(S165:YES)、そのまま動作を停止す
る。また、上記S165でパルス幅THがT1でないと
判定した場合には(S165:NO)、上記S120で
測定したパルス幅THがT3であったということであ
り、しかも、この時点で当該メインマイコン5における
書込処理は終了しているため、今度はサブマイコン7の
方がデータ書込対象であると判断して、S170に進
む。そして、このS170にて、出力ポートD1の出力
レベルを論理0(=ローレベル)にした後、動作を停止
する。
Upon completion of this writing process, in the next S165, it is determined whether or not the pulse width TH of the command signal FCP measured in S120 is T1, and the pulse width TH is T1.
If so (S165: YES), the operation is stopped as it is. Further, when it is determined in S165 that the pulse width TH is not T1 (S165: NO), it means that the pulse width TH measured in S120 is T3, and at this time, the main microcomputer 5 does not have the pulse width TH. Since the writing process in (3) is completed, it is determined that the sub-microcomputer 7 is the data writing target this time, and the process proceeds to S170. Then, in S170, the output level of the output port D1 is set to logic 0 (= low level), and then the operation is stopped.

【0044】一方、上記S130にてパルス幅THがT
1又はT3ではないと否定判定した場合には、当該メイ
ンマイコン5がデータ書込対象ではない(換言すれば、
サブマイコン7の方がデータ書込対象である)と判断し
て、S175に移行する。そして、このS175にて、
当該メインマイコン5の出力ポートD1の出力レベルを
論理0(=ローレベル)にし、続くS180にて、サブ
マイコン7の出力ポートD2の出力レベルが論理0(=
ローレベル)であるか否かを判定する。
On the other hand, in S130, the pulse width TH is T
When a negative determination is made that it is not 1 or T3, the main microcomputer 5 is not a data writing target (in other words,
It is determined that the sub-microcomputer 7 is the data writing target), and the process proceeds to S175. Then, in this S175,
The output level of the output port D1 of the main microcomputer 5 is set to logic 0 (= low level), and in the subsequent S180, the output level of the output port D2 of the sub-microcomputer 7 is set to logic 0 (= low level).
Low level).

【0045】ここで、上記S180で出力ポートD2の
出力レベルが論理0であると判定した場合(つまり、当
該メインマイコン5の出力ポートD1とサブマイコン7
の出力ポートD2との両方の出力レベルが、論理0であ
る場合)には、そのまま動作を停止するが、上記S18
0で出力ポートD2の出力レベルが論理0でない(論理
1である)と判定した場合には、「当該メインマイコン
5はサブマイコン7がデータ書込対象であると判断して
いるにも拘わらず、サブマイコン7は自分がデータ書込
対象ではないと判断している」という矛盾が発生してい
ると判断して、S190に進む。そして、このS190
にて、メモリ書込装置3へシリアル通信線23を介して
エラー通知を送信し、その後、動作を停止する。
Here, when it is determined in S180 that the output level of the output port D2 is logic 0 (that is, the output port D1 of the main microcomputer 5 and the sub-microcomputer 7).
If both output levels of the output port D2 and the output port D2 are logic 0), the operation is stopped as it is.
When it is determined that the output level of the output port D2 is not 0 (logic 1) at 0, “the main microcomputer 5 determines that the sub-microcomputer 7 is a data write target,” , The sub-microcomputer 7 has determined that it is not the data write target ”, and the process proceeds to S190. And this S190
At, the error notification is transmitted to the memory writing device 3 through the serial communication line 23, and then the operation is stopped.

【0046】また、上記S150で出力ポートD2の出
力レベルが論理1でない(論理0である)と判定した場
合には、「当該メインマイコン5がデータ書込対象であ
ると判断しているにも拘わらず、サブマイコン7も自分
がデータ書込対象であると判断している」という矛盾が
発生していると判断して、この場合も、S160での書
込処理を実行することなくS190に移行する。そし
て、メモリ書込装置3へシリアル通信線23を介してエ
ラー通知を送信した後、動作を停止する。
If it is determined in S150 that the output level of the output port D2 is not logic 1 (logic 0), "the main microcomputer 5 is determined to be the data write target. Regardless, the sub-microcomputer 7 also determines that it is the target of data writing ", and in this case also, the process proceeds to S190 without executing the writing process in S160. Transition. Then, after the error notification is transmitted to the memory writing device 3 via the serial communication line 23, the operation is stopped.

【0047】尚、上記S190でメインマイコン5から
エラー通知が送信されると、メモリ書込装置3におい
て、その装置3に設けられた表示部に異常の発生を示す
警告等が表示されることとなる。一方、最初のS105
で否定判定した場合(つまり、イグニッションスイッチ
11のオンに伴い動作を開始した時点で既に指令信号F
CPがハイレベルであった場合)、或いは、S110で
否定判定した場合(つまり、指令信号FCPが所定時間
以内にハイレベルにならなかった場合)には、通常モー
ドであると判断して、フラッシュメモリ19内の制御プ
ログラムへジャンプする。これにより、フラッシュメモ
リ19に書き込まれている制御プログラムが起動され、
その後は、S195に示すように、エンジンを制御する
ための制御処理が実行される。
When an error notification is sent from the main microcomputer 5 in S190, the memory writing device 3 displays a warning or the like indicating the occurrence of an abnormality on the display unit provided in the device 3. Become. On the other hand, the first S105
In case of negative determination (that is, when the operation is started when the ignition switch 11 is turned on, the command signal F is already output.
If CP is at a high level) or if a negative determination is made in S110 (that is, if the command signal FCP does not go to a high level within a predetermined time), it is determined that the normal mode is set and the flash is performed. Jump to the control program in the memory 19. As a result, the control program written in the flash memory 19 is activated,
After that, as shown in S195, a control process for controlling the engine is executed.

【0048】よって、上記S160の書込処理でメモリ
書込装置3からの制御プログラム及び制御データがフラ
ッシュメモリ19に書き込まれた後、イグニッションス
イッチ11をオフして再度オンすれば、その書き込まれ
た制御プログラムが起動されることとなる。
Therefore, after the control program and the control data from the memory writing device 3 are written in the flash memory 19 in the writing process of S160, if the ignition switch 11 is turned off and then turned on again, the writing is performed. The control program will be started.

【0049】また、イグニッションスイッチ11のオン
に伴いサブマイコン7が動作を開始すると、そのサブマ
イコン7のCPU15が図4の処理を実行する。即ち、
サブマイコン7のCPU15も、最初に、マスクROM
17に格納されたブートプログラムの実行を開始し、ま
ずS205にて、信号線25を介して入力されるメモリ
書込装置3からの指令信号FCPがローレベルであるか
否かを判定し、このS205で肯定判定した場合には、
続くS210にて、メモリ書込装置3からの指令信号F
CPが所定時間以内にハイレベルになったか否かを判定
する。
Further, when the sub-microcomputer 7 starts operating with the ignition switch 11 turned on, the CPU 15 of the sub-microcomputer 7 executes the processing shown in FIG. That is,
The CPU 15 of the sub-microcomputer 7 is also a mask ROM first.
The execution of the boot program stored in 17 is started. First, in S205, it is determined whether or not the command signal FCP input from the memory writing device 3 via the signal line 25 is at a low level. If an affirmative decision is made in S205,
In subsequent S210, the command signal F from the memory writing device 3 is sent.
It is determined whether CP has become high level within a predetermined time.

【0050】そして、S210で肯定判定した場合に
は、データ書込モードであると判断して、S220に進
み、このS220にて、指令信号FCPのパルス幅TH
を測定する。次に、サブマイコン7のCPU15は、S
230にて、上記S220で測定した指令信号FCPの
パルス幅THが、T2又はT3であるか否かを判定し、
パルス幅THがT2又はT3であると肯定判定した場合
には、更に続くS240にて、上記S220で測定した
パルス幅THが、当該サブマイコン7がデータ書込対象
であることを示すT2であるか否かを判定する。
If an affirmative decision is made in S210, it is decided that the data writing mode is in effect, and the flow proceeds to S220, in which the pulse width TH of the command signal FCP is set.
To measure. Next, the CPU 15 of the sub-microcomputer 7
At 230, it is determined whether the pulse width TH of the command signal FCP measured at S220 is T2 or T3,
When an affirmative determination is made that the pulse width TH is T2 or T3, the pulse width TH measured in S220 is T2, which indicates that the sub-microcomputer 7 is a data write target, in the subsequent S240. Or not.

【0051】このS240にてパルス幅THがT2であ
ると肯定判定した場合には、当該サブマイコン7がデー
タ書込対象であると判断して、S250に進む。そし
て、S250にて、当該サブマイコン7の出力ポートD
2の出力レベルを論理0(=ローレベル)にし、続くS
260にて、メインマイコン5の出力ポートD1の出力
レベルが論理0(=ローレベル)であるか否かを判定す
る。
When an affirmative determination is made in step S240 that the pulse width TH is T2, it is determined that the sub-microcomputer 7 is a data write target, and the flow advances to step S250. Then, in S250, the output port D of the sub-microcomputer 7
The output level of 2 is set to logic 0 (= low level), and the subsequent S
At 260, it is determined whether the output level of the output port D1 of the main microcomputer 5 is logic 0 (= low level).

【0052】このS260で出力ポートD1の出力レベ
ルが論理0であると判定した場合(つまり、当該サブマ
イコン7の出力ポートD2とメインマイコン5の出力ポ
ートD1との両方の出力レベルが、論理0である場合)
には、S270に進んで、メモリ書込装置3からシリア
ル通信線23を介して送信されて来る書込データ(制御
プログラムや制御データを構成するデータ)を受信し、
その受信したデータをフラッシュメモリ19内に更新し
て書き込む、といった書込処理を実行する。そして、こ
の書込処理を終えると、動作を停止する。
When it is determined in S260 that the output level of the output port D1 is logic 0 (that is, the output levels of both the output port D2 of the sub-microcomputer 7 and the output port D1 of the main microcomputer 5 are logic 0). If it is)
In step S270, write data (control program or data forming control data) transmitted from the memory writing device 3 via the serial communication line 23 is received.
A writing process such as updating and writing the received data in the flash memory 19 is executed. Then, when this writing process is completed, the operation is stopped.

【0053】また、上記S260で出力ポートD1の出
力レベルが論理0でない(論理1である)と判定した場
合には、「当該サブマイコン7がデータ書込対象である
と判断しているにも拘わらず、メインマイコン5も自分
がデータ書込対象であると判断している」という矛盾が
発生していると判断して、S270での書込処理を実行
することなく、そのまま動作を停止する。
If it is determined in S260 that the output level of the output port D1 is not logic 0 (logic 1), "the sub-microcomputer 7 is determined to be the data write target. Regardless, the main microcomputer 5 also determines that it is a data write target ", and the operation is stopped without executing the write process in S270. .

【0054】一方、上記S240でパルス幅THがT2
でないと判定した場合には(S240:NO)、上記S
120で測定したパルス幅THがT3であったというこ
とであり、その場合には、メインマイコン5の方がデー
タ書込対象であると判断して、S280に移行し、当該
サブマイコン7の出力ポートD2の出力レベルを論理1
(=ハイレベル)にした後、S220に戻る。そして、
この場合には、その後、メモリ書込装置3からの指令信
号FCPが再びハイレベルになると、S220にて、そ
の指令信号FCPのパルス幅(ハイレベル時間)が測定
され、次いでS230以降の処理が行われることとな
る。
On the other hand, in S240, the pulse width TH is T2.
If not (S240: NO), the above S
This means that the pulse width TH measured at 120 was T3. In that case, it is determined that the main microcomputer 5 is the data write target, and the process proceeds to S280, where the output of the sub-microcomputer 7 is output. Set the output level of port D2 to logic 1
After setting (= high level), the process returns to S220. And
In this case, when the command signal FCP from the memory writing device 3 becomes high level again thereafter, the pulse width (high level time) of the command signal FCP is measured in S220, and then the processing of S230 and subsequent steps is performed. Will be done.

【0055】また、上記S230にてパルス幅THがT
2又はT3ではないと否定判定した場合には、上記S2
20で測定したパルス幅THがT1であったということ
であり、その場合には、メインマイコン5の方がデータ
書込対象であると判断して、S290に移行する。そし
て、このS290にて、当該サブマイコン7の出力ポー
トD2の出力レベルを論理1(=ハイレベル)にし、そ
の後、動作を停止する。
Further, in S230, the pulse width TH is T
If a negative decision is made that it is not 2 or T3, the above S2
This means that the pulse width TH measured in 20 was T1, and in this case, it is determined that the main microcomputer 5 is the data writing target, and the process proceeds to S290. Then, in S290, the output level of the output port D2 of the sub-microcomputer 7 is set to logic 1 (= high level), and then the operation is stopped.

【0056】一方、最初のS205で否定判定した場合
(つまり、イグニッションスイッチ11のオンに伴い動
作を開始した時点で既に指令信号FCPがハイレベルで
あった場合)、或いは、S210で否定判定した場合
(つまり、指令信号FCPが所定時間以内にハイレベル
にならなかった場合)には、通常モードであると判断し
て、フラッシュメモリ19内の制御プログラムへジャン
プする。これにより、フラッシュメモリ19に書き込ま
れている制御プログラムが起動され、その後は、S29
5に示すように、電子スロットルを監視するための制御
処理が実行される。
On the other hand, when a negative determination is made in the first step S205 (that is, when the command signal FCP is already at the high level when the operation is started with the ignition switch 11 turned on), or when a negative determination is made in S210. (That is, when the command signal FCP does not become high level within the predetermined time), it is determined that the normal mode is set, and the control program in the flash memory 19 is jumped to. As a result, the control program written in the flash memory 19 is started, and thereafter, S29.
As shown in 5, control processing for monitoring the electronic throttle is executed.

【0057】よって、上記S270の書込処理でメモリ
書込装置3からの制御プログラム及び制御データがフラ
ッシュメモリ19に書き込まれた後、イグニッションス
イッチ11をオフして再度オンすれば、その書き込まれ
た制御プログラムが起動されることとなる。
Therefore, after the control program and the control data from the memory writing device 3 are written in the flash memory 19 in the writing process of S270, if the ignition switch 11 is turned off and then turned on again, the writing is performed. The control program will be started.

【0058】このような本実施形態のメモリ書換システ
ムにおいて、メインマイコン5の制御プログラム及び制
御データだけを書き換える場合には、メモリ書込装置3
をECU1に接続すると共に、そのメモリ書込装置3の
動作モードをメインマイコン5への書込モードに設定し
て、イグニッションスイッチ11をオンすれば良い。
In such a memory rewriting system of the present embodiment, when only the control program and control data of the main microcomputer 5 are rewritten, the memory writing device 3 is used.
Is connected to the ECU 1, the operation mode of the memory writing device 3 is set to the writing mode for the main microcomputer 5, and the ignition switch 11 is turned on.

【0059】そして、このようにすれば、メモリ書込装
置3は、図2の2段目に示したように、イグニッション
スイッチ11のオンタイミングから前述の時間Twが経
過すると、その時点からT1の間だけ、信号線25への
指令信号FCPをハイレベルにし、その後、ECU1に
シリアル通信線23を介してメインマイコン5に適合す
る書込データを送信することとなる。
Then, in this way, the memory writing device 3 is, as shown in the second stage of FIG. 2, when the above-mentioned time Tw elapses from the on-timing of the ignition switch 11, the time of T1 is changed from that time. Only during the period, the command signal FCP to the signal line 25 is set to the high level, and then the write data suitable for the main microcomputer 5 is transmitted to the ECU 1 via the serial communication line 23.

【0060】すると、ECU1において、正常ならば、
サブマイコン7では、図4のS205及びS210:Y
ES→S220→S230:NO→S290の順に処理
が行われ、メインマイコン5では、図3のS105及び
S110:YES→S120→S130:YES→S1
40→S150:YES→S160→S165:YES
の順に処理が行われることとなり、結局、メインマイコ
ン5のみで書込処理(S160)が実行されることとな
る。
Then, in the ECU 1, if normal,
In the sub-microcomputer 7, S205 and S210: Y in FIG.
Processing is performed in the order of ES → S220 → S230: NO → S290, and in the main microcomputer 5, S105 and S110: YES → S120 → S130: YES → S1 in FIG.
40 → S150: YES → S160 → S165: YES
Therefore, the writing process (S160) is executed only by the main microcomputer 5.

【0061】また、サブマイコン7の制御プログラム及
び制御データだけを書き換える場合には、メモリ書込装
置3をECU1に接続すると共に、そのメモリ書込装置
3の動作モードをサブマイコン7への書込モードに設定
して、イグニッションスイッチ11をオンすれば良い。
When only the control program and control data of the sub-microcomputer 7 are rewritten, the memory writing device 3 is connected to the ECU 1 and the operation mode of the memory writing device 3 is written to the sub-microcomputer 7. It is sufficient to set the mode and turn on the ignition switch 11.

【0062】そして、このようにすれば、メモリ書込装
置3は、図2の3段目に示したように、イグニッション
スイッチ11のオンタイミングから前述の時間Twが経
過すると、その時点からT2の間だけ、信号線25への
指令信号FCPをハイレベルにし、その後、ECU1に
シリアル通信線23を介してサブマイコン7に適合する
書込データを送信することとなる。
Then, in this way, as shown in the third row of FIG. 2, the memory writing device 3 goes to T2 from the time when the above-mentioned time Tw elapses from the on timing of the ignition switch 11. Only during the period, the command signal FCP to the signal line 25 is set to the high level, and then the write data suitable for the sub-microcomputer 7 is transmitted to the ECU 1 via the serial communication line 23.

【0063】すると、ECU1において、正常ならば、
メインマイコン5では、図3のS105及びS110:
YES→S120→S130:NO→S175→S18
0:YESの順に処理が行われ、サブマイコン7では、
図4のS205及びS210:YES→S220→S2
30:YES→S240:YES→S250→S26
0:YES→S270の順に処理が行われることとな
り、結局、サブマイコン7のみで書込処理(S270)
が実行されることとなる。
Then, in the ECU 1, if normal,
In the main microcomputer 5, S105 and S110 of FIG.
YES → S120 → S130: NO → S175 → S18
Processing is performed in the order of 0: YES, and the sub-microcomputer 7
S205 and S210 of FIG. 4: YES → S220 → S2
30: YES → S240: YES → S250 → S26
0: YES → S270 is performed in this order, and eventually only the sub-microcomputer 7 performs write processing (S270).
Will be executed.

【0064】また更に、メインマイコン5の制御プログ
ラム及び制御データを書き換えた後、イグニッションス
イッチ11をオンしたままで、引き続きサブマイコン7
の制御プログラム及び制御データを書き換える場合に
は、メモリ書込装置3をECU1に接続すると共に、そ
のメモリ書込装置3の動作モードを両マイコン5,7へ
の順次書込モードに設定して、イグニッションスイッチ
11をオンすれば良い。
Furthermore, after the control program and control data of the main microcomputer 5 are rewritten, the sub-microcomputer 7 is continuously operated with the ignition switch 11 kept on.
When rewriting the control program and control data of, the memory writing device 3 is connected to the ECU 1, and the operation mode of the memory writing device 3 is set to the sequential writing mode for both microcomputers 5 and 7. It is sufficient to turn on the ignition switch 11.

【0065】そして、このようにすれば、まず、メモリ
書込装置3は、図2の4段目に示したように、イグニッ
ションスイッチ11のオンタイミングから前述の時間T
wが経過すると、その時点からT3の間だけ、信号線2
5への指令信号FCPをハイレベルにし、その後、EC
U1にシリアル通信線23を介してメインマイコン5に
適合する書込データを送信することとなる。
Then, as described above, first, the memory writing device 3, as shown in the fourth row of FIG. 2, starts from the ON timing of the ignition switch 11 and ends at the time T mentioned above.
When w elapses, the signal line 2 is kept for only T3 from that time.
Command signal FCP to 5 is set to high level, then EC
Write data suitable for the main microcomputer 5 is transmitted to U1 via the serial communication line 23.

【0066】すると、ECU1において、正常ならば、
サブマイコン7では、図4のS205及びS210:Y
ES→S220→S230:YES→S240:NO→
S280の順に処理が行われ、メインマイコン5では、
図3のS105及びS110:YES→S120→S1
30:YES→S140→S150:YES→S160
→S165:NO→S170の順に処理が行われること
となり、この場合には、メインマイコン5のみで書込処
理(S160)が実行されることとなる。
Then, in the ECU 1, if normal,
In the sub-microcomputer 7, S205 and S210: Y in FIG.
ES → S220 → S230: YES → S240: NO →
The processing is performed in the order of S280, and in the main microcomputer 5,
S105 and S110 of FIG. 3: YES → S120 → S1
30: YES → S140 → S150: YES → S160
→ S165: NO → S170 is executed in this order, and in this case, the writing process (S160) is executed only by the main microcomputer 5.

【0067】そして、このように、メインマイコン5に
ついて制御プログラム及び制御データの書き換えが完了
したら、メモリ書込装置3は、信号線25への指令信号
FCPをT2だけハイレベルにし、その後、ECU1に
シリアル通信線23を介してサブマイコン7に適合する
書込データを送信することとなる。
When the rewriting of the control program and the control data for the main microcomputer 5 is completed in this way, the memory writing device 3 sets the command signal FCP to the signal line 25 to the high level for T2, and then to the ECU 1. Write data suitable for the sub-microcomputer 7 is transmitted via the serial communication line 23.

【0068】すると、この段階において、メインマイコ
ン5は、上記S170により出力ポートD1の出力レベ
ルを論理0にした状態で動作を停止しており、サブマイ
コン7だけが動作する。そして、サブマイコン7では、
上記S280から戻ったS220にて指令信号FCPの
パルス幅THを再び測定することとなり、その後、正常
ならば、S230:YES→S240:YES→S25
0→S260:YES→S270の順に処理が行われる
こととなる。よって、メモリ書込装置3がサブマイコン
7に適合する書込データを送信した場合には、サブマイ
コン7のみで書込処理(S270)が実行されることと
なる。
Then, at this stage, the main microcomputer 5 is stopped in the state where the output level of the output port D1 is set to logic 0 at S170, and only the sub-microcomputer 7 operates. And in the sub-microcomputer 7,
The pulse width TH of the command signal FCP is measured again in S220 after returning from S280, and if it is normal thereafter, S230: YES → S240: YES → S25.
The process is performed in the order of 0 → S260: YES → S270. Therefore, when the memory writing device 3 transmits write data suitable for the sub-microcomputer 7, the writing process (S270) is executed only by the sub-microcomputer 7.

【0069】以上詳述したように、本実施形態のECU
1では、各マイコン5,7が、メモリ書込装置3から信
号線25を介して共通に入力される指令信号FCPのパ
ルス幅THを測定する測定処理(メインマイコン5では
S120,サブマイコン7ではS220)と、その測定
処理で測定したパルス幅THが、自分に対して予め定め
られた固有の時間(メインマイコン5であればT1又は
T3,サブマイコン7であればT2)であるか否かを判
定する判定処理(メインマイコン5ではS130,サブ
マイコン7ではS240)とを行い、その判定処理で肯
定判定した場合に、自分がデータ書込対象(書込対象の
マイコン)であると判断して、書込処理(メインマイコ
ン5ではS160,サブマイコン7ではS270)を実
行するようになっている。
As described in detail above, the ECU of this embodiment
In 1, the measurement process in which the respective microcomputers 5 and 7 measure the pulse width TH of the command signal FCP commonly input from the memory writing device 3 via the signal line 25 (S120 in the main microcomputer 5, and in the sub-microcomputer 7 S220) and whether or not the pulse width TH measured in the measurement process is a predetermined specific time for itself (T1 or T3 for the main microcomputer 5, T2 for the sub microcomputer 7). And the determination process (S130 for the main microcomputer 5 and S240 for the sub-microcomputer 7) is performed, and if the determination process is positive, it is determined that the device is a data write target (write target microcomputer). Then, the writing process (S160 in the main microcomputer 5 and S270 in the sub-microcomputer 7) is executed.

【0070】よって、各マイコン5,7が1つのシリア
ル通信線23を共用しているにも拘らず、メモリ書込装
置3から信号線25に出力する指令信号FCPのパルス
幅により、書込対象のマイコンを択一的に指定して、そ
のマイコンに適切なデータを確実に書き込むことがで
き、しかも、その効果を、フラッシュメモリ19へのデ
ータ書込時に書込電圧VPPが必要か否かというマイコ
ンのタイプに拘わらず得ることができる。そして、各マ
イコン5,7は、指令信号FCPの論理レベルを通常の
入力ポートで監視することができ、A/Dポート等の特
別な入力ポートを使用する必要がないため、非常に有利
である。
Therefore, even though each of the microcomputers 5 and 7 shares one serial communication line 23, the write target is changed by the pulse width of the command signal FCP output from the memory writing device 3 to the signal line 25. Of the microcomputer can be selectively designated and appropriate data can be surely written in the microcomputer, and the effect is whether or not the write voltage VPP is necessary when writing data to the flash memory 19. It can be obtained regardless of the type of microcomputer. Each of the microcomputers 5 and 7 can monitor the logic level of the command signal FCP with a normal input port and does not need to use a special input port such as an A / D port, which is very advantageous. .

【0071】また、各マイコン5,7は、自分がデータ
書込対象であるか否かを、メモリ書込装置3とシリアル
通信線23によるデータ通信を行うことなく判断するこ
とができ、書込処理の実行時以外の通信処理を削減する
ことができる。そして更に、本実施形態のECU1にお
いて、メインマイコン5は、自分がデータ書込対象であ
ると判断している場合に、出力ポートD1の出力レベル
を論理1にし(S140)、自分がデータ書込対象では
ない(換言すれば、サブマイコン7がデータ書込対象で
ある)と判断している場合には、出力ポートD1の出力
レベルを論理0にする(S175,S170)ようにな
っている。同様に、サブマイコン7は、自分がデータ書
込対象であると判断している場合に、出力ポートD2の
出力レベルを論理0にし(S250)、自分がデータ書
込対象ではない(換言すれば、メインマイコン5がデー
タ書込対象である)と判断している場合には、出力ポー
トD2の出力レベルを論理1にする(S290,S28
0)ようになっている。尚、本実施形態では、出力ポー
トD1,D2からの出力信号が、判定処理の判定結果を
示す判定結果報知信号に相当している。
Further, each of the microcomputers 5 and 7 can judge whether or not it is a data write target without performing data communication with the memory writing device 3 through the serial communication line 23. It is possible to reduce communication processing other than when the processing is executed. Further, in the ECU 1 of the present embodiment, when the main microcomputer 5 determines that it is the data write target, the main microcomputer 5 sets the output level of the output port D1 to logic 1 (S140), and writes the data by itself. When it is determined that it is not a target (in other words, the sub-microcomputer 7 is a data write target), the output level of the output port D1 is set to logic 0 (S175, S170). Similarly, when the sub-microcomputer 7 determines that it is a data write target, it sets the output level of the output port D2 to logic 0 (S250), and is not a data write target (in other words, in other words). , The main microcomputer 5 is a data write target), the output level of the output port D2 is set to logic 1 (S290, S28).
0). In the present embodiment, the output signals from the output ports D1 and D2 correspond to the determination result notification signal indicating the determination result of the determination process.

【0072】そして、メインマイコン5は、自分がデー
タ書込対象であると判断した場合に(S130:YE
S)、サブマイコン7の出力ポートD2の出力レベルが
論理1であること(即ち、サブマイコン7は自分がデー
タ書込対象であると判断していないことであり、換言す
れば、サブマイコン7も当該メインマイコン5がデータ
書込対象であると判断していること)を確認した上で、
書込処理を実行するようになっている(S150:YE
S→S160)。同様に、サブマイコン7も、自分がデ
ータ書込対象であると判断した場合に(S240:YE
S)、メインマイコン5の出力ポートD1の出力レベル
が論理0であること(即ち、メインマイコン5は自分が
データ書込対象であると判断していないことであり、換
言すれば、メインマイコン5も当該サブマイコン7がデ
ータ書込対象であると判断していること)を確認した上
で、書込処理を実行するようになっている(S260:
YES→S270)。また更に、メインマイコン5は、
自分の出力ポートD1の出力レベルと、サブマイコン7
の出力ポートD2の出力レベルとが一致していないと判
定すると(S150:NO又はS180:NO)、メモ
リ書込装置3へエラー通知を送信するようになっている
(S190)。
When the main microcomputer 5 determines that it is the data write target (S130: YE
S), the output level of the output port D2 of the sub-microcomputer 7 is logic 1 (that is, the sub-microcomputer 7 does not judge that it is the data write target, in other words, the sub-microcomputer 7 After confirming that the main microcomputer 5 is the target of data writing,
The writing process is executed (S150: YE
S → S160). Similarly, when the sub-microcomputer 7 also determines that it is a data write target (S240: YE
S), the output level of the output port D1 of the main microcomputer 5 is logic 0 (that is, the main microcomputer 5 does not judge that it is a data write target, in other words, the main microcomputer 5 Also, after confirming that the sub-microcomputer 7 has determined that the sub-microcomputer 7 is a data writing target, the writing process is executed (S260:
YES → S270). Furthermore, the main microcomputer 5
Output level of own output port D1 and sub-microcomputer 7
If it is determined that the output level of the output port D2 does not match (S150: NO or S180: NO), an error notification is transmitted to the memory writing device 3 (S190).

【0073】従って、図5に示すように、両マイコン
5,7の出力ポートD1,D2の出力レベルが一致して
いる場合、即ち、データ書込対象が何れであるかの各マ
イコン5,7での判断結果が一致している場合にのみ、
本来のデータ書込対象であるマイコンにて書込処理が実
行されることとなり、それ以外の場合には、メモリ書込
装置3へエラー通知が送信されて、そのメモリ書込装置
3の表示部に警告等が表示されることとなる。よって、
ノイズ等の影響により、本来のデータ書込対象とは違う
マイコンが、自分がデータ書込対象であると誤判定した
場合には、両マイコン5,7で書込処理が行われない。
Therefore, as shown in FIG. 5, when the output levels of the output ports D1 and D2 of the two microcomputers 5 and 7 are the same, that is, the microcomputers 5 and 7 to which the data write target is respectively. Only when the judgment results in
The writing process is executed by the microcomputer which is the original data writing target, and in other cases, an error notification is transmitted to the memory writing device 3 and the display unit of the memory writing device 3 is displayed. A warning will be displayed on the screen. Therefore,
When a microcomputer different from the original data write target erroneously determines that it is the data write target due to the influence of noise or the like, the write process is not performed by both microcomputers 5 and 7.

【0074】このため、本実施形態のECU1によれ
ば、ノイズ等の影響による誤判定によって、本来のデー
タ書込対象とは違うマイコンが誤って書込処理を実行し
てしまうこと、つまり、本来のデータ書込対象とは違う
マイコンが、メモリ書込装置3からの書込データを誤っ
て自分のフラッシュメモリ19に書き込んでしまうこと
を、確実に防止することができる。
Therefore, according to the ECU 1 of this embodiment, a microcomputer different from the original data writing target may erroneously execute the writing process due to an erroneous determination due to the influence of noise or the like. It is possible to reliably prevent a microcomputer different from the data writing target from writing the write data from the memory writing device 3 into its own flash memory 19 by mistake.

【0075】一方更に、本実施形態のECU1によれ
ば、ノイズの影響によって本来のデータ書込対象とは違
うマイコンが誤って書込処理を実行してしまうのを一層
確実に防ぐための手法として、非常に簡単な手法を採る
ことができる。つまり、メモリ書込装置3からの指令信
号FCPを入力する各マイコン5,7の入力ポートに、
電圧平滑化効果が比較的大きなローパスフィルタを設け
ても、各マイコン5,7は、自分がデータ書込対象であ
るか否か(即ち、指令信号FCPのパルス幅THが自分
に固有の時間であるか否か)を正確に判定できるからで
ある。また、各マイコン5,7が、指令信号FCPのパ
ルス幅THを測定する際に、その指令信号FCPの入力
値に対してデジタル的なフィルタ処理を施すようにして
も良い。
On the other hand, according to the ECU 1 of the present embodiment, as a method for more surely preventing a microcomputer different from the original data writing target from erroneously executing the writing process due to the influence of noise. , A very simple method can be taken. That is, to the input ports of the respective microcomputers 5 and 7 for inputting the command signal FCP from the memory writing device 3,
Even if a low-pass filter having a relatively large voltage smoothing effect is provided, each of the microcomputers 5 and 7 determines whether or not it is a data write target (that is, the pulse width TH of the command signal FCP is a time unique to itself). This is because it can be accurately determined whether or not there is. Further, when each of the microcomputers 5 and 7 measures the pulse width TH of the command signal FCP, the input value of the command signal FCP may be digitally filtered.

【0076】以上、本発明の一実施形態について説明し
たが、本発明は、種々の形態を採り得ることは言うまで
もない。例えば、 上記実施形態のECU1は、2つの
マイコン5,7を備えたものであったが、マイコンの数
は3つ以上であっても同様に構成することができる。
Although one embodiment of the present invention has been described above, it goes without saying that the present invention can take various forms. For example, the ECU 1 of the above-described embodiment has two microcomputers 5 and 7, but the same configuration can be made even if the number of microcomputers is three or more.

【0077】また、上記実施形態において、各マイコン
5,7は、電気的にデータの書き換えが可能な不揮発性
メモリとして、フラッシュメモリ19を有するものであ
ったが、EEPROMや他のメモリを有するものでも良
い。
Further, in the above embodiment, each of the microcomputers 5 and 7 has the flash memory 19 as the electrically rewritable non-volatile memory, but it has the EEPROM and other memories. But good.

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

【図1】 実施形態の電子制御装置のメモリ書換システ
ムの全体構成を表すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a memory rewriting system of an electronic control device according to an embodiment.

【図2】 メモリ書込装置からECU(電子制御装置)
に出力される指令信号FCPを説明する説明図である。
FIG. 2 shows a memory writing device to an ECU (electronic control unit)
It is explanatory drawing explaining the command signal FCP output to.

【図3】 メインマイコンで実行される処理を表すフロ
ーチャートである。
FIG. 3 is a flowchart showing a process executed by a main microcomputer.

【図4】 サブマイコンで実行される処理を表すフロー
チャートである。
FIG. 4 is a flowchart showing a process executed by a sub-microcomputer.

【図5】 実施形態のECUの作用を説明する説明図で
ある。
FIG. 5 is an explanatory diagram illustrating an operation of the ECU of the embodiment.

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

1…ECU(電子制御装置)、3…メモリ書込装置、5
…メインマイコン、7…サブマイコン、9…バッテリ、
11…イグニッションスイッチ、13…電源回路、15
…CPU、17…マスクROM、19…フラッシュメモ
リ、21…RAM、23…シリアル通信線、25…信号
線、27…電源線、D1,D2…出力ポート
1 ... ECU (electronic control unit), 3 ... Memory writing device, 5
... Main microcomputer, 7 ... Sub microcomputer, 9 ... Battery,
11 ... Ignition switch, 13 ... Power supply circuit, 15
... CPU, 17 ... Mask ROM, 19 ... Flash memory, 21 ... RAM, 23 ... Serial communication line, 25 ... Signal line, 27 ... Power supply line, D1, D2 ... Output port

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 電気的にデータの書き換えが可能な不揮
発性メモリを有したマイクロコンピュータを、複数備え
ると共に、 前記各マイクロコンピュータは、通常時には、前記不揮
発性メモリに格納されたデータにより構成される制御プ
ログラム及び制御データに従って所定の機能を果たすた
めの制御処理を実行し、書込実施条件が成立したと判断
した場合には、外部のメモリ書込装置から当該各マイク
ロコンピュータに共通の通信ラインを介して送信されて
来る書込データを受信して前記不揮発性メモリに更新し
て書き込むための書込処理を実行するように構成された
電子制御装置であって、 前記各マイクロコンピュータは、 前記通信ラインとは別の信号線を介して前記メモリ書込
装置から当該各マイクロコンピュータに共通に入力され
る二値振幅の指令信号が、特定の論理レベルになってい
る継続時間を測定する測定処理と、 前記測定処理で測定した時間が、自分に対して予め定め
られた固有の時間であって、自分が前記メモリ書込装置
からの書込データを前記不揮発性メモリに書き込むべき
書込対象のマイクロコンピュータであることを示す時間
であるか否かを判定する判定処理とを行い、 前記判定処理で肯定判定した場合に、前記書込実施条件
が成立したと判断して、前記書込処理を実行するように
構成されていること、 を特徴とする電子制御装置。
1. A plurality of microcomputers having an electrically rewritable non-volatile memory are provided, and each of the microcomputers is normally composed of data stored in the non-volatile memory. When the control process for performing a predetermined function is executed according to the control program and the control data and it is determined that the write execution condition is satisfied, an external memory writing device sets a common communication line to each microcomputer. An electronic control unit configured to receive write data transmitted via the memory, execute a write process for updating and writing in the nonvolatile memory, wherein each of the microcomputers is configured to perform the communication. A common input from the memory writing device to each of the microcomputers via a signal line different from the line. The measurement process in which the command signal of the value amplitude has a specific logic level for measuring the duration time, and the time measured in the measurement process is a unique time predetermined for oneself, A determination process is performed to determine whether or not it is time to indicate that the write data from the memory writing device is a write target microcomputer that should be written to the nonvolatile memory, and an affirmative determination is made in the determination process. If it is, the electronic control unit is configured to execute the writing process by determining that the writing execution condition is satisfied.
【請求項2】 請求項1に記載の電子制御装置におい
て、 前記各マイクロコンピュータは、 前記判定処理の判定結果を示す判定結果報知信号を、他
のマイクロコンピュータへ出力すると共に、前記判定処
理で肯定判定し、且つ、他のマイクロコンピュータから
の前記判定結果報知信号に基づいて前記他のマイクロコ
ンピュータが前記判定処理で肯定判定していないことを
確認した場合に、前記書込処理を実行するようになって
いること、 を特徴とする電子制御装置。
2. The electronic control device according to claim 1, wherein each of the microcomputers outputs a determination result notification signal indicating a determination result of the determination process to another microcomputer, and affirms in the determination process. When the determination is made and it is confirmed that the other microcomputer does not make an affirmative determination in the determination processing based on the determination result notification signal from the other microcomputer, the writing processing is executed. An electronic control device characterized by:
JP2001393965A 2001-12-26 2001-12-26 Electronic control unit Pending JP2003196256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001393965A JP2003196256A (en) 2001-12-26 2001-12-26 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001393965A JP2003196256A (en) 2001-12-26 2001-12-26 Electronic control unit

Publications (1)

Publication Number Publication Date
JP2003196256A true JP2003196256A (en) 2003-07-11

Family

ID=27600826

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001393965A Pending JP2003196256A (en) 2001-12-26 2001-12-26 Electronic control unit

Country Status (1)

Country Link
JP (1) JP2003196256A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242995A (en) * 2007-03-28 2008-10-09 Denso Corp Electronic control device
JP2012006547A (en) * 2010-06-28 2012-01-12 Toyota Motor Corp Electronic control device
JP2012091754A (en) * 2010-10-29 2012-05-17 Honda Motor Co Ltd Program rewriting system for vehicle
JP2012091755A (en) * 2010-10-29 2012-05-17 Honda Motor Co Ltd Program rewriting system for vehicle
JP2012212272A (en) * 2011-03-31 2012-11-01 Keihin Corp Electronic control device for vehicle
JP2015099528A (en) * 2013-11-20 2015-05-28 トヨタ自動車株式会社 Method of rewriting program of sub-microcomputer
JP2018134964A (en) * 2017-02-21 2018-08-30 日立オートモティブシステムズ株式会社 Electronic control unit for automobile

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242995A (en) * 2007-03-28 2008-10-09 Denso Corp Electronic control device
JP2012006547A (en) * 2010-06-28 2012-01-12 Toyota Motor Corp Electronic control device
JP2012091754A (en) * 2010-10-29 2012-05-17 Honda Motor Co Ltd Program rewriting system for vehicle
JP2012091755A (en) * 2010-10-29 2012-05-17 Honda Motor Co Ltd Program rewriting system for vehicle
JP2012212272A (en) * 2011-03-31 2012-11-01 Keihin Corp Electronic control device for vehicle
JP2015099528A (en) * 2013-11-20 2015-05-28 トヨタ自動車株式会社 Method of rewriting program of sub-microcomputer
JP2018134964A (en) * 2017-02-21 2018-08-30 日立オートモティブシステムズ株式会社 Electronic control unit for automobile

Similar Documents

Publication Publication Date Title
JP3491419B2 (en) Electronic control unit
JP4367513B2 (en) Electronic control unit
JP4506868B2 (en) Electronic control unit
JPH11259375A (en) Device and system for control for vehicle
JPH0319571B2 (en)
JPH11272498A (en) Electronic controller
US6636989B1 (en) Electronic control apparatus and method for on-board rewriting of non-volatile memories
JPH11238005A (en) Electronic controller and control system
JP4552982B2 (en) Electronic control unit
JP2001123874A (en) Program rewrite system or memory rewriting system for electronic control device
JP2000259420A (en) Device for updating learning value for electronic controller
JP2003196256A (en) Electronic control unit
JP3137012B2 (en) Electronic control unit
JPH10177504A (en) Electronic controller
US6256226B1 (en) Eeprom write device
JP2016126699A (en) Electronic control unit for vehicle
JP4281222B2 (en) Nonvolatile memory writing device
JP6869743B2 (en) Electronic control device for automobiles
US6122574A (en) Method for detecting abnormality of control unit and control unit employing same
JPH11141391A (en) Controller for automobile
US20210065478A1 (en) Electronic control unit and non-transitory computer readable medium storing session establishment program
JP2009026183A (en) Electronic control apparatus for automobile
JP2003271420A (en) Electronic control device
JP2000029710A (en) Electronic controller
JP2005250854A (en) Controller