JP5347631B2 - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP5347631B2
JP5347631B2 JP2009076061A JP2009076061A JP5347631B2 JP 5347631 B2 JP5347631 B2 JP 5347631B2 JP 2009076061 A JP2009076061 A JP 2009076061A JP 2009076061 A JP2009076061 A JP 2009076061A JP 5347631 B2 JP5347631 B2 JP 5347631B2
Authority
JP
Japan
Prior art keywords
low
speed
clock
speed clock
unit
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.)
Expired - Fee Related
Application number
JP2009076061A
Other languages
Japanese (ja)
Other versions
JP2010231330A (en
Inventor
洋一 藤田
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 JP2009076061A priority Critical patent/JP5347631B2/en
Publication of JP2010231330A publication Critical patent/JP2010231330A/en
Application granted granted Critical
Publication of JP5347631B2 publication Critical patent/JP5347631B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、マイクロコンピュータに関するものである。   The present invention relates to a microcomputer.

従来より、シングルチップ・マイクロコンピュータが、例えば特許文献1で提案されている。具体的に、特許文献1では、マイクロコンピュータ(以下、マイコンという)の消費電力の低減を実現するべく、高速動作用のメイン・システム・クロック信号(高速クロック)と、低速動作用のサブ・システム・クロック信号(低速クロック)とを発生する二つの発振回路を用いるものが提案されている。   Conventionally, a single-chip microcomputer has been proposed in Patent Document 1, for example. Specifically, in Patent Document 1, a main system clock signal (high-speed clock) for high-speed operation and a sub-system for low-speed operation are used to reduce the power consumption of a microcomputer (hereinafter referred to as a microcomputer). A proposal has been made that uses two oscillation circuits for generating a clock signal (low-speed clock).

これにより、マイコンは、通常時では高速クロックを用いた高速動作を行う一方、低消費時では低速クロックを用いた低速動作を行っている。   As a result, the microcomputer performs a high-speed operation using a high-speed clock during normal operation, and performs a low-speed operation using a low-speed clock during low consumption.

特開平7−6155号公報Japanese Unexamined Patent Publication No. 7-6155

しかしながら、上記従来の技術では、低速クロックを供給する回路の故障等により低速クロックが安定していないときにマイコンが高速動作から低速動作に切り替わると、不安定な低速クロックによりマイコンが正常に動作できない状態となるので、マイコンの動作が止まってしまうという問題がある。   However, in the above conventional technology, if the microcomputer switches from high speed operation to low speed operation when the low speed clock is not stable due to a failure of the circuit that supplies the low speed clock, the microcomputer cannot operate normally due to the unstable low speed clock. As a result, there is a problem that the operation of the microcomputer stops.

本発明は上記点に鑑み、マイコンの動作に用いられる低速クロックが安定していないときにマイコンの動作が停止しないようにすることができる構成を提供することを目的とする。   The present invention has been made in view of the above points, and an object of the present invention is to provide a configuration capable of preventing the operation of the microcomputer from stopping when the low-speed clock used for the operation of the microcomputer is not stable.

上記目的を達成するため、請求項1に記載の発明では、低速クロックを入力してこの低速クロックの異常の有無を判定する判定部(42、43)と、判定部(42、43)により低速クロックの異常が検出されたときに低速クロックの異常状態を示す異常信号を出力する出力部(44)とを有する低速クロック確認部(40)と、低速クロック確認部(40)から異常信号を入力したとき、高速クロックを入力し、この高速クロックを分周して該高速クロックよりも遅く低速クロックよりも速い中高速クロックを生成し、この中高速クロックを通常動作に用いる制御部(50、70)と、を備えていることを特徴とする。 In order to achieve the above object, according to the first aspect of the present invention, the determination unit (42, 43) that determines whether there is an abnormality in the low-speed clock by inputting the low-speed clock, and the determination unit (42, 43) A low-speed clock confirmation unit (40) having an output unit (44) that outputs an abnormal signal indicating an abnormal state of the low-speed clock when a clock abnormality is detected, and an abnormal signal is input from the low-speed clock confirmation unit (40) Then, a high-speed clock is input, and the high-speed clock is divided to generate a medium-high speed clock that is slower than the high-speed clock and faster than the low-speed clock, and the control units (50, 70 that use the medium-high speed clock for normal operation) And) .

これによると、低速クロックの異常を検出すると共に該異常を知らせることができるので、通常動作から低速動作への遷移をさせないようにすることができる。したがって、低速クロックが安定していないときにマイクロコンピュータの動作が止まってしまうことを防止することができる。また、低速クロックの異常が検出されて低速クロックが使えないとしても、高速クロックを利用して中高速クロックを生成することができるので、マイクロコンピュータの各機能の動作を継続して行うことができる。 According to this, since it is possible to detect the abnormality of the low-speed clock and notify the abnormality, it is possible to prevent the transition from the normal operation to the low-speed operation. Therefore, it is possible to prevent the microcomputer from stopping when the low-speed clock is not stable. Even if a low-speed clock abnormality is detected and the low-speed clock cannot be used, the medium-high speed clock can be generated using the high-speed clock, so that the operation of each function of the microcomputer can be continued. .

請求項2に記載の発明では、制御部(50、70)は、低速クロック確認部(40)から異常信号を入力したとき、通常動作から低速動作への遷移を禁止することを特徴とする。 In the invention described in claim 2, the control unit (50, 70) is, when inputting the abnormality signal from the low-speed clock confirmation unit (40), and wherein the Turkey to prohibit the transition to low-speed operation from a normal operation To do.

これによると、制御部(50、70)により通常動作から低速動作への遷移が禁止されるので、異常な低速クロックを用いた低速動作が行われることはない。したがって、マイクロコンピュータの動作が止まってしまうことを防止できる。   According to this, since the control unit (50, 70) prohibits the transition from the normal operation to the low-speed operation, the low-speed operation using the abnormal low-speed clock is not performed. Therefore, it is possible to prevent the operation of the microcomputer from stopping.

なお、この欄および特許請求の範囲で記載した各手段の括弧内の符号は、後述する実施形態に記載の具体的手段との対応関係を示すものである。   In addition, the code | symbol in the bracket | parenthesis of each means described in this column and the claim shows the correspondence with the specific means as described in embodiment mentioned later.

本発明の第1実施形態に係るマイクロコンピュータの全体構成図である。1 is an overall configuration diagram of a microcomputer according to a first embodiment of the present invention. 低速クロック確認部のブロック図である。It is a block diagram of a low-speed clock confirmation part. マイクロコンピュータの動作の一例を表したタイミングチャートである。It is a timing chart showing an example of operation of a microcomputer.

以下、本発明の実施形態について図に基づいて説明する。なお、以下の各実施形態相互において、互いに同一もしくは均等である部分には、図中、同一符号を付してある。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiments, the same or equivalent parts are denoted by the same reference numerals in the drawings.

(第1実施形態)
以下、本発明の第1実施形態について図を参照して説明する。本実施形態で示されるマイクロコンピュータは、例えば車両に搭載されるECU等に用いられ、バッテリで動作するものである。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. The microcomputer shown in this embodiment is used, for example, in an ECU or the like mounted on a vehicle and operates with a battery.

また、本実施形態で示されるマイクロコンピュータは、高速クロックを用いた通常動作と、高速クロックよりも遅い低速クロックを用いた低速動作とのいずれかの動作により所定の機能を実現する。   Further, the microcomputer shown in the present embodiment realizes a predetermined function by any one of a normal operation using a high-speed clock and a low-speed operation using a low-speed clock slower than the high-speed clock.

通常動作とは、高速クロックで動作する高速動作を指す。一方、低速動作とは、低速クロックで動作する低消費動作と、高速動作と停止とを繰り返す間欠動作とが含まれる。間欠動作における高速動作と停止との切替は低速クロックを用いたタイマにより行う。したがって、間欠動作も低速クロックを用いた低速動作に含まれる。   Normal operation refers to high-speed operation that operates with a high-speed clock. On the other hand, the low-speed operation includes a low-consumption operation that operates with a low-speed clock and an intermittent operation that repeats a high-speed operation and a stop. Switching between high-speed operation and stop in intermittent operation is performed by a timer using a low-speed clock. Therefore, the intermittent operation is also included in the low speed operation using the low speed clock.

マイクロコンピュータの所定の機能とは、マイクロコンピュータに内蔵されたプログラムの内容や、外部記憶媒体に記憶されたプログラムの内容、CPU、ROM、RAM、タイマ、アナログとデジタル変換、シリアル通信、入出力等を指す。   The predetermined function of the microcomputer is the contents of the program built in the microcomputer, the contents of the program stored in the external storage medium, CPU, ROM, RAM, timer, analog to digital conversion, serial communication, input / output, etc. Point to.

図1は、本実施形態に係るマイクロコンピュータの全体構成図である。この図に示されるように、マイクロコンピュータ10(以下、マイコン10と記す)は、低速発振部20、高速発振部30、低速クロック確認部40、クロック制御部50、タイマ60、間欠制御部70、および機能部80を備えている。   FIG. 1 is an overall configuration diagram of a microcomputer according to the present embodiment. As shown in this figure, the microcomputer 10 (hereinafter referred to as the microcomputer 10) includes a low-speed oscillation unit 20, a high-speed oscillation unit 30, a low-speed clock confirmation unit 40, a clock control unit 50, a timer 60, an intermittent control unit 70, And a functional unit 80.

低速発振部20は、クロック制御部50から低速クロック生成の指令を受けたとき、マイコン10の外部に備えられた低速発振子21を発振させて低速クロックを生成するものである。低速発振子21は例えばkHzのオーダーの信号を生成するものであり、例えばセラロック(登録商標)やクリスタル等の圧電素子、CR回路等により構成されている。   When receiving a low-speed clock generation command from the clock control unit 50, the low-speed oscillation unit 20 oscillates the low-speed oscillator 21 provided outside the microcomputer 10 to generate a low-speed clock. The low-speed oscillator 21 generates a signal on the order of kHz, for example, and is configured by, for example, a piezoelectric element such as CERALOCK (registered trademark) or crystal, a CR circuit, or the like.

なお、図1では、低速発振子21はマイコン10の外部に備えられたものが示されているが、マイコン10に低速発振子21が内蔵されていても良い。この場合、低速発振子21を発振させる回路としてCR発振回路等を採用することができる。   1 shows the low-speed oscillator 21 provided outside the microcomputer 10, the low-speed oscillator 21 may be built in the microcomputer 10. In this case, a CR oscillation circuit or the like can be employed as a circuit for causing the low-speed oscillator 21 to oscillate.

高速発振部30は、クロック制御部50から高速クロック生成の指令を受けたとき、マイコン10の外部に備えられた高速発振子31を発振させて高速クロックを生成するものである。高速発振子31は例えばMHzのオーダーの信号を生成するものであり、上記の圧電素子により形成されている。   When receiving a high-speed clock generation command from the clock control unit 50, the high-speed oscillation unit 30 oscillates a high-speed oscillator 31 provided outside the microcomputer 10 to generate a high-speed clock. The high-speed oscillator 31 generates a signal on the order of MHz, for example, and is formed by the above piezoelectric element.

低速クロック確認部40は、低速発振部20から低速クロックを入力し、この低速クロックが安定しているか否かを確認するためのものである。   The low-speed clock confirmation unit 40 receives a low-speed clock from the low-speed oscillation unit 20 and confirms whether the low-speed clock is stable.

図2は、低速クロック確認部40のブロック図である。この図に示されるように、低速クロック確認部40は、確認用クロック発振部41と、時間測定部42と、比較部43と、出力部44とを備えている。   FIG. 2 is a block diagram of the low-speed clock confirmation unit 40. As shown in this figure, the low-speed clock confirmation unit 40 includes a confirmation clock oscillation unit 41, a time measurement unit 42, a comparison unit 43, and an output unit 44.

確認用クロック発振部41は、低速発振部20から低速クロック確認部40に入力される低速クロックよりも少し速い確認用クロックを生成するものである。   The confirmation clock oscillator 41 generates a confirmation clock that is slightly faster than the low-speed clock input from the low-speed oscillator 20 to the low-speed clock confirmation unit 40.

時間測定部42は、低速クロックおよび確認用クロックを入力し、確認用クロックを用いて所定時間における低速クロックの1周期の期間で確認用クロックの数を数えるものである。このため、時間測定部42は低速クロックと確認用クロックとの同期をとり、例えば低速クロックの任意の周期に対応した確認用クロックの数を数える。そして、時間測定部42の測定結果は比較部43に出力される。   The time measuring unit 42 receives a low-speed clock and a confirmation clock, and counts the number of confirmation clocks in one cycle of the low-speed clock at a predetermined time using the confirmation clock. For this reason, the time measuring unit 42 synchronizes the low-speed clock and the confirmation clock, and counts the number of confirmation clocks corresponding to an arbitrary period of the low-speed clock, for example. Then, the measurement result of the time measurement unit 42 is output to the comparison unit 43.

時間測定部42は、低速クロックおよび確認用クロックを入力し、確認用クロックを用いて所定時間における低速クロックの数を数えるものである。このため、時間測定部42は低速クロックと確認用クロックとの同期をとり、例えば確認用クロックの任意の周期に対応した低速クロックの数を数える。そして、時間測定部42の測定結果は比較部43に出力される。   The time measuring unit 42 receives a low-speed clock and a confirmation clock, and counts the number of low-speed clocks in a predetermined time using the confirmation clock. For this reason, the time measuring unit 42 synchronizes the low-speed clock and the confirmation clock, and counts the number of low-speed clocks corresponding to an arbitrary period of the confirmation clock, for example. Then, the measurement result of the time measurement unit 42 is output to the comparison unit 43.

比較部43は、時間測定部42の測定結果と期待値とを比較することにより、低速クロックの異常の有無を判定するものである。期待値は、比較部43に予め設定された所定の数値範囲であり、低速クロックが安定しているならば測定されるであろう値である。すなわち、低速クロックの数が多すぎても少なすぎても異常であるので、測定結果が期待値に含まれない場合には低速クロックが異常であると判定される。測定結果が期待値に含まれる場合には低速クロックは正常であると判定される。このような比較部43の判定結果は出力部44に出力される。   The comparison unit 43 determines whether there is an abnormality in the low-speed clock by comparing the measurement result of the time measurement unit 42 with the expected value. The expected value is a predetermined numerical range preset in the comparison unit 43, and is a value that will be measured if the low-speed clock is stable. That is, since it is abnormal if the number of low-speed clocks is too large or too small, it is determined that the low-speed clock is abnormal when the measurement result is not included in the expected value. When the measurement result is included in the expected value, it is determined that the low-speed clock is normal. The determination result of the comparison unit 43 is output to the output unit 44.

出力部44は、低速クロックが正常であるかまたは異常であるかのクロック状態を出力するものである。具体的には、比較部43により低速クロックの異常が検出されたときには低速発振子21が何らかの原因で故障していると考えられるので、出力部44は低速クロックの異常状態を示す異常信号を出力する。一方、比較部43により低速クロックは正常であると判定されたときには、出力部44は低速クロックの正常状態を示す正常信号を出力する。   The output unit 44 outputs a clock state indicating whether the low-speed clock is normal or abnormal. Specifically, when the low-speed clock abnormality is detected by the comparison unit 43, it is considered that the low-speed oscillator 21 has failed for some reason. Therefore, the output unit 44 outputs an abnormal signal indicating an abnormal state of the low-speed clock. To do. On the other hand, when the comparison unit 43 determines that the low-speed clock is normal, the output unit 44 outputs a normal signal indicating the normal state of the low-speed clock.

図1に示されるクロック制御部50は、低速発振部20および高速発振部30に対する発振/停止の指令を行い、低速発振部20および高速発振部30から低速クロックおよび高速クロックをそれぞれ入力し、これらのクロックを機能部80に供給するものである。クロック制御部50は、機能部80の要求に応じて、低速クロックを逓倍して機能部80に供給することも行う。   The clock control unit 50 shown in FIG. 1 issues an oscillation / stop command to the low-speed oscillation unit 20 and the high-speed oscillation unit 30, and inputs the low-speed clock and the high-speed clock from the low-speed oscillation unit 20 and the high-speed oscillation unit 30, respectively. Are supplied to the functional unit 80. The clock control unit 50 also multiplies the low-speed clock and supplies it to the function unit 80 in response to a request from the function unit 80.

また、クロック制御部50は、低速クロック確認部40から正常信号を入力している間、以下の動作を行う。まず、クロック制御部50は、機能部80からの要求に応じて機能部80に高速クロックを入力することにより機能部80を通常動作(高速動作)させる。また、クロック制御部50は、機能部80からの切替要求に応じて機能部80に低速クロックを入力することにより機能部80を低消費動作させる。   Further, the clock control unit 50 performs the following operation while the normal signal is input from the low-speed clock confirmation unit 40. First, the clock control unit 50 causes the functional unit 80 to perform a normal operation (high-speed operation) by inputting a high-speed clock to the functional unit 80 in response to a request from the functional unit 80. Further, the clock control unit 50 causes the functional unit 80 to perform a low-consumption operation by inputting a low-speed clock to the functional unit 80 in response to a switching request from the functional unit 80.

さらに、クロック制御部50は、間欠制御部70から高速発振/停止の指令を受け、この指令に従って高速発振部30を発振/停止させる。これにより、クロック制御部50は高速発振部30から高速クロックを入力し、この高速クロックを機能部80に供給することにより機能部80を高速動作させる。また、クロック制御部50は、間欠制御部70から機能部80の動作を停止させる指令を入力したときには、高速発振部30の発振を停止させ、機能部80への高速クロックの供給を停止し、機能部80の動作を停止させる。   Further, the clock control unit 50 receives a high-speed oscillation / stop command from the intermittent control unit 70 and causes the high-speed oscillation unit 30 to oscillate / stop according to this command. As a result, the clock control unit 50 inputs the high-speed clock from the high-speed oscillation unit 30 and supplies the high-speed clock to the function unit 80 to operate the function unit 80 at high speed. Further, when the clock control unit 50 receives a command to stop the operation of the function unit 80 from the intermittent control unit 70, the clock control unit 50 stops the oscillation of the high-speed oscillation unit 30, stops the supply of the high-speed clock to the function unit 80, The operation of the function unit 80 is stopped.

一方、クロック制御部50は、低速クロック確認部40から異常信号を入力している間、以下の動作を行う。まず、クロック制御部50は、機能部80に対して通常動作から低速動作への遷移を禁止する。すなわち、クロック制御部50は、機能部80から低消費動作への切替要求があったとしても、機能部80への低速クロックの供給を停止し、機能部80に低消費動作させないようにする。このため、クロック制御部50は、機能部80に高速クロックを入力することにより機能部80を高速動作させる。   On the other hand, the clock control unit 50 performs the following operation while the abnormal signal is input from the low-speed clock confirmation unit 40. First, the clock control unit 50 prohibits the function unit 80 from transitioning from normal operation to low-speed operation. That is, the clock control unit 50 stops the supply of the low-speed clock to the function unit 80 so that the function unit 80 does not perform the low-consumption operation even when the function unit 80 requests to switch to the low-consumption operation. Therefore, the clock control unit 50 operates the functional unit 80 at high speed by inputting a high-speed clock to the functional unit 80.

また、クロック制御部50は、高速発振部30から入力した高速クロックを分周して該高速クロックよりも遅く低速クロックよりも早い中高速クロックを生成し、機能部80の要求に従ってこの中高速クロックを機能部80に供給する。機能部80は高速クロックよりも遅いクロックを用いた動作も行うため、低速クロックに異常が生じている場合にはクロック制御部50が高速クロックをクロックダウンして機能部80に供給することもできる。   The clock control unit 50 divides the high-speed clock input from the high-speed oscillation unit 30 to generate a medium / high-speed clock that is slower than the high-speed clock and earlier than the low-speed clock. Is supplied to the functional unit 80. Since the function unit 80 also operates using a clock slower than the high-speed clock, the clock control unit 50 can also clock down the high-speed clock and supply it to the function unit 80 when an abnormality occurs in the low-speed clock. .

クロック制御部50が低消費動作や間欠動作を実行している際に低速クロック確認部40から異常信号を入力した場合、クロック制御部50は機能部80を高速動作に遷移させる。すなわち、機能部80に高速クロックを供給することにより機能部80を高速動作させる。   When the clock control unit 50 is performing a low-consumption operation or an intermittent operation and receives an abnormal signal from the low-speed clock confirmation unit 40, the clock control unit 50 causes the function unit 80 to transition to a high-speed operation. That is, the functional unit 80 is operated at high speed by supplying a high-speed clock to the functional unit 80.

なお、クロック制御部50は、低速発振部20から入力した低速クロックで動作するが、低速クロック確認部40から確認用クロックを入力している。そして、低速クロックのクロック状態が異常のときには該確認用クロックを緊急的に用いるようになっている。   The clock control unit 50 operates with the low-speed clock input from the low-speed oscillation unit 20, but receives the confirmation clock from the low-speed clock confirmation unit 40. When the clock state of the low-speed clock is abnormal, the confirmation clock is used urgently.

タイマ60は、低速発振部20から低速クロックを入力し、この低速クロックを用いて高速動作の停止時間をカウントするものである。具体的に、タイマ60は、間欠制御部70の設定指令を受けて停止時間をカウントし、この停止時間をカウントし終えると間欠制御部70にタイムアップを通知する。   The timer 60 inputs a low-speed clock from the low-speed oscillation unit 20 and counts a stop time of high-speed operation using the low-speed clock. Specifically, the timer 60 receives a setting command from the intermittent control unit 70, counts the stop time, and notifies the intermittent control unit 70 of the time-up when the stop time is counted.

間欠制御部70は、機能部80の要求に応じてマイコン10を間欠動作させるものである。そして、間欠制御部70は、低速クロック確認部40から正常信号を入力している間、以下の動作を行う。   The intermittent control unit 70 operates the microcomputer 10 intermittently in response to a request from the function unit 80. The intermittent control unit 70 performs the following operation while the normal signal is input from the low-speed clock confirmation unit 40.

すなわち、間欠制御部70は、機能部80から高速動作の停止の要求があった場合、タイマ60に停止時間をカウントする設定要求を行い、タイマ60に停止時間をカウントさせる。また、間欠制御部70は、クロック制御部50に機能部80への高速クロックの供給の停止を指示する。これにより、機能部80の動作は停止する。そして、間欠制御部70は、タイマからタイムアップの通知を受けると、機能部80の動作を許可すると共に、クロック制御部50に機能部80への高速クロックの供給を指示する。   That is, when there is a request for stopping the high-speed operation from the function unit 80, the intermittent control unit 70 makes a setting request for counting the stop time to the timer 60 and causes the timer 60 to count the stop time. Further, the intermittent control unit 70 instructs the clock control unit 50 to stop supplying the high-speed clock to the function unit 80. Thereby, the operation of the functional unit 80 stops. When the intermittent control unit 70 receives a time-up notification from the timer, the intermittent control unit 70 permits the operation of the functional unit 80 and instructs the clock control unit 50 to supply a high-speed clock to the functional unit 80.

一方、間欠制御部70は、低速クロック確認部40から異常信号を入力している間、機能部80から間欠制御の要求があったとしても、機能部80の間欠動作への遷移を禁止する。そして、間欠制御部70は、機能部80に高速クロックを供給させるための指令をクロック制御部50に出力する。   On the other hand, the intermittent control unit 70 prohibits the transition of the functional unit 80 to the intermittent operation even when the functional unit 80 requests intermittent control while the abnormal signal is input from the low-speed clock confirmation unit 40. Then, the intermittent control unit 70 outputs a command for causing the function unit 80 to supply a high-speed clock to the clock control unit 50.

間欠制御部70が機能部80を間欠動作させている際に低速クロック確認部40から異常信号を入力した場合、間欠制御部70は機能部80を高速動作に遷移させる。すなわち、機能部80に対して動作の指令を行い、クロック制御部50に対して機能部80に高速クロックを供給させる指令を行うことにより機能部80を高速動作させる。   When an intermittent signal is input from the low-speed clock confirmation unit 40 while the intermittent control unit 70 operates the function unit 80 intermittently, the intermittent control unit 70 causes the function unit 80 to transition to high-speed operation. That is, the function unit 80 is operated at a high speed by giving an operation command to the function unit 80 and by giving the clock control unit 50 a command for supplying the function unit 80 with a high-speed clock.

なお、間欠制御部70は、低速発振部20から入力した低速クロックで動作するが、低速クロック確認部40から確認用クロックも入力している。そして、低速クロックのクロック状態が異常のときには該確認用クロックを緊急的に用いるようになっている。   The intermittent control unit 70 operates with the low-speed clock input from the low-speed oscillation unit 20, but also receives the confirmation clock from the low-speed clock confirmation unit 40. When the clock state of the low-speed clock is abnormal, the confirmation clock is used urgently.

機能部80は、クロック制御部50から入力される高速クロックや低速クロックを用いて所定の動作を行うものである。この機能部80は、いわゆるソフトウェアでタイマ、アナログとデジタル変換、シリアル通信、入出力等を実行する部位である。   The function unit 80 performs a predetermined operation using a high-speed clock or a low-speed clock input from the clock control unit 50. The function unit 80 is a part that executes timer, analog / digital conversion, serial communication, input / output, and the like by so-called software.

また、機能部80には低速クロック確認部40から低速クロックのクロック状態を示す信号が入力されるようになっている。したがって、機能部80は、低速クロック異常を認識すると、間欠動作または低消費動作への遷移を取り止め、クロック制御部50に高速クロックの供給を要求する。これにより、機能部80は高速クロックを用いた高速動作を行う。以上が、本実施形態に係るマイコン10の全体構成である。   In addition, a signal indicating the clock state of the low-speed clock is input from the low-speed clock confirmation unit 40 to the function unit 80. Therefore, when the function unit 80 recognizes the low-speed clock abnormality, the function unit 80 cancels the transition to the intermittent operation or the low-consumption operation, and requests the clock control unit 50 to supply the high-speed clock. As a result, the functional unit 80 performs a high-speed operation using the high-speed clock. The above is the overall configuration of the microcomputer 10 according to the present embodiment.

次に、マイコン10の作動について説明する。通常、マイコン10は車両のバッテリで動作する。このため、マイコン10の消費電流を低減させるため、通常時と低消費時でマイコン10の動作を変えている。通常時は高速動作、低速動作時は低消費動作、あるいは、間欠動作を行っている。   Next, the operation of the microcomputer 10 will be described. Normally, the microcomputer 10 operates with a vehicle battery. For this reason, in order to reduce the current consumption of the microcomputer 10, the operation of the microcomputer 10 is changed between the normal time and the low time. During normal operation, high-speed operation is performed, and during low-speed operation, low-consumption operation or intermittent operation is performed.

このようなマイコン10の通常の動作において、間欠動作中に低速クロックのクロック状態が異常になったときの作動について、図3のタイミングチャートを参照して説明する。図3は、低速クロックの状態、確認用クロックの状態、クロック状態、マイコン10の状態をそれぞれ示したタイミングチャートである。   In such a normal operation of the microcomputer 10, the operation when the clock state of the low-speed clock becomes abnormal during the intermittent operation will be described with reference to the timing chart of FIG. FIG. 3 is a timing chart showing the state of the low-speed clock, the state of the confirmation clock, the clock state, and the state of the microcomputer 10.

また、低速クロック確認部40の確認用クロック発振部41にて生成される確認用クロックは故障することなく、確認用クロックは常に安定している。そして、時点T1よりも前では、マイコン10は高速動作と停止とを繰り返す間欠動作を行っている。このような間欠動作中に、時点T1にて低速発振子21が故障した等により低速クロックに異常が生じたとする。ここでは、低速クロックが生成されなくなったとする(クロックなしの状態)。   In addition, the confirmation clock generated by the confirmation clock oscillator 41 of the low-speed clock confirmation unit 40 does not fail, and the confirmation clock is always stable. Prior to time T1, the microcomputer 10 performs an intermittent operation that repeats a high-speed operation and a stop. Assume that during such an intermittent operation, an abnormality occurs in the low-speed clock due to a failure of the low-speed oscillator 21 at time T1. Here, it is assumed that the low-speed clock is no longer generated (no clock state).

そして、上述のように、低速クロック確認部40の時間測定部42は確認用クロックを用いて所定時間における低速クロックの1周期の期間で確認用クロックの数を常時測定し、比較部43は時間測定部42の測定結果を用いて低速クロックの状態の判定を常時行っている。したがって、時点T1にて低速クロックに異常が生じると、時点T1から所定時間経過後の時点T2において比較部43は低速クロックの異常を検出する。すなわち、時点T1から異常が検出される時点T2までの時間は、確認用クロックの数が数えられ、その数と期待値とが比較されている時間に相当する。   Then, as described above, the time measurement unit 42 of the low-speed clock confirmation unit 40 always measures the number of confirmation clocks in one cycle of the low-speed clock at a predetermined time using the confirmation clock, and the comparison unit 43 performs time measurement. The low-speed clock state is always determined using the measurement result of the measurement unit 42. Accordingly, when an abnormality occurs in the low-speed clock at time T1, the comparison unit 43 detects an abnormality in the low-speed clock at time T2 after a predetermined time has elapsed from time T1. That is, the time from time T1 to time T2 when an abnormality is detected corresponds to the time during which the number of confirmation clocks is counted and compared with the expected value.

この後、出力部44は比較部43の判定結果を受けて、低速クロックが異常であることを示す異常信号をクロック制御部50、間欠制御部70、および機能部80にそれぞれ出力する。これにより、クロック制御部50、間欠制御部70、および機能部80は、機能部80の間欠動作への遷移を禁止する。   Thereafter, the output unit 44 receives the determination result of the comparison unit 43 and outputs an abnormal signal indicating that the low-speed clock is abnormal to the clock control unit 50, the intermittent control unit 70, and the function unit 80, respectively. Thereby, the clock control unit 50, the intermittent control unit 70, and the functional unit 80 prohibit the transition of the functional unit 80 to the intermittent operation.

具体的には、間欠制御部70は、機能部80から高速動作の停止の要求があったとしても、クロック制御部50への高速クロックの供給の停止の指示を出さずに、クロック制御部50に高速クロックを供給し続ける指示を出す。もちろん、異常信号を入力したクロック制御部50は、機能部80への高速クロックの供給を停止せず、機能部80に高速クロックを供給し続けることにより機能部80を高速動作させ続ける。また、機能部80は、異常信号が入力されたことから、ソフトウェアにおいて間欠制御部70への間欠動作の要求を停止する。   Specifically, the intermittent control unit 70 does not issue an instruction to stop the supply of the high-speed clock to the clock control unit 50 even if the functional unit 80 requests to stop the high-speed operation. Instructs to continue supplying the high-speed clock. Of course, the clock control unit 50 that has input the abnormal signal does not stop the supply of the high-speed clock to the function unit 80, and continues to supply the high-speed clock to the function unit 80 to keep the function unit 80 operating at high speed. Further, the function unit 80 stops the request for the intermittent operation to the intermittent control unit 70 in the software because the abnormal signal is input.

これにより、図3に示されるように、時点T2後ではマイコン10の状態において破線にて示された間欠動作は行われず、時点T2後も高速動作が継続される。したがって、異常な低速クロックを用いた間欠動作は行われず、マイコン10の動作が停止してしまうということはない。   As a result, as shown in FIG. 3, after the time T2, the intermittent operation indicated by the broken line is not performed in the state of the microcomputer 10, and the high speed operation is continued after the time T2. Therefore, the intermittent operation using the abnormal low-speed clock is not performed, and the operation of the microcomputer 10 is not stopped.

上記では、間欠動作中に低速クロックに異常が発生した場合について説明したが、高速動作から低消費動作への遷移についても同様に禁止される。すなわち、低消費動作を行うために機能部80からクロック制御部50に対して低速クロックの供給が要求されたとしても、クロック制御部50は機能部80に対して低速クロックの供給を停止し、高速クロックを供給する。一方、機能部80は、ソフトウェアとして、高速クロックを用いた高速動作を行う。   In the above description, the case where an abnormality occurs in the low-speed clock during the intermittent operation has been described. However, the transition from the high-speed operation to the low-consumption operation is similarly prohibited. That is, even if the function unit 80 requests the clock control unit 50 to supply a low-speed clock to perform a low-consumption operation, the clock control unit 50 stops supplying the low-speed clock to the function unit 80, Supply a high-speed clock. On the other hand, the function unit 80 performs high-speed operation using a high-speed clock as software.

また、間欠動作中において機能部80の動作を停止しているときや低消費動作を行っているときに低速クロックに異常が生じた場合にも、高速動作への切替が行われる。すなわち、間欠制御部70はクロック制御部50に高速クロックの供給を指示し、クロック制御部50は機能部80に高速クロックを供給する。機能部80は、間欠制御部70に対する間欠動作の要求を停止し、クロック制御部50に高速動作を行うための高速クロックの供給を要求する。   In addition, when the operation of the functional unit 80 is stopped during the intermittent operation or when the low-speed clock is abnormal while the low-consumption operation is performed, switching to the high-speed operation is performed. That is, the intermittent control unit 70 instructs the clock control unit 50 to supply a high-speed clock, and the clock control unit 50 supplies the high-speed clock to the function unit 80. The function unit 80 stops the intermittent operation request to the intermittent control unit 70 and requests the clock control unit 50 to supply a high-speed clock for performing high-speed operation.

以上のように、低速クロックに異常が発生した場合には低速クロックを用いた動作への遷移が禁止される。そして、機能部80はクロック制御部50に中高速クロックを要求することもある。この場合、クロック制御部50は高速クロックを分周して中高速クロックを生成して機能部80に供給する。これにより、機能部80は中高速クロックを用いて各機能を実行することができ、マイコン10の各機能の動作を継続して行うことができる。   As described above, when an abnormality occurs in the low-speed clock, the transition to the operation using the low-speed clock is prohibited. Then, the function unit 80 may request the medium high speed clock from the clock control unit 50. In this case, the clock control unit 50 divides the high-speed clock to generate a medium high-speed clock and supplies it to the function unit 80. Thereby, the function part 80 can perform each function using a medium-high-speed clock, and can perform operation | movement of each function of the microcomputer 10 continuously.

以上説明したように、本実施形態では、低速クロックの状態を判定するための低速クロック確認部40をマイコン10に備えたことが特徴となっている。   As described above, the present embodiment is characterized in that the microcomputer 10 includes the low-speed clock confirmation unit 40 for determining the state of the low-speed clock.

このように、低速クロックが出ている状態を確認できる機能をマイコン10に内蔵することで、低速クロックが安定していないときは、低消費動作への切替を取り止める、あるいは、低消費動作中で低速クロックが安定していないときは、強制的に通常動作に切替えることができる。   As described above, the microcomputer 10 has a built-in function capable of confirming the state where the low-speed clock is output, so that when the low-speed clock is not stable, the switching to the low-consumption operation is canceled or the low-consumption operation is being performed. When the low-speed clock is not stable, it can be forcibly switched to normal operation.

すなわち、低速クロックの異常を検出できると共に、該異常を間欠制御部70、クロック制御部50、および機能部80にそれぞれ知らせることができるので、マイコン10が通常動作から低速動作に遷移しないようにすることができる。したがって、低速クロックが安定していないときに該低速クロックを用いたことによりマイコン10の動作が止まってしまうことを防止することができる。   That is, the abnormality of the low-speed clock can be detected and the abnormality can be notified to the intermittent control unit 70, the clock control unit 50, and the function unit 80, respectively, so that the microcomputer 10 does not transition from the normal operation to the low-speed operation. be able to. Therefore, it is possible to prevent the operation of the microcomputer 10 from being stopped by using the low-speed clock when the low-speed clock is not stable.

なお、本実施形態の記載と特許請求の範囲の記載との対応関係については、時間測定部42および比較部43により構成された部分が特許請求の範囲の判定部に対応し、クロック制御部50および間欠制御部70により構成された部分が特許請求の範囲の制御部に対応する。   As for the correspondence relationship between the description of the present embodiment and the description of the scope of claims, the portion constituted by the time measurement section 42 and the comparison section 43 corresponds to the determination section of the scope of claims, and the clock control section 50 And the part comprised by the intermittent control part 70 respond | corresponds to the control part of a claim.

(他の実施形態)
上記第1実施形態では、低速クロック確認部40の比較部43で用いられる期待値は予め比較部43に設定された値であるが、例えば機能部80の指令により変更することもできる。これにより、低速クロックの周波数に応じて期待値を設定できるので、マイコン10の汎用性を高めることができる。
(Other embodiments)
In the first embodiment, the expected value used in the comparison unit 43 of the low-speed clock confirmation unit 40 is a value set in the comparison unit 43 in advance. However, it can be changed by a command from the function unit 80, for example. Thereby, since an expected value can be set according to the frequency of the low-speed clock, the versatility of the microcomputer 10 can be enhanced.

上記第1実施形態では、低速クロック確認部40から出力されるクロック状態を示す信号が機能部80に入力されるようになっているが、機能部80が低速クロックの異常を認識したことを外部に出力するようにしても良い。例えば、マイコン10に外部出力端子を設け、この端子と機能部80とを接続し、この端子を介して低速クロックの異常をマイコン10の利用者に伝えることができる。これにより、該マイコン10の交換や低速発振子21の交換等が行えるようになる。   In the first embodiment, a signal indicating the clock state output from the low-speed clock confirmation unit 40 is input to the function unit 80. However, the fact that the function unit 80 has recognized the abnormality of the low-speed clock is externally applied. May be output. For example, the microcomputer 10 is provided with an external output terminal, and this terminal and the functional unit 80 are connected, and the abnormality of the low-speed clock can be transmitted to the user of the microcomputer 10 through this terminal. As a result, the microcomputer 10 and the low-speed oscillator 21 can be replaced.

10 マイクロコンピュータ
40 低速クロック確認部
42 時間測定部
43 比較部
44 出力部
50 クロック制御部
70 間欠制御部
DESCRIPTION OF SYMBOLS 10 Microcomputer 40 Low-speed clock confirmation part 42 Time measurement part 43 Comparison part 44 Output part 50 Clock control part 70 Intermittent control part

Claims (2)

高速クロックを用いた通常動作と、前記高速クロックよりも遅い低速クロックを用いた低速動作とのいずれかの動作により所定の機能を実現するマイクロコンピュータであって、
前記低速クロックを入力してこの低速クロックの異常の有無を判定する判定部(42、43)と、前記判定部(42、43)により前記低速クロックの異常が検出されたときに前記低速クロックの異常状態を示す異常信号を出力する出力部(44)とを有する低速クロック確認部(40)と、
前記低速クロック確認部(40)から前記異常信号を入力したとき、前記高速クロックを入力し、この高速クロックを分周して該高速クロックよりも遅く前記低速クロックよりも速い中高速クロックを生成し、この中高速クロックを前記通常動作に用いる制御部(50、70)と、を備えていることを特徴とするマイクロコンピュータ。
A microcomputer that realizes a predetermined function by any one of a normal operation using a high-speed clock and a low-speed operation using a low-speed clock slower than the high-speed clock,
A determination unit (42, 43) for determining whether there is an abnormality in the low-speed clock by inputting the low-speed clock, and when the abnormality in the low-speed clock is detected by the determination unit (42, 43), A low-speed clock confirmation unit (40) having an output unit (44) for outputting an abnormal signal indicating an abnormal state ;
When the abnormal signal is input from the low-speed clock confirmation unit (40), the high-speed clock is input, and the high-speed clock is divided to generate a medium-high-speed clock that is slower than the high-speed clock and faster than the low-speed clock. And a control unit (50, 70) using the medium high-speed clock for the normal operation .
前記制御部(50、70)は、前記低速クロック確認部(40)から前記異常信号を入力したとき、前記通常動作から前記低速動作への遷移を禁止することを特徴とする請求項1に記載のマイクロコンピュータ。 Wherein the control unit (50, 70), the low-speed clock check unit (40) upon receiving the abnormal signal from claim 1, wherein the benzalkonium prohibited the transition to the low-speed operation from the normal operation A microcomputer according to 1.
JP2009076061A 2009-03-26 2009-03-26 Microcomputer Expired - Fee Related JP5347631B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009076061A JP5347631B2 (en) 2009-03-26 2009-03-26 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009076061A JP5347631B2 (en) 2009-03-26 2009-03-26 Microcomputer

Publications (2)

Publication Number Publication Date
JP2010231330A JP2010231330A (en) 2010-10-14
JP5347631B2 true JP5347631B2 (en) 2013-11-20

Family

ID=43047111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009076061A Expired - Fee Related JP5347631B2 (en) 2009-03-26 2009-03-26 Microcomputer

Country Status (1)

Country Link
JP (1) JP5347631B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012147220A (en) * 2011-01-12 2012-08-02 Panasonic Corp Radio communication apparatus
JP5774344B2 (en) * 2011-03-30 2015-09-09 ラピスセミコンダクタ株式会社 Clock signal generation circuit
JP2013114589A (en) * 2011-11-30 2013-06-10 Seiko Epson Corp Micro-controller
JP6135445B2 (en) * 2013-10-16 2017-05-31 富士通セミコンダクター株式会社 Semiconductor integrated circuit and operation control method of semiconductor integrated circuit

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2854194B2 (en) * 1992-06-29 1999-02-03 三洋電機株式会社 Oscillation clock judgment device for microcomputer
JPH0635562A (en) * 1992-07-17 1994-02-10 Hitachi Seiko Ltd Abnormal operation preventing circuit for microcomputer
JP3895912B2 (en) * 2000-09-01 2007-03-22 矢崎総業株式会社 Control unit and multiplex communication system

Also Published As

Publication number Publication date
JP2010231330A (en) 2010-10-14

Similar Documents

Publication Publication Date Title
JP4750564B2 (en) Reset signal generation circuit
JP4665846B2 (en) Microcomputer and electronic control device
JP5347631B2 (en) Microcomputer
KR20130020652A (en) Failsafe oscillator monitor and alarm
JP4541214B2 (en) Detection circuit and semiconductor device
JP4701898B2 (en) External signal detection circuit and real-time clock
JP4715760B2 (en) Microcomputer and control system
JP2004280783A (en) Microcomputer
CN102089972A (en) Semiconductor integrated circuit
JP5281448B2 (en) Electronic control device, abnormality monitoring method
US8552806B2 (en) Apparatus for supplying clock and method thereof
US8638154B2 (en) System clock monitoring apparatus and motor control system
JP5324340B2 (en) Microcomputer
JP2009172891A (en) Power consumption device and communication unit
JP2013091365A (en) Electronic control device
JP2011197910A (en) Clock control circuit and microcomputer
US6606713B1 (en) Microcomputer including circuitry for detecting an unauthorized stoppage of the system clock signal
JP4515751B2 (en) Semiconductor device
JP3711849B2 (en) Microcomputer
JPH07334392A (en) Resetting device and abnormal operation detector
JP5682783B2 (en) Signal input circuit
TWI501555B (en) Control circuit and method for dynamically adjusting a source current for an oscillation source
JP4248963B2 (en) Timing device
JP5870319B2 (en) Network terminal, control method thereof, and network system
JP4671549B2 (en) Microcomputer oscillation switching circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110920

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130528

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130710

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130805

R151 Written notification of patent or utility model registration

Ref document number: 5347631

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees