JP2013008133A - Clock control circuit for microcomputer - Google Patents

Clock control circuit for microcomputer Download PDF

Info

Publication number
JP2013008133A
JP2013008133A JP2011139381A JP2011139381A JP2013008133A JP 2013008133 A JP2013008133 A JP 2013008133A JP 2011139381 A JP2011139381 A JP 2011139381A JP 2011139381 A JP2011139381 A JP 2011139381A JP 2013008133 A JP2013008133 A JP 2013008133A
Authority
JP
Japan
Prior art keywords
clock
processor
circuit
frequency
microcomputer
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.)
Withdrawn
Application number
JP2011139381A
Other languages
Japanese (ja)
Inventor
Shinichi Sasaki
晋一 佐々木
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP2011139381A priority Critical patent/JP2013008133A/en
Publication of JP2013008133A publication Critical patent/JP2013008133A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide the clock control circuit of a microcomputer for normally continuing an operation under execution by preventing any failure from being generated by the switching of a processor clock.SOLUTION: A clock control circuit 110 of a microcomputer for changing a processor clock 132 of a processor 102 includes: a frequency divider 114 for generating a processor clock 132 by frequency-dividing an input clock (PLL clock 130); and a change enable circuit 122 for detecting the synchronizing timing of the processor clock 132 and the clock (peripheral clock 134, communication clock 136) of another circuit, and for outputting a change enable signal 140 for instructing the change of a frequency-division ratio to the frequency-divider 114.

Description

本発明は、プロセッサクロックを切替可能なマイコンのクロック制御回路に関する。   The present invention relates to a clock control circuit for a microcomputer capable of switching a processor clock.

流量、温度、圧力等を検出するフィールド機器は、現場や状況によって求められる精度等が異なっており、種々の製品が生産されている。種々の製品のそれぞれにおいて固有の設計を行っていてはコストが嵩むため、現在、製品間での共通化が促進されている。例えば、製品間でのマイコン(microcomputer)の共通利用が行われている。   Field devices that detect flow rate, temperature, pressure, and the like differ in accuracy required depending on the site and situation, and various products are produced. Since it is costly to carry out a unique design in each of various products, commonality among products is currently being promoted. For example, a microcomputer is commonly used among products.

フィールド機器は、プラントを監視するための計装機器でありランニングコストの低減のために、極めて省電力化されている。具体的には、内部の電力線と信号線とが一緒のような状態になっており、供給電力が限られている。したがって、実装されたマイコン等は少ない電力で動作する必要がある。   Field equipment is instrumentation equipment for monitoring a plant, and power consumption is extremely reduced in order to reduce running costs. Specifically, the internal power line and the signal line are in the same state, and the supply power is limited. Therefore, the mounted microcomputer or the like needs to operate with less power.

しかし、近年の技術発達に伴いフィールド機器にも様々な機能が要求されており、徐々に高機能化されてきている。この高機能化に伴い、マイコンのシステムクロックを切り替える構成が提案されている。かかる構成では、マイコンの外部回路に予め電力を蓄電しておき、プロセッサ過負荷時にはこの蓄電電力を利用してシステムクロックを上げて高速動作する(以下「ターボ動作」と称する)。外部回路の蓄電電力が減少したり、プロセッサ負荷が軽減されたりした場合には、システムクロックを下げて低速動作する。これにより、少ない電力を有効に利用して動作可能となっている。   However, with the recent technological development, field devices are also required to have various functions and gradually become more sophisticated. Along with this higher functionality, a configuration for switching the system clock of a microcomputer has been proposed. In such a configuration, power is stored in advance in an external circuit of the microcomputer, and when the processor is overloaded, this stored power is used to raise the system clock and operate at high speed (hereinafter referred to as “turbo operation”). When the power stored in the external circuit decreases or the processor load is reduced, the system clock is lowered to operate at low speed. Thereby, it can operate | move using little electric power effectively.

特許文献1には、マイコンのシステムクロックを切り替えることで、これに同期する計時用タイマに基づいて動作する制御用ソフトウェアの制御周期やタイミングがずれてしまうことから、システムクロックの切替を制限する技術について記載されている。詳細には特許文献1では、低速動作から高速動作への切替については、通常、制御に支障を来たすことがないため制限せず、高速動作から低速動作への切替についてはシステムクロックを停止するスリープ状態への移行時のみに制限するとしている。   Patent Document 1 discloses a technique for restricting switching of a system clock because a control cycle and timing of control software that operates based on a timer for time synchronization synchronized with the system clock of the microcomputer is shifted by switching the system clock of the microcomputer. Is described. Specifically, in Patent Document 1, switching from low-speed operation to high-speed operation is not limited because it usually does not interfere with control, and switching from high-speed operation to low-speed operation is a sleep that stops the system clock. It is said that it is restricted only at the time of transition to the state.

特開2002−49610号公報JP 2002-49610 A

特許文献1の技術は、計時用タイマに基づいて動作する制御用ソフトウェアの制御周期やタイミングのずれを防ぐ技術である。したがって、システムクロックの切替に伴い、マイコンに実装されたハードウェアにて生じる不具合については一切触れられていない。なお、特許文献1の技術では、高速動作から低速動作への切替についてはシステムクロックを停止するスリープ状態への移行時のみとし、これ以外の状況下ではシステムクロックの周波数を下げないとしているが、供給電力が限られているフィールド機器においてこのような制御をすることは電力不足を誘発する原因となる。   The technique of Patent Document 1 is a technique for preventing a shift in control cycle and timing of control software that operates based on a timer for timekeeping. Therefore, no mention is made of any problems that occur in the hardware mounted on the microcomputer as the system clock is switched. In the technique of Patent Document 1, the switching from the high speed operation to the low speed operation is performed only at the time of transition to the sleep state in which the system clock is stopped. Under other circumstances, the frequency of the system clock is not decreased. Such control in a field device with limited power supply causes a power shortage.

システムクロックを切り替えることでプロセッサクロック、周辺クロック、通信クロック等の周波数を上げる場合、周辺回路の動作周波数が許容範囲を外れてしまったり、外部との通信速度がインターフェースにより規定されている通信I/F回路の通信動作が切断されてしまったりして、実行中の動作を正常に継続させることができなくなるおそれがある。このような場合、低速動作から高速動作への切替において(周波数を上げることによって)も、実行中の動作を正常に継続させることができなくなるおそれがある。   When the frequency of the processor clock, peripheral clock, communication clock, etc. is increased by switching the system clock, the operating frequency of the peripheral circuit falls outside the allowable range, or the communication I / O whose communication speed with the outside is specified by the interface There is a possibility that the communication operation of the F circuit may be disconnected, and the operation being executed cannot be continued normally. In such a case, even during switching from the low speed operation to the high speed operation (by increasing the frequency), there is a possibility that the operation being executed cannot be continued normally.

本発明は、このような課題に鑑みてなされたものであり、プロセッサクロックの切替によって不具合が生じることを防いで、実行中の動作を正常に継続させることが可能なマイコンのクロック制御回路を提供することを目的とする。   The present invention has been made in view of such a problem, and provides a clock control circuit for a microcomputer that can prevent a problem from being caused by switching of a processor clock and can continue an operation being executed normally. The purpose is to do.

上記課題を解決するために、本発明の代表的な構成は、プロセッサのプロセッサクロックを変更可能なマイコンのクロック制御回路において、入力クロックを分周または逓倍してプロセッサクロックを生成する分周器または逓倍器と、プロセッサクロックと他の回路のクロックとの同期タイミングを検出して、分周器または逓倍器に対し分周比または逓倍比の変更を指示する変更イネーブル信号を出力する変更イネーブル回路と、を備えることを特徴とする。   In order to solve the above-described problem, a typical configuration of the present invention includes a frequency divider that generates a processor clock by dividing or multiplying an input clock in a clock control circuit of a microcomputer that can change a processor clock of a processor. A change enable circuit that detects a synchronization timing of the multiplier and a clock of another circuit and outputs a change enable signal that instructs the divider or the multiplier to change the division ratio or the multiplication ratio; It is characterized by providing.

上記構成によれば、プロセッサクロックの周波数の切替はプロセッサクロックを生成する分周器の分周比(または逓倍器の逓倍比)の変更によって行われるが、この変更はプロセッサクロックと他の回路のクロックとの同期タイミングを検出して変更イネーブル信号が出力されることにより実施される。そのため、プロセッサクロックと他の回路のクロックとの同期関係を維持したまま、プロセッサクロックの周波数を上げることも、下げることも可能となる。したがって、プロセッサクロックの周波数の切替によって不具合が生じることを防いで、実行中の動作を正常に継続させることが可能となる。   According to the above configuration, the switching of the frequency of the processor clock is performed by changing the division ratio of the frequency divider that generates the processor clock (or the multiplication ratio of the multiplier). This change is performed between the processor clock and other circuits. This is implemented by detecting the synchronization timing with the clock and outputting the change enable signal. Therefore, it is possible to increase or decrease the frequency of the processor clock while maintaining the synchronous relationship between the processor clock and the clocks of other circuits. Therefore, it is possible to prevent a problem from occurring due to switching of the frequency of the processor clock and to continue the operation being executed normally.

上記課題を解決するために、本発明の他の代表的な構成は、プロセッサのプロセッサクロックを変更可能なマイコンのクロック制御回路において、入力クロックを分周または逓倍してプロセッサクロックを生成し、且つプロセッサクロックより前にクロック予告信号を出力する分周器と、入力クロックを分周または逓倍して他の回路のクロックを生成し、且つ他の回路のクロックより前にクロック予告信号を出力する分周器または逓倍器と、それぞれのクロック予告信号に基づいてプロセッサクロックと他の回路のクロックとの同期タイミングを検知し、それぞれの分周器または逓倍器に対し分周比または逓倍比の変更を指示する変更イネーブル信号を出力する変更イネーブル回路と、を備えることを特徴とする。   In order to solve the above problems, another typical configuration of the present invention is to generate a processor clock by dividing or multiplying an input clock in a microcomputer clock control circuit capable of changing a processor clock of a processor, and A divider that outputs a clock warning signal before the processor clock, a clock that generates a clock for another circuit by dividing or multiplying the input clock, and a clock warning signal that is output before the clock for the other circuit The synchronization timing of the processor clock and the clocks of other circuits is detected based on the clock notice signal of the frequency divider or multiplier, and the division ratio or multiplication ratio is changed for each frequency divider or multiplier. A change enable circuit for outputting a change enable signal to be instructed.

上記構成によれば、クロック予告信号により、プロセッサクロックと他の回路のクロックとの直後の同期タイミングが変更イネーブル回路にて予め検知され、変更イネーブル信号が出力される。これにより、プロセッサクロックの周波数が高く、同期タイミングを検出してから変更イネーブル信号を出力したのでは分周比の変更が間に合わない場合にも対応可能となる。   According to the above configuration, the change enable circuit detects in advance the synchronization timing immediately after the processor clock and the clock of another circuit based on the clock notice signal, and the change enable signal is output. As a result, it is possible to cope with the case where the frequency of the processor clock is high and the change of the division ratio is not in time when the change enable signal is output after detecting the synchronization timing.

上記課題を解決するために、本発明の他の代表的な構成は、プロセッサのプロセッサクロックを変更可能なマイコンのクロック制御回路において、入力クロックを分周または逓倍してプロセッサクロックを生成する分周器または逓倍器と、入力クロックを分周または逓倍して他の回路のクロックを生成し、且つ他の回路のクロックより前にクロック予告信号を出力する分周器または逓倍器と、クロック予告信号に基づいてプロセッサクロックのタイミングをずらし、他の回路のクロックとの同期関係を維持する同期化回路と、を備えることを特徴とする。   In order to solve the above-described problem, another typical configuration of the present invention is a frequency division for generating a processor clock by dividing or multiplying an input clock in a microcomputer clock control circuit capable of changing a processor clock of a processor. A frequency divider or a multiplier, a frequency divider or a multiplier for generating a clock of another circuit by dividing or multiplying an input clock, and outputting a clock warning signal before the clock of the other circuit, and a clock warning signal And a synchronization circuit that shifts the timing of the processor clock based on the above and maintains the synchronization relationship with the clocks of other circuits.

上記構成によれば、プロセッサクロックと他の回路のクロックとの同期関係を維持するように、同期化回路がクロック予告信号に基づいてプロセッサクロックのタイミングを調整する。そのため、プロセッサクロックの切替に際し、プロセッサクロックを生成する分周器の分周比(または逓倍器の逓倍比)の変更を他の回路のクロックとの同期タイミングまで待つことなく、即座に反映可能となる。   According to the above configuration, the synchronization circuit adjusts the timing of the processor clock based on the clock notice signal so that the synchronization relationship between the processor clock and the clocks of other circuits is maintained. Therefore, when changing the processor clock, it is possible to immediately reflect the change in the division ratio of the divider that generates the processor clock (or the multiplication ratio of the multiplier) without waiting until the timing of synchronization with the clock of another circuit. Become.

上記他の回路のクロックが、上記プロセッサに連携する周辺回路の周辺クロックまたは外部機器と通信を行う通信I/F回路の通信クロックであって、上記他の回路のクロックを生成する分周器または逓倍器の分周比または逓倍比が動作中に変更されないと好ましい。   The clock of the other circuit is a peripheral clock of a peripheral circuit cooperating with the processor or a communication clock of a communication I / F circuit that communicates with an external device, and a frequency divider that generates a clock of the other circuit or It is preferred that the divider ratio or multiplier ratio of the multiplier is not changed during operation.

上記構成によれば、周辺回路や通信I/F回路に一定のクロックが供給されるため、周辺回路の動作周波数が許容範囲を外れてしまったり、外部との通信速度が規定される通信I/F回路の通信動作が切断されてしまったりするのを回避できる。すなわち、実行中の周辺回路の処理動作、通信I/F回路の通信動作を正常に継続させることが可能となる。   According to the above configuration, since a constant clock is supplied to the peripheral circuit and the communication I / F circuit, the operation frequency of the peripheral circuit is out of the allowable range, or the communication I / O in which the communication speed with the outside is regulated. It is possible to avoid disconnecting the communication operation of the F circuit. That is, the processing operation of the peripheral circuit being executed and the communication operation of the communication I / F circuit can be normally continued.

本発明によれば、プロセッサクロックの切替によって不具合が生じることを防いで、実行中の動作を正常に継続させることが可能なマイコンのクロック制御回路を提供可能である。   According to the present invention, it is possible to provide a clock control circuit for a microcomputer that can prevent a problem caused by switching of processor clocks and can normally continue an operation being executed.

本発明の第1実施形態にかかるマイコンのクロック制御回路の概略構成を示すブロック図を示す図である。It is a figure which shows the block diagram which shows schematic structure of the clock control circuit of the microcomputer concerning 1st Embodiment of this invention. 図1に示すマイコンのクロック制御回路のターボ動作切替時のタイミングチャートである。2 is a timing chart when switching the turbo operation of the clock control circuit of the microcomputer shown in FIG. 図1に示すマイコンのクロック制御回路の低速動作切替時のタイミングチャートである。2 is a timing chart when switching a low-speed operation of the clock control circuit of the microcomputer shown in FIG. 本発明の第2実施形態にかかるマイコンのクロック制御回路の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the clock control circuit of the microcomputer concerning 2nd Embodiment of this invention. 図4に示すマイコンのクロック制御回路のターボ動作切替時のタイミングチャートである。FIG. 5 is a timing chart when switching the turbo operation of the clock control circuit of the microcomputer shown in FIG. 4. FIG. 本発明の第3実施形態にかかるマイコンのクロック制御回路の概略構成を示すブロック図を示す図である。It is a figure which shows the block diagram which shows schematic structure of the clock control circuit of the microcomputer concerning 3rd Embodiment of this invention. 図6に示すマイコンのクロック制御回路のターボ動作切替時のタイミングチャートである。It is a timing chart at the time of turbo operation switching of the clock control circuit of the microcomputer shown in FIG. 本発明に対する比較例としてのマイコンのクロック制御回路の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the clock control circuit of the microcomputer as a comparative example with respect to this invention.

以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。かかる実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示に過ぎず、特に断る場合を除き、本発明を限定するものではない。なお、本明細書および図面において、実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略し、また本発明に直接関係のない要素は図示を省略する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The dimensions, materials, and other specific numerical values shown in the embodiments are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified. In the present specification and drawings, elements having substantially the same function and configuration are denoted by the same reference numerals, and redundant description is omitted, and elements not directly related to the present invention are not illustrated. To do.

[第1実施形態]
図1は、本発明の第1実施形態にかかるマイコンのクロック制御回路(以下「クロック制御回路110」と称する)の概略構成を示すブロック図である。図1に示すように、第1実施形態では、マイコン100が、プロセッサ102、周辺回路104、通信I/F回路106、バス108、クロック制御回路110を含んで構成される。クロック制御回路110は、逓倍器112、分周器114、116、118、変更イネーブルレジスタ120、変更イネーブル回路122、クロック設定レジスタ124を備える。マイコン100は、例えばフィールド機器に利用される。
[First embodiment]
FIG. 1 is a block diagram showing a schematic configuration of a clock control circuit (hereinafter referred to as “clock control circuit 110”) of the microcomputer according to the first embodiment of the present invention. As shown in FIG. 1, in the first embodiment, the microcomputer 100 includes a processor 102, a peripheral circuit 104, a communication I / F circuit 106, a bus 108, and a clock control circuit 110. The clock control circuit 110 includes a multiplier 112, frequency dividers 114, 116, and 118, a change enable register 120, a change enable circuit 122, and a clock setting register 124. The microcomputer 100 is used for, for example, a field device.

プロセッサ102、周辺回路104、通信I/F回路106、変更イネーブルレジスタ120、クロック設定レジスタ124は、バス108を介してそれぞれ接続される。プロセッサ102は、ソフトウェアを動作させるためのハードウェアであり主体的に演算処理を実施する。周辺回路104は、プロセッサ102に連携して所定の処理動作を実施するハードウェアであり、各種コントローラやROM、RAM等である。通信I/F回路106は、通信バス126を介して、外部機器と通信を行う。   The processor 102, peripheral circuit 104, communication I / F circuit 106, change enable register 120, and clock setting register 124 are connected via the bus 108. The processor 102 is hardware for operating software, and mainly performs arithmetic processing. The peripheral circuit 104 is hardware that performs a predetermined processing operation in cooperation with the processor 102, and includes various controllers, a ROM, a RAM, and the like. The communication I / F circuit 106 communicates with an external device via the communication bus 126.

逓倍器112は、外部クロック128を逓倍して、分周器114、116、118に入力される入力クロックとしてのPLLクロック130を生成する。分周器114は、PLLクロック130を分周して、プロセッサ102に供給するプロセッサクロック132を生成する。分周器116は、周辺回路104に供給する周辺クロック134(他の回路のクロック)を生成する。分周器118は、通信I/F回路106に供給する通信クロック136(他の回路のクロック)を生成する。PLLクロック130、プロセッサクロック132、周辺クロック134、通信クロック136は、変更イネーブル回路122に対しても供給される。   The multiplier 112 multiplies the external clock 128 to generate a PLL clock 130 as an input clock that is input to the frequency dividers 114, 116, and 118. The frequency divider 114 divides the PLL clock 130 to generate a processor clock 132 to be supplied to the processor 102. The frequency divider 116 generates a peripheral clock 134 (a clock of another circuit) to be supplied to the peripheral circuit 104. The frequency divider 118 generates a communication clock 136 (a clock of another circuit) to be supplied to the communication I / F circuit 106. The PLL clock 130, the processor clock 132, the peripheral clock 134, and the communication clock 136 are also supplied to the change enable circuit 122.

クロック設定レジスタ124には、逓倍器112の逓倍比およびそれぞれの分周器114、116、118の分周比が設定される。クロック設定レジスタ124は、設定された逓倍比を逓倍比設定信号142として、設定されたそれぞれの分周比を分周比設定信号144、146、148として、逓倍器112、それぞれの分周器114、116、118に出力する。   In the clock setting register 124, the multiplication ratio of the multiplier 112 and the division ratios of the frequency dividers 114, 116, and 118 are set. The clock setting register 124 uses the set multiplication ratio as the multiplication ratio setting signal 142, the set division ratios as the division ratio setting signals 144, 146, and 148, and the multiplier 112 and the respective dividers 114. , 116, 118.

クロック制御回路110では、クロック設定レジスタ124に新たな分周比が設定されても、即座に分周器114、116、118にその新たな分周比が反映されることはない。分周器114、116、118の分周比の変更は、所定の手順を経て実行される。所定の手順とは、下記1)から4)までの手順である。   In the clock control circuit 110, even if a new division ratio is set in the clock setting register 124, the new division ratio is not immediately reflected in the frequency dividers 114, 116, and 118. The frequency division ratios of the frequency dividers 114, 116, and 118 are changed through a predetermined procedure. The predetermined procedure is a procedure from 1) to 4) below.

1)プロセッサ102がクロック設定レジスタ124に新たな分周比を設定するのに伴い、その新たな分周比の設定有効を示すデータを変更イネーブルレジスタ120に書込。2)変更イネーブルレジスタ120が変更イネーブル回路122に分周比変更要求信号138を出力。3)分周比変更要求信号138を検知した変更イネーブル回路122が、プロセッサクロック132、周辺クロック134、通信クロック136の有効エッジの同期タイミングを検出して、分周器114、116、118に分周比の変更を指示する変更イネーブル信号140を出力。4)分周器114、116、118が変更イネーブル信号140を検知して、クロック設定レジスタ124から出力される分周比設定信号144、146、148が指示する分周比に変更。   1) As the processor 102 sets a new division ratio in the clock setting register 124, data indicating that the new division ratio is valid is written in the change enable register 120. 2) The change enable register 120 outputs a division ratio change request signal 138 to the change enable circuit 122. 3) The change enable circuit 122 that has detected the division ratio change request signal 138 detects the synchronization timing of the valid edges of the processor clock 132, the peripheral clock 134, and the communication clock 136, and divides them into the frequency dividers 114, 116, and 118. A change enable signal 140 for instructing a change in the ratio is output. 4) The frequency dividers 114, 116, 118 detect the change enable signal 140 and change the frequency division ratio to the one indicated by the frequency division ratio setting signals 144, 146, 148 output from the clock setting register 124.

以下、具体例を挙げて、クロック制御回路110の動作について説明する。図2は、クロック制御回路110のターボ動作切替時のタイミングチャートである。図3は、クロック制御回路110の低速動作切替時のタイミングチャートである。図2では、模式的に、プロセッサクロック132を生成する分周器114の分周比を4(4分周)、周辺クロック134を生成する分周器116の分周比を8(8分周)、通信クロック136を生成する分周器118の分周比を16(16分周)とし、ターボ動作への切替としてプロセッサクロック132を生成する分周器114の分周比を2(2分周)に変更する場合について図示する。図3では、ターボ動作からプロセッサクロック132の周波数を下げて再度元の状態に戻す(分周器114の分周比を4(4分周)にする)低速動作への切替について図示する。   Hereinafter, the operation of the clock control circuit 110 will be described with a specific example. FIG. 2 is a timing chart when the clock control circuit 110 switches the turbo operation. FIG. 3 is a timing chart when the clock control circuit 110 is switched at a low speed. In FIG. 2, the frequency division ratio of the frequency divider 114 that generates the processor clock 132 is schematically 4 (frequency division by 4), and the frequency division ratio of the frequency divider 116 that generates the peripheral clock 134 is 8 (frequency division by 8). ), The frequency dividing ratio of the frequency divider 118 that generates the communication clock 136 is set to 16 (frequency division of 16), and the frequency dividing ratio of the frequency divider 114 that generates the processor clock 132 as the switching to the turbo operation is set to 2 (2 frequency division). The case of changing to (lap) is illustrated. FIG. 3 illustrates switching from the turbo operation to the low speed operation in which the frequency of the processor clock 132 is lowered and returned to the original state (the frequency dividing ratio of the frequency divider 114 is set to 4 (divided by 4)).

図2に示すように、システム動作開始後、プロセッサ102が過負荷状態となりターボ動作が必要な状態に陥ると、プロセッサ102はバス108経由でクロック設定レジスタ124に分周器114の新たな分周比として2(2分周)を設定する。クロック設定レジスタ124に設定された新たな分周比の2は、分周比設定信号144として分周器114に出力される。   As shown in FIG. 2, after the system operation starts, when the processor 102 is overloaded and the turbo operation is necessary, the processor 102 adds a new frequency divider 114 to the clock setting register 124 via the bus 108. The ratio is set to 2 (divided by 2). The new frequency division ratio of 2 set in the clock setting register 124 is output to the frequency divider 114 as the frequency division ratio setting signal 144.

プロセッサ102は、クロック設定レジスタ124から出力される分周比設定値144を有効にするために、設定有効を示すデータを変更イネーブルレジスタ120に書き込む。変更イネーブルレジスタ120は、その設定有効を示すデータの書込を受けて、分周比変更要求信号138を変更イネーブル回路122に出力し、分周比の変更要求が発生したことを変更イネーブル回路122に伝達する。   The processor 102 writes data indicating the setting valid to the change enable register 120 in order to validate the frequency division ratio setting value 144 output from the clock setting register 124. The change enable register 120 receives the writing of the data indicating that the setting is valid, and outputs a frequency division ratio change request signal 138 to the change enable circuit 122 to indicate that the frequency division ratio change request has occurred. To communicate.

変更イネーブル回路122は分周比変更要求信号138を検知すると、PLLクロック130に同期してプロセッサクロック132、周辺クロック134、通信クロック136の全てが立ち上がるタイミング(同期タイミング)を検出する。そして、この同期タイミングの検出に伴い、分周器114、116、118に分周比の変更を指示する変更イネーブル信号140を出力する。ここでは、PLLクロック130の1サイクル分、変更イネーブル信号140を出力する。変更イネーブル信号140は変更イネーブルレジスタ120にも供給され、これが検知されることで分周比変更要求信号138が停止される。   When the change enable circuit 122 detects the frequency division ratio change request signal 138, the change enable circuit 122 detects the timing (synchronization timing) at which all of the processor clock 132, the peripheral clock 134, and the communication clock 136 rise in synchronization with the PLL clock 130. Then, along with the detection of the synchronization timing, a change enable signal 140 that instructs the frequency dividers 114, 116, and 118 to change the frequency division ratio is output. Here, the change enable signal 140 is output for one cycle of the PLL clock 130. The change enable signal 140 is also supplied to the change enable register 120, and when this is detected, the frequency division ratio change request signal 138 is stopped.

分周器114、116、118では変更イネーブル信号140を検知すると、クロック設定レジスタ124から出力される分周比設定信号144、146、148が指示する分周比への変更を行う。これより、プロセッサクロック132を生成する分周器114の分周比が2に切り替えられ、ターボ動作によりプロセッサ102の処理能力が向上する。   When the frequency dividers 114, 116, 118 detect the change enable signal 140, the frequency dividers 114, 116, 118 change the frequency division ratios indicated by the frequency division ratio setting signals 144, 146, 148 output from the clock setting register 124. As a result, the frequency division ratio of the frequency divider 114 that generates the processor clock 132 is switched to 2, and the processing capability of the processor 102 is improved by the turbo operation.

なお、プロセッサクロック132は演算処理を主体的に担うプロセッサ102に供給されるものであり、その最大周波数は周辺クロック134の周波数よりも高く設定される。また、プロセッサ102に連携する周辺回路104の周辺クロック134の周波数は、通信クロック136の周波数よりも高く設定される。ターボ動作時のプロセッサクロック132の周波数は、切替後においても他の回路のクロック(周辺クロック134、通信クロック136)との同期関係を維持できるように設定される。   Note that the processor clock 132 is supplied to the processor 102 that mainly performs arithmetic processing, and the maximum frequency is set higher than the frequency of the peripheral clock 134. Further, the frequency of the peripheral clock 134 of the peripheral circuit 104 that cooperates with the processor 102 is set higher than the frequency of the communication clock 136. The frequency of the processor clock 132 during the turbo operation is set so as to maintain a synchronous relationship with clocks of other circuits (peripheral clock 134 and communication clock 136) even after switching.

図3に示すように、ターボ動作への切替後、プロセッサ102がターボ動作が不要であることを検出すると、プロセッサクロック132の周波数を低下させるために、プロセッサ102がバス108経由でクロック設定レジスタ124に分周器114の分周比として再び4(4分周)を設定する。クロック設定レジスタ124に設定された分周比の4は、分周比設定信号144として分周器114に出力される。   As shown in FIG. 3, after switching to turbo operation, when the processor 102 detects that turbo operation is not required, the processor 102 connects the clock setting register 124 via the bus 108 to reduce the frequency of the processor clock 132. 4 is again set as the frequency division ratio of the frequency divider 114 (4 frequency division). The division ratio of 4 set in the clock setting register 124 is output to the frequency divider 114 as the division ratio setting signal 144.

プロセッサ102は、クロック設定レジスタ124から出力される分周比設定値144を有効にするために、設定有効を示すデータを変更イネーブルレジスタ120に書き込む。変更イネーブルレジスタ120は、その設定有効を示すデータの書込を受けて、分周比変更要求信号138を変更イネーブル回路122に出力し、分周比の変更要求が発生したことを変更イネーブル回路122に伝達する。   The processor 102 writes data indicating the setting valid to the change enable register 120 in order to validate the frequency division ratio setting value 144 output from the clock setting register 124. The change enable register 120 receives the writing of the data indicating that the setting is valid, and outputs a frequency division ratio change request signal 138 to the change enable circuit 122 to indicate that the frequency division ratio change request has occurred. To communicate.

変更イネーブル回路122は分周比変更要求信号138を検知すると、PLLクロック130に同期してプロセッサクロック132、周辺クロック134、通信クロック136の全てが立ち上がるタイミング(同期タイミング)を検出する。そして、この同期タイミングの検出に伴い、分周器114、116、118に分周比の変更を指示する変更イネーブル信号140を出力する。   When the change enable circuit 122 detects the frequency division ratio change request signal 138, the change enable circuit 122 detects the timing (synchronization timing) at which all of the processor clock 132, the peripheral clock 134, and the communication clock 136 rise in synchronization with the PLL clock 130. Then, along with the detection of the synchronization timing, a change enable signal 140 that instructs the frequency dividers 114, 116, and 118 to change the frequency division ratio is output.

分周器114、116、118では変更イネーブル信号140を検知すると、クロック設定レジスタ124から出力される分周比設定信号144、146、148が指示する分周比への変更を行う。これより、プロセッサクロック132を生成する分周器114の分周比が再び4に切り替えられ、プロセッサクロック132の周波数が下げられる。プロセッサクロック132の周波数を下げることで、電力消費やマイコン100の発熱を抑えることができる。   When the frequency dividers 114, 116, 118 detect the change enable signal 140, the frequency dividers 114, 116, 118 change the frequency division ratios indicated by the frequency division ratio setting signals 144, 146, 148 output from the clock setting register 124. As a result, the frequency division ratio of the frequency divider 114 that generates the processor clock 132 is switched again to 4, and the frequency of the processor clock 132 is lowered. By reducing the frequency of the processor clock 132, power consumption and heat generation of the microcomputer 100 can be suppressed.

なお、ここではターボ動作から再び分周比を4に戻す場合について説明したが、これに限らずプロセッサクロックの周波数をさらに下げることも可能である。この場合においても、切替後も他の回路のクロック(周辺クロック134、通信クロック136)との同期関係を維持できるように、プロセッサクロック132の周波数を設定する。例えば、プロセッサクロック132の分周器114の分周比を8にしてよい。   Although the case where the frequency division ratio is returned to 4 again from the turbo operation has been described here, the present invention is not limited to this, and the frequency of the processor clock can be further reduced. Even in this case, the frequency of the processor clock 132 is set so that the synchronous relationship with the clocks of other circuits (peripheral clock 134, communication clock 136) can be maintained even after switching. For example, the frequency division ratio of the frequency divider 114 of the processor clock 132 may be set to 8.

上述した構成によれば、周辺回路104の周辺クロック134、通信I/F回路106の通信クロック136の周波数を変更せずに、プロセッサクロック132の周波数を上げたり、下げたりすることが可能である。周辺回路104や通信I/F回路106は、その動作実行中(処理動作中、通信動作中)に周波数が変更されると、その動作を正常に継続させることができなくなるおそれがある。例えば、通信I/F回路106の通信速度が9600bpsと設定されその通信速度で通信動作を実行している状態にて通信クロック136を上げると、外部機器との同期関係が崩れその通信動作を正常に継続させることができなくなるおそれがある。   According to the configuration described above, the frequency of the processor clock 132 can be increased or decreased without changing the frequencies of the peripheral clock 134 of the peripheral circuit 104 and the communication clock 136 of the communication I / F circuit 106. . If the frequency of the peripheral circuit 104 or the communication I / F circuit 106 is changed during the execution of the operation (during the processing operation or the communication operation), the operation may not be normally continued. For example, if the communication clock 136 is increased while the communication speed of the communication I / F circuit 106 is set to 9600 bps and the communication operation is being executed at the communication speed, the synchronization relationship with the external device is broken and the communication operation is normal. May not be able to continue.

ここでは、他の回路(周辺回路104、通信I/F回路106)の周波数の切替を伴わず、プロセッサクロック132の周波数を切り替えるため、その実行中の動作を正常に継続させることができる。プロセッサクロック132の周波数の切替は、変更イネーブル回路122が周辺クロック134と通信クロック136との同期タイミングを検出することで実施されるため、プロセッサクロック132の切替後においても、プロセッサクロック132と、周辺クロック134と、通信クロック136との同期関係を維持することが可能である。したがって、プロセッサ102から他の回路(周辺回路104、通信I/F回路106)へのアクセス中にプロセッサクロック132の切替が発生しても、その動作を正常に継続させることが可能である。   Here, since the frequency of the processor clock 132 is switched without switching the frequency of other circuits (peripheral circuit 104 and communication I / F circuit 106), the operation being executed can be normally continued. Switching of the frequency of the processor clock 132 is performed by the change enable circuit 122 detecting the synchronization timing of the peripheral clock 134 and the communication clock 136. Therefore, even after the switching of the processor clock 132, the processor clock 132 and the peripheral clock are switched. The synchronization relationship between the clock 134 and the communication clock 136 can be maintained. Therefore, even when the processor clock 132 is switched during access from the processor 102 to another circuit (peripheral circuit 104, communication I / F circuit 106), the operation can be normally continued.

なお、クロック制御回路110では、分周器116、118の分周比の変更を要しないわけではない。分周器116、118の分周比の変更を可能とすることで、マイコン100の対応できる幅が広がるため、製品間での共通利用を促進することができる。   In the clock control circuit 110, it is not necessary to change the frequency dividing ratio of the frequency dividers 116 and 118. By making it possible to change the frequency dividing ratios of the frequency dividers 116 and 118, the width that can be handled by the microcomputer 100 is widened, so that common use between products can be promoted.

(比較例)
図8は、本発明に対する比較例としてのマイコンのクロック制御回路(以下「クロック制御回路410」と称する)の概略構成を示すブロック図である。図8に示すように、本比較例では、マイコン400が、プロセッサ102、周辺回路104、通信I/F回路106、バス108、クロック制御回路410を含んで構成される。クロック制御回路410は、逓倍器112、分周器414、クロック設定レジスタ124を備える。
(Comparative example)
FIG. 8 is a block diagram showing a schematic configuration of a clock control circuit (hereinafter referred to as “clock control circuit 410”) of a microcomputer as a comparative example for the present invention. As shown in FIG. 8, in this comparative example, the microcomputer 400 includes a processor 102, a peripheral circuit 104, a communication I / F circuit 106, a bus 108, and a clock control circuit 410. The clock control circuit 410 includes a multiplier 112, a frequency divider 414, and a clock setting register 124.

比較例のクロック制御回路410では、逓倍器112が外部クロック128を逓倍して、PLLクロック130を生成する。分周器414は、PLLクロックを分周して、システムクロック430aを生成する。システムクロック430aから、プロセッサクロック432、周辺クロック434、通信クロック436が生成され、それぞれ、プロセッサ102、周辺回路104、通信I/F回路106に供給される。なお、逓倍器112の逓倍比、分周器414の分周比は、クロック設定レジスタ124から発せられる逓倍比設定信号142、分周比設定信号444が指示する値に設定される。   In the clock control circuit 410 of the comparative example, the multiplier 112 multiplies the external clock 128 to generate the PLL clock 130. The frequency divider 414 divides the PLL clock to generate a system clock 430a. A processor clock 432, a peripheral clock 434, and a communication clock 436 are generated from the system clock 430a and supplied to the processor 102, the peripheral circuit 104, and the communication I / F circuit 106, respectively. The multiplication ratio of the multiplier 112 and the division ratio of the frequency divider 414 are set to values indicated by the multiplication ratio setting signal 142 and the division ratio setting signal 444 issued from the clock setting register 124.

比較例のクロック制御回路410では、システム動作開始後、プロセッサ102が過負荷状態となりターボ動作が必要な状態に陥ると、プロセッサ102はバス108経由でクロック設定レジスタ124に逓倍器112の新たな逓倍比、分周器114の新たな分周比を設定する。クロック設定レジスタ124に設定された新たな逓倍比、新たな分周比は逓倍比設定信号142、分周比設定信号444として、逓倍器112、分周器414にそれぞれ出力され、反映される。これにより、システムクロック430aが高速に切り替えられ、プロセッサクロック432、周辺クロック434、通信クロック436の周波数が上げられる。   In the clock control circuit 410 of the comparative example, when the processor 102 is overloaded and the turbo operation is necessary after the system operation starts, the processor 102 adds a new multiplier 112 to the clock setting register 124 via the bus 108. A new frequency division ratio of the frequency divider 114 is set. The new multiplication ratio and the new division ratio set in the clock setting register 124 are output to the multiplier 112 and the frequency divider 414 as the multiplication ratio setting signal 142 and the division ratio setting signal 444, respectively, and reflected. As a result, the system clock 430a is switched at high speed, and the frequencies of the processor clock 432, the peripheral clock 434, and the communication clock 436 are increased.

なお、ターボ動作切替後、プロセッサ102がターボ動作が不要であることを検出すると、上記と同様の手順でシステムクロック430aが低速に切り替えられ、プロセッサクロック432、周辺クロック434、通信クロック436の周波数が下げられる。   If the processor 102 detects that the turbo operation is unnecessary after switching the turbo operation, the system clock 430a is switched to a low speed in the same procedure as described above, and the frequencies of the processor clock 432, the peripheral clock 434, and the communication clock 436 are changed. Be lowered.

上述した比較例では、システムクロック430aの切替に伴い、周辺回路104や通信I/F回路106のクロック周波数も切り替えられる。そのため、周辺回路104や通信I/F回路106は、その実行中の動作を正常に継続させることができなくなるおそれがある。これに対し、第1実施形態にかかるクロック制御回路110によれば、プロセッサクロックの切替によって不具合が生じることを防いで、実行中の動作を正常に継続させることが可能である。   In the comparative example described above, the clock frequency of the peripheral circuit 104 and the communication I / F circuit 106 is also switched with the switching of the system clock 430a. Therefore, there is a possibility that the peripheral circuit 104 and the communication I / F circuit 106 cannot normally continue the operation being executed. On the other hand, according to the clock control circuit 110 according to the first embodiment, it is possible to prevent a problem from occurring due to switching of the processor clock, and to continue the operation being executed normally.

(応用例)
第1実施形態にかかるクロック制御回路110の応用例としては、他の回路(周辺回路104、通信I/F回路106)のアイドル状態が検出できていることを条件に、他の回路との同期タイミングを待たず、分周比変更要求信号138が出力されたタイミングで全分周器114、116、118同時に分周比を変更してもよい。これにより、各クロック間の同期関係を維持し、不具合を生じさせることなくプロセッサクロックを迅速に切り替えることが可能である。
(Application examples)
As an application example of the clock control circuit 110 according to the first embodiment, it is possible to synchronize with other circuits on condition that the idle state of other circuits (the peripheral circuit 104 and the communication I / F circuit 106) can be detected. It is also possible to change the frequency division ratio at the same time as all the frequency dividers 114, 116, 118 at the timing when the frequency division ratio change request signal 138 is output without waiting for the timing. As a result, the synchronization relationship between the clocks can be maintained, and the processor clocks can be switched quickly without causing a problem.

[第2実施形態]
図4は、本発明の第2実施形態にかかるマイコンのクロック制御回路(以下「クロック制御回路210」と称する)の概略構成を示すブロック図である。図4に示すように、第2実施形態では、マイコン200におけるクロック制御回路210が、プロセッサクロック132を生成する分周器114、周辺クロック134を生成する分周器116、通信クロック136を生成する分周器118を備える。
[Second Embodiment]
FIG. 4 is a block diagram showing a schematic configuration of a clock control circuit (hereinafter referred to as “clock control circuit 210”) of the microcomputer according to the second embodiment of the present invention. As shown in FIG. 4, in the second embodiment, the clock control circuit 210 in the microcomputer 200 generates the frequency divider 114 that generates the processor clock 132, the frequency divider 116 that generates the peripheral clock 134, and the communication clock 136. A frequency divider 118 is provided.

分周器114はプロセッサクロック132より前にクロック予告信号254を出力し、分周器116は周辺クロック134より前にクロック予告信号256を出力し、分周器118は通信クロック136より前にクロック予告信号258を出力する。変更イネーブル回路222は、このクロック予告信号254、256、258に基づきプロセッサクロック132、周辺クロック134、通信クロック136の同期タイミングを検知し、それぞれの分周器114、116、118に対し変更イネーブル信号140を出力する。   The frequency divider 114 outputs a clock warning signal 254 before the processor clock 132, the frequency divider 116 outputs a clock warning signal 256 before the peripheral clock 134, and the frequency divider 118 clocks before the communication clock 136. A notice signal 258 is output. The change enable circuit 222 detects the synchronization timing of the processor clock 132, the peripheral clock 134, and the communication clock 136 based on the clock notice signals 254, 256, and 258, and changes enable signals to the frequency dividers 114, 116, and 118, respectively. 140 is output.

図5は、クロック制御回路210のターボ動作切替時のタイミングチャートである。図5に示すように、第2実施形態では、変更イネーブル回路222がクロック予告信号254、256、258により、プロセッサクロック132、周辺クロック134、通信クロック136の直後の同期タイミングを予め検知することで、変更イネーブル信号140が第1実施形態よりも早期に出力される。そのため、プロセッサクロック132の周波数が高く、同期タイミングを検出してから変更イネーブル信号140を出力したのでは分周比の変更が間に合わない場合にも対応可能である。   FIG. 5 is a timing chart when the clock control circuit 210 switches the turbo operation. As shown in FIG. 5, in the second embodiment, the change enable circuit 222 detects in advance the synchronization timing immediately after the processor clock 132, the peripheral clock 134, and the communication clock 136 based on the clock notice signals 254, 256, and 258. The change enable signal 140 is output earlier than in the first embodiment. Therefore, the case where the frequency of the processor clock 132 is high and the change enable signal 140 is output after the synchronization timing is detected cannot be changed in time.

なお、フィールド機器のように供給電力が限られている場合には、変更イネーブルレジスタ120が分周比変更要求信号138を出力している場合のみ、クロック予告信号254、256、258を出力するように構成するとよい。これにより、常時クロック予告信号254、256、258を出力する必要がないので、省電力化を図ることができる。   When the power supply is limited as in a field device, the clock notice signals 254, 256, and 258 are output only when the change enable register 120 outputs the division ratio change request signal 138. It is good to configure. As a result, it is not necessary to always output the clock notice signals 254, 256, and 258, so that power saving can be achieved.

[第3実施形態]
図6は、本発明の第3実施形態にかかるマイコンのクロック制御回路(以下「クロック制御回路310」と称する)の概略構成を示すブロック図を示す図である。図6に示すように、第3実施形態ではマイコン300におけるクロック制御回路310が同期化回路322を備える点で上記第2実施形態と異なる。以下、この同期化回路322の働きについて説明する。なお、第2実施形態と実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略する。
[Third embodiment]
FIG. 6 is a block diagram showing a schematic configuration of a clock control circuit (hereinafter referred to as “clock control circuit 310”) of the microcomputer according to the third embodiment of the present invention. As shown in FIG. 6, the third embodiment is different from the second embodiment in that a clock control circuit 310 in a microcomputer 300 includes a synchronization circuit 322. Hereinafter, the operation of the synchronization circuit 322 will be described. In addition, about the element which has the function and structure substantially the same as 2nd Embodiment, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.

図7は、クロック制御回路310のターボ動作切替時のタイミングチャートである。図7に示すように、第3実施形態では、クロック設定レジスタ124から分周比設定信号144として分周器114の新たな分周比が出力されると、その新たな分周比が即座に反映される。周辺クロック134、通信クロック136との同期タイミングを待たずして分周器114の分周比が反映されるため、すぐにプロセッサ102の処理能力を高めることができる。しかしながら、そのままではプロセッサクロック132と、周辺クロック134、通信クロック136との同期関係が維持されなくなるため、データの取りこぼしが生じてしまったり、正常な動作の継続が難しくなってしまったりするおそれがある。   FIG. 7 is a timing chart when the clock control circuit 310 switches the turbo operation. As shown in FIG. 7, in the third embodiment, when a new division ratio of the frequency divider 114 is output as the division ratio setting signal 144 from the clock setting register 124, the new division ratio is immediately set. Reflected. Since the frequency division ratio of the frequency divider 114 is reflected without waiting for the synchronization timing with the peripheral clock 134 and the communication clock 136, the processing capability of the processor 102 can be immediately increased. However, since the synchronization relationship between the processor clock 132, the peripheral clock 134, and the communication clock 136 is not maintained as it is, there is a possibility that data is lost or it is difficult to continue normal operation. .

そこで同期化回路322は、周辺クロック134、通信クロック136が同期するタイミングで、プロセッサクロック132も同期してクロックを出すように調整する。ただし、単に他の回路との同期タイミングにあわせてプロセッサクロック132を出力すると、直前の立ち上がり(パルス)との間隔が、その時点でのプロセッサクロック132の周期以下になるため、瞬間的に高い周波数でプロセッサ102を動作させることになる。この高い周波数がプロセッサ102の動作可能周波数の範囲を超えると、プロセッサ102がハングアップしたり、リセットがかかったり、誤動作したりするおそれがある。   Therefore, the synchronization circuit 322 adjusts the processor clock 132 to synchronize and output the clock at the timing when the peripheral clock 134 and the communication clock 136 are synchronized. However, if the processor clock 132 is simply output in synchronization with the synchronization timing with other circuits, the interval from the immediately preceding rising edge (pulse) is less than or equal to the period of the processor clock 132 at that time, so an instantaneously high frequency Thus, the processor 102 is operated. If this high frequency exceeds the operable frequency range of the processor 102, the processor 102 may hang up, be reset, or malfunction.

そこで同期化回路322は、他の回路(周辺クロック134、通信クロック136)のクロック予告信号256、258に基づいて、他の回路のクロックが同期するタイミングが到来することを検知したときには、その同期タイミングの直前のプロセッサクロック132の出力を間引いて、待ち構えて、同期タイミングでクロックを出すように処理をする。図7では、同期化回路322が同期タイミング直前のプロセッサクロック132の立ち上がり(パルス)を停止して、周辺クロック134、通信クロック136との同期タイミングに合わせている。   Therefore, when the synchronization circuit 322 detects that the timing for synchronizing the clocks of the other circuits has arrived based on the clock notice signals 256 and 258 of the other circuits (peripheral clock 134, communication clock 136), the synchronization is performed. The output of the processor clock 132 immediately before the timing is thinned out, waits for processing to output the clock at the synchronous timing. In FIG. 7, the synchronization circuit 322 stops the rise (pulse) of the processor clock 132 immediately before the synchronization timing and matches the synchronization timing with the peripheral clock 134 and the communication clock 136.

これにより、プロセッサ102の動作周波数が異常に高くなってしまうことを防止しつつ、同期タイミングでプロセッサクロック132を出力することができる。したがって、プロセッサ102を安全に動作継続させることができる。なお、上記の動作を実現するためには、他の回路のクロック予告信号256、258を、プロセッサクロック132の1クロック分より前に出力する必要がある。   As a result, the processor clock 132 can be output at the synchronization timing while preventing the operating frequency of the processor 102 from becoming abnormally high. Therefore, it is possible to continue the operation of the processor 102 safely. In order to realize the above-described operation, it is necessary to output the clock notice signals 256 and 258 of other circuits before one clock of the processor clock 132.

すなわち第3実施形態の構成によれば、プロセッサクロック132の分周比を変更する要求を即座に反映して高い処理能力を得ると共に、プロセッサ102の動作を正常に継続させつつ他の回路との同期を取ることができる。   That is, according to the configuration of the third embodiment, a request to change the division ratio of the processor clock 132 is immediately reflected to obtain a high processing capability, and the operation of the processor 102 can be continued normally and Can be synchronized.

以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる例に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although preferred embodiment of this invention was described referring an accompanying drawing, it cannot be overemphasized that this invention is not limited to this example. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Understood.

例えば、本実施形態ではプロセッサクロック132を生成する分周器114、116、118の分周比を変更する構成について説明したが、分周器に代えて逓倍器の逓倍比を変更する構成としてもよいし、分周器と逓倍器を組み合わせて任意の倍率のクロックを生成する構成としてもよい。   For example, in the present embodiment, the configuration in which the frequency division ratios of the frequency dividers 114, 116, and 118 that generate the processor clock 132 are changed has been described. However, the frequency division ratio of the multiplier may be changed in place of the frequency divider. Alternatively, it may be configured to generate a clock having an arbitrary magnification by combining a frequency divider and a multiplier.

本発明は、プロセッサクロックを切替可能なマイコンのクロック制御回路に利用することができる。   The present invention can be used for a clock control circuit of a microcomputer that can switch a processor clock.

100、200、300…マイコン、102…プロセッサ、104…周辺回路、106…通信I/F回路、108…バス、110、210、310…クロック制御回路、112…逓倍器、114、116、118…分周器、120…変更イネーブルレジスタ、122、222…変更イネーブル回路、124…クロック設定レジスタ、126…通信バス、128…外部クロック、130…PLLクロック(入力クロック)、132…プロセッサクロック、134…周辺クロック、136…通信クロック、138…分周比変更要求信号、140…変更イネーブル信号、142…逓倍比設定信号、144、146、148…分周比設定信号、254、256、258…クロック予告信号、322…同期化回路 DESCRIPTION OF SYMBOLS 100, 200, 300 ... Microcomputer, 102 ... Processor, 104 ... Peripheral circuit, 106 ... Communication I / F circuit, 108 ... Bus, 110, 210, 310 ... Clock control circuit, 112 ... Multiplier, 114, 116, 118 ... Frequency divider, 120 ... change enable register, 122, 222 ... change enable circuit, 124 ... clock setting register, 126 ... communication bus, 128 ... external clock, 130 ... PLL clock (input clock), 132 ... processor clock, 134 ... Peripheral clock, 136 ... Communication clock, 138 ... Division ratio change request signal, 140 ... Change enable signal, 142 ... Multiplication ratio setting signal, 144,146,148 ... Division ratio setting signal, 254, 256, 258 ... Clock notice Signal, 322 ... Synchronization circuit

