JP2021163425A - Electronic control device - Google Patents
Electronic control device Download PDFInfo
- 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
Links
- 238000006243 chemical reaction Methods 0.000 claims abstract description 101
- 230000000737 periodic effect Effects 0.000 claims description 122
- 238000000034 method Methods 0.000 claims description 40
- 230000004913 activation Effects 0.000 claims description 24
- 238000012544 monitoring process Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 abstract description 14
- 230000000087 stabilizing effect Effects 0.000 abstract 1
- 238000012546 transfer Methods 0.000 description 34
- MHABMANUFPZXEB-UHFFFAOYSA-N O-demethyl-aloesaponarin I Natural products O=C1C2=CC=CC(O)=C2C(=O)C2=C1C=C(O)C(C(O)=O)=C2C MHABMANUFPZXEB-UHFFFAOYSA-N 0.000 description 15
- 230000006870 function Effects 0.000 description 8
- 230000000052 comparative effect Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000446 fuel Substances 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Combined Controls Of Internal Combustion Engines (AREA)
Abstract
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
上記特許文献1に記載の技術に関連して、発明者の詳細な検討の結果、以下の課題が見出された。
制御対象を制御するためのタスクとして、一定時間毎に起動されるタスク(即ち、周期タスク)があり、この周期タスクにより、アナログ信号のAD値を使用する処理を行うとする。言い換えると、周期タスクに、AD値を使用する処理が含まれているとする。尚、ここで言うタスクはソフトウェアの実行単位のことである。また、周期タスクの起動とは、周期タスクの実行を開始させることである。
As a result of detailed examination by the inventor in relation to the technique described in
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.
以下、図面を参照しながら、本開示の実施形態を説明する。
[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
マイコン5は、CPU7と、CPU7により実行されるプログラムが格納されたROM11と、CPU7によって演算される対象のデータや演算結果等が記憶されるRAM13と、内部バス14と、を備える。尚、CPU7は、1つに限らず、複数備えられても良い。
The
更に、マイコン5は、1つ以上のアナログ信号をAD変換(即ち、アナログ/デジタル変換)するAD変換部15と、プログラムによって指定されたデータのRAM13への転送を行うDMAコントローラ(以下、DMAC)17と、タイマ部19と、を備える。DMAは、「Direct Memory Access」の略である。
Further, the
制御対象としてのエンジン3に備えられた複数の各気筒31には、筒内圧力に応じた電圧となる筒内圧信号を出力する圧力センサ33がそれぞれ設けられている。
マイコン5には、AD変換対象のアナログ信号として、各圧力センサ33からの筒内圧信号が入力される。そして、マイコン5に入力される筒内圧信号のそれぞれは、AD変換部15によってAD変換される。以下では、説明を簡略化するため、AD変換されるアナログ信号が1つの筒内圧信号である、として説明する。
Each of the plurality of
The in-cylinder pressure signal from each
マイコン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
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
Then, the AD value stored in the
タイマ部19は、少なくとも2つのタイマ21,22を備える。
各タイマ21、22は、マイコン5の内部クロックでカウントアップされるタイマカウンタと、コンペアレジスタとを備える。そして、各タイマ21,22は、タイマカウンタの値が、コンペアレジスタに予め設定されている値(即ち、比較値)と同じになると、トリガ信号を発生させる(即ち、出力する)と共に、その時点でタイマカウンタの値が0に戻るように構成されている。
The
Each of the
このため、例えば、タイマ21からは、当該タイマ21を構成するタイマカウンタの値が当該タイマ21を構成するコンペアレジスタ内の比較値と一致する毎であって、「比較値×内部クロックの1周期時間」の一定時間毎に、トリガ信号が出力される。タイマ22についても同様である。尚、以下の説明において、タイマ21,22が満了するとは、タイマカウンタの値がコンペアレジスタ内の比較値と一致した、ということを意味する。
Therefore, for example, from the
タイマ21によって発生されるトリガ信号は、AD変換部15にAD変換を開始させるためのトリガ信号として使用される。また、タイマ22によって発生されるトリガ信号は、周期タスクを起動するためのトリガ信号として使用される。
The trigger signal generated by the
以下では、タイマ21,22を特に区別して呼称する場合には、タイマ21を、AD変換開始タイマ21と言い、タイマ22を、周期タスク起動タイマ22と言う。また、AD変換開始タイマ21によって発生されるトリガ信号を、第1のトリガ信号とも言い、周期タスク起動タイマ22によって発生されるトリガ信号を、第2のトリガ信号とも言う。
Hereinafter, when the
ここで、図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
具体的には、マイコン5の動作開始時に実行される初期設定処理により、AD変換開始タイマ21を構成するコンペアレジスタと、周期タスク起動タイマ22を構成するコンペアレジスタとのそれぞれには、比較値として、一定時間Tcに相当する同じ値が設定(即ち、セット)される。一定時間Tcに相当する値とは、一定時間Tcを内部クロックの1周期時間で割った値である。
Specifically, by the initial setting process executed at the start of the operation of the
そして、上記初期設定処理により、周期タスク起動タイマ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
また、タイマ部19には、フリーランニングカウンタ(以下、FRC)30も備えられている。FRC30も、マイコン5の内部クロックでカウントアップされるカウンタである。そして、FRC30の値(以下、FRC値)は、所定の上限値になると0に戻る(即ち、ラップラウンドする)ようになっている。FRC値は、マイコン5において時刻の値として使用される。
The
[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
また、第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
ここで、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
よって、例えば優先度が高い別の信号の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
そして、時刻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
また、時刻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
[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
図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
そして、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
このS160でのDMA転送によって、RAM13には、現在のFRC値が、AD値のRAM13への格納が完了した時刻(以下、AD値格納完了時刻)として、記憶される。以下では、AD値格納完了時刻としてのFRC値のことを、単に、AD値格納完了時刻という。
By the DMA transfer in S160, the current FRC value is stored in the
また、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
そして、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
ここで一旦、図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
このS320でのDMA転送によって、RAM13には、現在のFRC値が、周期タスクの起動時刻(以下、周期タスク起動時刻)として記憶される。この周期タスク起動時刻は、第2のトリガ信号が発生した時刻でもある。以下では、周期タスク起動時刻としてのFRC値のことを、単に、周期タスク起動時刻という。
By the DMA transfer in S320, the current FRC value is stored in the
また、RAM13には、周期タスク起動時刻の最新値と、当該最新値よりも1つ前の値である前回値とが、少なくとも格納される。図4に示すように、RAM13には、周期タスク起動時刻を記憶するための複数の領域RAM_TASK[i]が用意されている。[]内の「i」は、順番を表す。例えば、今回の(即ち、最新の)周期タスク起動時刻がn番目であるとすると、このn番目の周期タスク起動時刻である「DTn」は、領域RAM_TASK[n]に記憶される。また、前回の周期タスク起動時刻である「DTn-1」は、領域RAM_TASK[n-1]に記憶されていることになる。
Further, the
そして、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
ここで、図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
CPU7は、次のS220にて、S210で取得した「DTn」と「DTn-1」との差である「DTn−DTn-1」が、正常範囲内か否かを判定する。「DTn−DTn-1」は、周期タスクの起動周期の測定値に該当する。正常範囲は、周期タスクの起動周期の正常範囲であり、一定時間Tcの設計上で設定された正常範囲である。例えば、正常範囲は、一定時間Tcの標準値の±10μsに設定されて良い。
In the next S220, the
例えば、図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
CPU7は、S230では、「DTn−DTn-1」が正常範囲よりも大きいか否かを判定し、「DTn−DTn-1」が正常範囲よりも大きいと判定した場合、即ち、周期タスクの実際の起動周期が正常範囲よりも長かった場合には、S250に進む。そして、このS250にて、周期タスクを起動し、その後、S240に進む。尚、S250で起動された周期タスクは、例えば当該図2の処理が終了してから開始される。そして、S250で周期タスクが起動されることにより、周期タスクの実行回数が少なくなってしまうこと(即ち、タスク抜け)を抑制することができる。
In S230, the
また、CPU7は、S230にて、「DTn−DTn-1」が正常範囲よりも大きくないと判定した場合、即ち、周期タスクの実際の起動周期が正常範囲よりも短かった場合には、そのままS240に進む。
Further, when the
そして、CPU7は、S240では、第2のトリガ信号が、一定時間Tc毎に、且つ、第1のトリガ信号の発生タイミングから所定時間Ts後に発生するように、周期タスク起動タイマ22を再スタートさせる。具体的には、周期タスク起動タイマ22を構成するコンペアレジスタに、一定時間Tcに相当する値を再セットする。更に、周期タスク起動タイマ22を構成するタイマカウンタには、第1のトリガ信号の今回の発生タイミングから所定時間Ts後に当該タイマ22が満了するようになる値をプリセットして、当該タイマカウンタのカウントアップをスタートさせる。尚、他の例として、S240では、AD変換開始タイマ21と周期タスク起動タイマ22との両方に対して、前述の初期設定処理で行われる設定と同じ設定が行われて、両タイマ21,22が再スタートされても良い。
Then, in S240, the
そして、CPU7は、このS240の処理を行った後、当該図2の処理を終了する。
一方、図3に示すように、CPU7は、第2のトリガ信号の発生に伴って行うS410〜S490の処理のうち、周期タスク起動時刻の記憶が完了した後のS410では、RAM13から、AD値格納完了時刻の最新値である「DAn」を読み出して取得する。更に、RAM13から、AD値格納完了時刻の前回値である「DAn-1」を読み出して取得する。尚、AD値格納完了時刻は、前述した図2のS160のDMA転送動作によってRAM13に記憶されている。
Then, the
On the other hand, as shown in FIG. 3, among the processes of S410 to S490 performed by the
CPU7は、次のS420にて、S410で取得した「DAn」と「DAn-1」との差である「DAn−DAn-1」が、正常範囲内か否かを判定する。「DAn−DAn-1」は、AD値の格納周期の測定値に該当する。この正常範囲は、AD値の格納周期の正常範囲であり、周期タスクの起動周期の正常範囲と同じ値に設定されても良いし、異なる値に設定されても良い。
In the next S420, the
例えば、図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
In S430, the
また、CPU7は、S430にて、「DAn−DAn-1」が正常範囲よりも大きくないと判定した場合、即ち、AD値の実際の格納周期が正常範囲よりも短かった場合には、そのままS440に進む。
Further, when the
そして、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
そして、CPU7は、このS440の処理を行った後、当該図3の処理を終了する。
また、CPU7は、上記S420にて、「DAn−DAn-1」が正常範囲内であると判定した場合には、S460に進む。
Then, the
If the
CPU7は、S460では、RAM13から、AD値格納完了時刻の最新値である「DAn」を読み出して取得する。更に、RAM13から、周期タスク起動時刻の最新値である「DTn」と、周期タスク起動時刻の前回値である「DTn-1」とを読み出して取得する。
In S460, the
例えば、図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
つまり、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
CPU7は、上記S470にて、「DTn-1<DAn<DTn」の大小関係が成立していると判定した場合、即ち、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了していると判定した場合には、設計想定通り(即ち、正常)であることから、当該図3の処理を終了する。
When the
また、CPU7は、上記S470にて、「DTn-1<DAn<DTn」の大小関係が成立していないと判定した場合、即ち、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了していないと判定した場合には、S480に進む。
Further, when the
CPU7は、S480では、AD変換部15に筒内圧信号のAD変換を即座に開始させ、その後、S490に進む。S480でAD変換が開始されることにより、今回の周期タスクにて、より新しいAD値を使用することができる可能性を高めることができる。
In S480, the
そして、CPU7は、S490では、前述したS440と同様に、第1のトリガ信号が、一定時間Tc毎に、且つ、第2のトリガ信号の発生タイミングから「Tc−Ts」の時間後に発生するように、AD変換開始タイマ21を再スタートさせ、その後、当該図3の処理を終了する。尚、S490においても、AD変換開始タイマ21と周期タスク起動タイマ22との両方に対して、前述の初期設定処理で行われる設定と同じ設定が行われて、両タイマ21,22が再スタートされても良い。
Then, in S490, the
[4.効果]
以上詳述した実施形態のECU1によれば、以下の効果を奏する。
(1−1)AD変換開始タイマ21によって発生される第1のトリガ信号をトリガとして、エンジン3の制御に用いられるアナログ信号のAD変換と、当該AD変換によるAD値のRAM13へのDMA転送(即ち、RAM13への格納)とが、順次実施される。一方、第1のトリガ信号に対して位相が所定時間Tsだけずれた第2のトリガ信号が、周期タスク起動タイマ22によって発生され、この第2のトリガ信号をトリガとして、周期タスクが起動される。このため、周期タスクの起動周期を安定させやすい。
[4. effect]
According to the
(1-1) Using the first trigger signal generated by the AD conversion start
比較例として、図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
(1−2)CPU7が、図3におけるS470の判定を行うことにより、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かの判定を行う。このため、周期タスクが前回起動してから今回起動する前にAD値のメモリへの格納が完了しなかったことを検知することができる。よって、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようになる。そして、この事態が生じた場合に、例えば、周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置や、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置等、制御性能の低下を抑制するための処置を実施することができるようになる。
(1-2) By determining S470 in FIG. 3, the
周期タスクにおいてより新しい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
(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
(4)CPU7は、AD値のRAM13への格納が完了する毎に、図2におけるSS220の判定を行う。そして、このS220では、RAM13に記憶された最新の周期タスク起動時刻である「DTn」と、この「DTn」よりも1回前に記憶された周期タスク起動時刻である「DTn-1」との差に基づいて、周期タスクの起動周期が正常範囲内か否かを判定する。この判定は、周期タスクの起動有無に関係なく、第1のトリガ信号に起因するAD値のRAM13への格納完了をトリガとして実施されることから、周期タスクの起動周期の監視という面において信頼性が高い。
(4) The
(5)CPU7は、第2のトリガ信号が発生する毎に、図3におけるS420の判定を行う。そして、このS420では、RAM13に記憶された最新のAD値格納完了時刻である「DAn」と、この「DAn」よりも1回前に記憶されたAD値格納完了時刻である「DAn-1」との差に基づいて、AD値の格納周期が正常範囲内か否かを判定する。この判定は、AD変換の実施有無やAD値のRAM13への格納の実施有無に関係なく、第2のトリガ信号をトリガとして実施されることから、AD値の格納周期の監視という面において信頼性が高い。
(5) The
尚、上記実施形態では、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
[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
即ち、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
一方、AD値は、RAM13とは別のメモリに格納(即ち、記憶)されても良い。また、AD値格納完了時刻と周期タスク起動時刻との両方又は一方は、AD値が記憶されるメモリとは別のメモリに記憶されても良い。
On the other hand, the AD value may be stored (that is, stored) in a memory different from the
また、図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
また、上記実施形態における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
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のトリガ信号が発生すると、制御対象の制御に用いられるアナログ信号の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.
前記順序監視部は、
前記第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.
前記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.
前記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.
前記第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.
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024004414A1 (en) * | 2022-06-27 | 2024-01-04 | 日立Astemo株式会社 | Information processing device |
Citations (2)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4841927B2 (en) | 2005-10-20 | 2011-12-21 | 富士通株式会社 | Asynchronous transmission device and asynchronous transmission method |
-
2020
- 2020-04-03 JP JP2020067803A patent/JP7435182B2/en active Active
Patent Citations (2)
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)
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 |