JP2004013799A - Clock switching system - Google Patents

Clock switching system Download PDF

Info

Publication number
JP2004013799A
JP2004013799A JP2002170088A JP2002170088A JP2004013799A JP 2004013799 A JP2004013799 A JP 2004013799A JP 2002170088 A JP2002170088 A JP 2002170088A JP 2002170088 A JP2002170088 A JP 2002170088A JP 2004013799 A JP2004013799 A JP 2004013799A
Authority
JP
Japan
Prior art keywords
clock
cpu
uart
stop mode
pll
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
JP2002170088A
Other languages
Japanese (ja)
Inventor
Keiichi Kuwabara
桑原 恵一
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.)
NEC Saitama Ltd
Original Assignee
NEC Saitama 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 NEC Saitama Ltd filed Critical NEC Saitama Ltd
Priority to JP2002170088A priority Critical patent/JP2004013799A/en
Publication of JP2004013799A publication Critical patent/JP2004013799A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve a problem on the waste consumption of an electric current in a PLL when the supply of a CPU clock to an UART is kept without switching the PLL to a standby state, in the software stop mode of a CPU. <P>SOLUTION: This system comprises a clock switching circuit 6 for switching the frequency of the clock supplied to a UART 7 between the software stop mode state and the usual operating state of a CPU core part 2. A REF clock is supplied to the UART 7 in the software stop mode of the CPU core part 2, and a CPU clock is supplied in the usual operating state. Whereby the UART 7 can be operated even in the standby state of the PLL 3, and the CPU core part can be recovered from the software stop mode by an interruption signal of the UART 7. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、マイクロコンピュータ等に用いられ、クロック周波数の切り替えを行うクロック切り替えシステムに関するものである。
【0002】
【従来の技術】
図5は従来例のクロック切り替えシステムを示すブロック図である。図中8はCPU、PLL等を内蔵したシステムLSIである。CPUコア部9はCPUのコア部であり、システムLSI8における命令の解釈及び実行を行う基本部分である。PLL10はシステムLSI8の外部から入力されるクロック信号REFCLKの周波数を、例えば、2倍或いは3倍の周波数のクロック信号CPUCLKへ変換してCPUコア部9へ出力する。
【0003】
PLL制御回路11はCPUコア部9がソフトウェアSTOPモードになると、Hレベルの信号SWSTOPRQによりPLLON=Lレベルとすることで、PLL10をスタンバイ状態にする回路である。また、割り込み制御回路12から出力されるCPUコア部9への割り込み信号CPUINTによって、PLLON=HレベルとすることでPLL10を動作状態とする。割り込み制御回路12はシステムLSI8の外部から入力される割り込み信号EXTINTとUART13から入力される割り込み信号UARTINTをORして、割り込み信号CPUINTをCPUコア部9へ出力する。
【0004】
UART13はシステムLSI8の外部から入力されるクロック信号REFCLKとPLL10から出力されるクロック信号CPUCLKによって動作する。また、TXDはシステムLSI8の外部へのデータ出力、RXDはシステムLSI8の外部からのデータ入力であり、UART13はこのデータ入力が完了すると、割り込み信号UARTINTを割り込み制御回路12へ出力し、CPUコア部9をソフトウェアSTOPモードから通常動作状態に復帰させる。
【0005】
次に、従来システムの動作を説明する。まず、CPUコア部9がソフトウェアSTOPモードに移行すると、SWSTOPRQ信号=Hとして、CPUはソフトウェアSTOPモードになる。ソフトウェアSTOPモードではCPUコア部9へCPUCLKを供給する必要がないので、PLL制御回路11からのPLLON信号によりPLL10をスタンバイモードとする。ソフトウェアSTOPモードから通常動作への復帰は、CPUコア部9へ入力されるCPUINT信号によってCPUを通常動作状態とする。
【0006】
CPUコア部9が通常状態になった場合は、CPUCLKが必要であるので、PLL制御回路11からのPLLON信号によりPLL10を動作状態とする。UART13はCPUコア部9からのCPUバスをCPUCLKでリタイミングし、内部レジスタ制御を行い、CPUCLKにより内部のステートマシンを動作させる。また、システムLSI8の外部からのREFCLKによってTXD、RXDで使用するボーレートを内部で生成する。
【0007】
CPUコア部9がソフトウェアSTOPモードから復帰する要因としては、割り込み制御回路12に入力されるシステムLSI8の外部からのEXINT信号、またはUART13におけるシステムLSI8の外部からのRXDのデータ受信による割り込み信号UARTINTのどちらかである。
【0008】
図6はCPUコア部9がEXINT信号によりソフトウェアSTOPモードから復帰する場合のタイミング図を示す。図6にはREFCLK、EXTINT、UARTINT、CPUINT、SWSTOPRQ、CPUコア部の状態、PLLON、PLLの状態、CPUCLK、TXD、RXDを示す。
【0009】
まず、図6に示すようにCPUコア部9がソフトウェアSTOPモードになることによってPLL10がスタンバイ状態となり、CPUCLKが停止する。また、図6に示すようにシステムLSI8の外部からのEXINT割り込みによって、CPUコア部9がソフトウェアSTOPモードから復帰し、PLL10も動作状態となり、CPUコア部9は動作状態となる。
【0010】
図7はCPUコア部9がUARTINTによりソフトウェアSTOPモードから復帰する場合のタイミング図を示す。図7は図6と同様にREFCLK、EXTINT、UARTINT、CPUINT、SWSTOPRQ、CPUコア部の状態、PLLON、PLLの状態、CPUCLK、TXD、RXDを示す。まず、図7に示すようにCPUコア9部がソフトウェアSTOPモードになることによってPLL10がスタンバイ状態となり、CPUCLKが停止する。また、システムLSI8の外部のRXDからの受信データがUART13に入力されるが、CPUCLKが停止しているため、UART13は内部ステートマシンが動作せず、UARTINTを発生できないため、CPUコア部9はソフトウェアSTOPモードから復帰できない。
【0011】
【発明が解決しようとする課題】
従来においては上記問題を解決するため、PLLをスタンバイ状態にせずにCPUCLKを供給したままとしているが、この方法では、PLL部の消費電流が無駄になるという問題があった。
【0012】
本発明は、上記従来の問題点に鑑みなされたもので、その目的は、PLLがスタンバイモード状態でもUARTを動作させてソフトウェアSTOPモードから復帰させることが可能なクロック切り替えシステムを提供することにある。
【0013】
【課題を解決するための手段】
本発明は、上記目的を達成するため、CPUと、外部からのクロックを所定周波数のCPUクロックに変換して前記CPUに供給するPLLと、前記PLLをスタンバイ状態又は動作状態に制御するPLL制御回路と、外部へのデータ出力或いは外部からデータを受信して割り込み信号を出力するUARTとを有し、外部からの割り込み信号又は前記UARTからのデータ受信による割り込み信号によって、前記CPUをソフトウェアストップモードから通常動作状態に復帰させるシステムにおいて、前記CPUがソフトウェアストップモード状態にある場合と通常動作状態にある場合とで、前記UARTに供給するクロックの周波数を切り替える手段を備えたことを特徴とする。
【0014】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して詳細に説明する。まず、本発明はCPUコア部がソフトウェアSTOPモードの場合に、UARTへのクロック供給を、PLL出力のCPUCLKではなく、システムLSIの外部から供給されるREFCLKにハードウェアで自動的又はソフトウェア指定によって切り替える事により、PLLがスタンバイモードでもUARTを動作させるものである。これにより、UARTのRXDからの受信データ入力による割り込み信号でCPUコア部をソフトウェアSTOPモードから復帰させる事ができる。
【0015】
(第1の実施形態)
図1は本発明のクロック切り替えシステムの第1の実施形態を示すブロック図である。図1において、システムLSI1はCPU、PLL等を内蔵したシステムLSIである。CPUコア部2はCPUのコア部であり、システムLSI1における命令の解釈及び実行を行う基本部分を示す。PLL3はシステムLSI1の外部より入力されるクロック信号REFCLKの周波数を、例えば、2倍または3倍の周波数のクロック信号CPUCLKへ変換して、CPUコア部2へ出力する。
【0016】
PLL制御回路4は、CPUコア部2がソフトウェアSTOPモードになるとHレベルの信号STOPREQが出力されるが、この信号をシステムLSI1の外部より入力されるクロック信号RTCCLKで同期を取り直した信号PLLONを作成し、PLLON=LレベルとすることでPLL3をスタンバイ状態にする回路である。また、割り込み制御回路5からCPUコア部2への割り込み信号CPUINTによって、PLLON=HレベルとすることでPLL3を動作状態とする。更に、PLLONをリタイミングし、クロック切り替え回路6へ切り替えタイミング信号PLLON2を出力する。
【0017】
割り込み制御回路5はシステムLSI1の外部より入力される割り込み信号EXTINTと、UART7から入力される割り込み信号UARTINTをORして、割り込み信号CPUINTをCPUコア部2へ出力する。クロック切り替え回路6はUART7へ出力するクロックSELCLKを、ハードウェアで自動的に切り替え、PLL制御回路4から入力されるPLLON信号がLレベルの場合は、SELCLKにREFCLKを出力し、Hレベルの場合にはSELCLKにCPUCLKを出力する。
【0018】
UART7はシステムLSI1の外部より入力されるクロック信号REFCLKと、クロック切り替え回路6から出力されるクロック信号SELCLKによって動作し、外部へのデータ出力や或いは外部からのデータを受信して割り込み信号を発生する。図1に示すTXDはこのシステムLSI1の外部へのデータ出力であり、RXDはシステムLSI1の外部からのデータ入力である。UART7はこのデータ入力が完了すると、割り込み信号UARTINTを割り込み制御回路5へ出力し、CPUコア部2をソフトウェアSTOPモードから復帰させる。
【0019】
次に、図1、図2を参照して本実施形態の動作を説明する。図2は本実施形態の動作を示すタイミング図である。図2はREFCLK、RTCCLK、EXTINT、UARTINT、CPUINT、SWSTOPRQ、CPUコア部の状態、PLLON、PLLの状態、PLLON2、CPUCLK、SELCLK、TXD、RXDのそれぞれのタイミングを示している。
【0020】
まず、CPUコア部2が動作状態の場合には、UART7にはボーレート生成用クロックとしてREFCLK、レジスタ制御、ステートマシン用としてSELCLKにCPUCLKが供給されている。CPUコア部2がソフトウェアSTOPモードになると、図2に示すようにSWSTOPRQ=Hとなる。
【0021】
PLL制御回路4はSWSTOPRQ=Hになると、図2に示すようにPLLON2=L(内部信号=L)とし、この内部信号をシステムLSI1の外部からの時計クロックであるRTCCLKでリタイミングした信号PLLON=L(図2参照)を出力する。PLL3はPLLON=Lとなる事で直ちにスタンバイモードとなり、図2に示すようにCPUCLKの供給を停止する。
【0022】
クロック切り替え回路6は図2に示すようにPLLON2=LからPLLON=Lになるまでの時間T1にSELクロックをCPUCLKからREFCLKに切り替える。これにより、ソフトウェアSTOPモード状態でもUART7にはボーレート生成用クロックとしてREFCLK、レジスタ制御、ステートマシン用としてREFCLKが供給される。従って、レジスタ制御用クロックがCPUCLKではないので、レジスタ制御は行えないが、ステートマシンはREFCLKで動作可能であり、システムLSI1の外部からのRXD信号による受信データによって動作が可能である。
【0023】
また、この場合、ソフトウェアSTOPモード状態であるので、CPUコア部2からのCPUバスによるUART7へのレジスタ制御はあり得ず、レジスタ部が動作しなくても特に問題はない。ここで、図2に示すようにソフトウェアSTOPモード中にシステムLSI1の外部からのRXD信号よる受信データがUART7に入力されると、UART7は割り込み信号UARTINTを割り込み制御回路5に出力する(図2参照)。割り込み制御回路5はUARTINT信号をCPUINT信号としてCPUコア部2やPLL制御回路4に出力する。
【0024】
CPUINTが入力されると、CPUコア部2は図2に示すようにソフトウェアSTOPモードから通常動作状態に復帰し、同時にUARTINTが入力されると、PLL制御回路4は図2に示すようにPLLON=H、PLLONをシステムLSI1の外部からの時計クロックであるRTCCLKでリタイミングした信号PLLON2=Hを出力する。PLL3はPLLON=Hとなる事で直ちに動作状態となり、図2に示すようにCPUCLKの供給を開始する。
【0025】
クロック切り替え回路6は図2に示すようにPLLON=HからPLLON2=Hになるまでの時間T2にSELクロックをREFCLKからCPUCLKに切り替える。以上の動作により、ソフトウェアSTOPモード状態から通常動作状態に復帰する。また、システムLSI1の外部からの割り込みであるEXINT信号によるソフトウェアSTOPモード状態からの復帰動作は、割り込み制御回路5によりEXINTがそのままCPUINTに出力されるため、UART7へ供給されるSELCLKには関係なく、CPUコア部2はソフトウェアSTOPモード状態から復帰する。
【0026】
(第2の実施形態)
図3は本発明の第2の実施形態を示すブロック図である。図3において、システムLSI14はCPU、PLL等を内蔵したシステムLSIである。CPUコア部15はCPUのコア部であり、システムLSI14における命令の解釈及び実行を行う基本部分を示す。PLL16はシステムLSI14の外部より入力されるクロック信号REFCLKの周波数を、例えば、2倍または3倍の周波数のクロック信号CPUCLKへ変換して、CPUコア部15へ出力する。
【0027】
PLL制御回路17は、CPUコア部15がソフトウェアSTOPモードになるとHレベルの信号STOPREQが出力されるが、この信号をシステムLSI14の外部より入力されるクロック信号RTCCLKで同期を取り直した信号PLLONを作成し、PLLON=LレベルとすることでPLL16をスタンバイ状態にする回路である。また、割り込み制御回路18からCPUコア部15への割り込み信号CPUINTによって、PLLON=HレベルとすることでPLL16を動作状態とする。
【0028】
割り込み制御回路18はシステムLSI14の外部より入力される割り込み信号EXTINTと、UART20から入力される割り込み信号UARTINTをORして、割り込み信号CPUINTをCPUコア部15へ出力する。レジスタ切り替え回路19はUART20へ出力するクロックSELCLKを、CPUコア部15の出力のCPUバスを用いてソフトウェアでSELCLKにREFCLKを出力するか、SELCLKにCPUCLKを出力するのかの切り替を行う。
【0029】
UART20はシステムLSI14の外部より入力されるクロック信号REFCLKとレジスタ切り替え回路19から出力されるクロック信号SELCLKによって動作し、外部へのデータ出力或いは外部からのデータを受信して割り込み信号を発生する。図3に示すTXDはこのシステムLSI14の外部へのデータ出力、RXDはシステムLSI14の外部からのデータ入力である。UART20はこのデータ入力が完了すると、割り込み信号UARTINTを割り込み制御回路18へ出力し、CPUコア部15をソフトウェアSTOPモードから復帰させる。
【0030】
次に、図3、図4を参照して本実施形態の動作を説明する。図4は本実施形態の動作を示すタイミング図である。図4はREFCLK、RTCCLK、EXTINT、UARTINT、CPUINT、SWSTOPRQ、CPUコア部の状態、PLLON、PLLの状態、CPUCLK、SELCLK、TXD、RXDのタイミングを示す。
【0031】
まず、図4に示すようにCPUコア部15が動作状態の場合、UART20にはボーレート生成用クロックとしてREFCLK、レジスタ制御、ステートマシン用としてSELCLKにCPUCLKが供給されている。ここで、図4に示すようにCPUコア部15がソフトウェアSTOPモードになる前のタイミングT3で、CPUコア部15からCPUバスによってレジスタ切り替え回路19を制御し、SELCLKをCPUCLKからREFCLKに切り替えを行う。
【0032】
CPUコア部15は図4に示すようにソフトウェアSTOPモードになると、SWSTOPRQ=Hとする。PLL制御回路17はSWSTOPRQ=Hになると、図4に示すようにPLLON=L(内部信号=L)とする。PLL16はPLLON=Lとなる事で直ちにスタンバイモードとなり、図4に示すようにCPUCLKの供給を停止する。
【0033】
この時、すでにクロック切り替えをCPUコア部15のCPUバスの制御で行っているので、ソフトウェアSTOPモード状態でもUART20にはボーレート生成用クロックとしてREFCLK、レジスタ制御、ステートマシン用としてREFCLKが供給される。従って、レジスタ制御用クロックがCPUCLKではないので、レジスタ制御は行えないが、ステートマシンはREFCLKで動作可能であり、システムLSI14の外部からのRXD信号による受信データによって動作が可能である。
【0034】
また、ソフトウェアSTOPモード状態であるので、CPUコア部15からのCPUバスによるUART20へのレジスタ制御はあり得ず、レジスタ部が動作しなくても特に問題はない。ここで、ソフトウェアSTOPモード中にシステムLSI14の外部からのRXD信号よる受信データがUART20に入力されると、UART20は図4に示すように割り込み信号UARTINTを割り込み制御回路18に出力する。割り込み制御回路18はUARTINT信号をCPUINT信号としてPLL制御回路17、CPUコア部15にそれぞれ出力する。
【0035】
CPUINTが入力されると、CPUコア部15は図4に示すようにソフトウェアSTOPモードから通常動作状態に復帰し、同時にUARTINTが入力されると、PLL制御回路17はPLLON=Hとする。PLL16はPLLON=Hとなる事で直ちに動作状態となり、図4に示すようにCPUCLKの供給を開始する。また、CPUコア部15がソフトウェアSTOPモード状態から通常動作状態に復帰した後、図4に示すタイミングT4でCPUコア部15からCPUバスによってレジスタ切り替え回路19を制御し、SELCLKをREFCLKからCPUCLKに切り替えを行う。これによって、UART20はCPUコア部15からのレジスタ制御が可能な状態になる。
【0036】
以上の動作により、ソフトウェアSTOPモード状態から通常動作状態に復帰する。また、システムLSI14の外部からの割り込みであるEXINT信号によるソフトウェアSTOPモード状態からの復帰動作は、割り込み制御回路18によりEXINTがそのままCPUINTに出力されるため、UART20へ供給されるSELCLKに関係なく、CPUコア部15はソフトウェアSTOPモード状態から復帰する。
【0037】
【発明の効果】
以上説明したように本発明によれば、クロックが2系統必要なUART等のマクロで、PLLから生成するクロックを、PLLがスタンバイ状態で別のクロックにハードウェアで自動的またはソフトウェア制御によって切り替えてUART等のマクロを動作させることが可能であるので、PLLのスタンバイ中でもUART等のマクロを動作させ、UART等のマクロの割り込み信号によりCPUをソフトウェアSTOPモードから復帰させる事ができる。また、従来はUART等のマクロを動作させるためにPLLを動作状態とする必要があったが、本発明ではPLLをスタンバイ状態にできるため、PLLの動作電流を低減することができ、消費電力を低減することができる。
【図面の簡単な説明】
【図1】本発明のクロック切り替えシステムの第1の実施形態を示すブロック図である。
【図2】図1の実施形態の動作を説明するためのタイミング図である。
【図3】本発明の第2の実施形態を示すブロック図である。
【図4】図3の実施形態の動作を説明するためのタイミング図である。
【図5】従来例のクロック切り替えシステムを示すブロック図である。
【図6】図5の従来システムのEXINT信号によりソフトウェアSTOPモードから復帰する場合の動作を説明するタイミング図である。
【図7】図5の従来システムのUARTINTによりソフトウェアSTOPモードから復帰する場合の動作を説明するタイミング図である。
【符号の説明】
1、14 システムLSI
2、15 CPUコア部
3、16 PLL
4、17 PLL制御回路
5、18 割り込み制御回路
6 クロック切り替え回路
7、20 UART
19 レジスタ切り替え回路
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a clock switching system used for a microcomputer or the like and for switching a clock frequency.
[0002]
[Prior art]
FIG. 5 is a block diagram showing a conventional clock switching system. In the figure, reference numeral 8 denotes a system LSI incorporating a CPU, a PLL, and the like. The CPU core unit 9 is a core unit of the CPU, and is a basic unit for interpreting and executing instructions in the system LSI 8. The PLL 10 converts the frequency of the clock signal REFCLK input from outside the system LSI 8 into, for example, a clock signal CPUCLK having a double or triple frequency and outputs the same to the CPU core unit 9.
[0003]
When the CPU core unit 9 enters the software STOP mode, the PLL control circuit 11 sets the PLLON to the L level by the H-level signal SWSTOPRQ, thereby bringing the PLL 10 into a standby state. Further, the PLL 10 is set to the operating state by setting PLLON = H level by an interrupt signal CPUINT to the CPU core unit 9 output from the interrupt control circuit 12. The interrupt control circuit 12 ORs the interrupt signal EXTINT input from outside the system LSI 8 and the interrupt signal UARTINT input from the UART 13, and outputs an interrupt signal CPUINT to the CPU core unit 9.
[0004]
The UART 13 is operated by a clock signal REFCLK input from outside the system LSI 8 and a clock signal CPUCLK output from the PLL 10. TXD is a data output to the outside of the system LSI 8, and RXD is a data input from the outside of the system LSI 8. When the data input is completed, the UART 13 outputs an interrupt signal UARTINT to the interrupt control circuit 12, and the CPU core unit 9 is returned from the software STOP mode to the normal operation state.
[0005]
Next, the operation of the conventional system will be described. First, when the CPU core unit 9 shifts to the software STOP mode, the CPU enters the software STOP mode by setting the SWSTOPRQ signal = H. In the software STOP mode, there is no need to supply CPUCLK to the CPU core unit 9, so that the PLL 10 is set to the standby mode by the PLLON signal from the PLL control circuit 11. To return from the software STOP mode to the normal operation, the CPU is set to the normal operation state by the CPUINT signal input to the CPU core unit 9.
[0006]
When the CPU core unit 9 is in the normal state, the CPU 10 needs the CPUCLK, so that the PLL 10 is brought into the operating state by the PLLON signal from the PLL control circuit 11. The UART 13 re-times the CPU bus from the CPU core unit 9 with CPUCLK, performs internal register control, and operates an internal state machine with CPUCLK. Further, a baud rate used in TXD and RXD is internally generated by REFCLK from outside the system LSI 8.
[0007]
The CPU core unit 9 returns from the software STOP mode as an EXINT signal input to the interrupt control circuit 12 from the outside of the system LSI 8 or an interrupt signal UARTINT in the UART 13 due to reception of RXD data from the outside of the system LSI 8. Either.
[0008]
FIG. 6 shows a timing chart when the CPU core unit 9 returns from the software STOP mode by the EXINT signal. FIG. 6 shows REFCLK, EXTINT, UARTINT, CPUINT, SWSTOPRQ, the state of the CPU core unit, the state of PLLON, the PLL, the CPUCLK, TXD, and RXD.
[0009]
First, as shown in FIG. 6, when the CPU core unit 9 enters the software STOP mode, the PLL 10 enters a standby state, and the CPUCLK stops. As shown in FIG. 6, an EXINT interrupt from the outside of the system LSI 8 causes the CPU core unit 9 to return from the software STOP mode, the PLL 10 to operate, and the CPU core unit 9 to operate.
[0010]
FIG. 7 is a timing chart when the CPU core unit 9 returns from the software STOP mode by UARTINT. FIG. 7 shows REFCLK, EXTINT, UARTINT, CPUINT, SWSTOPRQ, the state of the CPU core, PLLON, the state of PLL, CPUCLK, TXD, and RXD, similarly to FIG. First, as shown in FIG. 7, when the CPU core 9 enters the software STOP mode, the PLL 10 enters a standby state, and the CPUCLK stops. In addition, the reception data from the RXD outside the system LSI 8 is input to the UART 13, but since the CPUCLK is stopped, the UART 13 does not operate the internal state machine and cannot generate the UARTINT. Cannot return from STOP mode.
[0011]
[Problems to be solved by the invention]
Conventionally, in order to solve the above problem, the PLL is not kept in the standby state and the CPUCLK is kept supplied, but this method has a problem that the current consumption of the PLL unit is wasted.
[0012]
SUMMARY OF THE INVENTION The present invention has been made in consideration of the above-described conventional problems, and an object of the present invention is to provide a clock switching system capable of operating a UART and returning from a software STOP mode even when a PLL is in a standby mode. .
[0013]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a CPU, a PLL that converts an external clock into a CPU clock of a predetermined frequency and supplies the CPU to the CPU, and a PLL control circuit that controls the PLL to a standby state or an operation state. And a UART that outputs data to the outside or receives data from the outside and outputs an interrupt signal, and the CPU is brought out of the software stop mode by an interrupt signal from the outside or an interrupt signal due to data reception from the UART. In a system for returning to the normal operation state, the system further comprises means for switching a frequency of a clock supplied to the UART between a case where the CPU is in the software stop mode state and a case where the CPU is in the normal operation state.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings. First, according to the present invention, when the CPU core unit is in the software STOP mode, the clock supply to the UART is switched to REFCLK supplied from outside the system LSI by hardware automatically or by software designation, instead of CPUCLK of PLL output. As a result, the UART operates even when the PLL is in the standby mode. As a result, the CPU core unit can be returned from the software STOP mode by an interrupt signal due to input of received data from the RXD of the UART.
[0015]
(1st Embodiment)
FIG. 1 is a block diagram showing a first embodiment of the clock switching system of the present invention. In FIG. 1, a system LSI 1 is a system LSI incorporating a CPU, a PLL, and the like. The CPU core unit 2 is a core unit of the CPU, and indicates a basic part for interpreting and executing instructions in the system LSI 1. The PLL 3 converts the frequency of the clock signal REFCLK input from outside the system LSI 1 into, for example, a clock signal CPUCLK having a double or triple frequency, and outputs the clock signal to the CPU core unit 2.
[0016]
When the CPU core unit 2 enters the software STOP mode, the PLL control circuit 4 outputs an H-level signal STOPREQ. This signal is re-synchronized with a clock signal RTCCLK input from outside the system LSI 1 to generate a signal PLLON. This is a circuit for setting the PLL 3 to the standby state by setting the PLL ON = L level. Also, the PLL 3 is set to the operating state by setting PLLON = H level by an interrupt signal CPUINT from the interrupt control circuit 5 to the CPU core unit 2. Further, the PLLON is retimed, and a switching timing signal PLLON2 is output to the clock switching circuit 6.
[0017]
The interrupt control circuit 5 ORs the interrupt signal EXTINT input from outside the system LSI 1 and the interrupt signal UARTINT input from the UART 7, and outputs an interrupt signal CPUINT to the CPU core unit 2. The clock switching circuit 6 automatically switches the clock SELCLK to be output to the UART 7 by hardware, outputs REFCLK to SELCLK when the PLLON signal input from the PLL control circuit 4 is at L level, and outputs REFCLK to SELCLK when it is at H level. Outputs CPUCLK as SELCLK.
[0018]
The UART 7 is operated by a clock signal REFCLK input from outside the system LSI 1 and a clock signal SELCLK output from the clock switching circuit 6, and generates an interrupt signal by outputting data to the outside or receiving data from the outside. . TXD shown in FIG. 1 is a data output to the outside of the system LSI1, and RXD is a data input to the outside of the system LSI1. When the data input is completed, the UART 7 outputs an interrupt signal UARTINT to the interrupt control circuit 5, and returns the CPU core unit 2 from the software STOP mode.
[0019]
Next, the operation of this embodiment will be described with reference to FIGS. FIG. 2 is a timing chart showing the operation of the present embodiment. FIG. 2 shows the timings of REFCLK, RTCCLK, EXTINT, UARTINT, CPUINT, SWSTOPRQ, CPU core state, PLLON, PLL state, PLLON2, CPUCLK, SELCLK, TXD, and RXD.
[0020]
First, when the CPU core unit 2 is operating, the UART 7 is supplied with REFCLK as a baud rate generation clock, and SELCLK for register control and state machine with CPUCLK. When the CPU core unit 2 enters the software STOP mode, SWSTOPRQ = H as shown in FIG.
[0021]
When SWSTOPRQ = H, the PLL control circuit 4 sets PLLON2 = L (internal signal = L) as shown in FIG. 2, and a signal PLLON = re-timed this internal signal with RTCCLK which is a clock clock from the outside of the system LSI1. L (see FIG. 2). The PLL3 immediately goes into the standby mode when PLLON = L, and stops supplying the CPUCLK as shown in FIG.
[0022]
The clock switching circuit 6 switches the SEL clock from CPUCLK to REFCLK at time T1 from PLLON2 = L to PLLON = L as shown in FIG. Thus, even in the software STOP mode state, the UART 7 is supplied with REFCLK as a baud rate generation clock and REFCLK for register control and state machine use. Accordingly, since the register control clock is not CPUCLK, register control cannot be performed. However, the state machine can be operated by REFCLK, and can be operated by data received by the RXD signal from outside the system LSI 1.
[0023]
In this case, since the CPU is in the software STOP mode state, the CPU core unit 2 cannot control the register to the UART 7 by the CPU bus, and there is no particular problem even if the register unit does not operate. Here, as shown in FIG. 2, when data received from the outside of the system LSI 1 by the RXD signal is input to the UART 7 during the software STOP mode, the UART 7 outputs an interrupt signal UARTINT to the interrupt control circuit 5 (see FIG. 2). ). The interrupt control circuit 5 outputs the UARTINT signal to the CPU core unit 2 and the PLL control circuit 4 as a CPUINT signal.
[0024]
When CPUINT is input, the CPU core unit 2 returns to the normal operation state from the software STOP mode as shown in FIG. 2, and when UARTINT is input at the same time, the PLL control circuit 4 causes the PLLON = 4 as shown in FIG. H, a signal PLLON2 = H is output by retiming the PLLON with RTCCLK, which is a clock clock from outside the system LSI1. As soon as PLL3 becomes H, the PLL 3 is brought into the operating state, and starts supplying the CPUCLK as shown in FIG.
[0025]
As shown in FIG. 2, the clock switching circuit 6 switches the SEL clock from REFCLK to CPUCLK at a time T2 from PLLON = H to PLLON2 = H. By the above operation, the state is returned from the software STOP mode state to the normal operation state. The return operation from the software STOP mode state by the EXINT signal which is an interrupt from the outside of the system LSI 1 is performed by the interrupt control circuit 5 because EXINT is output to the CPUINT as it is, regardless of SELCLK supplied to the UART7. The CPU core unit 2 returns from the software STOP mode state.
[0026]
(Second embodiment)
FIG. 3 is a block diagram showing a second embodiment of the present invention. In FIG. 3, a system LSI 14 is a system LSI including a CPU, a PLL, and the like. The CPU core unit 15 is a core unit of the CPU, and indicates a basic part for interpreting and executing instructions in the system LSI 14. The PLL 16 converts the frequency of the clock signal REFCLK input from outside the system LSI 14 into, for example, a clock signal CPUCLK having a double or triple frequency, and outputs the clock signal to the CPU core unit 15.
[0027]
When the CPU core unit 15 enters the software STOP mode, the PLL control circuit 17 outputs an H-level signal STOPREQ. The PLL control circuit 17 generates a signal PLLON in which this signal is resynchronized with a clock signal RTCCLK input from outside the system LSI 14. Then, the PLL 16 is brought into a standby state by setting PLLON = L level. Further, the PLL 16 is set to the operating state by setting PLLON = H level by an interrupt signal CPUINT from the interrupt control circuit 18 to the CPU core unit 15.
[0028]
The interrupt control circuit 18 ORs the interrupt signal EXTINT input from outside the system LSI 14 and the interrupt signal UARTINT input from the UART 20, and outputs an interrupt signal CPUINT to the CPU core unit 15. The register switching circuit 19 switches between outputting the clock SELCLK to be output to the UART 20 and outputting REFCLK to SELCLK or outputting CPUCLK to SELCLK by software using the CPU bus output from the CPU core unit 15.
[0029]
The UART 20 is operated by a clock signal REFCLK input from outside the system LSI 14 and a clock signal SELCLK output from the register switching circuit 19, and outputs an external data or receives external data to generate an interrupt signal. TXD shown in FIG. 3 is a data output to the outside of the system LSI 14, and RXD is a data input to the outside of the system LSI 14. When the data input is completed, the UART 20 outputs an interrupt signal UARTINT to the interrupt control circuit 18, and returns the CPU core unit 15 from the software STOP mode.
[0030]
Next, the operation of this embodiment will be described with reference to FIGS. FIG. 4 is a timing chart showing the operation of the present embodiment. FIG. 4 shows the timings of REFCLK, RTCCLK, EXTINT, UARTINT, CPUINT, SWSTOPRQ, CPU core state, PLLON, PLL state, CPUCLK, SELCLK, TXD, and RXD.
[0031]
First, when the CPU core unit 15 is in the operating state as shown in FIG. 4, the UART 20 is supplied with REFCLK as a baud rate generation clock and SELCLK for register control and SELCLK for a state machine. Here, as shown in FIG. 4, at timing T3 before the CPU core unit 15 enters the software STOP mode, the CPU core unit 15 controls the register switching circuit 19 via the CPU bus to switch SELCLK from CPUCLK to REFCLK. .
[0032]
When the CPU core unit 15 enters the software STOP mode as shown in FIG. 4, it sets SWSTOPRQ = H. When SWSTOPRQ = H, the PLL control circuit 17 sets PLLON = L (internal signal = L) as shown in FIG. The PLL 16 immediately enters the standby mode when PLLON = L, and stops supplying the CPUCLK as shown in FIG.
[0033]
At this time, since the clock switching has already been performed under the control of the CPU bus of the CPU core unit 15, REFCLK is supplied to the UART 20 as a baud rate generation clock and REFCLK for register control and state machine use even in the software STOP mode state. Therefore, since the register control clock is not CPUCLK, register control cannot be performed, but the state machine can operate with REFCLK and can operate with received data by an RXD signal from outside the system LSI 14.
[0034]
Further, since the state is the software STOP mode, there is no control of the register from the CPU core unit 15 to the UART 20 by the CPU bus, and there is no particular problem even if the register unit does not operate. Here, when data received by the RXD signal from outside the system LSI 14 is input to the UART 20 during the software STOP mode, the UART 20 outputs an interrupt signal UARTINT to the interrupt control circuit 18 as shown in FIG. The interrupt control circuit 18 outputs the UARTINT signal as a CPUINT signal to the PLL control circuit 17 and the CPU core unit 15, respectively.
[0035]
When CPUINT is input, the CPU core unit 15 returns from the software STOP mode to the normal operation state as shown in FIG. 4, and when UARTINT is input, the PLL control circuit 17 sets PLLON = H. As soon as PLLON = H, the PLL 16 is brought into the operating state, and starts supplying the CPUCLK as shown in FIG. Further, after the CPU core unit 15 returns from the software STOP mode state to the normal operation state, the CPU core unit 15 controls the register switching circuit 19 via the CPU bus at timing T4 shown in FIG. 4 to switch SELCLK from REFCLK to CPUCLK. I do. As a result, the UART 20 is in a state where register control from the CPU core unit 15 is possible.
[0036]
By the above operation, the state is returned from the software STOP mode state to the normal operation state. The return operation from the software STOP mode state by the EXINT signal which is an interrupt from the outside of the system LSI 14 is performed by the interrupt control circuit 18 because EXINT is output to the CPUINT as it is, regardless of SELCLK supplied to the UART 20. The core unit 15 returns from the software STOP mode state.
[0037]
【The invention's effect】
As described above, according to the present invention, the clock generated from the PLL is switched to another clock while the PLL is in a standby state by hardware automatically or by software control using a macro such as UART which requires two clocks. Since a macro such as a UART can be operated, the macro such as the UART can be operated even during the standby of the PLL, and the CPU can be returned from the software STOP mode by an interrupt signal of the macro such as the UART. Further, conventionally, it was necessary to put the PLL into an operating state in order to operate a macro such as a UART. However, in the present invention, since the PLL can be placed in a standby state, the operating current of the PLL can be reduced, and power consumption can be reduced. Can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of a clock switching system of the present invention.
FIG. 2 is a timing chart for explaining the operation of the embodiment of FIG. 1;
FIG. 3 is a block diagram showing a second embodiment of the present invention.
FIG. 4 is a timing chart for explaining the operation of the embodiment of FIG. 3;
FIG. 5 is a block diagram showing a conventional clock switching system.
FIG. 6 is a timing chart for explaining the operation of the conventional system of FIG. 5 when returning from the software STOP mode by an EXINT signal.
FIG. 7 is a timing chart for explaining an operation when returning from the software STOP mode by UARTINT of the conventional system of FIG. 5;
[Explanation of symbols]
1,14 System LSI
2,15 CPU core unit 3,16 PLL
4, 17 PLL control circuit 5, 18 Interrupt control circuit 6 Clock switching circuit 7, 20 UART
19 Register switching circuit

Claims (7)

CPUと、外部からのクロックを所定周波数のCPUクロックに変換して前記CPUに供給するPLLと、前記PLLをスタンバイ状態又は動作状態に制御するPLL制御回路と、外部へのデータ出力或いは外部からデータを受信して割り込み信号を出力するUARTとを有し、外部からの割り込み信号又は前記UARTからのデータ受信による割り込み信号によって、前記CPUをソフトウェアストップモードから通常動作状態に復帰させるシステムにおいて、前記CPUがソフトウェアストップモード状態にある場合と通常動作状態にある場合とで、前記UARTに供給するクロックの周波数を切り替える手段を備えたことを特徴とするクロック切り替えシステム。A CPU, a PLL that converts an external clock into a CPU clock having a predetermined frequency and supplies the CPU clock to the CPU, a PLL control circuit that controls the PLL to a standby state or an operation state, and outputs data to the outside or data from the outside. And a UART for receiving an interrupt signal from the UART and returning the CPU to a normal operation state from a software stop mode by an external interrupt signal or an interrupt signal due to data reception from the UART. A clock switching system comprising: means for switching a frequency of a clock supplied to the UART depending on whether the device is in a software stop mode state or a normal operation state. 前記切り替え手段は、前記CPUがソフトウェアストップモード状態になる直前に、前記UARTに供給するクロックの周波数を切り替え、前記CPUがソフトウェアストップモードから通常動作状態に復帰した直後に、前記UARTに供給するクロックを元のクロックの周波数に戻すことを特徴とする請求項1に記載のクロック切り替えシステム。The switching means switches a frequency of a clock supplied to the UART immediately before the CPU enters the software stop mode, and a clock supplied to the UART immediately after the CPU returns to the normal operation state from the software stop mode. 2. The clock switching system according to claim 1, wherein the frequency is returned to the original clock frequency. 前記CPUがソフトウェアストップモード状態にある場合には、前記UARTに供給するクロックを低速クロックとすることで、前記UARTの外部データ受信による割り込み信号により前記CPUをソフトウェアストップモードから復帰させることを特徴とする請求項1、2に記載のクロック切り替えシステム。When the CPU is in the software stop mode, the clock supplied to the UART is set to a low-speed clock, and the CPU is returned from the software stop mode by an interrupt signal due to external data reception of the UART. The clock switching system according to claim 1, wherein 前記CPUの動作中は、前記PLLは動作状態、前記CPUのソフトウェアストップモード中は、前記PLLはスタンバイ状態であることを特徴とする請求項1〜3に記載のクロック切り替えシステム。The clock switching system according to claim 1, wherein the PLL is in an operating state while the CPU is operating, and is in a standby state while the CPU is in a software stop mode. 前記PLLは前記CPUからのストップモード信号によりスタンバイ状態に制御され、且つ、前記CPUが割り込み信号によってソフトウェアストップモードから復帰後に動作状態に制御されることを特徴とする請求項1〜4に記載のクロック切り替えシステム。5. The PLL according to claim 1, wherein the PLL is controlled to a standby state by a stop mode signal from the CPU, and the CPU is controlled to an operation state after returning from the software stop mode by an interrupt signal. Clock switching system. 前記切り替え手段は、前記CPUからのストップモード信号に応じた信号と、この信号を外部からの時計クロックでリタイミングした信号との信号変化時間に、前記UARTに供給するクロックの周波数を切り替えることを特徴とする請求項1〜5に記載のクロック切り替えシステム。The switching means switches a frequency of a clock supplied to the UART during a signal change time between a signal corresponding to a stop mode signal from the CPU and a signal obtained by retiming the signal with an external clock. The clock switching system according to claim 1, wherein: 前記切り替え手段は、前記CPUの動作中には高速の前記CPUクロック、前記CPUがソフトウェアストップモード中は、低速の前記基準クロックに切り替えることを特徴とする請求項1〜7に記載のクロック切り替えシステム。8. The clock switching system according to claim 1, wherein the switching unit switches to the high-speed CPU clock during the operation of the CPU, and to the low-speed reference clock while the CPU is in the software stop mode. .
JP2002170088A 2002-06-11 2002-06-11 Clock switching system Pending JP2004013799A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002170088A JP2004013799A (en) 2002-06-11 2002-06-11 Clock switching system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002170088A JP2004013799A (en) 2002-06-11 2002-06-11 Clock switching system

Publications (1)

Publication Number Publication Date
JP2004013799A true JP2004013799A (en) 2004-01-15

Family

ID=30436458

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002170088A Pending JP2004013799A (en) 2002-06-11 2002-06-11 Clock switching system

Country Status (1)

Country Link
JP (1) JP2004013799A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007058347A (en) * 2005-08-22 2007-03-08 Kenwood Corp Receiver device and control method for the same
JP2017528854A (en) * 2015-06-29 2017-09-28 小米科技有限責任公司Xiaomi Inc. Main MCU wake-up circuit, method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007058347A (en) * 2005-08-22 2007-03-08 Kenwood Corp Receiver device and control method for the same
JP2017528854A (en) * 2015-06-29 2017-09-28 小米科技有限責任公司Xiaomi Inc. Main MCU wake-up circuit, method and apparatus

Similar Documents

Publication Publication Date Title
EP1451666B1 (en) Glitch free clock selection switch
KR100479948B1 (en) Mobile radio telephone set
JP2676966B2 (en) Single chip microcomputer
US10296065B2 (en) Clock management using full handshaking
TWI747904B (en) System on chip, clock gating component, multiplexer component and dividing component
JP4870292B2 (en) Information processing device capable of interrupt processing
US11789515B2 (en) Semiconductor device
JPH0854955A (en) Clock signal generation circuit
JP2016062352A (en) Semiconductor integrated circuit, device having the same, method of controlling clocks in semiconductor integrated circuit, and program
JP5808097B2 (en) Semiconductor device and reset control method in semiconductor device
JP2008061169A (en) Electronic circuit
JP2005050030A (en) Semiconductor integrated circuit device, clock control method, and data transfer control method
US7565564B2 (en) Switching circuit and method thereof for dynamically switching host clock signals
TWI791730B (en) Semiconductor device and semiconductor system
JP2004013799A (en) Clock switching system
JP4219601B2 (en) Information processing device
JP2004185378A (en) Clock-synchronous serial communication device and semiconductor integrated circuit device
JP6410538B2 (en) Semiconductor integrated circuit, device including semiconductor integrated circuit, clock control method in semiconductor integrated circuit, and program.
JP3349983B2 (en) Semiconductor integrated circuit device
JPH07264171A (en) Redundant system transmission line operating system and redundant system transmission line operating method
CN108345350B (en) System on chip, semiconductor system, and clock signal output circuit
JP2004078642A (en) Interruption control circuit
JPH10187275A (en) Clock supply system for bus circuit
JP2005010958A (en) Semiconductor device
JPH11227304A (en) Printer device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040507

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040518

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060824

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061213