Claims (4)

プロセッサのプロセッサクロックを変更可能なマイコンのクロック制御回路において、
入力クロックを分周または逓倍して、前記プロセッサクロックを生成する分周器または逓倍器と、
前記プロセッサクロックと他の回路のクロックとの同期タイミングを検出して、前記分周器または逓倍器に対し分周比または逓倍比の変更を指示する変更イネーブル信号を出力する変更イネーブル回路と、
を備えることを特徴とするマイコンのクロック制御回路。
In the microcomputer clock control circuit that can change the processor clock of the processor,
A frequency divider or multiplier for dividing or multiplying an input clock to generate the processor clock; and
A change enable circuit that detects a synchronization timing of the processor clock and a clock of another circuit and outputs a change enable signal that instructs the frequency divider or multiplier to change the division ratio or the multiplication ratio;
A microcomputer clock control circuit comprising:
プロセッサのプロセッサクロックを変更可能なマイコンのクロック制御回路において、
入力クロックを分周または逓倍して前記プロセッサクロックを生成し、且つ該プロセッサクロックより前にクロック予告信号を出力する分周器または逓倍器と、
入力クロックを分周または逓倍して他の回路のクロックを生成し、且つ該他の回路のクロックより前にクロック予告信号を出力する分周器または逓倍器と、
それぞれの前記クロック予告信号に基づいて前記プロセッサクロックと前記他の回路のクロックとの同期タイミングを検知し、それぞれの前記分周器または逓倍器に対し分周比または逓倍比の変更を指示する変更イネーブル信号を出力する変更イネーブル回路と、
を備えることを特徴とするマイコンのクロック制御回路。
In the microcomputer clock control circuit that can change the processor clock of the processor,
A frequency divider or a multiplier for dividing or multiplying an input clock to generate the processor clock and outputting a clock warning signal before the processor clock;
A frequency divider or a multiplier for dividing or multiplying an input clock to generate a clock for another circuit and outputting a clock warning signal before the clock for the other circuit;
A change that detects the synchronization timing of the processor clock and the clock of the other circuit based on the clock notice signal and instructs the frequency divider or multiplier to change the division ratio or the multiplication ratio. A change enable circuit for outputting an enable signal;
A microcomputer clock control circuit comprising:
プロセッサのプロセッサクロックを変更可能なマイコンのクロック制御回路において、
入力クロックを分周または逓倍して前記プロセッサクロックを生成する分周器または逓倍器と、
入力クロックを分周または逓倍して他の回路のクロックを生成し、且つ該他の回路のクロックより前にクロック予告信号を出力する分周器または逓倍器と、
前記クロック予告信号に基づいて前記プロセッサクロックのタイミングをずらし、前記他の回路のクロックとの同期関係を維持する同期化回路と、
を備えることを特徴とするマイコンのクロック制御回路。
In the microcomputer clock control circuit that can change the processor clock of the processor,
A divider or multiplier for dividing or multiplying an input clock to generate the processor clock;
A frequency divider or a multiplier for dividing or multiplying an input clock to generate a clock for another circuit and outputting a clock warning signal before the clock for the other circuit;
A synchronization circuit that shifts the timing of the processor clock based on the clock notice signal and maintains a synchronous relationship with the clock of the other circuit;
A microcomputer clock control circuit comprising:
前記他の回路のクロックが、前記プロセッサに連携する周辺回路の周辺クロックまたは外部機器と通信を行う通信I/F回路の通信クロックであって、前記他の回路のクロックを生成する分周器または逓倍器の分周比または逓倍比が動作中に変更されないことを特徴とする請求項1から3のいずれか1項に記載のマイコンのクロック制御回路。   The clock of the other circuit is a peripheral clock of a peripheral circuit that cooperates with the processor or a communication clock of a communication I / F circuit that communicates with an external device, and a frequency divider that generates a clock of the other circuit or 4. The microcomputer clock control circuit according to claim 1, wherein a frequency division ratio or a frequency multiplication ratio of the multiplier is not changed during operation.
JP2011139381A 2011-06-23 2011-06-23 Clock control circuit for microcomputer Withdrawn JP2013008133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011139381A JP2013008133A (en) 2011-06-23 2011-06-23 Clock control circuit for microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011139381A JP2013008133A (en) 2011-06-23 2011-06-23 Clock control circuit for microcomputer

Publications (1)

Publication Number Publication Date
JP2013008133A true JP2013008133A (en) 2013-01-10

Family

ID=47675448

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011139381A Withdrawn JP2013008133A (en) 2011-06-23 2011-06-23 Clock control circuit for microcomputer

Country Status (1)

Country Link
JP (1) JP2013008133A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016062355A (en) * 2014-09-18 2016-04-25 キヤノン株式会社 Semiconductor integrated circuit, device having the same, method of controlling clocks in semiconductor integrated circuit, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016062355A (en) * 2014-09-18 2016-04-25 キヤノン株式会社 Semiconductor integrated circuit, device having the same, method of controlling clocks in semiconductor integrated circuit, and program

Similar Documents

Publication Publication Date Title
US6600345B1 (en) Glitch free clock select switch
KR100379766B1 (en) Pll system clock generator with instantaneous clock frequency shifting
US5790609A (en) Apparatus for cleanly switching between various clock sources in a data processing system
EP0840195B1 (en) An apparatus and method for sequencing clocks in a data processing system
JPH04113718A (en) Hitless clock switching device
US6819150B1 (en) Method and apparatus for quick clock swapping using much slower asynchronous clock for power savings
US10296065B2 (en) Clock management using full handshaking
WO2001033342A1 (en) Digital signal processing circuit and method
CN117075683A (en) Clock gating component, multiplexer component and frequency dividing component
JP4136822B2 (en) Semiconductor integrated circuit device, clock control method, and data transfer control method
JP2014090344A (en) Clock signal initialization circuit and method
CN102751982B (en) Clock selection circuit suitable for backboard spending treatment of communication equipment
JP2013008133A (en) Clock control circuit for microcomputer
JPWO2012081196A1 (en) Signal selection circuit and signal selection method
JP2019028651A (en) Synchronous reset circuit and control method thereof
JPH11308102A (en) Phase locked loop
US10712767B2 (en) Clock generator and clock generation method
JP2006065471A (en) Semiconductor integrated circuit, and its power saving control method and power saving control program
JP2008041106A (en) Semiconductor integrated circuit device, clock control method and data transfer control method
JP2005115944A (en) Synchronization system and synchronization method of multiple variable-frequency clock generators
JP3148445B2 (en) Multiplexer circuit
US9477256B2 (en) Electronic circuit with a sleep mode and a bypass connection for conveying a slow clock signal
CN207867388U (en) A kind of clock circuit for detecting for microcontroller chip
JP2011223179A (en) Clock generation circuit and control method of the same
JP6410538B2 (en) Semiconductor integrated circuit, device including semiconductor integrated circuit, clock control method in semiconductor integrated circuit, and program.

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140902