JP2013109559A - Information processor and data return method - Google Patents
Information processor and data return method Download PDFInfo
- Publication number
- JP2013109559A JP2013109559A JP2011253703A JP2011253703A JP2013109559A JP 2013109559 A JP2013109559 A JP 2013109559A JP 2011253703 A JP2011253703 A JP 2011253703A JP 2011253703 A JP2011253703 A JP 2011253703A JP 2013109559 A JP2013109559 A JP 2013109559A
- Authority
- JP
- Japan
- Prior art keywords
- data
- operation mode
- clock
- storage means
- processing apparatus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
Description
本発明は、プログラムを実行する実行モードと実行モードよりも消費電力を低減する省電力モードを有する情報処理装置に関する。 The present invention relates to an information processing apparatus having an execution mode for executing a program and a power saving mode for reducing power consumption compared to the execution mode.
多くのマイコンは、一定条件下で一部の回路の動作を停止したり動作クロックを低減するスリープモードを備える。スリープモードでは、ウェイクアップ処理などに必要な回路を残して他の回路への動作クロックや電源供給が遮断されることで、消費電力が低減される。 Many microcomputers have a sleep mode in which the operation of some circuits is stopped under a certain condition and the operation clock is reduced. In the sleep mode, power consumption is reduced by cutting off operation clocks and power supply to other circuits while leaving a circuit necessary for wake-up processing or the like.
しかしながら、半導体の製造プロセスの微細化が進むと、電源供給されていない回路に電流が流れるリーク電流が消費電力の低減を阻害するようになってきた。 However, as the semiconductor manufacturing process becomes finer, a leakage current that flows through a circuit that is not supplied with power has hindered reduction in power consumption.
図1は、マイコンのリーク電流を説明する図の一例である。スリープモードに入る前の通常動作モードでは、レジスタ、CPU、RAM、CANコントローラ、A/Dコンバータ、及び、タイマに動作クロックと電源が供給される(斜線の回路)。マイコンがスリープモードに入ると、レジスタ、CPU、及び、RAMを残して他の回路への動作クロックと電源の供給が停止される。この場合、レジスタ、CPU、及び、RAMの間でのみ電流が流れるはずだが、製造プロセスによっては動作が停止している回路に電流が漏れ出す場合がある。 FIG. 1 is an example of a diagram for explaining leakage current of a microcomputer. In the normal operation mode before entering the sleep mode, an operation clock and power are supplied to the register, CPU, RAM, CAN controller, A / D converter, and timer (shaded circuit). When the microcomputer enters the sleep mode, supply of the operation clock and power to other circuits is stopped, leaving the register, CPU, and RAM. In this case, a current should flow only between the register, the CPU, and the RAM, but the current may leak to a circuit whose operation is stopped depending on the manufacturing process.
このような電流のリークは、レジスタやRAMがCPU以外の回路と接続されており、マイコン内の他の回路同士を接続する電線がレジスタやRAMと密接しているため、レジスタやRAMへ電源が供給されるとその電流が電線に漏れるために生じると考えられる。 Such a current leak occurs because the register and RAM are connected to a circuit other than the CPU, and the wires connecting the other circuits in the microcomputer are in close contact with the register and RAM. When supplied, the current is considered to be leaked to the electric wire.
そこで、スリープ時のリーク電流を低減する技術が考えられている(例えば、特許文献1参照。)。特許文献1には、第1,第2ブロックを異なる製造プロセスにより製造し、スリープ時、第2ブロックは、第2ブロックよりもリーク電流量を低減可能な製造プロセスで作成された第1ブロックに保持が必要なデータを転送するマイコンが開示されている。第1ブロックはリーク電流が発生しにくいので、スリープ時のリーク電流を低減できる。 Therefore, a technique for reducing the leakage current during sleep has been considered (see, for example, Patent Document 1). In Patent Document 1, the first and second blocks are manufactured by different manufacturing processes, and at the time of sleep, the second block is a first block created by a manufacturing process capable of reducing the amount of leakage current compared to the second block. A microcomputer for transferring data that needs to be retained is disclosed. Since the first block hardly generates a leak current, the leak current during sleep can be reduced.
しかしながら、特許文献1に開示されているように、マイコンの回路を異なる製造プロセスで製造することは、1つのマイコンが異なる製造プロセスで製造されることを意味する。このため、製造プロセスの微細化によるコスト低減効果を小さくしてしまうという問題がある。 However, as disclosed in Patent Document 1, manufacturing a microcomputer circuit by a different manufacturing process means that one microcomputer is manufactured by a different manufacturing process. For this reason, there exists a problem of reducing the cost reduction effect by refinement | miniaturization of a manufacturing process.
本発明は、上記課題に鑑み、製造プロセスの影響を抑制してスリープ時の消費電力を低減できる情報処理装置を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide an information processing apparatus capable of reducing power consumption during sleep by suppressing the influence of a manufacturing process.
本発明は、第1の動作モード中に作業用記憶手段に作成されたデータを、第2の動作モード中に保持する退避データ記憶手段を有する情報処理装置であって、第2の動作モードの動作クロックと、第2の動作モードの動作クロックよりも大きい第1の動作モードの動作クロックとを生成するクロック生成手段と、第2の動作モードから復帰する際、前記クロック生成手段が第1の動作モードの動作クロックに上昇させる前に、当該情報処理装置の状態を示す情報処理装置ステータスデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させる第1のデータ復帰手段と、前記クロック生成手段が第1の動作モードの動作クロックに上昇させた後、第1の動作モード中に作成されたデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させる第2のデータ復帰手段と、を有することを特徴とする。 The present invention is an information processing apparatus having save data storage means for holding data created in the work storage means during the first operation mode during the second operation mode, A clock generating means for generating an operating clock and an operating clock for the first operating mode that is larger than the operating clock for the second operating mode; and when returning from the second operating mode, the clock generating means A first data return means for returning information processing apparatus status data indicating the state of the information processing apparatus from the saved data storage means to the working storage means before raising the operation clock to the operation mode; After the means is raised to the operation clock of the first operation mode, the data created during the first operation mode is stored from the saved data storage means to the working memory. And having a second data restoring means for restoring the stage, the.
製造プロセスの影響を抑制してスリープ時の消費電力を低減できる情報処理装置を提供することができる。 It is possible to provide an information processing apparatus that can reduce the power consumption during sleep by suppressing the influence of the manufacturing process.
以下、本発明を実施するための形態について図面を参照しながら実施例を挙げて説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
図2は、本実施例のマイコンの特徴部を概略的に説明する図の一例である。図はスリープ状態のマイコン100を示し、斜線部のブロック(図ではCPU)に電源とクロックが供給されている。
FIG. 2 is an example of a diagram schematically illustrating a characteristic part of the microcomputer according to the present embodiment. The figure shows the
本実施例のマイコン100は新たにスリープ中にレジスタ11やRAM13のデータを保持しておくバックアップRAM17を有している。バックアップRAM17は、CPU12とのみ接続されている。換言すると、CPU12と1対1で接続されており、CPU12のみがバックアップRAM17にアクセスすることができる。
The
スリープ前にレジスタ11とRAM13のデータはバックアップRAM17に退避されているので、スリープ中、電源と動作クロックをレジスタ11、RAM13、及び、バックアップRAM17(バックアップRAMが不揮発メモリの場合)へ供給する必要はない。このため、従来と比べてスリープ中の消費電力を大きく低減できる。
Since the data in the
また、バックアップRAM17は他の回路と同様の製造プロセス(例えば、90nm以下)で作成されている。マイコン100の全体を同じ製造プロセスで製造できるのでコストを低減しやすい。また、バックアップRAM17はCPU以外の回路と接続されていないので、製造プロセスが微細でもスリープ中のリーク電流を大きく低減できる。すなわち、バックアップRAM17が揮発性メモリの場合、スリープ中、CPU12とバックアップRAM17に電源とクロックが供給される。しかし、バックアップRAM17はCPU12としか接続されていないので、バックアップRAM17から他の回路に電流がリークすることがほとんど生じない。したがって、バックアップRAM17が揮発性メモリでもスリープ中の消費電力を低減できる。
Further, the
〔構成例〕
図2のマイコン100について説明する。マイコン100は、レジスタ11、CPU12、RAM13、CANコントローラ14、A/Dコンバータ15、タイマ16、及び、バックアップRAM17を有する。また、スリープモードと関係する発振器18、メインクロック発生回路19、PLL回路20、及び、電源回路21を図示した。この他、プログラムを記憶したROM、キャッシュメモリ、DMAC、割り込みコントローラ、IP(マイコンによって異なるが、例えばDSP、画像処理回路)等は省略した。
[Configuration example]
The
CPU12は、レジスタ11、RAM13、CANコントローラ14、A/Dコンバータ15、及び、タイマ16とメインバスや周辺バスを介して接続されている。また、レジスタ11とRAM13も、CANコントローラ14、A/Dコンバータ15、及び、タイマ16からアクセスされるため、これらの回路と接続されている。これに対し、バックアップRAM17はCPU12とのみ接続されている。
The
なお、CPU12は不図示のROMに記憶されたプログラムを実行して、目的とする演算結果が得られるように他の回路を制御する。レジスタ11には、CPU12が演算に使用する値が格納された汎用レジスタ、次に実行する命令のアドレスを記憶するプログラムカウンタ、マイコン100の状態を示すマイコンステータスレジスタ、割り込み制御レジスタ、その他、各種のレジスタが含まれる。RAM13は、プログラムの実行途中のデータやルックアップ用データ等が記憶される作業メモリである。マイコン100によってはプログラムをRAM13にコピーしてから実行される場合がある。CANコントローラ14は、CANバスを介して接続された他のマイコン(例えば、ECU:Electronic Control Unit)と通信するための通信装置である。CANコントローラ14はCPU12からの指示によりCANフレームを生成しCANバス上に送信する。また、CANバス上を流れるCANフレームを監視しCAN IDに応じて受信すると共にCPU12に通知する。A/Dコンバータ15は、センサ等が検出したアナログ値をデジタルデータに変換してRAM13に記憶させCPU12に通知する。タイマ16は、CPU12が設定した時間の経過をCPU12に通知する。タイマ16には例えばWDTがある。なお、これらの周辺回路はCPU12との通信にレジスタ11やRAM13を使用するようになっている。
The
バックアップRAM17は不揮発メモリとして説明するが、揮発性メモリでもよい。不揮発メモリであれば、例えば、フラッシュメモリ、磁気抵抗RAM(MRAM)、強誘電体メモリ(FeRAM)、PCM(相変化メモリ)、ReRAM(抵抗変化型メモリ)などを記憶素子に採用できる。揮発性メモリであれば、SRAM、SDRAM、DRAMなどを記憶素子に採用できる。バックアップRAM17はCPU12と対であるが、複数のコアを備えたマルチコアプロセッサの場合、マルチコアプロセッサに1つのバックアップRAM17を配置してもよいし、コア毎に1つのバックアップRAM17を配置してもよい。コア毎にバックアップRAM17を設ければ、コア単位のスリープが可能になり、マルチコアプロセッサに1つのバックアップRAM17を設ければコスト低減が容易になる。
The
本実施例のマイコン100は、主に車両のECUに搭載されることを想定している。車載されるECUには、その主要な機能により、エンジンECU、ブレーキECU、ボディECU、ナビゲーションECU(AV・情報処理ECU)、ゲートウェイECU等がある。本実施例のマイコン100はECUの機能の違いに影響されず搭載されることが可能である。
It is assumed that the
マイコン100の消費電力は、およそ動作クロックに比例しかつ電圧の二乗に比例すると言われている。したがって、スリープ時には動作クロックと電圧を低減することが有効であるが、いずれか一方のみを低減してもよい。
The power consumption of the
動作クロックは、発振器18、メインクロック発生回路19及びPLL回路20により生成される。発振器18は例えば基準クロックを生成する水晶振動子であり、メインクロック発生回路19は基準クロックを指示された周波数に低倍する回路、PLL回路20は指示された分周比によりメインクロックをPLLクロックまで増大させる回路である。CPU12は、起動時及びウェイクアップ時に所定のレジスタ11に周波数の指示値を設定することで、メインクロックとPLLクロックを制御する。なお、メインクロックとPLLクロックが固定のマイコン100もあり、この場合、CPU12が周波数を制御しなくてもよい。
The operation clock is generated by the
電源回路21は、バッテリ電圧を降圧して、いくつかの回路グループ毎に数種類の電源電圧を生成しCPU等の回路に供給する。電源回路21は、少なくともグループ毎に電源をON/OFFすることができる。
The
CPU12は、スリープモードに移行する場合、スリープモード用の動作クロックの指示値をメインクロック発生回路19とPLL回路20に設定すると共に、電源回路21にCPU以外の電源をOFFにするよう要求する。こうすることで、スリープモード時、クロック周波数は通常動作モード(スリープモード以外の動作モードを通常動作モードという)よりも低減され、電源が供給される回路もCPU12のみに制限できる。スリープモード時の動作クロックは基準クロック程度とする。なお、メインクロックやPLLクロックの指示値を変えることで、スリープモード及び通常動作モードの動作クロックを可変にすることができる。
When shifting to the sleep mode, the
図3(a)は、バックアップRAM17が不揮発メモリの場合の電源供給状態の一例を示す。斜線部が、電源が供給されている回路を示す。左側は通常動作モードの電源供給状態を示すが、図3(a)では全ての回路に電源が供給されている。また、右側はスリープモードの電源供給状態を示すが、CPU12を除き電源が供給されてない。このように、CPU以外の回路の電源をOFFにすることでスリープ中の消費電力を低減できる。
FIG. 3A shows an example of a power supply state when the
図3(b)は、バックアップRAM17が揮発性メモリの場合の電源供給状態を示す。同様に左側は通常動作モードの電源供給状態を示す。また、右側はスリープモードの電源供給状態を示すが、CPU12とバックアップRAM17に電源が供給されている。バックアップRAM17に電源が供給されても、レジスタ11とRAM13に電源が供給されるようは消費電力を低減できる。仮に消費電力の低減効果が小さくても、CPU12とのみ接続されたバックアップRAM17はスリープ中のリーク電流が小さいので、従来よりもスリープ中の消費電力を低減できる。
FIG. 3B shows a power supply state when the
〔スリープモードへの移行〕
図4は、マイコン100の機能ブロック図の一例を示す。マイコン100はECUに必要な制御や処理のために固有の処理を行うタスクA31(以下、単にタスクAという)、タスクB32(以下、単にタスクBという)、マイコン100の状態を判定する状態判定部33、電源回路21を制御する電源回路制御部34、スリープ処理を行うスリープモード実行部35、及び、ウェイクアップ処理を行うウェイクアップ実行部41を有している。各機能ブロックは、CPU12がハードウェアと協働しながらプログラムを実行することで実現される。
[Transition to sleep mode]
FIG. 4 shows an example of a functional block diagram of the
OSや基本ソフトなどのタスク管理機能はタスクの優先順位にしたがって、CPU12に割り当てるタスクを切り替える。タスク管理機能は、例えば、1つのタスクが終わる毎又は定期的にタスクのスケジューリングを行い、例えば、タスクA,タスクB及び状態判定部33がそれぞれ所定の頻度で実行されるようにタスクを実行する。
A task management function such as an OS or basic software switches tasks assigned to the
状態判定部33は、タスクA、タスクBの実行状態を確認しスリープモードに移行するか否かを判定する。例えば、タスクA、タスクBが最後に実行された時間を記録しておき、所定時間が経過したことによりスリープモードに移行すると判定してもよいし、タスクA及びタスクBがそれぞれ生成したスリープモード移行要求の有無を判定してもよい。また、さらに他のマイコン100からスリープへの移行許可を取得したか否かを判定してもよい。
The
状態判定部33がスリープモードに移行すると判定すると、スリープモード実行部35がスリープモードへの移行処理を行う。スリープモード実行部35は、データ退避部36、及び、動作クロック設定部37を有する。データ退避部36は、レジスタ11とRAM13のデータをバックアップRAM17に退避する。また、退避が終了すると、スリープモード実行部35は、動作クロック設定部37にスリープモード用の動作クロックを設定させ、また、電源回路制御部34に電源制御を要求する。これにより、マイコン100はスリープモードに移行する。
When the
ウェイクアップ実行部41は、マイコン100をウェイクアップさせるイベントが生じると実行が開始される。このようなイベントには様々なものがありまたマイコン100によって異なるが、例えば、所定の部品のスイッチオン、CAN通信の開始、一定時間の経過、等が挙げられる。また、ウェイクアップ実行部41はマイコン100が、IG−ON(ハイブリッド車や電気自動車ではメインシステムのスイッチがONとなることをいう)等によりリセットされた場合も実行が開始される。
The wake-up
イベントの発生は、スリープモード中の例えばタスク管理機能が定期的に特定のレジスタ11を参照することで検出する。イベントの発生を検出したタスク管理機能はウェイクアップ実行部41をCPU12に割り当てる。マイコンがリセットされた場合、マイコン100はスリープモードからの復帰でなく通常起動するので、リセット割込みによりCPU12は所定のアドレスの命令を実行することでウェイクアップ実行部41の実行を開始する。
The occurrence of an event is detected by, for example, the task management function in the sleep mode periodically referring to a
ウェイクアップ実行部41は、第1データ復帰部41、ウェイクアップ要因判定部43、ウェイクアップブートフック部44、及び、第2データ復帰部46を有する。第1データ復帰部41は後述するデータ復帰処理Aを行い、第2データ復帰部46は後述するデータ復帰処理Bを行う。ウェイクアップ要因判定部43は、ウェイクアップの要因がスリープモードから復帰したためのウェイクアップか、そうでないかを判定する。この判定を行うのは、本実施例のマイコン100はスリープモードからの復帰が、リセットからの復帰として扱われるため、ソフト的にスリープモードからの復帰か、リセットによる起動かを区別する必要があるためである。スリープモードからの復帰か、リセットからの起動かによって初期処理が変わってくる。例えば、スリープモードからの復帰でない場合、バックアップRAM17からのデータ復帰も不要になる。
The
ウェイクアップブートフック部44は、ウェイクアップ時のフック処理(プログラムの特定の箇所で呼び出される処理)を行う。本実施例では代表的な処理として動作クロック設定部45が動作クロックを上昇させるものとする。
The wake-up
図5は、マイコン100の動作モードの遷移を説明するフローチャート図の一例である。図5の手順はマイコン100が起動するとスタートする。
FIG. 5 is an example of a flowchart for explaining the transition of the operation mode of the
起動後、まず、ウェイクアップ実行部41がウェイクアップブート処理を行う(S10)。ウェイクアップブート処理については実施例2にて説明する。ウェイクアップブート処理には、リセットからの起動処理とスリープモードからの復帰処理が含まれている。
After startup, first, the
ウェイクアップ実行部41は、ウェイクアップブート処理を完了するとプログラムを実行する(S20)。このプログラムは、例えばmain関数の開始を意味し(C言語の場合)、以降、main関数が繰り返し実行される。上記のタスクA、B、状態判定部33はmain関数から実行される関数やルーチンなどである。
When the
状態判定部33は、例えば定期的にスリープ条件が成立したか否かを判定する(S30)。スリープ条件が成立しない場合(S30のNo)、CPU12は継続的にプログラムを実行する。
The
スリープ条件が成立した場合(S30のYes)、スリープモード実行部35はスリープモードへの移行処理を行う(S40)。まず、スリープモード実行部35はマイコンステータスレジスタにスリープモードへ移行したことを記録する。具体的には、マイコンステータスレジスタのスリープ検出リセットフラグを”1”に設定する。したがって、ウェイクアップ時にはCPU12がバックアップRAM17からマイコンステータスレジスタを読み出すことで、スリープモードからの復帰か、リセットからの起動かを判定できる。なお、フラグの“1”“0”がフラグのON/OFFのどちらを示すかは設計事項である。
When the sleep condition is satisfied (Yes in S30), the sleep
また、マイコンステータスレジスタには、この他、リセット原因を示すフラグが含まれている。リセット原因には、IG−ON、異常の発生やWDTによる外部リセット、バッテリ低電圧、内部低電圧などがある。 In addition, the microcomputer status register includes a flag indicating the cause of reset. Causes of reset include IG-ON, occurrence of abnormality or external reset by WDT, battery low voltage, internal low voltage, and the like.
データ退避部36は、RAM13のデータを予め決まったセクション毎にバックアップRAM17に退避する。セクションとは、RAM13やバックアップRAM17の領域(アドレス範囲)やブロックであり、重複しないセクション名を指定することで、バックアップRAM17とRAM13の領域を指定できる。また、データ退避部36は、レジスタ名を指定して全てのレジスタ11のデータをバックアップRAM17に退避する。バックアップRAM17のどのセクションに、RAM13及びレジスタ11のデータが記憶されているかは、第1データ復帰部41と第2データ復帰部46にとって明らかになっている。退避されるレジスタ11の1つにはマイコンステータスレジスタも含まれる。
The
なお、RAM13については全領域のデータをバックアップRAM17に退避しなくてもよい。復帰後にプログラムが必要とするデータは、タスクA、Bなどのプログラムが作成したデータや制御を最適化するためのパラメータなどである。このような演算により得られたデータのみを退避することで、退避時間も復帰時間も短縮できる。この場合、データ退避部36は予め指定されたセクション名や変数名のみをRAM13から退避するなどして、退避するデータを選択する。
Note that the
データの退避後、動作クロック設定部37は動作クロックを低減し、電源回路制御部34がCPU12以外の回路への電源をOFFにする。これにより、マイコン100はスリープモードに移行する。
After saving the data, the operation
スリープモードに移行すると、CPU12はウェイクアップのイベントが検出されるまで待機する(S50)。そして、ウェイクアップのイベントが検出されると(S50のYes)、ステップS10のウェイクアップブート処理が実行される。
After shifting to the sleep mode, the
以上説明したように、本実施例のマイコン100は、CPU12とのみ接続されたバックアップRAM17にデータを退避するので、レジスタ11とRAM13の電源をOFFにでき、また、リーク電流を低減できるのでスリープモード中の消費電力を低減できる。
As described above, the
実施例1では、バックアップRAM17をマイコン100に設けた。しかし、このようなマイコン100では、ウェイクアップ時にバックアップRAM17からレジスタ11やRAM13へのデータの復帰処理が必要になるため、ウェイクアップを開始してからタスクA,Bなどの実行が開始されるまでの時間が長くなるおそれがある。そこで、本実施例では、バックアップRAM17を備えたマイコン100のウェイクアップ時間を短縮するウェイクアップ方法について説明する。
In the first embodiment, the
図6は、本実施例のウェイクアップ手順を模式的に説明する図の一例である。図6では時間の経過順に、マイコン起動、レジスタ初期化、「データ復帰処理A(ウェイクアップ判断)」、ウェイクアップブートフック、メインクロック発振設定、メインクロック発振安定待ち、PLLクロック発振設定、PLLクロック発振安定待ち、「データ復帰処理B」となっている。このうち、「データ復帰処理A(ウェイクアップ判断)」と「データ復帰処理B」がバックアップRAM17を搭載したことによる処理である。
FIG. 6 is an example of a diagram for schematically explaining the wake-up procedure of the present embodiment. In FIG. 6, in order of time, microcomputer activation, register initialization, “data recovery process A (wakeup determination)”, wakeup boothook, main clock oscillation setting, main clock oscillation stabilization wait, PLL clock oscillation setting, PLL clock Waiting for oscillation stabilization, “Data recovery process B”. Among these, “data restoration processing A (wakeup determination)” and “data restoration processing B” are processing due to the installation of the
図示するように、ウェイクアップ時は動作クロックの発振や安定に時間がかかる。マイコン100によって大きく異なるが、図では、CRクロック発振期間(500〜750kHz程度)、メインクロック発振期間(1M〜4MHz程度)、PLLクロック発振期間(8M〜128MHz)のように徐々に動作クロックが上昇する。なお、3段階に動作クロックが上昇するとは限らず、上昇時の動作クロックのステップ数はマイコン100に依存する。また、CRクロックはスリープモード中の動作クロックである。
As shown in the figure, it takes time to oscillate and stabilize the operation clock during wakeup. Although it varies greatly depending on the
したがって、動作クロックの低いうちに処理を開始すれば、バックアップRAM17を搭載したことによる復帰時間の増大を、動作クロックの発振・安定時間である程度吸収することができる。「データ復帰処理A(ウェイクアップ判断)」及び「データ復帰処理B」をどのタイミングで実行するかは適宜設計できる。本実施例では、動作クロックが最も低いスリープ中のCRクロックのまま「データ復帰処理A(ウェイクアップ判断)」を行い、最も高いPLLクロックに安定したら「データ復帰処理B」を実行するものとする。「データ復帰処理A」では必要最小限のデータのみを復帰させ、大部分のデータを「データ復帰処理B」で復帰させるのでウェイクアップ時間の遅延を最小限にすることができる。
Therefore, if the processing is started while the operation clock is low, the increase in the recovery time due to the mounting of the
なお、動作クロックがCRクロックのまま「データ復帰処理B」を開始してもよい。また、メインクロックに安定した段階で「データ復帰処理A」を開始し、PLLクロックに安定したら「データ復帰処理B」を開始してもよいし、メインクロックに安定した段階で「データ復帰処理A」「データ復帰処理B」を開始してもよい。 Note that the “data recovery process B” may be started while the operation clock is the CR clock. Further, “data recovery processing A” may be started when the main clock is stabilized, and “data recovery processing B” may be started when the main clock is stabilized. “Data restoration processing B” may be started.
・データ復帰処理A
必須処理:マイコンステータスレジスタをバックアップRAM17から読み出す
マイコンステータスレジスタのスリープ検出リセットフラグによりスリープモードからの復帰か否かを判定するためである。また、データ復旧処理Aにはこのスリープモードからの復帰か否かのウェイクアップ判断が含まれる。
オプション処理1:メインクロック発振設定、PLLクロック発振設定に必要なデータ(動作クロックの指示値)をバックアップRAM17から読み出す
この処理がオプションなのは、マイコン100によってはメインクロック発振設定、PLLクロックの設定値が固定であるため、バックアップRAM17から読み出す必要がないためである。
オプション処理2:その他、早期に必要なデータをバックアップRAM17から読み出す
早期に必要なデータはマイコン100やマイコン100が実行するプログラムによって異なるので、開発者が第一データ復帰部41に予め設定している。
・ Data restoration processing A
Essential processing: This is because the microcomputer status register is read from the
Option processing 1: Main clock oscillation setting and data required for PLL clock oscillation setting (operation clock indication value) are read from the
Option processing 2: Read out necessary data from the
・データ復帰処理B
必須処理:スリープ前にバックアップRAM17に保持されたRAM13・レジスタ11のデータをRAM13、レジスタ11に書き込む
なお、マイコン100によっては、RAM13やレジスタ11に復帰が必要なデータ(上記の演算により得られたデータなど)を書き込まない仕様のものも存在する。そのようなマイコン100にとっては、データ復帰処理Bの必須処理が不要になる。データ復帰処理Bが不要な場合、プログラムのリンク時にデータ復帰処理Bを行う第2のデータ復帰部をリンクしなければよい。
・ Data restoration processing B
Mandatory processing: The data of the
〔動作手順〕
図7〜9は、ウェイクアップ手順を説明するフローチャート図の一例である。図7の手順は、マイコン100をウェイクアップさせるイベントが検出されるか、又は、マイコン100のリセット(起動)によりスタートする。図7の処理は図5のステップS10の処理に相当する。
[Operation procedure]
7 to 9 are examples of flowcharts for explaining the wake-up procedure. The procedure of FIG. 7 starts when an event that wakes up the
なお、ウェイクアップにより電源回路制御部34が、電源回路21から全ての回路に電源を供給している。動作クロックは、スリープモードからの復帰であればCRクロックに安定しており、リセットからの起動であればCRクロックが安定してからウェイクアップ処理が実行される。
Note that the power supply
まず、ウェイクアップ実行部41は、プロセッサを割込み禁止に設定する(S101)。割込み禁止にすることで、ウェイクアップ中に割込みが入り別の処理が実行されることを防止できる。なお、割込み禁止に設定するには割込み禁止レジスタに所定値を設定する。
First, the
次に、ウェイクアップ実行部41はウェイクアップ時の専用レジスタを初期化する(S102)。専用レジスタは、ポインタやアドレスのインデックスを格納するレジスタである。
Next, the
そして、動作クロックを上昇させる前に、「データ復帰処理A&ウェイクアップ判断」が実行される(S200)。この処理については図8にて説明する。 Then, before the operation clock is raised, “data recovery process A & wakeup determination” is executed (S200). This process will be described with reference to FIG.
次に、ウェイクアップブートフック部44はウェイクアップ時のフック処理を行う(S103)。上記のように、このフック処理では、動作クロックの上昇処理が行われる。
Next, the wakeup
まず、動作クロック設定部45は、データ復帰処理Aで取得したメインクロックの指示値をメインクロック発生回路19に設定する(S104)。これにより動作クロックはメインクロックまで上昇する。 First, the operation clock setting unit 45 sets the instruction value of the main clock acquired in the data restoration process A in the main clock generation circuit 19 (S104). As a result, the operation clock rises to the main clock.
動作クロック設定部45は、動作クロックがメインクロックで安定するまで、予め定められた時間、待機する(S105)。 The operation clock setting unit 45 waits for a predetermined time until the operation clock is stabilized by the main clock (S105).
次に、動作クロック設定部45は、データ復帰処理Aで取得したPLLクロックの指示値をPLL回路20に設定する(S106)。これにより動作クロックはPLLクロックまで上昇する。 Next, the operation clock setting unit 45 sets the instruction value of the PLL clock acquired in the data restoration process A in the PLL circuit 20 (S106). As a result, the operation clock rises to the PLL clock.
動作クロック設定部45は、動作クロックがPLLクロックで安定するまで、予め定められた時間、待機する(S107)。 The operation clock setting unit 45 waits for a predetermined time until the operation clock is stabilized by the PLL clock (S107).
次に、第2データ復帰部46は、データ復帰処理BのためにRAM13などを初期化する。まず、第2データ復帰部46はRAM13におけるスタック領域を初期化する(S108)。RAM13の全部でなく必ず使用する領域のみを初期化することで復帰処理の時間を短縮できる。
Next, the second
次に、第2データ復帰部46は汎用レジスタを初期化する(S109)。
Next, the second
そして、第2データ復帰部46は「データ復帰処理B」を実行する(S300)。この処理については図9にて説明する。
Then, the second
データ復帰処理Bが完了すると、CPU12はメインスクA、Bなどのプログラムを実行する(S110)。すなわち、図5のステップS20に処理が以降する。
When the data restoration process B is completed, the
図8は、「データ復帰処理A&ウェイクアップ判断」の実行手順を説明するフローチャート図の一例である。 FIG. 8 is an example of a flowchart for explaining an execution procedure of “data restoration process A & wakeup determination”.
第1データ復帰部41は、CPU12からマイコンステータスレジスタのデータを読み出す(S201)。この処理は上記のデータ復帰処理Aの必須処理に相当する。以降、ウェイクアップ要因判定部43がウェイクアップ要因を判定する。
The first
ウェイクアップ要因判定部43は、マイコンステータスレジスタのデータと所定のMASK値を論理演算してパワーオン検出リセットフラグを取り出す。そして、ウェイクアップ要因判定部43はパワーオン検出リセットフラグがONか否かを判定する(S202)。
The wake-up
パワーオン検出リセットフラグがONであることはウェイクアップ処理がスリープモードからの復帰でなくIG−ONによるリセットを要因とすることになる。よって、パワーオン検出リセットフラグがONの場合(S202のYes)、処理はステップS210に進む。 If the power-on detection reset flag is ON, the wake-up process is caused not by the return from the sleep mode but by a reset by IG-ON. Therefore, when the power-on detection reset flag is ON (Yes in S202), the process proceeds to step S210.
パワーオン検出リセットフラグがONでない場合(S202のNo)、ウェイクアップ要因判定部43は、外部リセット検出フラグがONか否かを判定する(S203)。すなわち、マイコンステータスレジスタのデータと所定のMASK値を論理演算して外部リセット検出フラグを取り出す。
When the power-on detection reset flag is not ON (No in S202), the wakeup
外部リセット検出トフラグがONであることはウェイクアップ処理がスリープモードからの復帰でなく外部からのリセットを要因とすることになる。よって、外部リセット検出フラグがONの場合(S203のYes)、処理はステップS210に進む。 If the external reset detection flag is ON, the wake-up process is caused not by the return from the sleep mode but by an external reset. Accordingly, when the external reset detection flag is ON (Yes in S203), the process proceeds to step S210.
外部リセット検出フラグがONでない場合(S203のNo)、ウェイクアップ要因判定部43は、外部低電圧リセット検出フラグがONか否かを判定する(S204)。すなわち、マイコンステータスレジスタのデータと所定のMASK値を論理演算して外部低電圧リセット検出フラグを取り出す。
When the external reset detection flag is not ON (No in S203), the wakeup
外部低電圧リセット検出トフラグがONであることはウェイクアップ処理がスリープモードからの復帰でなくバッテリ電圧が閾値以下であることをリセット要因とすることになる。よって、外部低電圧リセット検出フラグがONの場合(S204のYes)、処理はステップS210に進む。 When the external low voltage reset detection flag is ON, the reset factor is that the wake-up process is not the return from the sleep mode but the battery voltage is equal to or lower than the threshold value. Therefore, when the external low voltage reset detection flag is ON (Yes in S204), the process proceeds to step S210.
外部低電圧リセット検出リセットフラグがONでない場合(S204のNo)、ウェイクアップ要因判定部43は、内部低電圧リセット検出フラグがONか否かを判定する(S205)。すなわち、マイコンステータスレジスタのデータと所定のMASK値を論理演算して内部低電圧リセット検出フラグを取り出す。
When the external low voltage reset detection reset flag is not ON (No in S204), the wakeup
内部低電圧リセット検出トフラグがONであることはウェイクアップ処理がスリープモードからの復帰でなく電源回路21の電圧が閾値以下であることをリセット要因とすることになる。よって、内部低電圧リセット検出フラグがONの場合(S205のYes)、処理はステップS210に進む。
When the internal low voltage reset detection flag is ON, the reset factor is that the wake-up process is not the return from the sleep mode but the voltage of the
内部低電圧リセット検出リセットフラグがONでない場合(S205のNo)、ウェイクアップ要因判定部43は、スリープからの復帰か否かを同様に判定する(S206)。すなわち、マイコンステータスレジスタのデータと所定のMASK値を論理演算してスリープ検出フラグを取り出す。
When the internal low voltage reset detection reset flag is not ON (No in S205), the wakeup
スリープ検出フラグがONでない場合には(S206のNo)、同様に、処理はステップS210に進む。 If the sleep detection flag is not ON (No in S206), the process similarly proceeds to step S210.
スリープ検出フラグがONの場合(S206のYes)、ウェイクアップ要因はスリープモードからの復帰と判定される。よって、第1データ復帰部41は、データ復帰処理Aのオプション処理を実行する。本実施例のマイコン100のオプション処理は、動作クロックの設定に必要なメインクロックとPLLクロックの指示値をバックアップRAM17から読み出すことである。
When the sleep detection flag is ON (Yes in S206), it is determined that the wake-up factor is the return from the sleep mode. Therefore, the first
第1データ復帰部41は、バックアップRAM17からメインクロックやPLLクロックの指示値を読み出す(S207)。この後、処理は図7のS103に戻る。
The first
処理がステップS210に遷移した場合、データ復帰を行わず、リセットからの起動処理が行われる。リセットからの起動処理後は、タスクA、Bなどのプログラムが実行される。 When the process transitions to step S210, the data recovery is not performed and the activation process from reset is performed. After the activation process from reset, programs such as tasks A and B are executed.
図9は、「データ復帰処理B」の実行手順(S300)を説明するフローチャート図の一例である。図7にてステップS300を含めステップS103〜S110が実行されるのは、ステップS200でスリープモードからの復帰と判定された場合である。このため、第2データ復帰部46は、バックアップRAM17からRAM13とレジスタ11のデータを復帰すればよい。
FIG. 9 is an example of a flowchart for explaining the execution procedure (S300) of “data restoration processing B”. Steps S103 to S110 including step S300 in FIG. 7 are executed when it is determined in step S200 to return from the sleep mode. Therefore, the second
第2データ復帰部46はバックアップRAM17から読み出したデータをRAM13とレジスタ11にそれぞれ書き込む(S301)。この処理がデータ復帰処理Bの必須処理に相当する。
The second
また、第2データ復帰部46はその他、必要なデータがあれば復帰したり、周辺回路にデータを設定したりする(S302)。この後、処理は図7のS110に戻る。
In addition, the second
以上説明したように本実施例のマイコンは、動作クロックの遅い間は最小限のデータを復帰させ、動作クロックが速くなってから大部分のデータを復帰させる。このため、スリープ中のデータを保持するバックアップRAM17を備えたマイコン100のウェイクアップ時間を短縮できる。
As described above, the microcomputer of this embodiment restores a minimum amount of data while the operation clock is slow, and restores most of the data after the operation clock becomes fast. For this reason, the wake-up time of the
11 レジスタ
12 CPU
13 RAM
17 バックアップRAM
18 発振器
35 スリープモード実行部
41 ウェイクアップ実行部
100 マイコン
11
13 RAM
17 Backup RAM
18
Claims (8)
第2の動作モードの動作クロックと、第2の動作モードの動作クロックよりも大きい第1の動作モードの動作クロックとを生成するクロック生成手段と、
第2の動作モードから復帰する際、前記クロック生成手段が第1の動作モードの動作クロックに上昇させる前に、当該情報処理装置の状態を示す情報処理装置ステータスデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させる第1のデータ復帰手段と、
前記クロック生成手段が第1の動作モードの動作クロックに上昇させた後、第1の動作モード中に作成されたデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させる第2のデータ復帰手段と、
を有する情報処理装置。 An information processing apparatus having saved data storage means for holding data created in the work storage means during the first operation mode during the second operation mode,
Clock generating means for generating an operation clock for the second operation mode and an operation clock for the first operation mode that is larger than the operation clock for the second operation mode;
When returning from the second operation mode, before the clock generation means raises the operation clock to the first operation mode, the information processing apparatus status data indicating the state of the information processing apparatus is read from the saved data storage means. First data return means for returning to the working storage means;
After the clock generation means raises the operation clock to the first operation mode, the second data restoration for restoring the data created during the first operation mode from the saved data storage means to the working storage means Means,
An information processing apparatus.
ことを特徴とする請求項1記載の情報処理装置。 The first data restoration means restores predetermined early restoration data from the saved data storage means to the work storage means before the clock generation means raises the operation clock to the first operation mode. ,
The information processing apparatus according to claim 1.
ことを特徴とする請求項1又は2記載の情報処理装置。 The information processing apparatus status flag has information indicating whether the state of the information processing apparatus is a return from the second operation mode or a start from reset,
The information processing apparatus according to claim 1 or 2.
前記第1のデータ復帰手段は情報処理装置ステータスデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させ、前記第2のデータ復帰手段は第1の動作モード中に作成されたデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させる、
ことを特徴とする請求項3記載の情報処理装置。 Only when the information processing apparatus status flag includes information that the state of the information processing apparatus is a return from the second operation mode,
The first data return means returns information processing apparatus status data from the saved data storage means to the work storage means, and the second data return means transfers the data created during the first operation mode to the work data storage means. Returning from the saved data storage means to the working storage means;
The information processing apparatus according to claim 3.
クロック生成手段が第2の動作モードの動作クロックを生成するステップと、
前記クロック生成手段が第1の動作モードの動作クロックに上昇させる前に、第1のデータ復帰手段が、当該情報処理装置の状態を示す情報処理装置ステータスデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させるステップと、
クロック生成手段が、第2の動作モードより大きい第1の動作モードの動作クロックを生成するステップと、
前記クロック生成手段が第1の動作モードの動作クロックに上昇させた後、第2のデータ復帰手段が、第1の動作モード中に作成されたデータを前記退避データ記憶手段から前記作業用記憶手段に復帰させるステップと、
を有するデータ復帰方法。 A data restoration method for an information processing apparatus having saved data storage means for holding data created in a working storage means during a first operation mode for executing a program during a second operation mode,
A step of generating a clock for the second operation mode by the clock generation means;
Before the clock generation means raises the operation clock to the first operation mode, the first data restoration means sends the information processing apparatus status data indicating the state of the information processing apparatus from the saved data storage means to the work data. Returning to the storage means;
The clock generation means generating an operation clock of the first operation mode that is larger than the second operation mode;
After the clock generation unit raises the operation clock to the first operation mode, the second data restoration unit transfers the data created during the first operation mode from the saved data storage unit to the work storage unit. Step to return to
A data recovery method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011253703A JP5660010B2 (en) | 2011-11-21 | 2011-11-21 | Information processing apparatus and data restoration method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011253703A JP5660010B2 (en) | 2011-11-21 | 2011-11-21 | Information processing apparatus and data restoration method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013109559A true JP2013109559A (en) | 2013-06-06 |
JP5660010B2 JP5660010B2 (en) | 2015-01-28 |
Family
ID=48706249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011253703A Active JP5660010B2 (en) | 2011-11-21 | 2011-11-21 | Information processing apparatus and data restoration method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5660010B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015170006A (en) * | 2014-03-05 | 2015-09-28 | 株式会社デンソー | Control device and initialization program |
JP7444661B2 (en) | 2019-03-29 | 2024-03-06 | ラピスセミコンダクタ株式会社 | Wake-up circuit and reception system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0589041A (en) * | 1991-09-30 | 1993-04-09 | Casio Comput Co Ltd | Data processor |
JPH06230845A (en) * | 1993-02-08 | 1994-08-19 | Fujitsu Ltd | Resuming system |
JPH07134628A (en) * | 1993-11-10 | 1995-05-23 | Hitachi Ltd | Power saving control method and information processor |
JP2006095741A (en) * | 2004-09-28 | 2006-04-13 | Fuji Xerox Co Ltd | Information processing equipment |
JP2008005336A (en) * | 2006-06-23 | 2008-01-10 | Kyocera Corp | Receiver, reception processing method, and base band processor |
JP2008234046A (en) * | 2007-03-16 | 2008-10-02 | Fujitsu Ltd | Oscillation circuit and semiconductor device |
JP2009277252A (en) * | 2003-05-07 | 2009-11-26 | Mosaid Technologies Corp | Management of power on integrated circuit using power island |
-
2011
- 2011-11-21 JP JP2011253703A patent/JP5660010B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0589041A (en) * | 1991-09-30 | 1993-04-09 | Casio Comput Co Ltd | Data processor |
JPH06230845A (en) * | 1993-02-08 | 1994-08-19 | Fujitsu Ltd | Resuming system |
JPH07134628A (en) * | 1993-11-10 | 1995-05-23 | Hitachi Ltd | Power saving control method and information processor |
JP2009277252A (en) * | 2003-05-07 | 2009-11-26 | Mosaid Technologies Corp | Management of power on integrated circuit using power island |
JP2006095741A (en) * | 2004-09-28 | 2006-04-13 | Fuji Xerox Co Ltd | Information processing equipment |
JP2008005336A (en) * | 2006-06-23 | 2008-01-10 | Kyocera Corp | Receiver, reception processing method, and base band processor |
JP2008234046A (en) * | 2007-03-16 | 2008-10-02 | Fujitsu Ltd | Oscillation circuit and semiconductor device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015170006A (en) * | 2014-03-05 | 2015-09-28 | 株式会社デンソー | Control device and initialization program |
JP7444661B2 (en) | 2019-03-29 | 2024-03-06 | ラピスセミコンダクタ株式会社 | Wake-up circuit and reception system |
Also Published As
Publication number | Publication date |
---|---|
JP5660010B2 (en) | 2015-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8046615B2 (en) | Microcomputer system with reduced power consumption | |
JP5776124B2 (en) | A strategy for starting clocks in power management. | |
JP4535170B2 (en) | Microcomputer system | |
JP2011164780A (en) | Control method of disk array apparatus and disk array apparatus | |
KR20090026895A (en) | Apparatus and method for reducing power consumption in system on chip | |
JP2013084089A (en) | Vehicular device | |
US20120117364A1 (en) | Method and System for Operating a Handheld Calculator | |
CN102200779A (en) | Vehicle-mounted electronic system and energy consumption control method thereof | |
JP5915733B2 (en) | Information processing apparatus, information processing method, and program | |
CN110096125B (en) | Computer-implemented method for saving memory data and computer system | |
US20040250147A1 (en) | Uninterrupted system operation | |
JP5660010B2 (en) | Information processing apparatus and data restoration method | |
JP2011221708A (en) | Information processing devise and control method for information processing devise | |
JP3960800B2 (en) | Method of operating a processor-based system for a vehicle | |
JP6150669B2 (en) | Information processing apparatus, image forming apparatus, and control method thereof | |
JP5598945B2 (en) | Information processing system and control method thereof | |
JP2010097427A (en) | Processing apparatus, processing method and computer program | |
JP2008059007A (en) | Semiconductor storage device | |
CN113791738A (en) | Normalized low-power-consumption processing method and device based on solid state disk and computer equipment | |
JP3699947B2 (en) | Microcontroller | |
CN110121688B (en) | Method for judging loader and electronic system | |
JP2005078197A (en) | Power-saving controller | |
CN112579005B (en) | Method, device, computer equipment and storage medium for reducing average power consumption of SSD | |
JP2015170006A (en) | Control device and initialization program | |
JP4647276B2 (en) | Semiconductor circuit device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140117 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140917 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140924 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141020 |
|
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: 20141104 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141117 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5660010 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |