JP2015173414A - Electronic controller - Google Patents

Electronic controller Download PDF

Info

Publication number
JP2015173414A
JP2015173414A JP2014049133A JP2014049133A JP2015173414A JP 2015173414 A JP2015173414 A JP 2015173414A JP 2014049133 A JP2014049133 A JP 2014049133A JP 2014049133 A JP2014049133 A JP 2014049133A JP 2015173414 A JP2015173414 A JP 2015173414A
Authority
JP
Japan
Prior art keywords
sub
timer
main
level
clock signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014049133A
Other languages
Japanese (ja)
Other versions
JP6167946B2 (en
Inventor
祐輔 亀谷
Yusuke Kamegai
祐輔 亀谷
本多 隆芳
Takayoshi Honda
隆芳 本多
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2014049133A priority Critical patent/JP6167946B2/en
Priority to DE102015204316.9A priority patent/DE102015204316A1/en
Publication of JP2015173414A publication Critical patent/JP2015173414A/en
Application granted granted Critical
Publication of JP6167946B2 publication Critical patent/JP6167946B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/10Distribution of clock signals, e.g. skew

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Microcomputers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an electronic controller in which increase in deviation of the number of counts is suppressed.SOLUTION: An electronic controller includes a plurality of microcomputers (10, 20) having timers (11, 21) for measuring the time by counting the number of pulses included in a clock signal, and processing sections (12, 22) for adjusting the number of counts of the timers, respectively, and an oscillation circuit (30) for outputting the clock signal. The oscillation circuit has an oscillator (31) oscillating at a specific frequency, and a generating section (32) for generating the clock signal based on the oscillation of the oscillator. The timers of the plurality of microcomputers count the number of pulses included in the clock signal outputted from one oscillation circuit, and are synchronized with each other based on the number of counts of the pulses.

Description

本発明は、複数のマイコンと発振回路とを有する電子制御装置に関するものである。   The present invention relates to an electronic control device having a plurality of microcomputers and an oscillation circuit.

特許文献1に示されるように、複数の処理装置それぞれが有する計時手段の時刻を補正するタイマ同期方式が従来技術として知られている。複数の処理装置それぞれは自己の所有する計時手段が計時した時刻を他の処理装置に送信する。そして複数の処理装置それぞれは受信した時刻と自己の時刻とを比較し、その差が予め設定された許容誤差範囲を越えていた場合は、受信した時刻情報に基づいて自己の計時手段の時刻を補正する。   As shown in Patent Document 1, a timer synchronization system that corrects the time of time measuring means included in each of a plurality of processing devices is known as a prior art. Each of the plurality of processing devices transmits the time measured by its own clocking means to the other processing devices. Each of the plurality of processing devices compares the received time with its own time, and if the difference exceeds a preset allowable error range, the time of its own time measuring means is determined based on the received time information. to correct.

特開平5−189385号公報Japanese Patent Laid-Open No. 5-189385

上記した特許文献1では、複数の処理装置それぞれが有する計時手段について詳しく記載されていない。しかしながら通常、計時手段としてはパルス信号をカウントするカウンターが採用される。そして複数の処理装置それぞれは上記したカウンターとパルス信号を生成する回路(パルス信号生成部)とを有する。上記したように受信した時刻と自己の時刻とを合わせる場合、各処理装置は各カウンターにて計測されたパルス信号に含まれるパルスの数(カウント数)が一致するように補正する。   In the above-described Patent Document 1, the timing means included in each of the plurality of processing devices is not described in detail. However, a counter that counts pulse signals is usually employed as the time measuring means. Each of the plurality of processing devices includes the counter and a circuit (pulse signal generation unit) that generates a pulse signal. When the received time and the own time are matched as described above, each processing device corrects the number of pulses (count number) included in the pulse signal measured by each counter to match.

ところで上記したように各処理装置それぞれが独自にパルス信号生成部を有する場合、各パルス信号生成部にて生成されるパルス信号が異なる。そのために各処理装置のカウンターのカウント数のずれが大きくなる虞がある。   By the way, as described above, when each processing apparatus has its own pulse signal generation unit, the pulse signal generated by each pulse signal generation unit is different. For this reason, there is a possibility that the deviation of the counter number of each processing apparatus becomes large.

そこで本発明は上記問題点に鑑み、カウント数のずれが大きくなることが抑制された電子制御装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide an electronic control device in which an increase in the number of counts is suppressed.

上記した目的を達成するために本発明は、クロック信号に含まれるパルスの数をカウントすることで時間を計測するタイマ(11,21)、および、タイマのカウント数を調整する処理部(12,22)をそれぞれ有する複数のマイコン(10,20)と、クロック信号を出力する発振回路(30)と、を有し、発振回路は、固有の周波数で振動する発振子(31)と、発振子の振動に基づいてクロック信号を生成する生成部(32)と、を有し、複数のマイコンそれぞれのタイマは、1つの発振回路から出力されるクロック信号に含まれるパルスの数をカウントしており、複数のマイコンそれぞれのタイマは、互いにパルスの数をカウントしたカウント数に基づいて同期していることを特徴とする。   In order to achieve the above object, the present invention provides a timer (11, 21) for measuring time by counting the number of pulses included in a clock signal, and a processing unit (12, 12) for adjusting the count number of the timer. 22) each having a plurality of microcomputers (10, 20) and an oscillation circuit (30) for outputting a clock signal. The oscillation circuit includes an oscillator (31) that vibrates at a specific frequency, and an oscillator. And a generation unit (32) that generates a clock signal based on the oscillation of the microcomputer, and each timer of each of the plurality of microcomputers counts the number of pulses included in the clock signal output from one oscillation circuit. The timers of the plurality of microcomputers are synchronized with each other based on the counted number obtained by counting the number of pulses.

このように本発明によれば、複数のマイコン(10,20)それぞれのタイマ(11,21)は、1つの発振回路(30)から出力されるクロック信号に基づいて同期している。これによれば、複数のマイコンそれぞれのタイマが異なる発振回路から出力されるクロック信号に基づいて同期する構成と比べて、各マイコン(10,20)のタイマ(11,21)のカウント数のずれが大きくなることが抑制される。   As described above, according to the present invention, the timers (11, 21) of the plurality of microcomputers (10, 20) are synchronized based on the clock signal output from one oscillation circuit (30). According to this, as compared with the configuration in which the timers of the plurality of microcomputers are synchronized based on the clock signals output from the different oscillation circuits, the count numbers of the timers (11, 21) of the microcomputers (10, 20) are shifted. Is suppressed from increasing.

なお、特許請求の範囲に記載の請求項、および、課題を解決するための手段それぞれに記載の要素に括弧付きで符号をつけているが、この括弧付きの符号は実施形態に記載の各構成要素との対応関係を簡易的に示すためのものであり、実施形態に記載の要素そのものを必ずしも示しているわけではない。括弧付きの符号の記載は、いたずらに特許請求の範囲を狭めるものではない。   In addition, although the elements described in the claims and the means for solving the problems are attached with parentheses, the parentheses are attached to each component described in the embodiment. This is to simply show the correspondence with the elements, and does not necessarily indicate the elements themselves described in the embodiments. The description of the reference numerals with parentheses does not unnecessarily narrow the scope of the claims.

第1実施形態に係る電子制御装置の概略構成を示すブロック図である。It is a block diagram showing a schematic structure of an electronic control unit concerning a 1st embodiment. メイン処理部の同期処理の概略を示すフローチャートである。It is a flowchart which shows the outline of the synchronous process of a main process part. 第1実施形態に係る電子制御装置の各種信号を示すタイミングチャートである。It is a timing chart which shows the various signals of the electronic controller concerning a 1st embodiment. 第1実施形態に係る電子制御装置の各種信号を示すタイミングチャートである。It is a timing chart which shows the various signals of the electronic controller concerning a 1st embodiment. 電子制御装置の変形例の各種信号を示すタイミングチャートである。It is a timing chart which shows the various signals of the modification of an electronic controller. 第2実施形態に係る電子制御装置の各種信号を示すタイミングチャートである。It is a timing chart which shows the various signals of the electronic controller concerning a 2nd embodiment. 第2実施形態に係る電子制御装置の各種信号を示すタイミングチャートである。It is a timing chart which shows the various signals of the electronic controller concerning a 2nd embodiment. 電子制御装置の変形例の各種信号を示すタイミングチャートである。It is a timing chart which shows the various signals of the modification of an electronic controller. 電子制御装置の変形例を示すブロック図である。It is a block diagram which shows the modification of an electronic controller. 電子制御装置の変形例を示すブロック図である。It is a block diagram which shows the modification of an electronic controller.

(第1実施形態)
図1〜図4に基づいて、本実施形態に係る電子制御装置を説明する。図1に示すように電子制御装置100は、複数のマイコン10,20と、発振回路30と、を有する。発振回路30にて生成されたクロック信号がメインマイコン10に入力された後、クロック信号線90を介してクロック信号がサブマイコン20に入力される。マイコン10,20それぞれは発振回路30のクロック信号に基づいて同期処理を行う。マイコン10,20の同期処理としては例えばエンジン制御がある。メインマイコン10が噴射制御しつつ、サブマイコン20が点火制御する。こうすることでエンジンの燃焼が行われる。
(First embodiment)
Based on FIGS. 1-4, the electronic control apparatus which concerns on this embodiment is demonstrated. As shown in FIG. 1, the electronic control device 100 includes a plurality of microcomputers 10 and 20 and an oscillation circuit 30. After the clock signal generated by the oscillation circuit 30 is input to the main microcomputer 10, the clock signal is input to the sub microcomputer 20 via the clock signal line 90. Each of the microcomputers 10 and 20 performs a synchronization process based on the clock signal of the oscillation circuit 30. An example of the synchronization process of the microcomputers 10 and 20 is engine control. The sub microcomputer 20 performs ignition control while the main microcomputer 10 performs injection control. By doing so, the engine is combusted.

メインマイコン10は、発振回路30から出力されるクロック信号に含まれるパルスの数をカウントすることで時間を計測するメインタイマ11、および、メインタイマ11のカウント数(以下、メインカウント数と示す)を調整するメイン処理部12を有する。メイン処理部12はメインタイマ11の調整だけではなく、上記したように噴射制御も行う。本実施形態に係るメインマイコン10は、図1に示すように発振回路30の一部(後述する生成部32)を保有している。   The main microcomputer 10 measures the time by counting the number of pulses included in the clock signal output from the oscillation circuit 30, and the count number of the main timer 11 (hereinafter referred to as the main count number). A main processing unit 12 for adjusting The main processing unit 12 performs not only adjustment of the main timer 11 but also injection control as described above. The main microcomputer 10 according to the present embodiment has a part of the oscillation circuit 30 (a generation unit 32 described later) as shown in FIG.

サブマイコン20は、発振回路30から出力されるクロック信号に含まれるパルスの数をカウントすることで時間を計測するサブタイマ21、および、サブタイマ21のカウント数(以下、サブカウント数と示す)を調整するサブ処理部22を有する。サブ処理部22はサブタイマ21の調整だけではなく、上記したように点火制御も行う。   The sub microcomputer 20 adjusts the sub timer 21 that measures time by counting the number of pulses included in the clock signal output from the oscillation circuit 30, and the count number of the sub timer 21 (hereinafter referred to as the sub count number). The sub-processing unit 22 is provided. The sub processing unit 22 performs not only the adjustment of the sub timer 21, but also ignition control as described above.

以上示したように、タイマ11,21それぞれは上記した1つの発振回路30から出力されるクロック信号に含まれるパルスの数をカウントしている。そしてタイマ11,21それぞれは、互いにパルスの数をカウントしたカウント数に基づいて同期する。   As described above, each of the timers 11 and 21 counts the number of pulses included in the clock signal output from the single oscillation circuit 30 described above. Each of the timers 11 and 21 is synchronized based on a count number obtained by counting the number of pulses.

図1に示すようにメインマイコン10とサブマイコン20とは同期信号線91を介して互いに電気的に接続されている。メイン処理部12はメインカウント数の値に応じて同期信号線91に出力する同期信号の電圧レベルを変動する。こうすることで、同期信号線91の電圧レベルを変動させる。サブ処理部22は同期信号線91(同期信号)の電圧レベルが変動すると、サブカウント数をメインカウント数と一致させる。こうすることで、サブタイマ21とメインタイマ11とを同期させる。なお、メイン処理部12は同期信号の電圧レベルを2つのレベルに変化させる。すなわち第1レベルと、第1レベルよりも電圧レベルの高い第2レベルである。以下においては第1レベルをLoレベル、第2レベルをHiレベルと示す。   As shown in FIG. 1, the main microcomputer 10 and the sub-microcomputer 20 are electrically connected to each other via a synchronization signal line 91. The main processing unit 12 varies the voltage level of the synchronization signal output to the synchronization signal line 91 according to the value of the main count number. In this way, the voltage level of the synchronization signal line 91 is changed. When the voltage level of the synchronization signal line 91 (synchronization signal) fluctuates, the sub processing unit 22 makes the sub count number coincide with the main count number. In this way, the sub timer 21 and the main timer 11 are synchronized. The main processing unit 12 changes the voltage level of the synchronization signal to two levels. That is, the first level and the second level having a voltage level higher than the first level. In the following, the first level is indicated as Lo level, and the second level is indicated as Hi level.

発振回路30は、固有の周波数で振動する発振子31と、発振子31の振動に基づいてクロック信号を生成する生成部32と、を有する。発振子31はいわゆる水晶振動子であって、水晶の圧電効果によって振動信号を生成部32に出力する。生成部32は発振子31から出力される振動信号をデジタル信号に変換し、変換した振動信号の周波数およびパルス幅を調整して、クロック信号を生成する。なお、上記したように生成部32はメインマイコン10に含まれる。したがって以下においては生成部32をメイン生成部32と示し、メイン生成部32(発振回路30)から出力されるクロック信号をメインクロック信号とする。   The oscillation circuit 30 includes an oscillator 31 that vibrates at a specific frequency, and a generation unit 32 that generates a clock signal based on the vibration of the oscillator 31. The oscillator 31 is a so-called crystal resonator, and outputs a vibration signal to the generation unit 32 by the piezoelectric effect of the crystal. The generation unit 32 converts the vibration signal output from the oscillator 31 into a digital signal, adjusts the frequency and pulse width of the converted vibration signal, and generates a clock signal. As described above, the generation unit 32 is included in the main microcomputer 10. Therefore, hereinafter, the generation unit 32 is referred to as a main generation unit 32, and a clock signal output from the main generation unit 32 (oscillation circuit 30) is referred to as a main clock signal.

本実施形態に係るサブマイコン20は、図1に示すようにサブ生成部33を有する。サブ生成部33はメイン生成部32から出力されるメインクロック信号の周波数およびパルス幅を調整し、サブタイマ21やサブ処理部22の動作に適したサブクロック信号を生成するものである。サブ生成部33は、逓倍回路、若しくは、分周回路である。   The sub microcomputer 20 according to the present embodiment includes a sub generation unit 33 as shown in FIG. The sub generation unit 33 adjusts the frequency and pulse width of the main clock signal output from the main generation unit 32 and generates a sub clock signal suitable for the operation of the sub timer 21 and the sub processing unit 22. The sub generation unit 33 is a multiplier circuit or a frequency divider circuit.

ただし、サブ生成部33からサブタイマ21に出力されるサブクロック信号は、図3および図4に示すようにメインクロック信号と同一の周波数およびパルス幅を有する。2つのクロック信号では、クロック信号に含まれるパルスの立ち上がりエッジや立ち下がりエッジのタイミングに幾分の違いがあるが、これはメインクロック信号がメインマイコン10からサブマイコン20へと入力されるまでに遅延するためである。このように、サブタイマ21には実質的にメインクロック信号が入力される。なお、サブマイコン20の動作クロック(サブクロック信号)がメインマイコン10の動作クロック(メインクロック信号)と同一の場合、サブ生成部33は不要である。   However, the sub clock signal output from the sub generator 33 to the sub timer 21 has the same frequency and pulse width as the main clock signal as shown in FIGS. In the two clock signals, there is a slight difference in the timing of the rising edge and falling edge of the pulse included in the clock signal. This is because the main clock signal is input from the main microcomputer 10 to the sub-microcomputer 20. This is to delay. As described above, the main clock signal is substantially input to the sub-timer 21. When the operation clock (sub clock signal) of the sub microcomputer 20 is the same as the operation clock (main clock signal) of the main microcomputer 10, the sub generation unit 33 is not necessary.

次に、メイン処理部12の同期処理を図2に基づいて概説する。メイン処理部12は、メインタイマ11にてメインクロック信号をカウントしている場合、図2に示す処理を行う。すなわちメイン処理部12は、ステップS10にてメインカウント数が1インクリメント(増加)する度に、ステップS20にてメインカウント数が所定値となったか否かを判定する。メインカウント数が所定値となった場合、メイン処理部12はステップS30にて同期信号の電圧レベルを変化させて、その処理を終了する。そして再びステップS10〜ステップS30を繰り返す。これとは異なりステップS20においてメインカウント値が所定値ではない場合、メイン処理部12は再びステップS10へと戻って、ステップS10〜ステップS30を繰り返す。   Next, the synchronization processing of the main processing unit 12 will be outlined based on FIG. The main processing unit 12 performs the processing shown in FIG. 2 when the main timer 11 counts the main clock signal. That is, every time the main count number is incremented (increased) by 1 in step S10, the main processing unit 12 determines whether or not the main count number has become a predetermined value in step S20. When the main count number reaches the predetermined value, the main processing unit 12 changes the voltage level of the synchronization signal in step S30 and ends the process. And step S10-step S30 are repeated again. On the other hand, when the main count value is not a predetermined value in step S20, the main processing unit 12 returns to step S10 again and repeats steps S10 to S30.

次に、電子制御装置100の信号について図3および図4に基づいて説明する。図に示すようにメインクロック信号、および、サブタイマに入力されるサブクロック信号それぞれはデューティ比が50%のパルス信号である。上記したようにメインクロック信号は先ずメインタイマ11に入力される。本実施形態においてメインタイマ11はメインクロック信号に含まれるパルスの立ち上がりエッジを検出すると、メインカウント数を1増加する。図に示すようにメインクロック信号の立ち上がりエッジよりも幾分か遅延してメインカウント数が1増加する。これは、メインタイマ11にてメインクロック信号の立ち上がりエッジを検出した後にメインカウント数が1上がるまでに遅延時間が発生するためである。メインクロック信号のパルス周期はこの遅延時間よりも長めに設定される。   Next, signals of the electronic control device 100 will be described with reference to FIGS. 3 and 4. As shown in the figure, each of the main clock signal and the sub clock signal input to the sub timer is a pulse signal having a duty ratio of 50%. As described above, the main clock signal is first input to the main timer 11. In this embodiment, when the main timer 11 detects the rising edge of the pulse included in the main clock signal, the main timer 11 increases the main count number by one. As shown in the figure, the main count number increases by one with some delay from the rising edge of the main clock signal. This is because a delay time occurs until the main count increases by 1 after the main timer 11 detects the rising edge of the main clock signal. The pulse period of the main clock signal is set longer than this delay time.

また上記したようにメイン処理部12はメインカウント数が所定値となった場合に同期信号の電圧レベルを変化させる。例えば図3および図4に示すように、メインカウント数が上限値や第1所定値に達すると、メイン処理部12は同期信号の電圧レベルを変化させる。この同期信号の電圧レベル変化がサブマイコン20へと出力される。図に示すように本実施形態に係るメイン処理部12はメインカウント数が所定値に達した後、メインクロック信号のパルス周期の2分の1だけ時間が経過した後に同期信号の電圧レベルを変化させる。またこれも図に示すように同期信号の出力の電圧レベルが変化した後、幾分か遅延して同期信号の入力の電圧レベルが変化する。これは同期信号がメインマイコン10からサブマイコン20に入力されるまでに遅延時間が発生するためである。メインクロック信号のパルス周期の2分の1はこの遅延時間よりも長めに設定される。これにより、同期信号がサブマイコン20に入力されるまでに、再びメインクロック信号のパルスが立ち上がることが抑制される。   Further, as described above, the main processing unit 12 changes the voltage level of the synchronization signal when the main count number reaches a predetermined value. For example, as shown in FIGS. 3 and 4, when the main count reaches the upper limit value or the first predetermined value, the main processing unit 12 changes the voltage level of the synchronization signal. The voltage level change of the synchronization signal is output to the sub-microcomputer 20. As shown in the figure, the main processing unit 12 according to the present embodiment changes the voltage level of the synchronization signal after the main count reaches a predetermined value and after a time has elapsed by a half of the pulse period of the main clock signal. Let Also, as shown in the figure, after the voltage level of the output of the synchronization signal changes, the voltage level of the input of the synchronization signal changes with some delay. This is because a delay time occurs until the synchronization signal is input from the main microcomputer 10 to the sub-microcomputer 20. One half of the pulse period of the main clock signal is set longer than this delay time. As a result, the pulse of the main clock signal is prevented from rising again before the synchronization signal is input to the sub-microcomputer 20.

これも上記したようにメインマイコン10からサブマイコン20へとメインクロック信号が入力され、サブマイコン20にてメインクロック信号に基づいてサブクロック信号が生成される。したがって図に示すようにメインクロック信号に含まれるパルスの立ち上がりエッジよりも幾分か遅延してサブクロック信号に含まれるパルスのエッジが立ち上がる。本実施形態に係るサブタイマ21はサブクロック信号に含まれるパルスの立ち上がりエッジを検出すると、サブカウント数を1増加する。サブクロック信号の立ち上がりエッジよりも幾分か遅延してサブカウント数が1増加するが、これはサブタイマ21にてサブクロック信号の立ち上がりエッジを検出した後にサブカウント数を1上げるまでに遅延時間が発生するためである。   As described above, the main clock signal is input from the main microcomputer 10 to the sub-microcomputer 20, and the sub-microcomputer 20 generates the sub-clock signal based on the main clock signal. Therefore, as shown in the figure, the edge of the pulse included in the sub clock signal rises somewhat later than the rising edge of the pulse included in the main clock signal. When the sub timer 21 according to the present embodiment detects the rising edge of the pulse included in the sub clock signal, the sub timer 21 increases the sub count number by one. The subcount number increases by 1 with a slight delay from the rising edge of the subclock signal. This is because the delay time until the subcount number is increased by 1 after the rising edge of the subclock signal is detected by the subtimer 21. This is because it occurs.

次に、マイコン10,20それぞれの同期処理について図3および図4に基づいて説明する。図3に示すように、メインクロック信号に含まれるパルスの立ち上がりエッジがメインタイマ11に入力される度にメインカウント数が1ずつ増大する。このカウントが進み、メインカウント数が上限値(FFFF)に達した後、再びメインクロック信号のパルスの立ち上がりエッジがメインタイマ11に入力されると、メインカウント数がリセットされる。次いで、メインクロック信号の立ち上がりエッジが再び入力されると、メインタイマ11は初め(0000)からメインカウント数を1ずつ増大する。   Next, the synchronization processing of each of the microcomputers 10 and 20 will be described with reference to FIGS. As shown in FIG. 3, every time the rising edge of the pulse included in the main clock signal is input to the main timer 11, the main count number increases by one. After this count advances and the main count reaches the upper limit (FFFF), when the rising edge of the main clock signal pulse is input to the main timer 11 again, the main count is reset. Next, when the rising edge of the main clock signal is input again, the main timer 11 increases the main count by 1 from the beginning (0000).

これに対してメイン処理部12は、上記したようにメインカウント数が上限値に達すると同期信号の電圧レベルをLoレベルからHiレベルへと変動する。これによって、同期信号の電圧レベルの変動がサブマイコン20へ入力される。サブ処理部22は、同期信号線91の電圧レベルがLoレベルからHiレベルへと変動すると、メインタイマ11と同期するべく、リセット信号をサブタイマ21に出力する。これによってサブカウント数がリセットされ、メインタイマ11とサブタイマ21のカウント始まりが同一とされ、カウント数が同期される。なお、もちろんサブタイマ21は、サブクロック信号の立ち上がりエッジが再び入力されると、メインタイマ11と同様にして初め(0000)からサブカウント数を1ずつ増大する。   In contrast, when the main count reaches the upper limit as described above, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level. As a result, the fluctuation of the voltage level of the synchronization signal is input to the sub-microcomputer 20. When the voltage level of the synchronization signal line 91 fluctuates from the Lo level to the Hi level, the sub processing unit 22 outputs a reset signal to the sub timer 21 in order to synchronize with the main timer 11. As a result, the sub count number is reset, the count start of the main timer 11 and the sub timer 21 is made the same, and the count number is synchronized. Of course, when the rising edge of the sub-clock signal is input again, the sub-timer 21 increases the sub-count number by 1 from the beginning (0000) in the same manner as the main timer 11.

また図4に示すように、メインカウント数が上限値と下限値の間の第1所定値(7FFFF)に達すると、メイン処理部12は同期信号の電圧レベルをHiレベルからLoレベルへと変動する。サブ処理部22は第1所定値を記憶しており、同期信号線91の電圧レベルがHiレベルからLoレベルへと変動すると、サブカウント値と第1所定値との差に基づいてサブカウント数をメインカウント数と一致させる。こうすることで、サブタイマ21とメインタイマ11とを同期する。なお、上記した第1所定値は特許請求の範囲に記載の第3所定値に相当する。   Also, as shown in FIG. 4, when the main count reaches a first predetermined value (7FFFF) between the upper limit value and the lower limit value, the main processing unit 12 changes the voltage level of the synchronization signal from the Hi level to the Lo level. To do. The sub-processing unit 22 stores the first predetermined value, and when the voltage level of the synchronization signal line 91 changes from the Hi level to the Lo level, the sub-count number is based on the difference between the sub-count value and the first predetermined value. To match the main count. By doing so, the sub-timer 21 and the main timer 11 are synchronized. The first predetermined value described above corresponds to the third predetermined value described in the claims.

次に、本実施形態に係る電子制御装置100の作用効果を説明する。上記したように、複数のマイコン10,20それぞれのタイマ11,21は、1つの発振回路30から出力されるクロック信号に基づいて同期している。これによれば、複数のマイコンそれぞれのタイマが異なる発振回路から出力されるクロック信号に基づいて同期する構成と比べて、各マイコン10,20のタイマ11,21のカウント数のずれが大きくなることが抑制される。   Next, functions and effects of the electronic control apparatus 100 according to the present embodiment will be described. As described above, the timers 11 and 21 of the plurality of microcomputers 10 and 20 are synchronized based on the clock signal output from one oscillation circuit 30. According to this, the deviation of the count numbers of the timers 11 and 21 of the microcomputers 10 and 20 becomes larger than the configuration in which the timers of the plurality of microcomputers are synchronized based on the clock signals output from different oscillation circuits. Is suppressed.

メイン処理部12はメインカウント数が上限値に達すると同期信号の電圧レベルをLoレベルからHiレベルへと変動し、サブ処理部22はそれに応じてサブタイマ21をリセットしてカウント数を同期する。またメイン処理部12はメインカウント数が第1所定値に達すると同期信号の電圧レベルをHiレベルからLoレベルへと変動し、サブ処理部22はそれに応じてサブカウント数をメインカウント数と一致させる。これによれば、メインタイマ11が下限値から上限値に達するまでに、タイマ11,21を2回同期することができる。   When the main processing unit 12 reaches the upper limit value, the voltage level of the synchronization signal changes from the Lo level to the Hi level, and the sub processing unit 22 resets the sub timer 21 and synchronizes the count number accordingly. When the main count reaches the first predetermined value, the main processing unit 12 changes the voltage level of the synchronization signal from the Hi level to the Lo level, and the sub processing unit 22 accordingly matches the sub count with the main count. Let According to this, the timers 11 and 21 can be synchronized twice before the main timer 11 reaches the upper limit value from the lower limit value.

本実施形態では、図3に示すようにメインカウント数が上限値(FFFF)に達すると、メイン処理部12は同期信号の電圧レベルをLoレベルからHiレベルへと変動する。そしてサブ処理部22は同期信号線91の電圧レベルがLoレベルからHiレベルへと変動すると、サブタイマ21をリセットすることでメインタイマ11とサブタイマ21とを同期する例を示した。しかしながら図5に示すように、上記した同期処理とは異なる同期処理を行ってもよい。すなわち、メイン処理部12はメインカウント数が上限値(FFFF)よりも第2所定値だけ少ない第3所定値に達すると、同期信号の電圧レベルをLoレベルからHiレベルへと変動する。この場合、メインカウント数が第2所定値だけ進み上限値に達した後、再びメインクロック信号のパルスの立ち上がりエッジがメインタイマ11に入力されると、メインカウント数がリセットされる。これに対してサブ処理部22は、同期信号線91の電圧レベルがLoレベルからHiレベルに変動すると、サブクロック信号に含まれるパルスがサブタイマ21に入力される毎に同期信号線91の電圧レベルがHiレベルであるか否かをチェックする。サブ処理部22は第2所定値を記憶しており、このチェックをサブクロック信号に含まれるパルスがサブタイマ21に第2所定値だけ入力される間行う。そしてサブ処理部22は同期信号線91の電圧レベルがHiレベルに保たれていると判断した場合、メインタイマ11とともにサブタイマ21のカウント数をリセットすることで、サブタイマ21とメインタイマ11とを同期する。上記した第2所定値が特許請求の範囲に記載の第1所定値に相当し、第3所定値が特許請求の範囲に記載の第2所定値に相当する。   In the present embodiment, as shown in FIG. 3, when the main count number reaches the upper limit value (FFFF), the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level. In the example, the sub processing unit 22 synchronizes the main timer 11 and the sub timer 21 by resetting the sub timer 21 when the voltage level of the synchronization signal line 91 varies from the Lo level to the Hi level. However, as shown in FIG. 5, a synchronization process different from the synchronization process described above may be performed. That is, when the main count reaches the third predetermined value that is smaller than the upper limit (FFFF) by the second predetermined value, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level. In this case, when the main count number advances by the second predetermined value and reaches the upper limit value, when the rising edge of the pulse of the main clock signal is input to the main timer 11 again, the main count number is reset. On the other hand, when the voltage level of the synchronization signal line 91 fluctuates from the Lo level to the Hi level, the sub processing unit 22 changes the voltage level of the synchronization signal line 91 every time a pulse included in the sub clock signal is input to the sub timer 21. Checks whether or not is at the Hi level. The sub processing unit 22 stores the second predetermined value, and performs this check while the pulse included in the sub clock signal is input to the sub timer 21 by the second predetermined value. When the sub processing unit 22 determines that the voltage level of the synchronization signal line 91 is maintained at the Hi level, the sub timer 21 and the main timer 11 are synchronized by resetting the count number of the sub timer 21 together with the main timer 11. To do. The second predetermined value described above corresponds to the first predetermined value described in the claims, and the third predetermined value corresponds to the second predetermined value described in the claims.

上記したようにこの変形例では、サブ処理部22は同期信号線91の電圧レベルがHiレベルであるか否かをチェックし、Hiレベルに保たれていると判断した場合にサブタイマ21のカウント数をリセットする。これによれば、同期信号線91にノイズが乗ったとしても、そのノイズのためにサブ処理部22が同期信号線91の電圧レベルが変動したと判定することが抑制される。そのために想定外の同期処理が行われることが抑制される。   As described above, in this modification, the sub processing unit 22 checks whether or not the voltage level of the synchronization signal line 91 is at the Hi level, and determines that the count value of the sub timer 21 is determined to be maintained at the Hi level. To reset. According to this, even if noise is applied to the synchronization signal line 91, it is suppressed that the sub processing unit 22 determines that the voltage level of the synchronization signal line 91 has changed due to the noise. Therefore, unexpected synchronization processing is suppressed.

上記した形態においてメイン処理部12は、メインカウント数が上限値若しくは第3設定値に達すると、同期信号の電圧レベルをLoレベルからHiレベルへと変動し、メインカウント数が第1設定値に達すると、同期信号の電圧レベルをHiレベルからLoレベルへと変動する例を示した。しかしながらメイン処理部12は、メインカウント数が上限値若しくは第3設定値に達すると、同期信号の電圧レベルをHiレベルからLoレベルへと変動し、メインカウント数が第1設定値に達すると、同期信号の電圧レベルをLoレベルからHiレベルへと変動してもよい。この場合サブ処理部22は、同期信号線91の電圧レベルがHiレベルからLoレベルへと変動すると、リセット信号をサブタイマ21に出力し、同期信号線91の電圧レベルがLoレベルからHiレベルへと変動すると、サブカウント数をメインカウント数と一致させる。   In the embodiment described above, when the main count reaches the upper limit value or the third set value, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level, and the main count reaches the first set value. In this example, the voltage level of the synchronization signal is changed from the Hi level to the Lo level when it reaches. However, when the main count reaches the upper limit value or the third set value, the main processing unit 12 changes the voltage level of the synchronization signal from the Hi level to the Lo level, and when the main count reaches the first set value, The voltage level of the synchronization signal may be changed from the Lo level to the Hi level. In this case, when the voltage level of the synchronization signal line 91 fluctuates from the Hi level to the Lo level, the sub processing unit 22 outputs a reset signal to the sub timer 21, and the voltage level of the synchronization signal line 91 changes from the Lo level to the Hi level. When it fluctuates, the sub-count number is matched with the main count number.

(第2実施形態)
次に、本発明の第2実施形態を図6および図7に基づいて説明する。第2実施形態に係る電子制御装置は上記した実施形態によるものと共通点が多い。そのため以下においては共通部分の説明を省略し、異なる部分を重点的に説明する。また以下においては上記した実施形態で示した要素と同一の要素には同一の符号を付与する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described with reference to FIGS. The electronic control device according to the second embodiment has much in common with the above-described embodiment. Therefore, in the following description, description of common parts is omitted, and different parts are mainly described. In the following description, the same reference numerals are given to the same elements as those described in the above embodiment.

第1実施形態では、メインカウント数が所定値に達すると、メイン処理部12が同期信号の電圧レベルをLoレベルからHiレベル、若しくは、HiレベルからLoレベルへと変動する例を示した。これに対して本実施形態では、メインカウント数が所定値に達すると、メイン処理部12は同期信号の電圧レベルをLoレベルからHiレベルへと変動した後に再びLoレベルへと戻すことを特徴とする。   In the first embodiment, when the main count number reaches a predetermined value, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level, or from the Hi level to the Lo level. On the other hand, in the present embodiment, when the main count reaches a predetermined value, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level and then returns to the Lo level again. To do.

そしてサブ処理部22は、同期信号線91の電圧レベルがLoレベルからHiレベルへと変動した際、若しくは、HiレベルからLoレベルへと変動した際、サブカウント数と所定値との差に基づいてサブカウント数をメインカウント数と一致させる。こうすることで、サブタイマ21とメインタイマ11とを同期する。   When the voltage level of the synchronization signal line 91 changes from the Lo level to the Hi level or when the voltage level of the synchronization signal line 91 changes from the Hi level to the Lo level, the sub processing unit 22 is based on the difference between the sub count number and the predetermined value. To make the subcount number coincide with the main count number. By doing so, the sub-timer 21 and the main timer 11 are synchronized.

具体的に言えば、図6および図7に示すように、メインカウント数が上限値と下限値の間の第4所定値に達すると、メイン処理部12は同期信号の電圧レベルをLoレベルからHiレベルへと変動した後に再びLoレベルに戻す。サブ処理部22は第4所定値を記憶しており、本実施形態では同期信号線91の電圧レベルがLoレベルからHiレベルへと変動した際、サブカウント数と第4所定値との差に基づいてサブカウント数をメインカウント数と一致させる。こうすることでサブタイマ21とメインタイマ11とを同期する。   Specifically, as shown in FIGS. 6 and 7, when the main count reaches a fourth predetermined value between the upper limit value and the lower limit value, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level. After changing to the Hi level, the level is returned to the Lo level again. The sub processing unit 22 stores a fourth predetermined value. In this embodiment, when the voltage level of the synchronization signal line 91 changes from the Lo level to the Hi level, the difference between the sub count number and the fourth predetermined value is obtained. Based on this, the subcount number is matched with the main count number. By doing so, the sub timer 21 and the main timer 11 are synchronized.

以上示したように、上記した第4所定値の値を任意に設定することで、設計者の所望のタイミングにて同期処理を行うことができる。また値の異なる複数の第4所定値を設定することで、メインタイマ11が下限値から上限値に達するまでに、タイマ11,21を複数回同期することができる。   As described above, by arbitrarily setting the value of the fourth predetermined value, the synchronization process can be performed at a timing desired by the designer. In addition, by setting a plurality of fourth predetermined values having different values, the timers 11 and 21 can be synchronized a plurality of times until the main timer 11 reaches the upper limit value from the lower limit value.

なお、サブタイマ21がメインタイマ11よりもカウント数が多い場合、図6に代わって図8に示す同期処理を行ってもよい。すなわち、メインカウント数が上限値と下限値の間の第5所定値に達すると、メイン処理部12は同期信号の電圧レベルをLoレベルからHiレベルへと変動した後に再びLoレベルに戻す。サブ処理部22は第5所定値を記憶しており、同期信号線91の電圧レベルがLoレベルからHiレベルへと変動した際、サブカウント数がメインカウント数に一致するまでサブタイマ21のカウントを止める。そしてサブ処理部22はサブタイマ21とメインタイマ11のカウント数が一致するとサブタイマ21のカウントを再び始める。こうすることで、サブタイマ21とメインタイマ11とを同期してもよい。ちなみに、図8に示す処理を採用する場合、サブタイマ21がメインタイマ11よりもカウント数が少ない場合において、上記した図7に示す同期処理を処理部12,22が行う。   If the sub timer 21 has a larger number of counts than the main timer 11, the synchronization process shown in FIG. 8 may be performed instead of FIG. That is, when the main count reaches the fifth predetermined value between the upper limit value and the lower limit value, the main processing unit 12 changes the voltage level of the synchronization signal from the Lo level to the Hi level and then returns to the Lo level again. The sub processing unit 22 stores the fifth predetermined value. When the voltage level of the synchronization signal line 91 changes from the Lo level to the Hi level, the sub timer 21 counts the sub timer 21 until the sub count number matches the main count number. stop. Then, the sub processing unit 22 starts counting of the sub timer 21 again when the count numbers of the sub timer 21 and the main timer 11 match. In this way, the sub timer 21 and the main timer 11 may be synchronized. Incidentally, when the processing shown in FIG. 8 is adopted, when the sub timer 21 has a smaller number of counts than the main timer 11, the processing units 12 and 22 perform the synchronization processing shown in FIG.

本実施形態においてサブ処理部22は、同期信号線91の電圧レベルがLoレベルからHiレベルへと変動した際にサブカウント数をメインカウント数と一致させる例を示した。しかしながらサブ処理部22は同期信号線91の電圧レベルがHiレベルからLoレベルへと変動した際にサブカウント数をメインカウント数と一致させてもよい。   In the present embodiment, the sub processing unit 22 shows an example in which the sub count number matches the main count number when the voltage level of the synchronization signal line 91 changes from the Lo level to the Hi level. However, the sub processing unit 22 may match the sub count number with the main count number when the voltage level of the synchronization signal line 91 changes from the Hi level to the Lo level.

以上、本発明の好ましい実施形態について説明したが、本発明は上記した実施形態になんら制限されることなく、本発明の主旨を逸脱しない範囲において、種々変形して実施することが可能である。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.

各実施形態において電子制御装置100はマイコン10,20を有する例を示した。しかしながらマイコンの数としては上記例に限定されず複数であればよい。例えば図9に示すように、電子制御装置100が1つのメインマイコン10と、複数のサブマイコン20と、を有していてもよい。   In each embodiment, an example in which the electronic control device 100 includes the microcomputers 10 and 20 is shown. However, the number of microcomputers is not limited to the above example and may be plural. For example, as shown in FIG. 9, the electronic control device 100 may include one main microcomputer 10 and a plurality of sub-microcomputers 20.

各実施形態ではメインマイコン10が噴射制御しつつ、サブマイコン20が点火制御することでエンジンの燃焼を同期制御する例を示した。しかしながら同期制御としては上記例に限定されない。   In each embodiment, an example is shown in which the combustion of the engine is synchronously controlled by the sub-microcomputer 20 performing ignition control while the main microcomputer 10 performs injection control. However, the synchronization control is not limited to the above example.

各実施形態ではメインマイコン10が発振回路30の一部(メイン生成部32)を保有する例を示した。しかしながらメインマイコン10が発振回路30の一部を保有していなくともよい。   In each embodiment, an example in which the main microcomputer 10 has a part of the oscillation circuit 30 (main generation unit 32) is shown. However, the main microcomputer 10 may not have a part of the oscillation circuit 30.

各実施形態ではサブマイコン20がサブ生成部33を有し、サブ生成部33はメインクロック信号に基づいてサブ処理部22の動作クロック信号としてサブクロック信号を生成する例を示した。しかしながら図10に示すように、サブマイコン20がサブ発振子34をさらに備え、サブ発振子34とサブ生成部33とによってサブ発振回路が構成されてもよい。この場合、サブ生成部33はメイン生成部32と同等の機能を有し、サブ発振子34にて生成された振動信号に基づいてサブ処理部22の動作クロック信号を生成する。この場合、サブタイマ21には発振回路30から出力されるメインクロック信号そのものが入力される。なお、図10に丸印で示すようにこの場合サブマイコン20は端子を4つ有さなくてはならず、その数が増大する。そのため、図1や図9に示す構成が好ましい。   In each embodiment, the sub microcomputer 20 has the sub generation unit 33, and the sub generation unit 33 generates the sub clock signal as the operation clock signal of the sub processing unit 22 based on the main clock signal. However, as shown in FIG. 10, the sub-microcomputer 20 may further include a sub-oscillator 34, and the sub-oscillator 34 and the sub-generation unit 33 may constitute a sub-oscillation circuit. In this case, the sub generation unit 33 has a function equivalent to that of the main generation unit 32, and generates an operation clock signal for the sub processing unit 22 based on the vibration signal generated by the sub oscillator 34. In this case, the main clock signal itself output from the oscillation circuit 30 is input to the sub timer 21. In this case, as indicated by the circles in FIG. 10, the sub-microcomputer 20 must have four terminals, and the number thereof increases. Therefore, the configuration shown in FIGS. 1 and 9 is preferable.

各実施形態ではメインタイマ11がメインクロック信号に含まれるパルスの立ち上がりエッジを検出すると、メインカウント数を1増加する例を示した。しかしながらメインタイマ11はメインクロック信号の立ち下がりエッジを検出すると、メインカウント数を1増加してもよい。   In each embodiment, when the main timer 11 detects the rising edge of the pulse included in the main clock signal, the example in which the main count number is increased by 1 is shown. However, when the main timer 11 detects the falling edge of the main clock signal, it may increase the main count number by one.

各実施形態においてメイン処理部12はメインカウント数が所定値に達した後、メインクロック信号のパルス周期の2分の1だけ時間が経過した後に同期信号の電圧レベルを変化させる例を示した。しかしながら同期信号の電圧レベルを変化させるタイミングは、同期信号がサブマイコン20に入力されるまでに、再びメインクロック信号のパルスが立ち上がることが抑制される程度であればよい。同期信号の遅延時間を考慮しなければ、メインカウント数が所定値に達した後、メインクロック信号のパルス周期よりも短い時間経過した後に同期信号の電圧レベルを変化させればよい、ということができる。これとは異なり、同期信号の遅延時間よりも長く、メインクロック信号のパルス周期よりも短い時間をαとすると、同期信号の電圧レベルを変化させる時間は、αにメインクロック信号のパルス周期を定数倍加算した値に設定することもできる。   In each embodiment, the main processing unit 12 shows an example in which the voltage level of the synchronization signal is changed after the main count reaches a predetermined value and after a time has elapsed by a half of the pulse period of the main clock signal. However, the timing at which the voltage level of the synchronization signal is changed may be such that the pulse of the main clock signal is prevented from rising again until the synchronization signal is input to the sub-microcomputer 20. If the delay time of the synchronization signal is not taken into account, the voltage level of the synchronization signal may be changed after a time shorter than the pulse period of the main clock signal after the main count reaches the predetermined value. it can. In contrast, if α is a time longer than the delay time of the synchronization signal and shorter than the pulse period of the main clock signal, the time for changing the voltage level of the synchronization signal is constant by α. It is also possible to set to a value obtained by double addition.

各実施形態においてサブタイマ21がサブクロック信号に含まれるパルスの立ち上がりエッジを検出すると、サブカウント数を1増加する例を示した。しかしながらサブタイマ21はサブクロック信号の立ち下がりエッジを検出すると、サブカウント数を1増加してもよい。   In each embodiment, when the sub timer 21 detects the rising edge of the pulse included in the sub clock signal, an example in which the sub count number is increased by one is shown. However, when the sub timer 21 detects the falling edge of the sub clock signal, the sub timer 21 may increase the sub count number by one.

各実施形態では同期信号線91の同期信号が入力される例を示した。しかしながら同期信号線91に同期信号とは異なるコマンドをメイン処理部12が入力してもよい。このコマンドには同期信号とは異なることを示す識別情報が含まれており、サブ処理部22はこの識別情報を読み込むことで同期信号とコマンドとを識別する。   In each embodiment, the example in which the synchronization signal of the synchronization signal line 91 is input is shown. However, the main processing unit 12 may input a command different from the synchronization signal to the synchronization signal line 91. This command includes identification information indicating that it is different from the synchronization signal, and the sub-processing unit 22 identifies the synchronization signal and the command by reading this identification information.

各実施形態では電子制御装置100の起動時の動作について特に言及しなかった。しかしながら例えば電子制御装置100の起動時において、サブマイコン20はメインマイコン10から同期信号が入力されるまで待機状態であってもよい。   In each embodiment, the operation at the time of starting the electronic control device 100 is not particularly mentioned. However, for example, when the electronic control device 100 is activated, the sub-microcomputer 20 may be in a standby state until a synchronization signal is input from the main microcomputer 10.

各実施形態では配線異常の検出については特に言及していなかった。しかしながら例えばサブマイコン20は、クロック信号線90および同期信号線91のいずれか一方から信号が入力されなかった場合、その入力されなかった信号の入力される配線に異常が生じていると判定してもよい。   In each embodiment, no particular reference is made to detection of wiring abnormality. However, for example, if no signal is input from either the clock signal line 90 or the synchronization signal line 91, the sub-microcomputer 20 determines that an abnormality has occurred in the wiring to which the signal that has not been input is input. Also good.

10・・・メインマイコン
11・・・メインタイマ
12・・・メイン処理部
20・・・サブマイコン
21・・・サブタイマ
22・・・サブ処理部
30・・・発振回路
31・・・発振子
32・・・生成部
100・・・電子制御装置
DESCRIPTION OF SYMBOLS 10 ... Main microcomputer 11 ... Main timer 12 ... Main processing part 20 ... Sub microcomputer 21 ... Sub timer 22 ... Sub processing part 30 ... Oscillator circuit 31 ... Oscillator 32 ... Generator 100 ... Electronic control device

Claims (11)

クロック信号に含まれるパルスの数をカウントすることで時間を計測するタイマ(11,21)、および、前記タイマのカウント数を調整する処理部(12,22)をそれぞれ有する複数のマイコン(10,20)と、
前記クロック信号を出力する発振回路(30)と、を有し、
前記発振回路は、固有の周波数で振動する発振子(31)と、前記発振子の振動に基づいて前記クロック信号を生成する生成部(32)と、を有し、
複数の前記マイコンそれぞれの前記タイマは、1つの前記発振回路から出力される前記クロック信号に含まれる前記パルスの数をカウントしており、
複数の前記マイコンそれぞれの前記タイマは、互いに前記パルスの数をカウントしたカウント数に基づいて同期していることを特徴とする電子制御装置。
A plurality of microcomputers (10, 21) each having a timer (11, 21) for measuring time by counting the number of pulses included in the clock signal and a processing unit (12, 22) for adjusting the count number of the timer 20)
An oscillation circuit (30) for outputting the clock signal,
The oscillation circuit includes an oscillator (31) that vibrates at a specific frequency, and a generation unit (32) that generates the clock signal based on the vibration of the oscillator.
The timer of each of the plurality of microcomputers counts the number of pulses included in the clock signal output from one oscillation circuit,
The electronic control device according to claim 1, wherein the timers of the plurality of microcomputers are synchronized with each other based on a count number obtained by counting the number of pulses.
複数の前記マイコンの内、任意の1つをメインマイコン(10)、他をサブマイコン(20)とすると、
前記メインマイコンは前記タイマとしてメインタイマ(11)、前記処理部としてメイン処理部(12)を有し、
前記サブマイコンは前記タイマとしてサブタイマ(21)、前記処理部としてサブ処理部(22)を有し、
前記メインマイコンと前記サブマイコンとは同期信号線(91)を介して互いに電気的に接続されており、
前記メイン処理部は前記メインタイマのカウント数が所定値に達すると、前記同期信号線の電圧レベルを変動させ、
前記サブ処理部は前記同期信号線の電圧レベルが変動すると、前記サブタイマのカウント数を前記メインタイマのカウント数と一致させることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項1に記載の電子制御装置。
If any one of the plurality of microcomputers is a main microcomputer (10) and the other is a sub-microcomputer (20),
The main microcomputer has a main timer (11) as the timer and a main processing unit (12) as the processing unit,
The sub-microcomputer has a sub-timer (21) as the timer and a sub-processing unit (22) as the processing unit,
The main microcomputer and the sub-microcomputer are electrically connected to each other via a synchronization signal line (91),
When the main timer count reaches a predetermined value, the main processing unit changes the voltage level of the synchronization signal line,
The sub-processing unit synchronizes the sub-timer and the main timer by matching the count number of the sub-timer with the count number of the main timer when the voltage level of the synchronization signal line fluctuates. Item 2. The electronic control device according to Item 1.
前記メインタイマは、自身のカウント数が上限値に達した後に再び前記クロック信号に含まれる前記パルスが入力されると前記カウント数をリセットし、
前記メイン処理部は、前記メインタイマのカウント数が上限値に達すると、前記同期信号線の電圧レベルを第1レベルから第2レベルへと変動し、
前記サブ処理部は、前記同期信号線の電圧レベルが前記第1レベルから前記第2レベルへと変動すると、前記メインタイマとともに前記サブタイマのカウント数をリセットすることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項2に記載の電子制御装置。
The main timer resets the count number when the pulse included in the clock signal is input again after the count number of the main timer reaches the upper limit value,
The main processing unit changes the voltage level of the synchronization signal line from the first level to the second level when the count number of the main timer reaches an upper limit value,
When the voltage level of the synchronization signal line fluctuates from the first level to the second level, the sub processing unit resets the count number of the sub timer together with the main timer, so that the sub timer and the main timer The electronic control device according to claim 2, wherein the electronic control devices are synchronized.
前記メインタイマは、自身のカウント数が上限値に達した後に再び前記クロック信号に含まれるパルスが入力されると前記カウント数をリセットし、
前記メイン処理部は、前記メインタイマのカウント数が上限値よりも第1所定値だけ少ない第2所定値に達すると、前記同期信号線の電圧レベルを第1レベルから第2レベルへと変動し、
前記サブ処理部は、前記同期信号線の電圧レベルが前記第1レベルから前記第2レベルに変動すると、それから前記クロック信号に含まれる前記パルスが前記サブタイマに入力される毎に前記同期信号線の電圧レベルが前記第2レベルであるか否かをチェックすることを前記クロック信号に含まれる前記パルスが前記サブタイマに前記第1所定値だけ入力される間行い、前記同期信号線の電圧レベルが前記第2レベルに保たれていると判断した場合、前記メインタイマとともに前記サブタイマのカウント数をリセットすることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項2に記載の電子制御装置。
The main timer resets the count number when a pulse included in the clock signal is input again after the count number of the main timer reaches an upper limit value.
The main processing unit changes the voltage level of the synchronization signal line from the first level to the second level when the count number of the main timer reaches a second predetermined value that is smaller than the upper limit by a first predetermined value. ,
When the voltage level of the synchronization signal line fluctuates from the first level to the second level, the sub-processing unit then changes the level of the synchronization signal line every time the pulse included in the clock signal is input to the sub-timer. Whether or not the voltage level is the second level is checked while the pulse included in the clock signal is input to the sub timer by the first predetermined value, and the voltage level of the synchronization signal line is 3. The electronic device according to claim 2, wherein, when it is determined that the second level is maintained, the sub timer and the main timer are synchronized by resetting the count number of the sub timer together with the main timer. 4. Control device.
前記メイン処理部は、前記メインタイマのカウント数が上限値と下限値の間の第3所定値に達すると、前記同期信号線の電圧レベルを第2レベルから第1レベルへと変動し、
前記サブ処理部は、前記同期信号線の電圧レベルが前記第2レベルから前記第1レベルへと変動すると、前記サブタイマのカウント値と前記第3所定値との差に基づいて前記サブタイマのカウント数を前記メインタイマのカウント数と一致させることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項2〜4いずれか1項に記載の電子制御装置。
When the main timer count reaches a third predetermined value between the upper limit value and the lower limit value, the main processing unit changes the voltage level of the synchronization signal line from the second level to the first level,
When the voltage level of the synchronization signal line fluctuates from the second level to the first level, the sub processing unit counts the sub timer based on a difference between the count value of the sub timer and the third predetermined value. 5. The electronic control device according to claim 2, wherein the sub-timer and the main timer are synchronized by matching the count with the count number of the main timer. 6.
前記メイン処理部は、前記メインタイマのカウント数が上限値と下限値の間の第4所定値に達すると、前記同期信号線の電圧レベルを第1レベルから第2レベルへと変動した後に再び前記第1レベルに戻し、
前記サブ処理部は、前記同期信号線の電圧レベルが前記第1レベルから前記第2レベルへと変動した際、若しくは、前記第2レベルから前記第1レベルへと変動した際、前記サブタイマのカウント数と前記第4所定値との差に基づいて前記サブタイマのカウント数を前記メインタイマのカウント数と一致させることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項2に記載の電子制御装置。
When the main timer count reaches a fourth predetermined value between the upper limit value and the lower limit value, the main processing unit again changes the voltage level of the synchronization signal line from the first level to the second level. Return to the first level,
The sub-processing unit counts the sub-timer when the voltage level of the synchronization signal line changes from the first level to the second level or when the voltage level changes from the second level to the first level. 3. The sub timer and the main timer are synchronized by matching the count number of the sub timer with the count number of the main timer based on the difference between the number and the fourth predetermined value. The electronic control device described.
前記メイン処理部は、前記メインタイマのカウント数が上限値と下限値の間の第5所定値に達すると、前記同期信号線の電圧レベルを第1レベルから第2レベルへと変動した後に再び前記第1レベルに戻し、
前記サブ処理部は、前記同期信号線の電圧レベルが前記第1レベルから前記第2レベルへと変動した際、若しくは、前記第2レベルから前記第1レベルへと変動した際、前記サブタイマが前記メインタイマよりもカウント数が多い場合、前記サブタイマのカウント数が前記メインタイマのカウント数に一致するまで前記サブタイマのカウントを止め、前記サブタイマと前記メインタイマのカウント数が一致すると前記サブタイマのカウントを再び始めることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項2に記載の電子制御装置。
When the main timer count reaches a fifth predetermined value between the upper limit value and the lower limit value, the main processing unit again changes the voltage level of the synchronization signal line from the first level to the second level. Return to the first level,
When the voltage level of the synchronization signal line changes from the first level to the second level, or when the voltage level of the synchronization signal line changes from the second level to the first level, the sub-timer When the number of counts is larger than that of the main timer, the sub timer is stopped until the count number of the sub timer matches the count number of the main timer. 3. The electronic control device according to claim 2, wherein the sub-timer and the main timer are synchronized by starting again.
前記サブ処理部は、前記同期信号線の電圧レベルが前記第1レベルから前記第2レベルへと変動した際、若しくは、前記第2レベルから前記第1レベルへと変動した際、前記サブタイマが前記メインタイマよりもカウント数が少ない場合、前記サブタイマのカウント数と前記第5所定値との差に基づいて前記サブタイマのカウント数を前記メインタイマのカウント数と一致させることで、前記サブタイマと前記メインタイマとを同期することを特徴とする請求項7に記載の電子制御装置。   When the voltage level of the synchronization signal line changes from the first level to the second level, or when the voltage level of the synchronization signal line changes from the second level to the first level, the sub-timer When the count number is smaller than that of the main timer, the sub timer and the main timer are matched by matching the count number of the sub timer with the count number of the main timer based on the difference between the count number of the sub timer and the fifth predetermined value. The electronic control device according to claim 7, wherein the electronic control device is synchronized with a timer. 前記メインマイコンが前記発振回路の生成部を有し、
前記メインマイコンから前記サブマイコンへ前記クロック信号が出力されることを特徴とする請求項2〜8いずれか1項に記載の電子制御装置。
The main microcomputer has a generation unit of the oscillation circuit,
The electronic control device according to claim 2, wherein the clock signal is output from the main microcomputer to the sub-microcomputer.
前記メインマイコンが有する前記生成部をメイン生成部(32)とし、前記メイン生成部から出力される前記クロック信号をメインクロック信号とすると、
前記サブマイコンは前記メインクロック信号に基づいてサブクロック信号を生成するサブ生成部(33)を有し、
前記サブ生成部は、逓倍回路、若しくは、分周回路であることを特徴とする請求項9に記載の電子制御装置。
When the generation unit included in the main microcomputer is a main generation unit (32), and the clock signal output from the main generation unit is a main clock signal,
The sub-microcomputer has a sub-generation unit (33) that generates a sub-clock signal based on the main clock signal,
The electronic control device according to claim 9, wherein the sub-generation unit is a multiplier circuit or a frequency divider circuit.
前記メインマイコンが有する前記生成部をメイン生成部(32)とし、前記メイン生成部から出力される前記クロック信号をメインクロック信号とすると、
前記サブマイコンはサブクロック信号を生成するサブ発振回路を有し、
前記サブ発振回路は、固有の周波数で振動するサブ発振子(34)と、前記サブ発振子の振動に基づいて前記サブクロック信号を生成するサブ生成部(33)と、を有することを特徴とする請求項9に記載の電子制御装置。
When the generation unit included in the main microcomputer is a main generation unit (32), and the clock signal output from the main generation unit is a main clock signal,
The sub-microcomputer has a sub-oscillation circuit that generates a sub-clock signal,
The sub-oscillation circuit includes a sub-oscillator (34) that vibrates at a specific frequency, and a sub-generation unit (33) that generates the sub-clock signal based on the vibration of the sub-oscillator. The electronic control device according to claim 9.
JP2014049133A 2014-03-12 2014-03-12 Electronic control unit Active JP6167946B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2014049133A JP6167946B2 (en) 2014-03-12 2014-03-12 Electronic control unit
DE102015204316.9A DE102015204316A1 (en) 2014-03-12 2015-03-11 Electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014049133A JP6167946B2 (en) 2014-03-12 2014-03-12 Electronic control unit

Publications (2)

Publication Number Publication Date
JP2015173414A true JP2015173414A (en) 2015-10-01
JP6167946B2 JP6167946B2 (en) 2017-07-26

Family

ID=54010392

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014049133A Active JP6167946B2 (en) 2014-03-12 2014-03-12 Electronic control unit

Country Status (2)

Country Link
JP (1) JP6167946B2 (en)
DE (1) DE102015204316A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10243568B2 (en) 2016-12-05 2019-03-26 Renesas Electronics Corporation Semiconductor device, control system, and synchronization method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5552653A (en) * 1978-10-13 1980-04-17 Oki Electric Ind Co Ltd Clock distribution system
JPS59127164A (en) * 1983-01-12 1984-07-21 Hitachi Ltd Multi-system synchronizing device
JPS6227813A (en) * 1985-07-29 1987-02-05 Hitachi Ltd Phase synchronization system
JPH01273451A (en) * 1988-04-26 1989-11-01 Fujitsu Ltd Duplicated clock synchronizing system
JPH04107023A (en) * 1990-08-28 1992-04-08 Pfu Ltd Phase difference adjusting circuit
JP2001144736A (en) * 1999-11-10 2001-05-25 Fujitsu Ltd Timing synchronizing system, device used in the system and timing synchronizing method
JP2011130276A (en) * 2009-12-18 2011-06-30 Oki Semiconductor Co Ltd Synchronous processing system and semiconductor integrated circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05189385A (en) 1992-01-09 1993-07-30 Fuji Xerox Co Ltd Timer synchronization system in distributed processing environment system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5552653A (en) * 1978-10-13 1980-04-17 Oki Electric Ind Co Ltd Clock distribution system
JPS59127164A (en) * 1983-01-12 1984-07-21 Hitachi Ltd Multi-system synchronizing device
JPS6227813A (en) * 1985-07-29 1987-02-05 Hitachi Ltd Phase synchronization system
JPH01273451A (en) * 1988-04-26 1989-11-01 Fujitsu Ltd Duplicated clock synchronizing system
JPH04107023A (en) * 1990-08-28 1992-04-08 Pfu Ltd Phase difference adjusting circuit
JP2001144736A (en) * 1999-11-10 2001-05-25 Fujitsu Ltd Timing synchronizing system, device used in the system and timing synchronizing method
JP2011130276A (en) * 2009-12-18 2011-06-30 Oki Semiconductor Co Ltd Synchronous processing system and semiconductor integrated circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10243568B2 (en) 2016-12-05 2019-03-26 Renesas Electronics Corporation Semiconductor device, control system, and synchronization method

Also Published As

Publication number Publication date
DE102015204316A1 (en) 2015-09-17
JP6167946B2 (en) 2017-07-26

Similar Documents

Publication Publication Date Title
KR20110027639A (en) Automatic synchronization of an internal oscillator to an external frequency reference
EP2246981A1 (en) Digital noise protection circuit and method
US10795783B2 (en) Fault tolerant clock monitor system
TW201345139A (en) Automatic calibrated oscillation method and apparatus using the same
US20050273684A1 (en) Timing generator and semiconductor testing device
JP2015095860A5 (en)
TWI508455B (en) Clock trimming apparatus and associated clock trimming method
JP6167946B2 (en) Electronic control unit
JP2004056663A (en) Clock multiplication circuit
TWI638517B (en) Mitigation of long wake-up delay of a crystal oscillator
TWI675280B (en) Clock generation circuit and clock adjustment method thereof
JP4819707B2 (en) Redundant computing system and computing unit
JP2011197910A (en) Clock control circuit and microcomputer
US8841954B2 (en) Input signal processing device
US5572554A (en) Synchronizer and method therefor
JP2015015540A5 (en)
JP2013197692A (en) Pll clock generation circuit
JP2021182808A (en) Synchronous control system
US10782155B2 (en) Angle detection apparatus and integrated circuit
JP6312772B1 (en) Phase difference estimation device and communication device including the phase difference estimation device
JP2016178351A (en) PLL circuit
JP6653964B2 (en) Oscillation circuit
JP6453541B2 (en) Clock generation circuit
JP4940726B2 (en) Clock delay correction circuit
JP6927673B2 (en) Built-in PLL device and PLL interference prevention method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160414

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170310

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170321

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170515

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170612

R151 Written notification of patent or utility model registration

Ref document number: 6167946

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250