JP2007140878A - System clock generation circuit - Google Patents

System clock generation circuit Download PDF

Info

Publication number
JP2007140878A
JP2007140878A JP2005333315A JP2005333315A JP2007140878A JP 2007140878 A JP2007140878 A JP 2007140878A JP 2005333315 A JP2005333315 A JP 2005333315A JP 2005333315 A JP2005333315 A JP 2005333315A JP 2007140878 A JP2007140878 A JP 2007140878A
Authority
JP
Japan
Prior art keywords
operation state
speed
system clock
signal
low
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
JP2005333315A
Other languages
Japanese (ja)
Inventor
Teruhiko Uemura
輝彦 植村
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.)
Toshiba Corp
Kioxia Systems Co Ltd
Original Assignee
Toshiba Corp
Toshiba Memory Systems Co Ltd
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 Toshiba Corp, Toshiba Memory Systems Co Ltd filed Critical Toshiba Corp
Priority to JP2005333315A priority Critical patent/JP2007140878A/en
Publication of JP2007140878A publication Critical patent/JP2007140878A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide stable operation in restarting in a microcomputer having a plurality of oscillators built therein. <P>SOLUTION: The system clock generation circuit has: a system clock selection signal for selecting a system clock from a plurality of clock signals; an operating state setting register 15 for storing a desired operating state by a write signal and outputting the system clock selection signal on the basis of the stored operating state; and an operating state maintenance register 16 for maintaining the operating state stored in the operating state setting register 15 and outputting the maintained operating state to the operating state setting register 15 so that the system clock selection signal is not initialized when a reset signal is inputted. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、システムクロック生成回路に係わり、特に、複数の発振器を内蔵したマイクロコンピュータにおけるシステムクロック生成回路に関する。   The present invention relates to a system clock generation circuit, and more particularly to a system clock generation circuit in a microcomputer incorporating a plurality of oscillators.

携帯電話やデジタルカメラに代表されるポータブル機器は、その電源をバッテリー類に頼っており、機器の使用可能時間を確保するために消費電流をなるべく少なくすることが求められている。このようなポータブル機器に組み込まれることを目的とするマイクロコンピュータは、消費電流低減のため、通常の高速動作モードの他により低い周波数で動作する低速動作モードを持っている。これら動作モードは、動作状態を設定するレジスタに動作モードフラグを設定することで変更される(例えば、「特許文献1」を参照。)。   Portable devices typified by mobile phones and digital cameras rely on batteries for their power sources, and it is required to reduce current consumption as much as possible in order to ensure the usable time of the devices. A microcomputer intended to be incorporated in such a portable device has a low-speed operation mode that operates at a lower frequency in addition to a normal high-speed operation mode in order to reduce current consumption. These operation modes are changed by setting an operation mode flag in a register for setting an operation state (see, for example, “Patent Document 1”).

図3は、発振器を内蔵したマイクロコンピュータにおける従来のシステムクロック生成回路を示す回路ブロック図である。従来のシステムクロック生成回路は、図3に示したように、高速発振器31および低速発振器32からなるクロック生成部33と、クロック生成部33からのクロック信号を選択してシステムクロックとして出力するセレクタ34と、書き込み信号によって動作状態が格納され、その動作モードフラグの値に従って高速発振制御信号、低速発振制御信号、およびシステムクロック選択信号を出力する動作状態設定レジスタ35とを備えている。そして、この従来のシステムクロック生成回路は、動作モードフラグが高速動作を示していれば、システムクロックとして高速発振器31からの高速クロックを出力し、低速発振器32を停止する。また、動作モードフラグが低速動作を示していれば、システムクロック生成回路は、システムクロックとして低速発振器32からの低速クロックを出力し、高速発振器31を停止する。   FIG. 3 is a circuit block diagram showing a conventional system clock generation circuit in a microcomputer incorporating an oscillator. As shown in FIG. 3, the conventional system clock generation circuit includes a clock generation unit 33 including a high-speed oscillator 31 and a low-speed oscillator 32, and a selector 34 that selects a clock signal from the clock generation unit 33 and outputs it as a system clock. And an operation state setting register 35 that outputs an operation state by a write signal and outputs a high-speed oscillation control signal, a low-speed oscillation control signal, and a system clock selection signal according to the value of the operation mode flag. The conventional system clock generation circuit outputs the high-speed clock from the high-speed oscillator 31 as the system clock and stops the low-speed oscillator 32 if the operation mode flag indicates high-speed operation. If the operation mode flag indicates low speed operation, the system clock generation circuit outputs the low speed clock from the low speed oscillator 32 as the system clock and stops the high speed oscillator 31.

ところで、このような従来のシステムクロック生成回路を内蔵したマイクロコンピュータでは、動作状態設定レジスタ35は、初期状態で高速発振器31を選択するよう構成されていた。このため、マイクロコンピュータにリセット信号が入力されると、動作状態設定レジスタ35が初期化され、マイクロコンピュータは高速発振器31で動作する高速動作モードで再起動されていた。   By the way, in the microcomputer incorporating such a conventional system clock generation circuit, the operation state setting register 35 is configured to select the high-speed oscillator 31 in the initial state. For this reason, when the reset signal is input to the microcomputer, the operation state setting register 35 is initialized, and the microcomputer is restarted in the high-speed operation mode in which the microcomputer 31 operates.

しかしながら、リセット信号が入力された時、マイクロコンピュータが消費電流を抑えるために低速発振器32で動作する低速動作モードであった場合には、再起動された高速発振器31の発振動作がすぐには安定せず異常発振状態となり、同期リセット解除信号が正常に受け付けられず、マイクロコンピュータが誤動作してしまうという問題があった。
特開2004−13337号公報(図1)
However, when the reset signal is input, if the microcomputer is in the low-speed operation mode in which the microcomputer operates with the low-speed oscillator 32 to suppress current consumption, the oscillation operation of the restarted high-speed oscillator 31 is immediately stabilized. Thus, there is a problem that the abnormal oscillation state occurs, the synchronous reset release signal is not normally received, and the microcomputer malfunctions.
Japanese Patent Laying-Open No. 2004-13337 (FIG. 1)

本発明は、複数の発振器を内蔵したマイクロコンピュータにおいて、再起動時の安定動作を確保することができるシステムクロック生成回路を提供する。   The present invention provides a system clock generation circuit capable of ensuring a stable operation at the time of restart in a microcomputer incorporating a plurality of oscillators.

本発明の一態様によれば、複数のクロック信号からシステムクロックを選択するための選択信号と、書き込み信号によって所望の動作状態が格納され、前記格納された動作状態に基づいて前記選択信号が出力される第1の記憶手段と、前記第1の記憶手段に格納された前記動作状態を保持し、リセット信号が入力された時に、前記選択信号が初期化されないように、前記保持していた動作状態を前記第1の記憶手段へ出力する第2の記憶手段を有することを特徴とするシステムクロック生成回路が提供される。   According to one aspect of the present invention, a desired operation state is stored by a selection signal for selecting a system clock from a plurality of clock signals and a write signal, and the selection signal is output based on the stored operation state The first storage means to be stored and the operation state stored in the first storage means so that the selection signal is not initialized when a reset signal is input. There is provided a system clock generation circuit comprising second storage means for outputting the state to the first storage means.

本発明によれば、選択されている発振器のクロック信号で再起動されるので、マイクロコンピュータの安定動作を確保することができる。   According to the present invention, the microcomputer is restarted by the clock signal of the selected oscillator, so that stable operation of the microcomputer can be ensured.

以下、図面を参照しながら、本発明の実施例を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施例1に係わるシステムクロック生成回路を示す回路ブロック図である。ここでは、主に、リセット信号として内部要因リセット、例えば、ウォッチドッグタイマリセット、アドレストラップリセット、未定義命令実行リセットなどが入力された場合のリセット動作にかかわる部分を示した。   FIG. 1 is a circuit block diagram showing a system clock generation circuit according to Embodiment 1 of the present invention. Here, the part mainly related to the reset operation when an internal factor reset, for example, a watchdog timer reset, an address trap reset, an undefined instruction execution reset, or the like is input as a reset signal is shown.

本発明の実施例1に係わるシステムクロック生成回路は、高速発振器11および低速発振器12からなるクロック生成部13、クロック生成部13からのクロック信号を選択するセレクタ14、クロック生成部13およびセレクタ14を制御する動作状態設定レジスタ15、リセット信号入力前の状態を保持する動作状態保持レジスタ16、および動作状態設定レジスタ15と動作状態保持レジスタ16とを接続する双方向バス17を備えている。   The system clock generation circuit according to the first embodiment of the present invention includes a clock generation unit 13 including a high-speed oscillator 11 and a low-speed oscillator 12, a selector 14 that selects a clock signal from the clock generation unit 13, a clock generation unit 13, and a selector 14. An operation state setting register 15 to be controlled, an operation state holding register 16 for holding a state before a reset signal is input, and a bidirectional bus 17 for connecting the operation state setting register 15 and the operation state holding register 16 are provided.

高速発振器11の制御信号入力には動作状態設定レジスタ15からの高速発振制御信号が入力され、高速発振器11の出力は高速クロックとしてセレクタ14の第1の入力に供給されている。   A high-speed oscillation control signal from the operation state setting register 15 is input to the control signal input of the high-speed oscillator 11, and the output of the high-speed oscillator 11 is supplied to the first input of the selector 14 as a high-speed clock.

低速発振器12の制御信号入力には動作状態設定レジスタ15からの低速発振制御信号が入力され、低速発振器12の出力は低速クロックとしてセレクタ14の第2の入力に供給されている。   The control signal input of the low-speed oscillator 12 is input with the low-speed oscillation control signal from the operation state setting register 15, and the output of the low-speed oscillator 12 is supplied to the second input of the selector 14 as a low-speed clock.

セレクタ14の制御信号入力には動作状態設定レジスタ15からのシステムクロック選択信号が入力され、セレクタ14の出力はシステムクロックとしてマイクロコンピュータ(以下、「システム」という。)の他の回路ブロック(図示していない。)へ供給されている。   A system clock selection signal from the operation state setting register 15 is input to the control signal input of the selector 14, and the output of the selector 14 is another circuit block (not shown) of the microcomputer (hereinafter referred to as “system”) as a system clock. Not supplied).

動作状態設定レジスタ15の制御信号入力には書き込み信号が入力され、動作状態設定レジスタ15のデータ入出力は双方向バス17に接続されている。   A write signal is input to the control signal input of the operation state setting register 15, and the data input / output of the operation state setting register 15 is connected to the bidirectional bus 17.

動作状態保持レジスタ16の第1の制御信号入力には書き込み信号が入力され、第2の制御信号入力にはリセット信号が入力され、動作状態保持レジスタ16のデータ入出力は双方向バス17に接続されている。   A write signal is input to the first control signal input of the operation state holding register 16, a reset signal is input to the second control signal input, and the data input / output of the operation state holding register 16 is connected to the bidirectional bus 17. Has been.

高速発振器11は、動作状態設定レジスタ15からの高速発振制御信号に基づいて、システムが通常動作(以下、「高速動作モード」という。)で使用する高速クロックを生成し、セレクタ14へ出力する。   Based on the high-speed oscillation control signal from the operation state setting register 15, the high-speed oscillator 11 generates a high-speed clock that the system uses in normal operation (hereinafter referred to as “high-speed operation mode”), and outputs the high-speed clock to the selector 14.

すなわち、高速発振制御信号が“1”(動作)である時に、高速発振器11は高速クロックを出力し、高速発振制御信号が“0”(停止)である時には、高速発振器11は発振動作を停止する。   That is, when the high-speed oscillation control signal is “1” (operation), the high-speed oscillator 11 outputs a high-speed clock, and when the high-speed oscillation control signal is “0” (stop), the high-speed oscillator 11 stops the oscillation operation. To do.

低速発振器12は、動作状態設定レジスタ15からの低速発振制御信号に基づいて、システムが消費電流を抑制するために低速動作する場合(以下、「低速動作モード」という。)に使用する低速クロックを生成し、セレクタ14へ出力する。   The low-speed oscillator 12 uses a low-speed clock to be used when the system operates at a low speed to suppress current consumption (hereinafter referred to as “low-speed operation mode”) based on the low-speed oscillation control signal from the operation state setting register 15. Generate and output to the selector 14.

すなわち、低速発振制御信号が“1”(動作)である時に、低速発振器12は低速クロックを出力し、低速発振制御信号が“0”(停止)である時には、低速発振器12は発振動作を停止する。   That is, when the low-speed oscillation control signal is “1” (operation), the low-speed oscillator 12 outputs a low-speed clock, and when the low-speed oscillation control signal is “0” (stop), the low-speed oscillator 12 stops the oscillation operation. To do.

セレクタ14は、動作状態設定レジスタ15からのシステムクロック選択信号に基づいて、クロック生成部13からの高速クロックまたは低速クロックを選択し、これをシステムクロックとして出力する。   The selector 14 selects a high-speed clock or a low-speed clock from the clock generation unit 13 based on the system clock selection signal from the operation state setting register 15, and outputs this as the system clock.

すなわち、システムクロック選択信号が“高速クロック”であれば、セレクタ14は高速発振器11からの高速クロックを選択し、システムクロック選択信号が“低速クロック”であれば、セレクタ14は低速発振器12からの低速クロックを選択する。   That is, if the system clock selection signal is “high-speed clock”, the selector 14 selects the high-speed clock from the high-speed oscillator 11, and if the system clock selection signal is “low-speed clock”, the selector 14 receives from the low-speed oscillator 12. Select a low-speed clock.

動作状態設定レジスタ15は、システムの内部状態を示す設定値(以下、「動作状態」という。)が格納される複数ビットのレジスタで構成され、動作状態の1つである動作モードフラグの値に基づいて、セレクタ14へシステムクロック選択信号を出力する。   The operation state setting register 15 is a multi-bit register that stores a set value indicating the internal state of the system (hereinafter referred to as “operation state”), and is set to the value of an operation mode flag that is one of the operation states. Based on this, a system clock selection signal is output to the selector 14.

すなわち、格納された動作モードフラグが“1”(高速動作モード)であれば、動作状態設定レジスタ15はシステムクロック選択信号として“高速クロック”を出力し、格納された動作モードフラグが“0”(低速動作モード)であれば、動作状態設定レジスタ15はシステムクロック選択信号として“低速クロック”を出力する。   That is, if the stored operation mode flag is “1” (high-speed operation mode), the operation state setting register 15 outputs “high-speed clock” as the system clock selection signal, and the stored operation mode flag is “0”. In the case of (low speed operation mode), the operation state setting register 15 outputs “low speed clock” as the system clock selection signal.

また、動作状態設定レジスタ15は、動作モードフラグの値に基づいて、高速発振器11へ高速発振制御信号を出力し、低速発振器12へ低速発振制御信号を出力する。   The operation state setting register 15 outputs a high-speed oscillation control signal to the high-speed oscillator 11 and outputs a low-speed oscillation control signal to the low-speed oscillator 12 based on the value of the operation mode flag.

すなわち、格納された動作モードフラグが“1”であれば、動作状態設定レジスタ15は、高速発振制御信号として“1”を出力し、低速発振制御信号として“0”を出力する。また、格納された動作モードフラグが“0”であれば、動作状態設定レジスタ15は、高速発振制御信号として“0”を出力し、低速発振制御信号として“1”を出力する。   That is, if the stored operation mode flag is “1”, the operation state setting register 15 outputs “1” as the high-speed oscillation control signal and “0” as the low-speed oscillation control signal. If the stored operation mode flag is “0”, the operation state setting register 15 outputs “0” as the high-speed oscillation control signal and “1” as the low-speed oscillation control signal.

動作状態は、書き込み信号によって動作状態設定レジスタ15に書き込まれる。また、電源投入時や外部リセットなどでシステム全体がリセットされる時には、動作状態設定レジスタ15は初期化され、動作状態はあらかじめ決められている初期状態にクリアされ、動作モードフラグは“1”にリセットされる。   The operation state is written into the operation state setting register 15 by a write signal. When the entire system is reset upon power-on or external reset, the operation state setting register 15 is initialized, the operation state is cleared to a predetermined initial state, and the operation mode flag is set to “1”. Reset.

動作状態保持レジスタ16は、動作状態設定レジスタ15と同じビット数のレジスタによって構成されている。動作状態保持レジスタ16には、双方向バス17を介して動作状態設定レジスタ15から転送された動作状態が書き込み信号によって格納される。   The operation state holding register 16 is configured by a register having the same number of bits as the operation state setting register 15. The operation state holding register 16 stores the operation state transferred from the operation state setting register 15 via the bidirectional bus 17 by a write signal.

また、動作状態保持レジスタ16は、リセット信号として内部要因リセットを受け取ると、保持していた動作状態を双方向バス17へ出力し、動作状態設定レジスタ15へ転送する。   When the operation state holding register 16 receives an internal factor reset as a reset signal, the operation state holding register 16 outputs the held operation state to the bidirectional bus 17 and transfers it to the operation state setting register 15.

次に、上述の構成を持つシステムクロック生成回路の動作について説明する。ここでは、一例として、消費電流を抑えるためにシステムが低速動作モードで動作している時に、リセット信号が入力された場合を説明する。   Next, the operation of the system clock generation circuit having the above configuration will be described. Here, as an example, a case where a reset signal is input when the system is operating in the low-speed operation mode in order to suppress current consumption will be described.

まず、書き込み信号によって動作状態設定レジスタ15に動作状態として低速動作モードが設定されると、動作状態は双方向バス17を介して動作状態保持レジスタ16にも書き込まれ退避される。   First, when the low-speed operation mode is set as the operation state in the operation state setting register 15 by the write signal, the operation state is also written to the operation state holding register 16 via the bidirectional bus 17 and saved.

この時、動作状態設定レジスタ15からのシステムクロック選択信号は、低速動作モードを示す“低速クロック”であるので、セレクタ14により低速発振器12の出力である低速クロックが選択されシステムクロックとして出力される。こうして、システムは、消費電流を抑えた低速動作モードで動作を開始する。   At this time, since the system clock selection signal from the operation state setting register 15 is a “low-speed clock” indicating the low-speed operation mode, the low-speed clock output from the low-speed oscillator 12 is selected by the selector 14 and is output as the system clock. . Thus, the system starts operating in a low-speed operation mode with reduced current consumption.

次に、この状態でリセット信号として内部要因リセットが動作状態保持レジスタ16に入力されると、退避されていた動作状態が、双方向バス17を介して動作状態設定レジスタ15に転送される。   Next, when an internal factor reset is input to the operation state holding register 16 as a reset signal in this state, the saved operation state is transferred to the operation state setting register 15 via the bidirectional bus 17.

そして、動作状態設定レジスタ15は、内部要因リセットが入力される前と同じ動作状態に設定され、セレクタ14は、発振動作が安定している低速発振器12からの低速クロックを選択して出力する。   The operation state setting register 15 is set to the same operation state as before the internal factor reset is input, and the selector 14 selects and outputs the low speed clock from the low speed oscillator 12 in which the oscillation operation is stable.

このようにして、動作状態設定レジスタ15の設定値が常に動作状態保持レジスタ16に退避されているので、内部要因リセットを受け付けた際、システムは、安定したシステムクロックで再起動され、安定動作を確保することができる。   In this way, since the set value of the operation state setting register 15 is always saved in the operation state holding register 16, when the internal factor reset is accepted, the system is restarted with a stable system clock and performs stable operation. Can be secured.

上記実施例1によれば、リセット信号入力前に選択されていた発振器のクロック信号で再起動されるので、システムの安定動作を確保することができるシステムクロック生成回路を実現することができる。   According to the first embodiment, since the restart is performed by the clock signal of the oscillator selected before the reset signal is input, it is possible to realize the system clock generation circuit that can ensure the stable operation of the system.

図2は、本発明の実施例2に係わるシステムクロック生成回路を示す回路ブロック図である。ここでは、実施例1と同様に、主に、リセット信号として内部要因リセットが入力された場合のリセット動作にかかわる部分を示した。   FIG. 2 is a circuit block diagram showing a system clock generation circuit according to the second embodiment of the present invention. Here, as in the first embodiment, the part mainly related to the reset operation when the internal factor reset is input as the reset signal is shown.

本発明の実施例2に係わるシステムクロック生成回路は、高速発振器21および低速発振器22からなるクロック生成部23、クロック生成部23からのクロック信号を選択するセレクタ24、クロック生成部23およびセレクタ24を制御する動作状態設定レジスタ25、リセット信号入力前の状態を保持する動作状態保持EEPROM26、動作状態保持EEPROM26を制御する動作状態退避/設定制御回路27、および動作状態設定レジスタ25と動作状態保持EEPROM26とを接続する双方向バス28を備えている。   The system clock generation circuit according to the second embodiment of the present invention includes a clock generation unit 23 including a high-speed oscillator 21 and a low-speed oscillator 22, a selector 24 that selects a clock signal from the clock generation unit 23, a clock generation unit 23, and a selector 24. An operation state setting register 25 for controlling, an operation state holding EEPROM 26 for holding a state before a reset signal is input, an operation state saving / setting control circuit 27 for controlling the operation state holding EEPROM 26, and an operation state setting register 25 and an operation state holding EEPROM 26; The bidirectional bus 28 is connected.

高速発振器21の制御信号入力には動作状態設定レジスタ25からの高速発振制御信号が入力され、高速発振器21の出力は高速クロックとしてセレクタ24の第1の入力に供給されている。   A high-speed oscillation control signal from the operation state setting register 25 is input to the control signal input of the high-speed oscillator 21, and the output of the high-speed oscillator 21 is supplied to the first input of the selector 24 as a high-speed clock.

低速発振器22の制御信号入力には動作状態設定レジスタ25からの低速発振制御信号が入力され、低速発振器22の出力は低速クロックとしてセレクタ24の第2の入力に供給されている。   The control signal input of the low-speed oscillator 22 is supplied with a low-speed oscillation control signal from the operation state setting register 25, and the output of the low-speed oscillator 22 is supplied to the second input of the selector 24 as a low-speed clock.

セレクタ24の制御信号入力には動作状態設定レジスタ25からのシステムクロック選択信号が入力され、セレクタ24の出力はシステムクロックとしてマイクロコンピュータ(以下、「システム」という。)の他の回路ブロック(図示していない。)へ供給されている。   The system clock selection signal from the operation state setting register 25 is input to the control signal input of the selector 24, and the output of the selector 24 is another circuit block (not shown) of the microcomputer (hereinafter referred to as “system”) as the system clock. Not supplied).

動作状態設定レジスタ25の制御信号入力には書き込み信号が入力され、動作状態設定レジスタ25のデータ入出力は双方向バス28に接続されている。   A write signal is input to the control signal input of the operation state setting register 25, and the data input / output of the operation state setting register 25 is connected to the bidirectional bus 28.

動作状態保持EEPROM26の制御信号入力には動作状態退避/設定制御回路27からの制御信号が入力され、動作状態保持EEPROM26のデータ入出力は双方向バス28に接続されている。   A control signal from the operation state saving / setting control circuit 27 is input to the control signal input of the operation state holding EEPROM 26, and data input / output of the operation state holding EEPROM 26 is connected to the bidirectional bus 28.

動作状態退避/設定制御回路27の第1の制御信号入力には書き込み信号が入力され、第2の制御信号入力にはリセット信号が入力されている。   A write signal is input to the first control signal input of the operation state saving / setting control circuit 27, and a reset signal is input to the second control signal input.

高速発振器21、低速発振器22、セレクタ24、および動作状態設定レジスタ25の構成、動作、および機能は、実施例1と同様なので、詳しい説明は省略する。   Since the configurations, operations, and functions of the high-speed oscillator 21, the low-speed oscillator 22, the selector 24, and the operation state setting register 25 are the same as those in the first embodiment, detailed description thereof is omitted.

動作状態保持EEPROM26は、電気的に書き換え可能な不揮発性メモリであり、動作状態退避/設定制御回路27からの制御信号に基づいて、双方向バス28を介して動作状態設定レジスタ25から受け取った動作状態を記憶する。   The operation state holding EEPROM 26 is an electrically rewritable nonvolatile memory, and the operation received from the operation state setting register 25 via the bidirectional bus 28 based on a control signal from the operation state saving / setting control circuit 27. Remember state.

また、動作状態保持EEPROM26は、保持している動作状態を制御信号に基づいて動作状態保持EEPROM26へ転送する。   The operation state holding EEPROM 26 transfers the held operation state to the operation state holding EEPROM 26 based on the control signal.

動作状態退避/設定制御回路27は、書き込み信号およびリセット信号に基づいて、動作状態保持EEPROM26を制御する制御信号を生成し、出力する。   The operation state saving / setting control circuit 27 generates and outputs a control signal for controlling the operation state holding EEPROM 26 based on the write signal and the reset signal.

すなわち、動作状態退避/設定制御回路27は、現在の動作状態を退避するために、動作状態設定レジスタ25から転送された動作状態を書き込み信号によって動作状態保持EEPROM26へ格納し、保持するよう制御信号を生成する。   That is, the operation state saving / setting control circuit 27 stores the operation state transferred from the operation state setting register 25 in the operation state holding EEPROM 26 by the write signal in order to save the current operation state. Is generated.

また、動作状態退避/設定制御回路27は、リセット信号として内部要因リセットを受け取ると、動作状態設定レジスタ25の動作状態をリセット信号入力前の状態に戻すために、動作状態保持EEPROM26が保持していた動作状態を動作状態設定レジスタ25へ転送するよう制御信号を生成する。   When the operation state saving / setting control circuit 27 receives an internal factor reset as a reset signal, the operation state holding EEPROM 26 holds the operation state of the operation state setting register 25 to return to the state before the reset signal is input. A control signal is generated so as to transfer the selected operation state to the operation state setting register 25.

次に、上述の構成を持つシステムクロック生成回路の動作について説明する。ここでは、一例として、消費電流を抑えるためにシステムが低速動作モードで動作している時に、リセット信号が入力された場合を説明する。   Next, the operation of the system clock generation circuit having the above configuration will be described. Here, as an example, a case where a reset signal is input when the system is operating in the low-speed operation mode in order to suppress current consumption will be described.

まず、書き込み信号によって動作状態設定レジスタ25に動作状態として低速動作モードが設定されると、動作状態は双方向バス28を介して動作状態保持EEPROM26にも書き込まれ退避される。   First, when the low-speed operation mode is set as the operation state in the operation state setting register 25 by the write signal, the operation state is written and saved in the operation state holding EEPROM 26 via the bidirectional bus 28.

この時、動作状態設定レジスタ25からのシステムクロック選択信号は、低速動作モードを示す“低速クロック”であるので、セレクタ24により低速発振器22の出力である低速クロックが選択されシステムクロックとして出力される。こうして、システムは、消費電流を抑えた低速動作モードで動作を開始する。   At this time, since the system clock selection signal from the operation state setting register 25 is a “low speed clock” indicating the low speed operation mode, the low speed clock that is the output of the low speed oscillator 22 is selected by the selector 24 and output as the system clock. . Thus, the system starts operating in a low-speed operation mode with reduced current consumption.

次に、この状態でリセット信号として内部要因リセットが動作状態退避/設定制御回路27に入力されると、動作状態保持EEPROM26に退避されていた動作状態が、双方向バス28を介して動作状態設定レジスタ25に転送される。   Next, when an internal factor reset is input to the operation state saving / setting control circuit 27 as a reset signal in this state, the operation state saved in the operation state holding EEPROM 26 is set via the bidirectional bus 28 to the operation state setting. Transferred to the register 25.

そして、動作状態設定レジスタ25は、内部要因リセットが入力される前と同じ動作状態に設定され、セレクタ24は、発振動作が安定している低速発振器22からの低速クロックを選択して出力する。   The operation state setting register 25 is set to the same operation state as before the internal factor reset is input, and the selector 24 selects and outputs the low-speed clock from the low-speed oscillator 22 in which the oscillation operation is stable.

このようにして、動作状態設定レジスタ25の設定値が常に動作状態保持EEPROM26に退避されているので、内部要因リセットを受け付けた際、システムは、安定したシステムクロックで再起動され、安定動作を確保することができる。   In this way, the set value of the operation state setting register 25 is always saved in the operation state holding EEPROM 26. Therefore, when an internal factor reset is accepted, the system is restarted with a stable system clock to ensure stable operation. can do.

上記実施例2によれば、リセット信号入力前に選択されていた発振器のクロック信号で再起動されるので、システムの安定動作を確保することができるシステムクロック生成回路を実現することができる。   According to the second embodiment, since the restart is performed by the clock signal of the oscillator selected before the reset signal is input, it is possible to realize the system clock generation circuit that can ensure the stable operation of the system.

上述の実施例2では、リセット信号として内部要因リセットを動作状態退避/設定制御回路27へ入力するとしたが、本発明はこれに限られるものではなく、例えば、リセット信号として外部リセットの一部を入力することで、電源の再投入時に、電源切断直前の動作状態でシステムを再起動することができるよう構成することもできる。   In the second embodiment, the internal factor reset is input to the operation state saving / setting control circuit 27 as the reset signal. However, the present invention is not limited to this, and for example, a part of the external reset is used as the reset signal. By inputting the power, the system can be restarted in the operation state immediately before the power is turned off when the power is turned on again.

また、上述の実施例1および実施例2では、説明を容易にするため、クロック生成部は高速発振器と低速発振器の2つからなるとしたが、本発明はこれに限られるものではなく、3つ以上の発振器からなるクロック生成部に対して適用できるよう構成することもできる。   In the first embodiment and the second embodiment described above, for ease of explanation, the clock generator is composed of two, a high-speed oscillator and a low-speed oscillator. However, the present invention is not limited to this, and three clock generators are provided. The present invention can also be configured so as to be applicable to a clock generator composed of the above oscillators.

本発明の実施例1に係わるシステムクロック生成回路を示す回路ブロック図。1 is a circuit block diagram showing a system clock generation circuit according to Embodiment 1 of the present invention. 本発明の実施例2に係わるシステムクロック生成回路を示す回路ブロック図。The circuit block diagram which shows the system clock generation circuit concerning Example 2 of this invention. 発振器を内蔵したマイクロコンピュータにおける従来のシステムクロック生成回路を示す回路ブロック図。1 is a circuit block diagram showing a conventional system clock generation circuit in a microcomputer incorporating an oscillator.

符号の説明Explanation of symbols

11、21 高速発振器
12、22 低速発振器
13、23 クロック生成部
14、24 セレクタ
15、25 動作状態設定レジスタ
16 動作状態保持レジスタ
17、28 双方向バス
26 動作状態保持EEPROM
27 動作状態退避/設定制御回路
11, 21 High-speed oscillator 12, 22 Low-speed oscillator 13, 23 Clock generator 14, 24 Selector 15, 25 Operation state setting register 16 Operation state holding register 17, 28 Bidirectional bus 26 Operation state holding EEPROM
27 Operation state saving / setting control circuit

Claims (3)

複数のクロック信号からシステムクロックを選択するための選択信号と、
書き込み信号によって所望の動作状態が格納され、前記格納された動作状態に基づいて前記選択信号が出力される第1の記憶手段と、
前記第1の記憶手段に格納された前記動作状態を保持し、リセット信号が入力された時に、前記選択信号が初期化されないように、前記保持していた動作状態を前記第1の記憶手段へ出力する第2の記憶手段を有することを特徴とするシステムクロック生成回路。
A selection signal for selecting a system clock from a plurality of clock signals;
A first storage means for storing a desired operating state by a write signal and outputting the selection signal based on the stored operating state;
The operation state stored in the first storage means is held, and the held operation state is stored in the first storage means so that the selection signal is not initialized when a reset signal is input. A system clock generation circuit comprising second storage means for outputting.
前記前記第2の記憶手段は、
前記動作状態が格納される電気的に書き換え可能な不揮発性メモリと、
前記書き込み信号によって前記動作状態を前記不揮発性メモリへ書き込み、前記リセット信号によって前記不揮発性メモリに保持されていた前記動作状態を読み出して前記第1の記憶手段へ出力するよう動作する制御手段を備えたことを特徴とする請求項1に記載のシステムクロック生成回路。
The second storage means is
An electrically rewritable nonvolatile memory in which the operating state is stored;
Control means operable to write the operation state to the nonvolatile memory by the write signal, read the operation state held in the nonvolatile memory by the reset signal, and output the read operation state to the first storage means. The system clock generation circuit according to claim 1.
前記第1の記憶手段からの発振制御信号に基づいて、周波数の異なる第1および第2のクロック信号を生成するクロック生成手段と、
前記選択信号に基づいて、前記第1または前記第2のクロック信号を選択してシステムクロックとして出力する選択手段をさらに有することを特徴とする請求項1に記載のシステムクロック生成回路。
Clock generating means for generating first and second clock signals having different frequencies based on an oscillation control signal from the first storage means;
2. The system clock generation circuit according to claim 1, further comprising selection means for selecting the first or second clock signal based on the selection signal and outputting it as a system clock.
JP2005333315A 2005-11-17 2005-11-17 System clock generation circuit Pending JP2007140878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005333315A JP2007140878A (en) 2005-11-17 2005-11-17 System clock generation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005333315A JP2007140878A (en) 2005-11-17 2005-11-17 System clock generation circuit

Publications (1)

Publication Number Publication Date
JP2007140878A true JP2007140878A (en) 2007-06-07

Family

ID=38203658

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005333315A Pending JP2007140878A (en) 2005-11-17 2005-11-17 System clock generation circuit

Country Status (1)

Country Link
JP (1) JP2007140878A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010176276A (en) * 2009-01-28 2010-08-12 Sanyo Electric Co Ltd Electronic circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010176276A (en) * 2009-01-28 2010-08-12 Sanyo Electric Co Ltd Electronic circuit
TWI409613B (en) * 2009-01-28 2013-09-21 Sanyo Electric Co Electronic circuit for micro computer

Similar Documents

Publication Publication Date Title
JP4535170B2 (en) Microcomputer system
JP4621113B2 (en) Semiconductor integrated circuit device
JP4750564B2 (en) Reset signal generation circuit
JP2010529548A (en) Power management integrated circuit
JP5098367B2 (en) Power supply voltage adjustment circuit and microcomputer
KR20060094841A (en) Power source conversion circuit, microcomputer, handheld terminal, and power source conversion controlling method
US8595518B2 (en) Semiconductor integrated circuit and electronic information device
JP2016045954A (en) System and method for initializing rf module through nonvolatile control
JP4433311B2 (en) Semiconductor memory device, electronic device, and mode setting method
US7463547B2 (en) Micro computer and method of optimizing microcomputer
JP2007140878A (en) System clock generation circuit
JP2010057160A (en) Semiconductor integrated circuit
US7321980B2 (en) Software power control of circuit modules in a shared and distributed DMA system
US6631467B1 (en) Microcomputer timing control circuit provided with internal reset signal generator triggered by external reset signal
JP2007304909A (en) Electrical apparatus
US20100274996A1 (en) Micro-processor
JPH11288409A (en) Microcomputer
JP6956036B2 (en) Semiconductor devices and circuit control methods
KR100891390B1 (en) Micro controller and method of updating the same
JP2005293482A (en) Clock controller and its control method
JP2005309799A (en) Microcomputer with built-in flash memory
JP2000222279A (en) Unit and method for controlling memory
JP3583683B2 (en) Micro control unit and control method thereof
JP2002328912A (en) Microcomputer
JP2005071203A (en) Microprocessor