JP3494031B2 - Automotive electronic control unit - Google Patents

Automotive electronic control unit

Info

Publication number
JP3494031B2
JP3494031B2 JP26376598A JP26376598A JP3494031B2 JP 3494031 B2 JP3494031 B2 JP 3494031B2 JP 26376598 A JP26376598 A JP 26376598A JP 26376598 A JP26376598 A JP 26376598A JP 3494031 B2 JP3494031 B2 JP 3494031B2
Authority
JP
Japan
Prior art keywords
communication
buffer
microcomputer
transmission data
electronic control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP26376598A
Other languages
Japanese (ja)
Other versions
JP2000101655A (en
Inventor
和之 奥田
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 JP26376598A priority Critical patent/JP3494031B2/en
Publication of JP2000101655A publication Critical patent/JP2000101655A/en
Application granted granted Critical
Publication of JP3494031B2 publication Critical patent/JP3494031B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)
  • Communication Control (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、書換可能な不揮発
性メモリに対してデータ書換機能を有する車載用電子制
御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an on- vehicle electronic control device having a data rewriting function for a rewritable nonvolatile memory.

【0002】[0002]

【従来の技術】従来、車載用電子制御装置に関連する先
行技術文献としては、特開平10−47151号公報に
て開示されたものが知られている。このものでは、シリ
アル通信モジュール(シリアルインタフェース)に書換
可能な不揮発性メモリ(EEPROM:Electrical Era
sable Programmable ROM)と入出力モジュール(外部通
信装置)とを並列に接続し、車載用電子制御装置の動作
期間毎、具体的にはイグニッションスイッチのON(オ
ン)/OFF(オフ)で制御対象を切換えるものであ
る。つまり、揮発性メモリ(RAM)から不揮発性メモ
リ(EEPROM)へのデータ転送・書込を車載用電子
制御装置への電源供給の停止後、具体的にはイグニッシ
ョンスイッチのOFF後に一定時間を設定することで達
成している。
2. Description of the Related Art Conventionally, as a prior art document related to an on- vehicle electronic control device, one disclosed in Japanese Patent Application Laid-Open No. 10-47151 is known. This is a nonvolatile memory (EEPROM: Electrical Era) that can be rewritten in a serial communication module (serial interface).
sable Programmable ROM) and an input / output module (external communication device) are connected in parallel, and the control target is controlled by turning on / off the ignition switch for each operating period of the on- vehicle electronic control device. It is something to switch. That is, the data transfer / writing from the volatile memory (RAM) to the non-volatile memory (EEPROM) is set after the power supply to the vehicle-mounted electronic control unit is stopped, specifically, after the ignition switch is turned off. It is achieved by that.

【0003】[0003]

【発明が解決しようとする課題】ところで、前述のもの
のように、イグニッションスイッチのOFFで不揮発性
メモリ(EEPROM)に対する書込を開始すると、そ
の書込が完了するまで車載用電子制御装置に電源供給を
続ける必要があり、実際の電源遮断までの待ち時間が発
生、即ち、余分な時間を費やすという不具合があった。
また、車載用電子制御装置による通常制御中の更新デー
タは揮発性メモリ(RAM)への反映のみであるため、
その間に電源電圧の瞬断等がありリセットされると更新
データは消去され不揮発性メモリ(EEPROM)に反
映されないという不具合があった。
By the way, as described above, when writing to the nonvolatile memory (EEPROM) is started by turning off the ignition switch, power is supplied to the on- vehicle electronic control unit until the writing is completed. However, there is a problem that a waiting time until the power is actually cut off occurs, that is, extra time is spent.
Also, since the update data during normal control by the vehicle-mounted electronic control device is only reflected in the volatile memory (RAM),
In the meantime, if there is a momentary interruption of the power supply voltage or the like and it is reset, the update data is erased and is not reflected in the non-volatile memory (EEPROM).

【0004】そこで、この発明はかかる不具合を解決す
るためになされたもので、車載用電子制御装置の通常制
御中における更新データの揮発性メモリへの反映によ
り、その制御途中に電源電圧の瞬断等があってもそれま
での更新データを余分な時間を費やすことなく不揮発性
メモリにも反映できる車載用電子制御装置の提供を課題
としている。
The present invention has been made in order to solve such a problem, and the update data is reflected in the volatile memory during the normal control of the on- vehicle electronic control unit, so that the power supply voltage is interrupted during the control. Therefore, it is an object to provide an in- vehicle electronic control device that can reflect the updated data up to that point in the nonvolatile memory without spending extra time.

【0005】[0005]

【課題を解決するための手段】請求項1の車載用電子制
御装置によれば、イグニッションスイッチがオンしてい
る期間で、シリアル通信モジュールを有するマイクロコ
ンピュータにより入出力モジュールとの所定のタイミン
グ毎の通信が実行されていないときには、書換可能な不
揮発性メモリに対する送信データを一時的に蓄えるバッ
ファの内容が確認され、送信データが蓄えられていると
きにはシリアル通信ラインを介して不揮発性メモリへの
通信が実行される。このように、車載用電子制御装置の
通常制御中において入出力モジュールとの通信の空き時
間を利用して随時、更新データである送信データが不揮
発性メモリに書込処理されることで不揮発性メモリへの
書込処理に余分な時間を費やすことがなく、電源電圧の
瞬断等があってもそれまでの更新データが不揮発性メモ
リに確実に反映される。
According to the on- vehicle electronic control device of the present invention, the ignition switch is turned on.
During a certain period, when the microcomputer having the serial communication module does not communicate with the input / output module at each predetermined timing, the contents of the buffer for temporarily storing the transmission data to the rewritable nonvolatile memory are confirmed. When transmission data is stored, communication to the non-volatile memory is executed via the serial communication line. In this way, during the normal control of the vehicle-mounted electronic control unit, the transmission data, which is the update data, is written into the nonvolatile memory at any time by utilizing the idle time of communication with the input / output module, and thus the nonvolatile memory No extra time is spent in the writing process to the non-volatile memory, and the updated data up to that point is surely reflected in the nonvolatile memory even if the power supply voltage is interrupted.

【0006】請求項2の車載用電子制御装置では、マイ
クロコンピュータにて入出力モジュールとイグニッショ
ンスイッチがオンしている期間の所定時間毎に通信が行
われることで通常制御中に随時、更新データである送信
データが不揮発性メモリに書込処理されることで、電源
電圧の瞬断等があってもそれまでの更新データが不揮発
性メモリに確実に反映される。
According to the on-vehicle electronic control device of the present invention,
Input / output module and ignition on black computer
Communication is performed every predetermined time during which the switch is on.
By sending the update data at any time during normal control
By writing the data to the non-volatile memory,
Even if there is a momentary voltage interruption, the update data up to that point is non-volatile
Surely reflected in sex memory.

【0007】請求項3車載用電子制御装置では、マイ
クロコンピュータにてバッファに送信データが蓄えられ
ていることが確認されると、全ての送信データが通信完
了するまで不揮発性メモリとの通信が継続して実行され
るため、通常制御中における更新データが不揮発性メモ
リに確実に反映される。
In the on- vehicle electronic control device of the third aspect , when it is confirmed by the microcomputer that the transmission data is stored in the buffer, the communication with the non-volatile memory is performed until all the transmission data are completed. Since it is continuously executed, the updated data during the normal control is surely reflected in the nonvolatile memory.

【0008】請求項4車載用電子制御装置では、マイ
クロコンピュータにてバッファに送信データが蓄えられ
ていることが確認されると、送信データの一定量ずつ不
揮発性メモリとの通信が実行されるため、通常制御中に
おける更新データが不揮発性メモリに確実に反映され
る。
[0008] In-vehicle electronic control device according to claim 4, when it is confirmed that the transmission data in the buffer is stored in the microcomputer, communication is performed with the constant amount by nonvolatile memory of the transmission data Therefore, the updated data during the normal control is surely reflected in the nonvolatile memory.

【0009】請求項5車載用電子制御装置では、マイ
クロコンピュータにて入出力モジュールとの通信の完了
直後にバッファ内容が確認され、バッファに送信データ
が蓄えられていると割込が発生されることで通常制御中
における更新データがその都度、素早く反映される。
[0009] In-vehicle electronic control device according to claim 5, the buffer contents are verified immediately after the completion of the communication with the input module by the microcomputer, an interrupt is generated when the transmission data in the buffer is stored As a result, the updated data during normal control is quickly reflected each time.

【0010】請求項6の車載用電子制御装置によれば、
シリアル通信モジュールを有するマイクロコンピュータ
により入出力モジュールとの通信が完了した直後に、書
換可能な不揮発性メモリに対する送信データを一時的に
蓄えるバッファの内容が確認され、送信データが蓄えら
れているときにはシリアル通信ラインを介して不揮発性
メモリへの通信が実行される。このように、車載用電子
制御装置の通常制御中において入出力モジュールとの通
信が完了した直後に、更新データである送信データが不
揮発性メモリに確実に書込処理されることで、電源電圧
の瞬断等があってもそれまでの更新データが不揮発性メ
モリに確実に反映される。
According to the on-vehicle electronic control unit of claim 6,
Microcomputer having serial communication module
Immediately after the communication with the I / O module is completed.
Temporarily send data to convertible non-volatile memory
The contents of the buffer to be stored are confirmed, and the transmission data is stored.
Non-volatile via serial communication line when
Communication to the memory is performed. Thus, in-vehicle electronic
Communication with the I / O module during normal control of the control unit
Immediately after the transmission is completed, the transmission data that is the update data
Power supply voltage is ensured by the sure writing process to volatile memory.
Even if there is a momentary interruption, the updated data up to that point is non-volatile.
Certainly reflected in Mori.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態を実施
例に基づいて説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below based on Examples.

【0012】図1は本発明の実施の形態の一実施例にか
かる車載用電子制御装置が適用され車両に搭載された内
燃機関用電子制御装置の全体構成を示すブロック図であ
る。
[0012] Figure 1 is a block diagram showing the overall construction of the embodiment of the internal combustion engine electronic control unit mounted in-vehicle electronic control device is applied a vehicle according to an embodiment of the present invention.

【0013】図1において、10は内燃機関用電子制御
装置(Electronic Control Unit:以下、単に、『EC
U』と記す)であり、ECU10には図示しない内燃機
関の運転状態を検出する各種センサとしてクランク角セ
ンサ1からの機関回転数信号NE、水温センサ2からの
冷却水温信号THW、エアフローメータ3からの吸気量
信号GN等の各種センサ信号が入力され、また、バッテ
リ電源4からの電源電圧+BがIGSW(イグニッショ
ンスイッチ)5及びIGSW5に並列に配設されたメイ
ンリレー6を介して入力されている。これら各種センサ
信号等はECU10内の入力インタフェース回路11を
介してマイクロコンピュータ20に入力されている。更
に、バッテリ電源4からの電源電圧+BがIGSW5及
びメインリレー6を介してECU10内の定電圧電源回
路12に入力され、この定電圧電源回路12による定電
圧電源がマイクロコンピュータ20に入力されている。
In FIG. 1, 10 is an electronic control unit for an internal combustion engine (hereinafter, simply referred to as "EC
U)), and the ECU 10 has various sensors (not shown) for detecting an operating state of the internal combustion engine, such as an engine speed signal NE from a crank angle sensor 1, a cooling water temperature signal THW from a water temperature sensor 2, and an air flow meter 3. Various sensor signals such as the intake air amount signal GN are input, and the power supply voltage + B from the battery power supply 4 is input via the IGSW (ignition switch) 5 and the main relay 6 arranged in parallel with the IGSW 5. . These various sensor signals and the like are input to the microcomputer 20 via the input interface circuit 11 in the ECU 10. Further, the power supply voltage + B from the battery power supply 4 is input to the constant voltage power supply circuit 12 in the ECU 10 via the IGSW 5 and the main relay 6, and the constant voltage power supply by the constant voltage power supply circuit 12 is input to the microcomputer 20. .

【0014】また、ECU10にはノックセンサ7から
のノック信号KNK、A/F(空燃比)センサ8からの
A/F信号AFVALがECU10内の入力インタフェ
ース回路13を介してそれぞれKCS−IC(ノック判
定用IC)14、A/F−IC(A/F検出用IC)1
5に入力されている。なお、入力インタフェース回路1
1,13では各種センサ信号等に対して波形整形処理、
A/D変換処理等が実行される。
Further, the ECU 10 receives the knock signal KNK from the knock sensor 7 and the A / F signal AFVAL from the A / F (air-fuel ratio) sensor 8 via the input interface circuit 13 in the ECU 10 respectively. Judgment IC) 14, A / F-IC (A / F detection IC) 1
It is entered in 5. The input interface circuit 1
In 1 and 13, waveform shaping processing for various sensor signals,
A / D conversion processing and the like are executed.

【0015】KCS−IC14及びA/F−IC15は
シリアル通信ライン17を介してマイクロコンピュータ
20と接続されている。更に、シリアル通信ライン17
には書換可能な不揮発性メモリとしてのEEPROM1
6が接続されている。マイクロコンピュータ20では各
種センサ信号に基づき内燃機関に対する最適な制御量が
演算され、その演算結果としての制御信号が出力インタ
フェース回路18に出力される。そして、出力インタフ
ェース回路18からの制御信号により内燃機関のインジ
ェクタ(燃料噴射弁)31、イグナイタ32、燃料ポン
プ33、スロットルモータ34等の各種アクチュエータ
が駆動される。
The KCS-IC 14 and the A / F-IC 15 are connected to the microcomputer 20 via a serial communication line 17. Furthermore, the serial communication line 17
EEPROM as a rewritable non-volatile memory
6 is connected. The microcomputer 20 calculates an optimum control amount for the internal combustion engine based on various sensor signals, and outputs a control signal as the calculation result to the output interface circuit 18. Then, various actuators such as an injector (fuel injection valve) 31, an igniter 32, a fuel pump 33, and a throttle motor 34 of the internal combustion engine are driven by a control signal from the output interface circuit 18.

【0016】ECU10内のマイクロコンピュータ20
は、周知の中央処理装置としてCPU21、制御プログ
ラムやデータを格納するROM22、各種データを格納
するRAM23、入力インタフェース回路11からの信
号を受取ると共に、出力インタフェース回路18に制御
信号を出力するI/O(Input-Output)回路24、シリ
アル通信ライン17を介してKCS−IC14、A/F
−IC15、EEPROM16との入出力信号を入出力
するためのシリアル通信モジュール25及びそれらを接
続するバスライン等からなる論理演算回路として構成さ
れている。なお、RAM23内には後述のEEPROM
16への通信用バッファTEPBUFが構成されてい
る。また、EEPROM16は一旦書込まれたプログラ
ムやデータを消去し再度、書込可能なメモリ、即ち、書
換可能な読出し専用メモリであり、フラッシュROM等
を用いることもできる。
Microcomputer 20 in ECU 10
Is a well-known central processing unit that is a CPU 21, a ROM 22 that stores control programs and data, a RAM 23 that stores various data, and an I / O that outputs control signals to the output interface circuit 18 while receiving signals from the input interface circuit 11. (Input-Output) circuit 24, KCS-IC 14, A / F via serial communication line 17
It is configured as a logical operation circuit including a serial communication module 25 for inputting / outputting input / output signals to / from the IC 15 and the EEPROM 16 and a bus line connecting them. In the RAM 23, an EEPROM described later
A communication buffer TEPBUF for 16 is configured. Further, the EEPROM 16 is a rewritable memory, that is, a rewritable read-only memory that erases once written programs and data, and may be a flash ROM or the like.

【0017】次に、本発明の実施の形態の一実施例にか
かるECU10のマイクロコンピュータ20内のCPU
21における制御全体の概略的な処理手順を示す図2の
フローチャートに基づいて説明する。なお、この制御ル
ーチンは所定のリセット毎にCPU21にて繰返し実行
される。
Next, the CPU in the microcomputer 20 of the ECU 10 according to an example of the embodiment of the present invention
2 will be described based on the flowchart of FIG. 2 showing a schematic processing procedure of the entire control in 21. The control routine is repeatedly executed by the CPU 21 every predetermined reset.

【0018】図2において、ステップS101では、初
期値設定処理として自らのレジスタやRAM23内の記
憶領域で初期化の必要なものに対して初期値が設定され
る。次にステップS102に移行して、通信設定処理と
してシリアル通信を実行するために必要なレジスタが設
定される。次にステップS103に移行して、EEPR
OM16内のデータがRAM23内に格納される。次に
ステップS104に移行して、IGSW(イグニッショ
ンスイッチ)5がONであるかが判定される。ステップ
S104の判定条件が成立、即ち、IGSW5がONで
あるときにはステップS105に移行し、内燃機関に対
する通常制御が実行される。次にステップS106に移
行して、KCS−IC14、A/F−IC15、EEP
ROM16の各通信対象に対する通信が実施される。こ
こで、KCS−IC14、A/F−IC15との通信は
所定のタイミングにて実施され、EEPROM16との
通信は書込データがあるときのみ実施される。
Referring to FIG. 2, in step S101, initial values are set for those that need to be initialized in their own registers or storage areas in the RAM 23 as initial value setting processing. Next, the process proceeds to step S102, and the registers necessary for executing serial communication as communication setting processing are set. Then, the process proceeds to step S103, and the EEPR
The data in the OM 16 is stored in the RAM 23. Next, the process proceeds to step S104, and it is determined whether the IGSW (ignition switch) 5 is ON. When the determination condition of step S104 is satisfied, that is, when the IGSW 5 is ON, the process proceeds to step S105, and the normal control for the internal combustion engine is executed. Next, the process proceeds to step S106, and the KCS-IC14, A / F-IC15, EEP
Communication with each communication target of the ROM 16 is performed. Here, the communication with the KCS-IC 14 and the A / F-IC 15 is performed at a predetermined timing, and the communication with the EEPROM 16 is performed only when there is write data.

【0019】ステップS106の処理ののち、ステップ
S104に戻り同様な処理が繰返し実行される。そし
て、ステップS104の判定条件が成立せず、即ち、I
GSW5がONからOFFとなるとステップS107に
移行し、メインリレー制御処理としてメインリレー6が
所定のタイミングによりONからOFFとされること
で、定電圧電源回路12からの電源供給が遮断され、本
ルーチンを終了する。
After the process of step S106, the process returns to step S104 and the same process is repeatedly executed. Then, the determination condition of step S104 is not satisfied, that is, I
When the GSW 5 is switched from ON to OFF, the process proceeds to step S107, and the main relay 6 is switched from ON to OFF at a predetermined timing as main relay control processing, so that the power supply from the constant voltage power supply circuit 12 is cut off, and this routine is executed. To finish.

【0020】次に、本発明の実施の形態の一実施例にか
かるECU10のマイクロコンピュータ20内のCPU
21におけるシリアル通信起動の処理手順を示す図3及
び図4のフローチャートに基づき、図5のシリアル通信
起動時の処理タイミングを示すタイミングチャートを参
照して説明する。なお、図3の制御ルーチンはCPU2
1にて4ms毎の割込で繰返し実行され、図4の制御ル
ーチンはCPU21にて通信完了毎の割込で繰返し実行
される。
Next, the CPU in the microcomputer 20 of the ECU 10 according to an example of the embodiment of the present invention
Based on the flowcharts of FIGS. 3 and 4 showing the processing procedure for starting serial communication in FIG. 21, description will be made with reference to the timing chart of FIG. The control routine of FIG.
1 is repeatedly executed every 4 ms, and the control routine of FIG. 4 is repeatedly executed by the CPU 21 at every communication completion.

【0021】図3において、ステップS201では、始
動完了前であるかが判定される。ここでは、内燃機関の
機関回転数NEが所定回転数未満であるか、具体的には
図5(a)に示す始動完了フラグが始動完了前を示す
「0」であるかが判定される。ステップS201の判定
条件が成立せず、即ち、内燃機関の機関回転数NEが所
定回転数以上であるとき、具体的には始動完了フラグが
「1」であるときにはステップS202に移行し、図5
(c)のシリアル通信ラインに示すA/F−IC15と
の通信起動処理が実行されたのち、本ルーチンを終了す
る。
In FIG. 3, in step S201, it is determined whether or not the start is completed. Here, it is determined whether the engine speed NE of the internal combustion engine is less than a predetermined speed, or specifically, whether the start completion flag shown in FIG. 5A is "0" indicating that the start is not completed. When the determination condition of step S201 is not satisfied, that is, when the engine speed NE of the internal combustion engine is equal to or higher than the predetermined speed, specifically, when the start completion flag is "1", the process proceeds to step S202, and FIG.
After the communication starting process with the A / F-IC 15 shown in the serial communication line of (c) is executed, this routine is ended.

【0022】一方、ステップS201の判定条件が成
立、即ち、内燃機関の機関回転数NEが所定回転数未満
であるとき、具体的には始動完了フラグが「0」で始動
時であるときにはステップS203に移行し、8msタ
イミングであるかが判定される。ステップS203の判
定条件が成立、即ち、8msタイミングであるときには
ステップS204に移行し、図5(c)のシリアル通信
ラインに示すKCS−IC14との通信起動処理が実行
されたのち、本ルーチンを終了する。一方、ステップS
203の判定条件が成立せず、即ち、8msタイミング
でないときにはステップS205に移行し、図5(c)
のシリアル通信ラインに示すEEPROM16との後述
の通信起動処理が実行されたのち、本ルーチンを終了す
る。
On the other hand, when the determination condition of step S201 is satisfied, that is, when the engine speed NE of the internal combustion engine is less than the predetermined speed, specifically, when the start completion flag is "0" and the engine is being started, step S203 is performed. Then, it is determined whether the timing is 8 ms. When the determination condition of step S203 is satisfied, that is, when the timing is 8 ms, the process proceeds to step S204, the communication starting process with the KCS-IC 14 shown in the serial communication line of FIG. 5C is executed, and then this routine ends. To do. On the other hand, step S
When the determination condition of 203 is not satisfied, that is, when the timing is not 8 ms, the process proceeds to step S205, and FIG.
After a communication start-up process, which will be described later, with the EEPROM 16 indicated by the serial communication line is executed, this routine is ended.

【0023】次に、図4において、ステップS301で
は、A/F−IC15との通信による割込であるかが判
定される。ステップS301の判定条件が成立、即ち、
A/F−IC15との通信による割込であるときにはス
テップS302に移行し、A/F−IC15との受信処
理が実行される。次にステップS303に移行して、A
/F−IC15との通信が完了しているかが判定され
る。ステップS303の判定条件が成立せず、即ち、A
/F−IC15との通信が未だ完了していないときには
ステップS304に移行し、A/F−IC15との次の
通信データがセットされ通信起動されたのち、本ルーチ
ンを終了する。
Next, in FIG. 4, in step S301, it is determined whether or not the interrupt is due to communication with the A / F-IC 15. The determination condition of step S301 is satisfied, that is,
If it is an interrupt by communication with the A / F-IC 15, the process proceeds to step S302, and a reception process with the A / F-IC 15 is executed. Then, the process proceeds to step S303 and A
It is determined whether the communication with the / F-IC15 is completed. The determination condition of step S303 is not satisfied, that is, A
If the communication with the / F-IC15 is not completed yet, the process proceeds to step S304, the next communication data with the A / F-IC15 is set, the communication is started, and then this routine ends.

【0024】一方、ステップS301の判定条件が成立
せず、即ち、A/F−IC15との通信による割込でな
いとき、またはステップS303の判定条件が成立、即
ち、A/F−IC15との通信が完了しているときには
ステップS305に移行し、8msタイミングであるか
が判定される。ステップS305の判定条件が成立、即
ち、8msタイミングであるときにはステップS306
に移行し、KCS−IC14との通信による割込である
かが判定される。ステップS306の判定条件が成立、
即ち、KCS−IC14との通信による割込であるとき
にはステップS307に移行し、KCS−IC14との
受信処理が実行される。次にステップS308に移行し
て、KCS−IC14との通信が完了しているかが判定
される。ステップS308の判定条件が成立せず、即
ち、KCS−IC14との通信が未だ完了していないと
きにはステップS309に移行し、KCS−IC14と
の次の通信データがセットされ通信起動されたのち、本
ルーチンを終了する。
On the other hand, when the determination condition of step S301 is not satisfied, that is, when it is not an interrupt by communication with the A / F-IC 15, or when the determination condition of step S303 is satisfied, that is, communication with the A / F-IC 15 is performed. Is completed, the process proceeds to step S305, and it is determined whether the timing is 8 ms. When the determination condition of step S305 is satisfied, that is, when the timing is 8 ms, step S306
Then, it is determined whether the interruption is due to communication with the KCS-IC 14. The determination condition of step S306 is satisfied,
That is, when the interrupt is due to communication with the KCS-IC 14, the process proceeds to step S307, and the receiving process with the KCS-IC 14 is executed. Next, the process proceeds to step S308, and it is determined whether the communication with the KCS-IC 14 is completed. When the determination condition of step S308 is not satisfied, that is, when the communication with the KCS-IC14 is not yet completed, the process proceeds to step S309, the next communication data with the KCS-IC14 is set, and the communication is started, then Exit the routine.

【0025】一方、ステップS305の判定条件が成立
せず、即ち、8msタイミングでないとき、またはステ
ップS306の判定条件が成立せず、即ち、KCS−I
C14との通信による割込でないとき、またはステップ
S308の判定条件が成立、即ち、KCS−IC14と
の通信が完了しているときにはステップS310に移行
し、EEPROM16との通信起動処理が実行されたの
ち、本ルーチンを終了する。
On the other hand, when the determination condition of step S305 is not satisfied, that is, when the timing is not 8 ms, or when the determination condition of step S306 is not satisfied, that is, KCS-I.
When it is not an interrupt by communication with C14, or when the determination condition of step S308 is satisfied, that is, when communication with KCS-IC14 is completed, the process proceeds to step S310, and after communication start processing with EEPROM 16 is executed. , This routine ends.

【0026】次に、本発明の実施の形態の一実施例にか
かるECU10のマイクロコンピュータ20内のCPU
21におけるEEPROM16に書込むための通信用バ
ッファTEPBUFへの転送の処理手順を示す図6のフ
ローチャートに基づき、図7を参照して説明する。ここ
で、図7は通信用バッファTEPBUFを示す構成図で
ある。なお、図6の制御ルーチンはCPU21にてベー
ス処理毎に繰返し実行される。
Next, the CPU in the microcomputer 20 of the ECU 10 according to an example of the embodiment of the present invention
A description will be given with reference to FIG. 7 based on a flowchart of FIG. 6 showing a processing procedure of transfer to the communication buffer TEPBUF for writing in the EEPROM 16 in 21. Here, FIG. 7 is a configuration diagram showing the communication buffer TEPBUF. The control routine of FIG. 6 is repeatedly executed by the CPU 21 for each base process.

【0027】図6において、ステップS401ではEE
PROM16に格納されるRAM値が更新されたかが判
定される。ここで、EEPROM16に格納されるRA
M値としては、学習値であったり、仕向情報のような外
部通信装置(図示略)により書込まれるデータである。
ステップS401の判定条件が成立せず、即ち、EEP
ROM16に格納されるRAM値が更新されていないと
きには、何もすることなく本ルーチンを終了する。一
方、ステップS401の判定条件が成立、即ち、EEP
ROM16に格納されるRAM値が更新されているとき
にはステップS402に移行し、更新されたRAM23
のサイズ(2n)がサイズAとしてセットされる。次に
ステップS403に移行して、図7に示す通信用バッフ
ァTEPBUFに対してEEPROM16に書込むため
の(書込コマンド+アドレス)が格納される(2byt
e分)。次にステップS404に移行して、図7に示す
通信用バッファTEPBUFに対してEEPROM16
に書込むための2つのRAM値が格納される(2byt
e分)。
In FIG. 6, in step S401, EE
It is determined whether the RAM value stored in the PROM 16 has been updated. Here, the RA stored in the EEPROM 16
The M value is a learning value or data such as destination information written by an external communication device (not shown).
The determination condition of step S401 is not satisfied, that is, EEP
When the RAM value stored in the ROM 16 has not been updated, this routine ends without doing anything. On the other hand, the determination condition of step S401 is satisfied, that is, EEP
When the RAM value stored in the ROM 16 is updated, the process proceeds to step S402, and the updated RAM 23
(2n) is set as the size A. Next, the process proceeds to step S403, and (write command + address) for writing in the EEPROM 16 is stored in the communication buffer TEPBUF shown in FIG. 7 (2 byte).
e minutes). Next, the process proceeds to step S404, and the EEPROM 16 is added to the communication buffer TEPBUF shown in FIG.
Two RAM values for writing to (2 byte)
e minutes).

【0028】次にステップS405に移行して、割込禁
止として通信起動の割込が入らないようにされる。次に
ステップS406に移行して、通信用バッファTEPB
UFの書込み先頭アドレスを示すベース用ポインタPE
EPTがステップS403及びステップS404の分と
して「+4」インクリメントされる。次にステップS4
07に移行して、RAM23のための通信用バッファT
EPBUFのバッファサイズ値を示すバッファスタック
SZEPTがステップS403及びステップS404の
分として「+4」インクリメントされる。なお、このと
きのMAXガードとしては通信用バッファTEPBUF
のサイズとし、それを越えた分はスタックしないように
される。
Next, the process proceeds to step S405, and the interrupt for communication activation is prohibited so that the interrupt is prohibited. Next, the process proceeds to step S406, and the communication buffer TEPB
Base pointer PE indicating the write start address of UF
The EPT is incremented by "+4" as the amount of step S403 and step S404. Then step S4
Moving to 07, the communication buffer T for the RAM 23
The buffer stack SZEPT indicating the buffer size value of EPBUF is incremented by "+4" as the amount for steps S403 and S404. Note that the communication buffer TEPBUF is used as the MAX guard at this time.
The size is set, and the amount beyond that will not be stacked.

【0029】次にステップS408に移行して、割込解
除としてステップS405による割込禁止が解除され
る。次にステップS409に移行して、ステップS50
2でセットされたサイズAから通信用バッファTEPB
UFに格納されたサイズ(2byte分)が減算され
る。次にステップS410に移行して、サイズAが
「0」であるかが判定される。ステップS410の判定
条件が成立せず、即ち、サイズAが「0」でないときに
はステップS403に戻り、同様の処理が繰返される。
そして、ステップS410の判定条件が成立、即ち、サ
イズAが「0」となり通信用バッファTEPBUFへの
格納が全て完了すると、本ルーチンを終了する。
Next, the process proceeds to step S408, and the interrupt prohibition in step S405 is released as an interrupt release. Then, the process proceeds to step S409, and step S50
Communication buffer TEPB from size A set in 2
The size (for 2 bytes) stored in the UF is subtracted. Next, the process proceeds to step S410, and it is determined whether the size A is "0". When the determination condition of step S410 is not satisfied, that is, when the size A is not "0", the process returns to step S403 and the same process is repeated.
Then, when the determination condition of step S410 is satisfied, that is, when the size A becomes “0” and the storage in the communication buffer TEPBUF is completed, this routine is ended.

【0030】次に、図3のステップS205及び図4ス
テップS310の通信起動処理におけるEEPROM1
6への通信要求の処理手順を示す図8のフローチャート
に基づき、図7の通信用バッファTEPBUF構成を参
照して説明する。なお、図8の制御ルーチンはCPU2
1にて4ms毎の割込または通信完了毎の割込にて繰返
し実行される。
Next, the EEPROM 1 in the communication starting process of step S205 of FIG. 3 and step S310 of FIG.
The communication buffer TEPBUF configuration of FIG. 7 will be described with reference to the flowchart of FIG. The control routine of FIG.
It is repeatedly executed at 1 every 4 ms or every communication completion.

【0031】図8において、ステップS501で、RA
M23のための通信用バッファTEPBUFのバッファ
サイズ値を示すバッファスタックSZEPTが「0」で
あるかが判定される。ステップS501の判定条件が成
立、即ち、バッファスタックSZEPTが「0」であり
通信用バッファTEPBUFに書込データが格納されて
いないときには何もすることなく本ルーチンを終了す
る。一方、ステップS501の判定条件が成立せず、即
ち、バッファスタックSZEPTが「0」でなく通信用
バッファTEPBUFに書込データが格納されていると
きにはステップS502に移行し、シリアル通信を開始
するために必要なレジスタ値が設定される。次にステッ
プS503に移行して、割込用ポインタPTEPTの示
す通信用バッファTEPBUFの2byte分が通信デ
ータレジスタSPDRにセットされる。ここで、割込用
ポインタPTEPTは通信用バッファTEPBUFより
読出す値の先頭アドレスを示すものである。次にステッ
プS504に移行して、通信用バッファTEPBUFの
アドレスを示す割込用ポインタPTEPTが2byte
分加算される。即ち、割込用ポインタPTEPTの示す
通信データ2byte分が通信データレジスタSPDR
にセットされたため、次回に備え2byte分ポインタ
が進められる。次にステップS505に移行して、バッ
ファスタックSZEPTが2byte分減算される。次
にステップS506に移行して、シリアル通信が起動さ
れたのち本ルーチンを終了する。
In FIG. 8, in step S501, RA
It is determined whether the buffer stack SZEPT indicating the buffer size value of the communication buffer TEPBUF for M23 is "0". When the determination condition of step S501 is satisfied, that is, when the buffer stack SZEPT is "0" and the write data is not stored in the communication buffer TEPBUF, this routine is ended without doing anything. On the other hand, when the determination condition of step S501 is not satisfied, that is, when the buffer stack SZEPT is not "0" and the write data is stored in the communication buffer TEPBUF, the process proceeds to step S502 to start the serial communication. The required register value is set. Next, proceeding to step S503, 2 bytes of the communication buffer TEPBUF indicated by the interrupt pointer PTEPT are set in the communication data register SPDR. Here, the interrupt pointer PTEPT indicates the start address of the value read from the communication buffer TEPBUF. Next, the process proceeds to step S504, and the interrupt pointer PTEPT indicating the address of the communication buffer TEPBUF is 2 bytes.
The minutes are added. That is, 2 bytes of communication data indicated by the interrupt pointer PTEPT is equal to the communication data register SPDR.
Since it is set to, the pointer is advanced by 2 bytes for the next time. Next, the process proceeds to step S505, and the buffer stack SZEPT is subtracted by 2 bytes. Next, the routine proceeds to step S506, where the serial communication is activated and then this routine is ended.

【0032】このように、本実施例のECU10は、シ
リアル通信モジュール25を有するマイクロコンピュー
タ20と、マイクロコンピュータ20とシリアル通信ラ
イン17を介して接続される書換可能な不揮発性メモリ
としてのEEPROM16と、EEPROM16とシリ
アル通信ライン17を介して並列に接続される入出力モ
ジュールとしてのKCS−IC14、A/F−IC15
と、EEPROM16に対する送信データを一時的に蓄
える通信用バッファTEPBUFを有するRAM23と
を具備し、マイクロコンピュータ20はKCS−IC1
4、A/F−IC15と所定のタイミング(8ms,4
ms)毎に通信を行うと共に、KCS−IC14、A/
F−IC15と通信を実行していないタイミングにて通
信用バッファTEPBUFの内容を確認し、通信用バッ
ファTEPBUFに送信データが蓄えられているときに
はシリアル通信ライン17を介してEEPROM16と
の通信を実行するものである。また、本実施例のECU
10は、マイクロコンピュータ20が通信用バッファT
EPBUFに送信データが蓄えられているときには、そ
の蓄えられている全ての送信データが通信完了するまで
EEPROM16との通信を継続して実行するものであ
る。そして、本実施例のECU10は、マイクロコンピ
ュータ20がKCS−IC14、A/F−IC15との
通信が完了した直後に通信用バッファTEPBUFの内
容を確認するものである。
As described above, the ECU 10 of this embodiment includes the microcomputer 20 having the serial communication module 25, the EEPROM 16 as the rewritable nonvolatile memory connected to the microcomputer 20 via the serial communication line 17, and KCS-IC14 and A / F-IC15 as input / output modules connected in parallel via the EEPROM 16 and the serial communication line 17.
And a RAM 23 having a communication buffer TEPBUF for temporarily storing transmission data for the EEPROM 16, and the microcomputer 20 uses the KCS-IC1.
4, A / F-IC15 and predetermined timing (8ms, 4
ms) and communication with the KCS-IC14, A /
The contents of the communication buffer TEPBUF are confirmed at the timing when communication with the F-IC 15 is not executed, and when transmission data is stored in the communication buffer TEPBUF, communication with the EEPROM 16 is executed via the serial communication line 17. It is a thing. Further, the ECU of the present embodiment
10, the microcomputer 20 has a communication buffer T
When the transmission data is stored in the EPBUF, the communication with the EEPROM 16 is continuously executed until the communication of all the stored transmission data is completed. The ECU 10 of this embodiment checks the contents of the communication buffer TEPBUF immediately after the microcomputer 20 completes the communication with the KCS-IC 14 and the A / F-IC 15.

【0033】したがって、本実施例のECU10ではマ
イクロコンピュータ20によりEEPROM16に対す
る送信データがRAM23の通信用バッファTEPBU
Fに蓄えられ、送信データが蓄えられているときにはそ
の内容が確認され、KCS−IC14、A/F−IC1
5との通信が実行されていないときには4ms毎の割込
によるEEPROM16への通信が全ての送信データが
完了するまで継続して実行される。一方、KCS−IC
14またはA/F−IC15との通信が実行されている
ときには、KCS−IC14またはA/F−IC15と
の通信が完了すると直ちに通信用バッファTEPBUF
の内容が確認され、その通信完了割込によってEEPR
OM16への通信が全ての送信データが完了するまで継
続して実行される。このため、ECU10の通常制御中
においてKCS−IC14またはA/F−IC15との
通信の空き時間を利用して随時、更新データがEEPR
OM16に書込処理されることでEEPROM16への
書込処理に余分な時間を費やすことがなく、電源電圧+
Bの瞬断等があってもそれまでの更新データをEEPR
OM16に確実に反映することができる。
Therefore, in the ECU 10 of the present embodiment, the transmission data for the EEPROM 16 is sent by the microcomputer 20 to the communication buffer TEPBU of the RAM 23.
When the transmission data is stored in the F, the content is confirmed, and the KCS-IC14, A / F-IC1
When communication with 5 is not executed, communication with the EEPROM 16 by interruption every 4 ms is continuously executed until all transmission data is completed. On the other hand, KCS-IC
14 or the A / F-IC 15 is being executed, the communication buffer TEPBUF is immediately sent when the communication with the KCS-IC 14 or the A / F-IC 15 is completed.
Is confirmed, and EEPR is generated by the communication completion interrupt.
The communication to the OM 16 is continuously executed until all the transmission data are completed. For this reason, during the normal control of the ECU 10, the update data is updated at any time by utilizing the idle time of communication with the KCS-IC 14 or the A / F-IC 15.
By performing the writing process in the OM16, the extra time is not spent in the writing process in the EEPROM 16, and the power supply voltage +
Even if there is a momentary interruption of B, the updated data up to that time is EEPR
It can be surely reflected in the OM16.

【0034】次に、本発明の実施の形態の一実施例にか
かるECU10のマイクロコンピュータ20内のCPU
21におけるシリアル通信起動の処理手順の変形例を示
す図9及び図10のフローチャートに基づき、図5のタ
イミングチャートを参照して説明する。なお、図9の制
御ルーチンはCPU21にて4ms毎の割込で繰返し実
行され、図10の制御ルーチンはCPU21にて通信完
了毎の割込で繰返し実行される。
Next, the CPU in the microcomputer 20 of the ECU 10 according to an example of the embodiment of the present invention
Based on the flowcharts of FIGS. 9 and 10 showing the modification of the processing procedure of the serial communication activation in No. 21, it will be described with reference to the timing chart of FIG. The control routine of FIG. 9 is repeatedly executed by the CPU 21 at every 4 ms interruption, and the control routine of FIG. 10 is repeatedly executed by the CPU 21 at every interruption of communication.

【0035】図9において、ステップS601〜ステッ
プS605は、上述の実施例における図3のステップS
201〜ステップS205と同様であるため、その説明
を省略する。ステップS605の処理ののちステップS
606に移行し、送信されるべき書込データ部分の存在
を表すフラグXDATAが「1」とされたのち、本ルー
チンを終了する。
In FIG. 9, steps S601 to S605 are the steps of FIG. 3 in the above embodiment.
Since it is similar to steps 201 to S205, description thereof will be omitted. After the processing of step S605, step S
After shifting to 606 and setting the flag XDATA indicating the existence of the write data portion to be transmitted to "1", this routine is ended.

【0036】次に、図10において、ステップS701
〜ステップS709は、上述の実施例における図4のス
テップS301〜ステップS309と同様であるため、
その説明を省略する。ステップS710では、EEPR
OM16との通信による割込であるかが判定される。ス
テップS710の判定条件が成立せず、即ち、EEPR
OM16との通信による割込でないときにはステップS
711に移行し、EEPROM16との通信処理が実行
される。ここでは、最初の2byte分である(書込コ
マンド+アドレス)が送信される。次にステップS71
2に移行して、送信されるべき書込データ部分の存在を
表すフラグXDATAが「1」とされたのち本ルーチン
を終了する。
Next, in FIG. 10, step S701.
Since step S709 is the same as step S301 to step S309 of FIG. 4 in the above-described embodiment,
The description is omitted. In step S710, EEPR
It is determined whether the interrupt is due to communication with the OM 16. The determination condition of step S710 is not satisfied, that is, EEPR
If it is not an interrupt by communication with the OM16, step S
Then, the processing shifts to 711, and the communication processing with the EEPROM 16 is executed. Here, (write command + address) corresponding to the first 2 bytes is transmitted. Then in step S71
After shifting to 2, the flag XDATA indicating the existence of the write data portion to be transmitted is set to "1", and then this routine is ended.

【0037】一方、ステップS710の判定条件が成
立、即ち、EEPROM16との通信による割込である
ときにはステップS713に移行し、書込データ部分送
信タイミングがON、かつフラグXDATAが「1」で
あるかが判定される。ステップS713の判定条件が成
立、即ち、EEPROM16への書込データ部分送信タ
イミングであり、かつ送信されるべき書込データ部分が
あるときにはステップS714に移行し、EEPROM
16への書込データ部分の送信処理としてステップS7
11の(書込コマンド+アドレス)に続く次の2byt
e(RAM値)分が送信されEEPROM16への書込
みが実行されたのち、本ルーチンを終了する。
On the other hand, if the determination condition in step S710 is satisfied, that is, if the interrupt is due to communication with the EEPROM 16, the process proceeds to step S713, the write data partial transmission timing is ON, and the flag XDATA is "1". Is determined. If the determination condition of step S713 is satisfied, that is, it is the write data portion transmission timing to the EEPROM 16 and there is the write data portion to be transmitted, the process proceeds to step S714, and the EEPROM
Step S7 as the transmission processing of the write data portion to 16
Next 2 bytes following 11 (write command + address)
After e (RAM value) has been transmitted and writing to the EEPROM 16 has been executed, this routine is ended.

【0038】次に、図9のステップS605及び図10
のステップS711の通信起動処理におけるEEPRO
M16への通信要求、ステップS714におけるEEP
ROM16への書込データ部分送信の処理手順を示す図
11のフローチャートに基づいて説明する。
Next, step S605 of FIG. 9 and FIG.
EEPRO in the communication starting process of step S711 of
Communication request to M16, EEP in step S714
An explanation will be given based on the flowchart of FIG. 11 showing the processing procedure of partial transmission of write data to the ROM 16.

【0039】図11において、ステップS801〜ステ
ップS805は、上述の実施例における図8のステップ
S501からステップS505と同様であるため、その
説明を省略する。ステップS805の処理ののちステッ
プS806に移行し、書込データ部分送信タイミングが
OFF、かつフラグXDATAが「0」とされる。次に
ステップS807に移行して、シリアル通信が起動され
たのち本ルーチンを終了する。
In FIG. 11, steps S801 to S805 are the same as steps S501 to S505 of FIG. 8 in the above-mentioned embodiment, and therefore the description thereof will be omitted. After the process of step S805, the process shifts to step S806, the write data partial transmission timing is OFF, and the flag XDATA is set to "0". Next, the routine proceeds to step S807, where the serial communication is activated and then this routine is ended.

【0040】このように、本変形例のECU10は、シ
リアル通信モジュール25を有するマイクロコンピュー
タ20と、マイクロコンピュータ20とシリアル通信ラ
イン17を介して接続される書換可能な不揮発性メモリ
としてのEEPROM16と、EEPROM16とシリ
アル通信ライン17を介して並列に接続される入出力モ
ジュールとしてのKCS−IC14、A/F−IC15
と、EEPROM16に対する送信データを一時的に蓄
える通信用バッファTEPBUFを有するRAM23と
を具備し、マイクロコンピュータ20はKCS−IC1
4、A/F−IC15と所定のタイミング(8ms,4
ms)毎に通信を行うと共に、KCS−IC14、A/
F−IC15と通信を実行していないタイミングにて通
信用バッファTEPBUFの内容を確認し、通信用バッ
ファTEPBUFに送信データが蓄えられているときに
はシリアル通信ライン17を介してEEPROM16と
の通信を実行するものである。また、本変形例のECU
10は、マイクロコンピュータ20が通信用バッファT
EPBUFに送信データが蓄えられているときには、そ
の蓄えられている送信データの一定量ずつEEPROM
16との通信を継続して実行するものである。そして、
本変形例のECU10は、マイクロコンピュータ20が
KCS−IC14、A/F−IC15との通信が完了し
た直後に通信用バッファTEPBUFの内容を確認する
ものである。
As described above, the ECU 10 of the present modification has the microcomputer 20 having the serial communication module 25, the EEPROM 16 as the rewritable nonvolatile memory connected to the microcomputer 20 via the serial communication line 17, and KCS-IC14 and A / F-IC15 as input / output modules connected in parallel via the EEPROM 16 and the serial communication line 17.
And a RAM 23 having a communication buffer TEPBUF for temporarily storing transmission data for the EEPROM 16, and the microcomputer 20 uses the KCS-IC1.
4, A / F-IC15 and predetermined timing (8ms, 4
ms) and communication with the KCS-IC14, A /
The contents of the communication buffer TEPBUF are confirmed at the timing when communication with the F-IC 15 is not executed, and when transmission data is stored in the communication buffer TEPBUF, communication with the EEPROM 16 is executed via the serial communication line 17. It is a thing. Further, the ECU of this modification
10, the microcomputer 20 has a communication buffer T
When the transmission data is stored in the EPBUF, the EEPROM stores a fixed amount of the transmission data.
The communication with 16 is continuously executed. And
The ECU 10 of this modification confirms the contents of the communication buffer TEPBUF immediately after the microcomputer 20 completes the communication with the KCS-IC 14 and the A / F-IC 15.

【0041】したがって、本変形例のECU10ではマ
イクロコンピュータ20によりEEPROM16に対す
る送信データがRAM23の通信用バッファTEPBU
Fに蓄えられ、送信データが蓄えられているときにはそ
の内容が確認され、KCS−IC14、A/F−IC1
5との通信が実行されていないときには4ms毎の割込
によるEEPROM16への通信が送信データの一定量
ずつ実行される。一方、KCS−IC14またはA/F
−IC15との通信が実行されているときには、KCS
−IC14またはA/F−IC15との通信が完了する
と直ちに通信用バッファTEPBUFの内容が確認さ
れ、その通信完了割込によってEEPROM16への通
信が送信データの一定量ずつ実行される。このため、E
CU10の通常制御中においてKCS−IC14または
A/F−IC15との通信の空き時間を利用して随時、
更新データがEEPROM16に書込処理されることで
EEPROM16への書込処理に余分な時間を費やすこ
とがなく、電源電圧+Bの瞬断等があってもそれまでの
更新データをEEPROM16に確実に反映することが
できる。また、EEPROM16への通信が送信データ
の一定量ずつ実行されることで、KCS−IC14また
はA/F−IC15との通信によるECU10の通常制
御への影響をなくすことができる。
Therefore, in the ECU 10 of the present modification, the transmission data for the EEPROM 16 is sent by the microcomputer 20 to the communication buffer TEPBU of the RAM 23.
When the transmission data is stored in the F, the content is confirmed, and the KCS-IC14, A / F-IC1
When communication with 5 is not executed, communication to the EEPROM 16 by interruption every 4 ms is executed for each fixed amount of transmission data. On the other hand, KCS-IC14 or A / F
-When communication with the IC15 is in progress, KCS
-When the communication with the IC 14 or the A / F-IC 15 is completed, the content of the communication buffer TEPBUF is confirmed immediately, and the communication to the EEPROM 16 is executed by a fixed amount by the communication completion interrupt. Therefore, E
During the normal control of the CU 10, at any time using the idle time of communication with the KCS-IC 14 or the A / F-IC 15,
Since the update data is written to the EEPROM 16, no extra time is spent on the writing process to the EEPROM 16, and the update data up to that point is surely reflected in the EEPROM 16 even if the power supply voltage + B is interrupted. can do. In addition, the communication to the EEPROM 16 is executed for each fixed amount of transmission data, so that it is possible to eliminate the influence of the communication with the KCS-IC 14 or the A / F-IC 15 on the normal control of the ECU 10.

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

【図1】 図1は本発明の実施の形態の一実施例にかか
るECUの全体構成を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of an ECU according to an example of an embodiment of the present invention.

【図2】 図2は本発明の実施の形態の一実施例にかか
るECUのマイクロコンピュータ内のCPUにおける制
御全体の概略的な処理手順を示すフローチャートであ
る。
FIG. 2 is a flowchart showing a schematic processing procedure of overall control in a CPU in a microcomputer of an ECU according to an example of an embodiment of the present invention.

【図3】 図3は本発明の実施の形態の一実施例にかか
るECUのマイクロコンピュータ内のCPUにおけるシ
リアル通信起動の処理手順を示すフローチャートであ
る。
FIG. 3 is a flowchart showing a processing procedure of serial communication activation in a CPU in a microcomputer of an ECU according to an embodiment of the present invention.

【図4】 図4は本発明の実施の形態の一実施例にかか
るECUのマイクロコンピュータ内のCPUにおけるシ
リアル通信起動の処理手順を示すフローチャートであ
る。
FIG. 4 is a flowchart showing a processing procedure for starting serial communication in a CPU in a microcomputer of an ECU according to an embodiment of the present invention.

【図5】 図5は本発明の実施の形態の一実施例にかか
るECUのマイクロコンピュータ内のCPUにおけるシ
リアル通信起動時の処理タイミングを示すタイミングチ
ャートである。
FIG. 5 is a timing chart showing processing timing at the time of starting serial communication in the CPU in the microcomputer of the ECU according to the example of the embodiment of the present invention.

【図6】 図6は本発明の実施の形態の一実施例にかか
るECUのマイクロコンピュータ内のCPUにおけるE
EPROMに書込むための通信用バッファへの転送の処
理手順を示すフローチャートである。
FIG. 6 is an E in a CPU in a microcomputer of an ECU according to an example of an embodiment of the present invention.
6 is a flowchart showing a processing procedure of transfer to a communication buffer for writing in an EPROM.

【図7】 図7は本発明の実施の形態の一実施例にかか
るECUで使用されているマイクロコンピュータのRA
M内の通信用バッファを示す構成図である。
FIG. 7 is an RA of a microcomputer used in an ECU according to an example of an embodiment of the present invention.
It is a block diagram which shows the communication buffer in M.

【図8】 図8は図3及び図4の通信起動処理における
EEPROMへの通信要求の処理手順を示すフローチャ
ートである。
FIG. 8 is a flowchart showing a processing procedure of a communication request to an EEPROM in the communication start processing of FIGS. 3 and 4.

【図9】 図9は本発明の実施の形態の一実施例にかか
るECUのマイクロコンピュータ内のCPUにおけるシ
リアル通信起動の処理手順の変形例を示すフローチャー
トである。
FIG. 9 is a flowchart showing a modified example of the processing procedure of serial communication activation in the CPU in the microcomputer of the ECU according to the embodiment of the present invention.

【図10】 図10は本発明の実施の形態の一実施例に
かかるECUのマイクロコンピュータ内のCPUにおけ
るシリアル通信起動の処理手順の変形例を示すフローチ
ャートである。
FIG. 10 is a flowchart showing a modified example of the processing procedure for starting serial communication in the CPU in the microcomputer of the ECU according to the embodiment of the present invention.

【図11】 図11は図9及び図10の通信起動処理に
おけるEEPROMへの通信要求、書込データ部分送信
の処理手順を示すフローチャートである。
FIG. 11 is a flowchart showing a processing procedure of a communication request to an EEPROM and a write data partial transmission in the communication start processing of FIGS. 9 and 10.

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

10 ECU(電子制御装置) 16 EEPROM(書換可能な不揮発性メモリ) 17 シリアル通信ライン 20 マイクロコンピュータ 14 KCS−IC(ノック判定用IC)(入出力モジ
ュール) 15 A/F−IC(A/F検出用IC)(入出力モジ
ュール) 23 RAM(通信用バッファTEPBUF) 25 シリアル通信モジュール
10 ECU (electronic control unit) 16 EEPROM (rewritable nonvolatile memory) 17 serial communication line 20 microcomputer 14 KCS-IC (knock determination IC) (input / output module) 15 A / F-IC (A / F detection) IC) (input / output module) 23 RAM (communication buffer TEPBUF) 25 serial communication module

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 少なくとも1つのシリアル通信モジュー
ルを有するマイクロコンピュータと、 前記マイクロコンピュータとシリアル通信ラインを介し
て接続される書換可能な不揮発性メモリと、 前記不揮発性メモリと前記シリアル通信ラインを介して
並列に接続される少なくとも1つの入出力モジュール
と、 前記不揮発性メモリに対する送信データを一時的に蓄え
るバッファ(Buffer:緩衝記憶域)とを具備し、 前記マイクロコンピュータは前記入出力モジュールと
グニッションスイッチがオンしている期間であって、
定のタイミング毎に通信を行うと共に、前記入出力モジ
ュールと通信を実行していないタイミングにて前記バッ
ファの内容を確認し、前記バッファに送信データが蓄え
られているときには前記シリアル通信ラインを介して前
記不揮発性メモリとの通信を実行することを特徴とする
車載用電子制御装置。
1. A microcomputer having at least one serial communication module, a rewritable nonvolatile memory connected to the microcomputer via a serial communication line, and a nonvolatile memory via the serial communication line. at least one input and output modules are connected in parallel, the non-volatile temporary store buffer the transmission data to the memory (buffer: buffer storage); and a, the microcomputer the output module and Lee
While the ignition switch is on , communication is performed at every predetermined timing, and the contents of the buffer are confirmed at the timing when communication with the input / output module is not performed, and the transmission data is stored in the buffer. Is stored, the communication with the non-volatile memory is executed via the serial communication line.
In-vehicle electronic control unit.
【請求項2】2. 前記マイクロコンピュータは、前記入出The microcomputer is the entry / exit
力モジュールとイグニッションスイッチがオンしているForce module and ignition switch are on
期間の所定時間毎に通信を行うことを特徴とする請求項The communication is performed every predetermined time of the period.
1に記載の車載用電子制御装置。1. The vehicle-mounted electronic control device according to 1.
【請求項3】 前記マイクロコンピュータは、前記バッ
ファに送信データが蓄えられているときには、その蓄え
られている全ての送信データが通信完了するまで前記不
揮発性メモリとの通信を継続して実行することを特徴と
する請求項1に記載の車載用電子制御装置。
3. The microcomputer, when transmission data is stored in the buffer, continuously communicates with the non-volatile memory until communication of all the stored transmission data is completed. The vehicle-mounted electronic control device according to claim 1.
【請求項4】 前記マイクロコンピュータは、前記バッ
ファに送信データが蓄えられているときには、その蓄え
られている送信データの一定量ずつ前記不揮発性メモリ
との通信を実行することを特徴とする請求項1に記載の
車載用電子制御装置。
Wherein said microcomputer, when the transmission data in the buffer is stored is, the claims and executes the communication with the non-volatile memory by a fixed amount of transmission data are the stored Described in 1.
In-vehicle electronic control unit.
【請求項5】 前記マイクロコンピュータは、前記入出
力モジュールとの通信が完了した直後に前記バッファの
内容を確認することを特徴とする請求項1乃至請求項4
の何れか1つに記載の車載用電子制御装置。
Wherein said microcomputer claims 1 to 4, characterized in that to check the contents of the buffer immediately after the communication with the input module is completed
The in- vehicle electronic control device according to any one of 1.
【請求項6】6. 少なくとも1つのシリアル通信モジューAt least one serial communication module
ルを有するマイクロコンピュータと、A microcomputer having a 前記マイクロコンピュータとシリアル通信ラインを介しVia the serial communication line with the microcomputer
て接続される書換可能な不揮発性メモリと、Rewritable non-volatile memory connected by 前記不揮発性メモリと前記シリアル通信ラインを介してVia the non-volatile memory and the serial communication line
並列に接続される少なくとも1つの入出力モジュールAt least one input / output module connected in parallel
と、When, 前記不揮発性メモリに対する送信データを一時的に蓄えTemporarily stores transmission data to the non-volatile memory
るバッファとを具備し、Equipped with a buffer, 前記マイクロコンピュータは前記入出力モジュールとのThe microcomputer and the input / output module
通信が完了した直後に前記バッファの内容を確認し、前Check the contents of the buffer immediately after the communication is completed, and
記バッファに送信データが蓄えられているときには前記When transmission data is stored in the buffer,
シリアル通信ラインを介して前記不揮発性メモリとの通Communication with the nonvolatile memory is made via a serial communication line.
信を実行することを特徴とする車載用電子制御装置。A vehicle-mounted electronic control device characterized by executing a communication.
JP26376598A 1998-09-18 1998-09-18 Automotive electronic control unit Expired - Fee Related JP3494031B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26376598A JP3494031B2 (en) 1998-09-18 1998-09-18 Automotive electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26376598A JP3494031B2 (en) 1998-09-18 1998-09-18 Automotive electronic control unit

Publications (2)

Publication Number Publication Date
JP2000101655A JP2000101655A (en) 2000-04-07
JP3494031B2 true JP3494031B2 (en) 2004-02-03

Family

ID=17393980

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26376598A Expired - Fee Related JP3494031B2 (en) 1998-09-18 1998-09-18 Automotive electronic control unit

Country Status (1)

Country Link
JP (1) JP3494031B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4767278B2 (en) * 2008-04-15 2011-09-07 三菱電機株式会社 In-vehicle electronic control unit

Also Published As

Publication number Publication date
JP2000101655A (en) 2000-04-07

Similar Documents

Publication Publication Date Title
JP3505760B2 (en) Vehicle self-diagnosis device
US6898490B2 (en) Vehicle controller for controlling rewriting data in a nonvolatile memory
EP0631213B1 (en) Vehicle diagnosis system
JP4135220B2 (en) Electronic control device for vehicle
EP1600981B1 (en) Stored data rewriting system for on-board control unit
JP2009248804A (en) Electronic control apparatus and vehicle control system
US6405279B1 (en) Apparatus and method for controlling rewriting of data into nonvolatile memory
JP3726295B2 (en) Vehicle control device
JP2000045858A (en) Rewriting number storing method for electronic control unit and non-volatile memory
JP2007206827A (en) Electronic control unit, and method for generating program for controlling on-vehicle device
US20090164096A1 (en) Method of controlling an air supply of an internal combustion engine
JP3494031B2 (en) Automotive electronic control unit
JPH11223578A (en) Vehicle diagnosing system
US8832537B2 (en) Information management apparatus and information managing method
JP3549712B2 (en) Method of writing data into memory of control device for vehicle and control device for vehicle
JP5287657B2 (en) VEHICLE CONTROL DEVICE AND ITS CONTROL METHOD
EP0973092A2 (en) Electronic control apparatus having rewritable nonvolatile memory
JP2002054495A (en) Electronic control device
JP3752009B2 (en) Electronic control device for vehicle
JP3623481B2 (en) Vehicle control apparatus for controlling rewriting of nonvolatile memory
JP2000257502A (en) Electronic controller for automobile
JP4265026B2 (en) Serial communication controller
JP2634598B2 (en) Electronic control unit for internal combustion engine
JP2018072921A (en) On-vehicle electronic control device
JPH05173935A (en) Data transfer method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101121

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111121

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111121

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121121

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees