JP3758477B2 - Microcomputer - Google Patents
Microcomputer Download PDFInfo
- Publication number
- JP3758477B2 JP3758477B2 JP2000234299A JP2000234299A JP3758477B2 JP 3758477 B2 JP3758477 B2 JP 3758477B2 JP 2000234299 A JP2000234299 A JP 2000234299A JP 2000234299 A JP2000234299 A JP 2000234299A JP 3758477 B2 JP3758477 B2 JP 3758477B2
- Authority
- JP
- Japan
- Prior art keywords
- microcomputer
- operation clock
- control
- speed
- state
- 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 - Lifetime
Links
Images
Landscapes
- Microcomputers (AREA)
- Power Sources (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、マイクロコンピュータの処理負荷に応じてマイクロコンピュータの動作クロックを切り換える動作クロック設定装置に関する。
【0002】
【従来の技術】
従来より、マイクロコンピュータの消費電力を低減したり、発熱を抑えるために、マイクロコンピュータの動作クロックを、マイクロコンピュータの処理負荷に応じて切り換える動作クロック設定装置が知られている。
【0003】
【発明が解決しようとする課題】
ところが、従来の動作クロック設定装置は、例えば、特開平6−124150号公報に記載のように、マイクロコンピュータの処理負荷が大きい場合には動作クロックを高速に設定し、処理負荷が小さい場合には動作クロックを低速に設定するように構成されていたことから、マイクロコンピュータの動作クロックを高速から低速に切り換えた際に、マイクロコンピュータの処理動作に遅れが生じ、マイクロコンピュータによる制御を安定して実行できなくなるという問題があった。
【0004】
つまり、マイクロコンピュータは、一般に、各種装置の制御に用いられるが、こうした制御のためのソフトウェアは、マイクロコンピュータの動作クロック(所謂システムクロック)に同期して時間を計時する計時用タイマにより、制御周期やタイミングを判断し、制御のための演算処理を行うように構成されている。
【0005】
一方、システムクロックを高速から低速或いは低速から高速へと切り換えた場合、システムクロックの周波数は、その切換タイミングで即座に切り変わるわけではなく、ある時間幅の遅れ(ラグタイム)が生じる。そして、システムクロックを高速から低速に切り換えたときのラグタイムは、システムクロックを低速から高速に切り換えた場合に比べて著しく大きくなる。
【0006】
また、システムクロックの低速から高速への切り換えは、通常、マイクロコンピュータが制御用ソフトウェアに従い各種制御を停止している状態から制御を開始するときに行われることから、システムクロックの切り換えに遅れが生じても制御の開始が遅れるだけであり、制御に支承を来すことはないが、システムクロックの高速から低速への切り換えは、マイクロコンピュータが制御用ソフトウェアに従い各種制御を実行しているときに行われる可能性がある。
【0007】
そして、このように、マイクロコンピュータが制御用のソフトウェアに従い動作しているときに、システムクロックが高速から低速に切り換えられると、上記ラグタイムによって制御周期やタイミングに大きなずれを生じ、制御によっては、リアルタイム性を確保できなくなって、正常な制御を実行できなくなるのである。
【0008】
本発明は、こうした問題に鑑みなされたものであり、マイクロコンピュータの動作クロックをマイクロコンピュータの処理負荷に応じて切り換える装置において、動作クロックを、マイクロコンピュータが実行する制御処理に影響を与えることなく最適に切り換えることができるようにすることを目的とする。
【0009】
【課題を解決するための手段】
かかる目的を達成するためになされた請求項1に記載のマイクロコンピュータは、動作クロックに従って、複数のアプリケーション・プログラムの各々に基づく制御処理を実行するものであり、高速・低速のいずれかの動作クロックを生成可能であり、且つ、この動作クロックを停止することができる動作クロック生成手段と、複数のアプリケーション・プログラム、及び、これら複数のアプリケーション・プログラムそれぞれの制御状態を管理し動作クロックを切り換えるための状態管理用プログラムが記憶されている記憶手段と、状態管理用プログラムに基づき、各アプリケーション・プログラムの制御状態を監視して、動作クロックを高速・低速・停止の何れにするかを判断し、動作クロック生成手段に対して、高速・低速の設定、及び、動作クロックの生成・停止の制御を行うCPUと、を備えている。
そして、CPUは、マイクロコンピュータの起動後は、動作クロックを高速に設定し、高速の動作クロックに従ってマイクロコンピュータが高速動作しているときに、各アプリケーション・プログラムに基づく全ての制御処理が終了したと判断すると、マイクロコンピュータがスリープ状態から動作状態に復帰した際に低速動作するように動作クロックを低速に設定し、その後、マイクロコンピュータをスリープ状態に移行させるために動作クロックを停止させる。
【0010】
また、CPUは、予め設定されたウェイクアップ時間が経過するか、或いは、外部からウェイクアップ要求が入力されることによりマイクロコンピュータがスリープ状態から動作状態に復帰して低速動作しているとき、複数のアプリケーション・プログラムの何れかによる制御処理に移行すると判断した場合は、動作クロックを高速に設定する。
【0011】
そして、本発明のマイクロコンピュータにおいて、マイクロコンピュータの高速動作からの動作クロックの切換は、動作クロックを停止するスリープ状態への移行に制限されており、複数のアプリケーション・プログラムの何れかに基づく制御処理を実行している間は動作クロックを高速から低速に切り換えることはできない。
この結果、本発明のマイクロコンピュータによれば、マイクロコンピュータの起動後、或いは、スリープ状態からの復帰後に動作クロックが高速に設定された際には、その後、マイクロコンピュータにて実行すべき一連の処理が全て終了するまでの間、動作クロックが変化することはない。
【0012】
よって、本発明によれば、マイクロコンピュータが、制御用のソフトウェアである複数のアプリケーション・プログラムに基づく制御処理を実行しているときに、動作クロックの切り換えに伴い制御周期やタイミングにずれを生じて、安定した制御を実行できなくなるのを防止できる。
また、マイクロコンピュータがスリープ状態に移行するときには、マイクロコンピュータがスリープ状態から動作状態に復帰した際に低速動作するように、CPUが動作クロックを低速に設定し、その後、動作クロックを停止させるので、マイクロコンピュータのスリープ状態からの復帰時(ウェイクアップ時)には、マイクロコンピュータは低速動作する。そして、その後、CPUが、複数のアプリケーション・プログラムの何れかによる制御処理に移行すると判断したときにだけ、動作クロックを高速に切り換えるようにしているので、不要な電力消費を抑制し、また、マイクロコンピュータの発熱も抑制できる。
なお、請求項2に記載の発明は、請求項1に記載のマイクロコンピュータを、起動直後に初期化処理を実行するように構成し、動作クロック生成手段を、さらに、高速よりも遅い基準速度の動作クロックを生成可能に構成している。そして、CPUは、起動直後に初期化処理を実行する間は、動作クロックを基準速度に設定し、その後、動作クロックを高速に設定する制御を行い、基準速度の動作クロックは、初期化処理を実行している間でのみ使用されることを特徴としている。また、請求項3に記載の発明は、請求項1又は請求項2に記載のマイクロコンピュータを、自動車に搭載されて、自動車各部を制御するように構成したことを特徴としている。
【0013】
【発明の実施の形態】
以下に本発明の実施例を図面と共に説明する。
図1は、本発明が適用されたマイクロコンピュータ(以下単にマイコンという)10の構成を表すブロック図である。
【0014】
本実施例のマイコン10は、例えば、自動車に搭載されて、自動車各部を制御するために用いられるものであり、図1に示すように、予め設定された制御用のソフトウェアに従い各種制御処理を実行するCPU2,車両制御用のソフトウェアやCPU2が各種制御処理を実行するのに必要な各種データが予め記憶されたROM4、CPU2が各種制御処理を実行する際に用いるデータを一時的に格納するためのRAM6,制御対象となる自動車各部の状態や乗員からの指令を表す検出信号を入力すると共にCPU2での演算結果に応じた制御信号を各種アクチュエータ出力する入出力部8、を中心に構成されており、これら各部は、互いにバスラインにて接続されている。
【0015】
また、マイクロコンピュータ10には、自己の動作クロック(以下、システムクロックという)を生成する動作クロック生成回路として、外部の発振器20から入力される一定周波数F0の基準クロックをN分周する分周器12と、この分周器12にて分周されたクロックの周波数(=F0/N)をM倍に逓倍する逓倍器14とが備えられ、逓倍器14から出力される一定周波数F1(=F0×M/N)の信号をシステムクロックとしてマイクロコンピュータ0の内部回路(CPU2等)に供給するようにされている。
【0016】
そして、システムクロックの周波数F1を決定する分周器12の分周値N及び逓倍器14の逓倍値Mは、CPU2が後述の動作クロック設定用のプログラムを実行することにより切り換えられ、これによって、システムクロックの周波数F1が、例えば、F1=8MHzの基準速度から、F1=16MHzの高速、或いは、F1=4MHzの低速へと切り換えられる。また、分周器12又は逓倍器14は、CPU2側からその動作を停止させることにより、システムクロックを周波数F1=0の停止状態へと切り換えることができるようにされている。
【0017】
次に、ROM4に記憶された車両制御用のソフトウェアは、図2(a)に示すように、複数のアプリケーション(図に示すアプリA,アプリB,アプリC,アプリD,アプリE)から構成されている。また、ROM4には、CPU2がこれら各アプリケーションを実行することにより生じる各アプリケーション毎の制御状態を管理する状態管理部としての機能を実現する状態管理用プログラムも記憶されている。
【0018】
この状態管理部は、CPU2が状態管理用プログラムを定期的に実行することにより実現されるものであり、図2(b)に示すように、車両制御用の各アプリケーションを順に呼び出し、各アプリケーションから各種要求を取り込むことにより、各アプリケーションによる制御状態を検出すると共に、各アプリケーションに他のアプリケーションの現在の制御状態(現状態)を通知する。また、各アプリケーションは、状態管理部から呼び出しがあると、制御を開始するとか、制御を停止するというような制御状態を表す要求を出力し、更に、制御のための処理負荷が大きくなるのでシステムクロックを上げよというスピードアップ要求や、例えば、現在外部からの検出信号の入力待ちであるのでシステムクロックを停止させてスリープ状態に移行するのは禁止せよというようなスリープ禁止要求も出力する。
【0019】
この結果、各アプリケーション側では、マイコン10による全体の制御状態を把握して、自己の制御状態を切り換えることができ、状態管理部側では、各アプリケーションによる制御状態に基づき、現在マイコン10を高速動作させるべき状態か、低速動作させるべき状態か、或いはスリープ状態できる状態かを判断できる。そして、状態管理部では、こうした判断結果に従いシステムクロックを基準速度から高速、停止、低速の何れかに切り換える。
【0020】
つまり、状態管理部は、単に各アプリケーションによる制御状態を管理するだけでなく、システムクロックを制御状態に応じて切り換える。
そして、本実施例では、こうした状態管理部としての機能を実現する状態管理用プログラムは、システムクロックを、図3,図4に示す如く切り換えるように構成されている。以下、図3,図4を用いて状態管理部の動作を説明する。
【0021】
尚、図3はシステムクロックの変化を表す説明図であり、(a)は、システムクロックの遷移を表す状態遷移図、(b)はシステムクロックの時間的変化の一例を表すタイムチャートである。また、図4は、状態管理部としての機能を実現するためにCPU2が状態管理用プログラムに従い実行する処理を表すフローチャートである。
【0022】
まず、マイコン10に電源が投入された直後(パワーオンリセット時)やCPU2が再起動(リセット)された直後(CPUリセット時)には、分周器12の分周値や逓倍器14の逓倍値Mは初期値に設定されることから、システムクロックは周波数F1=8MHzの基準速度になり、CPU2は、システムクロックが基準速度の状態で、マイコン10内の各部(RAM6や入出力部8、或いは図示しないレジスタ等)を初期化する初期化処理を実行するが、図4に示すように、CPU2は、この初期化処理を実行しているとき(詳しくは初期化処理が終了する直前)に、S110(Sはステップを表す)にて、システムクロックが周波数F1=16MHzの高速となるように、分周器12の分周値及び逓倍器14の逓倍値Mを設定する。
【0023】
この結果、図3に示すように、CPU2が初期化処理を完了して、上記各アプリケーションを実行する通常の制御処理に移行する際には、システムクロックは高速に切り換えられ、CPU2は高速動作で、上記各アプリケーションに基づく制御処理を開始することになる。
【0024】
そして、CPU2が上記各アプリケーションに基づく制御処理を実行しているときには、図4に示すように、S120にて定期的に制御状態を監視し、S130にて、上記各アプリケーションに基づく全ての制御処理が一旦終了して制御待ち状態(つまりアイドル状態)になったか否かを判定する。
【0025】
そして、S130にて、全ての制御処理が終了したと判定されるまでは、上記S120及びS130の処理を繰り返し実行し、S130にて、全ての制御処理が終了したと判定されると(換言すればCPU2による制御処理がアイドル状態になると)、S140にて、システムクロックが周波数F1=4MHzの低速となるように、分周器12の分周値及び逓倍器14の逓倍値Mを設定し、続くS150にて、システムクロックを停止させることで、マイコン10をスリープ状態に切り換える。
【0026】
こうして、マイコン10がスリープ状態に入ると、予め設定されたウェイクアップ時間が経過するか、或いは、外部からウェイクアップ要求が入力されるまで、スリープ状態が継続し、予め設定されたウェイクアップ時間が経過するか、或いは、外部からウェイクアップ要求が入力されると、マイコン10は、図示しないウェイクアップ回路によって自動的に復帰(ウェイクアップ)する。
【0027】
そして、このときの分周器12の分周値N及び逓倍器14の逓倍値Mは、システムクロックが低速になるように設定されていることから、マイコン10のウェイクアップ時には、システムクロックは周波数F1=4MHzの低速になり、マイコン10は低速で動作することになる。
【0028】
次に、このようにマイコン10が動作を開始すると、上記各アプリケーションに基づく制御処理が起動されることから、マイコン10のウェイクアップ後には、S160にて、各アプリケーションに基づく制御処理からスピードアップ要求又はスリープ禁止要求がなされ、システムクロックを高速にする必要があるか否かを判定する。
【0029】
そして、S160にて、システムクロックを高速にする必要があると判断されると、S170にて、システムクロックが周波数F1=16MHzの高速となるように、分周器12の分周値及び逓倍器14の逓倍値Mを設定した後、上述のS120に移行し、逆に、S160にて、システムクロックを高速にする必要はないと判断されると、S150に移行して、マイコン10を再度スリープ状態に移行させる。
【0030】
この結果、マイコン10が一旦スリープ状態に入り、ウェイクアップしたときには、図3に示すように、マイコン10は低速で動作し、各アプリケーションによる制御処理が起動されるが、このとき、各制御処理が処理負荷の大きい通常制御に移行しなければ、再びスリープ状態に戻り、何れかの制御処理が処理負荷の大きい通常制御に移行するときにだけ、システムクロックが高速に切り換えられて、マイコン10が高速動作することになる。
【0031】
以上説明したように、本実施例のマイコン10においては、パワーオンリセット或いはCPUリセットによる起動後には、システムクロックが高速に設定されて、車両制御のための制御処理が高速で実行されるが、その後、各制御処理が一旦終了してアイドル状態になると、システムクロックが停止されて、マイコン10はスリープ状態となる。
【0032】
また、スリープ状態からの復帰時(ウェイクアップ時)には、システムクロックが低速に設定された状態で各制御処理が実行され、そのとき各制御処理からクロックアップの要求がなければ、再び、システムクロックが停止されて、スリープ状態に入り、クロックアップの要求があったときにだけ、システムクロックが高速に切り換えられる。
【0033】
よって、本実施例によれば、マイコン10が起動された直後には、各制御処理を高速に実行して、車両制御を速やかに開始することができると共に、スリープ状態からの復帰時(ウェイクアップ時)には、低速動作するので、不要な電力消費を抑制し、また、マイクロコンピュータの発熱も抑制できる。
【0034】
そして、特に、本実施例では、図3(a)から明らかなように、マイクロコンピュータが低速動作するのは、スリープ状態からの復帰時だけであり、システムクロックを高速から低速に切り換えることはないので、システムクロックの切り換えに伴い、各制御処理での制御周期やタイミングにずれを生じて、安定した車両制御を実行できなくなるのを防止することができる。
【0036】
以上、本発明の一実施例について説明したが、本発明は上記実施例に限定されるものではなく、種々の態様を採ることができる。
例えば、上記実施例では、マイコン10は車両制御のためのものであるとして説明したが、本発明は、車両制御に限らず、各種装置を制御するマイクロコンピュータであれば、上記実施例と同様に適用して、同様の効果を得ることができる。
【0037】
また、上記実施例では、CPU2が実行する制御用のソフトウェアは複数のアプリケーションからなり、システムクロックを高速・低速・停止に切り換えは、これら各アプリケーションによる制御状態を管理する状態管理部としての状態管理用プログラムをCPU2が実行することにより実現されるものとして説明したが、制御用のソフトウェアは一つであってもよく、また、システムクロックの切り換えについても、その制御用ソフトウェアをCPU2が実行することにより実現されるようにしてもよい。
【0038】
また、上記実施例では、システムクロックを生成する動作クロック生成回路はマイコン10に内蔵されており、しかも、その回路は、分周器12と逓倍器14とから構成されているものとして説明したが、動作クロック生成回路は、マイコン10とは別体で構成されていてもよく、また、分周器12又は逓倍器14だけで動作クロック生成回路を構成してもよい。
【図面の簡単な説明】
【図1】 実施例のマイクロコンピュータの概略構成を表すブロック図である。
【図2】 実施例のマイクロコンピュータにおいて実行されるソフトウェアの構造及び状態管理部の動作を説明する説明図である。
【図3】 CPUが状態管理部としてのプログラムを実行することにより変化するシステムクロックの状態を表す説明図である。
【図4】 CPUが実行する状態管理部としての処理を表すフローチャートである。
【符号の説明】
2…CPU、4…ROM、6…RAM、8…入出力部、10…マイクロコンピュータ(マイコン)、12…分周器、14…逓倍器、20…発振器。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an operation clock setting device that switches an operation clock of a microcomputer according to a processing load of the microcomputer.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, there has been known an operation clock setting device that switches an operation clock of a microcomputer according to a processing load of the microcomputer in order to reduce power consumption of the microcomputer or suppress heat generation.
[0003]
[Problems to be solved by the invention]
However, the conventional operation clock setting device, for example, as described in JP-A-6-124150, sets the operation clock at a high speed when the processing load of the microcomputer is large, and when the processing load is small. Since the operation clock was set to low speed, when the microcomputer operation clock was switched from high speed to low speed, the processing operation of the microcomputer was delayed and the control by the microcomputer was executed stably. There was a problem that it was impossible.
[0004]
In other words, a microcomputer is generally used for controlling various devices, and software for such control is controlled by a timer for measuring time in synchronization with an operation clock (so-called system clock) of the microcomputer. It is configured to determine the timing and perform arithmetic processing for control.
[0005]
On the other hand, when the system clock is switched from a high speed to a low speed or from a low speed to a high speed, the frequency of the system clock is not immediately switched at the switching timing, and a delay of a certain time width (lag time) occurs. The lag time when the system clock is switched from high speed to low speed is significantly larger than that when the system clock is switched from low speed to high speed.
[0006]
In addition, switching from the low speed to the high speed of the system clock is usually performed when the microcomputer starts control from a state in which various controls are stopped according to the control software, resulting in a delay in switching the system clock. However, the start of the control is only delayed, and there is no support for the control, but the system clock is switched from the high speed to the low speed when the microcomputer executes various controls according to the control software. There is a possibility that.
[0007]
And, as described above, when the system clock is switched from high speed to low speed when the microcomputer is operating according to the control software, a large shift occurs in the control cycle and timing due to the lag time, and depending on the control, Real-time performance cannot be ensured and normal control cannot be executed.
[0008]
The present invention has been made in view of these problems, and in an apparatus for switching the operation clock of a microcomputer according to the processing load of the microcomputer, the operation clock is optimal without affecting the control processing executed by the microcomputer. It is intended to be able to switch to.
[0009]
[Means for Solving the Problems]
The microcomputer according to
Then, after starting the microcomputer, the CPU sets the operation clock at a high speed, and when the microcomputer is operating at high speed according to the high-speed operation clock, all control processes based on each application program have been completed. When the determination is made, the operation clock is set to a low speed so that the microcomputer operates at a low speed when the microcomputer returns to the operation state from the sleep state, and then the operation clock is stopped to shift the microcomputer to the sleep state.
[0010]
Further, when the CPU is operating at a low speed when the preset wake-up time elapses or when the microcomputer returns from the sleep state to the operation state due to an external wake-up request being input, If it is determined to shift to the control processing by one of the application programs, the operation clock is set at a high speed.
[0011]
In the microcomputer of the present invention, switching of the operation clock from the high-speed operation of the microcomputer is limited to the transition to the sleep state in which the operation clock is stopped, and control processing based on any of a plurality of application programs The operation clock cannot be switched from the high speed to the low speed during execution.
As a result, according to the microcomputer of the present invention, after activation of the microcomputer, or when the operation clock after returning from the sleep state is set at high speed, then a series of processes to be executed by the microcomputer Until all the operations are completed, the operation clock does not change.
[0012]
Therefore, according to the present invention, when the microcomputer is executing control processing based on a plurality of application programs that are control software, a shift occurs in the control cycle and timing due to switching of the operation clock. Therefore, it is possible to prevent the stable control from being performed.
Also, when the microcomputer shifts to the sleep state, the CPU sets the operation clock to a low speed so that the microcomputer operates at a low speed when the microcomputer returns from the sleep state to the operation state, and then stops the operation clock. When the microcomputer returns from the sleep state (during wakeup), the microcomputer operates at a low speed. Thereafter, CPU is only when it is determined that the process proceeds to the control process according to any of the plurality of application programs, since the operation clock is to switch at high speed, to suppress unnecessary power consumption, also, micro Computer heat generation can also be suppressed.
According to a second aspect of the present invention, the microcomputer according to the first aspect is configured to execute an initialization process immediately after startup, and the operation clock generating means further includes a reference speed slower than a high speed. The operation clock can be generated. The CPU sets the operation clock to the reference speed during the initialization process immediately after startup, and then performs control to set the operation clock to a high speed. The operation clock at the reference speed performs the initialization process. It is characterized by being used only during execution. The invention described in claim 3 is characterized in that the microcomputer described in
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a microcomputer (hereinafter simply referred to as a microcomputer) 10 to which the present invention is applied.
[0014]
The
[0015]
Further, the
[0016]
Then, the frequency dividing value N of the frequency divider 12 and the frequency multiplying value M of the multiplier 14 that determine the frequency F1 of the system clock are switched by the
[0017]
Next, the vehicle control software stored in the
[0018]
This state management unit is realized by the
[0019]
As a result, each application side can grasp the overall control state by the
[0020]
That is, the state management unit not only manages the control state of each application, but also switches the system clock according to the control state .
In this embodiment, the state management program for realizing the function as the state management unit is configured to switch the system clock as shown in FIGS. Hereinafter, the operation of the state management unit will be described with reference to FIGS.
[0021]
FIG. 3 is an explanatory diagram showing changes in the system clock, (a) is a state transition diagram showing transitions of the system clock, and (b) is a time chart showing an example of temporal changes in the system clock. FIG. 4 is a flowchart showing processing executed by the
[0022]
First, immediately after the power is turned on to the microcomputer 10 (at power-on reset) and immediately after the
[0023]
As a result, as shown in FIG. 3, when the
[0024]
Then, when the
[0025]
The process of S120 and S130 is repeatedly executed until it is determined in S130 that all the control processes are completed, and if it is determined in S130 that all the control processes are completed (in other words, When the control process by the
[0026]
Thus, when the
[0027]
At this time, the frequency division value N of the frequency divider 12 and the frequency multiplication value M of the multiplier 14 are set so that the system clock becomes low speed. F1 = 4 MHz, and the
[0028]
Next, when the
[0029]
If it is determined in S160 that it is necessary to increase the system clock speed, in S170, the frequency division value and the multiplier of the frequency divider 12 are set so that the system clock becomes a high speed of frequency F1 = 16 MHz. After the multiplication value M of 14 is set, the process proceeds to S120 described above. Conversely, if it is determined in S160 that the system clock does not need to be increased, the process proceeds to S150 and the
[0030]
As a result, when the
[0031]
As described above, in the
[0032]
Also, when returning from the sleep state (wakeup), each control process is executed with the system clock set to a low speed, and if there is no clock-up request from each control process at that time, the system again The system clock is switched at high speed only when the clock is stopped, the sleep state is entered, and a clock up request is made.
[0033]
Therefore, according to the present embodiment, immediately after the
[0034]
In particular, in this embodiment, as is apparent from FIG. 3A, the microcomputer operates at low speed only when returning from the sleep state, and the system clock is not switched from high speed to low speed. Therefore, it is possible to prevent the vehicle from being unable to perform stable vehicle control due to a shift in the control cycle or timing in each control process as the system clock is switched.
[0036]
As mentioned above, although one Example of this invention was described, this invention is not limited to the said Example, A various aspect can be taken.
For example, in the above-described embodiment, the
[0037]
In the above embodiment, the control software executed by the
[0038]
In the above embodiment, the operation clock generation circuit for generating the system clock is built in the
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a schematic configuration of a microcomputer according to an embodiment.
FIG. 2 is an explanatory diagram illustrating the structure of software executed by the microcomputer according to the embodiment and the operation of the state management unit.
FIG. 3 is an explanatory diagram showing a state of a system clock that changes when a CPU executes a program as a state management unit.
FIG. 4 is a flowchart showing processing as a state management unit executed by a CPU.
[Explanation of symbols]
2 ... CPU, 4 ... ROM, 6 ... RAM, 8 ... input / output unit, 10 ... microcomputer, 12 ... frequency divider, 14 ... multiplier, 20 ... oscillator.
Claims (3)
高速・低速のいずれかの前記動作クロックを生成可能であり、且つ、前記動作クロックを停止することができる動作クロック生成手段と、 An operation clock generating means capable of generating either the high-speed or low-speed operation clock and capable of stopping the operation clock;
前記複数のアプリケーション・プログラム、及び、前記複数のアプリケーション・プログラムそれぞれの制御状態を管理し前記動作クロックを切り換えるための状態管理用プログラムが記憶されている記憶手段と、 Storage means for storing the plurality of application programs, and a state management program for managing the control state of each of the plurality of application programs and switching the operation clock;
前記状態管理用プログラムに基づき、各アプリケーション・プログラムの制御状態を監視して、前記動作クロックを高速・低速・停止の何れにするかを判断し、前記動作クロック生成手段に対して、高速・低速の設定、及び、動作クロックの生成・停止の制御を行うCPUと、 Based on the state management program, the control state of each application program is monitored to determine whether the operation clock is high speed, low speed, or stopped. CPU that controls the setting and generation / stop of the operation clock,
を備え、 With
前記CPUは、 The CPU
マイクロコンピュータの起動後は、前記動作クロックを高速に設定し、 After starting up the microcomputer, set the operating clock at high speed,
高速の前記動作クロックに従ってマイクロコンピュータが高速動作しているときに、各アプリケーション・プログラムに基づく全ての制御処理が終了したと判断すると、マイクロコンピュータがスリープ状態から動作状態に復帰した際に低速動作するように前記動作クロックを低速に設定し、その後、マイクロコンピュータを前記スリープ状態に移行させるために前記動作クロックを停止させ、 When the microcomputer is operating at high speed according to the high-speed operation clock, if it is determined that all control processing based on each application program has been completed, the microcomputer operates at low speed when the microcomputer returns from the sleep state to the operating state. The operation clock is set to low speed, and then the operation clock is stopped to shift the microcomputer to the sleep state,
予め設定されたウェイクアップ時間が経過するか、或いは、外部からウェイクアップ要求が入力されることによりマイクロコンピュータが前記スリープ状態から前記動作状態に復帰して低速動作しているとき、前記複数のアプリケーション・プログラムの何れかによる制御処理に移行すると判断した場合は、前記動作クロックを高速に設定する制御を行っており、 When the preset wake-up time elapses or when the microcomputer returns to the operation state from the sleep state and receives a wake-up request from the outside, the plurality of applications -If it is determined that the control process is to be shifted to one of the programs, control is performed to set the operation clock at a high speed.
前記複数のアプリケーション・プログラムの何れかに基づく制御処理を実行している間は前記動作クロックを高速から低速に切り換えることはできないことを特徴としたマイクロコンピュータ。 A microcomputer in which the operation clock cannot be switched from a high speed to a low speed while a control process based on any one of the plurality of application programs is being executed.
前記動作クロック生成手段は、さらに、前記高速よりも遅い基準速度の動作クロックを生成可能であり、 The operation clock generation means can further generate an operation clock having a reference speed slower than the high speed,
前記CPUは、起動直後に初期化処理を実行する間は、前記動作クロックを前記基準速度に設定し、その後、前記動作クロックを高速に設定する制御を行っており、 The CPU sets the operation clock to the reference speed while executing the initialization process immediately after startup, and then performs control to set the operation clock at a high speed.
前記基準速度の動作クロックは、前記初期化処理を実行している間でのみ使用されることを特徴とする請求項1に記載のマイクロコンピュータ。 2. The microcomputer according to claim 1, wherein the operation clock at the reference speed is used only while the initialization process is being executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000234299A JP3758477B2 (en) | 2000-08-02 | 2000-08-02 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000234299A JP3758477B2 (en) | 2000-08-02 | 2000-08-02 | Microcomputer |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002049610A JP2002049610A (en) | 2002-02-15 |
JP3758477B2 true JP3758477B2 (en) | 2006-03-22 |
Family
ID=18726686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000234299A Expired - Lifetime JP3758477B2 (en) | 2000-08-02 | 2000-08-02 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3758477B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10203740B2 (en) | 2013-09-24 | 2019-02-12 | Toshiba Memory Corporation | Information processing device and semiconductor device |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101136036B1 (en) * | 2003-12-24 | 2012-04-18 | 삼성전자주식회사 | Processor system and method for reducing power consumption in idle mode |
JP2005291778A (en) * | 2004-03-31 | 2005-10-20 | Nohmi Bosai Ltd | Flame sensor |
JP2012109967A (en) * | 2011-11-09 | 2012-06-07 | Canon Inc | Communication device |
JP5665777B2 (en) | 2012-01-20 | 2015-02-04 | 株式会社東芝 | Control device, system and program |
JP2020149317A (en) * | 2019-03-13 | 2020-09-17 | 株式会社デンソー | Vehicle device |
-
2000
- 2000-08-02 JP JP2000234299A patent/JP3758477B2/en not_active Expired - Lifetime
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10203740B2 (en) | 2013-09-24 | 2019-02-12 | Toshiba Memory Corporation | Information processing device and semiconductor device |
Also Published As
Publication number | Publication date |
---|---|
JP2002049610A (en) | 2002-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20130067258A1 (en) | Data processor and electronic control unit | |
JP2003029886A (en) | Operating system, program and electronic controller for vehicle | |
US20230113657A1 (en) | Preemptive wakeup circuit for wakeup from low power modes | |
JPH11312026A (en) | Clock signal switching method and system therefor | |
GB2487945A (en) | Motor Vehicle Shutdown Control | |
JP3758477B2 (en) | Microcomputer | |
JPH0854954A (en) | Integrated circuit provided with power saving function | |
JP2008102830A (en) | Microcomputer, program and electronic control device for vehicle | |
JP2001043098A (en) | Operating system and virtual computer system | |
JP2008107914A (en) | Microcomputer, program and electronic control device for vehicle | |
JP5324340B2 (en) | Microcomputer | |
JPH0844594A (en) | Data processor | |
JP3711849B2 (en) | Microcomputer | |
JP2010097427A (en) | Processing apparatus, processing method and computer program | |
JP4219601B2 (en) | Information processing device | |
JP3736348B2 (en) | Single-chip microcomputer that can control output signal with timer | |
JP7318439B2 (en) | electronic controller | |
JP2004234463A (en) | A/d conversion data input system | |
JP3925150B2 (en) | Microcomputer and electronic control device for vehicle | |
JP5682783B2 (en) | Signal input circuit | |
JPH11345129A (en) | Interval timer circuit | |
JP2023097977A (en) | Electronic control device | |
JPH0689130A (en) | State monitoring method and power saving controller | |
JPS61122733A (en) | Microprocessor device | |
CN116009678A (en) | Clock switching method and switching circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20041005 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041206 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050920 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051118 |
|
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: 20051213 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20051226 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 3758477 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100113 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110113 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120113 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130113 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140113 Year of fee payment: 8 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |