JP2011118751A - Microcomputer and control method thereof - Google Patents

Microcomputer and control method thereof Download PDF

Info

Publication number
JP2011118751A
JP2011118751A JP2009276614A JP2009276614A JP2011118751A JP 2011118751 A JP2011118751 A JP 2011118751A JP 2009276614 A JP2009276614 A JP 2009276614A JP 2009276614 A JP2009276614 A JP 2009276614A JP 2011118751 A JP2011118751 A JP 2011118751A
Authority
JP
Japan
Prior art keywords
microcomputer
clock signal
signal
arithmetic unit
selection
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.)
Pending
Application number
JP2009276614A
Other languages
Japanese (ja)
Inventor
Takuya Hirao
卓也 平尾
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2009276614A priority Critical patent/JP2011118751A/en
Publication of JP2011118751A publication Critical patent/JP2011118751A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microcomputer which quickly sets the optimal frequency, in particular, when being restarted after a pause, and a control method thereof. <P>SOLUTION: The microcomputer 1 includes: an operation part 18 to which the supply of a clock signal is stopped by a request from the outside or the inside; a clock signal generation part 16 which changes a frequency of the clock signal supplied from the outside to generate one or more clock signals different in frequency; a voltage detection part which detects an operation voltage of the microcomputer regardless of an operation state of the operation part; a selection part 17 which selects either of clock signals generated by the clock signal generation part 16 and the clock signal supplied from the outside and supplies the selected clock signal to the operation part 18; and a selection signal generation part 14 which generates a selection signal 34 by which the selection part 17 selects a clock signal on the basis of the detection result of the voltage detection part regardless of the operation state of the operation part 18. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明はマイクロ・コンピュータ及びその制御方法に関し、特に動作電圧に対して周波数を設定するマイクロ・コンピュータ及びその制御方法に関する。   The present invention relates to a microcomputer and a control method thereof, and more particularly to a microcomputer that sets a frequency with respect to an operating voltage and a control method thereof.

従来、電源供給に電池が使用されるシステムでは、電源電圧の低下を考慮し、動作電圧に範囲を持つ、言い換えれば動作電圧に応じた動作可能周波数帯を設定しているマイクロ・コンピュータ(以下マイコンという。)が使用される。   Conventionally, in a system where batteries are used for power supply, a microcomputer that has a range of operating voltage in consideration of a decrease in power supply voltage, in other words, an operable frequency band corresponding to the operating voltage (hereinafter referred to as a microcomputer) is set. Is used).

このようなマイコンは、マイコンに供給される動作電圧を測定し、その測定結果に応じて、動作電圧が低下すると、マイコンの動作周波数の上限が低く(マイコン動作が遅く)なるよう動作周波数帯を選択する。   Such a microcomputer measures the operating voltage supplied to the microcomputer, and according to the measurement result, if the operating voltage decreases, the operating frequency band is set so that the upper limit of the operating frequency of the microcomputer is lower (the microcomputer operation is slower). select.

また、このような電源供給に電池が使用されるシステムは、マイコンの動作が必要ない場合(リモコンで長時間キー入力が検出されない場合等)は、マイコンを休止し、マイコン動作用発振子も休止することで消費電流の削減を行う。   In addition, in such a system where a battery is used for power supply, when the operation of the microcomputer is not necessary (when the key input is not detected for a long time by the remote controller, etc.), the microcomputer is stopped and the oscillator for operating the microcomputer is also stopped. By doing so, current consumption is reduced.

マイコンの休止中もシステムの電源電圧は下がり続け、マイコンに供給される動作電圧も下がり続けるが、マイコンの休止中は動作電圧の測定ができない。よって、マイコンは休止する際に、再稼動する際の動作周波数を設定し、再稼動時は休止前に設定された動作周波数で稼動する。ここで、マイコンの再稼動時の動作電圧が、マイコン動作休止時に設定した動作周波数の対応する動作電圧を下回ってしまうのを避けるために、マイコンは休止する際、再稼動する際の動作周波数を最も遅い動作周波数に設定してから休止する。よって、マイコンの再稼動時は、動作電圧に関係なく、マイコンの最も遅い動作周波数で稼働を開始する。   The system power supply voltage continues to decrease and the operating voltage supplied to the microcomputer continues to decrease even while the microcomputer is inactive, but the operating voltage cannot be measured while the microcomputer is inactive. Therefore, the microcomputer sets an operating frequency when restarting when the microcomputer is stopped, and operates at the operating frequency set before stopping when the microcomputer is restarted. Here, in order to avoid that the operating voltage when the microcomputer is restarted falls below the corresponding operating voltage of the operating frequency set when the microcomputer is stopped, the operating frequency when restarting the microcomputer is set to Set to the slowest operating frequency and then pause. Therefore, when the microcomputer is restarted, operation starts at the slowest operating frequency of the microcomputer regardless of the operating voltage.

しかし、従来のように、再稼動時の動作周波数が最も低いと、マイコン休止中の動作電圧の低下が微細であった場合、必要以上に低い動作周波数でマイコンが再稼動することになる。また、マイコンの再稼動後に低い動作周波数帯で稼動しているマイコンを用いて動作電圧の測定及び適切な動作周波を設定する処理が必要となる。   However, if the operating frequency at the time of reactivation is the lowest as in the prior art, the microcomputer will be reactivated at an operating frequency lower than necessary if the drop in operating voltage during the pause of the microcomputer is fine. In addition, it is necessary to measure the operating voltage and set an appropriate operating frequency using a microcomputer operating in a low operating frequency band after the microcomputer is restarted.

図3は、非特許文献1に記載のマイコンの動作周波数帯とそれに対応する動作電圧を示す表である。表100に例として上げたマイコンでは、1.8V〜5.5Vの動作電圧反囲に対応している。5.5V〜4.0Vでは20MHz、4.0V〜2.7Vでは10MHz、1.8V〜2.7Vでは5MHzの周波数で動作可能である。   FIG. 3 is a table showing the operating frequency band of the microcomputer described in Non-Patent Document 1 and the corresponding operating voltage. The microcomputer shown as an example in Table 100 supports an operating voltage range of 1.8V to 5.5V. Operation is possible at a frequency of 20 MHz from 5.5 V to 4.0 V, 10 MHz from 4.0 V to 2.7 V, and 5 MHz from 1.8 V to 2.7 V.

図4は、従来技術にかかるクロック信号生成回路102を示す図である。クロック信号生成回路102は、高速システム・クロック発信器101から周波数fxpのクロック信号を供給される。クロック信号生成回路102は、供給されたクロック信号を、プリスケラ(分周器)103とセレクタ104を使用し、動作電圧の大きさに基づき、表100に示すCPUクロック周波数(周波数fcpu)に変更する。   FIG. 4 is a diagram showing a clock signal generation circuit 102 according to the prior art. The clock signal generation circuit 102 is supplied with a clock signal having a frequency fxp from the high-speed system clock oscillator 101. The clock signal generation circuit 102 uses a prescaler (frequency divider) 103 and a selector 104 to change the supplied clock signal to a CPU clock frequency (frequency fcpu) shown in Table 100 based on the magnitude of the operating voltage. .

図5は、従来技術にかかるマイコン105を示す図である。マイコン105は、動作中にADコンバータ106を用いて、電源107の電圧をデジタル数値に変換し、測定する。   FIG. 5 is a diagram showing a microcomputer 105 according to the prior art. During operation, the microcomputer 105 uses the AD converter 106 to convert the voltage of the power supply 107 into a digital numerical value and measure it.

図6は、従来技術にかかるマイコン108の詳細を示す図である。マイコン108は、CPU113と、CPU113に供給されるクロック信号122の供給及び供給の停止を制御する休止・稼動制御部110と、クロック信号122の周波数を変更するプリスケラ111と、プリスケラ111によって周波数の変更された複数のクロック信号126又は外部から供給されたクロック信号122のうちいずれかを選択して出力するセレクタ112と、セレクタ112を制御するセレクタ制御レジスタ109とを有する。   FIG. 6 is a diagram showing details of the microcomputer 108 according to the conventional technique. The microcomputer 108 includes a CPU 113, a pause / operation control unit 110 that controls supply and stop of supply of the clock signal 122 supplied to the CPU 113, a prescaler 111 that changes the frequency of the clock signal 122, and a frequency change by the prescaler 111. The selector 112 that selects and outputs one of the plurality of clock signals 126 or the clock signal 122 supplied from the outside, and the selector control register 109 that controls the selector 112 are provided.

CPU113は、ADコンバータ(不図示)を用いてマイコン108の電源121の電圧を測定し、セレクタ制御レジスタ109に出力する。   The CPU 113 measures the voltage of the power supply 121 of the microcomputer 108 using an AD converter (not shown) and outputs the voltage to the selector control register 109.

セレクタ制御レジスタ109は、電源121の測定結果に基づいてセレクタ112の出力するクロック信号127を選択する。   The selector control register 109 selects the clock signal 127 output from the selector 112 based on the measurement result of the power supply 121.

休止・稼動制御部110は、CPU113が出力する休止要求信号125、稼動要求信号124及び外部から入力された要求信号123に基づいてクロック信号122のCPU108への供給と休止を制御する。   The suspension / operation control unit 110 controls the supply and suspension of the clock signal 122 to the CPU 108 based on the suspension request signal 125, the operation request signal 124, and the request signal 123 input from the outside.

図7は、従来技術にかかるクロック信号の周波数の変更を決定する動作を示すフローチャートである。まず、図6のマイコン108内部のADコンバータ(不図示)によって、電源電圧のアナログ−デジタル変換を行う(ステップS201)。アナログ−デジタル変換が完了するまで待つ(ステップS202)。次に、CPU113が電源電圧121を測定し(ステップS203)、その結果をセレクタ制御レジスタ109に出力する(ステップS204)。   FIG. 7 is a flowchart showing an operation for determining a change in the frequency of the clock signal according to the prior art. First, analog-digital conversion of the power supply voltage is performed by an AD converter (not shown) in the microcomputer 108 of FIG. 6 (step S201). Wait until the analog-digital conversion is completed (step S202). Next, the CPU 113 measures the power supply voltage 121 (step S203), and outputs the result to the selector control register 109 (step S204).

以上のように、従来のマイコン108では、動作周波数を決定する際、ADコンバータを使用し、動作電圧のアナログ−デジタル変換が完了するまで待たなくてはならない。   As described above, in the conventional microcomputer 108, when determining the operating frequency, it is necessary to use an AD converter and wait until the analog-digital conversion of the operating voltage is completed.

次に、従来のマイコン108が休止し、動作を再開する際の問題点について説明する。従来のマイコン108は、動作周波数の調整のための動作電圧の監視をCPU113が行っている。そのため、マイコン108の動作中でのみ動作電圧の監視と動作周波数の調整が可能であり、マイコン108が休止中は動作電圧の監視ができない。よって、マイコン108は、休止する際、動作電圧の低下を考慮して、再稼動時の動作周波数を最も遅い動作周波数である5MHzに設定し、休止する必要がある。   Next, a problem that occurs when the conventional microcomputer 108 pauses and resumes operation will be described. In the conventional microcomputer 108, the CPU 113 monitors the operating voltage for adjusting the operating frequency. Therefore, the operating voltage can be monitored and the operating frequency can be adjusted only while the microcomputer 108 is operating, and the operating voltage cannot be monitored while the microcomputer 108 is inactive. Therefore, when the microcomputer 108 is suspended, it is necessary to set the operating frequency at the time of re-operation to 5 MHz, which is the slowest operating frequency, in consideration of a decrease in the operating voltage.

図8は従来のマイコン108の動作の休止から再開までの流れを示すフローチャートである。まず、ユーザがシステムの動作に関連した処理を行い(ステップS301)、マイコン108の休止状態が発生するものとする(ステップS301:Yes)。マイコン108は休止直前に、次に動作を再開する際のクロック信号127の周波数として、もっとも低い5MHzを設定し(ステップS303)、クロック信号122の供給を休止する(ステップS304)。クロック信号122の供給が休止されマイコン108が休止する(ステップS305)。   FIG. 8 is a flowchart showing the flow from the pause to the restart of the operation of the conventional microcomputer 108. First, it is assumed that the user performs a process related to the operation of the system (step S301), and the microcomputer 108 is suspended (step S301: Yes). The microcomputer 108 sets the lowest 5 MHz as the frequency of the clock signal 127 when the operation is resumed next (step S303) immediately before the suspension (step S304). The supply of the clock signal 122 is suspended and the microcomputer 108 is deactivated (step S305).

一定時間が経過し、マイコン108が再稼動すると(ステップS306:Yes)、クロック信号122がマイコン108に供給される(ステップS308)。   When the predetermined time has elapsed and the microcomputer 108 is restarted (step S306: Yes), the clock signal 122 is supplied to the microcomputer 108 (step S308).

マイコン108の再稼働の際のCPU113に供給されるクロック信号127の周波数は5MHzである。再稼動したマイコン108は、動作電圧121を測定し(ステップS308)、測定した動作電圧121をもとにマイコン108に供給するクロック信号127の周波数を再設定する(ステップS309)。   The frequency of the clock signal 127 supplied to the CPU 113 when the microcomputer 108 is restarted is 5 MHz. The reactivated microcomputer 108 measures the operating voltage 121 (step S308), and resets the frequency of the clock signal 127 supplied to the microcomputer 108 based on the measured operating voltage 121 (step S309).

ところで、動作電圧を検出するパワーフェイル回路をマイコンの外部に有するマイコンが特許文献1に記載されている。特許文献1に記載のマイコンは、クロック信号出力回路と、クロック信号出力回路の出力を受けマイコンの動作クロック及びその動作クロックより低周波数のクロックを生成するクロック生成回路と、外部のパワーフェイル検出回路の検出結果に基づき、マイコンに供給するクロック信号を動作クロックより低周波数のクロック信号に変更する割り込み信号を出力する割り込み信号出力回路を有する。特許文献1に記載のマイコンは、マイコン外部パワーフェイル回路が動作電圧の低下を検出すると、その検出結果に基づき、マイコン内部の割り込み信号出力回路が割り込み信号を出力し、それによりマイコン内部に供給されるクロック信号の周波数を低くするよう制御するものである。これにより、異常時に動作電圧が急速に低下した場合にマイコンが停止することを防ぐことができる。   Incidentally, a microcomputer having a power fail circuit for detecting an operating voltage outside the microcomputer is described in Patent Document 1. The microcomputer disclosed in Patent Document 1 includes a clock signal output circuit, a clock generation circuit that receives the output of the clock signal output circuit, generates a clock having a frequency lower than the operation clock of the microcomputer, and an external power fail detection circuit And an interrupt signal output circuit for outputting an interrupt signal for changing the clock signal supplied to the microcomputer to a clock signal having a frequency lower than that of the operation clock. In the microcomputer described in Patent Document 1, when the microcomputer external power fail circuit detects a decrease in operating voltage, an interrupt signal output circuit in the microcomputer outputs an interrupt signal based on the detection result, and is supplied to the microcomputer. It controls to lower the frequency of the clock signal. As a result, it is possible to prevent the microcomputer from being stopped when the operating voltage rapidly decreases in the event of an abnormality.

特開平3−130812号公報JP-A-3-130812

NECエレクトロニクス,「ユーザーズ・マニュアル 78K0/KE2 8ビット・シングルチップ・マイクロコントローラ」,2006年12月,P632NEC Electronics, “User's Manual 78K0 / KE2 8-bit single-chip microcontroller”, December 2006, P632

以下従来技術の問題点について説明する。ここでは、図6に示すマイコン108が、休止してから再開するまでの間に、動作電圧がマイコン108の最も低い動作周波数帯に対応する電圧の閾値まで低下しなかった場合について考える。図9は、従来のマイコンにかかる動作電圧の変化、マイコンの稼動状態、動作電圧の検出が可能であるか否か及びマイコンの動作周波数を示すグラフである。図9(a)はマイコン108の休止中(タイミングt1からt2の間)に動作電圧が2.7V以下まで低下した場合を示している。図9(b)はマイコン108の休止中に動作電圧が2.7V以下に低下しなかった場合を示している。タイミングt0からt2までの間はマイコン108が通常動作を行い、タイミングt1からタイミングt2までの間はマイコン108は休止している。タイミングt2でマイコン108の動作が再開し、タイミングt2からt3でマイコン108が動作電圧を測定し動作電圧に対応する動作周波数を決定する。   The problems of the prior art will be described below. Here, let us consider a case where the operating voltage does not drop to the voltage threshold corresponding to the lowest operating frequency band of the microcomputer 108 between the time when the microcomputer 108 shown in FIG. FIG. 9 is a graph showing a change in operating voltage applied to a conventional microcomputer, an operating state of the microcomputer, whether or not the operating voltage can be detected, and an operating frequency of the microcomputer. FIG. 9A shows a case where the operating voltage drops to 2.7 V or less during the pause of the microcomputer 108 (between timings t1 and t2). FIG. 9B shows a case where the operating voltage has not dropped to 2.7 V or less during the pause of the microcomputer 108. The microcomputer 108 performs a normal operation from the timing t0 to the timing t2, and the microcomputer 108 is suspended from the timing t1 to the timing t2. The operation of the microcomputer 108 resumes at timing t2, and the microcomputer 108 measures the operating voltage from timing t2 to t3 to determine the operating frequency corresponding to the operating voltage.

図9(a)のように、マイコン108が休止している間に動作電圧が2.7V以下まで低下した場合、タイミングt2でマイコン108の動作が再開した直後から、動作電圧に対応する周波数のクロック信号127をCPU113に供給することができる。しかし、図9(b)のように、マイコン108の休止中に動作電圧が2.7V以下に低下しなかった場合、つまり、休止期間が短かった場合に、図9(b)のタイミングt2の動作再開の際は、マイコン108の動作可能な周波数は10MHzとなる。しかし、図8のステップS303においてマイコン108の動作が再開される際に供給されるクロック信号の周波数は5MHzに設定されている。従来のマイコン108は、タイミングt2からタイミングt3の間は、本来最適な周波数である10MHzで動作せず、最低動作周波数である5MHzで動作する。   As shown in FIG. 9A, when the operating voltage drops to 2.7 V or less while the microcomputer 108 is at rest, the frequency corresponding to the operating voltage immediately after the operation of the microcomputer 108 resumes at the timing t2. A clock signal 127 can be supplied to the CPU 113. However, as shown in FIG. 9B, when the operating voltage does not drop to 2.7 V or less during the pause of the microcomputer 108, that is, when the pause period is short, the timing t2 in FIG. When the operation is resumed, the operable frequency of the microcomputer 108 is 10 MHz. However, the frequency of the clock signal supplied when the operation of the microcomputer 108 is resumed in step S303 in FIG. 8 is set to 5 MHz. The conventional microcomputer 108 does not operate at the originally optimal frequency of 10 MHz, but operates at the minimum operating frequency of 5 MHz from the timing t2 to the timing t3.

以上のように、従来のマイコンでは、マイコンの休止中に動作電圧を測定することができないため、休止する前に動作周波数を最低動作周波数に設定しなければならない。そのため、従来のマイコンは、休止から再稼動する際、動作電圧が高い場合であっても最も低い動作周波数で再稼動する。これにより、マイコン再稼動直後はマイコンの処理パフォーマンスが低下する。加えて、マイコン再稼動時の電圧が最低周波数に適した電圧であって、動作周波数の変更が必要でない場合においても、再稼動直後に動作電圧を測定し、動作周波数を再設定する必要がある。これにより、マイコンが再稼動してから動作周波数を再設定するまでの間は、ユーザが本来マイコンで行なおうとしている処理が遅れ、キー入力等の入力信号の検出の遅延及び取りこぼしが発生するという問題がある。   As described above, in the conventional microcomputer, the operating voltage cannot be measured while the microcomputer is paused. Therefore, the operating frequency must be set to the minimum operating frequency before the pause. Therefore, when the conventional microcomputer is restarted from the sleep state, it restarts at the lowest operating frequency even when the operating voltage is high. As a result, the processing performance of the microcomputer decreases immediately after the microcomputer is restarted. In addition, even if the voltage when the microcomputer is restarted is suitable for the minimum frequency and it is not necessary to change the operating frequency, it is necessary to measure the operating voltage immediately after restarting and reset the operating frequency. . As a result, between the time when the microcomputer is restarted and the time when the operating frequency is reset, the processing that the user originally intended to perform with the microcomputer is delayed, and detection of input signals such as key inputs is delayed and missed. There is a problem.

また、特許文献1に記載のマイコンは、外部にパワーフェイル回路を有しているため、マイコンの動作が再開する前に動作電圧を測定することが可能である。しかしながら、及び外部のパワーフェイル回路の動作電圧の検出結果をクロック信号の周波数の変更に用いるためには、マイコン内部の割り込み信号出力回路を用いて、動作電圧に対応したクロック信号の周波数を判断させる必要がある。したがって、クロック信号の周波数を判断するために、マイコンの動作が安定するのを待つことになる。以上より、周波数の設定マイコンの動作再開が遅れ、ユーザの入力への対応が遅れるという問題点がある。   Further, since the microcomputer described in Patent Document 1 has a power fail circuit outside, it is possible to measure the operating voltage before the operation of the microcomputer resumes. However, in order to use the detection result of the operating voltage of the external power fail circuit to change the frequency of the clock signal, the frequency of the clock signal corresponding to the operating voltage is determined using the interrupt signal output circuit inside the microcomputer. There is a need. Therefore, in order to determine the frequency of the clock signal, the microcomputer waits for the operation of the microcomputer to stabilize. As described above, there is a problem that the operation of the frequency setting microcomputer is delayed and the response to the user input is delayed.

本発明にかかるマイクロ・コンピュータは、外部又は内部からの要求により、クロック信号の供給が停止される演算部と、外部から供給されるクロック信号の周波数を変更し、異なる周波数のクロック信号を1以上生成するクロック信号生成部と、演算部の稼動状態にかかわらずマイクロ・コンピュータの動作電圧を検出する電圧検出部と、クロック信号生成部で生成されたクロック信号又は外部から供給されるクロック信号のうちいずれかを選択して演算部に供給する選択部と、演算部の稼動状態にかかわらず電圧検出部の検出結果に基づき、選択部がクロック信号を選択するための選択信号を生成する選択信号生成部とを有し、演算部の稼動状態にかかわらず、外部又は内部からの要求に応じ、選択信号によりクロック信号が選択され、演算部に供給される。これにより、マイコンにクロック信号が供給されていない場合も、マイコンの動作電圧を検出し、マイコンの再稼動直後から動作電圧にあった周波数のクロック信号を演算部に供給することができる。   The microcomputer according to the present invention changes the frequency of the clock signal supplied from the calculation unit and the clock signal supplied from the outside in response to a request from the outside or the inside, and adds one or more clock signals having different frequencies. A clock signal generator to be generated, a voltage detector for detecting the operating voltage of the microcomputer regardless of the operating state of the arithmetic unit, a clock signal generated by the clock signal generator or a clock signal supplied from the outside A selection unit that selects one of them and supplies it to the calculation unit, and a selection signal generation that generates a selection signal for the selection unit to select a clock signal based on the detection result of the voltage detection unit regardless of the operation state of the calculation unit A clock signal is selected by a selection signal in response to a request from outside or inside, regardless of the operating state of the arithmetic unit, It is supplied to the calculation unit. Thereby, even when the clock signal is not supplied to the microcomputer, the operating voltage of the microcomputer can be detected, and a clock signal having a frequency corresponding to the operating voltage can be supplied to the arithmetic unit immediately after the microcomputer is restarted.

本発明によれば、マイコン動作再開直後からマイコンに供給される動作電圧に対し最適なクロック周波数の設定で動作を開始できるマイコンを供給することができる。   According to the present invention, it is possible to supply a microcomputer that can start operation with an optimum clock frequency setting for the operating voltage supplied to the microcomputer immediately after the microcomputer operation is resumed.

実施の形態1にかかるマイコンの構成を示す図である。1 is a diagram illustrating a configuration of a microcomputer according to a first embodiment; 実施の形態1にかかるマイコンの動作を示すフローチャートである。3 is a flowchart showing the operation of the microcomputer according to the first exemplary embodiment; 従来技術にかかるマイコンの動作周波数帯とそれに対応する動作電圧を示す表である。It is a table | surface which shows the operating frequency band of the microcomputer concerning a prior art, and the operating voltage corresponding to it. 従来技術にかかるクロック信号生成回路102を示す図である。It is a figure which shows the clock signal generation circuit 102 concerning a prior art. 従来技術にかかるマイコン105を示す図である。It is a figure which shows the microcomputer 105 concerning a prior art. 従来技術にかかるマイコン108の詳細を示す図である。It is a figure which shows the detail of the microcomputer 108 concerning a prior art. 従来技術にかかるクロック信号の周波数の変更を決定する動作を示すフローチャートである。It is a flowchart which shows the operation | movement which determines the change of the frequency of the clock signal concerning a prior art. 従来のマイコン108の動作の休止から再開までの流れを示すフローチャートである。It is a flowchart which shows the flow from the rest of operation | movement of the conventional microcomputer 108 to restart. 従来のマイコンにかかる動作電圧の変化、マイコンの稼動状態、動作電圧の検出が可能であるか否か及びマイコンの動作周波数を示すグラフである。It is a graph which shows the change of the operating voltage concerning the conventional microcomputer, the operating state of a microcomputer, whether the operating voltage is detectable, and the operating frequency of the microcomputer.

実施の形態1
以下、図面を参照して本発明の実施の形態について説明する。図1は本発明におけるマイコン1の構成を示す図である。マイコン1は、演算部としてのCPU18と、クロック信号生成部としてのプリスケラ16と、電圧検出部としてのコンパレータ10、11およびコンパレータデータバッファ13と、選択部としてのセレクタ17と、選択信号生成部としてのセレクタ制御レジスタ14と、休止・稼動制御部15と、ラッチ回路12とを有する。
Embodiment 1
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing a configuration of a microcomputer 1 according to the present invention. The microcomputer 1 includes a CPU 18 as a calculation unit, a prescaler 16 as a clock signal generation unit, comparators 10 and 11 and a comparator data buffer 13 as voltage detection units, a selector 17 as a selection unit, and a selection signal generation unit. Selector control register 14, suspension / operation control unit 15, and latch circuit 12.

CPU18は、外部からの要求信号24またはCPU18からの休止要求信号26により、クロック信号32の供給が停止される。   The CPU 18 stops supplying the clock signal 32 in response to an external request signal 24 or a pause request signal 26 from the CPU 18.

プリスケラ16は、外部から供給されるクロック信号27の周波数を変更し、異なる周波数のクロック信号28及び29を生成する。コンパレータ10、11は、CPU18の稼動状態にかかわらずマイコン1の動作電圧を検出する。   The prescaler 16 changes the frequency of the clock signal 27 supplied from the outside, and generates clock signals 28 and 29 having different frequencies. The comparators 10 and 11 detect the operating voltage of the microcomputer 1 regardless of the operating state of the CPU 18.

コンパレータデータバッファ13は、CPU18の稼動状態にかかわらず、動作電圧の検出結果をセレクタ制御レジスタ14に出力する。   The comparator data buffer 13 outputs the detection result of the operating voltage to the selector control register 14 regardless of the operating state of the CPU 18.

セレクタ17は、プリスケラ16で生成されたクロック信号28及び29又は外部から供給されるクロック信号27のうちいずれかを選択してCPU18に供給する。   The selector 17 selects one of the clock signals 28 and 29 generated by the prescaler 16 or the clock signal 27 supplied from the outside, and supplies it to the CPU 18.

セレクタ制御レジスタ14は、マイコン1の稼働状態にかかわらず、コンパレータ10及び11の検出結果に基づき、セレクタ17がCPU18に供給するクロック信号32を選択するための選択信号34を生成し、保持する。ラッチ回路12は、ラッチ信号33をセレクタ制御レジスタ14に入力する。セレクタ制御レジスタ14は、ラッチ回路12からラッチ信号33を入力されると、保持していた選択信号34をセレクタ17に出力する。セレクタ17は選択信号34に基づいてクロック信号32をCPU18に供給する。   The selector control register 14 generates and holds a selection signal 34 for selecting the clock signal 32 that the selector 17 supplies to the CPU 18 based on the detection results of the comparators 10 and 11 regardless of the operating state of the microcomputer 1. The latch circuit 12 inputs the latch signal 33 to the selector control register 14. When receiving the latch signal 33 from the latch circuit 12, the selector control register 14 outputs the held selection signal 34 to the selector 17. The selector 17 supplies a clock signal 32 to the CPU 18 based on the selection signal 34.

ラッチ回路12は、CPU18へのクロック信号32の供給が停止している場合、外部からの要求信号24又はCPU18が出力する稼動要求信号25に応じてラッチ信号33をセレクタ制御レジスタ14に出力する。   When the supply of the clock signal 32 to the CPU 18 is stopped, the latch circuit 12 outputs a latch signal 33 to the selector control register 14 according to the request signal 24 from the outside or the operation request signal 25 output from the CPU 18.

ラッチ回路12は、CPU18へクロック信号32が供給されている場合、CPU18からの周波数変更信号31に応じてラッチ信号33をセレクタ制御レジスタ14に出力する。   When the clock signal 32 is supplied to the CPU 18, the latch circuit 12 outputs a latch signal 33 to the selector control register 14 in response to the frequency change signal 31 from the CPU 18.

これにより、マイコン1は、CPU18へのクロック信号32の供給が休止されている場合は、外部からの要求信号24又はCPU18からの稼働要求信号25により、クロック信号32を選択でき、CPU18にクロック信号32が供給されている場合は、CPU18からの周波数変更信号31により、クロック信号32を選択することができる。   Thereby, when the supply of the clock signal 32 to the CPU 18 is stopped, the microcomputer 1 can select the clock signal 32 by the request signal 24 from the outside or the operation request signal 25 from the CPU 18, and the clock signal is sent to the CPU 18. When 32 is supplied, the clock signal 32 can be selected by the frequency change signal 31 from the CPU 18.

ここで、更に本実施の形態にかかるマイコン1について詳細に説明する。マイコン1は、動作電圧に基づいた動作周波数帯を有する。本実施の形態では、動作電圧が1.8V〜2.7V、2.7V〜4V、4V〜5.5Vの3種類の動作電圧帯に対し、5MHz、10MHz、20MHzの動作周波数を対応させることとする。また、マイコン1は、外部からの要求信号24またはCPU18からの休止要求信号26により、休止・稼動制御部15を制御し、CPU18に供給されるクロック信号32の供給を停止することで稼動を休止する。   Here, the microcomputer 1 according to the present embodiment will be described in detail. The microcomputer 1 has an operating frequency band based on the operating voltage. In this embodiment, operating frequencies of 5 MHz, 10 MHz, and 20 MHz are made to correspond to three operating voltage bands of operating voltages of 1.8 V to 2.7 V, 2.7 V to 4 V, 4 V to 5.5 V. And Further, the microcomputer 1 controls the suspension / operation control unit 15 by the request signal 24 from the outside or the suspension request signal 26 from the CPU 18, and stops the operation by stopping the supply of the clock signal 32 supplied to the CPU 18. To do.

マイコン1の動作電源21は、CPU18、並びに比較器であるコンパレータ10及び11に接続されている。   The operating power supply 21 of the microcomputer 1 is connected to the CPU 18 and the comparators 10 and 11 that are comparators.

コンパレータ10及び11は、あらかじめ定められた電圧以上であることを検出すると0を出力する。コンパレータ10及び11はそれぞれ異なる電圧を検出する。   The comparators 10 and 11 output 0 when detecting that the voltage is equal to or higher than a predetermined voltage. The comparators 10 and 11 detect different voltages.

コンパレータ10及び11は、マイコン1内部へのクロック信号27の供給状態に関係なく、言い換えればCPU18の稼働中及びCPU18の休止中に動作電圧の検出を行い、コンパレータデータバッファ13の動作電圧の情報の更新を行う。   The comparators 10 and 11 detect the operating voltage regardless of the supply state of the clock signal 27 to the inside of the microcomputer 1, in other words, during the operation of the CPU 18 and during the suspension of the CPU 18. Update.

コンパレータ10は、動作電圧を検出し、4V以上であった場合、検出信号22Lo(0)を、4V以下であった場合検出信号22Hi(1)をコンパレータデータバッファ13に出力する。   The comparator 10 detects the operating voltage, and outputs the detection signal 22Lo (0) to the comparator data buffer 13 when it is 4V or more, and the detection signal 22Hi (1) when it is 4V or less.

コンパレータ11は、動作電圧を検出し、2.7V以上であった場合、検出信号23Lo(0)を、2.7V以下であった場合、検出信号23Hi(1)をコンパレータデータバッファ13に出力する。   The comparator 11 detects the operating voltage, and outputs the detection signal 23Lo (0) to the comparator data buffer 13 when the detection signal 23Lo (0) is 2.7V or less when the operation voltage is 2.7V or more. .

コンパレータデータバッファ13は、コンパレータ10及び11のそれぞれの検出信号22及び23を検出結果としてセレクタ制御レジスタ14に出力する。また、コンパレータデータバッファ13は、コンパレータ10及び11から出力された検出信号22および23が変化するたびにセレクタ制御レジスタ14に検出結果を出力する。   The comparator data buffer 13 outputs the detection signals 22 and 23 of the comparators 10 and 11 to the selector control register 14 as detection results. The comparator data buffer 13 outputs a detection result to the selector control register 14 every time the detection signals 22 and 23 output from the comparators 10 and 11 change.

セレクタ制御レジスタ14は、コンパレータデータバッファ13から動作電圧の情報を受け取る。セレクタ制御レジスタ14は、コンパレータデータバッファ13が出力した検出結果が(00)だった場合動作電圧は4V〜5.5Vであり、(10)だった場合2.7V〜4Vであり、(11)だった場合1.8V〜2.7Vであるとして、当該動作電圧の情報に基づき、セレクタ17がCPU18に出力するクロック信号32を選択するための選択信号34を生成し、保持する。   The selector control register 14 receives operating voltage information from the comparator data buffer 13. The selector control register 14 has an operating voltage of 4V to 5.5V when the detection result output from the comparator data buffer 13 is (00), and 2.7V to 4V when (10). In this case, assuming that the voltage is 1.8V to 2.7V, the selector 17 generates and holds a selection signal 34 for selecting the clock signal 32 to be output to the CPU 18 based on the information on the operating voltage.

プリスケラ16は、クロック信号の周波数を1/2または1/4にしてセレクタ17に供給する。   The prescaler 16 sets the frequency of the clock signal to 1/2 or 1/4 and supplies it to the selector 17.

セレクタ17には、外部から供給されたクロック信号27の1/4の周波数であるクロック信号28、1/2の周波数であるクロック信号29及び1/1の周波数であるクロック信号30が入力される。そして、セレクタ17は、セレクタ制御レジスタ14からの選択信号34に基づいて、クロック信号28〜30のうち1を選択し、CPU18に供給する。   The selector 17 receives a clock signal 28 that is a quarter frequency of the clock signal 27 supplied from the outside, a clock signal 29 that is a half frequency, and a clock signal 30 that is a 1/1 frequency. . The selector 17 selects one of the clock signals 28 to 30 based on the selection signal 34 from the selector control register 14 and supplies the selected signal to the CPU 18.

セレクタ制御レジスタ14は、ラッチ回路12からラッチ信号33を入力されると、保持していた選択信号34をセレクタ17に出力する。   When receiving the latch signal 33 from the latch circuit 12, the selector control register 14 outputs the held selection signal 34 to the selector 17.

選択信号34は、コンパレータデータバッファ13が出力した検出結果がそれぞれ(11)、(10)及び(00)だった場合、それぞれクロック信号27の周波数の1/4、1/2、1/1の周波数のクロック信号28、29及び30をセレクタ17に選択させる。   When the detection results output from the comparator data buffer 13 are (11), (10), and (00), respectively, the selection signal 34 is 1/4, 1/2, or 1/1 of the frequency of the clock signal 27, respectively. The selector 17 selects the clock signals 28, 29 and 30 having the frequencies.

ラッチ回路12は、CPU18から入力される稼動要求信号25または外部から入力されるマイコン1の稼働を要求する要求信号24と、CPU18が動作中に出力する周波数変更信号31とに基づき、セレクタ制御レジスタ14にラッチ信号33を出力し、ラッチ信号33が入力されることにより、セレクタ制御レジスタ14は保持していた選択信号34をセレクタ17に出力する。   The latch circuit 12 is a selector control register based on the operation request signal 25 input from the CPU 18 or the request signal 24 requesting the operation of the microcomputer 1 input from the outside, and the frequency change signal 31 output during operation of the CPU 18. When the latch signal 33 is output to 14 and the latch signal 33 is input, the selector control register 14 outputs the selection signal 34 held to the selector 17.

休止・稼動制御部15は、外部からの要求信号24またはCPU18からの稼動要求信号25及び休止要求信号26に基づき、マイコン1内部へ供給されるクロック信号27を供給または停止する。   The suspension / operation control unit 15 supplies or stops the clock signal 27 supplied to the inside of the microcomputer 1 based on the request signal 24 from the outside or the operation request signal 25 and the suspension request signal 26 from the CPU 18.

CPU18は、休止・稼動制御部15に稼動要求信号25又は休止要求信号26を出力することにより、マイコン1内部に供給されるクロック信号27の供給を制御し、それによりCPU18の休止及び稼動を制御する。   The CPU 18 controls the supply of the clock signal 27 supplied to the inside of the microcomputer 1 by outputting the operation request signal 25 or the suspension request signal 26 to the suspension / operation controller 15, thereby controlling the suspension and operation of the CPU 18. To do.

稼動要求信号25と休止要求信号26は同一信号で、Lo(0)時は稼動、Hi(1)時は休止となっているが、本実施の形態では、動作説明の為別個に記載する。稼動要求信号25及び停止要求信号26は、たとえばマイコン搭載機能(タイマ等)により出力される。   The operation request signal 25 and the suspension request signal 26 are the same signal. The operation request signal 25 and the suspension request signal 26 are in operation and in the hi (1) operation, respectively, but in this embodiment, they are described separately for explaining the operation. The operation request signal 25 and the stop request signal 26 are output by, for example, a microcomputer mounting function (such as a timer).

CPU18は、稼動中に、マイコン1の動作の必要に応じ、一定の周期でラッチ回路12に周波数変更信号31を出力する。周波数変更信号31は、ラッチ回路12にラッチ信号33を出力させ、ラッチ信号33はセレクタ制御レジスタ14に保持している選択信号34を出力させ、選択信号34によりセレクタ17においてクロック信号32が選択される。   During operation, the CPU 18 outputs a frequency change signal 31 to the latch circuit 12 at a constant cycle as necessary for the operation of the microcomputer 1. The frequency change signal 31 causes the latch circuit 12 to output the latch signal 33, the latch signal 33 causes the selector control register 14 to output the selection signal 34, and the selector 17 selects the clock signal 32 by the selection signal 34. The

本実施の形態では、マイコン1の動作状態に関係なく動作電圧を検出するため、マイコン1が再稼動した際に、動作電圧の測定の終了を待って最適なクロック信号の周波数を選択するという動作をする必要がなくなり、マイコン1の動作のレスポンスが向上する。   In the present embodiment, since the operating voltage is detected regardless of the operating state of the microcomputer 1, when the microcomputer 1 is restarted, the operation of selecting the optimum clock signal frequency after completion of the measurement of the operating voltage is performed. The response of the operation of the microcomputer 1 is improved.

ここでマイコン1の動作についてさらに詳細に説明する。図2は、本実施の形態に係るマイコン1の動作を示すフローチャートである。   Here, the operation of the microcomputer 1 will be described in more detail. FIG. 2 is a flowchart showing the operation of the microcomputer 1 according to the present embodiment.

まず、システムに関連したユーザの処理が行われる(ステップS31)。ユーザの処理がCPU18の動作を休止させるものでなかった場合(ステップS32:No)、マイコン1は通常動作に戻る。   First, user processing related to the system is performed (step S31). If the user process does not pause the operation of the CPU 18 (step S32: No), the microcomputer 1 returns to the normal operation.

ユーザの処理がCPU18を休止させるものであった場合(ステップS32:Yes)、CPU18から休止要求信号26が出力され、休止・稼動制御部15はクロック信号27の供給を休止する(ステップS33)。   If the user process is to pause the CPU 18 (step S32: Yes), the CPU 18 outputs a pause request signal 26, and the pause / operation control unit 15 pauses the supply of the clock signal 27 (step S33).

CPU18は外部からの要求信号24かまたは一定条件を満たすまで休止する(ステップS34)。一定条件とは、たとえばマイコン1内部のタイマによる再稼動の設定などである。ここで、CPU18が休止しているステップS34においても、クロック信号27のマイコン1内部への供給状態に関係なく、コンパレータ10及び11により動作電圧の検出は継続され、コンパレータデータバッファ13の動作電圧情報の更新が行われる。   The CPU 18 pauses until either the external request signal 24 or a certain condition is satisfied (step S34). The fixed condition is, for example, a setting for restarting by a timer in the microcomputer 1. Here, even in step S34 in which the CPU 18 is inactive, the detection of the operating voltage is continued by the comparators 10 and 11 regardless of the supply state of the clock signal 27 to the inside of the microcomputer 1, and the operating voltage information of the comparator data buffer 13 Is updated.

外部から要求信号24が入力されるか、または再開条件が発生した場合(ステップS35:Yes)、CPU18は動作を開始する(ステップS36)。   When the request signal 24 is input from the outside or the restart condition is generated (step S35: Yes), the CPU 18 starts the operation (step S36).

CPU18が休止状態で、外部からの要求信号24またはCPU18からの稼動要求信号25が発せられると同時に、ラッチ回路12にも稼動要求信号25が出力される。ラッチ回路12は、稼動要求信号25を入力されるとすぐにコンパレータデータバッファ13に対してラッチ信号33を出力する。   While the CPU 18 is in a dormant state, an external request signal 24 or an operation request signal 25 from the CPU 18 is issued, and at the same time, an operation request signal 25 is output to the latch circuit 12. As soon as the operation request signal 25 is input, the latch circuit 12 outputs a latch signal 33 to the comparator data buffer 13.

セレクタ制御レジスタ14は、CPU18が休止状態の際も動作電圧の情報を更新し、選択信号34を常に保持している。そのため、ラッチ信号33を入力されるとすぐに選択信号34をセレクタ17に入力する。   The selector control register 14 updates the operating voltage information even when the CPU 18 is in an inactive state, and always holds the selection signal 34. Therefore, the selection signal 34 is input to the selector 17 as soon as the latch signal 33 is input.

本実施の形態によれば、クロック信号27のマイコン1内部への供給状態及びマイコン1の動作状態にかかわらず、常時動作電圧の検出が可能なコンパレータ10及び11を有することで、常にマイコン1の動作電圧を検出できる。また、マイコン1は、動作電圧の情報をマイコン1の稼働状態に関わらず更新するコンパレータデータバッファ13を有し、パレータバッファ13の検出結果に基づき、選択信号34を常に保持するセレクタ制御レジスタ14を有している。そのため、マイコン1を起動させる外部からの要求信号24およびCPU18からの稼働要求信号25は、ラッチ回路12を介して、ほぼ同時にコンパレータデータバッファ13に選択信号34を出力させる。そのため、マイコン1の再稼動時の動作電圧に合った動作周波数に切り替えることができる。以上により、マイコン休止時、動作電圧低下を考慮し最低電圧時を想定したもっとも遅い周波数への切り替えのための制御が不要となり、したがってマイコン1の動作再開時の動作電圧の測定及び動作周波数を選択して切り替える処理が不要となるため、再稼動直後の対応処理開始が早められる。   According to the present embodiment, by including the comparators 10 and 11 that can always detect the operating voltage regardless of the supply state of the clock signal 27 to the inside of the microcomputer 1 and the operating state of the microcomputer 1, The operating voltage can be detected. Further, the microcomputer 1 has a comparator data buffer 13 that updates information on the operating voltage regardless of the operating state of the microcomputer 1, and a selector control register 14 that always holds the selection signal 34 based on the detection result of the paralator buffer 13. Have. Therefore, an external request signal 24 for starting the microcomputer 1 and an operation request signal 25 from the CPU 18 cause the comparator data buffer 13 to output the selection signal 34 almost simultaneously via the latch circuit 12. Therefore, it is possible to switch to an operating frequency that matches the operating voltage when the microcomputer 1 is restarted. As described above, when the microcomputer is stopped, the control for switching to the slowest frequency assuming the lowest voltage is considered in consideration of the operating voltage drop. Therefore, the operating voltage is measured and the operating frequency is selected when the microcomputer 1 is restarted. Thus, the switching process becomes unnecessary, so that the start of the corresponding process immediately after the re-operation is accelerated.

また、本実施の形態によれば、ADコンバータを使用した際の変換待ち時間等でロストする時間がなくなり、ユーザ処理のレスポンスが向上する。   Further, according to the present embodiment, the lost time is lost due to the conversion waiting time when the AD converter is used, and the response of the user process is improved.

また、動作電圧の検出を行う回路をコンパレータ10、11及びコンパレータデータバッファ13という簡易な回路で構成したため、動作電圧検出のためのユーザーソフト処理が不要となり、ユーザーソフトの負荷の軽減と、処理時間の短縮が可能となる。   In addition, since the circuit for detecting the operating voltage is composed of simple circuits such as the comparators 10 and 11 and the comparator data buffer 13, the user software processing for detecting the operating voltage becomes unnecessary, reducing the load on the user software and processing time. Can be shortened.

なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、コンパレータの数や動作帯域の数を増やすなどしてもよい。   Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention. For example, the number of comparators and the number of operation bands may be increased.

1 マイコン
10、11 コンパレータ
12 ラッチ回路
13 コンパレータデータバッファ
14 セレクタ制御レジスタ
15 休止・稼動制御部
16 プリスケラ
17 セレクタ
18 CPU
21 動作電源
22、23 検出信号
24 要求信号
25 稼動要求信号
26 休止要求信号
27 クロック信号
28 クロック信号(周波数1/4)
29 クロック信号(周波数1/2)
30 クロック信号(周波数1/1)
31 周波数変更信号
32 クロック信号
33 ラッチ信号
34 選択信号
101 高速システム・クロック発信器
102 クロック生成回路
103 プリスケラ
104 セレクタ
105 マイコン
106 ADコンバータ
107 電源
108 マイコン
109 セレクタ制御レジスタ
110 休止・稼動制御部
111 プリスケラ
112 セレクタ
113 CPU
121 動作電源
122 クロック信号
123 要求信号
124 稼動要求信号
125 休止要求信号
126、127 クロック信号
128 セレクタ制御信号
DESCRIPTION OF SYMBOLS 1 Microcomputer 10, 11 Comparator 12 Latch circuit 13 Comparator data buffer 14 Selector control register 15 Pause / operation control part 16 Prescaler 17 Selector 18 CPU
21 Operation power supply 22, 23 Detection signal 24 Request signal 25 Operation request signal 26 Pause request signal 27 Clock signal 28 Clock signal (frequency 1/4)
29 Clock signal (frequency 1/2)
30 clock signals (frequency 1/1)
31 Frequency change signal 32 Clock signal 33 Latch signal 34 Selection signal 101 High-speed system clock generator 102 Clock generation circuit 103 Prescaler 104 Selector 105 Microcomputer 106 AD converter 107 Power supply 108 Microcomputer 109 Selector control register 110 Pause / operation control unit 111 Prescaler 112 Selector 113 CPU
121 operation power supply 122 clock signal 123 request signal 124 operation request signal 125 pause request signal 126, 127 clock signal 128 selector control signal

Claims (8)

外部又は内部からの要求により、クロック信号の供給が停止される演算部と、
外部から供給されるクロック信号の周波数を変更し、異なる周波数のクロック信号を1以上生成するクロック信号生成部と、
前記演算部の稼動状態にかかわらずマイクロ・コンピュータの動作電圧を検出する電圧検出部と、
前記クロック信号生成部で生成されたクロック信号又は前記外部から供給されるクロック信号のうちいずれかを選択して前記演算部に供給する選択部と、
前記演算部の稼動状態にかかわらず前記電圧検出部の検出結果に基づき、前記選択部がクロック信号を選択するための選択信号を生成する選択信号生成部とを有し、
前記演算部の稼動状態にかかわらず、外部又は内部からの要求に応じ、前記選択信号によりクロック信号が選択され、前記演算部に供給されるマイクロ・コンピュータ。
An arithmetic unit that stops supply of a clock signal in response to a request from the outside or the inside,
A clock signal generator for changing the frequency of a clock signal supplied from the outside and generating one or more clock signals of different frequencies;
A voltage detector that detects the operating voltage of the microcomputer regardless of the operating state of the arithmetic unit;
A selection unit that selects either the clock signal generated by the clock signal generation unit or the clock signal supplied from the outside and supplies the selection to the arithmetic unit;
A selection signal generation unit that generates a selection signal for the selection unit to select a clock signal based on the detection result of the voltage detection unit regardless of the operating state of the arithmetic unit;
A microcomputer in which a clock signal is selected by the selection signal in response to a request from the outside or inside regardless of the operating state of the arithmetic unit, and is supplied to the arithmetic unit.
前記選択信号生成部は、
前記電圧検出部が検出した検出結果を前記選択信号に変換して保持し、当該選択信号を前記外部又は内部からの要求に応じて前記選択回路に出力する請求項1記載のマイクロ・コンピュータ。
The selection signal generator is
The microcomputer according to claim 1, wherein the detection result detected by the voltage detection unit is converted into the selection signal and held, and the selection signal is output to the selection circuit in response to a request from the outside or the inside.
前記電圧検出部は、あらかじめ定められた電圧以上であることを検出すると0を出力する比較器を有し、前記動作電圧を検出する請求項1又は2記載のマイクロ・コンピュータ。   3. The microcomputer according to claim 1, wherein the voltage detection unit includes a comparator that outputs 0 when it is detected that the voltage is equal to or higher than a predetermined voltage, and detects the operating voltage. 前記電圧検出部は、
それぞれ異なる電圧を検出する前記比較器を複数有し、当該複数の比較器から出力された結果により前記動作電圧を測定する請求項1乃至3記載のマイクロ・コンピュータ。
The voltage detector is
4. The microcomputer according to claim 1, further comprising a plurality of comparators that detect different voltages, and measuring the operating voltage based on a result output from the plurality of comparators.
前記演算部へクロック信号が供給されている場合は、当該演算部からの要求に応じ、前記選択信号によりクロック信号を選択し、前記演算部に供給する請求項1乃至4のいずれか1項記載のマイクロ・コンピュータ。   5. The clock signal according to claim 1, wherein when a clock signal is supplied to the arithmetic unit, a clock signal is selected by the selection signal in response to a request from the arithmetic unit and supplied to the arithmetic unit. Microcomputer. 外部又は内部からの要求により、クロック信号の供給が停止される演算部を有するマイクロ・コンピュータの制御方法であって、
外部から供給されるクロック信号の周波数を変更し、異なる周波数のクロック信号を1以上生成し、
前記演算部の稼動状態にかかわらずマイクロ・コンピュータの動作電圧を検出し、
前記演算部の稼動状態にかかわらず前記検出結果に基づき、外部から供給されるクロック信号又は前記生成された周波数の異なるクロック信号のいずれかを選択するための選択信号を生成し、
前記演算部の稼動状態にかかわらず、外部又は内部からの要求に応じ、前記選択信号によりクロック信号を選択し、前記演算部に供給するマイクロ・コンピュータの制御方法。
A control method of a microcomputer having a calculation unit in which supply of a clock signal is stopped by a request from outside or inside,
Change the frequency of the clock signal supplied from outside, generate one or more clock signals with different frequencies,
Detect the operating voltage of the microcomputer regardless of the operating state of the arithmetic unit,
Based on the detection result regardless of the operation state of the arithmetic unit, generating a selection signal for selecting either a clock signal supplied from the outside or a clock signal having a different frequency generated,
A microcomputer control method for selecting a clock signal by the selection signal and supplying the selected clock signal to the arithmetic unit in response to a request from outside or inside regardless of the operating state of the arithmetic unit.
前記選択信号を生成する際は、前記検出結果を前記選択信号に変換して選択信号生成部に保持し、前記外部又は内部からの要求に応じて当該選択信号生成部に保持された選択信号を出力する請求項6記載のマイクロ・コンピュータの制御方法。   When generating the selection signal, the detection result is converted into the selection signal and held in the selection signal generation unit, and the selection signal held in the selection signal generation unit in response to a request from the outside or the inside 7. The microcomputer control method according to claim 6, wherein the microcomputer is output. 前記選択信号に基づきクロック信号を選択して前記演算部に供給する際には、当該演算部へのクロック信号の供給が休止されている場合は、外部又は内部からの要求により、当該演算部にクロック信号が供給されている場合は、当該演算部からの要求により、クロック信号を選択する請求項6または7記載のマイクロ・コンピュータの制御方法。   When a clock signal is selected based on the selection signal and supplied to the arithmetic unit, if the supply of the clock signal to the arithmetic unit is suspended, the arithmetic unit can be requested by an external or internal request. 8. The microcomputer control method according to claim 6, wherein when the clock signal is supplied, the clock signal is selected in response to a request from the arithmetic unit.
JP2009276614A 2009-12-04 2009-12-04 Microcomputer and control method thereof Pending JP2011118751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009276614A JP2011118751A (en) 2009-12-04 2009-12-04 Microcomputer and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009276614A JP2011118751A (en) 2009-12-04 2009-12-04 Microcomputer and control method thereof

Publications (1)

Publication Number Publication Date
JP2011118751A true JP2011118751A (en) 2011-06-16

Family

ID=44283984

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009276614A Pending JP2011118751A (en) 2009-12-04 2009-12-04 Microcomputer and control method thereof

Country Status (1)

Country Link
JP (1) JP2011118751A (en)

Similar Documents

Publication Publication Date Title
US6510400B1 (en) Temperature control circuit for central processing unit
US8415994B2 (en) Integrated circuit and standby controlling method thereof
US8199687B2 (en) Information-communication terminal having function of controlling electric power consumption
JP2013149093A (en) Control device, control method, program, and electronic apparatus
JPWO2009078081A1 (en) Semiconductor integrated circuit
JP2004240651A (en) Electric power controller and information processor
US7689855B2 (en) Clock supplying apparatus and control method thereof
CN101013820B (en) Timer circuit
JP2011159873A (en) Semiconductor integrated circuit and voltage controller therewith
JP2003150269A (en) Power supply voltage frequency control circuit
US7900081B2 (en) Microcomputer and control system having the same
JP2013012003A (en) Data processing device and data processing system
US8552806B2 (en) Apparatus for supplying clock and method thereof
US9501113B2 (en) Voltage detection system and controlling method of the same
JPWO2012026002A1 (en) Data processing apparatus and data processing system
US9749962B1 (en) System and method for closed loop multimode radio system sleep clock frequency compensation
EP3799286B1 (en) Control system and power supply unit
JP2015088129A (en) Information processor and control method thereof
JP2011118751A (en) Microcomputer and control method thereof
US9575528B2 (en) Power supply voltage control system
JP5847456B2 (en) Processor and control method
JP2014089748A (en) Electronic circuit, specifically, device for supplying electric power to digital circuit and method related thereto
US20070046521A1 (en) Analog-to-digital converter and analog-to-digital conversion method
JP5056886B2 (en) Clock signal generation device and electronic device
CN106325461B (en) Information processing method and electronic equipment