JP2011118751A - Microcomputer and control method thereof - Google Patents
Microcomputer and control method thereof Download PDFInfo
- 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
Links
Images
Landscapes
- Microcomputers (AREA)
Abstract
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
図4は、従来技術にかかるクロック信号生成回路102を示す図である。クロック信号生成回路102は、高速システム・クロック発信器101から周波数fxpのクロック信号を供給される。クロック信号生成回路102は、供給されたクロック信号を、プリスケラ(分周器)103とセレクタ104を使用し、動作電圧の大きさに基づき、表100に示すCPUクロック周波数(周波数fcpu)に変更する。
FIG. 4 is a diagram showing a clock
図5は、従来技術にかかるマイコン105を示す図である。マイコン105は、動作中にADコンバータ106を用いて、電源107の電圧をデジタル数値に変換し、測定する。
FIG. 5 is a diagram showing a
図6は、従来技術にかかるマイコン108の詳細を示す図である。マイコン108は、CPU113と、CPU113に供給されるクロック信号122の供給及び供給の停止を制御する休止・稼動制御部110と、クロック信号122の周波数を変更するプリスケラ111と、プリスケラ111によって周波数の変更された複数のクロック信号126又は外部から供給されたクロック信号122のうちいずれかを選択して出力するセレクタ112と、セレクタ112を制御するセレクタ制御レジスタ109とを有する。
FIG. 6 is a diagram showing details of the
CPU113は、ADコンバータ(不図示)を用いてマイコン108の電源121の電圧を測定し、セレクタ制御レジスタ109に出力する。
The
セレクタ制御レジスタ109は、電源121の測定結果に基づいてセレクタ112の出力するクロック信号127を選択する。
The
休止・稼動制御部110は、CPU113が出力する休止要求信号125、稼動要求信号124及び外部から入力された要求信号123に基づいてクロック信号122のCPU108への供給と休止を制御する。
The suspension /
図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
以上のように、従来のマイコン108では、動作周波数を決定する際、ADコンバータを使用し、動作電圧のアナログ−デジタル変換が完了するまで待たなくてはならない。
As described above, in the
次に、従来のマイコン108が休止し、動作を再開する際の問題点について説明する。従来のマイコン108は、動作周波数の調整のための動作電圧の監視をCPU113が行っている。そのため、マイコン108の動作中でのみ動作電圧の監視と動作周波数の調整が可能であり、マイコン108が休止中は動作電圧の監視ができない。よって、マイコン108は、休止する際、動作電圧の低下を考慮して、再稼動時の動作周波数を最も遅い動作周波数である5MHzに設定し、休止する必要がある。
Next, a problem that occurs when the
図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
一定時間が経過し、マイコン108が再稼動すると(ステップS306:Yes)、クロック信号122がマイコン108に供給される(ステップS308)。
When the predetermined time has elapsed and the
マイコン108の再稼働の際のCPU113に供給されるクロック信号127の周波数は5MHzである。再稼動したマイコン108は、動作電圧121を測定し(ステップS308)、測定した動作電圧121をもとにマイコン108に供給するクロック信号127の周波数を再設定する(ステップS309)。
The frequency of the
ところで、動作電圧を検出するパワーフェイル回路をマイコンの外部に有するマイコンが特許文献1に記載されている。特許文献1に記載のマイコンは、クロック信号出力回路と、クロック信号出力回路の出力を受けマイコンの動作クロック及びその動作クロックより低周波数のクロックを生成するクロック生成回路と、外部のパワーフェイル検出回路の検出結果に基づき、マイコンに供給するクロック信号を動作クロックより低周波数のクロック信号に変更する割り込み信号を出力する割り込み信号出力回路を有する。特許文献1に記載のマイコンは、マイコン外部パワーフェイル回路が動作電圧の低下を検出すると、その検出結果に基づき、マイコン内部の割り込み信号出力回路が割り込み信号を出力し、それによりマイコン内部に供給されるクロック信号の周波数を低くするよう制御するものである。これにより、異常時に動作電圧が急速に低下した場合にマイコンが停止することを防ぐことができる。
Incidentally, a microcomputer having a power fail circuit for detecting an operating voltage outside the microcomputer is described in
以下従来技術の問題点について説明する。ここでは、図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
図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
以上のように、従来のマイコンでは、マイコンの休止中に動作電圧を測定することができないため、休止する前に動作周波数を最低動作周波数に設定しなければならない。そのため、従来のマイコンは、休止から再稼動する際、動作電圧が高い場合であっても最も低い動作周波数で再稼動する。これにより、マイコン再稼動直後はマイコンの処理パフォーマンスが低下する。加えて、マイコン再稼動時の電圧が最低周波数に適した電圧であって、動作周波数の変更が必要でない場合においても、再稼動直後に動作電圧を測定し、動作周波数を再設定する必要がある。これにより、マイコンが再稼動してから動作周波数を再設定するまでの間は、ユーザが本来マイコンで行なおうとしている処理が遅れ、キー入力等の入力信号の検出の遅延及び取りこぼしが発生するという問題がある。 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
本発明にかかるマイクロ・コンピュータは、外部又は内部からの要求により、クロック信号の供給が停止される演算部と、外部から供給されるクロック信号の周波数を変更し、異なる周波数のクロック信号を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は本発明におけるマイコン1の構成を示す図である。マイコン1は、演算部としてのCPU18と、クロック信号生成部としてのプリスケラ16と、電圧検出部としてのコンパレータ10、11およびコンパレータデータバッファ13と、選択部としてのセレクタ17と、選択信号生成部としてのセレクタ制御レジスタ14と、休止・稼動制御部15と、ラッチ回路12とを有する。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing a configuration of a
CPU18は、外部からの要求信号24またはCPU18からの休止要求信号26により、クロック信号32の供給が停止される。
The
プリスケラ16は、外部から供給されるクロック信号27の周波数を変更し、異なる周波数のクロック信号28及び29を生成する。コンパレータ10、11は、CPU18の稼動状態にかかわらずマイコン1の動作電圧を検出する。
The
コンパレータデータバッファ13は、CPU18の稼動状態にかかわらず、動作電圧の検出結果をセレクタ制御レジスタ14に出力する。
The
セレクタ17は、プリスケラ16で生成されたクロック信号28及び29又は外部から供給されるクロック信号27のうちいずれかを選択してCPU18に供給する。
The
セレクタ制御レジスタ14は、マイコン1の稼働状態にかかわらず、コンパレータ10及び11の検出結果に基づき、セレクタ17がCPU18に供給するクロック信号32を選択するための選択信号34を生成し、保持する。ラッチ回路12は、ラッチ信号33をセレクタ制御レジスタ14に入力する。セレクタ制御レジスタ14は、ラッチ回路12からラッチ信号33を入力されると、保持していた選択信号34をセレクタ17に出力する。セレクタ17は選択信号34に基づいてクロック信号32をCPU18に供給する。
The
ラッチ回路12は、CPU18へのクロック信号32の供給が停止している場合、外部からの要求信号24又はCPU18が出力する稼動要求信号25に応じてラッチ信号33をセレクタ制御レジスタ14に出力する。
When the supply of the
ラッチ回路12は、CPU18へクロック信号32が供給されている場合、CPU18からの周波数変更信号31に応じてラッチ信号33をセレクタ制御レジスタ14に出力する。
When the
これにより、マイコン1は、CPU18へのクロック信号32の供給が休止されている場合は、外部からの要求信号24又はCPU18からの稼働要求信号25により、クロック信号32を選択でき、CPU18にクロック信号32が供給されている場合は、CPU18からの周波数変更信号31により、クロック信号32を選択することができる。
Thereby, when the supply of the
ここで、更に本実施の形態にかかるマイコン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
マイコン1の動作電源21は、CPU18、並びに比較器であるコンパレータ10及び11に接続されている。
The operating
コンパレータ10及び11は、あらかじめ定められた電圧以上であることを検出すると0を出力する。コンパレータ10及び11はそれぞれ異なる電圧を検出する。
The
コンパレータ10及び11は、マイコン1内部へのクロック信号27の供給状態に関係なく、言い換えればCPU18の稼働中及びCPU18の休止中に動作電圧の検出を行い、コンパレータデータバッファ13の動作電圧の情報の更新を行う。
The
コンパレータ10は、動作電圧を検出し、4V以上であった場合、検出信号22Lo(0)を、4V以下であった場合検出信号22Hi(1)をコンパレータデータバッファ13に出力する。
The
コンパレータ11は、動作電圧を検出し、2.7V以上であった場合、検出信号23Lo(0)を、2.7V以下であった場合、検出信号23Hi(1)をコンパレータデータバッファ13に出力する。
The
コンパレータデータバッファ13は、コンパレータ10及び11のそれぞれの検出信号22及び23を検出結果としてセレクタ制御レジスタ14に出力する。また、コンパレータデータバッファ13は、コンパレータ10及び11から出力された検出信号22および23が変化するたびにセレクタ制御レジスタ14に検出結果を出力する。
The
セレクタ制御レジスタ14は、コンパレータデータバッファ13から動作電圧の情報を受け取る。セレクタ制御レジスタ14は、コンパレータデータバッファ13が出力した検出結果が(00)だった場合動作電圧は4V〜5.5Vであり、(10)だった場合2.7V〜4Vであり、(11)だった場合1.8V〜2.7Vであるとして、当該動作電圧の情報に基づき、セレクタ17がCPU18に出力するクロック信号32を選択するための選択信号34を生成し、保持する。
The
プリスケラ16は、クロック信号の周波数を1/2または1/4にしてセレクタ17に供給する。
The
セレクタ17には、外部から供給されたクロック信号27の1/4の周波数であるクロック信号28、1/2の周波数であるクロック信号29及び1/1の周波数であるクロック信号30が入力される。そして、セレクタ17は、セレクタ制御レジスタ14からの選択信号34に基づいて、クロック信号28〜30のうち1を選択し、CPU18に供給する。
The
セレクタ制御レジスタ14は、ラッチ回路12からラッチ信号33を入力されると、保持していた選択信号34をセレクタ17に出力する。
When receiving the
選択信号34は、コンパレータデータバッファ13が出力した検出結果がそれぞれ(11)、(10)及び(00)だった場合、それぞれクロック信号27の周波数の1/4、1/2、1/1の周波数のクロック信号28、29及び30をセレクタ17に選択させる。
When the detection results output from the
ラッチ回路12は、CPU18から入力される稼動要求信号25または外部から入力されるマイコン1の稼働を要求する要求信号24と、CPU18が動作中に出力する周波数変更信号31とに基づき、セレクタ制御レジスタ14にラッチ信号33を出力し、ラッチ信号33が入力されることにより、セレクタ制御レジスタ14は保持していた選択信号34をセレクタ17に出力する。
The
休止・稼動制御部15は、外部からの要求信号24またはCPU18からの稼動要求信号25及び休止要求信号26に基づき、マイコン1内部へ供給されるクロック信号27を供給または停止する。
The suspension / operation control unit 15 supplies or stops the
CPU18は、休止・稼動制御部15に稼動要求信号25又は休止要求信号26を出力することにより、マイコン1内部に供給されるクロック信号27の供給を制御し、それによりCPU18の休止及び稼動を制御する。
The
稼動要求信号25と休止要求信号26は同一信号で、Lo(0)時は稼動、Hi(1)時は休止となっているが、本実施の形態では、動作説明の為別個に記載する。稼動要求信号25及び停止要求信号26は、たとえばマイコン搭載機能(タイマ等)により出力される。
The
CPU18は、稼動中に、マイコン1の動作の必要に応じ、一定の周期でラッチ回路12に周波数変更信号31を出力する。周波数変更信号31は、ラッチ回路12にラッチ信号33を出力させ、ラッチ信号33はセレクタ制御レジスタ14に保持している選択信号34を出力させ、選択信号34によりセレクタ17においてクロック信号32が選択される。
During operation, the
本実施の形態では、マイコン1の動作状態に関係なく動作電圧を検出するため、マイコン1が再稼動した際に、動作電圧の測定の終了を待って最適なクロック信号の周波数を選択するという動作をする必要がなくなり、マイコン1の動作のレスポンスが向上する。
In the present embodiment, since the operating voltage is detected regardless of the operating state of the
ここでマイコン1の動作についてさらに詳細に説明する。図2は、本実施の形態に係るマイコン1の動作を示すフローチャートである。
Here, the operation of the
まず、システムに関連したユーザの処理が行われる(ステップ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
ユーザの処理がCPU18を休止させるものであった場合(ステップS32:Yes)、CPU18から休止要求信号26が出力され、休止・稼動制御部15はクロック信号27の供給を休止する(ステップS33)。
If the user process is to pause the CPU 18 (step S32: Yes), the
CPU18は外部からの要求信号24かまたは一定条件を満たすまで休止する(ステップS34)。一定条件とは、たとえばマイコン1内部のタイマによる再稼動の設定などである。ここで、CPU18が休止しているステップS34においても、クロック信号27のマイコン1内部への供給状態に関係なく、コンパレータ10及び11により動作電圧の検出は継続され、コンパレータデータバッファ13の動作電圧情報の更新が行われる。
The
外部から要求信号24が入力されるか、または再開条件が発生した場合(ステップS35:Yes)、CPU18は動作を開始する(ステップS36)。
When the
CPU18が休止状態で、外部からの要求信号24またはCPU18からの稼動要求信号25が発せられると同時に、ラッチ回路12にも稼動要求信号25が出力される。ラッチ回路12は、稼動要求信号25を入力されるとすぐにコンパレータデータバッファ13に対してラッチ信号33を出力する。
While the
セレクタ制御レジスタ14は、CPU18が休止状態の際も動作電圧の情報を更新し、選択信号34を常に保持している。そのため、ラッチ信号33を入力されるとすぐに選択信号34をセレクタ17に入力する。
The selector control register 14 updates the operating voltage information even when the
本実施の形態によれば、クロック信号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
また、本実施の形態によれば、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
なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。例えば、コンパレータの数や動作帯域の数を増やすなどしてもよい。 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
21
29 Clock signal (
30 clock signals (
31
121
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.
それぞれ異なる電圧を検出する前記比較器を複数有し、当該複数の比較器から出力された結果により前記動作電圧を測定する請求項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以上生成し、
前記演算部の稼動状態にかかわらずマイクロ・コンピュータの動作電圧を検出し、
前記演算部の稼動状態にかかわらず前記検出結果に基づき、外部から供給されるクロック信号又は前記生成された周波数の異なるクロック信号のいずれかを選択するための選択信号を生成し、
前記演算部の稼動状態にかかわらず、外部又は内部からの要求に応じ、前記選択信号によりクロック信号を選択し、前記演算部に供給するマイクロ・コンピュータの制御方法。 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.
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) |
-
2009
- 2009-12-04 JP JP2009276614A patent/JP2011118751A/en active Pending
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 |