JP7528875B2 - Vehicle Electronic Control Unit - Google Patents
Vehicle Electronic Control Unit Download PDFInfo
- Publication number
- JP7528875B2 JP7528875B2 JP2021104184A JP2021104184A JP7528875B2 JP 7528875 B2 JP7528875 B2 JP 7528875B2 JP 2021104184 A JP2021104184 A JP 2021104184A JP 2021104184 A JP2021104184 A JP 2021104184A JP 7528875 B2 JP7528875 B2 JP 7528875B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- timer
- cpu
- ram
- data transfer
- 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
- 238000012546 transfer Methods 0.000 claims description 108
- 230000001360 synchronised effect Effects 0.000 claims description 29
- 238000006243 chemical reaction Methods 0.000 claims description 20
- 238000000034 method Methods 0.000 claims description 16
- 230000008569 process Effects 0.000 claims description 14
- 230000000737 periodic effect Effects 0.000 claims description 4
- 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 44
- 238000012545 processing Methods 0.000 description 24
- 238000001514 detection method Methods 0.000 description 11
- 230000001934 delay Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000003111 delayed effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 239000000446 fuel Substances 0.000 description 2
- 238000002347 injection Methods 0.000 description 2
- 239000007924 injection Substances 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000004378 air conditioning Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
Images
Landscapes
- Bus Control (AREA)
- Information Transfer Systems (AREA)
Description
本開示は、車両に搭載された機器を制御する車両用電子制御装置に関する。 This disclosure relates to an electronic control device for a vehicle that controls devices mounted on the vehicle.
特許文献1には、CPU、RAM、DMAコントローラ、等を備え、DMAコントローラが、パルス信号のパルス幅を計測するタイマから起動信号を受けると、タイマによる計測結果をRAMに転送するよう構成された電子装置が開示されている。
この電子装置において、DMAコントローラは、起動信号が所定回数入力されると、パルス幅の計測結果を転送した後、CPUに割り込み信号を出力する。すると、CPUは、その割り込み信号にて、DMAコントローラからの転送データをバッファに退避させ、RAMの異常診断を実施する。 In this electronic device, when the start signal is input a predetermined number of times, the DMA controller transfers the pulse width measurement results and then outputs an interrupt signal to the CPU. The CPU then uses the interrupt signal to save the data transferred from the DMA controller to a buffer and diagnoses the RAM for abnormalities.
ところで、上記電子装置において、特定期間内の複数の起動信号に対応したデータをDMAコントローラから転送させたい場合、DMAコントローラ若しくはタイマから、特定期間の開始及び終了タイミングでCPUに割り込み信号を入力するようにするとよい。つまり、CPUは、割り込み信号により割り込み処理を実行することができるので、この割り込み処理により、開始タイミングでDMAコントローラからデータ転送を開始させ、終了タイミングでそのデータ転送を停止させるようにするのである。 In the above electronic device, if you want to transfer data corresponding to multiple activation signals within a specific period from the DMA controller, it is a good idea to input an interrupt signal to the CPU from the DMA controller or a timer at the start and end of the specific period. In other words, the CPU can execute interrupt processing in response to the interrupt signal, and this interrupt processing will start data transfer from the DMA controller at the start timing and stop the data transfer at the end timing.
しかし、CPUにて実行される処理は、優先度の高い他の割り込み処理により遅れることがあるので、DMAコントローラを上記のように動作させると、DMAコントローラからデータ転送される期間が、所望のデータ転送期間からずれる場合がある。その結果、転送すべきデータの一部が欠けるとか、転送データの一部に不要データが混ざる、という問題が発生する。 However, because the processing executed by the CPU may be delayed by other interrupt processing with a higher priority, if the DMA controller is operated as described above, the period during which data is transferred from the DMA controller may deviate from the desired data transfer period. As a result, problems may occur in which some of the data to be transferred is missing, or unnecessary data may be mixed into some of the transferred data.
本開示の1つの局面は、DMAコントローラを備えた車両用電子制御装置において、CPUが、所望の期間のデータを、DMAコントローラを介して正確に取得できるようにすることを目的とする。 One aspect of the present disclosure is to enable a CPU in a vehicle electronic control device equipped with a DMA controller to accurately obtain data for a desired period via the DMA controller.
本開示の1つの態様による車両用電子制御装置は、マイコン内にCPU(12)と、DMAコントローラ(20)と、RAM(16)と、タイマ(18)と、データ入力部(22)と、を備える。 An electronic control device for a vehicle according to one aspect of the present disclosure includes a CPU (12), a DMA controller (20), a RAM (16), a timer (18), and a data input unit (22) within a microcomputer.
CPUは、データ入力部がデータ転送を開始する開始タイミングをタイマにセットして、タイマから開始タイミングで第1割り込み信号を出力させる。また、CPUは、タイマから出力される第1割り込み信号を受けると、データの転送を終了する終了タイミングをタイマにセットして、タイマから終了タイミングで第2割り込み信号を出力させる。 The CPU sets the start timing for the data input unit to start data transfer in the timer, and causes the timer to output a first interrupt signal at the start timing. In addition, when the CPU receives the first interrupt signal output from the timer, it sets the end timing for ending data transfer in the timer, and causes the timer to output a second interrupt signal at the end timing.
一方、DMAコントローラは、タイマに同期した第1の出力に同期して、データ入力部からRAMへのデータの転送を開始し、タイマに同期した第2の出力に同期して、そのデータ転送を終了する。 Meanwhile, the DMA controller starts transferring data from the data input unit to the RAM in synchronization with the first output synchronized with the timer, and ends the data transfer in synchronization with the second output synchronized with the timer.
このように本開示の車両用電子制御装置によれば、DMAコントローラは、タイマからの出力に同期してデータ転送を開始し、タイマからの出力に同期してデータ転送を終了する。 In this manner, according to the vehicle electronic control device disclosed herein, the DMA controller starts data transfer in synchronization with the output from the timer, and ends data transfer in synchronization with the output from the timer.
従って、データ入力部からRAMには、開始タイミングと終了タイミングとで規定されるデータ転送期間の間、データが遅延なく転送されることになる。そして、RAMに転送されたデータは、割り込み処理の遅れの影響なく転送されたデータであるため、CPUは、そのデータを使って車両制御を適正に実施することができる。 Therefore, data is transferred from the data input unit to the RAM without delay during the data transfer period defined by the start and end timings. And because the data transferred to the RAM is data that is transferred without being affected by delays in interrupt processing, the CPU can use that data to properly control the vehicle.
次に、本開示の他の態様による車両電子制御装置は、上記と同様、CPUと、DMAコントローラと、RAMと、タイマと、データ入力部と、を備える。
そして、CPUは、データ入力部からデータの転送を開始する開始タイミングをタイマにセットして、タイマから開始タイミングで割り込み信号を出力させる。
Next, a vehicle electronic control device according to another aspect of the present disclosure includes a CPU, a DMA controller, a RAM, a timer, and a data input unit, similar to the above.
Then, the CPU sets the start timing for starting data transfer from the data input unit in a timer, and causes the timer to output an interrupt signal at the start timing.
また、DMAコントローラは、タイマに同期した出力に同期して、データ入力部からRAMへのデータの転送を開始する。
従って、この車両用電子制御装置においても、割り込み処理の遅れの影響なくデータ転送を開始することができる。
Moreover, the DMA controller starts transferring data from the data input section to the RAM in synchronization with the output synchronized with the timer.
Therefore, in this vehicle electronic control unit as well, data transfer can be started without being affected by delays in interrupt processing.
また、CPUは、タイマから出力された割り込み信号を受けると、周期処理にて、データ入力部からRAMに転送されたデータの数が、予め設定された設定数に達したか否かを判断する。そして、そのデータの数が設定数に達すると、DMAコントローラによるデータの転送を終了させる。 When the CPU receives an interrupt signal output from the timer, it periodically determines whether the amount of data transferred from the data input unit to the RAM has reached a preset number. When the amount of data reaches the preset number, it ends the data transfer by the DMA controller.
従って、データ転送の終了タイミングは、割り込み処理の遅れの影響を受けることになるが、CPUは、設定数以上のデータを取得しないため、割り込み処理の遅れの影響なく所望の期間のデータを取得することができる。 Thus, the end timing of the data transfer will be affected by delays in interrupt processing, but because the CPU does not acquire more than the set amount of data, it can acquire data for the desired period without being affected by delays in interrupt processing.
以下、図面を参照しながら、本開示の実施形態を説明する。
[第1実施形態]
図1に示すように、本実施形態の車両用電子制御装置(以下、ECU)4は、車両に搭載されたエンジン2の燃料噴射量や点火時期等を制御する装置である。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[First embodiment]
As shown in FIG. 1, a vehicle electronic control unit (hereinafter, referred to as ECU) 4 of this embodiment is a device that controls the fuel injection amount, ignition timing, etc. of an
ECU4は、エンジン2を制御するための処理を行う制御部として、マイクロコンピュータ(以下、マイコン)10を備える。マイコン10は、CPU12,ROM14,RAM16,タイマ18,及び、DMAコントローラ(以下、DMAC)20を備えている。
The ECU 4 includes a microcomputer (hereinafter, MCU) 10 as a control unit that performs processing to control the
また、マイコン10には、エンジン2に設けられた各種センサからの検出信号を取り込む入力部22、及び、エンジン2の燃料噴射装置や点火装置に制御信号を出力する出力部24も備えられている。そして、マイコン10内の上記各部は、バス26を介して互いに接続されている。
The
入力部22には、A/D変換器30が設けられている。
A/D変換器30は、センサからの入力信号(すなわち、アナログ電圧)をA/D変換するためのものであり、本実施形態では、エンジン2の振動を検出するノックセンサからの検出信号をデジタルデータに変換するものとする。
The
The A/
なお、A/D変換器30は、エンジン2や吸入空気の温度を検出する温度センサ、吸入空気の圧力を検出する吸気圧センサ等、検出信号としてアナログ電圧を出力するセンサからの出力をA/D変換するものであってもよい。
The A/
A/D変換器30は、例えば、回転センサからエンジン2の所定回転角度毎に出力される回転信号に同期して、ノックセンサからの検出信号を繰り返しA/D変換するように構成されている。そして、DMAC20は、A/D変換器30にてA/D変換されたデータを、RAM16に転送する。なお、A/D変換器30は、一定時間毎に検出信号をA/D変換するように構成されていてもよい。
The A/
DMAC20は、CPU12によりエンジン2の回転に同期して設定されるデータ転送期間の間、A/D変換器30にてA/D変換された複数のデータを、順次、RAM16に転送する。
During the data transfer period set by the
なお、データ転送期間には、ノックセンサからの検出信号に基づきノック判定を実施できるように、エンジン2のクランク角度で、例えば、BTDC60°CAからATDC60°CAまでの期間が予め設定されている。
The data transfer period is preset to a period from BTDC 60° CA to ATDC 60° CA in terms of the crank angle of the
ところで、データ転送期間の間、DMAC20にデータ転送を実施させるには、CPU12からタイマ18に転送期間をセットして、転送開始、または転送終了タイミングでタイマ18からCPU12に割り込みを発生させる。
In order to have the
そして、CPU12の割り込み処理内でDMAC20に転送の開始と終了を指令する。DMAC20は、CPU12から出力される指令に従い、データ転送期間の間、A/D変換器30からRAM16へのデータ転送を実施することができる。
Then, during the interrupt processing of the
しかしながら、このようにすると、図2に示すように、CPU12でデータ転送期間の開始タイミング及び終了タイミングで実行される割り込み処理が、優先度の高い他の割り込み処理によって遅延されることがある。
However, in this case, as shown in FIG. 2, the interrupt processing executed by the
そして、この割り込み処理の遅延によって、DMAC20へのデータ転送の開始の指令が遅れて、データ転送期間の最初のデータが欠落したり、DMAC20へのデータ転送の終了の指令が遅れて、転送データの最後に不要なデータが混ざったりすることがある。 This interrupt processing delay may result in a delay in the command to DMAC20 to start the data transfer, causing the first data in the data transfer period to be missing, or a delay in the command to DMAC20 to end the data transfer, causing unnecessary data to be mixed in at the end of the transferred data.
そこで、本実施形態では、図3,図4に示すように、CPU12が、データ転送期間の開始タイミング及び終了タイミングを、順次タイマ18にセットし、タイマ18から、これら各タイミングで第1割り込み信号及び第2割り込み信号を発生させる。
Therefore, in this embodiment, as shown in Figures 3 and 4, the
なお,タイマ18は、例えば、パルス発生器から一定周期で出力されるパルス信号をカウントすることで、時間を計時するカウンタであってもよい。本実施形態では、転送データが、A/D変換器30にて、制御対象であるエンジン2の所定回転角度毎にA/D変化されるデータであることから、タイマ18には、エンジン2の所定回転角度毎にカウントアップするカウンタが用いられる。
The
次に、DMAC20は、タイマ18に同期した出力(以下、同期出力)に同期して、A/D変換器30のレジスタ32からRAM16へのデータ転送を開始し、次のタイマ18からの同期出力に同期して、そのデータ転送を終了する。
Next, the
つまり、図4に示すように、タイマ18からは、カウンタのアウトプットコンペア機能により、設定されたタイミングでレベルが反転する信号が、タイマ18に同期した信号として出力される。そして、DMAC20は、この出力信号のレベル変化により、データ転送を開始し、終了する。
In other words, as shown in FIG. 4, the
従って、DMAC20によるデータ転送が、CPU12が実行する割り込み処理の遅延によって遅れることはなく、DMAC20は、所望のデータ転送期間の間、A/D変換器30でA/D変換されたデータをRAM16に転送することができる。
Therefore, data transfer by the
なお、レジスタ32は、A/D変換器30によるA/D変換結果を一時的に保持するものである。つまり、A/D変換器30は、センサ40からの検出信号をA/D変換する度に、A/D変換結果をレジスタ32に書き込むようにされている。そして、DMAC20は、データ転送期間の間、レジスタ32に書き込まれたデータを、順次、RAM16に転送する。
The
一方、CPU12は、データ転送開始タイミングでタイマ18から出力される第1割り込み信号を受けると、割り込み処理により、終了タイミングをタイマ18にセットする。また、CPU12は、タイマ18からデータ転送終了タイミングで出力される第2割り込み信号を受けると、割り込み処理により、転送されたデータを使って処理を実施する。
On the other hand, when the
この結果、CPU12は、データ転送期間にDMAC20からRAM16に転送されてきた全データを、正確な期間の間、取得することができるようになる。また、RAM16のバッファ領域には、DMAC20から次のデータ転送期間に転送されてくるデータを書き込むことができるようになる。
As a result, the
次に、上述したCPU12の動作、及び、DMAC20の動作を、図5に示すフローチャートに沿って説明する。
図5に示すように、CPU12は、S100にて、データ転送期間の開始タイミング、詳しくは開始タイミングまでのカウント値、をタイマ18にセットし、DMAC20がタイマ18からの同期出力に同期してデータ転送を開始するのを許可する。
Next, the above-mentioned operation of the
As shown in FIG. 5, in S100, the
S100にて、データ転送期間の開始タイミングがタイマ18にセットされると、タイマ18は、開始タイミングになるまでエンジン2の回転に同期したパルス出力をカウントする。そして、図4に示すように、タイマ18のカウント値が開始タイミングのカウント値と一致すると、出力信号を反転させて、第1割り込み信号を発生する。
In S100, when the start timing of the data transfer period is set in the
この第1割り込み信号により、CPU12は、S110の割り込み処理を実行する。そして、S110の割り込み処理では、データ転送期間の終了タイミングを、タイマ18にセットする。
This first interrupt signal causes the
一方、DMAC20は、S200にて、CPU12から許可信号を受けることで、タイマ18からの同期出力に同期してデータ転送を開始することができるようになる。そして、その後は、タイマ18からの同期出力がOFFからONに反転するのを待ち、タイマ18からの同期出力がOFFからONに反転すると、S210にて、レジスタ32に保存されたA/D変換結果をRAM16に転送する、データ転送を開始する。
Meanwhile, in S200, the
次に、CPU12がS110にて、データ転送期間の終了タイミングをタイマ18にセットすると、タイマ18は、終了タイミングになるまでエンジン2の回転角度をカウントし、終了タイミングに達すると、同期出力を反転させて、第2割り込み信号を発生する。
Next, in S110, the
この第2割り込み信号により、CPU12は、S120の割り込み処理を実行する。
S120の割り込み処理では、データ転送期間中にレジスタ32から転送され、RAM16のバッファ領域に保存されているデータを使用して処理を実施する。
In response to this second interrupt signal, the
In the interrupt process of S120, the process is carried out using the data that has been transferred from the
また、S120の割り込み処理では、DMAC20がタイマ18からの同期出力に同期してデータ転送を開始するのを禁止する。
なお、レジスタ32から転送され、RAM16に保存されたデータは、エンジン2の所定回転角度範囲内にノックセンサから得られた振動データであるため、CPU12は、そのデータを利用してエンジン2のノック判定を行い、エンジン2の点火時期を制御する。
In addition, in the interrupt process of S 120 , the
In addition, since the data transferred from the
一方、DMAC20は、S210にて、A/D変換結果のデータ転送を開始すると、タイマ18からの同期出力がONからOFFに反転するのを待機する。そして、タイマ18からの同期出力がONからOFFに反転すると、S220にて、A/D変換結果のデータ転送を停止し、S230に移行する。
Meanwhile, when
S230では、CPU12が、S120の割り込み処理にて、タイマ18からの同期出力に同期してデータ転送を開始するのを禁止する指令を送信してくるので、その禁止指令に従い、タイマ18からの同期出力に同期してデータ転送を開始するのを禁止する。
In S230, the
以上説明したように、本実施形態のECU4においては、マイコン10に設けられたDMAC20が、タイマ18からの第1の同期出力に同期して、データ転送を開始し、タイマ18からの第2の同期出力に同期して、データ転送を終了する。
As described above, in the ECU 4 of this embodiment, the
このため、A/D変換器30のレジスタ32からRAM16には、データ転送期間の間、A/D変換器30にてA/D変換された全てのデータが転送されることになり、CPU12は、割り込み処理の遅延の影響を受けることなく、データを取得することができる。
As a result, during the data transfer period, all data A/D converted by the A/
よって、CPU12の割り込み処理の遅延によって、CPU12がエンジン制御に用いるデータの一部が欠けたり、不要データが混ざったりすることがなく、CPU12は、DMAC20から取得したデータに基づき、エンジン2を適正に制御することができる。
Therefore, delays in the interrupt processing of the
[第2実施形態]
第1実施形態では、DMAC20にデータ転送させる期間は予め設定されており、CPU12は、データ転送期間の開始タイミングと終了タイミングの両方で、タイマ18から割り込み信号を発生させるようにしている。
[Second embodiment]
In the first embodiment, the period during which the
しかし、データ転送の終了タイミングは、必ずしも規定する必要はなく、例えば、DMAC20がデータ転送を開始してから、CPU12が取得したデータの数を検出して、その数が予め設定された設定数に達したときに、データ転送を終了するようにしてもよい。
However, the timing for ending the data transfer does not necessarily need to be specified. For example, the data transfer may be ended when the
以下、このように動作するよう構成された車両用電子制御装置について、本開示の第2実施形態として説明する。
なお、本実施形態の車両用電子制御装置は、第1実施形態のECU4と同様に構成されており、第1実施形態と異なる点は、マイコン10のCPU12及びDMAC20の動作だけである。このため、本実施形態では、CPU12及びDMAC20の動作について説明し、第1実施形態と共通する部分については、説明を省略する。
Hereinafter, a vehicle electronic control device configured to operate in this manner will be described as a second embodiment of the present disclosure.
The vehicle electronic control device of this embodiment is configured similarly to the ECU 4 of the first embodiment, and differs from the first embodiment only in the operations of the
図6に示すように、CPU12は、第1実施形態と同様、S100にて、データ転送期間の開始タイミングをタイマ18にセットし、DMAC20がタイマ18からの同期出力に同期してデータ転送を開始するのを許可する。そして、その後、タイマ18から割り込み信号が出力されると、S130にて、DMAC20がタイマ18からの出力に同期してデータ転送を開始するのを禁止する。
As shown in FIG. 6, in the same manner as in the first embodiment, in S100, the
一方、DMAC20は、S200にてCPU12から許可を受けることで、タイマ18からの同期出力に同期してデータ転送を開始することができるようになる。このため、DMAC20は、タイマ18からの同期出力が反転するのを待ち、タイマ18からの同期出力が反転すると、S230にて、レジスタ32に保存されたA/D変換結果をRAM16に転送する、データ転送を開始する。
Meanwhile, by receiving permission from the
このようにDMAC20がデータ転送を開始すると、CPU12から、S130の処理によって、タイマ18からの同期出力に同期してデータ転送を開始するのを禁止する指令が送信されてくる。
When the
このため、DMAC20は、S230にてデータ転送を開始すると、S240にて、CPU12からデータ転送開始の禁止指令が送信されてくるのを待ち、禁止指令が送信されてくると、タイマ18からの同期出力に同期してデータ転送を開始するのを禁止する。
Therefore, when the
S240の処理は、S230にてデータ転送を開始した後に実行されることから、DMAC20からのデータ転送は、続くS250にて、CPU12からデータ転送の停止指令を受けるまで継続される。そして、DMAC20は、S250にて、CPU12からのデータ転送の停止指令を受けると、データ転送を停止する。
The process of S240 is executed after the data transfer is started in S230, so the data transfer from the
次に、CPU12は、S130の処理実行後は、S140に移行し、図7に示すように所定周期で実行される周期処理にて、DMAC20によりレジスタ32からRAM16へ転送されたデータの数が、予め設定された設定数に到達したか否かを判定する。
Next, after executing the process of S130, the
そして、S140の周期処理にて、レジスタ32からRAM16へ転送されたデータの数が設定数に到達していないと判定されると、S140に戻り、次の周期処理にて、再びデータ数の判定を実施する。
Then, if it is determined in the periodic processing of S140 that the amount of data transferred from
一方、S140にて、レジスタ32からRAM16へ転送されたデータの数が設定数に到達していると判定されると、CPU12は、S150に移行して、DMAC20にデータ転送の停止指令を出力する。この結果、DMAC20によるRAM16へのデータ転送が停止される。
On the other hand, if it is determined in S140 that the amount of data transferred from the
このように、本実施形態では、DMAC20によるレジスタ32からRAM16へのデータ転送は、データ転送期間の開始タイミングから、転送されたデータの数が設定数に到達するまで継続される。従って、データ転送期間は、レジスタ32からRAM16に転送されたデータの数によって規定されることになる。
In this manner, in this embodiment, the data transfer by the
しかし、このようにしても、DMAC20によるデータ転送は、開始タイミングから遅れることなく開始され、CPU12は、データ転送開始後、設定数にて規定される所望の数だけ、データを取得することができる。
このため、CPU12は、第1実施形態と同様、所望のデータ転送期間の間にA/D変換器30でA/D変換されたデータを、正確な期間の間取得し、そのデータを使ってエンジン制御を適正に実施することができるようになる。
However, even in this case, the data transfer by the
Therefore, similar to the first embodiment, the
[変形例]
次に、上記実施形態では、CPU12は、データ転送期間中にDMAC20から転送されてきたデータを、全て、RAM16の所定の記憶領域に保存するものとして説明した。
[Modification]
Next, in the above embodiment, the
しかし、A/D変換器30において、検出信号がA/D変換されるまでに時間がかかることから、DMAC20からは、センサの実際の検出タイミングからこの時間(以下、A/D変換遅れ時間)分遅れて、検出信号のA/D変換結果が転送されることになる。
However, since it takes time for the detection signal to be A/D converted in the A/
そこで、本変形例では、CPU12が、このA/D変換遅れ時間を考慮して、レジスタ32からRAM16へデータ転送するようにしている。
具体的には、CPU12は、図8に示すように、レジスタ32からRAM16に転送されたデータのうち、データ転送期間の開始タイミングからA/D変換遅れ時間が経過する間に転送されたデータを破棄する。また、CPU12は、データ転送期間を、A/D変換遅れ時間分延長する。
Therefore, in this modified example, the
8, the
この結果、本変形例によれば、A/D変換器30においてA/D変換に要する遅れ時間の影響を受けることなく、所望のデータ転送期間内にセンサにて検出された検出信号のデータを取得することができるようになる。
As a result, according to this modified example, it becomes possible to obtain the detection signal data detected by the sensor within the desired data transfer period without being affected by the delay time required for A/D conversion in the A/
なお、第1実施形態において、データ転送期間をA/D変換の遅れ時間分延長するには、データ転送期間がA/D変換遅れ時間を含むように設定して、終了タイミングを決定するようにすればよい。 In the first embodiment, to extend the data transfer period by the delay time of the A/D conversion, the data transfer period is set to include the A/D conversion delay time, and the end timing is determined.
また、第2実施形態において、データ転送期間をA/D変換遅れ時間分延長するには、図6のS150にて判定に用いる設定数として、本来取得すべきデータの数にA/D変換遅れ時間に相当するデータの数を加えた数を設定するようにすればよい。 In addition, in the second embodiment, to extend the data transfer period by the A/D conversion delay time, the number used for the determination in S150 of FIG. 6 can be set to the number of data that should have been acquired plus the number of data that corresponds to the A/D conversion delay time.
以上、本開示の実施形態及び変形例について説明したが、本開示は上述の実施形態及び変形例に限定されることなく、種々変形して実施することができる。
例えば、上記実施形態では、ECU4は、車両に搭載されたエンジン2を制御するものとして説明したが、本開示の車両用電子制御装置は、自動変速機等、車両の駆動系に設けられたエンジン以外の機器を制御するものであってもよい。
Although the embodiments and modifications of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments and modifications, and can be implemented in various forms.
For example, in the above embodiment, the ECU 4 has been described as controlling the
また、本開示の車両用電子制御装置は、制動装置等、車両の制動系に設けられた機器を制御するものであってもよく、空調装置等、車両の駆動・制動系以外の車載機器を制御するものであってもよい。 The electronic control device for a vehicle disclosed herein may also control devices installed in the braking system of the vehicle, such as a braking device, or may control on-board equipment other than the drive and braking system of the vehicle, such as an air conditioning device.
また、上記実施形態では、DMAC20は、データ入力部としてのA/D変換器30にてA/D変換されたデータを、RAM16に転送するものとして説明したが、DMACが転送するデータは、A/D変換されたデータに限定されるものではない。つまり、DMACがRAMに転送するデータは、例えば、他の電子制御装置や通信装置等から入力されるデータ等、車両用電子制御装置で利用されるデータであればよい。
In the above embodiment, the
また、上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。 Furthermore, multiple functions possessed by one component in the above embodiments may be realized by multiple components, or one function possessed by one component may be realized by multiple components. Further, multiple functions possessed by multiple components may be realized by one component, or one function realized by multiple components may be realized by one component. Further, part of the configuration of the above embodiments may be omitted. Further, at least part of the configuration of the above embodiments may be added to or substituted for the configuration of another of the above embodiments.
2…ECU、10…マイコン、12…CPU、16…RAM、18…タイマ、20…DMAC、22…入力部。 2...ECU, 10...microcomputer, 12...CPU, 16...RAM, 18...timer, 20...DMAC, 22...input section.
Claims (5)
前記CPUは、前記データ入力部に入力されたデータの転送を開始する開始タイミングを前記タイマにセットして、前記タイマから前記開始タイミングで第1割り込み信号を出力させ、前記タイマから出力される前記第1割り込み信号を受けると、前記データの転送を終了する終了タイミングを前記タイマにセットする割り込み処理を実施して、前記タイマから前記終了タイミングで第2割り込み信号を出力させる、ように構成され、
前記DMAコントローラは、前記タイマに同期した第1の出力に同期して、前記データ入力部から前記RAMへの前記データの転送を開始し、前記タイマに同期した第2の出力に同期して、前記データの転送を終了する、ように構成されている、車両用電子制御装置。 The device comprises a CPU (12), a DMA controller (20), a RAM (16), a timer (18), and a data input unit (22);
the CPU is configured to set a start timing for starting transfer of data input to the data input unit in the timer, and cause the timer to output a first interrupt signal at the start timing, and upon receiving the first interrupt signal output from the timer, execute an interrupt process for setting an end timing for ending the data transfer in the timer, and cause the timer to output a second interrupt signal at the end timing;
The DMA controller is configured to start a transfer of the data from the data input unit to the RAM in synchronization with a first output synchronized with the timer, and to end the transfer of the data in synchronization with a second output synchronized with the timer.
前記CPUは、前記データ入力部に入力されたデータの転送を開始する開始タイミングを前記タイマにセットして、前記タイマから前記開始タイミングで割り込み信号を出力させるよう構成され、
前記DMAコントローラは、前記タイマに同期した出力に同期して、前記データ入力部から前記RAMへの前記データの転送を開始するよう構成され、
更に、前記CPUは、前記タイマから出力される前記割り込み信号を受けると、周期処理にて、前記データ入力部から前記RAMに転送された前記データの数が予め設定された設定数に達したか否かを判断し、前記データの数が前記設定数に達すると、前記DMAコントローラによる前記データの転送を終了させる、ように構成されている、車両用電子制御装置。 The device comprises a CPU (12), a DMA controller (20), a RAM (16), a timer (18), and a data input unit (22);
the CPU is configured to set a start timing for starting transfer of data input to the data input unit in the timer and to cause the timer to output an interrupt signal at the start timing;
the DMA controller is configured to initiate a transfer of the data from the data input to the RAM in synchronization with an output synchronized with the timer;
Furthermore, when the CPU receives the interrupt signal output from the timer, it determines in a periodic process whether the number of data transferred from the data input unit to the RAM has reached a preset number, and when the number of data has reached the preset number, it terminates the data transfer by the DMA controller.
前記タイマは、制御対象の回転に同期してカウントするカウンタである、車両用電子制御装置。 3. The vehicle electronic control device according to claim 1,
The timer is a counter that counts in synchronization with the rotation of a controlled object.
前記データ入力部は、所定周期で入力信号をデジタルデータに変換するA/D変換器(30)を備え、前記DMAコントローラは、該A/D変換器によるA/D変換結果であるデータを記憶するレジスタ(32)から、該データを前記RAMに転送するよう構成されている、車両用電子制御装置。 The vehicle electronic control device according to any one of claims 1 to 3,
The data input unit includes an A/D converter (30) that converts an input signal into digital data at a predetermined period, and the DMA controller is configured to transfer data resulting from the A/D conversion by the A/D converter from a register (32) that stores the data to the RAM.
前記CPUは、前記データの転送期間の間、前記RAMに転送された前記データのうち、前記A/D変換器によるA/D変換の遅れ時間が経過する間に転送された前記データを破棄し、前記データ転送期間を、前記遅れ時間分延長する、ように構成されている、車両用電子制御装置。 5. The vehicle electronic control device according to claim 4,
The CPU is configured to discard, during the data transfer period, the data transferred to the RAM during a delay time of A/D conversion by the A/D converter, and to extend the data transfer period by the delay time.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021104184A JP7528875B2 (en) | 2021-06-23 | 2021-06-23 | Vehicle Electronic Control Unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021104184A JP7528875B2 (en) | 2021-06-23 | 2021-06-23 | Vehicle Electronic Control Unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023003171A JP2023003171A (en) | 2023-01-11 |
| JP7528875B2 true JP7528875B2 (en) | 2024-08-06 |
Family
ID=84817279
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021104184A Active JP7528875B2 (en) | 2021-06-23 | 2021-06-23 | Vehicle Electronic Control Unit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7528875B2 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000148663A (en) | 1998-11-09 | 2000-05-30 | Seiko Epson Corp | DMA apparatus and image forming apparatus using the same |
| JP2005182505A (en) | 2003-12-19 | 2005-07-07 | Kyocera Mita Corp | Data transfer controller and image forming apparatus |
| 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 |
-
2021
- 2021-06-23 JP JP2021104184A patent/JP7528875B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000148663A (en) | 1998-11-09 | 2000-05-30 | Seiko Epson Corp | DMA apparatus and image forming apparatus using the same |
| JP2005182505A (en) | 2003-12-19 | 2005-07-07 | Kyocera Mita Corp | Data transfer controller and image forming apparatus |
| 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 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023003171A (en) | 2023-01-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7996732B2 (en) | Program-execution monitoring method, system, and program | |
| JP3791139B2 (en) | Vehicle control device | |
| JP5861718B2 (en) | Electronic control device for vehicle and data receiving method | |
| US6445998B2 (en) | Engine control unit using pulses of different frequencies | |
| JP7528875B2 (en) | Vehicle Electronic Control Unit | |
| JPH0427387B2 (en) | ||
| JP2006161645A (en) | Sensor signal processing device for power train control | |
| US7230526B2 (en) | Device and method for synchronizing a flasher frequency with a central flashing frequency | |
| JP7435182B2 (en) | electronic control unit | |
| JP2018155105A (en) | Engine control device and electronic control device | |
| US8131455B2 (en) | Engine control apparatus including computing section and A/D converting section | |
| JPH0610818A (en) | Knocking control device for internal combustion engine | |
| CN111176150B (en) | Electronic control device and emergency interrupt method for micro-beat generation | |
| JP6981512B2 (en) | Electronic control device | |
| US12158390B2 (en) | Method and computing device for operating a control unit for an exhaust gas sensor | |
| JPH0719104A (en) | Input/output processing ic and input/output processing method | |
| JP2615559B2 (en) | Difference processing device for non-time synchronous AD conversion processing | |
| JP2024140614A5 (en) | ||
| JP2001273152A (en) | Electronic controller | |
| JP4265026B2 (en) | Serial communication controller | |
| JPH0713897A (en) | Serial communication device for data | |
| JP2914775B2 (en) | Engine ignition timing control device | |
| JP2013161363A (en) | Electronic control device and method for executing program | |
| JPH05173935A (en) | Data transfer method | |
| JPH04362275A (en) | Ignition controller for internal combustion engine |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20231009 |
|
| TRDD | Decision of grant or rejection written | ||
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240619 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240625 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240708 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7528875 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |