JP2021163425A - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP2021163425A
JP2021163425A JP2020067803A JP2020067803A JP2021163425A JP 2021163425 A JP2021163425 A JP 2021163425A JP 2020067803 A JP2020067803 A JP 2020067803A JP 2020067803 A JP2020067803 A JP 2020067803A JP 2021163425 A JP2021163425 A JP 2021163425A
Authority
JP
Japan
Prior art keywords
time
value
storage
trigger signal
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2020067803A
Other languages
Japanese (ja)
Other versions
JP7435182B2 (en
Inventor
大樹 関屋
Daiki Sekiya
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 JP2020067803A priority Critical patent/JP7435182B2/en
Publication of JP2021163425A publication Critical patent/JP2021163425A/en
Application granted granted Critical
Publication of JP7435182B2 publication Critical patent/JP7435182B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Combined Controls Of Internal Combustion Engines (AREA)

Abstract

To make it possible to detect a fact that the latest AD (analog/digital) value cannot be used in the cycle task while stabilizing the startup cycle of the cycle task.SOLUTION: An AD conversion start timer generates a first trigger signal at every certain time Tc. When the first trigger signal is generated, an AD conversion is executed on the analog signal used for controlling an object to be controlled, and AD values are transferred to RAM via DMA. A cycle task start timer generates a second trigger signal at a timing that deviates from the generation timing of the first trigger signal by a predetermined time Ts. When the second trigger signal is generated, a CPU executes a cycle task that includes a series of processing that uses the AD value in the RAM as a task to execute the control. The CPU determines whether or not the AD value has been stored in a memory before starting the cycle task from the last cycle task was started.SELECTED DRAWING: Figure 4

Description

本開示は、電子制御装置に関する。 The present disclosure relates to an electronic control device.

例えば、下記特許文献1に記載の電子制御装置では、タイマにより一定時間毎にAD変換トリガ信号が発生され、このAD変換トリガ信号の発生により、AD変換器によるアナログ信号のAD変換が実施される。そして、AD変換が完了すると、このAD変換の結果であるAD値が、DMA転送によりメモリに格納される。 For example, in the electronic control device described in Patent Document 1 below, an AD conversion trigger signal is generated by a timer at regular time intervals, and the AD conversion trigger signal is used to perform AD conversion of an analog signal by the AD converter. .. Then, when the AD conversion is completed, the AD value that is the result of the AD conversion is stored in the memory by DMA transfer.

特開2011−160199号公報Japanese Unexamined Patent Publication No. 2011-160199

上記特許文献1に記載の技術に関連して、発明者の詳細な検討の結果、以下の課題が見出された。
制御対象を制御するためのタスクとして、一定時間毎に起動されるタスク(即ち、周期タスク)があり、この周期タスクにより、アナログ信号のAD値を使用する処理を行うとする。言い換えると、周期タスクに、AD値を使用する処理が含まれているとする。尚、ここで言うタスクはソフトウェアの実行単位のことである。また、周期タスクの起動とは、周期タスクの実行を開始させることである。
As a result of detailed examination by the inventor in relation to the technique described in Patent Document 1, the following problems have been found.
As a task for controlling a control target, there is a task (that is, a periodic task) that is started at regular time intervals, and it is assumed that a process using an AD value of an analog signal is performed by this periodic task. In other words, it is assumed that the periodic task includes a process that uses the AD value. The task referred to here is a software execution unit. Further, the activation of the periodic task is to start the execution of the periodic task.

発明者は、AD変換トリガ信号の発生タイミングから所定時間だけずれたタイミングで別のトリガ信号を発生させ、この別のトリガ信号の発生により、上記周期タスクが起動される構成を考えた。この構成によれば、周期タスクの起動周期を安定させやすい。上記別のトリガ信号は、AD変換トリガ信号と同様に、タイマなどによって高い精度の周期で発生させることができるからである。 The inventor has considered a configuration in which another trigger signal is generated at a timing deviated from the generation timing of the AD conversion trigger signal by a predetermined time, and the generation of the other trigger signal activates the periodic task. According to this configuration, it is easy to stabilize the activation cycle of the periodic task. This is because the other trigger signal can be generated with a high-precision cycle by a timer or the like, similarly to the AD conversion trigger signal.

そして、この構成の場合、AD変換トリガ信号と上記別のトリガ信号との位相差に相当する上記所定時間は、アナログ信号のAD変換とAD値のメモリへの格納とに要すると予想される時間よりも長く、かつ、上記一定時間よりは短い時間に設定すれば良い。 In the case of this configuration, the predetermined time corresponding to the phase difference between the AD conversion trigger signal and the other trigger signal is expected to be required for the AD conversion of the analog signal and the storage of the AD value in the memory. It may be set to a time longer than the above-mentioned fixed time and shorter than the above-mentioned fixed time.

ところで、AD変換とAD値のメモリへの格納とに要する時間は、種々の要因により、ばらつく可能性がある。ここで言うAD変換に要する時間とは、AD変換トリガ信号が発生してからAD変換が完了するまでの時間である。例えば、AD変換に要する時間は、別の高優先度のAD変換が実施された場合に、該当のAD変換の開始が待たされることで、長くなる可能性がある。また、AD値のメモリへの格納に要する時間は、バスの混み具合により、長くなる可能性がある。 By the way, the time required for the AD conversion and the storage of the AD value in the memory may vary due to various factors. The time required for the AD conversion referred to here is the time from the generation of the AD conversion trigger signal to the completion of the AD conversion. For example, the time required for the AD conversion may be increased by waiting for the start of the corresponding AD conversion when another high-priority AD conversion is performed. Further, the time required for storing the AD value in the memory may be long depending on how busy the bus is.

そして、AD変換トリガ信号の発生からAD値のメモリへの格納が完了するまでの時間が、上記所定時間よりも長くなった場合には、最新のAD変換によるAD値がメモリに格納される前に周期タスクが起動される。すると、周期タスクにおいて最新のAD値を使用することができなくなる。 When the time from the generation of the AD conversion trigger signal to the completion of storage of the AD value in the memory becomes longer than the above-mentioned predetermined time, before the AD value by the latest AD conversion is stored in the memory. The periodic task is started at. Then, the latest AD value cannot be used in the periodic task.

このような事態を検知できないと、例えば周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置や、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置等、制御性能の低下を抑制するための処置を実施することができない。 If such a situation cannot be detected, for example, a measure for increasing the possibility that a newer AD value can be used in a periodic task, a measure for suppressing the influence of not being able to use the latest AD value in a periodic task, etc. , It is not possible to take measures to suppress the deterioration of control performance.

そこで、本開示の1つの局面は、周期タスクの起動周期を安定させつつ、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようにする。 Therefore, one aspect of the present disclosure is to stabilize the activation cycle of the periodic task and to detect that the latest AD value cannot be used in the periodic task.

本開示の1つの態様による電子制御装置は、第1の発生部(21)と、変換格納実施部(15,17,S120,S140)と、第2の発生部(22)と、実行部(7)と、順序監視部(7,S470)と、を備える。 The electronic control device according to one aspect of the present disclosure includes a first generation unit (21), a conversion storage execution unit (15, 17, S120, S140), a second generation unit (22), and an execution unit ( 7) and an order monitoring unit (7, S470) are provided.

第1の発生部は、第1のトリガ信号を一定時間(Tc)毎に発生させる。
変換格納実施部は、第1のトリガ信号が発生すると、制御対象の制御に用いられるアナログ信号のAD変換を実施し、当該AD変換が完了すると、当該AD変換の結果であるAD値をメモリ(13)に格納する。
The first generating unit generates the first trigger signal at regular time intervals (Tc).
When the first trigger signal is generated, the conversion storage execution unit performs AD conversion of the analog signal used for controlling the controlled object, and when the AD conversion is completed, the AD value which is the result of the AD conversion is stored in the memory ( Store in 13).

第2の発生部は、第1のトリガ信号の発生タイミングから、前記AD変換と前記AD値のメモリへの格納とに要する最小時間よりも長く、且つ、前記一定時間よりは短い時間に設定された所定時間(Ts)だけずれたタイミングで、第2のトリガ信号を発生させる。このため、第2のトリガ信号は、第1のトリガ信号に対して位相が所定時間だけずれた信号であって良い。 The second generation unit is set to a time longer than the minimum time required for the AD conversion and storage of the AD value in the memory and shorter than the fixed time from the generation timing of the first trigger signal. A second trigger signal is generated at a timing deviated by a predetermined time (Ts). Therefore, the second trigger signal may be a signal whose phase is shifted by a predetermined time with respect to the first trigger signal.

実行部は、第2のトリガ信号が発生すると、制御対象の制御を行うためのタスクとして、前記メモリに格納されているAD値を使用する処理を含む周期タスクを実行する。
順序監視部は、周期タスクが前回起動されてから今回起動される前に変換格納実施部によるAD値のメモリへの格納が完了したか否かの、判定を行う。
When the second trigger signal is generated, the execution unit executes a periodic task including a process using the AD value stored in the memory as a task for controlling the control target.
The sequence monitoring unit determines whether or not the storage of the AD value in the memory by the conversion storage execution unit is completed after the periodic task is started last time and before it is started this time.

このような構成によれば、第1のトリガ信号に対して位相が所定時間だけずれた第2のトリガ信号を発生させ、この第2のトリガ信号により周期タスクが起動されるため、周期タスクの起動周期を安定させやすい。そして、順序監視部を備えるため、周期タスクが前回起動してから今回起動する前にAD値のメモリへの格納が完了しなかったことを検知することができる。よって、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようになる。 According to such a configuration, a second trigger signal whose phase is shifted by a predetermined time is generated with respect to the first trigger signal, and the periodic task is activated by the second trigger signal. It is easy to stabilize the startup cycle. Since the sequence monitoring unit is provided, it is possible to detect that the storage of the AD value in the memory has not been completed after the periodic task was started last time and before it is started this time. Therefore, it becomes possible to detect that the latest AD value cannot be used in the periodic task.

実施形態の電子制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the electronic control apparatus of embodiment. 第1のトリガ信号が発生する毎に行われる動作及び処理を表すフローチャートである。It is a flowchart which shows the operation and process performed every time the 1st trigger signal is generated. 第2のトリガ信号が発生する毎に行われる動作及び処理を表すフローチャートである。It is a flowchart which shows the operation and process performed every time the 2nd trigger signal is generated. 実施形態の作用を説明するタイムチャートである。It is a time chart explaining the operation of an embodiment. 比較例を説明するタイムチャートである。It is a time chart explaining a comparative example.

以下、図面を参照しながら、本開示の実施形態を説明する。
[1.構成]
図1に示す電子制御装置(以下、ECU)1は、例えば自動車のエンジン3を制御するものである。ECUは、「Electronic Control Unit」の略である。ECU1は、エンジン3を制御するための処理を行う制御部として、マイコン5を備える。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[1. composition]
The electronic control unit (hereinafter, ECU) 1 shown in FIG. 1 controls, for example, an automobile engine 3. ECU is an abbreviation for "Electronic Control Unit". The ECU 1 includes a microcomputer 5 as a control unit that performs processing for controlling the engine 3.

マイコン5は、CPU7と、CPU7により実行されるプログラムが格納されたROM11と、CPU7によって演算される対象のデータや演算結果等が記憶されるRAM13と、内部バス14と、を備える。尚、CPU7は、1つに限らず、複数備えられても良い。 The microcomputer 5 includes a CPU 7, a ROM 11 in which a program executed by the CPU 7 is stored, a RAM 13 in which data to be calculated by the CPU 7, a calculation result, and the like are stored, and an internal bus 14. The number of CPUs 7 is not limited to one, and a plurality of CPUs 7 may be provided.

更に、マイコン5は、1つ以上のアナログ信号をAD変換(即ち、アナログ/デジタル変換)するAD変換部15と、プログラムによって指定されたデータのRAM13への転送を行うDMAコントローラ(以下、DMAC)17と、タイマ部19と、を備える。DMAは、「Direct Memory Access」の略である。 Further, the microcomputer 5 has an AD conversion unit 15 that performs AD conversion (that is, analog / digital conversion) of one or more analog signals, and a DMA controller (hereinafter, DMAC) that transfers data specified by the program to the RAM 13. A 17 and a timer unit 19 are provided. DMA is an abbreviation for "Direct Memory Access".

制御対象としてのエンジン3に備えられた複数の各気筒31には、筒内圧力に応じた電圧となる筒内圧信号を出力する圧力センサ33がそれぞれ設けられている。
マイコン5には、AD変換対象のアナログ信号として、各圧力センサ33からの筒内圧信号が入力される。そして、マイコン5に入力される筒内圧信号のそれぞれは、AD変換部15によってAD変換される。以下では、説明を簡略化するため、AD変換されるアナログ信号が1つの筒内圧信号である、として説明する。
Each of the plurality of cylinders 31 provided in the engine 3 as a control target is provided with a pressure sensor 33 that outputs an in-cylinder pressure signal that becomes a voltage corresponding to the in-cylinder pressure.
The in-cylinder pressure signal from each pressure sensor 33 is input to the microcomputer 5 as an analog signal to be AD-converted. Then, each of the in-cylinder pressure signals input to the microcomputer 5 is AD-converted by the AD conversion unit 15. Hereinafter, for the sake of brevity, it is assumed that the analog signal to be AD-converted is one in-cylinder pressure signal.

マイコン5において、AD変換部15による筒内圧信号のAD変換が完了すると、AD変換部15からDMAC17に、AD値のDMA転送要求が出力される。AD値とは、AD変換の結果であり、即ち、AD変換された後のデジタルデータのことである。AD値のDMA転送要求は、AD変換部15とは別の要求発生部から出力されても良い。 When the AD conversion of the in-cylinder pressure signal by the AD conversion unit 15 is completed in the microcomputer 5, a DMA transfer request for the AD value is output from the AD conversion unit 15 to the DMAC 17. The AD value is the result of the AD conversion, that is, the digital data after the AD conversion. The DMA transfer request of the AD value may be output from a request generation unit different from the AD conversion unit 15.

DMAC17は、AD値のDMA転送要求を受けると、AD変換部15からRAM13へAD値を転送(即ち、DMA転送)する。
そして、DMA転送によりRAM13に格納されたAD値は、CPU7が後述の周期タスクを実行することにより、エンジン3の制御に用いられる。つまり、後述の周期タスクには、筒内圧信号のAD値をRAM13から読み出して当該AD値をエンジン3の制御のために使用する処理(以下、AD値使用処理)が含まれている。AD値使用処理としては、例えば、筒内圧信号のAD値(即ち、筒内圧検出値)に基づいて燃料噴射量を演算する処理がある。
Upon receiving the DMA transfer request for the AD value, the DMAC 17 transfers the AD value from the AD conversion unit 15 to the RAM 13 (that is, DMA transfer).
Then, the AD value stored in the RAM 13 by DMA transfer is used for controlling the engine 3 by the CPU 7 executing a periodic task described later. That is, the periodic task described later includes a process of reading the AD value of the in-cylinder pressure signal from the RAM 13 and using the AD value for controlling the engine 3 (hereinafter, AD value use process). As the AD value use process, for example, there is a process of calculating the fuel injection amount based on the AD value (that is, the in-cylinder pressure detection value) of the in-cylinder pressure signal.

タイマ部19は、少なくとも2つのタイマ21,22を備える。
各タイマ21、22は、マイコン5の内部クロックでカウントアップされるタイマカウンタと、コンペアレジスタとを備える。そして、各タイマ21,22は、タイマカウンタの値が、コンペアレジスタに予め設定されている値(即ち、比較値)と同じになると、トリガ信号を発生させる(即ち、出力する)と共に、その時点でタイマカウンタの値が0に戻るように構成されている。
The timer unit 19 includes at least two timers 21 and 22.
Each of the timers 21 and 22 includes a timer counter that is counted up by the internal clock of the microcomputer 5 and a compare register. Then, when the value of the timer counter becomes the same as the value preset in the compare register (that is, the comparison value), each of the timers 21 and 22 generates (that is, outputs) a trigger signal and at that time point. Is configured so that the value of the timer counter returns to 0.

このため、例えば、タイマ21からは、当該タイマ21を構成するタイマカウンタの値が当該タイマ21を構成するコンペアレジスタ内の比較値と一致する毎であって、「比較値×内部クロックの1周期時間」の一定時間毎に、トリガ信号が出力される。タイマ22についても同様である。尚、以下の説明において、タイマ21,22が満了するとは、タイマカウンタの値がコンペアレジスタ内の比較値と一致した、ということを意味する。 Therefore, for example, from the timer 21, each time the value of the timer counter constituting the timer 21 matches the comparison value in the compare register constituting the timer 21, "comparison value x one cycle of the internal clock". A trigger signal is output at regular intervals of "time". The same applies to the timer 22. In the following description, the expiration of timers 21 and 22 means that the value of the timer counter matches the comparison value in the compare register.

タイマ21によって発生されるトリガ信号は、AD変換部15にAD変換を開始させるためのトリガ信号として使用される。また、タイマ22によって発生されるトリガ信号は、周期タスクを起動するためのトリガ信号として使用される。 The trigger signal generated by the timer 21 is used as a trigger signal for the AD conversion unit 15 to start the AD conversion. Further, the trigger signal generated by the timer 22 is used as a trigger signal for invoking a periodic task.

以下では、タイマ21,22を特に区別して呼称する場合には、タイマ21を、AD変換開始タイマ21と言い、タイマ22を、周期タスク起動タイマ22と言う。また、AD変換開始タイマ21によって発生されるトリガ信号を、第1のトリガ信号とも言い、周期タスク起動タイマ22によって発生されるトリガ信号を、第2のトリガ信号とも言う。 Hereinafter, when the timers 21 and 22 are particularly distinguished, the timer 21 is referred to as an AD conversion start timer 21, and the timer 22 is referred to as a periodic task start timer 22. Further, the trigger signal generated by the AD conversion start timer 21 is also referred to as a first trigger signal, and the trigger signal generated by the periodic task start timer 22 is also referred to as a second trigger signal.

ここで、図4に示すように、第1のトリガ信号と第2のトリガ信号とで、発生する周期は同じ一定時間Tcに設定されるが、第2のトリガ信号は、第1のトリガ信号の発生タイミングから所定時間Tsだけずれて発生される。尚、図4において、「AD変換開始タイマ」は、AD変換開始タイマ21を構成するタイマカウンタの値を表している。同様に、「周期タスク起動タイマ」は、周期タスク起動タイマ22を構成するタイマカウンタの値を表している。 Here, as shown in FIG. 4, the period in which the first trigger signal and the second trigger signal are generated is set to Tc for the same fixed time, but the second trigger signal is the first trigger signal. Is generated with a deviation of a predetermined time Ts from the generation timing of. In FIG. 4, the “AD conversion start timer” represents the value of the timer counter that constitutes the AD conversion start timer 21. Similarly, the "periodic task activation timer" represents the value of the timer counter that constitutes the periodic task activation timer 22.

具体的には、マイコン5の動作開始時に実行される初期設定処理により、AD変換開始タイマ21を構成するコンペアレジスタと、周期タスク起動タイマ22を構成するコンペアレジスタとのそれぞれには、比較値として、一定時間Tcに相当する同じ値が設定(即ち、セット)される。一定時間Tcに相当する値とは、一定時間Tcを内部クロックの1周期時間で割った値である。 Specifically, by the initial setting process executed at the start of the operation of the microcomputer 5, the compare register constituting the AD conversion start timer 21 and the compare register constituting the periodic task start timer 22 are compared with each other as a comparison value. , The same value corresponding to Tc for a certain period of time is set (that is, set). The value corresponding to the fixed time Tc is a value obtained by dividing the fixed time Tc by one cycle time of the internal clock.

そして、上記初期設定処理により、周期タスク起動タイマ22を構成するタイマカウンタには、初期値として例えば0が設定されるが、AD変換開始タイマ21を構成するタイマカウンタには、初期値として、所定時間Tsに相当する値が設定される。つまり、第1のトリガ信号が第2のトリガ信号よりも所定時間Tsだけ先に発生するように、AD変換開始タイマ21を構成するタイマカウンタの値にはオフセットが付けられる。そして、このような初期設定が終了すると、両タイマ21,22がスタートされる。即ち、両タイマ21,22におけるタイマカウンタのカウントアップが開始される。 Then, by the above initial setting process, for example, 0 is set as an initial value in the timer counter constituting the periodic task start timer 22, but a predetermined value is set as the initial value in the timer counter constituting the AD conversion start timer 21. A value corresponding to the time Ts is set. That is, the value of the timer counter constituting the AD conversion start timer 21 is offset so that the first trigger signal is generated before the second trigger signal by a predetermined time Ts. Then, when such initial setting is completed, both timers 21 and 22 are started. That is, the timer counter count-up in both timers 21 and 22 is started.

また、タイマ部19には、フリーランニングカウンタ(以下、FRC)30も備えられている。FRC30も、マイコン5の内部クロックでカウントアップされるカウンタである。そして、FRC30の値(以下、FRC値)は、所定の上限値になると0に戻る(即ち、ラップラウンドする)ようになっている。FRC値は、マイコン5において時刻の値として使用される。 The timer unit 19 is also provided with a free running counter (hereinafter, FRC) 30. The FRC 30 is also a counter that is counted up by the internal clock of the microcomputer 5. Then, the value of FRC30 (hereinafter, FRC value) returns to 0 (that is, laps round) when it reaches a predetermined upper limit value. The FRC value is used as a time value in the microcomputer 5.

[2.基本動作の説明]
図4に示すように、時刻t1にて、AD変換開始タイマ21が満了したとする。すると、第1のトリガ信号が発生して、AD変換部15が筒内圧信号のAD変換を開始する。そして、AD変換が完了すると、DMAC17にAD値のDMA転送要求が出力されて、DMAC17によるAD値のRAM13へのDMA転送が開始される。このDMA転送が完了することにより、AD値がRAM13に格納される。図4の例では、時刻t2でAD値のDMA転送が完了している。
[2. Explanation of basic operation]
As shown in FIG. 4, it is assumed that the AD conversion start timer 21 has expired at time t1. Then, the first trigger signal is generated, and the AD conversion unit 15 starts AD conversion of the in-cylinder pressure signal. Then, when the AD conversion is completed, a DMA transfer request for the AD value is output to the DMAC 17, and the DMA transfer of the AD value to the RAM 13 by the DMAC 17 is started. When this DMA transfer is completed, the AD value is stored in the RAM 13. In the example of FIG. 4, the DMA transfer of the AD value is completed at time t2.

また、第1のトリガ信号が発生してから所定時間Tsが経過した時刻t3になると、周期タスク起動タイマ22が満了して、第2のトリガ信号が発生し、周期タスクが起動する。つまり、CPU7が周期タスクの実行を開始する。そして、この周期タスクのなかで、前述のAD値使用処理が行われる。 Further, at the time t3 when the predetermined time Ts has elapsed since the first trigger signal was generated, the periodic task start timer 22 expires, the second trigger signal is generated, and the periodic task is activated. That is, the CPU 7 starts executing the periodic task. Then, in this periodic task, the above-mentioned AD value use process is performed.

ここで、AD値使用処理にて最新のAD変換によるAD値が使用されるようにするためには、周期タスクが起動される前に、直前に発生した第1のトリガ信号に伴うAD変換によるAD値のRAM13への格納(即ち、DMA転送)が完了していることが望ましい。 Here, in order to use the AD value by the latest AD conversion in the AD value use processing, the AD conversion accompanying the first trigger signal generated immediately before the periodic task is started is performed. It is desirable that the storage of the AD value in the RAM 13 (that is, DMA transfer) is completed.

このため、上記所定時間Tsは、第1及び第2のトリガ信号の発生周期である一定時間Tcよりも短いが、少なくとも、AD変換とAD値のRAM13への格納とに要するトータルの最小時間Tminよりは長い時間に設定されている。実際には、所定時間Tsは、上記最小時間Tminに所定のマージン時間を加えた時間に設定されている。 Therefore, the predetermined time Ts is shorter than the fixed time Tc, which is the generation cycle of the first and second trigger signals, but at least the total minimum time Tmin required for AD conversion and storage of the AD value in the RAM 13 is Tmin. It is set to a longer time than. Actually, the predetermined time Ts is set to a time obtained by adding a predetermined margin time to the minimum time Tmin.

よって、例えば優先度が高い別の信号のAD変換が実施されることで、筒内圧信号のAD変換が長い時間待たされたり、内部バス14の混雑によりAD値のDMA転送が長い時間待たされたりしなければ、周期タスクの起動前にAD値のRAM13への格納は完了する。 Therefore, for example, when the AD conversion of another signal having a high priority is performed, the AD conversion of the in-cylinder pressure signal is waited for a long time, or the DMA transfer of the AD value is waited for a long time due to the congestion of the internal bus 14. Otherwise, the storage of the AD value in the RAM 13 is completed before the periodic task is started.

そして、時刻t1から一定時間Tcが経過した時刻t4になると、再びAD変換開始タイマ21が満了して第1のトリガ信号が発生し、筒内圧信号のAD変換と、AD値のRAM13へのDMA転送とが順次実施される。図4の例では、時刻t5でAD値のDMA転送が完了している。 Then, at the time t4 when a certain time Tc has elapsed from the time t1, the AD conversion start timer 21 expires again and the first trigger signal is generated, the AD conversion of the in-cylinder pressure signal and the DMA of the AD value to the RAM 13 are performed. Transfers are carried out in sequence. In the example of FIG. 4, the DMA transfer of the AD value is completed at time t5.

また、時刻t2から一定時間Tcが経過した時刻t6になると、再び周期タスク起動タイマ22が満了して第2のトリガ信号が発生し、周期タスクが起動される。そして、この回の周期タスクでは、最新のAD変換によるAD値、即ち、直前に発生した第1のトリガ信号に伴うAD変換によるAD値が、使用されることになる。 Further, at the time t6 when a certain time Tc has elapsed from the time t2, the periodic task activation timer 22 expires again, a second trigger signal is generated, and the periodic task is activated. Then, in this periodic task, the latest AD value by AD conversion, that is, the AD value by AD conversion accompanying the first trigger signal generated immediately before is used.

[3.処理]
次に、マイコン5において第1のトリガ信号が発生する毎に行われる動作及び処理について、図2のフローチャートを用いて説明する。また、マイコン5において第2のトリガ信号が発生する毎に行われる動作及び処理について、図3のフローチャートを用いて説明する。尚、図2において、S110〜S170は、AD変換開始タイマ21、AD変換部15及びDMAC17によって行われる動作であり、S210〜S250は、CPU7がプログラムを実行することで行われる処理である。また、図3において、S310〜S330は、周期タスク起動タイマ22及びDMAC17によって行われる動作であり、S410〜S490は、CPU7がプログラムを実行することで行われる処理である。
[3. process]
Next, the operation and processing performed each time the first trigger signal is generated in the microcomputer 5 will be described with reference to the flowchart of FIG. Further, the operation and processing performed each time the second trigger signal is generated in the microcomputer 5 will be described with reference to the flowchart of FIG. In FIG. 2, S110 to S170 are operations performed by the AD conversion start timer 21, AD conversion unit 15, and DMAC 17, and S210 to S250 are processes performed by the CPU 7 executing the program. Further, in FIG. 3, S310 to S330 are operations performed by the periodic task start timer 22 and DMAC17, and S410 to S490 are processes performed by the CPU 7 executing a program.

図2において、S110に示すように、AD変換開始タイマ21が満了して第1のトリガ信号が発生すると、S120に示すように、AD変換部15が筒内圧信号のAD変換を実施する。そして、S130に示すように、AD変換が完了すると、DMAC17にAD値のDMA転送要求が出力される。このため、S140に示すように、DMAC17が、AD変換部15からRAM13へのAD値のDMA転送を実施する。 In FIG. 2, when the AD conversion start timer 21 expires and the first trigger signal is generated as shown in S110, the AD conversion unit 15 performs AD conversion of the in-cylinder pressure signal as shown in S120. Then, as shown in S130, when the AD conversion is completed, a DMA transfer request for the AD value is output to the DMAC17. Therefore, as shown in S140, the DMAC 17 performs the DMA transfer of the AD value from the AD conversion unit 15 to the RAM 13.

そして、S150に示すように、AD値のDMA転送が完了すると、即ち、AD値のRAM13への格納が完了すると、DMAC17にFRC値のDMA転送要求が出力される。このため、S160に示すように、DMAC17が、FRC30からRAM13へのFRC値のDMA転送を実施する。尚、FRC値のDMA転送要求は、例えばマイコン5における図示省略の要求発生部から出力されて良い。 Then, as shown in S150, when the DMA transfer of the AD value is completed, that is, when the storage of the AD value in the RAM 13 is completed, the DMA transfer request of the FRC value is output to the DMAC 17. Therefore, as shown in S160, the DMAC 17 performs the DMA transfer of the FRC value from the FRC 30 to the RAM 13. The DMA transfer request of the FRC value may be output from, for example, a request generation unit (not shown) in the microcomputer 5.

このS160でのDMA転送によって、RAM13には、現在のFRC値が、AD値のRAM13への格納が完了した時刻(以下、AD値格納完了時刻)として、記憶される。以下では、AD値格納完了時刻としてのFRC値のことを、単に、AD値格納完了時刻という。 By the DMA transfer in S160, the current FRC value is stored in the RAM 13 as the time when the storage of the AD value in the RAM 13 is completed (hereinafter, the AD value storage completion time). In the following, the FRC value as the AD value storage completion time is simply referred to as the AD value storage completion time.

また、RAM13には、AD値格納完了時刻の最新値と、当該最新値よりも1つ前の値である前回値とが、少なくとも格納される。図4に示すように、RAM13には、AD値格納完了時刻を記憶するための複数の領域RAM_AD[i]が用意されている。[]内の「i」は、順番を表す。例えば、今回の(即ち、最新の)AD値格納完了時刻がn番目であるとすると、このn番目のAD値格納完了時刻である「DAn」は、領域RAM_AD[n]に記憶される。また、前回のAD値格納完了時刻である「DAn-1」は、領域RAM_AD[n-1]に記憶されていることになる。 Further, the RAM 13 stores at least the latest value of the AD value storage completion time and the previous value which is one value before the latest value. As shown in FIG. 4, the RAM 13 is provided with a plurality of areas RAM_AD [i] for storing the AD value storage completion time. The "i" in [] indicates the order. For example, assuming that the current (that is, the latest) AD value storage completion time is the nth, the nth AD value storage completion time "DAn" is stored in the area RAM_AD [n]. Further, the previous AD value storage completion time "DAn-1" is stored in the area RAM_AD [n-1].

そして、S170に示すように、FRC値のDMA転送が完了すると、即ち、AD値格納完了時刻の記憶が完了すると、例えばマイコン5における上記要求発生部により割り込み要求が発生する。すると、CPU7が、S210〜S240の処理を、例えば割り込み処理として実行する。 Then, as shown in S170, when the DMA transfer of the FRC value is completed, that is, when the storage of the AD value storage completion time is completed, an interrupt request is generated by the request generation unit in the microcomputer 5, for example. Then, the CPU 7 executes the processing of S210 to S240 as, for example, interrupt processing.

ここで一旦、図3に基づく説明に移る。
図3において、S310に示すように、周期タスク起動タイマ22が満了して第2のトリガ信号が発生すると、周期タスクが起動されると共に、DMAC17にFRC値のDMA転送要求が出力される。このため、S320に示すように、DMAC17が、FRC30からRAM13へのFRC値のDMA転送を実施する。
Here, the description once moves to the description based on FIG.
In FIG. 3, as shown in S310, when the periodic task activation timer 22 expires and a second trigger signal is generated, the periodic task is activated and the DMA transfer request of the FRC value is output to the DMAC 17. Therefore, as shown in S320, the DMAC 17 performs the DMA transfer of the FRC value from the FRC 30 to the RAM 13.

このS320でのDMA転送によって、RAM13には、現在のFRC値が、周期タスクの起動時刻(以下、周期タスク起動時刻)として記憶される。この周期タスク起動時刻は、第2のトリガ信号が発生した時刻でもある。以下では、周期タスク起動時刻としてのFRC値のことを、単に、周期タスク起動時刻という。 By the DMA transfer in S320, the current FRC value is stored in the RAM 13 as the start time of the periodic task (hereinafter, the start time of the periodic task). This periodic task start time is also the time when the second trigger signal is generated. In the following, the FRC value as the periodic task activation time is simply referred to as the periodic task activation time.

また、RAM13には、周期タスク起動時刻の最新値と、当該最新値よりも1つ前の値である前回値とが、少なくとも格納される。図4に示すように、RAM13には、周期タスク起動時刻を記憶するための複数の領域RAM_TASK[i]が用意されている。[]内の「i」は、順番を表す。例えば、今回の(即ち、最新の)周期タスク起動時刻がn番目であるとすると、このn番目の周期タスク起動時刻である「DTn」は、領域RAM_TASK[n]に記憶される。また、前回の周期タスク起動時刻である「DTn-1」は、領域RAM_TASK[n-1]に記憶されていることになる。 Further, the RAM 13 stores at least the latest value of the periodic task start time and the previous value which is one value before the latest value. As shown in FIG. 4, the RAM 13 is provided with a plurality of areas RAM_TASK [i] for storing the periodic task start time. The "i" in [] indicates the order. For example, assuming that the current (that is, the latest) periodic task activation time is the nth, the nth periodic task activation time "DTn" is stored in the area RAM_TASK [n]. Further, the previous periodic task start time "DTn-1" is stored in the area RAM_TASK [n-1].

そして、S330に示すように、FRC値のDMA転送が完了すると、即ち、周期タスク起動時刻の記憶が完了すると、例えばマイコン5における上記要求発生部により割り込み要求が発生する。すると、CPU7が、S410〜S490の処理を、例えば割り込み処理として実行する。このため、周期タスクは、第2のトリガ信号の発生によって起動されるが、当該周期タスクの大部分又は全部は、図3におけるS410〜S490の処理の後に実行される。尚、S410〜S490の処理と周期タスクとが、例えばマルチタスクのかたちで並行して実行されても良い。 Then, as shown in S330, when the DMA transfer of the FRC value is completed, that is, when the storage of the periodic task start time is completed, an interrupt request is generated by the request generation unit in the microcomputer 5, for example. Then, the CPU 7 executes the processing of S410 to S490 as, for example, interrupt processing. Therefore, the periodic task is activated by the generation of the second trigger signal, but most or all of the periodic task is executed after the processing of S410 to S490 in FIG. The processing of S410 to S490 and the periodic task may be executed in parallel in the form of, for example, multitasking.

ここで、図2に基づく説明に戻る。
図2に示すように、CPU7は、第1のトリガ信号の発生に伴って行うS210〜S240の処理のうち、AD値格納完了時刻の記憶が完了した後のS210では、RAM13から、周期タスク起動時刻の最新値である「DTn」を読み出して取得する。更に、RAM13から、周期タスク起動時刻の前回値である「DTn-1」を読み出して取得する。尚、周期タスク起動時刻は、前述した図3のS320のDMA転送動作によってRAM13に記憶されている。
Here, the description returns to the description based on FIG.
As shown in FIG. 2, among the processes of S210 to S240 performed by the CPU 7 in connection with the generation of the first trigger signal, in S210 after the storage of the AD value storage completion time is completed, the periodic task is started from the RAM 13. Read and acquire "DTn" which is the latest value of the time. Further, "DTn-1", which is the previous value of the periodic task start time, is read and acquired from the RAM 13. The periodic task start time is stored in the RAM 13 by the DMA transfer operation of S320 in FIG. 3 described above.

CPU7は、次のS220にて、S210で取得した「DTn」と「DTn-1」との差である「DTn−DTn-1」が、正常範囲内か否かを判定する。「DTn−DTn-1」は、周期タスクの起動周期の測定値に該当する。正常範囲は、周期タスクの起動周期の正常範囲であり、一定時間Tcの設計上で設定された正常範囲である。例えば、正常範囲は、一定時間Tcの標準値の±10μsに設定されて良い。 In the next S220, the CPU 7 determines whether or not "DTn-DTn-1", which is the difference between "DTn" and "DTn-1" acquired in S210, is within the normal range. “DTn-DTn-1” corresponds to the measured value of the activation cycle of the periodic task. The normal range is the normal range of the activation cycle of the periodic task, and is the normal range set in the design of Tc for a certain period of time. For example, the normal range may be set to ± 10 μs, which is a standard value of Tc for a certain period of time.

例えば、図4における時刻t7でAD値のDMA転送が完了した後のS210では、図4における領域RAM_TASK[n]に記憶されている値(即ち、0x00001F45)が、周期タスク起動時刻の最新値「DTn」として読み出される。また、図4における領域RAM_TASK[n-1]に記憶されている値(即ち、0x00000FA5)が、周期タスク起動時刻の前回値「DTn-1」として読み出される。そして、この回のS220では、「0x00001F45−0x00000FA5」である「0xFA0」が、正常範囲内か否かが判定されることになる。尚、「0x…」は、ヘキサ表示の数値である。 For example, in S210 after the DMA transfer of the AD value is completed at time t7 in FIG. 4, the value (that is, 0x00001F45) stored in the area RAM_TASK [n] in FIG. 4 is the latest value of the periodic task start time. It is read as "DTn". Further, the value (that is, 0x00000FA5) stored in the area RAM_TASK [n-1] in FIG. 4 is read out as the previous value “DTn-1” of the periodic task start time. Then, in S220 of this time, it is determined whether or not "0xFA0", which is "0x00001F45-0x00000FA5", is within the normal range. In addition, "0x ..." is a numerical value displayed in hexagon.

CPU7は、S220にて、「DTn−DTn-1」が正常範囲内であると判定した場合には、そのまま図2の処理を終了するが、「DTn−DTn-1」が正常範囲内ではないと判定した場合には、S230に進む。 When the CPU 7 determines in S220 that "DTn-DTn-1" is within the normal range, the CPU 7 ends the process of FIG. 2 as it is, but "DTn-DTn-1" is not within the normal range. If it is determined, the process proceeds to S230.

CPU7は、S230では、「DTn−DTn-1」が正常範囲よりも大きいか否かを判定し、「DTn−DTn-1」が正常範囲よりも大きいと判定した場合、即ち、周期タスクの実際の起動周期が正常範囲よりも長かった場合には、S250に進む。そして、このS250にて、周期タスクを起動し、その後、S240に進む。尚、S250で起動された周期タスクは、例えば当該図2の処理が終了してから開始される。そして、S250で周期タスクが起動されることにより、周期タスクの実行回数が少なくなってしまうこと(即ち、タスク抜け)を抑制することができる。 In S230, the CPU 7 determines whether or not "DTn-DTn-1" is larger than the normal range, and when it is determined that "DTn-DTn-1" is larger than the normal range, that is, the actual periodic task. If the activation cycle of is longer than the normal range, the process proceeds to S250. Then, in this S250, the periodic task is started, and then the process proceeds to S240. The periodic task started in S250 is started, for example, after the process of FIG. 2 is completed. Then, when the periodic task is started in S250, it is possible to suppress that the number of times the periodic task is executed is reduced (that is, the task is omitted).

また、CPU7は、S230にて、「DTn−DTn-1」が正常範囲よりも大きくないと判定した場合、即ち、周期タスクの実際の起動周期が正常範囲よりも短かった場合には、そのままS240に進む。 Further, when the CPU 7 determines in S230 that "DTn-DTn-1" is not larger than the normal range, that is, when the actual start cycle of the periodic task is shorter than the normal range, S240 is used as it is. Proceed to.

そして、CPU7は、S240では、第2のトリガ信号が、一定時間Tc毎に、且つ、第1のトリガ信号の発生タイミングから所定時間Ts後に発生するように、周期タスク起動タイマ22を再スタートさせる。具体的には、周期タスク起動タイマ22を構成するコンペアレジスタに、一定時間Tcに相当する値を再セットする。更に、周期タスク起動タイマ22を構成するタイマカウンタには、第1のトリガ信号の今回の発生タイミングから所定時間Ts後に当該タイマ22が満了するようになる値をプリセットして、当該タイマカウンタのカウントアップをスタートさせる。尚、他の例として、S240では、AD変換開始タイマ21と周期タスク起動タイマ22との両方に対して、前述の初期設定処理で行われる設定と同じ設定が行われて、両タイマ21,22が再スタートされても良い。 Then, in S240, the CPU 7 restarts the periodic task start timer 22 so that the second trigger signal is generated every Tc for a certain period of time and after a predetermined time Ts from the generation timing of the first trigger signal. .. Specifically, the value corresponding to Tc is reset for a certain period of time in the compare register constituting the periodic task start timer 22. Further, the timer counter constituting the periodic task start timer 22 is preset with a value at which the timer 22 expires after a predetermined time Ts from the current generation timing of the first trigger signal, and the timer counter counts. Start up. As another example, in S240, both the AD conversion start timer 21 and the periodic task start timer 22 are set in the same manner as the settings performed in the above-mentioned initial setting process, and both timers 21 and 22 are set. May be restarted.

そして、CPU7は、このS240の処理を行った後、当該図2の処理を終了する。
一方、図3に示すように、CPU7は、第2のトリガ信号の発生に伴って行うS410〜S490の処理のうち、周期タスク起動時刻の記憶が完了した後のS410では、RAM13から、AD値格納完了時刻の最新値である「DAn」を読み出して取得する。更に、RAM13から、AD値格納完了時刻の前回値である「DAn-1」を読み出して取得する。尚、AD値格納完了時刻は、前述した図2のS160のDMA転送動作によってRAM13に記憶されている。
Then, the CPU 7 finishes the process of FIG. 2 after performing the process of S240.
On the other hand, as shown in FIG. 3, among the processes of S410 to S490 performed by the CPU 7 in connection with the generation of the second trigger signal, in S410 after the storage of the periodic task start time is completed, the AD value is determined from the RAM 13. Read and acquire "DAn" which is the latest value of the storage completion time. Further, "DAn-1", which is the previous value of the AD value storage completion time, is read and acquired from the RAM 13. The AD value storage completion time is stored in the RAM 13 by the DMA transfer operation of S160 in FIG. 2 described above.

CPU7は、次のS420にて、S410で取得した「DAn」と「DAn-1」との差である「DAn−DAn-1」が、正常範囲内か否かを判定する。「DAn−DAn-1」は、AD値の格納周期の測定値に該当する。この正常範囲は、AD値の格納周期の正常範囲であり、周期タスクの起動周期の正常範囲と同じ値に設定されても良いし、異なる値に設定されても良い。 In the next S420, the CPU 7 determines whether or not "DAn-DAn-1", which is the difference between "DAn" and "DAn-1" acquired in S410, is within the normal range. "DAn-DAn-1" corresponds to the measured value of the storage cycle of the AD value. This normal range is the normal range of the storage cycle of the AD value, and may be set to the same value as the normal range of the start cycle of the periodic task, or may be set to a different value.

例えば、図4における時刻t6で第2のトリガ信号が発生して、周期タスク起動時刻の記憶が完了した後のS410では、図4における領域RAM_AD[n]に記憶されている値(即ち、0x00001F40)が、AD値格納完了時刻の最新値「DAn」として読み出される。また、図4における領域RAM_AD[n-1]に記憶されている値(即ち、0x00000FA0)が、AD値格納完了時刻の前回値「DAn-1」として読み出される。そして、この回のS420では、「0x00001F40−0x00000FA0」である「0xFA0」が、正常範囲内か否かが判定されることになる。 For example, in S410 after the second trigger signal is generated at time t6 in FIG. 4 and the storage of the periodic task start time is completed, the value stored in the area RAM_AD [n] in FIG. 4 (that is, 0x00001F40). ) Is read as the latest value "DAn" of the AD value storage completion time. Further, the value (that is, 0x00000FA0) stored in the area RAM_AD [n-1] in FIG. 4 is read out as the previous value “DAn-1” of the AD value storage completion time. Then, in S420 of this time, it is determined whether or not "0xFA0", which is "0x00001F40-0x00000FA0", is within the normal range.

CPU7は、S420にて、「DAn−DAn-1」が正常範囲内ではないと判定した場合には、S430に進む。
CPU7は、S430では、「DAn−DAn-1」が正常範囲よりも大きいか否かを判定し、「DAn−DAn-1」が正常範囲よりも大きいと判定した場合、即ち、AD値の実際の格納周期が正常範囲よりも長かった場合には、S450に進む。そして、このS450にて、AD変換部15に筒内圧信号のAD変換を即座に開始させ、その後、S440に進む。S450でAD変換が開始されることにより、今回の周期タスクにて、より直前のAD値を使用することができる可能性を高めることができる。
When the CPU 7 determines in S420 that "DAn-DAn-1" is not within the normal range, the CPU 7 proceeds to S430.
In S430, the CPU 7 determines whether or not "DAn-DAn-1" is larger than the normal range, and when it is determined that "DAn-DAn-1" is larger than the normal range, that is, the actual AD value. If the storage cycle of is longer than the normal range, the process proceeds to S450. Then, in this S450, the AD conversion unit 15 immediately starts the AD conversion of the in-cylinder pressure signal, and then proceeds to S440. By starting the AD conversion in S450, it is possible to increase the possibility that the AD value immediately before can be used in this periodic task.

また、CPU7は、S430にて、「DAn−DAn-1」が正常範囲よりも大きくないと判定した場合、即ち、AD値の実際の格納周期が正常範囲よりも短かった場合には、そのままS440に進む。 Further, when the CPU 7 determines in S430 that "DAn-DAn-1" is not larger than the normal range, that is, when the actual storage cycle of the AD value is shorter than the normal range, S440 as it is. Proceed to.

そして、CPU7は、S440では、第1のトリガ信号が、一定時間Tc毎に、且つ、第2のトリガ信号の発生タイミングから「Tc−Ts」の時間後に発生するように、AD変換開始タイマ21を再スタートさせる。具体的には、AD変換開始タイマ21を構成するコンペアレジスタに、一定時間Tcに相当する値を再セットする。更に、AD変換開始タイマ21を構成するタイマカウンタには、第2のトリガ信号の今回の発生タイミングから「Tc−Ts」後に当該タイマ21が満了するようになる値をプリセットして、当該タイマカウンタのカウントアップをスタートさせる。尚、他の例として、S440では、AD変換開始タイマ21と周期タスク起動タイマ22との両方に対して、前述の初期設定処理で行われる設定と同じ設定が行われて、両タイマ21,22が再スタートされても良い。 Then, in S440, the CPU 7 causes the AD conversion start timer 21 so that the first trigger signal is generated every Tc for a certain period of time and after the time of "Tc-Ts" from the generation timing of the second trigger signal. To restart. Specifically, the value corresponding to Tc is reset for a certain period of time in the compare register constituting the AD conversion start timer 21. Further, the timer counter constituting the AD conversion start timer 21 is preset with a value at which the timer 21 expires after "Tc-Ts" from the current generation timing of the second trigger signal, and the timer counter is set. Start counting up. As another example, in S440, both the AD conversion start timer 21 and the periodic task start timer 22 are set to the same settings as those performed in the above-mentioned initial setting process, and both timers 21 and 22 are set. May be restarted.

そして、CPU7は、このS440の処理を行った後、当該図3の処理を終了する。
また、CPU7は、上記S420にて、「DAn−DAn-1」が正常範囲内であると判定した場合には、S460に進む。
Then, the CPU 7 finishes the process of FIG. 3 after performing the process of S440.
If the CPU 7 determines in S420 that "DAn-DAn-1" is within the normal range, the CPU 7 proceeds to S460.

CPU7は、S460では、RAM13から、AD値格納完了時刻の最新値である「DAn」を読み出して取得する。更に、RAM13から、周期タスク起動時刻の最新値である「DTn」と、周期タスク起動時刻の前回値である「DTn-1」とを読み出して取得する。 In S460, the CPU 7 reads and acquires "DAn", which is the latest value of the AD value storage completion time, from the RAM 13. Further, the latest value of the periodic task start time "DTn" and the previous value of the periodic task start time "DTn-1" are read and acquired from the RAM 13.

例えば、図4における時刻t6で第2のトリガ信号が発生して、周期タスク起動時刻の記憶が完了した後のS460では、この回のS410と同様に、図4における領域RAM_AD[n]に記憶されている値(即ち、0x00001F40)が、AD値格納完了時刻の最新値「DAn」として読み出される。そして、図4における領域RAM_TASK[n]に記憶されている値であって、今回のS320の動作で記憶された値(即ち、0x00001F45)が、周期タスク起動時刻の最新値「DTn」として読み出される。また、図4における領域RAM_TASK[n-1]に記憶されている値(即ち、0x00000FA5)が、周期タスク起動時刻の前回値「DTn-1」として読み出される。 For example, in S460 after the second trigger signal is generated at time t6 in FIG. 4 and the storage of the periodic task start time is completed, it is stored in the area RAM_AD [n] in FIG. 4 as in S410 of this time. The value (that is, 0x00001F40) is read out as the latest value "DAn" of the AD value storage completion time. Then, the value stored in the area RAM_TASK [n] in FIG. 4 and stored in the operation of S320 this time (that is, 0x00001F45) is read out as the latest value "DTn" of the periodic task start time. .. Further, the value (that is, 0x00000FA5) stored in the area RAM_TASK [n-1] in FIG. 4 is read out as the previous value “DTn-1” of the periodic task start time.

そして、CPU7は、次のS470にて、S460で取得した値について、「DTn-1<DAn<DTn」の大小関係が成立しているか否かを判定する。尚、大小関係を示す「<」は、時刻を表す数値に関しては「より大きい値である」ことを示しており、時刻そのものに関しては「より進んだ時刻である」ことを示している。また、「DAn」は、S460ではRAM13から読み出されずに、S410で読み出された「DAn」が、S470で使用されても良い。 Then, in the next S470, the CPU 7 determines whether or not the magnitude relationship of "DTn-1 <DAn <DTn" is established for the value acquired in S460. In addition, "<" indicating the magnitude relationship indicates that the numerical value indicating the time is "a larger value", and that the time itself is "an advanced time". Further, the "DAn" may not be read from the RAM 13 in S460, but the "DAn" read in S410 may be used in S470.

つまり、S470では、前回の周期タスク起動時刻(即ち、DTn-1)と、今回の周期タスク起動時刻(即ち、DTn)との間に、最新のAD値格納完了時刻(即ち、DAn)が入っているか否かを判定している。よって、このS470により、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かが判定される。 That is, in S470, the latest AD value storage completion time (that is, DAn) is inserted between the previous periodic task start time (that is, DTn-1) and the current periodic task start time (that is, DTn). It is judged whether or not it is. Therefore, according to this S470, it is determined whether or not the storage of the AD value in the RAM 13 is completed after the periodic task is started last time and before it is started this time.

CPU7は、上記S470にて、「DTn-1<DAn<DTn」の大小関係が成立していると判定した場合、即ち、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了していると判定した場合には、設計想定通り(即ち、正常)であることから、当該図3の処理を終了する。 When the CPU 7 determines in S470 that the magnitude relationship of "DTn-1 <DAn <DTn" is established, that is, the AD value RAM 13 after the periodic task was last started and before it is started this time. When it is determined that the storage in the storage is completed, the process is terminated as shown in FIG. 3 because it is as designed (that is, normal).

また、CPU7は、上記S470にて、「DTn-1<DAn<DTn」の大小関係が成立していないと判定した場合、即ち、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了していないと判定した場合には、S480に進む。 Further, when the CPU 7 determines in S470 that the magnitude relationship of "DTn-1 <DAn <DTn" is not established, that is, the AD value is obtained after the periodic task was last started and before it is started this time. If it is determined that the storage in the RAM 13 is not completed, the process proceeds to S480.

CPU7は、S480では、AD変換部15に筒内圧信号のAD変換を即座に開始させ、その後、S490に進む。S480でAD変換が開始されることにより、今回の周期タスクにて、より新しいAD値を使用することができる可能性を高めることができる。 In S480, the CPU 7 causes the AD conversion unit 15 to immediately start AD conversion of the in-cylinder pressure signal, and then proceeds to S490. By starting the AD conversion in S480, it is possible to increase the possibility that a newer AD value can be used in this periodic task.

そして、CPU7は、S490では、前述したS440と同様に、第1のトリガ信号が、一定時間Tc毎に、且つ、第2のトリガ信号の発生タイミングから「Tc−Ts」の時間後に発生するように、AD変換開始タイマ21を再スタートさせ、その後、当該図3の処理を終了する。尚、S490においても、AD変換開始タイマ21と周期タスク起動タイマ22との両方に対して、前述の初期設定処理で行われる設定と同じ設定が行われて、両タイマ21,22が再スタートされても良い。 Then, in S490, the CPU 7 causes the first trigger signal to be generated every Tc for a certain period of time and after a time of "Tc-Ts" from the generation timing of the second trigger signal, as in the case of S440 described above. The AD conversion start timer 21 is restarted, and then the process of FIG. 3 is terminated. Also in S490, both the AD conversion start timer 21 and the periodic task start timer 22 are set in the same manner as the settings performed in the above-mentioned initial setting process, and both timers 21 and 22 are restarted. You may.

[4.効果]
以上詳述した実施形態のECU1によれば、以下の効果を奏する。
(1−1)AD変換開始タイマ21によって発生される第1のトリガ信号をトリガとして、エンジン3の制御に用いられるアナログ信号のAD変換と、当該AD変換によるAD値のRAM13へのDMA転送(即ち、RAM13への格納)とが、順次実施される。一方、第1のトリガ信号に対して位相が所定時間Tsだけずれた第2のトリガ信号が、周期タスク起動タイマ22によって発生され、この第2のトリガ信号をトリガとして、周期タスクが起動される。このため、周期タスクの起動周期を安定させやすい。
[4. effect]
According to the ECU 1 of the embodiment described in detail above, the following effects are obtained.
(1-1) Using the first trigger signal generated by the AD conversion start timer 21 as a trigger, AD conversion of the analog signal used for controlling the engine 3 and DMA transfer of the AD value to the RAM 13 by the AD conversion (1-1). That is, storage in the RAM 13) is sequentially performed. On the other hand, a second trigger signal whose phase is out of phase with the first trigger signal by a predetermined time Ts is generated by the periodic task activation timer 22, and the periodic task is activated by using this second trigger signal as a trigger. .. Therefore, it is easy to stabilize the activation cycle of the periodic task.

比較例として、図5に示すように、第1のトリガ信号の発生によりAD変換が実施され、このAD変換によるAD値のRAM13へのDMA転送が完了したことをトリガとして、周期タスクが起動されるように構成されているとする。この比較例の場合、第1のトリガ信号が発生してからAD値のDMA転送が完了するまでの時間、即ち、AD変換とAD値のRAM13への格納とに要する時間が、例えば前述の要因により変動することで、周期タスクの起動周期が変動してしまう。これに対して、本実施形態では、一定時間Tc毎に発生される第2のトリガ信号により周期タスクが起動されるため、周期タスクの起動周期のずれを抑制し易い。 As a comparative example, as shown in FIG. 5, the AD conversion is performed by the generation of the first trigger signal, and the periodic task is started with the completion of the DMA transfer of the AD value to the RAM 13 by the AD conversion as a trigger. It is assumed that it is configured to. In the case of this comparative example, the time from the generation of the first trigger signal to the completion of the DMA transfer of the AD value, that is, the time required for the AD conversion and the storage of the AD value in the RAM 13 is, for example, the above-mentioned factors. As a result, the activation cycle of the periodic task fluctuates. On the other hand, in the present embodiment, since the periodic task is activated by the second trigger signal generated every Tc for a certain period of time, it is easy to suppress the deviation of the activation cycle of the periodic task.

(1−2)CPU7が、図3におけるS470の判定を行うことにより、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かの判定を行う。このため、周期タスクが前回起動してから今回起動する前にAD値のメモリへの格納が完了しなかったことを検知することができる。よって、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようになる。そして、この事態が生じた場合に、例えば、周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置や、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置等、制御性能の低下を抑制するための処置を実施することができるようになる。 (1-2) By determining S470 in FIG. 3, the CPU 7 determines whether or not the storage of the AD value in the RAM 13 is completed after the periodic task was last started and before it is started this time. .. Therefore, it is possible to detect that the storage of the AD value in the memory is not completed after the periodic task is started last time and before it is started this time. Therefore, it becomes possible to detect that the latest AD value cannot be used in the periodic task. Then, when this situation occurs, for example, in order to increase the possibility that a newer AD value can be used in the periodic task, or to suppress the influence of not being able to use the latest AD value in the periodic task. It becomes possible to carry out measures such as measures for suppressing deterioration of control performance.

周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置としては、例えば、図3のS480のように、第1のトリガ信号の発生とは関係なく直ぐにAD変換を開始させる、という処置であって良い。また、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置としては、例えば、過去の複数回のAD変換による各AD値から、演算により現在のアナログ信号の電圧値を予測し、その予測値をエンジン3の制御に使用する、という処置であって良い。 As a measure for increasing the possibility that a newer AD value can be used in the periodic task, for example, as shown in S480 of FIG. 3, the AD conversion is started immediately regardless of the generation of the first trigger signal. It may be. Further, as a measure for suppressing the influence of not being able to use the latest AD value in the periodic task, for example, the voltage value of the current analog signal is calculated from each AD value obtained by a plurality of AD conversions in the past. It may be a measure of predicting and using the predicted value for the control of the engine 3.

(2)CPU7は、第2のトリガ信号が発生する毎に、図3におけるS470の判定を行う。このため、周期タスクが起動される毎に、前回の起動から今回の起動までの間にAD値のRAM13への格納が完了しているか否かを、確認することができる。また、AD値のRAM13への格納が完了していなかった場合に、直ぐにAD変換を開始させることで、今回の周期タスクにおいてより新しいAD値が使用できる可能性を高めることができる。 (2) The CPU 7 determines S470 in FIG. 3 each time a second trigger signal is generated. Therefore, every time the periodic task is started, it can be confirmed whether or not the storage of the AD value in the RAM 13 is completed between the previous start and the current start. Further, when the storage of the AD value in the RAM 13 is not completed, the AD conversion is started immediately, so that the possibility that a newer AD value can be used in the current periodic task can be increased.

(3)AD値のRAM13への格納が完了する毎に、図2におけるS160のDMAC17の動作により、AD値格納完了時刻がRAM13に記憶される。また、第2のトリガ信号が発生する毎に、図3におけるS320のDMAC17の動作により、周期タスク起動時刻がRAM13に記憶される。そして、CPU7は、図3におけるS470では、RAM13に記憶されたAD値格納完了時刻と周期タスク起動時刻とに基づいて、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かの判定を行う。このため、当該判定を、時刻を比較することで実施することができる。 (3) Every time the storage of the AD value in the RAM 13 is completed, the AD value storage completion time is stored in the RAM 13 by the operation of the DMAC 17 in S160 in FIG. Further, each time a second trigger signal is generated, the periodic task start time is stored in the RAM 13 by the operation of the DMAC17 in S320 in FIG. Then, in S470 in FIG. 3, the CPU 7 moves to the AD value RAM 13 after the periodic task was last started and before it is started this time, based on the AD value storage completion time and the periodic task start time stored in the RAM 13. Judges whether or not the storage of is completed. Therefore, the determination can be performed by comparing the times.

(4)CPU7は、AD値のRAM13への格納が完了する毎に、図2におけるSS220の判定を行う。そして、このS220では、RAM13に記憶された最新の周期タスク起動時刻である「DTn」と、この「DTn」よりも1回前に記憶された周期タスク起動時刻である「DTn-1」との差に基づいて、周期タスクの起動周期が正常範囲内か否かを判定する。この判定は、周期タスクの起動有無に関係なく、第1のトリガ信号に起因するAD値のRAM13への格納完了をトリガとして実施されることから、周期タスクの起動周期の監視という面において信頼性が高い。 (4) The CPU 7 determines the SS 220 in FIG. 2 each time the storage of the AD value in the RAM 13 is completed. Then, in this S220, the latest periodic task activation time "DTn" stored in the RAM 13 and the periodic task activation time "DTn-1" stored one time before this "DTn" are combined. Based on the difference, it is determined whether or not the activation cycle of the periodic task is within the normal range. Since this determination is performed with the completion of storage of the AD value in the RAM 13 caused by the first trigger signal as a trigger regardless of whether or not the periodic task is activated, reliability is achieved in terms of monitoring the activation cycle of the periodic task. Is high.

(5)CPU7は、第2のトリガ信号が発生する毎に、図3におけるS420の判定を行う。そして、このS420では、RAM13に記憶された最新のAD値格納完了時刻である「DAn」と、この「DAn」よりも1回前に記憶されたAD値格納完了時刻である「DAn-1」との差に基づいて、AD値の格納周期が正常範囲内か否かを判定する。この判定は、AD変換の実施有無やAD値のRAM13への格納の実施有無に関係なく、第2のトリガ信号をトリガとして実施されることから、AD値の格納周期の監視という面において信頼性が高い。 (5) The CPU 7 determines S420 in FIG. 3 each time a second trigger signal is generated. Then, in this S420, "DAn" which is the latest AD value storage completion time stored in the RAM 13 and "DAn-1" which is the AD value storage completion time stored one time before this "DAn". Based on the difference from the above, it is determined whether or not the storage cycle of the AD value is within the normal range. Since this determination is performed using the second trigger signal as a trigger regardless of whether or not the AD conversion is performed or whether or not the AD value is stored in the RAM 13, it is reliable in terms of monitoring the storage cycle of the AD value. Is high.

尚、上記実施形態では、AD変換開始タイマ21が第1の発生部に相当する。周期タスク起動タイマが第2の発生部に相当する。S120の動作を行うAD変換部15と、S140の動作を行うDMAC17とが、変換格納実施部に相当する。RAM13がメモリに相当する。CPU7が、周期タスクを実行する実行部に相当する。また、S470の処理を行うCPU7は、順序監視部に相当する。S160の動作を行うDMAC17は、完了時刻記憶部する。S320の動作を行うDMAC17は、起動時刻記憶部に相当する。S220の処理を行うCPU7は、起動周期判定部に相当する。S420の処理を行うCPU7は、格納周期判定部に相当する。 In the above embodiment, the AD conversion start timer 21 corresponds to the first generation unit. The periodic task start timer corresponds to the second generation unit. The AD conversion unit 15 that performs the operation of S120 and the DMAC 17 that performs the operation of S140 correspond to the conversion storage execution unit. The RAM 13 corresponds to the memory. The CPU 7 corresponds to an execution unit that executes a periodic task. Further, the CPU 7 that performs the processing of S470 corresponds to the order monitoring unit. The DMAC 17 that performs the operation of S160 stores the completion time. The DMAC 17 that performs the operation of S320 corresponds to the start-up time storage unit. The CPU 7 that performs the processing of S220 corresponds to the startup cycle determination unit. The CPU 7 that performs the processing of S420 corresponds to the storage cycle determination unit.

[5.他の実施形態]
以上、本開示の実施形態について説明したが、本開示は上述の実施形態に限定されることなく、種々変形して実施することができる。
[5. Other embodiments]
Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments, and can be implemented in various modifications.

例えば、CPU7が、図2におけるS210の直前又は直後で、AD値のRAM13への格納回数をカウントし、図3におけるS410の直前又は直後で、周期タスクの起動回数をカウントし、更に図3におけるS470では、以下に述べる内容の判定を行っても良い。 For example, the CPU 7 counts the number of times the AD value is stored in the RAM 13 immediately before or after S210 in FIG. 2, counts the number of times the periodic task is activated immediately before or after S410 in FIG. 3, and further in FIG. In S470, the determination of the contents described below may be performed.

即ち、S470では、「AD値の格納回数が周期タスクの起動回数以上」であるか否かを判定しても良い。また、「AD値の格納回数と周期タスクの起動回数とが同じ」であるか否かを判定しても良い。このような判定によっても、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かを、判定することができる。 That is, in S470, it may be determined whether or not "the number of times the AD value is stored is equal to or greater than the number of times the periodic task is started". Further, it may be determined whether or not "the number of times the AD value is stored and the number of times the periodic task is started are the same". Also by such a determination, it can be determined whether or not the storage of the AD value in the RAM 13 is completed after the periodic task is started last time and before it is started this time.

一方、AD値は、RAM13とは別のメモリに格納(即ち、記憶)されても良い。また、AD値格納完了時刻と周期タスク起動時刻との両方又は一方は、AD値が記憶されるメモリとは別のメモリに記憶されても良い。 On the other hand, the AD value may be stored (that is, stored) in a memory different from the RAM 13. Further, both or one of the AD value storage completion time and the periodic task start time may be stored in a memory different from the memory in which the AD value is stored.

また、図2におけるS220及びS230と、図3におけるS420及びS430との、一方又は両方が実行されない構成であっても良い。また、制御対象は、エンジン3に限らず、例えば電動機やトランスミッション等であっても良い。 Further, one or both of S220 and S230 in FIG. 2 and S420 and S430 in FIG. 3 may not be executed. Further, the control target is not limited to the engine 3, and may be, for example, an electric motor, a transmission, or the like.

また、本開示に記載のECU1及びその手法は、コンピュータプログラムにより具体化された一つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリを構成することによって提供された専用コンピュータにより、実現されても良い。あるいは、本開示に記載のECU1及びその手法は、一つ以上の専用ハードウェア論理回路によってプロセッサを構成することによって提供された専用コンピュータにより、実現されても良い。もしくは、本開示に記載のECU1及びその手法は、一つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリと一つ以上のハードウェア論理回路によって構成されたプロセッサとの組み合わせにより構成された一つ以上の専用コンピュータにより、実現されても良い。また、コンピュータプログラムは、コンピュータにより実行されるインストラクションとして、コンピュータ読み取り可能な非遷移有形記録媒体に記憶されても良い。ECU1に含まれる各部の機能を実現する手法には、必ずしもソフトウェアが含まれている必要はなく、その全部の機能が、一つあるいは複数のハードウェアを用いて実現されても良い。 Further, the ECU 1 and its method described in the present disclosure are provided by a dedicated computer provided by configuring a processor and memory programmed to perform one or more functions embodied by a computer program. It may be realized. Alternatively, the ECU 1 and its method described in the present disclosure may be realized by a dedicated computer provided by configuring the processor with one or more dedicated hardware logic circuits. Alternatively, the ECU 1 and its method described in the present disclosure are configured by a combination of a processor and memory programmed to perform one or more functions and a processor composed of one or more hardware logic circuits. It may be realized by one or more dedicated computers. The computer program may also be stored on a computer-readable non-transitional tangible recording medium as an instruction executed by the computer. The method for realizing the functions of each part included in the ECU 1 does not necessarily include software, and all the functions may be realized by using one or a plurality of hardware.

また、上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしても良い。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしても良い。また、上記実施形態の構成の一部を省略しても良い。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換しても良い。 Further, a plurality of functions possessed by one component in the above embodiment may be realized by a plurality of components, or one function possessed by one component may be realized by a plurality of components. Further, a plurality of functions possessed by the plurality of components may be realized by one component, or one function realized by the plurality of components may be realized by one component. Further, a part of the configuration of the above embodiment may be omitted. Further, at least a part of the configuration of the above embodiment may be added or replaced with the configuration of the other above embodiment.

また、上述したECU1の他、当該ECU1を構成要素とするシステム、当該ECU1としてコンピュータを機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実体的記録媒体、順序異常判定方法など、種々の形態で本開示を実現することもできる。 Further, in addition to the above-mentioned ECU 1, a system having the ECU 1 as a component, a program for operating a computer as the ECU 1, a non-transitional substantive recording medium such as a semiconductor memory in which this program is recorded, an order abnormality determination method, etc. , The present disclosure can also be realized in various forms.

1…ECU、7…CPU、15…AD変換部、17…DMAコントローラ、21…AD変換開始タイマ、22…周期タスク起動タイマ。 1 ... ECU, 7 ... CPU, 15 ... AD conversion unit, 17 ... DMA controller, 21 ... AD conversion start timer, 22 ... periodic task start timer.

Claims (5)

第1のトリガ信号を一定時間(Tc)毎に発生させるように構成された第1の発生部(21)と、
前記第1のトリガ信号が発生すると、制御対象の制御に用いられるアナログ信号のAD変換を実施し、当該AD変換が完了すると、当該AD変換の結果であるAD値をメモリ(13)に格納するように構成された変換格納実施部(15,17,S120,S140)と、
前記第1のトリガ信号の発生タイミングから、前記AD変換と前記AD値の前記メモリへの格納とに要する最小時間よりも長く、且つ、前記一定時間よりは短い時間に設定された所定時間(Ts)だけずれたタイミングで、第2のトリガ信号を発生させるように構成された第2の発生部(22)と、
前記第2のトリガ信号が発生すると、前記制御を行うためのタスクとして、前記メモリに格納されている前記AD値を使用する処理を含む周期タスクを実行するように構成された実行部(7)と、
前記周期タスクが前回起動されてから今回起動される前に前記変換格納実施部による前記AD値の前記メモリへの格納が完了したか否かの、判定を行うように構成された順序監視部(7,S470)と、
を備える電子制御装置。
A first generating unit (21) configured to generate a first trigger signal at regular time intervals (Tc), and
When the first trigger signal is generated, AD conversion of the analog signal used for controlling the controlled object is performed, and when the AD conversion is completed, the AD value as a result of the AD conversion is stored in the memory (13). The conversion storage execution unit (15, 17, S120, S140) configured as described above,
A predetermined time (Ts) set to a time longer than the minimum time required for the AD conversion and the storage of the AD value in the memory from the generation timing of the first trigger signal and shorter than the fixed time. A second generator (22) configured to generate a second trigger signal at a timing deviated by).
When the second trigger signal is generated, an execution unit (7) configured to execute a periodic task including a process using the AD value stored in the memory as a task for performing the control. When,
An order monitoring unit configured to determine whether or not the conversion storage execution unit has completed the storage of the AD value in the memory after the periodic task was last started and before it is started this time. 7, S470) and
An electronic control device comprising.
請求項1に記載の電子制御装置であって、
前記順序監視部は、
前記第2のトリガ信号が発生する毎に、前記判定を行うように構成されている、
電子制御装置。
The electronic control device according to claim 1.
The order monitoring unit
The determination is made each time the second trigger signal is generated.
Electronic control device.
請求項1又は請求項2に記載の電子制御装置であって、
前記AD値の前記メモリへの格納が完了する毎に、前記AD値の前記メモリへの格納が完了した時刻である格納完了時刻を記憶するように構成された完了時刻記憶部(17,S160)と、
前記第2のトリガ信号が発生する毎に、当該第2のトリガ信号が発生した時刻を、前記周期タスクの起動時刻として記憶するように構成された起動時刻記憶部(17,S320)と、を備え、
前記順序監視部は、前記完了時刻記憶部により記憶された前記格納完了時刻と、前記起動時刻記憶部により記憶された前記起動時刻とに基づいて、前記判定を行うように構成されている、
電子制御装置。
The electronic control device according to claim 1 or 2.
Completion time storage unit (17, S160) configured to store the storage completion time, which is the time when the storage of the AD value in the memory is completed each time the storage of the AD value in the memory is completed. When,
Each time the second trigger signal is generated, the start-up time storage unit (17, S320) configured to store the time when the second trigger signal is generated as the start-up time of the periodic task. Prepare,
The order monitoring unit is configured to perform the determination based on the storage completion time stored by the completion time storage unit and the activation time stored by the activation time storage unit.
Electronic control device.
請求項3に記載の電子制御装置であって、
前記AD値の前記メモリへの格納が完了する毎に、前記起動時刻記憶部により記憶された前記起動時刻のうち、最新の前記起動時刻と、当該最新の前記起動時刻よりも1回前に記憶された前記起動時刻との差に基づいて、前記周期タスクの起動周期が正常範囲内か否かを判定するように構成された起動周期判定部(7,S220)、を更に備える、
電子制御装置。
The electronic control device according to claim 3.
Each time the storage of the AD value in the memory is completed, the latest start time and one time before the latest start time among the start times stored by the start time storage unit are stored. A start cycle determination unit (7, S220) configured to determine whether or not the start cycle of the cycle task is within the normal range based on the difference from the start time is further provided.
Electronic control device.
請求項3又は請求項4に記載の電子制御装置であって、
前記第2のトリガ信号が発生する毎に、前記完了時刻記憶部により記憶された前記格納完了時刻のうち、最新の前記格納完了時刻と、当該最新の前記格納完了時刻よりも1回前に記憶された前記格納完了時刻との差に基づいて、前記AD値の格納周期が正常範囲内か否かを判定するように構成された格納周期判定部(7,S420)、を更に備える、
電子制御装置。
The electronic control device according to claim 3 or 4.
Each time the second trigger signal is generated, among the storage completion times stored by the completion time storage unit, the latest storage completion time and the latest storage completion time are stored one time before the storage completion time. A storage cycle determination unit (7, S420) configured to determine whether or not the storage cycle of the AD value is within the normal range based on the difference from the storage completion time is further provided.
Electronic control device.
JP2020067803A 2020-04-03 2020-04-03 electronic control unit Active JP7435182B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020067803A JP7435182B2 (en) 2020-04-03 2020-04-03 electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020067803A JP7435182B2 (en) 2020-04-03 2020-04-03 electronic control unit

Publications (2)

Publication Number Publication Date
JP2021163425A true JP2021163425A (en) 2021-10-11
JP7435182B2 JP7435182B2 (en) 2024-02-21

Family

ID=78005044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020067803A Active JP7435182B2 (en) 2020-04-03 2020-04-03 electronic control unit

Country Status (1)

Country Link
JP (1) JP7435182B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024004414A1 (en) * 2022-06-27 2024-01-04 日立Astemo株式会社 Information processing device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005190195A (en) * 2003-12-25 2005-07-14 Renesas Technology Corp Microcontroller
JP2010146258A (en) * 2008-12-18 2010-07-01 Denso Corp Signal processing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4841927B2 (en) 2005-10-20 2011-12-21 富士通株式会社 Asynchronous transmission device and asynchronous transmission method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005190195A (en) * 2003-12-25 2005-07-14 Renesas Technology Corp Microcontroller
JP2010146258A (en) * 2008-12-18 2010-07-01 Denso Corp Signal processing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024004414A1 (en) * 2022-06-27 2024-01-04 日立Astemo株式会社 Information processing device

Also Published As

Publication number Publication date
JP7435182B2 (en) 2024-02-21

Similar Documents

Publication Publication Date Title
JPH0238791B2 (en)
US8417990B2 (en) Multi-core processing system for vehicle control or an internal combustion engine controller
JP2007334587A (en) Abnormality monitoring program, recording medium and electronic apparatus
JP6598592B2 (en) Semiconductor integrated circuit and electronic control unit
JP7147615B2 (en) task management device
JP2011153596A (en) Internal combustion engine control device
JP2009282828A (en) Microcomputer
JP2021163425A (en) Electronic control device
JPS6158841B2 (en)
JP2020036095A (en) Pulse signal abnormality detection device
JP2000199450A (en) Engine control device
EP2667199B1 (en) Semiconductor data processing apparatus and engine control apparatus
JPH0844594A (en) Data processor
JPH11232148A (en) Method and system for measuring load rate of computer
JP7517188B2 (en) Engine Control Unit
JP2016162330A (en) Electronic controller
JP6172040B2 (en) Electronic control unit
JP2002041493A (en) Microcomputer
JP2018181199A (en) Electronic control apparatus
JP2001323836A (en) Abnormality detection method for crank synchronous task
WO2019159310A1 (en) Electronic control device
JP2012108786A (en) Microcomputer and processing synchronization method
JP2020173644A (en) Electronic controller
JP6665632B2 (en) Electronic control unit
JP7314838B2 (en) electronic controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220714

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230905

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: 20240109

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240122

R151 Written notification of patent or utility model registration

Ref document number: 7435182

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151