JP7435182B2 - electronic control unit - Google Patents
electronic control unit Download PDFInfo
- Publication number
- JP7435182B2 JP7435182B2 JP2020067803A JP2020067803A JP7435182B2 JP 7435182 B2 JP7435182 B2 JP 7435182B2 JP 2020067803 A JP2020067803 A JP 2020067803A JP 2020067803 A JP2020067803 A JP 2020067803A JP 7435182 B2 JP7435182 B2 JP 7435182B2
- 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.)
- Active
Links
- 230000000737 periodic effect Effects 0.000 claims description 124
- 238000006243 chemical reaction Methods 0.000 claims description 92
- 230000004913 activation Effects 0.000 claims description 64
- 238000000034 method Methods 0.000 claims description 44
- 230000008569 process Effects 0.000 claims description 38
- 238000012544 monitoring process Methods 0.000 claims description 9
- 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 18
- 238000012545 processing Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 6
- 239000000470 constituent Substances 0.000 description 4
- 230000000052 comparative effect Effects 0.000 description 3
- 230000003213 activating effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006866 deterioration Effects 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
- 230000000087 stabilizing effect Effects 0.000 description 1
Images
Landscapes
- Combined Controls Of Internal Combustion Engines (AREA)
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 study by the inventor, the following problems were discovered in relation to the technique described in
As a task for controlling a controlled object, there is a task (ie, a periodic task) that is started at regular intervals, and this periodic task performs processing using the AD value of an analog signal. In other words, it is assumed that the periodic task includes processing that uses an AD value. Note that the task here refers to an execution unit of software. Furthermore, activating a periodic task means starting execution of the periodic task.
発明者は、AD変換トリガ信号の発生タイミングから所定時間だけずれたタイミングで別のトリガ信号を発生させ、この別のトリガ信号の発生により、上記周期タスクが起動される構成を考えた。この構成によれば、周期タスクの起動周期を安定させやすい。上記別のトリガ信号は、AD変換トリガ信号と同様に、タイマなどによって高い精度の周期で発生させることができるからである。 The inventor considered a configuration in which another trigger signal is generated at a timing shifted by a predetermined time from the generation timing of the AD conversion trigger signal, and the periodic task is activated by the generation of this other trigger signal. According to this configuration, it is easy to stabilize the activation cycle of the periodic task. This is because, like the AD conversion trigger signal, the above-mentioned different trigger signal can be generated with a highly accurate cycle using a timer or the like.
そして、この構成の場合、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 the time expected to be required for AD conversion of the analog signal and storage of the AD value in the memory. What is necessary is to set the time to a time longer than the fixed time and shorter than the above-mentioned fixed time.
ところで、AD変換とAD値のメモリへの格納とに要する時間は、種々の要因により、ばらつく可能性がある。ここで言うAD変換に要する時間とは、AD変換トリガ信号が発生してからAD変換が完了するまでの時間である。例えば、AD変換に要する時間は、別の高優先度のAD変換が実施された場合に、該当のAD変換の開始が待たされることで、長くなる可能性がある。また、AD値のメモリへの格納に要する時間は、バスの混み具合により、長くなる可能性がある。 Incidentally, the time required for AD conversion and storage of AD values in memory may vary due to various factors. The time required for AD conversion here is the time from when an AD conversion trigger signal is generated until AD conversion is completed. For example, when another high-priority AD conversion is performed, the time required for AD conversion may become longer because the start of the corresponding AD conversion is forced to wait. Furthermore, the time required to store the AD value in the memory may become longer depending on how busy the bus is.
そして、AD変換トリガ信号の発生からAD値のメモリへの格納が完了するまでの時間が、上記所定時間よりも長くなった場合には、最新のAD変換によるAD値がメモリに格納される前に周期タスクが起動される。すると、周期タスクにおいて最新のAD値を使用することができなくなる。 If the time from the generation of the AD conversion trigger signal to the completion of storing the AD value in the memory is longer than the above-mentioned predetermined time, the AD value due to the latest AD conversion is not stored in the memory. A periodic task is started. Then, the latest AD value cannot be used in the periodic task.
このような事態を検知できないと、例えば周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置や、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置等、制御性能の低下を抑制するための処置を実施することができない。 If such a situation cannot be detected, for example, measures may be taken to increase the possibility that newer AD values can be used in periodic tasks, measures to suppress the effects of not being able to use the latest AD values in periodic tasks, etc. , it is not possible to take measures to suppress the decline in control performance.
そこで、本開示の1つの局面は、周期タスクの起動周期を安定させつつ、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようにする。 Accordingly, one aspect of the present disclosure makes it possible to detect a situation in which the latest AD value cannot be used in a periodic task while stabilizing the activation cycle of the periodic task.
本開示の1つの態様による電子制御装置は、第1の発生部(21)と、変換格納実施部(15,17,S120,S140)と、第2の発生部(22)と、実行部(7)と、順序監視部(7,S470)と、を備える。 An 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).
第1の発生部は、第1のトリガ信号を一定時間(Tc)毎に発生させる。
変換格納実施部は、第1のトリガ信号が発生すると、制御対象の制御に用いられるアナログ信号のAD変換を実施し、当該AD変換が完了すると、当該AD変換の結果であるAD値をメモリ(13)に格納する。
The first generating section generates a first trigger signal at fixed time intervals (Tc).
When the first trigger signal is generated, the conversion storage execution unit performs AD conversion of the analog signal used to control the controlled object, and when the AD conversion is completed, the AD value that is the result of the AD conversion is stored in the memory ( 13).
第2の発生部は、第1のトリガ信号の発生タイミングから、前記AD変換と前記AD値のメモリへの格納とに要する最小時間よりも長く、且つ、前記一定時間よりは短い時間に設定された所定時間(Ts)だけずれたタイミングで、第2のトリガ信号を発生させる。このため、第2のトリガ信号は、第1のトリガ信号に対して位相が所定時間だけずれた信号であって良い。 The second generation unit is set to a time from the generation timing of the first trigger signal that is longer than the minimum time required for the AD conversion and storage of the AD value in the memory, and shorter than the certain time. A second trigger signal is generated at a timing shifted 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 controlled object.
The order monitoring unit determines whether or not the conversion storage execution unit has completed storing the AD value in the memory after the periodic task was activated last time and before it is activated this time.
このような構成によれば、第1のトリガ信号に対して位相が所定時間だけずれた第2のトリガ信号を発生させ、この第2のトリガ信号により周期タスクが起動されるため、周期タスクの起動周期を安定させやすい。そして、順序監視部を備えるため、周期タスクが前回起動してから今回起動する前にAD値のメモリへの格納が完了しなかったことを検知することができる。よって、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようになる。 According to such a configuration, a second trigger signal whose phase is shifted by a predetermined time with respect to the first trigger signal is generated, and the periodic task is activated by this second trigger signal, so that the periodic task is activated. 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 between the previous activation of the periodic task and the current activation. Therefore, it becomes possible to detect the occurrence of a situation in which the latest AD value cannot be used in a periodic task.
以下、図面を参照しながら、本開示の実施形態を説明する。
[1.構成]
図1に示す電子制御装置(以下、ECU)1は、例えば自動車のエンジン3を制御するものである。ECUは、「Electronic Control Unit」の略である。ECU1は、エンジン3を制御するための処理を行う制御部として、マイコン5を備える。
Embodiments of the present disclosure will be described below with reference to the drawings.
[1. composition]
An electronic control unit (hereinafter referred to as ECU) 1 shown in FIG. 1 controls, for example, an engine 3 of an automobile. 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」の略である。
Furthermore, the
制御対象としてのエンジン3に備えられた複数の各気筒31には、筒内圧力に応じた電圧となる筒内圧信号を出力する圧力センサ33がそれぞれ設けられている。
マイコン5には、AD変換対象のアナログ信号として、各圧力センサ33からの筒内圧信号が入力される。そして、マイコン5に入力される筒内圧信号のそれぞれは、AD変換部15によってAD変換される。以下では、説明を簡略化するため、AD変換されるアナログ信号が1つの筒内圧信号である、として説明する。
Each of the plurality of
In-cylinder pressure signals from each
マイコン5において、AD変換部15による筒内圧信号のAD変換が完了すると、AD変換部15からDMAC17に、AD値のDMA転送要求が出力される。AD値とは、AD変換の結果であり、即ち、AD変換された後のデジタルデータのことである。AD値のDMA転送要求は、AD変換部15とは別の要求発生部から出力されても良い。
In 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
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, every time the value of the timer counter constituting the
タイマ21によって発生されるトリガ信号は、AD変換部15にAD変換を開始させるためのトリガ信号として使用される。また、タイマ22によって発生されるトリガ信号は、周期タスクを起動するためのトリガ信号として使用される。
The trigger signal generated by the
以下では、タイマ21,22を特に区別して呼称する場合には、タイマ21を、AD変換開始タイマ21と言い、タイマ22を、周期タスク起動タイマ22と言う。また、AD変換開始タイマ21によって発生されるトリガ信号を、第1のトリガ信号とも言い、周期タスク起動タイマ22によって発生されるトリガ信号を、第2のトリガ信号とも言う。
In the following, when the
ここで、図4に示すように、第1のトリガ信号と第2のトリガ信号とで、発生する周期は同じ一定時間Tcに設定されるが、第2のトリガ信号は、第1のトリガ信号の発生タイミングから所定時間Tsだけずれて発生される。尚、図4において、「AD変換開始タイマ」は、AD変換開始タイマ21を構成するタイマカウンタの値を表している。同様に、「周期タスク起動タイマ」は、周期タスク起動タイマ22を構成するタイマカウンタの値を表している。
Here, as shown in FIG. 4, the generation period of the first trigger signal and the second trigger signal is set to the same constant time Tc, but the second trigger signal is different from the first trigger signal. is generated with a predetermined time Ts shift from the generation timing of . In addition, in FIG. 4, "AD conversion start timer" represents the value of a timer counter that constitutes the AD conversion start
具体的には、マイコン5の動作開始時に実行される初期設定処理により、AD変換開始タイマ21を構成するコンペアレジスタと、周期タスク起動タイマ22を構成するコンペアレジスタとのそれぞれには、比較値として、一定時間Tcに相当する同じ値が設定(即ち、セット)される。一定時間Tcに相当する値とは、一定時間Tcを内部クロックの1周期時間で割った値である。
Specifically, by the initial setting process executed when the
そして、上記初期設定処理により、周期タスク起動タイマ22を構成するタイマカウンタには、初期値として例えば0が設定されるが、AD変換開始タイマ21を構成するタイマカウンタには、初期値として、所定時間Tsに相当する値が設定される。つまり、第1のトリガ信号が第2のトリガ信号よりも所定時間Tsだけ先に発生するように、AD変換開始タイマ21を構成するタイマカウンタの値にはオフセットが付けられる。そして、このような初期設定が終了すると、両タイマ21,22がスタートされる。即ち、両タイマ21,22におけるタイマカウンタのカウントアップが開始される。
Through the above initial setting process, the timer counter constituting the periodic
また、タイマ部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 operations]
As shown in FIG. 4, it is assumed that the AD conversion start
また、第1のトリガ信号が発生してから所定時間Tsが経過した時刻t3になると、周期タスク起動タイマ22が満了して、第2のトリガ信号が発生し、周期タスクが起動する。つまり、CPU7が周期タスクの実行を開始する。そして、この周期タスクのなかで、前述のAD値使用処理が行われる。
Further, at time t3, when a predetermined time Ts has elapsed since the first trigger signal was generated, the periodic
ここで、AD値使用処理にて最新のAD変換によるAD値が使用されるようにするためには、周期タスクが起動される前に、直前に発生した第1のトリガ信号に伴うAD変換によるAD値のRAM13への格納(即ち、DMA転送)が完了していることが望ましい。 Here, in order to use the latest AD value resulting from AD conversion in the AD value usage process, before the periodic task is activated, It is desirable that the storage of the AD value in the RAM 13 (ie, DMA transfer) is completed.
このため、上記所定時間Tsは、第1及び第2のトリガ信号の発生周期である一定時間Tcよりも短いが、少なくとも、AD変換とAD値のRAM13への格納とに要するトータルの最小時間Tminよりは長い時間に設定されている。実際には、所定時間Tsは、上記最小時間Tminに所定のマージン時間を加えた時間に設定されている。
Therefore, although the predetermined time Ts is shorter than the fixed time Tc which is the generation cycle of the first and second trigger signals, it is 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, AD conversion of a cylinder pressure signal may be made to wait for a long time due to AD conversion of another signal with a higher priority, or DMA transfer of an AD value may be made to wait for a long time due to congestion of the internal bus 14. Otherwise, the storage of the AD value in the
そして、時刻t1から一定時間Tcが経過した時刻t4になると、再びAD変換開始タイマ21が満了して第1のトリガ信号が発生し、筒内圧信号のAD変換と、AD値のRAM13へのDMA転送とが順次実施される。図4の例では、時刻t5でAD値のDMA転送が完了している。
Then, at time t4, when a certain period of time Tc has elapsed from time t1, the AD conversion start
また、時刻t2から一定時間Tcが経過した時刻t6になると、再び周期タスク起動タイマ22が満了して第2のトリガ信号が発生し、周期タスクが起動される。そして、この回の周期タスクでは、最新のAD変換によるAD値、即ち、直前に発生した第1のトリガ信号に伴うAD変換によるAD値が、使用されることになる。
Further, at time t6, when a certain period of time Tc has elapsed from 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値格納完了時刻という。
Through this 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 generating section in the
ここで一旦、図3に基づく説明に移る。
図3において、S310に示すように、周期タスク起動タイマ22が満了して第2のトリガ信号が発生すると、周期タスクが起動されると共に、DMAC17にFRC値のDMA転送要求が出力される。このため、S320に示すように、DMAC17が、FRC30からRAM13へのFRC値のDMA転送を実施する。
The explanation will now turn to the explanation based on FIG. 3.
In FIG. 3, when the periodic
このS320でのDMA転送によって、RAM13には、現在のFRC値が、周期タスクの起動時刻(以下、周期タスク起動時刻)として記憶される。この周期タスク起動時刻は、第2のトリガ信号が発生した時刻でもある。以下では、周期タスク起動時刻としてのFRC値のことを、単に、周期タスク起動時刻という。
Through this 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 activation time is completed, the request generating section in the
ここで、図2に基づく説明に戻る。
図2に示すように、CPU7は、第1のトリガ信号の発生に伴って行うS210~S240の処理のうち、AD値格納完了時刻の記憶が完了した後のS210では、RAM13から、周期タスク起動時刻の最新値である「DTn」を読み出して取得する。更に、RAM13から、周期タスク起動時刻の前回値である「DTn-1」を読み出して取得する。尚、周期タスク起動時刻は、前述した図3のS320のDMA転送動作によってRAM13に記憶されている。
Here, we return to the explanation based on FIG. 2.
As shown in FIG. 2, among the processes S210 to S240 performed in response to the generation of the first trigger signal, in S210 after the storage of the AD value storage completion time is completed, the
CPU7は、次のS220にて、S210で取得した「DTn」と「DTn-1」との差である「DTn-DTn-1」が、正常範囲内か否かを判定する。「DTn-DTn-1」は、周期タスクの起動周期の測定値に該当する。正常範囲は、周期タスクの起動周期の正常範囲であり、一定時間Tcの設計上で設定された正常範囲である。例えば、正常範囲は、一定時間Tcの標準値の±10μsに設定されて良い。
In the next step 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 (i.e., 0x00001F45) stored in the area RAM_TASK[n] in FIG. DTn". Further, the value stored in the area RAM_TASK[n-1] in FIG. 4 (ie, 0x00000FA5) is read out as the previous value "DTn-1" of the periodic task activation time. Then, in S220 this time, it is determined whether "0xFA0", which is "0x00001F45-0x00000FA5", is within the normal range. Note that "0x..." is a numerical value expressed in hex.
CPU7は、S220にて、「DTn-DTn-1」が正常範囲内であると判定した場合には、そのまま図2の処理を終了するが、「DTn-DTn-1」が正常範囲内ではないと判定した場合には、S230に進む。
If 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, if 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に記憶されている。
After performing the process of S240, the
On the other hand, as shown in FIG. 3, among the processes from S410 to S490 performed in response to the generation of the second trigger signal, in S410 after the storage of the periodic task start time is completed, the
CPU7は、次のS420にて、S410で取得した「DAn」と「DAn-1」との差である「DAn-DAn-1」が、正常範囲内か否かを判定する。「DAn-DAn-1」は、AD値の格納周期の測定値に該当する。この正常範囲は、AD値の格納周期の正常範囲であり、周期タスクの起動周期の正常範囲と同じ値に設定されても良いし、異なる値に設定されても良い。
In the next step 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 storage of the periodic task start time is completed, the value stored in the area RAM_AD[n] in FIG. 4 (i.e., 0x00001F40 ) is read out as the latest value "DAn" of the AD value storage completion time. Further, the value stored in the area RAM_AD[n-1] in FIG. 4 (ie, 0x00000FA0) is read out as the previous value "DAn-1" of the AD value storage completion time. Then, in S420 this time, it is determined whether "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値を使用することができる可能性を高めることができる。
If the
In S430, the
また、CPU7は、S430にて、「DAn-DAn-1」が正常範囲よりも大きくないと判定した場合、即ち、AD値の実際の格納周期が正常範囲よりも短かった場合には、そのままS440に進む。
Further, if 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に進む。
After performing the process of S440, the
Further, 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 storage of the periodic task activation time is completed, the periodic task start time is stored in the area RAM_AD[n] in FIG. The current value (ie, 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 the value stored in the current operation of S320 (i.e., 0x00001F45) is read out as the latest value "DTn" of the periodic task activation time. . Further, the value stored in the area RAM_TASK[n-1] in FIG. 4 (ie, 0x00000FA5) is read out as the previous value "DTn-1" of the periodic task activation time.
そして、CPU7は、次のS470にて、S460で取得した値について、「DTn-1<DAn<DTn」の大小関係が成立しているか否かを判定する。尚、大小関係を示す「<」は、時刻を表す数値に関しては「より大きい値である」ことを示しており、時刻そのものに関しては「より進んだ時刻である」ことを示している。また、「DAn」は、S460ではRAM13から読み出されずに、S410で読み出された「DAn」が、S470で使用されても良い。
Then, in the next step S470, the
つまり、S470では、前回の周期タスク起動時刻(即ち、DTn-1)と、今回の周期タスク起動時刻(即ち、DTn)との間に、最新のAD値格納完了時刻(即ち、DAn)が入っているか否かを判定している。よって、このS470により、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かが判定される。
That is, in S470, the latest AD value storage completion time (i.e., DAn) is entered between the previous periodic task activation time (i.e., DTn-1) and the current periodic task activation time (i.e., DTn). It is determined whether the Therefore, in S470, it is determined whether or not the storage of the AD value in the
CPU7は、上記S470にて、「DTn-1<DAn<DTn」の大小関係が成立していると判定した場合、即ち、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了していると判定した場合には、設計想定通り(即ち、正常)であることから、当該図3の処理を終了する。
If the
また、CPU7は、上記S470にて、「DTn-1<DAn<DTn」の大小関係が成立していないと判定した場合、即ち、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了していないと判定した場合には、S480に進む。
Further, if 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, as in S440 described above, 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, AD conversion is performed by the generation of the first trigger signal, and a periodic task is activated using the completion of DMA transfer of the AD value to the
(1-2)CPU7が、図3におけるS470の判定を行うことにより、周期タスクが前回起動されてから今回起動される前にAD値のRAM13への格納が完了したか否かの判定を行う。このため、周期タスクが前回起動してから今回起動する前にAD値のメモリへの格納が完了しなかったことを検知することができる。よって、周期タスクにおいて最新のAD値が使用できない事態が生じたことを検知できるようになる。そして、この事態が生じた場合に、例えば、周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置や、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置等、制御性能の低下を抑制するための処置を実施することができるようになる。
(1-2) The
周期タスクにおいてより新しいAD値が使用できる可能性を高めるための処置としては、例えば、図3のS480のように、第1のトリガ信号の発生とは関係なく直ぐにAD変換を開始させる、という処置であって良い。また、周期タスクにて最新のAD値が使用できないことによる影響を抑制するための処置としては、例えば、過去の複数回のAD変換による各AD値から、演算により現在のアナログ信号の電圧値を予測し、その予測値をエンジン3の制御に使用する、という処置であって良い。 As a measure to increase the possibility that newer AD values can be used in the periodic task, for example, as in S480 in FIG. 3, AD conversion is started immediately regardless of the generation of the first trigger signal. That's fine. In addition, as a measure to suppress the effect of not being able to use the latest AD value in a periodic task, for example, the voltage value of the current analog signal can be computed from each AD value from multiple past AD conversions. It may be a measure of predicting and using the predicted value to control 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 with 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 "the number of times the AD value is stored is greater than or equal to the number of times the periodic task is activated." Alternatively, it may be determined whether "the number of times the AD value is stored and the number of times the periodic task is activated is the same". Such a determination also makes it possible to determine whether or not the AD value has been completely stored in the
一方、AD値は、RAM13とは別のメモリに格納(即ち、記憶)されても良い。また、AD値格納完了時刻と周期タスク起動時刻との両方又は一方は、AD値が記憶されるメモリとは別のメモリに記憶されても良い。
On the other hand, the AD value may be stored (ie, stored) in a memory other than the
また、図2におけるS220及びS230と、図3におけるS420及びS430との、一方又は両方が実行されない構成であっても良い。また、制御対象は、エンジン3に限らず、例えば電動機やトランスミッション等であっても良い。 Furthermore, a configuration may be adopted in which one or both of S220 and S230 in FIG. 2 and S420 and S430 in FIG. 3 are not executed. Moreover, the controlled object is not limited to the engine 3, but 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 of one component in the above embodiment may be realized by a plurality of components, or one function of one component may be realized by a plurality of components. Further, a plurality of functions possessed by a plurality of constituent elements may be realized by one constituent element, or one function realized by a plurality of constituent elements may be realized by one constituent element. Further, a part of the configuration of the above embodiment may be omitted. Furthermore, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of other embodiments.
また、上述したECU1の他、当該ECU1を構成要素とするシステム、当該ECU1としてコンピュータを機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実体的記録媒体、順序異常判定方法など、種々の形態で本開示を実現することもできる。
In addition to the above-mentioned
1…ECU、7…CPU、15…AD変換部、17…DMAコントローラ、21…AD変換開始タイマ、22…周期タスク起動タイマ。
DESCRIPTION OF
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 section (21) configured to generate a first trigger signal at fixed time intervals (Tc);
When the first trigger signal is generated, AD conversion is performed on an analog signal used to control the controlled object, and when the AD conversion is completed, the AD value that is the result of the AD conversion is stored in the memory (13). A conversion storage execution unit (15, 17, S120, S140) configured as follows;
A predetermined time (Ts ) a second generating unit (22) configured to generate a second trigger signal at timings shifted 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. and,
an order monitoring unit ( 7, S470) and
An electronic control device comprising:
前記順序監視部は、
前記第2のトリガ信号が発生する毎に、前記判定を行うように構成されている、
電子制御装置。 The electronic control device according to claim 1,
The order monitoring unit includes:
configured to perform the determination every time the second trigger signal is generated;
Electronic control unit.
前記AD値の前記メモリへの格納が完了する毎に、前記AD値の前記メモリへの格納が完了した時刻である格納完了時刻を記憶するように構成された完了時刻記憶部(17,S160)と、
前記第2のトリガ信号が発生する毎に、当該第2のトリガ信号が発生した時刻を、前記周期タスクの起動時刻として記憶するように構成された起動時刻記憶部(17,S320)と、を備え、
前記順序監視部は、前記完了時刻記憶部により記憶された前記格納完了時刻と、前記起動時刻記憶部により記憶された前記起動時刻とに基づいて、前記判定を行うように構成されている、
電子制御装置。 The electronic control device according to claim 1 or 2,
a completion time storage unit (17, S160) configured to store a storage completion time that is a time when storage of the AD value in the memory is completed each time storage of the AD value in the memory is completed; and,
a startup time storage unit (17, S320) configured to store the time when the second trigger signal is generated as the startup time of the periodic task every time the second trigger signal is generated; Prepare,
The order monitoring unit is configured to make the determination based on the storage completion time stored by the completion time storage unit and the startup time stored by the startup time storage unit.
Electronic control unit.
前記AD値の前記メモリへの格納が完了する毎に、前記起動時刻記憶部により記憶された前記起動時刻のうち、最新の前記起動時刻と、当該最新の前記起動時刻よりも1回前に記憶された前記起動時刻との差に基づいて、前記周期タスクの起動周期が正常範囲内か否かを判定するように構成された起動周期判定部(7,S220)、を更に備える、
電子制御装置。 The electronic control device according to claim 3,
Every time the storage of the AD value in the memory is completed, among the startup times stored by the startup time storage unit, the latest startup time and one time before the latest startup time are stored. further comprising an activation cycle determination unit (7, S220) configured to determine whether the activation cycle of the periodic task is within a normal range based on the difference between the activation time and the activation time determined by the periodic task;
Electronic control unit.
前記第2のトリガ信号が発生する毎に、前記完了時刻記憶部により記憶された前記格納完了時刻のうち、最新の前記格納完了時刻と、当該最新の前記格納完了時刻よりも1回前に記憶された前記格納完了時刻との差に基づいて、前記AD値の格納周期が正常範囲内か否かを判定するように構成された格納周期判定部(7,S420)、を更に備える、
電子制御装置。 The electronic control device according to claim 3 or 4,
Every 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 one time before the latest storage completion time are stored. further comprising a storage cycle determination unit (7, S420) configured to determine whether the storage cycle of the AD value is within a normal range based on the difference between the storage completion time and the storage completion time;
Electronic control unit.
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 JP2021163425A (en) | 2021-10-11 |
JP7435182B2 true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2024003654A (en) * | 2022-06-27 | 2024-01-15 | 日立Astemo株式会社 | Information processing apparatus |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005190195A (en) | 2003-12-25 | 2005-07-14 | Renesas Technology Corp | Microcontroller |
JP2007115036A (en) | 2005-10-20 | 2007-05-10 | Fujitsu Ltd | Asynchronous transfer device and asynchronous transfer method |
JP2010146258A (en) | 2008-12-18 | 2010-07-01 | Denso Corp | Signal processing device |
-
2020
- 2020-04-03 JP JP2020067803A patent/JP7435182B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005190195A (en) | 2003-12-25 | 2005-07-14 | Renesas Technology Corp | Microcontroller |
JP2007115036A (en) | 2005-10-20 | 2007-05-10 | Fujitsu Ltd | Asynchronous transfer device and asynchronous transfer method |
JP2010146258A (en) | 2008-12-18 | 2010-07-01 | Denso Corp | Signal processing device |
Also Published As
Publication number | Publication date |
---|---|
JP2021163425A (en) | 2021-10-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4609381B2 (en) | Abnormality monitoring program, recording medium, and electronic device | |
US8417990B2 (en) | Multi-core processing system for vehicle control or an internal combustion engine controller | |
JP5515792B2 (en) | Internal combustion engine control device | |
JP7147615B2 (en) | task management device | |
JP7435182B2 (en) | electronic control unit | |
US6748444B1 (en) | Transmission system of short time lag | |
JP2013152636A (en) | Information processing device and task scheduling method | |
JP2017102633A (en) | Information processing device and semiconductor integrated circuit device | |
JP2005301812A (en) | Digital controller, and engine controller using the same | |
JPH11232148A (en) | Method and system for measuring load rate of computer | |
JP5652198B2 (en) | Electronic control device, start control method | |
JP2000199450A (en) | Engine control device | |
JP2010140239A (en) | Apparatus and method for shortening interrupt latency | |
WO2005013130A1 (en) | Real time control system | |
JP2016162330A (en) | Electronic controller | |
CN103423011A (en) | Semiconductor data processing apparatus and engine control apparatus | |
JP2018181199A (en) | Electronic control apparatus | |
JP2020173644A (en) | Electronic controller | |
JP2016184315A (en) | Electronic controller | |
WO2019159310A1 (en) | Electronic control device | |
JP2001323836A (en) | Abnormality detection method for crank synchronous task | |
JP6981512B2 (en) | Electronic control device | |
JP2015215743A (en) | Electronic control unit | |
JP7314838B2 (en) | electronic controller | |
JP2019028748A (en) | Electronic control device |
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 |