JP4554645B2 - Electronic control device and data communication method thereof - Google Patents

Electronic control device and data communication method thereof Download PDF

Info

Publication number
JP4554645B2
JP4554645B2 JP2007166591A JP2007166591A JP4554645B2 JP 4554645 B2 JP4554645 B2 JP 4554645B2 JP 2007166591 A JP2007166591 A JP 2007166591A JP 2007166591 A JP2007166591 A JP 2007166591A JP 4554645 B2 JP4554645 B2 JP 4554645B2
Authority
JP
Japan
Prior art keywords
arithmetic processing
processing means
correction value
buffer
microcomputer
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
JP2007166591A
Other languages
Japanese (ja)
Other versions
JP2007299419A (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 Ten Ltd
Original Assignee
Denso Ten Ltd
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 Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2007166591A priority Critical patent/JP4554645B2/en
Publication of JP2007299419A publication Critical patent/JP2007299419A/en
Application granted granted Critical
Publication of JP4554645B2 publication Critical patent/JP4554645B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、複数の演算処理手段を備え、前記複数の演算処理手段の各々が入出力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信する電子制御装置およびそのデータ通信方法に関し、特に、簡易な構成で複数の演算処理手段を高速に起動する電子制御装置およびそのデータ通信方法に関するものである。 The present invention includes a plurality of arithmetic processing means, and one of the plurality of arithmetic processing means reads out a correction value used by each of the plurality of arithmetic processing means for correction of the input / output signal from the storage means. More particularly, the present invention relates to an electronic control device that starts a plurality of arithmetic processing means at high speed with a simple configuration and a data communication method thereof .

近年、車両に電子制御機器(ECU)を搭載し、車両の運行時に必要な種々の処理を電子制御することが行われている。たとえばエンジンにおけるガソリンの噴出の制御にECUを適用し、速度センサや水温センサなどに接続することで、車両の速度やエンジンの冷却水の温度に応じてガソリンの噴出量を制御することができる。   In recent years, an electronic control device (ECU) is mounted on a vehicle to electronically control various processes necessary for the operation of the vehicle. For example, by applying an ECU to control the jet of gasoline in the engine and connecting it to a speed sensor, a water temperature sensor, or the like, the jet quantity of gasoline can be controlled in accordance with the speed of the vehicle or the temperature of engine coolant.

このECUでは、その内部に複数の演算処理手段(マイコン)を備えることで、高度な処理を安価なシステムで実現することができる。一方で、複数の演算処理手段を有するシステムでは、演算処理手段の間の協働を如何に効率化するかが重要である。   In this ECU, a plurality of arithmetic processing means (microcomputers) are provided therein, so that advanced processing can be realized with an inexpensive system. On the other hand, in a system having a plurality of arithmetic processing means, it is important how to improve the cooperation between the arithmetic processing means.

例えば、特許文献1に示されたマルチプロセッサシステムでは、副プロセッサよりも先に主プロセッサを起動させ、副プロセッサが起動するまでの規定時間内に、必要に応じて副プロセッサ用メモリに副プロセッサの起動プログラムを書き込むことにより、副プロセッサの暴走を回避する技術が開示されている。   For example, in the multiprocessor system disclosed in Patent Document 1, the main processor is activated before the sub processor, and the sub processor memory is stored in the sub processor memory as needed within a specified time until the sub processor is activated. A technique for avoiding the runaway of the secondary processor by writing a startup program is disclosed.

また、特許文献2に示されたマルチプロセッサボードの立ち上げ方法では、複数の従処理装置からアクセス可能な共有の揮発性メモリに複数の従処理装置の初期プログラムを格納し、各従処理装置が同時または順次共有の揮発性メモリから初期プログラムをリードして初期処理をおこなうことで、初期プログラムを格納した読み出し専用の不揮発性メモリを不要としている。   In the multiprocessor board startup method disclosed in Patent Document 2, initial programs of a plurality of slave processing devices are stored in a shared volatile memory accessible from a plurality of slave processing devices. By reading the initial program from the simultaneously or sequentially shared volatile memory and performing the initial processing, the read-only nonvolatile memory storing the initial program is not necessary.

さらに、DMA(Direct Memory Access)などのシステム内の通信手段の高速化もシステム全体の効率化に有効である。たとえば、特許文献3は、転送制御条件、データ転送元アドレス、データ転送先アドレス、転送語数を含むデータ転送制御情報に従ってデータの境界を判定し、判定結果に基づいてデータの転送先又はデータのデータ転送元、転送語数を制御することにより、バッファの使用効率を向上する技術を開示している。   Furthermore, speeding up communication means in the system such as DMA (Direct Memory Access) is also effective for improving the efficiency of the entire system. For example, Patent Literature 3 determines a data boundary according to data transfer control information including a transfer control condition, a data transfer source address, a data transfer destination address, and the number of transfer words, and based on the determination result, the data transfer destination or data data A technique for improving the buffer usage efficiency by controlling the transfer source and the number of transfer words is disclosed.

また、特許文献4に示されたプリンタ装置では、プリントデータが転送中であるか否かによってホスト装置からの通信データの送信方法を変更することで共通バスを有効利用している。   Further, in the printer device disclosed in Patent Document 4, the common bus is effectively used by changing the transmission method of communication data from the host device depending on whether or not print data is being transferred.

特開2002−312334号公報JP 2002-31334 A 特開平8−87481号公報JP-A-8-87481 特開平5−289979号公報Japanese Patent Application Laid-Open No. 5-28979 特開2003−48345号公報JP 2003-48345 A

ところで、アナログデータが入力信号として入力されるECUでは、入力信号の補正を行う必要がある。具体的には、各ECUの電源ICは厳密には均一ではないので、電源ICの供給する電圧を基準として入力信号の評価を行うと、電源ICの出力ばらつきに依存する評価バラつきが生じる。そこで、入力信号の値を正確に評価するためには、電源ICの供給電圧のバラつきを補正する必要が生じるのである。   By the way, in an ECU in which analog data is input as an input signal, it is necessary to correct the input signal. Specifically, since the power supply IC of each ECU is not strictly uniform, when an input signal is evaluated based on the voltage supplied by the power supply IC, an evaluation variation depending on the output variation of the power supply IC occurs. Therefore, in order to accurately evaluate the value of the input signal, it is necessary to correct variations in the supply voltage of the power supply IC.

入力信号に対して行うべき補正量は電源ICに依存するので、ECUの組み立て時に補正値を決定し、EEPROM(Electrically Erasable and Programmable ROM)などの不揮発性の記憶媒体に格納しておく。そして、各演算処理手段(マイコンなど)の起動時にこの補正値を読み出して使用することで、入力信号の評価を正確に行うことができる。   Since the amount of correction to be performed on the input signal depends on the power supply IC, the correction value is determined when the ECU is assembled and stored in a nonvolatile storage medium such as an EEPROM (Electrically Erasable and Programmable ROM). And by reading out and using this correction value at the time of starting each arithmetic processing means (microcomputer etc.), evaluation of an input signal can be performed correctly.

ECUに複数の演算処理手段が存在する場合、各演算処理手段に専用の不揮発性記録媒体を設けることはコスト上昇と筐体の大型化に繋がるので、全ての演算処理手段が使用する補正値を一つの記憶媒体に格納しておき、演算処理手段の一つが補正値を読み出して他の演算処理手段に送信することが望ましい。   When there are a plurality of arithmetic processing means in the ECU, providing a dedicated non-volatile recording medium for each arithmetic processing means leads to an increase in cost and an increase in the size of the housing. It is desirable that the data is stored in one storage medium and one of the arithmetic processing means reads the correction value and transmits it to the other arithmetic processing means.

しかしながら、このように補正値を一つの記憶媒体に一元管理し、複数の演算処理手段に送信する構成では、各演算処理手段は補正値を受信するまでは入力信号を正しく処理できないこととなる。そのため、全ての演算処理手段が補正値を受信するまでECUを動作させなければ、起動時間が増大するという問題点が生じ、補正値の受信完了以前にECUを動作させたならば正確な入力信号を得られないことによる動作異常が発生するという問題点が生じていた。   However, in such a configuration in which correction values are centrally managed in one storage medium and transmitted to a plurality of calculation processing means, each calculation processing means cannot correctly process an input signal until the correction value is received. Therefore, if the ECU is not operated until all the arithmetic processing means receive the correction value, there is a problem that the start-up time increases. If the ECU is operated before the correction value reception is completed, an accurate input signal There has been a problem in that an abnormal operation occurs due to failure to obtain the desired value.

そこで、複数の演算処理手段を有し、補正の必要なアナログ信号を使用するECUにおいて、起動を高速化し、かつ正確・安全に動作させることが従来の重要な課題となっていた。   Therefore, it has been an important problem in the past to operate the ECU at a high speed and accurately and safely in an ECU having a plurality of arithmetic processing means and using an analog signal that needs to be corrected.

この発明は、上述した従来技術による課題を解決するためになされたものであり、高速に起動し、正確・安全に動作する電子制御装置およびそのデータ通信方法を提供することを目的とする。 SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems of the prior art, and an object thereof is to provide an electronic control device that starts at high speed and operates accurately and safely, and a data communication method therefor.

上述した課題を解決し、目的を達成するため、本発明にかかる電子制御装置は、複数の演算処理手段を備え、前記複数の演算処理手段の各々が入力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信する電子制御装置であって、前記複数の演算処理手段の各々は、前記複数の演算処理手段間で前記補正値の送受信を行う通信手段を備え、前記通信手段は、通信に用いられるバッファの構造に従ってデータの送信を行うもので、前記複数の演算処理手段の起動時に通信する際には、入力信号の補正に使用する補正値の送信を行ない、複数の演算処理手段の起動後に通信する際には、補正値とともに起動時では送信しないデータの送信を行なうものであり、通信に用いる前記バッファとして、前記複数の演算処理手段の起動時に通信する場合に用いる第1のバッファと、前記第1のバッファよりも容量が大きく、前記複数の演算処理手段の起動後に通信する場合に用いる第2のバッファとを設けており、起動時と起動後とで通信に用いるバッファを切り替えるIn order to solve the above-described problems and achieve the object, an electronic control device according to the present invention includes a plurality of arithmetic processing units , and each of the plurality of arithmetic processing units uses a correction value used for correcting an input signal, An electronic control device in which any one of the plurality of arithmetic processing means reads from the storage means and transmits to another arithmetic processing means, and each of the plurality of arithmetic processing means includes the correction between the plurality of arithmetic processing means. Communication means for transmitting and receiving values, wherein the communication means transmits data in accordance with the structure of a buffer used for communication, and corrects an input signal when communicating when starting the plurality of arithmetic processing means. the transmission of correction value used to perform, when the communication after starting the plural arithmetic processing means, at startup with correction values are those for transmission of data not transmitted, the server used for communication The first buffer used when communicating when the plurality of arithmetic processing means is activated and the second buffer having a larger capacity than the first buffer and used when communicating after activation of the plurality of arithmetic processing means. The buffer used for communication is switched between at startup and after startup .

本発明の発明によれば、電子制御装置は、複数の演算処理手段を備え、前記複数の演算処理手段の各々が入力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信する電子制御装置であって、前記複数の演算処理手段の各々は、前記複数の演算処理手段間で前記補正値の送受信を行う通信手段を備え、前記通信手段は、通信に用いられるバッファの構造に従ってデータの送信を行うもので、前記複数の演算処理手段の起動時に通信する際には、入力信号の補正に使用する補正値の送信を行ない、複数の演算処理手段の起動後に通信する際には、補正値とともに起動時では送信しないデータの送信を行なうものであり、通信に用いる前記バッファとして、前記複数の演算処理手段の起動時に通信する場合に用いる第1のバッファと、前記第1のバッファよりも容量が大きく、前記複数の演算処理手段の起動後に通信する場合に用いる第2のバッファとを設けており、起動時と起動後とで通信に用いるバッファを切り替えるので、高速に起動し、正確・安全に動作する電子制御装置およびそのデータ通信方法を得ることができるという効果を奏する。 According to the invention of the present invention, the electronic control device includes a plurality of arithmetic processing means, and the correction value used by each of the plurality of arithmetic processing means for correcting the input signal is any one of the plurality of arithmetic processing means. Is an electronic control device that reads from the storage means and transmits it to other arithmetic processing means, each of the plurality of arithmetic processing means comprising a communication means for transmitting and receiving the correction value between the plurality of arithmetic processing means. The communication means transmits data in accordance with the structure of a buffer used for communication. When communicating when starting the plurality of arithmetic processing means, the communication means transmits a correction value used for correcting an input signal. , when communicating after starting the plural arithmetic processing means, at startup with correction values are those for transmission of data not transmitted, as the buffer used for communication, the plurality of arithmetic processing hand Provided with a first buffer used for communication at the time of startup, and a second buffer having a larger capacity than the first buffer and used for communication after startup of the plurality of arithmetic processing means. Since the buffer used for communication is switched between when and after activation, it is possible to obtain an electronic control device and its data communication method that can be activated at high speed and operate accurately and safely.

以下に添付図面を参照して、この発明に係る電子制御装置およびそのデータ通信方法の好適な実施例を詳細に説明する。 Exemplary embodiments of an electronic control unit and a data communication method thereof according to the present invention will be explained below in detail with reference to the accompanying drawings.

まず図1を参照し、本発明の実施例1である電子制御装置(ECU)1の概要構成について説明する。同図に示すように本実施例1にかかるECU1は、入力端子T11〜T14および入力端子T21〜T23を有する。また、ECU1は、その内部にメインマイコン10、サブマイコン20、EEPROM2を有する。   First, a schematic configuration of an electronic control unit (ECU) 1 that is Embodiment 1 of the present invention will be described with reference to FIG. As shown in the figure, the ECU 1 according to the first embodiment has input terminals T11 to T14 and input terminals T21 to T23. The ECU 1 has a main microcomputer 10, a sub-microcomputer 20, and an EEPROM 2 therein.

このECU1は、例えば車両用のエンジン制御ECUであり、入力端子T11〜T14および入力端子T21〜T23には水温、吸気圧、吸気温、バッテリ電圧、油圧、油温、スロットル開度などを示す入力信号がアナログ電圧信号として入力される。   The ECU 1 is, for example, an engine control ECU for a vehicle. Inputs indicating water temperature, intake pressure, intake air temperature, battery voltage, oil pressure, oil temperature, throttle opening, and the like are input to the input terminals T11 to T14 and the input terminals T21 to T23. The signal is input as an analog voltage signal.

メインマイコン10は、入力端子T11〜T14に入力されたアナログ信号を使用して演算処理をおこなう処理手段であり、サブマイコン20は、入力端子T21〜T23に入力されたアナログ信号を使用して演算処理をおこなう処理手段である。   The main microcomputer 10 is processing means for performing arithmetic processing using analog signals input to the input terminals T11 to T14, and the sub-microcomputer 20 performs arithmetic processing using analog signals input to the input terminals T21 to T23. A processing means for performing processing.

具体的には、メインマイコン10は、その内部に入力処理部13、補正処理部12、主制御部11およびDMAコントローラ14を有する。また、サブマイコン20は、その内部に入力処理部23、補正処理部22、主制御部21、DMAコントローラ24およびEEPROMドライバ25を有する。さらに、EEPROM2は、その内部にメインマイコン補正値2aおよびサブマイコン補正値2bを記憶している。   Specifically, the main microcomputer 10 includes an input processing unit 13, a correction processing unit 12, a main control unit 11, and a DMA controller 14 therein. The sub-microcomputer 20 includes an input processing unit 23, a correction processing unit 22, a main control unit 21, a DMA controller 24, and an EEPROM driver 25 therein. Further, the EEPROM 2 stores therein a main microcomputer correction value 2a and a sub microcomputer correction value 2b.

ここで、メインマイコン補正値2aは、メインマイコン10が入力信号の補正に使用する値であり、ECU1の製造時に決定され、EEPROM2に記憶されたものである。同様に、サブマイコン補正値2bは、サブマイコン20が入力信号の補正に使用する値であり、ECU1の製造時に決定され、EEPROM2に記憶されたものである。   Here, the main microcomputer correction value 2a is a value used by the main microcomputer 10 to correct the input signal, is determined when the ECU 1 is manufactured, and is stored in the EEPROM 2. Similarly, the sub-microcomputer correction value 2b is a value used by the sub-microcomputer 20 to correct the input signal, is determined when the ECU 1 is manufactured, and is stored in the EEPROM 2.

上述したように、メインマイコン10およびサブマイコン20は、アナログ信号を入力されて演算処理をおこなうが、ECUに搭載される電源ICの供給電圧は厳密には均一でないので、ECUの製造時、すなわちECUに電源ICを搭載した時点で必要な補正値を算出してEEPROM2に記憶させ、電源ICの出力ばらつきを補正することで入力信号の値を正確に評価する。   As described above, the main microcomputer 10 and the sub-microcomputer 20 perform an arithmetic process by inputting an analog signal. However, since the supply voltage of the power supply IC mounted on the ECU is not strictly uniform, When the power supply IC is mounted on the ECU, a necessary correction value is calculated and stored in the EEPROM 2, and the value of the input signal is accurately evaluated by correcting the output variation of the power supply IC.

サブマイコン20内部の入力処理部23は、入力端子T21〜23から入力されたアナログ電圧信号を補正処理部22に出力する。また、EEPROMドライバ25は、EEPROM2からメインマイコン補正値2aおよびサブマイコン補正値2bを読み出して補正処理部22に出力する。   The input processing unit 23 in the sub-microcomputer 20 outputs an analog voltage signal input from the input terminals T21 to T23 to the correction processing unit 22. The EEPROM driver 25 reads the main microcomputer correction value 2 a and the sub microcomputer correction value 2 b from the EEPROM 2 and outputs them to the correction processing unit 22.

補正処理部22は、サブマイコン補正値2bを使用し、入力処理部23から入力された入力信号の値を補正して主制御部21に出力する。また、補正処理部22は、メインマイコン補正値2aをDMAコントローラ24に出力する。   The correction processing unit 22 corrects the value of the input signal input from the input processing unit 23 using the sub microcomputer correction value 2b and outputs the corrected value to the main control unit 21. In addition, the correction processing unit 22 outputs the main microcomputer correction value 2 a to the DMA controller 24.

DMAコントローラ24は、サブマイコン20とメインマイコン10との間の通信を行う通信手段であり、具体的にはDMA転送方式でデータ通信を行う。このDMAコントローラ24によるデータ通信は、メインマイコン10とサブマイコン20との間の各種データのやり取りに使用し、メインマイコン補正値2aもDMAコントローラ24によって送信される。   The DMA controller 24 is a communication unit that performs communication between the sub-microcomputer 20 and the main microcomputer 10, and specifically performs data communication by a DMA transfer method. The data communication by the DMA controller 24 is used for exchanging various data between the main microcomputer 10 and the sub-microcomputer 20, and the main microcomputer correction value 2a is also transmitted by the DMA controller 24.

主制御部21は、補正された入力信号をもとに演算処理を実行する演算処理手段である。具体的には主制御部21は、CPU(Central Processing Unit)とメモリによって構成され、エンジン制御を行うアプリケーションを実行する。   The main control unit 21 is an arithmetic processing unit that executes arithmetic processing based on the corrected input signal. Specifically, the main control unit 21 includes a CPU (Central Processing Unit) and a memory, and executes an application that performs engine control.

メインマイコン10内部の入力処理部13は、入力端子T11〜14から入力されたアナログ電圧信号を補正処理部12に出力する。DMAコントローラ14は、DMAコントローラ24から受信したメインマイコン補正値2aを補正処理部12に出力する。   The input processing unit 13 inside the main microcomputer 10 outputs an analog voltage signal input from the input terminals T11 to T14 to the correction processing unit 12. The DMA controller 14 outputs the main microcomputer correction value 2 a received from the DMA controller 24 to the correction processing unit 12.

補正処理部12は、メインマイコン補正値2aを使用し、入力処理部13から入力された入力信号の値を補正して主制御部11に出力する。主制御部11は、補正された入力信号をもとに演算処理を実行する演算処理手段である。具体的には主制御部11は、CPU(Central Processing Unit)とメモリによって構成され、エンジン制御を行うアプリケーションを実行する。   The correction processing unit 12 uses the main microcomputer correction value 2 a to correct the value of the input signal input from the input processing unit 13 and outputs the corrected value to the main control unit 11. The main control unit 11 is an arithmetic processing unit that executes arithmetic processing based on the corrected input signal. Specifically, the main control unit 11 includes a CPU (Central Processing Unit) and a memory, and executes an application that performs engine control.

つぎに、メインマイコン10とサブマイコン20との間で行われるDMA通信について説明する。DMAによるデータ送受信では、送信側と受信側に同一の構造を持つバッファを設け、送信側はバッファの構造に従ってデータを書き込んで送信する。そのため、受信側ではバッファの構造からどの位置にどのデータが書き込まれているかを知ることができる。   Next, DMA communication performed between the main microcomputer 10 and the sub-microcomputer 20 will be described. In data transmission / reception by DMA, buffers having the same structure are provided on the transmission side and the reception side, and the transmission side writes and transmits data according to the buffer structure. Therefore, the receiving side can know which data is written at which position from the buffer structure.

ECU1では、サブマイコン20がメインマイコン補正値2aを読み出し、DMAによって送信する。このため、メインマイコン10専用のEEPROMを不要とし、構成を簡易にすることができる。しかし一方でメインマイコン10の起動時には、メインマイコン補正値2aを受信するまで初期化を完了することができない。さらに、初期化を行う際に送信する必要があるのはメインマイコン補正値2aのみである。   In the ECU 1, the sub microcomputer 20 reads the main microcomputer correction value 2a and transmits it by DMA. This eliminates the need for an EEPROM dedicated to the main microcomputer 10 and simplifies the configuration. However, when the main microcomputer 10 is activated, initialization cannot be completed until the main microcomputer correction value 2a is received. Furthermore, only the main microcomputer correction value 2a needs to be transmitted when performing initialization.

この構成で、従来のように単一のバッファを有するDMAコントローラでデータ通信を行うとすると、DMA通信にはバッファの容量分の時間が必要となるので、メインマイコン10の初期化に要する時間が増大する。   With this configuration, if data communication is performed with a DMA controller having a single buffer as in the prior art, the time required for initialization of the main microcomputer 10 is required because DMA communication requires time corresponding to the capacity of the buffer. Increase.

そこで、本発明にかかるECU1では、DMAコントローラ14,24に初期化用バッファ14a,24aと通常用バッファ14b,24bとを設け、初期化時と初期化処理後で使用するバッファを切り替える構成としている。DMAコントローラ14,24におけるバッファの構造例を図2に示す。   Therefore, in the ECU 1 according to the present invention, the initialization buffers 14a and 24a and the normal buffers 14b and 24b are provided in the DMA controllers 14 and 24, and the buffers used at the time of initialization and after initialization processing are switched. . An example of the buffer structure in the DMA controllers 14 and 24 is shown in FIG.

図2−1は、初期化用バッファ14aの構造を説明する説明図であり、図2−2は通常用バッファ24aの構造を説明する説明図である。なお、初期化用バッファ24aおよび通常用バッファ24bの構造は、それぞれ初期化用バッファ14a、通常用バッファ14bと同様である。   FIG. 2A is an explanatory diagram for explaining the structure of the initialization buffer 14a, and FIG. 2B is an explanatory diagram for explaining the structure of the normal buffer 24a. The structures of the initialization buffer 24a and the normal buffer 24b are the same as those of the initialization buffer 14a and the normal buffer 14b, respectively.

初期化用バッファ14aは、図2−1に示すようにメインマイコン補正値2aとチェックコードのみを有する。一方、通常用バッファ14bは、図2−2に示すように、メインマイコン補正値2a、チェックコードに加え、水温データ、油温データなどメインマイコン10とサブマイコン20とが起動後の通常処理で通信する各種データのための領域を有する。   The initialization buffer 14a has only a main microcomputer correction value 2a and a check code as shown in FIG. On the other hand, as shown in FIG. 2B, the normal buffer 14b is a normal process after the main microcomputer 10 and the sub-microcomputer 20 start up such as water temperature data and oil temperature data in addition to the main microcomputer correction value 2a and check code. It has an area for various data to communicate.

このように、初期化用バッファ14a,24aと通常用バッファ14b,24bとを切替えて使用し、初期化用バッファ14a,24aには起動に必要なメインマイコン補正値2aと、通信が正常に行われたことを確認するためのチェックコードのみを持たせることでメインマイコン10の初期化を高速化することができる。また、通常用バッファ14b,24bには起動後の処理に必要な各種データのための領域を持たせているので、起動後の通信処理において動作が制限されることはない。   In this way, the initialization buffers 14a and 24a and the normal buffers 14b and 24b are switched and used, and the initialization buffers 14a and 24a normally communicate with the main microcomputer correction value 2a necessary for activation. The initialization of the main microcomputer 10 can be speeded up by providing only the check code for confirming that the error has occurred. In addition, since the normal buffers 14b and 24b have areas for various data necessary for the processing after startup, the operation is not limited in the communication processing after startup.

つぎに、ECU1の起動時の処理について説明する。図3は、ECU1の起動時における処理動作を説明するフローチャートである。同図に示したフローは、ECU1の電源投入時に開始され、メインマイコン10、サブマイコン20はそれぞれ独立に初期化処理を開始する。メインマイコン10は、まず、プラットフォーム層を初期化し(ステップS101)、その後メインマイコン補正値2aの受信待ちを開始する(ステップS102)。   Next, processing when the ECU 1 is activated will be described. FIG. 3 is a flowchart for explaining the processing operation when the ECU 1 is activated. The flow shown in the figure is started when the ECU 1 is powered on, and the main microcomputer 10 and the sub-microcomputer 20 start the initialization process independently. The main microcomputer 10 first initializes the platform layer (step S101), and then starts waiting for reception of the main microcomputer correction value 2a (step S102).

メインマイコン10は、サブマイコン20からメインマイコン補正値2aを受信したならば(ステップS103,Yes)、アプリケーション層を初期化して(ステップS104)、初期化処理を終了する。   When the main microcomputer 10 receives the main microcomputer correction value 2a from the sub-microcomputer 20 (step S103, Yes), the main microcomputer 10 initializes the application layer (step S104) and ends the initialization process.

一方、サブマイコン20は、まず、プラットフォーム層を初期化し(ステップS201)、その後、メインマイコン補正値2aおよびサブマイコン補正値2bをEEPROM2から読み出す(ステップS202)。サブマイコン20は、メインマイコン補正値2aをDMAコントローラ24によってメインマイコン10に送信する(ステップS203)。この時、DMAコントローラ24は、初期化用バッファ24aを使用する。その後、サブマイコン20は、アプリケーション層を初期化して(ステップS204)、初期化処理を終了する。   On the other hand, the sub microcomputer 20 first initializes the platform layer (step S201), and then reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2 (step S202). The sub-microcomputer 20 transmits the main microcomputer correction value 2a to the main microcomputer 10 by the DMA controller 24 (step S203). At this time, the DMA controller 24 uses the initialization buffer 24a. Thereafter, the sub-microcomputer 20 initializes the application layer (step S204) and ends the initialization process.

このように、サブマイコン20は、その初期化処理の中でメインマイコン10にメインマイコン補正値2aを送信し、メインマイコン10はメインマイコン補正値2aの受信を待って初期化処理を行うが、メインマイコン補正値2aの送信に初期化用バッファ14a,24aを使用することでメインマイコン10の待ち時間を最小限に抑えることができる。   Thus, the sub-microcomputer 20 transmits the main microcomputer correction value 2a to the main microcomputer 10 during the initialization process, and the main microcomputer 10 waits for the reception of the main microcomputer correction value 2a and performs the initialization process. By using the initialization buffers 14a and 24a for transmission of the main microcomputer correction value 2a, the waiting time of the main microcomputer 10 can be minimized.

ここで、メインマイコン10とサブマイコン20のDMAの起動は、どちらから行ってもよい。図4は、サブマイコン20からDMAを起動する場合の起動処理をさらに詳細に説明するフローチャートである。同図に示したフローは、図3に示したフローと同様に、ECU1の電源投入時に開始される処理である。メインマイコン10は、まず、プラットフォーム層を初期化し(ステップS301)、その後、サブマイコン20からのDMA起動待ちを開始する(ステップS302)。   Here, the DMA activation of the main microcomputer 10 and the sub-microcomputer 20 may be performed from either. FIG. 4 is a flowchart for explaining in more detail the starting process when starting the DMA from the sub-microcomputer 20. The flow shown in the figure is a process started when the ECU 1 is turned on, similarly to the flow shown in FIG. The main microcomputer 10 first initializes the platform layer (step S301), and then starts waiting for DMA activation from the sub-microcomputer 20 (step S302).

メインマイコン10は、サブマイコン20がDMAによってメインマイコン補正値2aを送信した場合に、DMAを起動し、メインマイコン補正値2aを受信する(ステップS303)。その後、メインマイコン10は、チェックコードを用いてメインマイコン補正値2aを正常に受信したか否かを判定する(ステップS304)。   When the sub-microcomputer 20 transmits the main microcomputer correction value 2a by DMA, the main microcomputer 10 activates DMA and receives the main microcomputer correction value 2a (step S303). Thereafter, the main microcomputer 10 determines whether or not the main microcomputer correction value 2a is normally received using the check code (step S304).

メインマイコン補正値2aを正常に受信していなければ(ステップS304,No)、メインマイコン10は、再度DMA起動待ちを開始する(ステップS302)。一方、メインマイコン補正値2aを正常に受信したならば(ステップS304,Yes)、メインマイコン10は、サブマイコン20に受信完了通知を送信し(ステップS305)、アプリケーション層を初期化して(ステップS306)、初期化処理を終了する。   If the main microcomputer correction value 2a is not normally received (No at Step S304), the main microcomputer 10 starts waiting for DMA activation again (Step S302). On the other hand, if the main microcomputer correction value 2a is normally received (step S304, Yes), the main microcomputer 10 transmits a reception completion notification to the sub-microcomputer 20 (step S305), and initializes the application layer (step S306). ), The initialization process is terminated.

一方、サブマイコン20は、まず、プラットフォーム層を初期化し(ステップS401)、その後、メインマイコン補正値2aおよびサブマイコン補正値2bをEEPROM2から読み出す(ステップS402)。その後、サブマイコン20はDMAを起動し(ステップS403)、メインマイコン補正値2aをDMAコントローラ24によってメインマイコン10に送信する(ステップS404)。   On the other hand, the sub microcomputer 20 first initializes the platform layer (step S401), and then reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2 (step S402). Thereafter, the sub-microcomputer 20 starts DMA (step S403), and transmits the main microcomputer correction value 2a to the main microcomputer 10 by the DMA controller 24 (step S404).

そして、サブマイコン20は、メインマイコン10から受信完了通知を受信したか否かを判定し(ステップS405)、メインマイコン10から受信完了通知を受信していなければ(ステップS405,No)、再度メインマイコン補正値2aをメインマイコン10に送信する(ステップS404)。   Then, the sub-microcomputer 20 determines whether or not a reception completion notification has been received from the main microcomputer 10 (step S405). If no reception completion notification has been received from the main microcomputer 10 (step S405, No), the main microcomputer again The microcomputer correction value 2a is transmitted to the main microcomputer 10 (step S404).

一方、メインマイコン10から受信完了通知を受信したならば(ステップS405,Yes)、サブマイコン20は、アプリケーション層を初期化して(ステップS406)、初期化処理を終了する。   On the other hand, if a reception completion notification is received from the main microcomputer 10 (step S405, Yes), the sub-microcomputer 20 initializes the application layer (step S406) and ends the initialization process.

続いて、メインマイコン10からDMAを起動する場合の起動処理を説明する。図5は、メインマイコン10からDMAを起動する場合の起動処理をさらに詳細に説明するフローチャートである。なお、同図に示したフローは、図3に示したフローと同様に、ECU1の電源投入時に開始される処理である。メインマイコン10は、まず、プラットフォーム層を初期化し(ステップS501)、その後、サブマイコン20からの送信許可待ちを開始する(ステップS502)。   Next, a start process when starting the DMA from the main microcomputer 10 will be described. FIG. 5 is a flowchart for explaining in more detail the startup process when starting up DMA from the main microcomputer 10. Note that the flow shown in the figure is a process started when the ECU 1 is turned on, as in the flow shown in FIG. 3. The main microcomputer 10 first initializes the platform layer (step S501), and then starts waiting for transmission permission from the sub-microcomputer 20 (step S502).

メインマイコン10は、サブマイコン20から送信許可を受信した場合(ステップS503)に、DMAを初期化するとともに、サブマイコン20にDMA初期化コードを送信する(ステップS504)。そして、サブマイコン20からメインマイコン補正値2aを受信し(ステップS505)、正常に受信したか否かを判定する(ステップS506)。   When receiving transmission permission from the sub-microcomputer 20 (step S503), the main microcomputer 10 initializes the DMA and transmits a DMA initialization code to the sub-microcomputer 20 (step S504). Then, the main microcomputer correction value 2a is received from the sub-microcomputer 20 (step S505), and it is determined whether or not it has been normally received (step S506).

メインマイコン補正値2aを正常に受信していなければ(ステップS506,No)、メインマイコン10は、再度送信許可待ちを開始する(ステップS502)。一方、メインマイコン補正値2aを正常に受信したならば(ステップS506,Yes)、メインマイコン10は、サブマイコン20に受信完了通知を送信し(ステップS507)、アプリケーション層を初期化して(ステップS508)、初期化処理を終了する。   If the main microcomputer correction value 2a is not normally received (step S506, No), the main microcomputer 10 starts waiting for transmission permission again (step S502). On the other hand, if the main microcomputer correction value 2a is normally received (step S506, Yes), the main microcomputer 10 transmits a reception completion notification to the sub-microcomputer 20 (step S507), and initializes the application layer (step S508). ), The initialization process is terminated.

一方、サブマイコン20は、まず、プラットフォーム層を初期化し(ステップS601)、その後、メインマイコン補正値2aおよびサブマイコン補正値2bをEEPROM2から読み出して(ステップS602)、メインマイコン10に送信許可を送信する(ステップS603)。そして、メインマイコン10が送信したDMA初期化コードを受信してDMAを起動し(ステップS604)、メインマイコン補正値2aをメインマイコン10に送信する(ステップS605)。   On the other hand, the sub microcomputer 20 first initializes the platform layer (step S601), and then reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2 (step S602), and transmits a transmission permission to the main microcomputer 10. (Step S603). Then, the DMA initialization code transmitted by the main microcomputer 10 is received to activate the DMA (step S604), and the main microcomputer correction value 2a is transmitted to the main microcomputer 10 (step S605).

その後、サブマイコン20は、メインマイコン10から受信完了通知を受信したか否かを判定し(ステップS606)、メインマイコン10から受信完了通知を受信していなければ(ステップS606,No)、再度メインマイコン補正値2aをメインマイコン10に送信する(ステップS605)。   Thereafter, the sub-microcomputer 20 determines whether or not a reception completion notification has been received from the main microcomputer 10 (step S606). If no reception completion notification has been received from the main microcomputer 10 (step S606, No), the main microcomputer 10 again. The microcomputer correction value 2a is transmitted to the main microcomputer 10 (step S605).

一方、メインマイコン10から受信完了通知を受信したならば(ステップS606,Yes)、サブマイコン20は、アプリケーション層を初期化して(ステップS607)、初期化処理を終了する。   On the other hand, if a reception completion notification is received from the main microcomputer 10 (step S606, Yes), the sub-microcomputer 20 initializes the application layer (step S607) and ends the initialization process.

つぎに、ECU1の通常処理について説明する。ECU1に電源を投入し、メインマイコン10およびサブマイコン20が起動した後も、サブマイコン20は定期的にEEPROM2からメインマイコン補正値2aおよびサブマイコン補正値2bを読み出し、メインマイコン補正値2aをメインマイコン10に送信する。メインマイコン10側では、常に受信した最新のメインマイコン補正値2aを使用することで、補正値のデータ化けなどによる動作異常を防止することができる。   Next, normal processing of the ECU 1 will be described. Even after the ECU 1 is turned on and the main microcomputer 10 and the sub microcomputer 20 are activated, the sub microcomputer 20 periodically reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2, and uses the main microcomputer correction value 2a as the main microcomputer correction value 2a. It transmits to the microcomputer 10. On the main microcomputer 10 side, abnormal operation due to garbled correction value data or the like can be prevented by always using the latest received main microcomputer correction value 2a.

このECU1の通常処理動作を、図6に示す。図6に示したフローは、ECU1の電源投入時から通常処理までの動作を説明するものであり、ECU1に電源が投入された場合に開始される。メインマイコン10は、初期化処理を実行した(ステップS701)後、メインループを開始する(ステップS702)。なお、ステップS701に示した初期化処理は、図3〜5で説明した処理を用いればよい。   The normal processing operation of the ECU 1 is shown in FIG. The flow shown in FIG. 6 explains the operation from the time when the ECU 1 is turned on until the normal process, and is started when the power is turned on to the ECU 1. The main microcomputer 10 starts the main loop (step S702) after executing the initialization process (step S701). Note that the initialization process shown in step S701 may use the process described with reference to FIGS.

メインループ開始(ステップS702)後、メインマイコン10は、サブマイコン20からメインマイコン補正値2aを受信し(ステップS703)、補正処理部12が使用する補正値を、受信した値に更新して(ステップS704)、メインループを終了する(ステップS705)。このステップS702〜S705に示したメインループは、ECU1の電源が落とされるか、メインマイコン10が再起動されるまで繰り返し実行される。   After starting the main loop (step S702), the main microcomputer 10 receives the main microcomputer correction value 2a from the sub-microcomputer 20 (step S703), and updates the correction value used by the correction processing unit 12 to the received value ( Step S704), the main loop is terminated (Step S705). The main loop shown in steps S702 to S705 is repeatedly executed until the ECU 1 is turned off or the main microcomputer 10 is restarted.

一方、サブマイコン20は、初期化処理を実行した(ステップS801)後、メインループを開始する(ステップS802)。なお、ステップS801に示した初期化処理は、図3〜5で説明した処理を用いればよい。   On the other hand, after executing the initialization process (step S801), the sub-microcomputer 20 starts a main loop (step S802). The initialization process shown in step S801 may use the process described with reference to FIGS.

メインループ開始(ステップS802)後、サブマイコン20は、メインマイコン補正値2aおよびサブマイコン補正値2bをEEPROM2から読み出し(ステップS803)、メインマイコン補正値2aをDMAコントローラ24によってメインマイコン10に送信する(ステップS804)。この時、DMAコントローラ24は、通常用バッファ24bを使用する。   After starting the main loop (step S802), the sub microcomputer 20 reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2 (step S803), and transmits the main microcomputer correction value 2a to the main microcomputer 10 by the DMA controller 24. (Step S804). At this time, the DMA controller 24 uses the normal buffer 24b.

その後、サブマイコン20は、補正処理部22が使用する補正値を、EEPROM2から読み出した値に更新して(ステップS805)、メインループを終了する(ステップS806)。このステップS802〜S806に示したメインループは、ECU1の電源が落とされるか、サブマイコン20が再起動されるまで繰り返し実行される。   Thereafter, the sub-microcomputer 20 updates the correction value used by the correction processing unit 22 to the value read from the EEPROM 2 (step S805), and ends the main loop (step S806). The main loop shown in steps S802 to S806 is repeatedly executed until the ECU 1 is powered off or the sub-microcomputer 20 is restarted.

ところで、メインマイコン10の異常やサブマイコン20の異常、EEPROM2の故障、さらにはDMA通信線のノイズなどにより、補正値が正常ではない場合には、異常な補正値を使用することによる誤動作を防止するため、フェールセーフを行うことが望ましい。   By the way, when the correction value is not normal due to the abnormality of the main microcomputer 10, the abnormality of the sub-microcomputer 20, the failure of the EEPROM 2, or the noise of the DMA communication line, the malfunction caused by using the abnormal correction value is prevented. Therefore, it is desirable to perform fail-safe.

補正値が正常の範囲内であるか否かは、例えば、ECU1に搭載した電源ICの保証範囲内にその値が収まっているか否かを判定することで検出することができる。たとえば、電源ICの精度が±5%である場合、補正値が0.95以上1.05以下であれば正常であると判定し、この範囲を逸脱する場合には異常と判定する。なお、ここで補正処理は、補正値を乗ずることで行うものとする。   Whether or not the correction value is within a normal range can be detected, for example, by determining whether or not the value is within the guaranteed range of the power supply IC mounted on the ECU 1. For example, when the accuracy of the power supply IC is ± 5%, if the correction value is 0.95 or more and 1.05 or less, it is determined to be normal, and if it is outside this range, it is determined to be abnormal. Here, the correction process is performed by multiplying the correction value.

さらに、補正値の異常がサブマイコン20の動作異常に起因するものである場合、メインマイコン10からサブマイコン20を再起動することで復帰することが可能である。図7は、サブマイコン20のリセットによるフェールセーフ処理を説明するフローチャートである。このフローは、ECU1の電源投入時から通常処理までの動作を説明するものであり、ECU1に電源が投入された場合に開始される。メインマイコン10は、初期化処理を実行した(ステップS901)後、メインループを開始する(ステップS902)。ここで、ステップS901に示した初期化処理は、図3〜5で説明した処理と同様の処理を用いればよい。   Further, when the abnormality of the correction value is caused by the abnormal operation of the sub-microcomputer 20, it can be recovered by restarting the sub-microcomputer 20 from the main microcomputer 10. FIG. 7 is a flowchart for explaining fail-safe processing by resetting the sub-microcomputer 20. This flow explains the operation from the time when the ECU 1 is turned on until the normal process, and is started when the ECU 1 is turned on. After executing the initialization process (step S901), the main microcomputer 10 starts the main loop (step S902). Here, the initialization process shown in step S901 may use a process similar to the process described with reference to FIGS.

メインループ開始(ステップS902)後、メインマイコン10は、サブマイコン20からメインマイコン補正値2aを受信し(ステップS903)、受信した補正値が所定の範囲内であるか否かを判定する(ステップS904)。その結果、受信した補正値が所定の範囲を逸脱していれば(ステップS904,No)、メインマイコン10は、サブマイコン20をリセット、すなわち再起動し(ステップS905)、再度ステップS904に移行する。   After starting the main loop (step S902), the main microcomputer 10 receives the main microcomputer correction value 2a from the sub-microcomputer 20 (step S903), and determines whether or not the received correction value is within a predetermined range (step S903). S904). As a result, if the received correction value deviates from the predetermined range (step S904, No), the main microcomputer 10 resets the sub-microcomputer 20, that is, restarts (step S905), and proceeds to step S904 again. .

一方、受信した補正値が所定の範囲内であれば(ステップS904,Yes)、メインマイコン10は、補正処理部12が使用する補正値を受信した値に更新して(ステップS906)、メインループを終了する(ステップS907)。このステップS902〜S907に示したメインループは、ECU1の電源が落とされるか、メインマイコン10が再起動されるまで繰り返し実行される。   On the other hand, if the received correction value is within the predetermined range (step S904, Yes), the main microcomputer 10 updates the correction value used by the correction processing unit 12 to the received value (step S906), and the main loop. Is finished (step S907). The main loop shown in steps S902 to S907 is repeatedly executed until the power of the ECU 1 is turned off or the main microcomputer 10 is restarted.

また、他のフェールセーフ処理として、補正値の異常時には予め定めたフェールセーフ値を補正値として用いてもよい。このフェールセーフ値は、マイコンを安全に制御可能な値とする。図8は、補正値の異常時にフェールセーフ値を用いる処理を説明するフローチャートである。このフローは、ECU1の電源投入時から通常処理までの動作を説明するものであり、ECU1に電源が投入された場合に開始される。メインマイコン10は、初期化処理を実行した(ステップS1001)後、メインループを開始する(ステップS1002)。ここで、ステップS1001に示した初期化処理は、図3〜5で説明した処理と同様の処理を用いればよい。   As another fail-safe process, a predetermined fail-safe value may be used as the correction value when the correction value is abnormal. The fail-safe value is a value that can safely control the microcomputer. FIG. 8 is a flowchart for explaining processing using a fail-safe value when the correction value is abnormal. This flow explains the operation from the time when the ECU 1 is turned on until the normal process, and is started when the ECU 1 is turned on. After executing the initialization process (step S1001), the main microcomputer 10 starts the main loop (step S1002). Here, the initialization process shown in step S1001 may use a process similar to the process described with reference to FIGS.

メインループ開始(ステップS1002)後、メインマイコン10は、サブマイコン20からメインマイコン補正値2aを受信し(ステップS1003)、受信した補正値が所定の範囲内であるか否かを判定する(ステップS1004)。その結果、受信した補正値が所定の範囲を逸脱していれば(ステップS1004,No)、メインマイコン10は、補正処理部12が使用する補正値をフェールセーフ値に更新して(ステップS1006)、メインループを終了する(ステップS1007)。   After starting the main loop (step S1002), the main microcomputer 10 receives the main microcomputer correction value 2a from the sub-microcomputer 20 (step S1003), and determines whether or not the received correction value is within a predetermined range (step S1003). S1004). As a result, if the received correction value deviates from the predetermined range (step S1004, No), the main microcomputer 10 updates the correction value used by the correction processing unit 12 to the fail-safe value (step S1006). Then, the main loop is terminated (step S1007).

一方、受信した補正値が所定の範囲内であれば(ステップS1004,Yes)、メインマイコン10は、補正処理部12が使用する補正値を受信した値に更新して(ステップS1005)、メインループを終了する(ステップS1007)。このステップS1002〜S1007に示したメインループは、ECU1の電源が落とされるか、メインマイコン10が再起動されるまで繰り返し実行される。   On the other hand, if the received correction value is within the predetermined range (step S1004, Yes), the main microcomputer 10 updates the correction value used by the correction processing unit 12 to the received value (step S1005), and the main loop. Is finished (step S1007). The main loop shown in steps S1002 to S1007 is repeatedly executed until the ECU 1 is turned off or the main microcomputer 10 is restarted.

このように、補正値に異常がある場合にはフェールセーフ処理を実行することで、ECU1の動作異常を引き起こすことなく、安全に動作させることができる。なお、図7および図8のフローチャートでは、通常動作時における補正値の異常検出について説明したが、初期化処理中においても同様の処理によって補正値の異常を検出し、フェールセーフ処理を実行可能である。   Thus, when there is an abnormality in the correction value, the fail-safe process is executed, so that the ECU 1 can be operated safely without causing an operation abnormality. Although the correction value abnormality detection during the normal operation has been described in the flowcharts of FIGS. 7 and 8, the correction value abnormality can be detected by the same process during the initialization process, and the fail-safe process can be executed. is there.

また、図8のフローチャートでは、メインマイコン10における処理を例に説明したが、サブマイコン20においても同様に、EEPROM2から読み出した補正値が所定の範囲内であるか否かを判定し、所定の範囲を逸脱する場合にはフェールセーフ値を用いて補正処理をおこなうことができる。   In the flowchart of FIG. 8, the processing in the main microcomputer 10 has been described as an example. Similarly, in the sub-microcomputer 20, it is determined whether or not the correction value read from the EEPROM 2 is within a predetermined range. When the value deviates from the range, the correction process can be performed using the fail-safe value.

上述してきたように、本実施例1では、DMAコントローラに初期化用のバッファと通常用のバッファとをそれぞれ設け、初期化処理時には補正値とチェックコードのみを有する初期化用バッファを使用してメインマイコン10への補正値の送信を行うので、メインマイコン10の起動、ひいてはECU1の起動を高速化することができる。   As described above, in the first embodiment, an initialization buffer and a normal buffer are provided in the DMA controller, and an initialization buffer having only a correction value and a check code is used during the initialization process. Since the correction value is transmitted to the main microcomputer 10, the start-up of the main microcomputer 10 and thus the start-up of the ECU 1 can be speeded up.

また、補正値に異常が発生した場合には、自動的にフェールセーフを行うことで、ECUの動作異常を引き起こすことなく、安全に動作させることができる。   In addition, when an abnormality occurs in the correction value, automatic fail safe is performed so that the ECU can be operated safely without causing abnormal operation of the ECU.

さらに、メインマイコンにおけるアプリケーション層の初期化を、サブマイコンからの補正値の受信完了を待ってから行うので、メインマイコンを誤動作させることなく起動することができる。   Furthermore, since the initialization of the application layer in the main microcomputer is performed after completion of reception of the correction value from the sub-microcomputer, the main microcomputer can be started up without malfunctioning.

すなわち、プラットフォーム層の初期化が行われるまではDMA通信は不能であるので、プラットフォーム層の初期化が行われていないマイコンに対してDMA通信を行うと、送信したデータが正常に受信したか否かの判定が困難となり、好ましくない。そのため、従来の技術では、補正値を受信する側のマイコン(本実施例ではメインマイコン)の方が送信する側のマイコン(本実施例ではサブマイコン)よりも早くプラットフォーム層の初期化が完了するように、送信側マイコンに時間のかかるEEPROMの読出し処理を行わせたり、受信側マイコンを先に起動させて送信側マイコンの起動指示を行わせていた。   That is, since DMA communication is impossible until the platform layer is initialized, if the DMA communication is performed for a microcomputer that has not been initialized, whether the transmitted data is normally received or not. Such a determination is difficult, which is not preferable. Therefore, in the conventional technology, the initialization of the platform layer is completed earlier than the microcomputer (sub-microcomputer in this embodiment) on the transmission side (the main microcomputer in this embodiment) on the microcomputer that receives the correction value. As described above, the reading-side microcomputer is caused to perform a time-consuming EEPROM reading process, or the receiving-side microcomputer is activated first to instruct the activation of the transmitting-side microcomputer.

しかしながら、この従来の技術によって受信側のマイコンの方が早くプラットフォーム層の初期化が完了するように設定すると、その後に連続して行われるアプリケーション層の初期化が補正値を受信していない状態で行われてしまう危険がある。   However, if this conventional technology is set so that the initialization of the platform layer is completed earlier on the receiving side of the microcomputer, the initialization of the application layer that is subsequently performed is not receiving the correction value. There is a danger of being done.

そこで、本実施例のように、受信側マイコンのプラットフォーム層の初期化が完了した後、補正値を受信するまではアプリケーション層の初期化を行わないようにすることで、DMA通信と、アプリケーション層の初期化とをともに正常に行うことができる。   Therefore, as in this embodiment, after the initialization of the platform layer of the receiving microcomputer is completed, the application layer is not initialized until the correction value is received, so that the DMA communication and the application layer can be performed. Both initialization and normalization can be performed normally.

ここで、送信側マイコンのプラットフォーム層の初期化、すなわち送信側マイコンの起動を、受信側マイコンから指示することによって、複数のマイコンの起動時間を最適化し、高速かつ安全に起動することが可能となる。   Here, by initializing the platform layer of the sending microcomputer, that is, starting the sending microcomputer from the receiving microcomputer, it is possible to optimize the starting time of multiple microcomputers and start them up quickly and safely. Become.

つぎに、本発明の実施例2について説明する。図9は、本発明の実施例2である電子制御装置(ECU)の概要構成を示す概要構成図である。本実施例2にかかるECU3は、メインマイコン30およびサブマイコン40にそれぞれSRAM(Static Random Access Memory)32,42を設け、補正処理部31,41はSRAM32,42に補正値を記憶させ、随時読み出して使用する。その他の構成および動作は、実施例1に示したECU1と同様であるので、同一の構成要素には同一の符号を付して説明を省略する。   Next, a second embodiment of the present invention will be described. FIG. 9 is a schematic configuration diagram showing a schematic configuration of an electronic control unit (ECU) that is Embodiment 2 of the present invention. The ECU 3 according to the second embodiment is provided with SRAMs (Static Random Access Memory) 32 and 42 in the main microcomputer 30 and the sub-microcomputer 40, respectively. The correction processing units 31 and 41 store the correction values in the SRAMs 32 and 42, and read them as needed. To use. Since other configurations and operations are the same as those of the ECU 1 shown in the first embodiment, the same components are denoted by the same reference numerals and description thereof is omitted.

サブマイコン40内部の補正処理部41は、サブマイコン補正値2bをSRAM42に記憶させる。その後、入力処理部23から入力された入力信号の値を補正する場合には、サブマイコン補正値2bをSRAM42から読み出して使用する。また、補正処理部42は、メインマイコン補正値2aをDMAコントローラ24に出力する。   The correction processing unit 41 in the sub-microcomputer 40 stores the sub-microcomputer correction value 2b in the SRAM 42. Thereafter, when correcting the value of the input signal input from the input processing unit 23, the sub microcomputer correction value 2b is read from the SRAM 42 and used. In addition, the correction processing unit 42 outputs the main microcomputer correction value 2 a to the DMA controller 24.

同様に、メインマイコン30内部の補正処理部31は、DMAコントローラ14を介して受信したメインマイコン補正値2aをSRAM32に記憶させる。その後、入力処理部13から入力された入力信号の値を補正する場合には、メインマイコン補正値2aをSRAM32から読み出して使用する。   Similarly, the correction processing unit 31 inside the main microcomputer 30 stores the main microcomputer correction value 2 a received via the DMA controller 14 in the SRAM 32. Thereafter, when correcting the value of the input signal input from the input processing unit 13, the main microcomputer correction value 2a is read from the SRAM 32 and used.

つぎに、ECU3の起動時の処理について説明する。図10は、ECU3の起動時における処理動作を説明するフローチャートである。同図に示したフローは、ECU3の電源投入時に開始され、メインマイコン30、サブマイコン40はそれぞれ独立に初期化処理を開始する。メインマイコン30は、まず、プラットフォーム層を初期化し(ステップS1101)、その後メインマイコン補正値2aの受信待ちを開始する(ステップS1102)。   Next, processing when the ECU 3 is activated will be described. FIG. 10 is a flowchart for explaining the processing operation when the ECU 3 is activated. The flow shown in the figure is started when the ECU 3 is turned on, and the main microcomputer 30 and the sub-microcomputer 40 start the initialization process independently of each other. The main microcomputer 30 first initializes the platform layer (step S1101), and then starts waiting for reception of the main microcomputer correction value 2a (step S1102).

メインマイコン30は、サブマイコン40からメインマイコン補正値2aを受信したならば(ステップS1103,Yes)、受信したメインマイコン補正値2aをSRAM32に保存した(ステップS1104)後、アプリケーション層を初期化して(ステップS1105)、初期化処理を終了する。   When the main microcomputer 30 receives the main microcomputer correction value 2a from the sub microcomputer 40 (step S1103, Yes), the main microcomputer 30 stores the received main microcomputer correction value 2a in the SRAM 32 (step S1104), and then initializes the application layer. (Step S1105), the initialization process is terminated.

一方、サブマイコン40は、まず、プラットフォーム層を初期化し(ステップS1201)、その後、メインマイコン補正値2aおよびサブマイコン補正値2bをEEPROM2から読み出す(ステップS1202)。さらに、サブマイコン40は、メインマイコン補正値2aをDMAコントローラ24によってメインマイコン30に送信する(ステップS1203)。この時、DMAコントローラ24は、初期化用バッファ24aを使用する。その後、サブマイコン40は、サブマイコン補正値2bをSRAM42に保存した(ステップS1204)後、アプリケーション層を初期化して(ステップS1205)、初期化処理を終了する。   On the other hand, the sub microcomputer 40 first initializes the platform layer (step S1201), and then reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2 (step S1202). Further, the sub-microcomputer 40 transmits the main microcomputer correction value 2a to the main microcomputer 30 by the DMA controller 24 (step S1203). At this time, the DMA controller 24 uses the initialization buffer 24a. Thereafter, the sub-microcomputer 40 stores the sub-microcomputer correction value 2b in the SRAM 42 (step S1204), initializes the application layer (step S1205), and ends the initialization process.

つぎに、ECU3の通常処理について説明する。ECU3に電源を投入し、メインマイコン30およびサブマイコン40が起動した後、メインマイコン30はSRAM32からメインマイコン補正値2aを読み出して使用する。また、サブマイコン40は、SRAM42からサブマイコン補正値2bを読み出して使用する。   Next, normal processing of the ECU 3 will be described. After the ECU 3 is powered on and the main microcomputer 30 and the sub-microcomputer 40 are activated, the main microcomputer 30 reads the main microcomputer correction value 2a from the SRAM 32 and uses it. The sub-microcomputer 40 reads the sub-microcomputer correction value 2b from the SRAM 42 and uses it.

このECU3の通常処理動作を、図11に示す。図11に示したフローは、ECU3の電源投入時から通常処理までの動作を説明するものであり、ECU3に電源が投入された場合に開始される。メインマイコン30は、初期化処理を実行した(ステップS1301)後、メインループを開始する(ステップS1302)。なお、ステップS1301に示した初期化処理は、図10で説明した処理を用いればよい。   The normal processing operation of the ECU 3 is shown in FIG. The flow shown in FIG. 11 explains the operation from the time when the ECU 3 is turned on until the normal process, and is started when the power is turned on to the ECU 3. After executing the initialization process (step S1301), the main microcomputer 30 starts the main loop (step S1302). Note that the initialization process shown in step S1301 may use the process described in FIG.

メインループ開始(ステップS1302)後、メインマイコン30は、SRAM32からメインマイコン補正値2aを読み出して入力信号の補正処理を行い(ステップS1303)、メインループを終了する(ステップS1304)。このステップS1302〜S1304に示したメインループは、ECU3の電源が落とされるか、メインマイコン30が再起動されるまで繰り返し実行される。   After the main loop is started (step S1302), the main microcomputer 30 reads the main microcomputer correction value 2a from the SRAM 32 and performs input signal correction processing (step S1303), and ends the main loop (step S1304). The main loop shown in steps S1302 to S1304 is repeatedly executed until the ECU 3 is turned off or the main microcomputer 30 is restarted.

一方、サブマイコン40は、初期化処理を実行した(ステップS1401)後、メインループを開始する(ステップS1402)。なお、ステップS1401に示した初期化処理は、図10で説明した処理を用いればよい。   On the other hand, after executing the initialization process (step S1401), the sub-microcomputer 40 starts the main loop (step S1402). Note that the initialization process shown in step S1401 may use the process described in FIG.

メインループ開始(ステップS1402)後、サブマイコン40は、SRAM32からサブマイコン補正値2bを読み出して入力信号の補正処理を行い(ステップS1403)、メインループを終了する(ステップS1404)。このステップS1402〜S1404に示したメインループは、ECU3の電源が落とされるか、サブマイコン40が再起動されるまで繰り返し実行される。   After the main loop is started (step S1402), the sub-microcomputer 40 reads the sub-microcomputer correction value 2b from the SRAM 32, performs input signal correction processing (step S1403), and ends the main loop (step S1404). The main loop shown in steps S1402 to S1404 is repeatedly executed until the power of the ECU 3 is turned off or the sub-microcomputer 40 is restarted.

ところで、図11に示したフローでは、起動時にSRAMに記憶させた補正値を随時読み出して使用しているが、通常動作中にサブマイコン40が定期的にEEPROM2から補正値を読み出してSRAMに記憶した補正値と比較し、SRAMに記憶した補正値に異常がないかを判定するように動作させても良い。   In the flow shown in FIG. 11, the correction value stored in the SRAM at startup is read and used as needed. However, during normal operation, the sub-microcomputer 40 periodically reads the correction value from the EEPROM 2 and stores it in the SRAM. The correction value stored in the SRAM may be operated to determine whether or not there is an abnormality.

図12は、SRAMに補正値を記憶するとともに、EEPROMから定期的に補正値を読み出してSRAMの記憶内容を更新する場合におけるECU3の通常処理について説明するフローチャートである。このフローチャートは、ECU3の電源投入時から通常処理までの動作を説明するものであり、ECU3に電源が投入された場合に開始される。メインマイコン30は、初期化処理を実行した(ステップS1501)後、メインループを開始する(ステップS1502)。なお、ステップS1501に示した初期化処理は、図10で説明した処理を用いればよい。   FIG. 12 is a flowchart for explaining normal processing of the ECU 3 when the correction value is stored in the SRAM and the correction value is periodically read from the EEPROM to update the stored content of the SRAM. This flowchart explains the operation from when the ECU 3 is turned on to the normal process, and is started when the ECU 3 is turned on. After executing the initialization process (step S1501), the main microcomputer 30 starts the main loop (step S1502). Note that the initialization process shown in step S1501 may use the process described in FIG.

メインループ開始(ステップS1502)後、メインマイコン30は、SRAM32からメインマイコン補正値2aを読み出す(ステップS1503)。その後、メインマイコン30は、サブマイコン40からメインマイコン補正値2aを受信し(ステップS1504)、SRAM32から読み出した補正値とサブマイコン40から受信した補正値とが一致するか否かを判定する(ステップS1505)。   After starting the main loop (step S1502), the main microcomputer 30 reads the main microcomputer correction value 2a from the SRAM 32 (step S1503). Thereafter, the main microcomputer 30 receives the main microcomputer correction value 2a from the sub-microcomputer 40 (step S1504), and determines whether or not the correction value read from the SRAM 32 matches the correction value received from the sub-microcomputer 40 ( Step S1505).

SRAM32から読み出した補正値とサブマイコン40から受信した補正値とが一致しない場合(ステップS1505,No)、メインマイコン30は、サブマイコン40から受信した補正値をSRAM32に書き込んで更新する(ステップS1506)。   When the correction value read from the SRAM 32 and the correction value received from the sub-microcomputer 40 do not match (step S1505, No), the main microcomputer 30 writes the correction value received from the sub-microcomputer 40 into the SRAM 32 and updates it (step S1506). ).

SRAM32の更新(ステップS1506)、もしくはSRAM32から読み出した補正値とサブマイコン40から受信した補正値とが一致した場合(ステップS1505,Yes)、メインマイコン30は、メインループを終了する(ステップS1507)。このステップS1502〜S1507に示したメインループは、ECU3の電源が落とされるか、メインマイコン30が再起動されるまで繰り返し実行される。   When updating the SRAM 32 (step S1506) or when the correction value read from the SRAM 32 matches the correction value received from the sub-microcomputer 40 (step S1505, Yes), the main microcomputer 30 ends the main loop (step S1507). . The main loop shown in steps S1502 to S1507 is repeatedly executed until the power of the ECU 3 is turned off or the main microcomputer 30 is restarted.

一方、サブマイコン40は、初期化処理を実行した(ステップS1601)後、メインループを開始する(ステップS1602)。なお、ステップS1601に示した初期化処理は、図10で説明した処理を用いればよい。   On the other hand, after executing the initialization process (step S1601), the sub-microcomputer 40 starts the main loop (step S1602). Note that the initialization process shown in step S1601 may use the process described in FIG.

メインループ開始(ステップS1602)後、サブマイコン40は、SRAM42からサブマイコン補正値2bを読み出す(ステップS1603)。その後、サブマイコン40は、EEPROM2からメインマイコン補正値2aおよびサブマイコン補正値2bを読み出し(ステップS1604)、メインマイコン補正値2aをメインマイコン30に送信する(ステップS1605)。さらに、サブマイコン40は、SRAM42から読み出したサブマイコン補正値2bとEEPROM2から読み出したサブマイコン補正値2bとが一致するか否かを判定する(ステップS1606)。   After starting the main loop (step S1602), the sub-microcomputer 40 reads the sub-microcomputer correction value 2b from the SRAM 42 (step S1603). Thereafter, the sub microcomputer 40 reads the main microcomputer correction value 2a and the sub microcomputer correction value 2b from the EEPROM 2 (step S1604), and transmits the main microcomputer correction value 2a to the main microcomputer 30 (step S1605). Further, the sub-microcomputer 40 determines whether or not the sub-microcomputer correction value 2b read from the SRAM 42 matches the sub-microcomputer correction value 2b read from the EEPROM 2 (step S1606).

SRAM42から読み出したサブマイコン補正値2bとEEPROM2から読み出したサブマイコン補正値2bとが一致しない場合(ステップS1606,No)、サブマイコン40は、EEPROM2から読み出した補正値をSRAM42に書き込んで更新する(ステップS1607)。   If the sub-microcomputer correction value 2b read from the SRAM 42 does not match the sub-microcomputer correction value 2b read from the EEPROM 2 (No in step S1606), the sub-microcomputer 40 writes the correction value read from the EEPROM 2 to the SRAM 42 and updates it ( Step S1607).

SRAM42の更新(ステップS1607)、もしくはSRAM42から読み出した補正値とEEPROM2から読み出した補正値とが一致した場合(ステップS1606,Yes)、サブマイコン40は、メインループを終了する(ステップS1608)。このステップS1602〜S1608に示したメインループは、ECU3の電源が落とされるか、サブマイコン40が再起動されるまで繰り返し実行される。   When the SRAM 42 is updated (step S1607) or the correction value read from the SRAM 42 matches the correction value read from the EEPROM 2 (step S1606, Yes), the sub-microcomputer 40 ends the main loop (step S1608). The main loop shown in steps S1602 to S1608 is repeatedly executed until the power of the ECU 3 is turned off or the sub-microcomputer 40 is restarted.

上述してきたように、本実施例2では、メインマイコン補正値2aとサブマイコン補正値2bをそれぞれSRAM32,42に記憶させ、随時読み出して使用することで、補正値における異常発生を抑止し、メインマイコン30およびサブマイコン40を正確に動作させることができる。   As described above, in the second embodiment, the main microcomputer correction value 2a and the sub microcomputer correction value 2b are stored in the SRAMs 32 and 42, respectively, and read and used at any time, thereby suppressing the occurrence of an abnormality in the correction value. The microcomputer 30 and the sub-microcomputer 40 can be operated accurately.

さらに、EEPROM2から定期的に補正値を読み出してSRAMに記憶した値と比較することで、SRAMに記憶した補正値に異常が発生した場合にも自動的に修正し、正常な補正値を用いて補正処理を行うことができる。   Further, by periodically reading the correction value from the EEPROM 2 and comparing it with the value stored in the SRAM, the correction value stored in the SRAM is automatically corrected even when an abnormality occurs, and the normal correction value is used. Correction processing can be performed.

なお、本実施例2においても実施例1と同様のフェールセーフ処理をおこなうことができ、ECU3の動作における安全性をさらに高めることができる。   In the second embodiment, the same fail-safe process as in the first embodiment can be performed, and the safety in the operation of the ECU 3 can be further enhanced.

上記の実施例1,2では、ECUが2つのマイコンを備えた構成について説明したが、本発明の実施はこれに限定されるものではなく、ECU内に所望の数のマイコンを設けることができるものである。   In the first and second embodiments, the configuration in which the ECU includes two microcomputers has been described. However, the embodiment of the present invention is not limited to this, and a desired number of microcomputers can be provided in the ECU. Is.

また、上記の実施例1,2では、サブマイコンにEEPROMを接続し、EEPROMからの補正値の読み出しとメインマイコンへの送信をサブマイコンに担わせていたが、たとえばメインマイコンにEEPROMを接続して補正値を読み出させ、メインマイコンがサブマイコンに補正値を送信する構成としてもよい。   In the first and second embodiments, an EEPROM is connected to the sub-microcomputer, and the sub-microcomputer is responsible for reading the correction value from the EEPROM and transmitting it to the main microcomputer. For example, the EEPROM is connected to the main microcomputer. The correction value may be read out and the main microcomputer may transmit the correction value to the sub-microcomputer.

図13は、本発明の実施例3である電子制御装置(ECU)の概要構成を示す概要構成図である。実施例3にかかるECU4は、その内部にメインマイコン50、サブマイコン60,70,80およびEEPROM5を備えている。   FIG. 13 is a schematic configuration diagram showing a schematic configuration of an electronic control unit (ECU) that is Embodiment 3 of the present invention. The ECU 4 according to the third embodiment includes a main microcomputer 50, sub-microcomputers 60, 70, and 80 and an EEPROM 5 therein.

メインマイコン50は、入力端子T51〜T54に入力されたアナログ信号を使用して演算処理をおこなう処理手段であり、サブマイコン60は、入力端子T61〜T63に入力されたアナログ信号を使用して演算処理をおこなう処理手段である。同様に、サブマイコン70,80は、それぞれ入力端子T71〜T73、入力端子T81〜T83に入力されたアナログ信号を使用して演算処理をおこなう処理手段である。   The main microcomputer 50 is processing means for performing arithmetic processing using analog signals input to the input terminals T51 to T54, and the sub-microcomputer 60 performs arithmetic processing using analog signals input to the input terminals T61 to T63. A processing means for performing processing. Similarly, the sub-microcomputers 70 and 80 are processing means for performing arithmetic processing using analog signals input to the input terminals T71 to T73 and the input terminals T81 to T83, respectively.

EEPROM5は、メインマイコン50が入力信号の補正に使用するメインマイコン補正値5a、サブマイコン60が入力信号の補正に使用するサブマイコン補正値5b、サブマイコン70が入力信号の補正に使用するサブマイコン補正値5c、サブマイコン80が入力信号の補正に使用するサブマイコン補正値5dを記憶している。   The EEPROM 5 includes a main microcomputer correction value 5a used by the main microcomputer 50 for correcting the input signal, a sub microcomputer correction value 5b used by the sub microcomputer 60 for correcting the input signal, and a sub microcomputer used by the sub microcomputer 70 for correcting the input signal. The correction value 5c and the sub microcomputer correction value 5d used by the sub microcomputer 80 to correct the input signal are stored.

また、メインマイコン51はその内部にDMAコントローラ51を、サブマイコン60,70,80はその内部にそれぞれDMAコントローラ61,71,81を備えている。メインマイコン50およびサブマイコン60,70,80のその他の内部構成や動作については実施例1,2と同様であるので、ここでは図示および説明を省略する。   The main microcomputer 51 includes a DMA controller 51 therein, and the sub microcomputers 60, 70, and 80 include DMA controllers 61, 71, and 81, respectively. Since other internal configurations and operations of the main microcomputer 50 and the sub-microcomputers 60, 70, 80 are the same as those in the first and second embodiments, illustration and description are omitted here.

メインマイコン50は、EEPROM5からメインマイコン補正値5a、サブマイコン補正値5b〜5dを読み出す。その後、メインマイコン補正値5aを用いて入力信号の補正を行うと共に、DMAコントローラ51を介してサブマイコン60〜80にそれぞれサブマイコン補正値5b〜5dを送信する。   The main microcomputer 50 reads the main microcomputer correction value 5a and the sub microcomputer correction values 5b to 5d from the EEPROM 5. Thereafter, the input signal is corrected using the main microcomputer correction value 5a, and the sub microcomputer correction values 5b to 5d are transmitted to the sub microcomputers 60 to 80 via the DMA controller 51, respectively.

サブマイコン60は、DMAコントローラ61を介して受信したサブマイコン補正値5bを用いて入力信号の補正を行う。同様に、サブマイコン70,80は、それぞれDMAコントローラ71,81を介して受信したサブマイコン補正値5c,5dを用いて入力信号の補正を行う。   The sub-microcomputer 60 corrects the input signal using the sub-microcomputer correction value 5b received via the DMA controller 61. Similarly, the sub microcomputers 70 and 80 correct the input signal using the sub microcomputer correction values 5c and 5d received via the DMA controllers 71 and 81, respectively.

このようにECUの内部に3以上のマイコンを搭載した場合や、メインマイコンが補正値の読み出しと他のマイコンへの送信を行ったとしても、実施例1,2における場合と同様に、起動を高速化し、正確かつ安全に動作させることができる。   In this way, even when three or more microcomputers are installed in the ECU, or even when the main microcomputer reads out the correction value and transmits it to another microcomputer, the activation is performed in the same manner as in the first and second embodiments. It is faster and can be operated accurately and safely.

なお、以上実施例1〜3では、入力信号のアナログ電圧の補正を例に説明を行ったが、出力信号における補正においても同様の効果を得ることが可能であるのは言うまでもない。   In the first to third embodiments, the correction of the analog voltage of the input signal has been described as an example. Needless to say, the same effect can be obtained in the correction of the output signal.

以上のように、本発明にかかる電子制御装置およびそのデータ通信方法は、複数のマイコンを有するECUに有用であり、特に、簡易な構成で起動を高速化し、正確かつ安全な動作が必要なECUに適している。 As described above, the electronic control device and the data communication method thereof according to the present invention are useful for an ECU having a plurality of microcomputers, and in particular, an ECU that requires high-speed startup with a simple configuration and requires accurate and safe operation. Suitable for

本発明の実施例1であるECUの概要構成を示す概要構成図である。1 is a schematic configuration diagram showing a schematic configuration of an ECU that is Embodiment 1 of the present invention. 図1に示した初期化用バッファの構造を説明する説明図である。It is explanatory drawing explaining the structure of the buffer for initialization shown in FIG. 図1に示した通常用バッファの構造を説明する説明図である。It is explanatory drawing explaining the structure of the buffer for normal use shown in FIG. 図1に示したECUの起動時における処理動作を説明するフローチャートである。2 is a flowchart illustrating a processing operation when the ECU shown in FIG. 1 is activated. サブマイコンからDMAを起動する場合の起動処理をさらに詳細に説明するフローチャートである。It is a flowchart explaining in more detail the starting process in starting DMA from a submicrocomputer. メインマイコン10からDMAを起動する場合の起動処理をさらに詳細に説明するフローチャートである。7 is a flowchart for explaining in more detail a startup process when starting up a DMA from the main microcomputer 10; 図1に示したECUの起動後における処理動作を説明するフローチャートである。FIG. 2 is a flowchart for explaining a processing operation after the ECU shown in FIG. サブマイコンのリセットによるフェールセーフ処理を説明するフローチャートである。It is a flowchart explaining the fail safe process by the reset of a submicrocomputer. 補正値の異常時にフェールセーフ値を用いる処理を説明するフローチャートである。It is a flowchart explaining the process which uses a fail safe value at the time of abnormality of a correction value. 本発明の実施例2であるECUの概要構成を示す概要構成図である。It is a schematic block diagram which shows the schematic structure of ECU which is Example 2 of this invention. 図9に示したECUの起動時における処理動作を説明するフローチャートである。FIG. 10 is a flowchart for explaining a processing operation when the ECU shown in FIG. 9 is activated. FIG. 図9に示したECUの起動後における処理動作を説明するフローチャートである。10 is a flowchart illustrating a processing operation after the ECU shown in FIG. 9 is activated. SRAMに補正値を記憶するとともに、EEPROMから定期的に補正値を読み出してSRAMの記憶内容を更新する場合におけるECUの通常処理について説明するフローチャートである。5 is a flowchart for explaining normal processing of the ECU when storing correction values in the SRAM and periodically reading the correction values from the EEPROM to update the stored contents of the SRAM. 本発明の実施例3であるECUの概要構成を示す概要構成図である。It is a schematic block diagram which shows schematic structure of ECU which is Example 3 of this invention.

符号の説明Explanation of symbols

1,3,4 ECU
2,5 EEPROM
2a,5a メインマイコン補正値
2b,5b〜5d サブマイコン補正値
10,30,50 メインマイコン
11,21 主制御部
12,22 補正処理部
13,23 入力処理部
14,24,51,61,71,81 DMAコントローラ
14a,24a 初期化用バッファ
14b,24b 通常用バッファ
20,40,60,70,80 サブマイコン
32,42 SRAM
25 EEPROMドライバ
T11〜T14,T21〜T23,T51〜T54,T61〜T63,T711〜T73,T81〜T83 入力端子
1,3,4 ECU
2,5 EEPROM
2a, 5a Main microcomputer correction value 2b, 5b to 5d Sub microcomputer correction value 10, 30, 50 Main microcomputer 11, 21 Main control unit 12, 22 Correction processing unit 13, 23 Input processing unit 14, 24, 51, 61, 71 , 81 DMA controller 14a, 24a Initialization buffer 14b, 24b Normal buffer 20, 40, 60, 70, 80 Sub-microcomputer 32, 42 SRAM
25 EEPROM drivers T11 to T14, T21 to T23, T51 to T54, T61 to T63, T711 to T73, T81 to T83 Input terminals

Claims (6)

複数の演算処理手段を備え、前記複数の演算処理手段の各々が入力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信する電子制御装置であって、
前記複数の演算処理手段の各々は、前記複数の演算処理手段間で前記補正値の送受信を行う通信手段を備え、
前記通信手段は、
通信に用いられる通信相手と同一構造のバッファを備え、前記バッファの構造に従って当該バッファへデータの書込みを行ってから前記データの送信を行うもので、前記複数の演算処理手段の起動時に通信する際には、前記補正値の送信を行ない、前記複数の演算処理手段の起動後に通信する際には、前記補正値とともに前記起動時では送信しないデータの送信を行なうものであり、通信に用いる前記バッファとして、前記複数の演算処理手段の起動時に通信する場合に用いる第1のバッファと、前記第1のバッファよりも容量が大きく、前記複数の演算処理手段の起動後に通信する場合に用いる第2のバッファとを設けており、起動時と起動後とで通信に用いるバッファを切り替えることを特徴とする電子制御装置。
A plurality of arithmetic processing means, each of the plurality of arithmetic processing means reads a correction value used for correcting an input signal from one of the plurality of arithmetic processing means and transmits it to another arithmetic processing means; An electronic control device,
Each of the plurality of arithmetic processing units includes a communication unit that transmits and receives the correction value between the plurality of arithmetic processing units.
The communication means includes
A buffer having the same structure as that of a communication partner used for communication is provided, and data is transmitted to the buffer according to the buffer structure, and then the data is transmitted. When communicating when starting the plurality of arithmetic processing means The correction value is transmitted, and when communicating after activation of the plurality of arithmetic processing means, data that is not transmitted at the time of activation is transmitted together with the correction value, and the buffer used for communication is transmitted. The first buffer used when communicating when the plurality of arithmetic processing means is activated and the second buffer having a larger capacity than the first buffer and used when communicating after activation of the plurality of arithmetic processing means An electronic control device comprising a buffer and switching a buffer used for communication between startup and after startup.
前記通信手段は、DMAによるデータの通信を行なうものであることを特徴とする請求項に記載の電子制御装置。 The electronic control apparatus according to claim 1 , wherein the communication unit performs data communication by DMA. 車両に搭載されてエンジンの制御を行なうもので、複数の演算処理手段を備え、前記複数の演算処理手段の各々が入力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信するエンジン制御用の電子制御装置であって、
前記複数の演算処理手段の各々は、前記複数の演算処理手段間で前記補正値の送受信を行う通信手段を備え、
前記通信手段は、
通信に用いられる通信相手と同一構造のバッファを備え、前記バッファの構造に従って当該バッファへデータの書込みを行ってから前記データの送信を行うもので、前記複数の演算処理手段の起動時に通信する際には、前記補正値の送信を行ない、前記複数の演算処理手段の起動後に通信する際には、前記補正値とともに前記起動時では送信しないエンジン制御に用いるデータの送信を行なうものであり、通信に用いる前記バッファとして、前記複数の演算処理手段の起動時に通信する場合に用いる第1のバッファと、前記第1のバッファよりも容量が大きく、前記複数の演算処理手段の起動後に通信する場合に用いる第2のバッファとを設けており、起動時と起動後とで通信に用いるバッファを切り替えることを特徴とするエンジン制御用の電子制御装置。
The engine is mounted on a vehicle and controls an engine. The engine includes a plurality of arithmetic processing units, and each of the plurality of arithmetic processing units uses a correction value used for correcting an input signal as one of the plurality of arithmetic processing units. Is an electronic control device for engine control that is read from the storage means and transmitted to other arithmetic processing means,
Each of the plurality of arithmetic processing units includes a communication unit that transmits and receives the correction value between the plurality of arithmetic processing units.
The communication means includes
A buffer having the same structure as that of a communication partner used for communication is provided, and data is transmitted to the buffer according to the buffer structure, and then the data is transmitted. When communicating when starting the plurality of arithmetic processing means The correction value is transmitted, and when communicating after starting the plurality of arithmetic processing means, the correction value is transmitted together with the data used for engine control that is not transmitted at the start time. The first buffer used when communicating when starting the plurality of arithmetic processing means as the buffer used in the above, and a capacity larger than the first buffer, and when communicating after starting the plurality of arithmetic processing means A second buffer to be used, and an engine control characterized by switching a buffer used for communication between startup and after startup The electronic control unit.
前記通信手段によって前記複数の演算処理手段の起動後に送信が行なわれる、前記起動時では送信しないエンジン制御用に用いるデータは、水温データと油温データの少なくとも一方であることを特徴とする請求項に記載のエンジン制御用の電子制御装置。 The data used for engine control, which is transmitted after activation of the plurality of arithmetic processing means by the communication means and is not transmitted at the time of activation, is at least one of water temperature data and oil temperature data. an electronic control unit for engine control according to 3. 複数の演算処理手段を備え、前記複数の演算処理手段の各々が入力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信する電子制御装置のデータ通信方法であって、
前記複数の演算処理手段の起動時に、送信側および受信側の前記演算処理手段がともに備える同一構造の第1のバッファを用い、送信側の前記演算処理手段が前記第1のバッファの構造に従って当該送信側の演算処理手段に設けられている前記第1のバッファへ前記補正値の書込みを行ってから当該補正値を受信側の前記演算処理手段へ送信する起動時通信工程と、
前記複数の演算処理手段の起動後に、前記第1のバッファよりも容量が大きく、送信側および受信側の前記演算処理手段がともに備える同一構造の第2のバッファを用い、送信側の前記演算処理手段が前記第2のバッファの構造に従って当該送信側の演算処理手段に設けられている前記第2のバッファへ前記補正値とともに前記起動時では送信しないデータの書込みを行ってから当該前記補正値とともに前記起動時では送信しない前記データを受信側の前記演算処理手段へ送信する起動後通信工程と、
を含んだことを特徴とする電子制御装置のデータ通信方法。
A plurality of arithmetic processing means, each of the plurality of arithmetic processing means reads a correction value used for correcting an input signal from one of the plurality of arithmetic processing means and transmits it to another arithmetic processing means; An electronic control device data communication method
When starting up the plurality of arithmetic processing means, the first buffer having the same structure provided in the arithmetic processing means on both the transmission side and the receiving side is used , and the arithmetic processing means on the transmission side corresponds to the structure of the first buffer. A startup communication step of transmitting the correction value to the arithmetic processing means on the receiving side after writing the correction value to the first buffer provided in the arithmetic processing means on the transmitting side ;
After activation of the plurality of processing means, said first capacity much larger than the buffer, the processing means of the transmitting and receiving sides using a second buffer of the same structure both included in the calculation of the transmission side The correction value is written after the processing means writes data that is not transmitted together with the correction value to the second buffer provided in the calculation processing means on the transmission side according to the structure of the second buffer. and after activation communication step of transmitting the data which is not transmitted to the processing means of the receiving side in at the start with,
A data communication method for an electronic control device, comprising:
車両に搭載されてエンジンの制御を行なうもので、複数の演算処理手段を備え、前記複数の演算処理手段の各々が入力信号の補正に使用する補正値を、前記複数の演算処理手段のいずれかが記憶手段から読み出して他の演算処理手段に送信するエンジン制御用の電子制御装置のデータ通信方法であって、
前記複数の演算処理手段の起動時に、送信側および受信側の前記演算処理手段がともに備える同一構造の第1のバッファを用い、送信側の前記演算処理手段が前記第1のバッファの構造に従って当該送信側の演算処理手段に設けられている前記第1のバッファへ前記補正値の書込みを行ってから当該補正値を受信側の前記演算処理手段へ送信する起動時通信工程と、
前記複数の演算処理手段の起動後に、前記第1のバッファよりも容量が大きく、送信側および受信側の前記演算処理手段がともに備える同一構造の第2のバッファを用い、送信側の前記演算処理手段が前記第2のバッファの構造に従って当該送信側の演算処理手段に設けられている前記第2のバッファへ前記補正値とともに前記起動時では送信しないエンジン制御に用いるデータの書込みを行ってから当該前記補正値とともに前記起動時では送信しない前記エンジン制御に用いるデータを受信側の前記演算処理手段へ送信する起動後通信工程と、
を含んだことを特徴とするエンジン制御用の電子制御装置のデータ通信方法。
The engine is mounted on a vehicle and controls an engine. The engine includes a plurality of arithmetic processing units, and each of the plurality of arithmetic processing units uses a correction value used for correcting an input signal as one of the plurality of arithmetic processing units. Is a data communication method of an electronic control device for engine control that is read from the storage means and transmitted to other arithmetic processing means,
When starting up the plurality of arithmetic processing means, the first buffer having the same structure provided in the arithmetic processing means on both the transmission side and the receiving side is used , and the arithmetic processing means on the transmission side corresponds to the structure of the first buffer. A startup communication step of transmitting the correction value to the arithmetic processing means on the receiving side after writing the correction value to the first buffer provided in the arithmetic processing means on the transmitting side ;
After activation of the plurality of processing means, said first capacity much larger than the buffer, the processing means of the transmitting and receiving sides using a second buffer of the same structure both included in the calculation of the transmission side After the processing means writes the data used for engine control that is not transmitted at the time of startup together with the correction value to the second buffer provided in the transmission side arithmetic processing means according to the structure of the second buffer. A post-startup communication step of transmitting data used for the engine control that is not transmitted together with the correction value to the calculation processing means on the receiving side ;
A data communication method for an electronic control device for engine control, comprising:
JP2007166591A 2007-06-25 2007-06-25 Electronic control device and data communication method thereof Expired - Fee Related JP4554645B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007166591A JP4554645B2 (en) 2007-06-25 2007-06-25 Electronic control device and data communication method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007166591A JP4554645B2 (en) 2007-06-25 2007-06-25 Electronic control device and data communication method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003389599A Division JP4014212B2 (en) 2003-11-19 2003-11-19 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2007299419A JP2007299419A (en) 2007-11-15
JP4554645B2 true JP4554645B2 (en) 2010-09-29

Family

ID=38768796

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007166591A Expired - Fee Related JP4554645B2 (en) 2007-06-25 2007-06-25 Electronic control device and data communication method thereof

Country Status (1)

Country Link
JP (1) JP4554645B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012026316A (en) * 2010-07-21 2012-02-09 Keihin Corp Engine control system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63208905A (en) * 1987-02-26 1988-08-30 Toshiba Corp Sequence generating circuit
JP2002317687A (en) * 2001-04-24 2002-10-31 Denso Corp Microcomputer
JP2002371897A (en) * 2001-06-14 2002-12-26 Mitsubishi Electric Corp Intake air amount control device for engine
JP2003214233A (en) * 2002-01-28 2003-07-30 Denso Corp Electronic control device for vehicle

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63208905A (en) * 1987-02-26 1988-08-30 Toshiba Corp Sequence generating circuit
JP2002317687A (en) * 2001-04-24 2002-10-31 Denso Corp Microcomputer
JP2002371897A (en) * 2001-06-14 2002-12-26 Mitsubishi Electric Corp Intake air amount control device for engine
JP2003214233A (en) * 2002-01-28 2003-07-30 Denso Corp Electronic control device for vehicle

Also Published As

Publication number Publication date
JP2007299419A (en) 2007-11-15

Similar Documents

Publication Publication Date Title
JP6719472B2 (en) Imaging cartridge chip, imaging cartridge and method of changing serial number of imaging cartridge chip
JP5382084B2 (en) Vehicle equipment
JP4014212B2 (en) Electronic control unit
US20200249930A1 (en) Onboard system and ecu
WO2014091666A1 (en) Onboard electronic control device
CN102402442B (en) Information processing apparatus, execution control method
JP2017157004A (en) System, method, and computer program for updating programs
JP6443372B2 (en) Software allocation system for vehicles
JP2008009983A (en) Electronic control unit and initialization method thereof
JP2010144692A (en) Control system and electronic control apparatus
CN103176906A (en) Electronic control unit for vehicle and method of writing data
CN110809755A (en) Electronic control system
WO2020158377A1 (en) Electronic control device and security verification method for electronic control device
JP2007206827A (en) Electronic control unit, and method for generating program for controlling on-vehicle device
JP4554645B2 (en) Electronic control device and data communication method thereof
CN102692992A (en) Information processing apparatus and method of controlling the same
JP5488405B2 (en) Electronic control unit
US9811149B2 (en) Information processing apparatus, non-transitory computer readable medium, and information processing method
JP2007220116A (en) Electronic control device
JP2014051168A (en) Onboard communication system
JP6717184B2 (en) In-vehicle control device
US11429375B2 (en) Method for exchanging a first executable program code and a second executable program code, and a control unit
JP2017033159A (en) On-vehicle electronic control device
JP5129791B2 (en) Vehicle control device
US9753728B2 (en) Apparatus and medium for converting a persistent wait instruction to an instruction for periodically waiting for a control target

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090908

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100419

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100713

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100714

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

Free format text: PAYMENT UNTIL: 20130723

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4554645

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140723

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees