JP2006285823A - Semiconductor integrated circuit - Google Patents

Semiconductor integrated circuit Download PDF

Info

Publication number
JP2006285823A
JP2006285823A JP2005107175A JP2005107175A JP2006285823A JP 2006285823 A JP2006285823 A JP 2006285823A JP 2005107175 A JP2005107175 A JP 2005107175A JP 2005107175 A JP2005107175 A JP 2005107175A JP 2006285823 A JP2006285823 A JP 2006285823A
Authority
JP
Japan
Prior art keywords
circuit
mode
clock
oscillation
clock signal
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
JP2005107175A
Other languages
Japanese (ja)
Inventor
Koji Kojima
浩嗣 小島
Haruo Kamimaki
春雄 上牧
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2005107175A priority Critical patent/JP2006285823A/en
Publication of JP2006285823A publication Critical patent/JP2006285823A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Pulse Circuits (AREA)
  • Manipulation Of Pulses (AREA)
  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce power consumption in a waiting mode in a semiconductor integrated circuit capable of promptly returning to a normal mode from the waiting mode. <P>SOLUTION: This semiconductor integrated circuit is provided with: a clock generation circuit 10 having a self-traveling mode and a multiplication mode; an internal circuit 40 capable of operating in synchronization with a clock signal generated by the clock generation circuit; an oscillation circuit 30 generating a reference clock signal; and an operation mode control circuit 20 capable of controlling changeover between the normal mode and the waiting mode. The clock signal by the self-traveling mode is generated before the oscillation operation of the oscillation circuit becomes stable, so that the internal circuit can operate in the normal mode in synchronization therewith, and a return time to the normal mode from the waiting mode is reduced. In the waiting mode, the oscillation operation of the oscillation circuit is stopped to reduce the power consumption. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、半導体集積回路、さらにはそれにおけるクロック生成技術に係り、特にマイクロコントローラに適用して有効な技術に関する。   The present invention relates to a semiconductor integrated circuit, and further to a clock generation technique therefor, and particularly to a technique effective when applied to a microcontroller.

携帯機器は、動作時だけではなく待機時の消費電力の低減が強く求められている。一般に、携帯機器には、その機器を制御するマイクロコントローラと、そのマイクロコントローラをはじめとしてシステム全体に動作クロック信号を供給するための発振回路が搭載されている。携帯機器のなかには、待機時の消費電力を極限まで低減するために、クロック信号を供給する発振回路の動作を停止する機器も存在する。マイクロコントローラは、当然ながらクロックを供給されないと動作することができないので、待機状態から復帰するためには、まず発振回路動作を再開し、マイクロコントローラにクロックを供給する必要がある。発振回路の起動には時間がかかるので、何らかの刺激に即座に応答して、マイクロコントローラが処理を行わなければならないシステムには、クロック発振を停止するような待機時消費電力の低減手法を採用することはできない。すなわち、マイクロコントローラの起動時間と、クロック発振を維持する電力消費とは、トレードオフの関係にある。以下さらに定量的に詳述する。   There is a strong demand for portable devices to reduce power consumption during standby as well as during operation. In general, a portable device is equipped with a microcontroller for controlling the device and an oscillation circuit for supplying an operation clock signal to the entire system including the microcontroller. Among portable devices, there are devices that stop the operation of an oscillation circuit that supplies a clock signal in order to reduce standby power consumption to the limit. Of course, since the microcontroller cannot operate unless a clock is supplied, it is necessary to restart the operation of the oscillation circuit and supply the clock to the microcontroller in order to return from the standby state. Since it takes time to start up the oscillation circuit, a system that reduces the standby power consumption, such as stopping clock oscillation, is adopted for a system in which the microcontroller must respond immediately to some stimulus and perform processing. It is not possible. In other words, the startup time of the microcontroller and the power consumption for maintaining the clock oscillation are in a trade-off relationship. This will be described in more detail below.

携帯機器に搭載されるマイクロコントローラに要求される待機時の消費電流は、数十μA未満であり、当然ながら低ければ低いほど良い。一方、そのようなマイクロコントローラには、高い処理性能が要求されてきており、水晶発振子を使った発振回路で発生される基準クロックを、内部で逓倍するクロック生成回路が搭載される場合もある。また、マイクロコントローラには動作モードと待機モードが備えられており、通常、待機時には、待機モードになっていて、何らかの刺激によって動作モードに遷移するために、待ち受け状態になっている。その刺激とは、例えばユーザーのキー操作や、電話の着信などであって、マイクロコントローラにとっては、汎用入出力ポートへの信号入力や、シリアル通信インタフェースなどを介した接続された機器からの起動要求コマンドの受信などとして検知される。   The standby current consumption required for a microcontroller mounted on a portable device is less than several tens of μA, and of course, the lower the better. On the other hand, such a microcontroller is required to have high processing performance, and a clock generation circuit that internally multiplies a reference clock generated by an oscillation circuit using a crystal oscillator may be mounted. . In addition, the microcontroller is provided with an operation mode and a standby mode. Normally, the standby mode is a standby mode, and the microcontroller is in a standby state in order to change to the operation mode by some stimulus. The stimulus is, for example, a user's key operation or an incoming call. For the microcontroller, a signal input to a general-purpose input / output port or an activation request from a connected device via a serial communication interface, etc. Detected as a command received.

待機時の消費電流を数十μA未満の低い水準に抑えるためには、マイクロコントローラを待機モードにして動作を停止するだけでは不十分で、基準クロックを発生させる発振回路の動作も停止する必要がある。水晶振動子を使った回路によれば、クロック発振を維持するときの消費電流は8mA MAXであり、発振出力を停止したスタンバイ状態でも20μA MAXである。マイクロコントローラの基準クロックとなる数MHzから数十MHzの水晶振動子は、同一チップに搭載して外部を励振する電力を抑えたとしても、単に発振動作を維持するだけで、スタンバイ時の消費電流と同程度の数十μAの電流を消費してしまうためである。   In order to keep the current consumption during standby to a low level of less than several tens of μA, it is not enough to stop the operation by setting the microcontroller to standby mode, and it is also necessary to stop the operation of the oscillation circuit that generates the reference clock. is there. According to a circuit using a crystal resonator, the current consumption when maintaining clock oscillation is 8 mA MAX, and it is 20 μA MAX even in a standby state where oscillation output is stopped. The crystal oscillator of several MHz to several tens of MHz that is the reference clock for the microcontroller is mounted on the same chip, and even if it suppresses the power to excite the outside, the current consumption during standby can be maintained simply by maintaining the oscillation operation. This is because a current of several tens of μA is consumed.

待機時に刺激を検知すると、まず発振回路を起動し、その後マイクロコントローラを待機モードから動作モードに遷移させる何らかの手段が、マイクロコントローラとは別に必要である。なぜなら、マイクロコントローラ自体はその刺激が感知された時点でクロックを入力されておらず、他の装置を制御するなどの動作をすることができないためである。刺激を検知して、発振回路を起動すると、その発振が安定するまでの時間は、通常数msである。例えば、非特許文献1には、クロック用水晶発振器の起動時間として3ms MAXと記載されている。携帯機器では、刺激を検知したとき、クロック発振を再開させ、マイクロコントローラに搭載されたクロック生成回路が、動作クロックを発生した後、刺激に応答するプログラム処理を開始することができる。クロック生成回路は、例えば、特許文献1および特許文献2に記載されているように、入力される基準クロックの周波数を所定の逓倍したクロックを発生してマイクロコントローラに供給するものである。基準クロックを逓倍するためには、位相同期ループ(PLLと略記する)若しくは遅延同期ループ(DLLと略記する)が使われる。PLLは、発振周波数を制御することができる発振回路と、発振回路の出力クロックと入力される基準クロックの位相を比較する位相比較器と、その出力にしたがって、上記発振回路の発振周波数を加減する制御回路からなる。DLLは、入力パルスに対する出力パルスの遅延量を制御することができ、出力パルスを入力パルスにフィードバックして発振をさせる発振回路と、その発振の周期と基準クロックの周期とを比較して、上記遅延量を加減する制御回路からなる。何れも、発振回路のクロックと基準クロックを比較して同期させるものであって、基準クロックが入力され始めたときには、発振回路のクロックは基準クロックと一致していることはなく、差分をフィードバックするなどして徐々に一致させる引き込み時間を必要としている。なお、周波数の逓倍のためには、発振クロックを分周した波形と基準クロックを比較して一致させるように制御することにより、分周数倍の周波数逓倍が可能である。いずれも、基準クロックが供給されていることを前提としており、待機時に基準クロックを停止した場合には、待機状態からの復帰にあたって、基準クロックの再開を待つための時間が必要となり、本願の課題を解決することはできない。   When a stimulus is detected during standby, some means for starting the oscillation circuit first and then transitioning the microcontroller from the standby mode to the operation mode is required separately from the microcontroller. This is because the microcontroller itself does not receive a clock when the stimulus is sensed, and cannot perform operations such as controlling other devices. When a stimulus is detected and the oscillation circuit is activated, the time until the oscillation stabilizes is usually several ms. For example, Non-Patent Document 1 describes 3 ms MAX as the startup time of the clock crystal oscillator. In the portable device, when the stimulus is detected, the clock oscillation is resumed, and after the clock generation circuit mounted on the microcontroller generates the operation clock, the program processing responding to the stimulus can be started. For example, as described in Patent Document 1 and Patent Document 2, the clock generation circuit generates a clock obtained by multiplying the frequency of the input reference clock by a predetermined frequency and supplies the generated clock to the microcontroller. In order to multiply the reference clock, a phase locked loop (abbreviated as PLL) or a delay locked loop (abbreviated as DLL) is used. The PLL adjusts the oscillation frequency of the oscillation circuit according to the output of the oscillation circuit that can control the oscillation frequency, the phase comparator that compares the phase of the output clock of the oscillation circuit and the input reference clock. It consists of a control circuit. The DLL can control the delay amount of the output pulse with respect to the input pulse. The oscillation circuit that oscillates by feeding back the output pulse to the input pulse is compared with the oscillation cycle and the reference clock cycle. It consists of a control circuit that adjusts the amount of delay. In either case, the oscillation circuit clock and the reference clock are compared and synchronized. When the reference clock starts to be input, the oscillation circuit clock does not coincide with the reference clock, and the difference is fed back. The pull-in time to match gradually is required. In order to multiply the frequency, the frequency can be multiplied by the number of divisions by controlling the waveform obtained by dividing the oscillation clock and the reference clock so as to match. In both cases, it is assumed that the reference clock is supplied. When the reference clock is stopped during standby, it takes time to wait for the reference clock to resume when returning from the standby state. Cannot be resolved.

特許文献1に記載されている公知例は、周波数の低い参照クロック信号から周波数の高いクロック信号を生成するものであって、参照クロック信号を順次遅延するディレイライン回路と、ディレイライン回路の出力から整数倍の周波数のクロックを生成する論理回路とを備えて成る。ディレイライン回路の出力と参照クロックを位相比較して、ディレイライン回路の遅延値を制御して、生成される周波数の高いクロックの周波数を、参照クロックの周波数の正確な整数倍にし、かつ、異常ロックやフェイズジッタなどを抑える。特許文献1によれば、参照クロック信号が安定して供給されていることを前提としており、待機状態で参照クロックの供給をも停止する場合には、復帰にあたって、参照クロックの発振が安定して供給が再開された後に、上記の位相比較による遅延値の調整機構を働かせて、必要な周波数の高いクロックを得る。したがって、待機状態からの復帰には、相当程度の発振安定時間が必要である。   The known example described in Patent Document 1 generates a clock signal having a high frequency from a reference clock signal having a low frequency. The delay line circuit sequentially delays the reference clock signal, and the output of the delay line circuit. And a logic circuit that generates a clock having an integer multiple frequency. Comparing the output of the delay line circuit with the reference clock, and controlling the delay value of the delay line circuit, the frequency of the generated high frequency clock is set to an exact integer multiple of the reference clock frequency, and abnormal Reduce locks and phase jitter. According to Patent Document 1, it is assumed that the reference clock signal is stably supplied, and when the supply of the reference clock is also stopped in the standby state, the oscillation of the reference clock is stabilized upon recovery. After the supply is resumed, the above-described delay value adjusting mechanism based on the phase comparison is operated to obtain a clock having a high required frequency. Therefore, a considerable amount of oscillation stabilization time is required for returning from the standby state.

特許文献2に記載されている公知例は、マイクロプロセッサなどにクロックを供給する波形ジェネレータで、遅延鎖とその遅延鎖の伝播遅延を入力タイミング信号の周期に一致させる制御回路とを含む。電力低減のために、内部クロックを迅速に開始および停止することを課題としている。当該公知例は、その明細書で、PLLは迅速にクロックを停止させたり再開させたりするのが困難であることを指摘して、上記遅延鎖を使った波形ジェネレータを提案している。しかし、上記特許文献1に係る公知例と同様に、入力タイミング信号が安定して供給されていることを前提としており、待機状態で入力タイミング信号の供給をも停止する場合には、復帰にあたって、入力タイミング信号の発振が安定して供給が再開された後に、上記の制御回路による遅延値の調整機構を働かせて、必要なクロックを得る。したがって、特許文献2に係る技術によっても、待機状態からの復帰には、相当程度の発振安定時間が必要である。   The known example described in Patent Document 2 is a waveform generator that supplies a clock to a microprocessor or the like, and includes a delay chain and a control circuit that matches the propagation delay of the delay chain to the period of the input timing signal. The problem is to quickly start and stop the internal clock to reduce power. In this specification, the known example points out that it is difficult to quickly stop and restart the clock in the specification, and proposes a waveform generator using the delay chain. However, similarly to the known example according to Patent Document 1, it is assumed that the input timing signal is stably supplied, and when the supply of the input timing signal is also stopped in the standby state, After the oscillation of the input timing signal is stabilized and the supply is resumed, the necessary clock is obtained by operating the delay value adjusting mechanism by the control circuit. Therefore, even with the technique according to Patent Document 2, a considerable amount of oscillation stabilization time is required to return from the standby state.

以上述べてきたように、従来の携帯機器においては、待機時の消費電力を抑えるために基準クロックを停止した場合、待機状態から通常動作状態への復帰には、発振回路の起動時間を始めとして、数msの時間が必要である。   As described above, in the conventional portable device, when the reference clock is stopped in order to reduce the power consumption during standby, the start-up time of the oscillation circuit starts from the standby state to return to the normal operation state. A time of several ms is required.

一方、携帯機器において、待機状態から通常状態への遷移を求める刺激には、様々なものがあり、その刺激に対する応答まで数msの時間を許容することができないものがある。例えば、人によるキー操作によって待機から復帰する場合には、一般に数msは許容されると考えられるが、所定のボーレートで送信されてくるシリアル通信によって、起動コマンドが送信されてくるような場合には、その許容され得る時間は極めて短い。ボーレートをここで9600bpsと仮定すると、1ビットの周期は約0.1msであって、先頭ビットが入力されたことを刺激として、次の1ビットが入力される約0.1msには、何らかの方法でその第2ビットを取り込む手段が必要である。したがって、基準クロックの発振回路を起動してマイクロコントローラに供給し、内部のクロック生成回路で内部クロックを生成するのに必要な数msは、到底許容される時間ではない。したがって、このようなシステムでは、マイクロコントローラのクロックを完全に停止することはできず、少なくとも基準クロックの発振動作は維持するので、待機時の消費電力を数十μA以下に抑えることは困難である。   On the other hand, in a portable device, there are various stimuli for requesting a transition from a standby state to a normal state, and there are some that cannot allow a time of several ms until a response to the stimulus. For example, when returning from standby by a key operation by a person, it is generally considered that several ms is allowed, but when a start command is transmitted by serial communication transmitted at a predetermined baud rate. The acceptable time is very short. Assuming that the baud rate is 9600 bps here, the period of 1 bit is about 0.1 ms, and when the first bit is inputted, about 0.1 ms is triggered by the input of the first bit. A means to capture the second bit is necessary. Accordingly, the number of milliseconds required to activate the reference clock oscillation circuit and supply it to the microcontroller and generate the internal clock by the internal clock generation circuit is not an allowable time. Therefore, in such a system, the clock of the microcontroller cannot be stopped completely, and at least the oscillation operation of the reference clock is maintained, so that it is difficult to suppress the power consumption during standby to tens of μA or less. .

一般に、半導体集積回路の待機時の消費電力は、クロックの発振電力と、クロックによって動作している回路の電力と、アナログ的な直流の定常電流による電力と、リーク電流による電力である。アナログ的な直流の定常電流は、待機時に停止する回路的工夫をすることができる。リーク電流は、近年の集積回路の微細化で顕著になってきているが、微細な回路部分を選択的に電源遮断するなどの方法で、リーク電流を抑える技術が種々開発されている。半導体集積回路の待機時の消費電力は、クロックの発振を停止すれば、クロックの発振電力と、クロックによって動作している回路の電力を抑えることができ、ほぼゼロにすることができる。   In general, power consumption during standby of a semiconductor integrated circuit is clock oscillation power, power of a circuit operating with the clock, power due to an analog DC steady current, and power due to leakage current. The analog DC steady-state current can be devised as a circuit that stops during standby. Leakage current has become more prominent with recent miniaturization of integrated circuits, but various techniques for suppressing leakage current have been developed by selectively shutting off power to fine circuit portions. When the clock oscillation is stopped, the power consumption of the semiconductor integrated circuit during standby can be reduced to almost zero by suppressing the clock oscillation power and the power of the circuit operated by the clock.

特許文献3には、データ通信システムにおいて、受信データからサンプリングクロックを抽出して、受信データを取り込む技術が開示されている。通信相手の送信データレートに合わせたサンプリングレートを受信側で再現することができるものである。当該特許文献の明細書には示唆されていないが、この技術によれば、外部からのクロック供給なしに受信データをサンプリングすることが可能であると考えられる。しかし、当該技術は、通信データのサンプリングを目的としたもので、サンプリング後の受信データの処理にまで、生成したサンプリングクロックを使うことはできない。なぜなら、当該技術においては、その通信データには、シリアルデータ入力中のビットデータの値が遷移しない最大ビット長が規定されており、その最大ビット長を吸収できるだけのハードウェアを搭載するものであり、従って、通信データが途切れるとクロックの発生も停止するため、通信データの途絶とともに受信データの処理も中断してしまうためである。そこで、一般的には、サンプリングクロックとその後のデータ処理のクロックは分離されている。   Patent Document 3 discloses a technique for extracting a sampling clock from received data and capturing the received data in a data communication system. A sampling rate that matches the transmission data rate of the communication partner can be reproduced on the receiving side. Although not suggested in the specification of the patent document, it is considered that according to this technique, it is possible to sample received data without external clock supply. However, the technique is intended for sampling of communication data, and the generated sampling clock cannot be used for processing the received data after sampling. This is because, in this technology, the communication data defines a maximum bit length that does not change the value of bit data during serial data input, and is equipped with hardware that can absorb the maximum bit length. Therefore, since the generation of the clock is stopped when the communication data is interrupted, the processing of the received data is interrupted together with the interruption of the communication data. Therefore, generally, the sampling clock and the clock for subsequent data processing are separated.

京セラ(株)製表面実装型クロック用水晶発振器FXO2520FデータシートCrystal oscillator FXO2520F for surface mount type clocks manufactured by Kyocera Corporation 特開平6−61849号公報JP-A-6-61849 特開平6−252717号公報JP-A-6-252717 特開2003−258781号公報JP 2003-258771 A

マイクロコントローラとそれにクロックを供給する発振回路を備える携帯機器において、待機中にクロックの発振を停止すると発振回路の起動には時間がかかるので、待機中に発生する何らかの刺激に即座に応答することができない。したがって、待機中に発生する何らかの刺激に即座に応答してマイクロコントローラが処理を行わなければならないシステムにおいては、クロック発振を停止するような待機時消費電力の低減手法を採用することはできないので、待機中の消費電力を十分に低減することができない。すなわち、マイクロコントローラの起動時間と、クロック発振を維持する電力消費とは、トレードオフの関係にあって、待機時消費電力をほぼゼロにしながら、クロックの発振再開を待つなどの待ち時間なしに、待機状態から復帰することは、両立が困難とされている。   In a portable device equipped with a microcontroller and an oscillation circuit that supplies a clock to the microcontroller, if the oscillation of the clock is stopped during standby, it takes time to start the oscillation circuit, so it can respond immediately to any stimulus generated during standby. Can not. Therefore, in a system where the microcontroller must perform processing immediately in response to some stimulus generated during standby, it is not possible to employ a standby power consumption reduction method that stops clock oscillation. The power consumption during standby cannot be reduced sufficiently. In other words, the startup time of the microcontroller and the power consumption to maintain clock oscillation are in a trade-off relationship, with no waiting time such as waiting for clock oscillation resumption while making standby power consumption almost zero, It is considered difficult to recover from the standby state.

本発明の目的は、待機モードから通常モードに速やかに復帰することができる半導体集積回路における上記待機モードでの消費電力の低減を図るための技術を提供することにある。   An object of the present invention is to provide a technique for reducing power consumption in the standby mode in a semiconductor integrated circuit capable of quickly returning from the standby mode to the normal mode.

本発明の上記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

〔1〕振動子を用いて基準クロック信号を生成する発振回路と、内部論理回路により所定パルス幅のクロック信号を連続的に生成する自走モードと上記基準クロック信号の周波数を逓倍することでクロック信号を生成する逓倍モードとを備えたクロック生成回路と、上記クロック生成回路によって生成されたクロック信号に同期動作可能な内部回路と、上記内部回路が上記クロック信号に同期して動作される通常モードと上記発振回路の発振動作が停止される待機モードとの切り換えを制御可能な動作モード制御回路と、を含んで半導体集積回路が構成されるとき、上記動作モード制御回路は、上記待機モードでは、上記発振回路の上記発振動作を停止させ、上記待機モードから上記通常モードへ遷移させる事象を検知したとき、上記発振回路の上記発振動作を再開させるとともに、上記クロック生成回路を上記自走モードで動作させ、その後、上記自走モードから上記逓倍モードに切り換える。   [1] An oscillation circuit that generates a reference clock signal using a vibrator, a free-running mode in which a clock signal having a predetermined pulse width is continuously generated by an internal logic circuit, and a frequency by multiplying the frequency of the reference clock signal A clock generation circuit having a multiplication mode for generating a signal, an internal circuit operable in synchronization with the clock signal generated by the clock generation circuit, and a normal mode in which the internal circuit operates in synchronization with the clock signal And an operation mode control circuit that can control switching between the standby mode in which the oscillation operation of the oscillation circuit is stopped, and the semiconductor integrated circuit is configured, the operation mode control circuit in the standby mode, When the oscillation operation of the oscillation circuit is stopped and an event of transition from the standby mode to the normal mode is detected, the oscillation circuit is Together with resumes the oscillating operation, the clock generating circuit is operated in the free-running mode, then switch from the free-running mode to the multiplication mode.

上記の手段によれば、待機モードから通常モードに復帰する際に、先ず上記自走モードを選択させ、発振回路による振動子を用いた基準クロック生成のため発振動作が安定した後に上記逓倍モードを選択させる。待機モードで基準クロック信号を停止していた場合でも、上記発振回路の発振動作が安定する前に上記自走モードによるクロック信号が生成されることにより、これに同期して内部回路が通常モードで動作することができ、待機状態から通常動作への復帰時間が短縮されている。しかも、上記待機モードでは、上記発振回路の上記発振動作が停止されるため、消費電力が大幅に低減される。このことが、待機モードから通常モードに速やかに復帰することができる半導体集積回路における上記待機モードでの消費電力の低減を達成する。   According to the above means, when returning from the standby mode to the normal mode, the self-running mode is first selected, and after the oscillation operation is stabilized for generating the reference clock using the oscillator by the oscillation circuit, the multiplication mode is set. Let them choose. Even when the reference clock signal is stopped in the standby mode, the clock signal in the free-running mode is generated before the oscillation operation of the oscillation circuit is stabilized. It can operate, and the return time from the standby state to the normal operation is shortened. In addition, in the standby mode, the oscillation operation of the oscillation circuit is stopped, so that power consumption is greatly reduced. This achieves a reduction in power consumption in the standby mode in the semiconductor integrated circuit that can quickly return from the standby mode to the normal mode.

〔2〕振動子を用いて基準クロック信号を生成する発振回路と、内部論理回路により所定パルス幅のクロック信号を連続的に生成する自走モードと上記基準クロック信号の周波数を逓倍することでクロック信号を生成する逓倍モードとを備えたクロック生成回路と、上記クロック生成回路によって生成されたクロック信号に同期動作可能な内部回路と、上記内部回路が上記クロック信号に同期して動作される通常モードと上記発振回路の発振動作が停止される待機モードとの切り換えを制御可能な動作モード制御回路と、上記内部回路と外部との間のシリアル通信を可能とするシリアル通信インタフェース回路と、を含んで半導体集積回路が構成されるとき、上記動作モード制御回路は、上記待機モードでは、上記発振回路の上記発振動作を停止させ、上記シリアル通信インタフェース回路において上記待機モードから上記通常モードへ遷移させる事象が検知されたとき、上記発振回路の上記発振動作を再開させるとともに、上記クロック生成回路を上記自走モードで動作させ、その後、上記自走モードから上記逓倍モードに切り換える。   [2] An oscillation circuit that generates a reference clock signal using a vibrator, a free-running mode in which a clock signal having a predetermined pulse width is continuously generated by an internal logic circuit, and a frequency by multiplying the frequency of the reference clock signal A clock generation circuit having a multiplication mode for generating a signal, an internal circuit operable in synchronization with the clock signal generated by the clock generation circuit, and a normal mode in which the internal circuit operates in synchronization with the clock signal And an operation mode control circuit capable of controlling switching between a standby mode in which the oscillation operation of the oscillation circuit is stopped, and a serial communication interface circuit enabling serial communication between the internal circuit and the outside. When the semiconductor integrated circuit is configured, the operation mode control circuit controls the oscillation operation of the oscillation circuit in the standby mode. When the event that causes the serial communication interface circuit to transition from the standby mode to the normal mode is detected, the oscillation operation of the oscillation circuit is resumed and the clock generation circuit is operated in the free-running mode. Thereafter, the self-running mode is switched to the multiplication mode.

上記の手段によれば、待機モードから通常モードに復帰する際に、先ず上記自走モードを選択させ、上記逓倍モードにおける発振動作が安定した後に上記逓倍モードを選択させる。待機モードで基準クロック信号を停止していた場合でも、上記発振回路の発振動作が安定する前に上記自走モードによるクロック信号が生成されることにより、これに同期して内部回路が通常モードで動作することができ、待機状態から通常動作への復帰時間が短縮されている。しかも、上記待機モードでは、上記発振回路の上記発振動作が停止されるため、消費電力が大幅に低減される。このことが、待機モードから通常モードに速やかに復帰することができる半導体集積回路における上記待機モードでの消費電力の低減を達成する。   According to the above means, when returning from the standby mode to the normal mode, the self-running mode is first selected, and the multiplication mode is selected after the oscillation operation in the multiplication mode is stabilized. Even when the reference clock signal is stopped in the standby mode, the clock signal in the free-running mode is generated before the oscillation operation of the oscillation circuit is stabilized. It can operate, and the return time from the standby state to the normal operation is shortened. In addition, in the standby mode, the oscillation operation of the oscillation circuit is stopped, so that power consumption is greatly reduced. This achieves a reduction in power consumption in the standby mode in the semiconductor integrated circuit that can quickly return from the standby mode to the normal mode.

〔3〕上記〔1〕,〔2〕において、上記クロック生成回路は、上記自走モードのためのパルス発生と、上記逓倍モードのためのパルス発生とを実現可能なパルス発生回路と、上記動作モード制御回路の制御に応じて、上記自走モードによるパルス発生と上記逓倍モードによるパルス発生とを選択可能な選択回路とを含んで構成することができる。   [3] In the above [1] and [2], the clock generation circuit is capable of realizing the pulse generation for the free-running mode and the pulse generation for the multiplication mode, and the operation According to the control of the mode control circuit, a selection circuit capable of selecting the pulse generation in the self-running mode and the pulse generation in the multiplication mode can be configured.

〔4〕上記〔3〕において、上記半導体集積回路は、上記クロック生成回路で発生するクロック信号のパルス幅を定めるパルス幅設定部を有するパルス幅制御回路をさらに具備し、上記パルス幅制御回路は、上記パルス幅設定部で定められるパルス幅に基づくクロック周期に上記逓倍モードにおける逓倍数を乗じた値を上記基準クロック信号の周期と一致させるべく、上記パルス幅設定部に定められる上記パルス幅の調整を可能とする。   [4] In the above [3], the semiconductor integrated circuit further includes a pulse width control circuit having a pulse width setting unit that determines a pulse width of a clock signal generated by the clock generation circuit, and the pulse width control circuit includes: The pulse width determined by the pulse width setting unit is set to be equal to the cycle of the reference clock signal by a value obtained by multiplying the clock cycle based on the pulse width determined by the pulse width setting unit by the multiplication number in the multiplication mode. Allows adjustment.

〔5〕上記〔4〕において、上記内部回路として、上記クロック生成回路によって生成されたクロック信号に同期動作可能な中央処理装置を含むとき、上記待機モードから上記通常モードへ遷移させる事象に呼応して上記中央処理装置に対する割り込み制御を実行可能な割り込み制御回路を設けることができる。   [5] In the above [4], when the internal circuit includes a central processing unit that can operate in synchronization with the clock signal generated by the clock generation circuit, in response to an event of transition from the standby mode to the normal mode. Thus, an interrupt control circuit capable of executing interrupt control for the central processing unit can be provided.

〔6〕クロック信号を生成するためのクロック生成回路と、上記クロック生成回路によって生成されたクロック信号に同期動作可能な内部回路と、基準クロック信号を生成する発振回路と、上記内部回路が上記基準クロック信号に同期して動作される通常モードと、上記発振回路の発振動作が停止される待機モードとの切り換えを制御可能な動作モード制御回路と、USBインタフェース回路とを含んで半導体集積回路が構成されるとき、上記動作モード制御回路は、上記待機モードでは、上記発振回路の上記発振動作を停止させ、上記USBインタフェース回路において上記待機モードから上記通常モードへ遷移させる事象が検知されたとき、上記発振回路の上記発振動作を再開させるとともに、上記クロック生成回路を上記自走モードで動作させ、その後、上記自走モードから上記逓倍モードに切り換える。   [6] A clock generation circuit for generating a clock signal, an internal circuit capable of operating in synchronization with the clock signal generated by the clock generation circuit, an oscillation circuit for generating a reference clock signal, and the internal circuit being connected to the reference signal A semiconductor integrated circuit includes an operation mode control circuit capable of controlling switching between a normal mode operated in synchronization with a clock signal and a standby mode in which the oscillation operation of the oscillation circuit is stopped, and a USB interface circuit The operation mode control circuit stops the oscillation operation of the oscillation circuit in the standby mode, and detects an event that causes the USB interface circuit to transition from the standby mode to the normal mode. The oscillation operation of the oscillation circuit is resumed and the clock generation circuit is operated in the free-running mode. To work, then, it is switched from the free-running mode to the multiplication mode.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、待機モードから通常モードに速やかに復帰することができる半導体集積回路における上記待機モードでの消費電力の低減を達成することができる。   That is, it is possible to achieve a reduction in power consumption in the standby mode in the semiconductor integrated circuit that can quickly return from the standby mode to the normal mode.

図1には、本発明に係る半導体集積回路(LSI)の一例であるマイクロコントローラが示される。図1に示されるマイクロコントローラ1は、クロック生成回路10、動作モード制御回路20、発振回路30、CPU(中央処理装置)40、割り込み制御回路50、パルス幅制御回路80、及び逓倍数設定回路90を含み、特に制限されないが、単結晶シリコン基板などの一つの半導体基板に形成される。   FIG. 1 shows a microcontroller as an example of a semiconductor integrated circuit (LSI) according to the present invention. The microcontroller 1 shown in FIG. 1 includes a clock generation circuit 10, an operation mode control circuit 20, an oscillation circuit 30, a CPU (central processing unit) 40, an interrupt control circuit 50, a pulse width control circuit 80, and a multiplication number setting circuit 90. Although it is not particularly limited, it is formed on one semiconductor substrate such as a single crystal silicon substrate.

クロック生成回路10は、クロック信号CLK1を生成する。生成されたクロック信号CLK1は、CPU40や割り込み制御回路50に代表される内部回路に供給される。マイクロコントローラ1への割り込み信号とリセット信号などの例外発生を通知する信号は、マイクロコントローラ1の外部から与えられるか、内部の別の回路で発生するか、いずれの場合であっても、割り込み制御回路50に入力されて、その割り込みに対するマスクと優先順位などに基づいて制御をされる。このような、割り込み信号やリセット信号は、本例においては、図1に示されるように、復帰要求信号として、動作モード制御回路20へ供給されている。動作モード制御回路20は、CPU40の動作モードを監視して、発振回路30の制御を行う。CPU40が待機モードに入ろうとしていても、CPU40の動作を実現しているパイプライン動作がすべて完了しないうちにクロックを停止すると、正常な動作を保証することができないので、実際にCPU40が待機状態になったことを、CPU動作モード信号で確認して、クロック発振を停止することが望ましい。   The clock generation circuit 10 generates a clock signal CLK1. The generated clock signal CLK1 is supplied to an internal circuit represented by the CPU 40 and the interrupt control circuit 50. Signals for notifying the occurrence of exceptions such as an interrupt signal and a reset signal to the microcontroller 1 are provided from outside the microcontroller 1 or are generated in another internal circuit, and interrupt control is performed in either case. It is input to the circuit 50 and controlled based on the mask and priority order for the interrupt. In this example, such an interrupt signal or reset signal is supplied to the operation mode control circuit 20 as a return request signal as shown in FIG. The operation mode control circuit 20 monitors the operation mode of the CPU 40 and controls the oscillation circuit 30. Even if the CPU 40 is about to enter the standby mode, if the clock is stopped before all the pipeline operations realizing the operation of the CPU 40 are completed, normal operation cannot be guaranteed, so the CPU 40 actually enters the standby state. It is desirable to stop the clock oscillation after confirming that this is the case with the CPU operation mode signal.

尚、CPU40や割り込み制御回路50は、必ずしも必須の構成要素ではなく、簡単な動作モード制御回路20を備えていれば、如何なる回路にも置き換えが可能である。また、必ずしも割り込みとリセットを復帰要求信号とする必要はなく、復帰要求を発生する回路からの要求信号に限定しても良い。   The CPU 40 and the interrupt control circuit 50 are not necessarily essential components, and can be replaced by any circuit as long as the simple operation mode control circuit 20 is provided. Also, interrupts and resets are not necessarily used as return request signals, and may be limited to request signals from a circuit that generates a return request.

以下、上記構成の作用について説明する。   The operation of the above configuration will be described below.

クロック生成回路10は、起動信号が入力されると、パルス幅設定部12によって設定される幅のクロックパルスCLK1を、動作モードに従って出力する。動作モードには、自走モードと逓倍モードがあり、その動作について図2を用いて説明する。   When the activation signal is input, the clock generation circuit 10 outputs a clock pulse CLK1 having a width set by the pulse width setting unit 12 according to the operation mode. The operation modes include a free-running mode and a multiplication mode, and the operation will be described with reference to FIG.

自走モードでは、図2(A)に示されるように、起動信号STAのレベル変化に対応して、クロック出力が開始される。このときのクロック周期は、パルス幅設定部12によって与えられた値に基づいて決まる。これに対して逓倍モードでは、図2(B)に示されるように、起動信号STAとして基準クロック信号CLK0が入力されており、基準クロック信号CLK0の立ち上がりに同期して、逓倍数設定回路90によって設定された数で、且つ、パルス幅設定部12で設定されたパルス幅のクロックパルスがクロック信号CLK1として出力される。   In the free-running mode, as shown in FIG. 2A, clock output is started in response to the level change of the activation signal STA. The clock cycle at this time is determined based on the value given by the pulse width setting unit 12. In contrast, in the multiplication mode, as shown in FIG. 2B, the reference clock signal CLK0 is input as the activation signal STA, and the multiplication number setting circuit 90 synchronizes with the rising edge of the reference clock signal CLK0. A clock pulse having the set number and the pulse width set by the pulse width setting unit 12 is output as the clock signal CLK1.

図3には、マイクロコントローラ1全体が、通常モードから待機モードに移行し、その待機時の消費電力を極限まで低く抑えるために、基準クロックCLK0の発振をも停止した状態で、復帰要求信号RETが変化したことに応答して、待機モードから通常モードに遷移するところが示される。図3において、マイクロコントローラ1は、始めは通常モードで、発振回路30が基準クロックCLK0をクロック生成回路10に供給しており、クロック生成回路10は、起動信号入力STAに印加された基準クロックCLK0の4倍の周波数のクロックを出力して動作している。このとき逓倍数は4に設定されており、パルス幅設定部12は、出力クロックのパルス幅を起動信号入力STAに印加されている基準クロックの周期のちょうど逓倍数4の逆数である4分の1に調整されている。   In FIG. 3, the entire microcontroller 1 shifts from the normal mode to the standby mode, and in order to keep the power consumption during the standby to the minimum, the return request signal RET is also stopped in a state where the oscillation of the reference clock CLK0 is also stopped. In response to the change in, the transition from standby mode to normal mode is shown. In FIG. 3, the microcontroller 1 is initially in the normal mode, and the oscillation circuit 30 supplies the reference clock CLK0 to the clock generation circuit 10. The clock generation circuit 10 receives the reference clock CLK0 applied to the activation signal input STA. It operates by outputting a clock with a frequency four times that of the clock. At this time, the multiplication number is set to 4, and the pulse width setting unit 12 sets the pulse width of the output clock to 4 minutes that is just the reciprocal of the multiplication number 4 of the period of the reference clock applied to the activation signal input STA. It is adjusted to 1.

マイクロコントローラ1の待機モードにおいて、待機消費電力をμWオーダーの極限まで抑えるには、基準クロック信号CLK0の供給を止めるだけでなく、発振回路30の動作を停止することが不可欠である。発振回路30の発振動作による消費電力がmWオーダーと大きいためである。消費電力には、信号変化に対応する消費電力と電源電圧を印加するだけで消費される電力がある。CMOS回路では、前者は充放電電力であり、後者はリーク電流による電力である。前者は、マイクロコントローラ1内の信号変化を皆無とすることでゼロにすることができ、後者は、電源遮断によってゼロにするか、若しくは基板バイアス効果を使うなど、トランジスタの閾値電圧を高くしてリーク電流を下げることによって、顕著な低減効果が得られ、1μA以下に抑えることは十分可能である。本例では、待機時に信号変化を皆無として、CMOS回路における充放電電力に代表される過渡電力をゼロにする。本例において待機時には、クロック生成回路10は、基準信号入力CLK0が停止するので、クロック出力CLK1を停止する。動作モード制御回路20は、発振回路30の発振停止を出力するとともに、次に復帰要求信号RETによって復帰要求があったときに、その信号が、クロック生成回路10の起動信号入力端子に伝播するよう、選択回路21を切り換える。また、動作モード制御回路20は、クロック生成回路10の動作モードを、逓倍モードから自走モードに切り換える。復帰要求信号RETによって復帰要求があった時点では、発振回路30は動作していないので、基準クロック信号CLK0は供給されておらず、クロック生成回路10は、自走モードから動作を再開することが望ましいためである。   In the standby mode of the microcontroller 1, not only stopping the supply of the reference clock signal CLK0 but also stopping the operation of the oscillation circuit 30 is indispensable for suppressing standby power consumption to the limit of the μW order. This is because the power consumption by the oscillation operation of the oscillation circuit 30 is as large as mW. Power consumption includes power consumption corresponding to signal changes and power consumed simply by applying a power supply voltage. In the CMOS circuit, the former is charge / discharge power, and the latter is power due to leakage current. The former can be made zero by eliminating the signal change in the microcontroller 1, and the latter can be made zero by turning off the power supply or by using the substrate bias effect to increase the threshold voltage of the transistor. By reducing the leakage current, a remarkable reduction effect can be obtained, and it can be sufficiently suppressed to 1 μA or less. In this example, there is no signal change during standby, and transient power typified by charge / discharge power in the CMOS circuit is made zero. In this example, during standby, the clock generation circuit 10 stops the clock output CLK1 because the reference signal input CLK0 stops. The operation mode control circuit 20 outputs the oscillation stop of the oscillation circuit 30 and causes the signal to be propagated to the start signal input terminal of the clock generation circuit 10 when there is a next return request by the return request signal RET. The selection circuit 21 is switched. The operation mode control circuit 20 switches the operation mode of the clock generation circuit 10 from the multiplication mode to the free-running mode. Since the oscillation circuit 30 is not operating when a return request is made by the return request signal RET, the reference clock signal CLK0 is not supplied, and the clock generation circuit 10 can resume its operation from the free-running mode. This is desirable.

復帰要求があると、動作モード制御回路20は、それをエッジ検出回路22で検出して、発振回路30に対して、発振制御信号OCNTにより発振停止を解除して基準クロックの供給を開始させるよう制御する。復帰要求信号RETは、マイクロコントローラ1内部で発生するものであっても良いし、外部から供給されたものでも良い。割り込み信号やリセット信号として供給される。ここで、発振回路30が外付けの水晶振動子31を使ったものであるとすると、基準クロック信号が安定に供給されるまでの時間は、水晶発振器の起動時間3msと同程度である。近年のマイクロコントローラの動作クロック周波数は、100MHzを超えるもの少なくなく、クロックの周期に換算すれば、3msは300,000クロックに相当する期間である。この期間、クロック生成回路10は、自走モードで動作し、パルス幅設定部12によって与えられたパルス幅のクロック信号を連続して送出する。したがって、基準クロックが安定する以前から、マイクロコントローラ1は、復帰要求に応答する処理を開始することができる。その後、基準クロック信号CLK0が安定して供給され始めた時点で、動作モード制御回路20は、クロック生成回路10の動作モードを逓倍モードに戻す制御を行う。発振回路30が、安定した発振動作をしていることを検出するには、厳密には別の時間又は周波数の基準が必要であるが、実用上は、適度の余裕を持って十分な待ち時間を取ることによって、発振安定と判断する。発振回路30は、発振開始時点では水晶振動子31の共振周波数とは異なり、従って、予測できない周波数のクロック信号を出力して、徐々に目的の周波数に近づき、やがて水晶振動子31の共振周波数で安定発振する。目的の発振周波数とは異なるといっても、十分余裕を持った数のクロックパルス数の経過を待って、基準クロックの発振が安定しているとして扱えば、実際にクロック信号が安定している時点を示すことができる。例えば、10MHzの水晶振動子で起動時間3ms maxの場合、3ms÷1/10MHz=30000であるので、2から3倍のマージンをとって60000〜100000のカウンタで水晶発振のクロックをカウントすれば、十分に3ms以上の時間の経過を保証して、発振が安定した時点を判定することができる。   When there is a return request, the operation mode control circuit 20 detects it by the edge detection circuit 22, and cancels the oscillation stop by the oscillation control signal OCNT and starts the supply of the reference clock to the oscillation circuit 30. Control. The return request signal RET may be generated inside the microcontroller 1 or may be supplied from the outside. It is supplied as an interrupt signal or reset signal. Here, if the oscillation circuit 30 uses an external crystal resonator 31, the time until the reference clock signal is stably supplied is about the same as the startup time of the crystal oscillator of 3ms. The operation clock frequency of recent microcontrollers often exceeds 100 MHz, and 3 ms is a period corresponding to 300,000 clocks when converted to a clock cycle. During this period, the clock generation circuit 10 operates in the free-running mode, and continuously sends out a clock signal having a pulse width given by the pulse width setting unit 12. Therefore, the microcontroller 1 can start processing responding to the return request before the reference clock is stabilized. Thereafter, when the reference clock signal CLK0 starts to be stably supplied, the operation mode control circuit 20 performs control to return the operation mode of the clock generation circuit 10 to the multiplication mode. Strictly speaking, another time or frequency reference is necessary to detect that the oscillation circuit 30 performs a stable oscillation operation. However, in practice, a sufficient waiting time is provided with an appropriate margin. The oscillation is determined to be stable. The oscillation circuit 30 is different from the resonance frequency of the crystal unit 31 at the time of starting oscillation. Therefore, the oscillation circuit 30 outputs a clock signal having an unpredictable frequency, gradually approaches the target frequency, and eventually reaches the resonance frequency of the crystal unit 31. Stable oscillation. Even if it is different from the target oscillation frequency, the clock signal is actually stable if the oscillation of the reference clock is treated as stable after waiting for a sufficient number of clock pulses. A point in time can be indicated. For example, when the startup time is 3 ms max with a 10 MHz crystal resonator, 3 ms ÷ 1/10 MHz = 30000. Therefore, if the crystal oscillation clock is counted with a counter of 60000 to 100,000 with a margin of 2 to 3 times, It is possible to determine when the oscillation is stabilized by sufficiently guaranteeing the passage of time of 3 ms or more.

リセット信号RSTを復帰要求信号として用いると、別の作用効果を期待することができる。すなわち、リセットがパワーオンリセットであって、電源投入直後のリセットである場合、リセット時点では、クロックは供給されていない場合が多い。一方、過去の設計資源を再利用したり、外部から導入する場合、リセット中にクロックが供給されていることを期待した、所謂同期リセット方式を採用したものが少なくない。同期リセット方式の回路には、リセット情報が確定するまで、ある程度以上のクロックパルス数を期待し、また、リセットされるまでの不確定な状態では、信号の衝突やフローティングノードの存在によって、マイクロコントローラ1内の他の回路に貫通電流を生じさせるおそれがある。従来のクロック発生回路を採用したマイクロコントローラ1では、クロック発振が安定するまでの数msはこの状態を甘受せざるを得ないものがあって、携帯機器への採用の隘路になっていた。本例によれば、リセット信号を検知した直後から、クロック信号を供給することができるので、かかる問題を解決して、同期リセット方式の回路を採用しても、電源投入直後からクロック信号を供給して、最短の時間で回路全体をリセットすることができる。   When the reset signal RST is used as a return request signal, another effect can be expected. That is, when the reset is a power-on reset and is a reset immediately after the power is turned on, the clock is often not supplied at the time of reset. On the other hand, when past design resources are reused or introduced from the outside, many adopt a so-called synchronous reset method that expects a clock to be supplied during reset. The synchronous reset circuit expects more than a certain number of clock pulses until the reset information is confirmed, and in the indeterminate state until the reset information, the microcontroller may be caused by signal collision or the presence of a floating node. There is a possibility of causing a through current in other circuits in the circuit 1. In the microcontroller 1 that employs the conventional clock generation circuit, there are cases in which this state is unavoidable for several milliseconds until the clock oscillation is stabilized, which has been a bottleneck for adoption in portable devices. According to this example, since the clock signal can be supplied immediately after detecting the reset signal, the clock signal is supplied immediately after the power is turned on even if a synchronous reset method circuit is adopted to solve such a problem. Thus, the entire circuit can be reset in the shortest time.

図3に示される場合、待機前が逓倍数4の逓倍モードで、待機後は、自走モードから逓倍数2の逓倍モードに切り替えた例で、逓倍数を変更している。また、待機状態に入る前の通常モードにおけるパルス幅と、待機状態から復帰したときのパルス幅は異なっている。待機状態に入る前の通常モードにおけるパルス幅が、マイクロコントローラ1の回路動作として最高動作周波数であって、復帰した時点でそのパルス幅を、基準クロック信号無しで忠実に再現できるとは限らない場合には、安全策として、パルス幅の設定を長めに変更しておくことが有効である。例えば、待機状態に入る前には、最高周波数での動作中で温度が高いのに対して、待機中にはマイクロコントローラ1の温度が低下して、パルス幅設定部12では、復帰したときに、より短いパルス幅のクロックを供給してしまい、クロック信号が供給されるマイクロコントローラ1で誤動作を生じるおそれがある。このとき、温度低下によるクロックパルス幅の短縮を考慮して、パルス幅設定を長めにするが、逓倍数が4のままでは、当該パルス幅に逓倍数4を乗じた値が、基準クロックの周期より長くなってしまって、逓倍動作にならないので、逓倍数についても適宜減じておく必要がある。一方、パルス発生回路11において、温度補償回路や電源電圧変動の影響を補償する手段などを具備して、待機モードの前後に、同じパルス幅、同じ逓倍数設定で、同じ周波数のクロック出力が得られれば、より好適である。   In the case shown in FIG. 3, the multiplication number is changed in an example where the standby mode is the multiplication mode of the multiplication number 4 and the standby mode is switched from the free-running mode to the multiplication mode of the multiplication number 2 after the standby. The pulse width in the normal mode before entering the standby state is different from the pulse width when returning from the standby state. When the pulse width in the normal mode before entering the standby state is the maximum operating frequency as the circuit operation of the microcontroller 1, and the pulse width cannot be faithfully reproduced without the reference clock signal at the time of return. For this reason, it is effective to change the setting of the pulse width longer as a safety measure. For example, before entering the standby state, the temperature is high during operation at the maximum frequency, while the temperature of the microcontroller 1 decreases during standby, and the pulse width setting unit 12 Therefore, there is a possibility that a clock having a shorter pulse width is supplied and a malfunction occurs in the microcontroller 1 to which the clock signal is supplied. At this time, the pulse width setting is lengthened in consideration of the shortening of the clock pulse width due to the temperature drop. However, if the multiplication number is 4, the value obtained by multiplying the pulse width by the multiplication number 4 is the period of the reference clock. Since it becomes longer and the multiplication operation is not performed, it is necessary to reduce the multiplication number as appropriate. On the other hand, the pulse generation circuit 11 is provided with a temperature compensation circuit, a means for compensating for the influence of power supply voltage fluctuation, and the like, so that the clock output of the same frequency can be obtained with the same pulse width and the same multiplier setting before and after the standby mode. If so, it is more preferable.

基準クロック信号CLK0が安定して、逓倍数2の逓倍モードに移行した後、逓倍数4のときに基準クロックの周期に一致するように、パルス幅制御回路80を動作させ、パルス幅を徐々に短くする制御を行っても良い。例えば逓倍数2で動作しているとき、基準クロックCLK0の立ち上がりエッジに対応して、クロックパルスを2個出力する。このとき、クロック生成回路10内では、4個目と5個目のクロックパルスを生成しておく。基準クロック信号CLK0の立ち上がりに同期した1個目のクロックパルスの立ち上がりから、上記5個目のクロックパルスの立ち上がりまでの期間が、基準クロックパルスの周期に一致するように、パルス幅の値を徐々に減じて行けばよい。最終的に、1個目から5個目の出力クロックパルスの立ち上がりまでの期間が、基準クロック信号CLK0の周期以下になれば、逓倍数4の逓倍動作に復帰させることができる。   After the reference clock signal CLK0 stabilizes and shifts to the multiplication mode of the multiplication number 2, the pulse width control circuit 80 is operated so as to coincide with the cycle of the reference clock when the multiplication number is 4, and the pulse width is gradually increased. You may perform control to shorten. For example, when operating at a multiplication factor of 2, two clock pulses are output corresponding to the rising edge of the reference clock CLK0. At this time, the fourth and fifth clock pulses are generated in the clock generation circuit 10. The pulse width value is gradually changed so that the period from the rising edge of the first clock pulse synchronized with the rising edge of the reference clock signal CLK0 to the rising edge of the fifth clock pulse matches the cycle of the reference clock pulse. You can reduce it to. Finally, if the period from the first to the fifth output clock pulse rises below the cycle of the reference clock signal CLK0, it is possible to return to the multiplication operation of the multiplication number 4.

このように復帰要求RETによって復帰が要求された場合、まず自走モードでクロック出力を開始することによって、復帰要求信号RETからゲート遅延だけの遅れで、動作クロックを供給することができ、クロック発振回路30の発振安定を待つことなく、待機モードから通常モードに復帰したときの処理を即座に開始することができる。クロック安定時間がmsオーダーであるのに対し、ゲート遅延はnsオーダーであり、約6桁の待ち時間短縮を実現することができる。ちなみに、従来技術では、待機時にクロック発振を継続したままであり、PLLなどによる逓倍回路の同期時間を短縮する手法によって、通常動作に復帰する方法であり、その場合の復帰時間はμsオーダーである。本発明においては、待機時にクロック発振を停止していながら、nsオーダーのより短期間で通常動作に復帰することができる。従って、待機状態から復帰したときに、極めて短期間で何らかの処理をしなければならないようなシステムにおいても、待機中にクロック発振を停止することができる。すなわち、待機状態からの即座の復帰と、待機期間中の信号変化を皆無として消費電力を極限まで抑えることができる。   When a return is requested by the return request RET as described above, first, the clock output is started in the free-running mode, so that the operation clock can be supplied with a delay of only the gate delay from the return request signal RET. Without waiting for the oscillation of the circuit 30 to stabilize, the processing when returning from the standby mode to the normal mode can be started immediately. While the clock stabilization time is on the order of ms, the gate delay is on the order of ns, and a waiting time reduction of about 6 digits can be realized. Incidentally, in the prior art, the clock oscillation is continued during standby, and a method of returning to normal operation by a method of shortening the synchronization time of the multiplier circuit such as PLL is used. In this case, the recovery time is on the order of μs. . In the present invention, it is possible to return to normal operation in a shorter period of ns order while stopping clock oscillation during standby. Therefore, even in a system in which some processing must be performed in a very short period when returning from the standby state, clock oscillation can be stopped during standby. That is, it is possible to suppress power consumption to the utmost with no immediate return from the standby state and no signal change during the standby period.

図4には上記パルス発生回路11の構成例が示され、図5には、図4に示される構成における動作タイミングが示される。   FIG. 4 shows a configuration example of the pulse generation circuit 11, and FIG. 5 shows an operation timing in the configuration shown in FIG.

図4に示されるように上記パルス発生回路11は、セットリセットフリップフロップ回路101、エッジ検出回路102、カウンタ103、比較回路104、可変遅延線105、ナンドゲート106,108、遅延素子107を含む。セットリセットフリップフロップ回路101は、起動信号STAによってセットされることで、起動信号STAを検出する。セットリセットフリップフロップ回路101の出力信号は後段のエッジ検出回路102に伝達される。エッジ検出回路102は入力信号のエッジ検出を行う。このエッジ検出結果は後段のカウンタ103に伝達される。このカウンタ103は、可変遅延線105の出力信号を計数し、その計数結果が上記エッジ検出回路102の出力信号によってリセットされるようになっている。カウンタ103の出力信号countは、後段の比較回路104に伝達される。比較回路104は、上記カウンタ103の出力信号countと逓倍数とを比較する。この比較結果eqは選択回路13を介してセットリセットフリップフロップ回路101に伝達され、この比較結果eqによってセットリセットフリップフロップ回路101がリセットされる。可変遅延線105での遅延量は、パルス幅設定部12によって制御される。上記ナンドゲート106は、可変遅延線105の出力信号dckと上記セットリセットフリップフロップ回路101の出力信号とのナンド論理を得る。このナンドゲート106の出力信号nckは、上記可変遅延線105にフィードバックされるとともに、ナンドゲート108及び遅延素子107に伝達される。ナンドゲート108は、上記ナンドゲート106の出力信号nckと上記遅延素子107の出力信号とのナンド論理を得る。このナンドゲート108の出力信号がクロック信号CLK1とされる。   As shown in FIG. 4, the pulse generation circuit 11 includes a set / reset flip-flop circuit 101, an edge detection circuit 102, a counter 103, a comparison circuit 104, a variable delay line 105, NAND gates 106 and 108, and a delay element 107. The set-reset flip-flop circuit 101 detects the activation signal STA when set by the activation signal STA. The output signal of the set / reset flip-flop circuit 101 is transmitted to the subsequent edge detection circuit 102. The edge detection circuit 102 performs edge detection of the input signal. The edge detection result is transmitted to the counter 103 at the subsequent stage. The counter 103 counts the output signal of the variable delay line 105, and the count result is reset by the output signal of the edge detection circuit 102. The output signal count of the counter 103 is transmitted to the comparison circuit 104 at the subsequent stage. The comparison circuit 104 compares the output signal count of the counter 103 with the multiplication number. The comparison result eq is transmitted to the set / reset flip-flop circuit 101 via the selection circuit 13, and the set / reset flip-flop circuit 101 is reset by the comparison result eq. The amount of delay in the variable delay line 105 is controlled by the pulse width setting unit 12. The NAND gate 106 obtains a NAND logic between the output signal dck of the variable delay line 105 and the output signal of the set / reset flip-flop circuit 101. The output signal nck of the NAND gate 106 is fed back to the variable delay line 105 and transmitted to the NAND gate 108 and the delay element 107. The NAND gate 108 obtains a NAND logic between the output signal nck of the NAND gate 106 and the output signal of the delay element 107. The output signal of the NAND gate 108 is the clock signal CLK1.

セットリセットフリップフロップ回路101の出力Qが論理値“1”のとき、可変遅延線105の出力信号dckが反転され、nckがフィードバックされる。しかし、セットリセットフリップフロップ回路101の出力Qが論理値“0”のとき、nckは論理値“1”に固定されてフィードバックされない。上記セットリセットフリップフロップ回路101の出力Qが論理値“0”から論理値“1”にセットされたことを、エッジ検出102によって検知して、カウンタ103をリセットし、遅延クロックdckの発生回数を上記カウンタ103で計数して、所望の逓倍数に一致したときに、比較回路104が一致信号eqを出力する。一致信号eqは、逓倍モードでは上記セットリセットフリップフロップ回路101をリセットする。これにより上記ナンドゲート106から可変遅延線105へのフィードバックが停止され、クロックパルスの出力が停止され、次の起動信号STAの入力待ちの状態となる。   When the output Q of the set-reset flip-flop circuit 101 is a logical value “1”, the output signal dck of the variable delay line 105 is inverted and nck is fed back. However, when the output Q of the set-reset flip-flop circuit 101 is the logical value “0”, nck is fixed to the logical value “1” and is not fed back. The edge detection 102 detects that the output Q of the set-reset flip-flop circuit 101 has been set from the logical value “0” to the logical value “1”, resets the counter 103, and determines the number of occurrences of the delay clock dck. When counted by the counter 103 and coincides with a desired multiplication number, the comparison circuit 104 outputs a coincidence signal eq. The coincidence signal eq resets the set / reset flip-flop circuit 101 in the multiplication mode. As a result, feedback from the NAND gate 106 to the variable delay line 105 is stopped, the output of the clock pulse is stopped, and the input of the next start signal STA is awaited.

図5には、図4に示されるクロック生成回路10における自走モードと逓倍モードでの動作例が示される。逓倍数を3としてあり、ゲート遅延は実際の大きさよりも誇張して表記されている。図4(A)に示した自走モードは、モード指定信号を論理値“0”にすることによって指定することができ、セットリセットフリップフロップ回路101は、起動信号入力が変化してセットされた後、リセットされないので、クロック生成回路10は、連続的にクロックを生成し続ける。自走モードで、クロック生成を停止する場合には、上記と同様に、上記セットリセットフリップフロップをリセットすればよい。図4(B)に示した逓倍モードは、モード指定信号を論理値“1”にすることによって指定することができる。カウンタ103が可変遅延線105の出力dckの発生回数を計数して、その値が所定の逓倍数3と一致したときに、一致信号eqが論理値“1”になる。モード指定信号が論理値“1”なので、一致信号eqが伝播されてセットリセットフリップフロップ回路101をリセットし、ナンドゲート106の出力nckを強制的に論理値“1”にして可変遅延線105へのフィードバックを止める。ただし、図5(B)に示されるように、ナンドゲート106の出力nckは、論理値“0”から強制的に論理値“1”に変化させられるので、幅の狭いパルスを生じる。このパルスは、可変遅延線105の出力にも現れ、カウンタ103の出力を1増やし4に変化させる。このとき、カウンタ出力countは所定の逓倍数3と一致しなくなり、一致信号eqは論理値“0”になる。セットリセットフリップフロップ回路101がセットされてからリセットされるまで、すなわちセットリセットフリップフロップ回路101の出力Qが論理値“1”である期間は、クロックパルスの3周期分である。この信号を発振周期信号として出力する。ナンドゲート106の出力nckには、前述のように、幅の狭いパルスが生じていて、そのまま外部回路のクロックとして使うことは好ましくない。遅延素子107とナンドゲート108を組み合わせて、幅の狭いパルスを消し、クロックとして出力する。遅延素子107の遅延量は、消したいパルスの幅よりも大きめに設定する。   FIG. 5 shows an operation example in the free-running mode and the multiplication mode in the clock generation circuit 10 shown in FIG. The multiplication number is 3, and the gate delay is exaggerated from the actual size. The free-running mode shown in FIG. 4A can be designated by setting the mode designation signal to a logical value “0”, and the set-reset flip-flop circuit 101 is set by changing the activation signal input. Since it is not reset later, the clock generation circuit 10 continues to generate clocks continuously. When the clock generation is stopped in the free-running mode, the set / reset flip-flop may be reset as described above. The multiplication mode shown in FIG. 4B can be designated by setting the mode designation signal to a logical value “1”. When the counter 103 counts the number of occurrences of the output dck of the variable delay line 105 and the value matches the predetermined multiplication number 3, the coincidence signal eq becomes the logical value “1”. Since the mode designation signal is the logical value “1”, the coincidence signal eq is propagated to reset the set / reset flip-flop circuit 101 and forcibly set the output nck of the NAND gate 106 to the logical value “1” to the variable delay line 105. Stop feedback. However, as shown in FIG. 5B, since the output nck of the NAND gate 106 is forcibly changed from the logical value “0” to the logical value “1”, a narrow pulse is generated. This pulse also appears at the output of the variable delay line 105 and increases the output of the counter 103 by 1 and changes it to 4. At this time, the counter output count does not coincide with the predetermined multiplication number 3, and the coincidence signal eq becomes the logical value “0”. The period from when the set-reset flip-flop circuit 101 is set to when it is reset, that is, the period during which the output Q of the set-reset flip-flop circuit 101 is the logical value “1” is three clock pulses. This signal is output as an oscillation period signal. As described above, a narrow pulse is generated in the output nck of the NAND gate 106, and it is not preferable to use it as it is as a clock of the external circuit. The delay element 107 and the NAND gate 108 are combined to erase a narrow pulse and output it as a clock. The delay amount of the delay element 107 is set larger than the width of the pulse to be erased.

発振周期信号CYCは、クロックパルスの周期を逓倍数倍したハイレベル期間と、残りの休止期間のローレベル期間を有する信号である。入力された基準クロック信号の周期と上記ハイレベル期間が同じになるように制御すれば、換言すれば上記ローレベル期間ができるだけ短くなるように制御すれば、クロック出力の周期は、基準クロック信号の周期の逓倍数分の1になり、正確な逓倍回路となる。一方、残っているローレベル期間は、基準クロック信号の周期で発生するクロックジッタである。マイクロコントローラ1では動作クロックにジッタがあっても、最短の周期がマイクロコントローラ1の最大遅延(クリティカルパス)以上であれば正常に動作する。ただし、周辺回路など、他のデバイスとの同期が必要な回路では、ジッタを許容しないものもある。その場合には、上記のように、制御してクロックパルス幅を適切に制御することによって、ジッタのないクロック信号を生成することができる。   The oscillation period signal CYC is a signal having a high level period obtained by multiplying the clock pulse period by a multiple and a low level period of the rest period. If the period of the inputted reference clock signal is controlled to be the same as the high level period, in other words, if the period of the low level is controlled to be as short as possible, the period of the clock output is the same as that of the reference clock signal. It becomes 1 / multiple of the cycle, and it becomes an accurate multiplier circuit. On the other hand, the remaining low level period is clock jitter generated in the cycle of the reference clock signal. Even if there is jitter in the operation clock, the microcontroller 1 operates normally if the shortest cycle is equal to or greater than the maximum delay (critical path) of the microcontroller 1. However, some circuits that require synchronization with other devices, such as peripheral circuits, do not allow jitter. In that case, as described above, a clock signal without jitter can be generated by controlling and appropriately controlling the clock pulse width.

図6には、上記クロック生成回路10における可変遅延線105の構成例が示される。この可変遅延線105は、ディジタル信号によって制御可能になっており、さらに貫通電流が流れないように設計されたもので、クロック出力を停止しているときに消費電流をデバイスのリーク電流だけに抑えることができ、また、遅延量はディジタル値としてレジスタなどに格納しておけばよいので、経時変化することがない。図6に示した可変遅延線は、遅延量が3ビットディジタル値dlyで指定される。信号を遅延させる電流制限のため、電源Vcc側にはpチャネル型MOSトランジスタTdp1〜 Tdp8が、接地Vss側には、nチャネル型MOSトランジスタTdn1〜 Tdn8が接続され、Tip1とTin1で構成される前段のインバータにTdp1〜 Tdp4とTdn1〜 Tdn4が、Tip2とTin2で構成される後段のインバータにTdp5〜 Tdp8とTdn5〜 Tdn8が、それぞれ接続されている。電流制限のためのpチャネル型MOSトランジスタTdp1とTdp5、Tdp2とTdp6、Tdp3とTdp7は、それぞれ同じサイズであって、基準のゲート幅/ゲート長比Wp0/Lp0の2の冪乗倍、4Wp0/Lp0、2Wp0/Lp0、Wp0/Lp0のサイズになっている。Tdp4とTdp8は、ゲート幅/ゲート長比Wp1/Lp1となっている。電流制限のためのpチャネル型MOSトランジスタも同様に、Tdn1とTdn5、Tdn2とTdn6、Tdn3とTdn7、Tdn4とTdn8は、それぞれ同じサイズであって、それぞれ、4Wn0/Ln0、2Wn0/Ln0、Wn0/Lp0、Wn1/Ln1となっている。   FIG. 6 shows a configuration example of the variable delay line 105 in the clock generation circuit 10. The variable delay line 105 can be controlled by a digital signal, and is designed so that no through current flows. The variable delay line 105 suppresses the current consumption to only the leakage current of the device when the clock output is stopped. In addition, since the delay amount may be stored in a register or the like as a digital value, it does not change with time. In the variable delay line shown in FIG. 6, the delay amount is designated by a 3-bit digital value dly. In order to limit the current for delaying the signal, p-channel MOS transistors Tdp1 to Tdp8 are connected to the power supply Vcc side, and n-channel MOS transistors Tdn1 to Tdn8 are connected to the ground Vss side, and the former stage composed of Tip1 and Tin1 Tdp1 to Tdp4 and Tdn1 to Tdn4 are connected to this inverter, and Tdp5 to Tdp8 and Tdn5 to Tdn8 are connected to the subsequent inverter composed of Tip2 and Tin2, respectively. The p-channel MOS transistors Tdp1 and Tdp5, Tdp2 and Tdp6, and Tdp3 and Tdp7 for current limitation have the same size, and are a power of 2 of the reference gate width / gate length ratio Wp0 / Lp0, 4Wp0 / The sizes are Lp0, 2Wp0 / Lp0, and Wp0 / Lp0. Tdp4 and Tdp8 have a gate width / gate length ratio Wp1 / Lp1. Similarly, the p-channel MOS transistors for current limiting have the same size, Tdn1 and Tdn5, Tdn2 and Tdn6, Tdn3 and Tdn7, and Tdn4 and Tdn8, respectively. Lp0 and Wn1 / Ln1.

遅延量dlyは、最上位ビットから順にdly[2],dly[1],dly[0]が、それぞれ電流制限用のnチャネル型MOSトランジスタTdn1とTdn5、Tdn2とTdn6、Tdn3とTdn7に、その反転信号が、それぞれ電流制限用のpチャネル型MOSトランジスタTdp1とTdp5、Tdp2とTdp6、Tdp3とTdp7に接続されている。これらの電流制限用MOSトランジスタは、基準のサイズWn0/Ln0, Wp0/Lp0の2の冪乗のサイズになっているので、3ビットの2進数で表現された遅延量dlyに比例する電流制限を行うことができる。Tdp4とTdp8、Tdn4とTdn8は、遅延量dlyの制御を受けない遅延量を決める電流制限トランジスタである。遅延量dlyに対して、加算・減算を行って、クロック周波数の引き込みなどの制御を行う場合に、dlyの値がゼロとなってクロック出力が停止すると復帰できなくなるので遅延量dlyの値がゼロとなってもクロック出力が停止することがないように、最低発振周波数を保証することができる。   The delay amount dly includes dly [2], dly [1], and dly [0] in order from the most significant bit to current limiting n-channel MOS transistors Tdn1 and Tdn5, Tdn2 and Tdn6, and Tdn3 and Tdn7, respectively. Inverted signals are respectively connected to the current limiting p-channel MOS transistors Tdp1 and Tdp5, Tdp2 and Tdp6, and Tdp3 and Tdp7. Since these current limiting MOS transistors have a power size of 2 of the reference sizes Wn0 / Ln0 and Wp0 / Lp0, the current limiting is proportional to the delay amount dly expressed in a 3-bit binary number. It can be carried out. Tdp4 and Tdp8, and Tdn4 and Tdn8 are current limiting transistors that determine a delay amount that is not controlled by the delay amount dly. When adding or subtracting the delay amount dly to control the clock frequency, etc., the delay amount dly is zero because the dly value becomes zero and the clock output cannot be recovered when it is stopped. In this case, the minimum oscillation frequency can be guaranteed so that the clock output does not stop.

本例における可変遅延線は、電流制限用MOSトランジスタのディジタル的なオン・オフによって電流供給能力を変化させるものであって、PLLの電圧制御発振回路で多用されるカレントミラー回路で定常的な電流を流す方式を採用していないので、入力端子からパルスが入力されない限り、トランジスタの接合リーク電流以外の遷移電流、貫通電流を消費することがない。したがって、待機時の消費電流を1μAより遥かに小さい水準に抑えることが可能である。内部回路を構成する微細なトランジスタは、接合リークが顕著であるが、入出力回路に使われる比較的耐圧と閾値電圧の高いトランジスタは、接合リークがpA/cmオーダーとされる。これらの高耐圧トランジスタを使うことによって、リーク電流をほぼゼロに抑えることができる。また、遅延量はディジタル的にレジスタに格納されているので、時間の経過に伴って保持している値が変化することはない。一方、PLLの電圧制御発振回路で多用される、制御電圧をコンデンサに蓄えて、チャージポンプで制御するようなアナログ方式は、発振周波数等を記憶するために蓄積した電荷が時間の経過に伴って失われるので、待機中にこのような情報を保持することは困難である。待機モードに入ってクロックを停止する直前とまったく同じ状態に復帰することが可能である。待機モード開始時点と、復帰時点で、温度や電源電圧などの動作環境が変化して、同じ設定値であっても発振周波数が異なる場合が生ずる。本例では、温度補償、電源電圧の安定化については省略しているが、これらの技術を併用すれば、待機モードの前後で動作環境の変化によってクロック周波数が変動するのを回避することができる。 The variable delay line in this example changes the current supply capability by digitally turning on and off the current limiting MOS transistor, and is a steady current in a current mirror circuit frequently used in a voltage-controlled oscillation circuit of a PLL. Therefore, unless a pulse is input from the input terminal, no transition current and through current other than the junction leakage current of the transistor are consumed. Therefore, the current consumption during standby can be suppressed to a level much smaller than 1 μA. A minute transistor constituting the internal circuit has a remarkable junction leakage, but a transistor having a relatively high breakdown voltage and threshold voltage used in the input / output circuit has a junction leakage on the order of pA / cm 2 . By using these high voltage transistors, the leakage current can be suppressed to almost zero. Since the delay amount is digitally stored in the register, the held value does not change with the passage of time. On the other hand, an analog method that is frequently used in a voltage-controlled oscillation circuit of a PLL, in which a control voltage is stored in a capacitor and controlled by a charge pump, the accumulated charge for storing the oscillation frequency etc. It is difficult to keep such information while waiting because it is lost. It is possible to return to the same state as just before the clock is stopped by entering the standby mode. The operating environment such as temperature and power supply voltage changes at the time of starting the standby mode and at the time of return, and the oscillation frequency may be different even with the same set value. In this example, temperature compensation and stabilization of the power supply voltage are omitted, but if these technologies are used together, it is possible to avoid fluctuations in the clock frequency due to changes in the operating environment before and after the standby mode. .

本例では、遅延量制御を3ビット、8階調で制御する回路を例示したが、クロックパルス幅を、基準クロック信号CLK0の周期の逓倍数分の1に正確に合わせこむような制御を行う場合には、ビット数を増加して階調を細かくすることが有効である。また、本例では、前段と後段で同じ回路を使った例を示したに過ぎないが、適宜変更しても良い。前段と後段の遅延量を独立に制御することができるように構成すれば、クロック信号のデューティを調整することができる。   In this example, a circuit for controlling the delay amount control with 3 bits and 8 gradations is illustrated, but control is performed so that the clock pulse width is accurately adjusted to 1 / multiple of the cycle of the reference clock signal CLK0. In this case, it is effective to increase the number of bits to make the gradation finer. Further, in this example, only an example in which the same circuit is used in the former stage and the latter stage is shown, but it may be changed as appropriate. If the delay amount of the front stage and the rear stage can be controlled independently, the duty of the clock signal can be adjusted.

また、Tdp4とTdp8、Tdn4とTdn8は、遅延量dlyの制御を受けない遅延量を決めるものとし、固定の値である例を示したが、これを別のレジスタで遅延量を増減制御することができるようにしても良い。このとき、dlyで傾きを、上記別のレジスタで切片をそれぞれ制御して、より自由度の高い、精密な制御が可能となる。   In addition, Tdp4 and Tdp8, and Tdn4 and Tdn8 determine the delay amount that is not controlled by the delay amount dly, and an example of a fixed value is shown. However, this is controlled by increasing or decreasing the delay amount using another register. You may be able to. At this time, the inclination can be controlled by dly and the intercept can be controlled by the other register, thereby enabling precise control with a higher degree of freedom.

本例では、可変遅延線とカウンタを用いて発生するパルスの数を制御する方式について説明したが、同様の機能を実現する回路は、多数考えられる。例えば、可変遅延線を、発生させる最大のパルス数に対応する数だけ備え、適宜マスクする回路構成も考えられる。回路規模は増加するが、制御が単純であって、複雑な制御系の中に組み込む場合は、有効である。   In this example, the method of controlling the number of pulses generated using a variable delay line and a counter has been described, but many circuits that realize the same function are conceivable. For example, a circuit configuration in which the number of variable delay lines corresponding to the maximum number of pulses to be generated is appropriately masked can be considered. Although the circuit scale increases, it is effective when the control is simple and is incorporated in a complicated control system.

尚、クロック周波数に正確さを要求されないようなマイクロコントローラの場合、自走モードのみを実現すれば十分である。そのとき、起動信号はパワーオンリセットを入力する。クロック発振源を備える必要がないので、非常に消費電力が低く、しかも安価な制御システムを実現することができる。   In the case of a microcontroller that does not require accuracy in the clock frequency, it is sufficient to realize only the free-running mode. At that time, the activation signal inputs a power-on reset. Since it is not necessary to provide a clock oscillation source, it is possible to realize an inexpensive control system that consumes very little power.

自走モードのみを備えるクロック生成回路10を搭載したマイクロコントローラにおいて、待機モードでクロック信号を停止する機能を実現することもできる。その場合には、セットリセットフリップフロップ回路101のリセット端子Rに、マイクロコントローラが待機モードになったことを示す信号を入力し、起動信号には、リセット信号の他、割り込み信号や、復帰時刻を設定されたタイマからの復帰要求信号などを入力する。本例のクロック生成回路10は、クロック発生までの待ち時間が極めて短く、図5のタイミングチャートに示されるように動作クロックの1サイクルよりはるかに短く設計することができるので、割り込み信号を起動信号入力としたマイクロコントローラにおいては、待機状態でクロックを停止していても、復帰要求発生からクロック発振安定を待つなどの必要なく、即座に割り込み処理を開始することができるので、待機状態での極限までの消費電力削減と即座の復帰処理を両立することができるという効果を奏する。   In the microcontroller equipped with the clock generation circuit 10 having only the free-running mode, the function of stopping the clock signal in the standby mode can be realized. In that case, a signal indicating that the microcontroller has entered the standby mode is input to the reset terminal R of the set-reset flip-flop circuit 101, and an interrupt signal and a return time in addition to the reset signal are input to the start signal. Input the return request signal from the set timer. The clock generation circuit 10 of this example has a very short waiting time until the clock is generated, and can be designed to be much shorter than one cycle of the operation clock as shown in the timing chart of FIG. In the input microcontroller, even if the clock is stopped in the standby state, interrupt processing can be started immediately without waiting for the clock oscillation to stabilize after the return request is generated. It is possible to achieve both a reduction in power consumption and an immediate return process.

図7には、上記マイクロコントローラ1の別の構成例が示される。   FIG. 7 shows another configuration example of the microcontroller 1.

図7に示されるマイクロコンピュータ1が、図1に示されるのと大きく相違するのは、シリアル通信インタフェース回路60を含む点である。シリアル通信インタフェース回路60は、バスBUSを介してCPU40に結合され、このCPU40の制御下でシリアル通信を可能とする。上記シリアル通信インタフェース回路60は、取り込まれたシリアル信号からスタートビットを検出するためのスタートビット検出回路61、クロック信号を生成するためのクロック生成回路610、データをラッチ可能なラッチ回路62、シリアルデータをパラレルデータに変換可能なシリアル・パラレル変換回路(S/P変換回路)63、先入れ先出し形式のバッファとされるFIFO(Fist In First Out)64、起動コマンドを検出可能な起動コマンド検出回路65を含んで成る。   The microcomputer 1 shown in FIG. 7 is greatly different from that shown in FIG. 1 in that a serial communication interface circuit 60 is included. The serial communication interface circuit 60 is coupled to the CPU 40 via the bus BUS and enables serial communication under the control of the CPU 40. The serial communication interface circuit 60 includes a start bit detection circuit 61 for detecting a start bit from a captured serial signal, a clock generation circuit 610 for generating a clock signal, a latch circuit 62 capable of latching data, serial data Includes a serial / parallel conversion circuit (S / P conversion circuit) 63 capable of converting data into parallel data, a FIFO (First In First Out) 64 serving as a first-in first-out buffer, and a start command detection circuit 65 capable of detecting a start command. It consists of

スタートビット検出回路61によってスタートビットが検出され、その検出結果によりクロック生成回路610の起動信号STA2が形成される。シリアル信号はラッチ回路62に取り込まれた後、シリアル・パラレル変換回路63によってパラレルデータに変換されて、FIFO64に格納される。これら一連の動作は、クロック生成回路610によって生成されたクロック信号CLK2に同期して行われる。   A start bit is detected by the start bit detection circuit 61, and a start signal STA2 of the clock generation circuit 610 is formed based on the detection result. The serial signal is taken into the latch circuit 62, converted into parallel data by the serial / parallel conversion circuit 63, and stored in the FIFO 64. A series of these operations are performed in synchronization with the clock signal CLK2 generated by the clock generation circuit 610.

クロック生成回路10は、シリアル通信インタフェース回路60内に設けられたクロック生成回路610とは別の回路である。クロック生成回路10,610には、図4に示される構成が採用される。上記のように、待機時にCPU40へのクロック発振を完全に停止するように構成する場合、シリアル通信によって、コマンドを受信したときに待機モードにあったCPU40を復帰させる回路を構成することができる。シリアル・パラレル変換回路63によって得られたパラレルデータを解析して、起動コマンドを検出し、割り込み回路へ割り込み信号として接続し、また、クロック発振回路30のクロック起動信号として接続する。本例では、起動コマンド検出回路65において所定の起動コマンドを検出し、それに基づいてクロック発振を再開し、割り込みを発生させることができる。   The clock generation circuit 10 is a circuit different from the clock generation circuit 610 provided in the serial communication interface circuit 60. The clock generation circuits 10 and 610 employ the configuration shown in FIG. As described above, when the clock oscillation to the CPU 40 is completely stopped during standby, a circuit for returning the CPU 40 in the standby mode when receiving a command can be configured by serial communication. The parallel data obtained by the serial / parallel conversion circuit 63 is analyzed to detect a start command, and is connected to the interrupt circuit as an interrupt signal, and is also connected as a clock start signal of the clock oscillation circuit 30. In this example, the start command detection circuit 65 detects a predetermined start command, and based on this, restarts clock oscillation and can generate an interrupt.

一方、起動コマンドを取り決めずに、待機モード中にシリアル信号が入力されたときは、無条件で通常モードに復帰する仕様も有効である。その場合は、スタートビット検出回路61によって検出され信号をクロック発振回路30の発振制御信号OCNTや、割り込み信号INTとしても良い。通常動作中、シリアル信号を受信するたびにスタートビットを検出して、割り込みを発生するのを望まない場合には、待機モードからの復帰処理で当該割り込みをマスクし、再び待機モードに遷移する前処理で割り込みマスクを解除すると良い。   On the other hand, when a serial signal is input during the standby mode without negotiating the start command, it is effective to return to the normal mode unconditionally. In that case, the signal detected by the start bit detection circuit 61 may be the oscillation control signal OCNT of the clock oscillation circuit 30 or the interrupt signal INT. During normal operation, if it is not desired to detect the start bit every time a serial signal is received and generate an interrupt, the interrupt is masked by return processing from standby mode, and before transitioning to standby mode again. It is recommended to cancel the interrupt mask by processing.

図8に、シリアル信号の一例として、調歩同期シリアル通信のデータフォーマットを示す。通信のない初期状態はハイレベルであり、スタートビットとしてローレベルが1bit送信される。それに続いてデータビット、パリティビット、ストップビットが続く。詳細なフォーマットは、通信を開始する前に予め設定される。データビットの長さは、7bit若しくは8bitを設定する。パリティビットは、偶数パリティを若しくは奇数パリティを付加するか、パリティビットを付加しないかを設定する。ストップビットは、次のフレームのスタートビットが来るまでの最小限のハイレベル期間を規定するもので、1bitから2bitに設定する。スタートビットからストップビットまでを1フレームと呼ぶ。   FIG. 8 shows a data format of asynchronous serial communication as an example of the serial signal. The initial state without communication is a high level, and a low level of 1 bit is transmitted as a start bit. This is followed by data bits, parity bits, and stop bits. The detailed format is set in advance before starting communication. The length of the data bit is set to 7 bits or 8 bits. The parity bit sets whether to add even parity, odd parity, or no parity bit. The stop bit defines a minimum high level period until the start bit of the next frame arrives, and is set from 1 bit to 2 bits. A frame from the start bit to the stop bit is called one frame.

図9には、図8に示されるシリアル信号を受信したときの動作タイミングが示される。   FIG. 9 shows the operation timing when the serial signal shown in FIG. 8 is received.

スタートビット検出回路61は、シリアル信号のスタートビットを受信したことを検出したとき、起動信号STA2をハイレベルにする。クロック生成回路610は、起動信号STA2がハイになったのを受けて、クロックの生成を開始する。クロック生成回路610の動作は、図2(B)に示される逓倍モードである。逓倍数は、スタートビット1bitと、データ8bitと、パリティビット1bitを受信するように10bitに設定される。図8を用いて説明したように、データビットは7ビットでもよく、パリティビットは付加しなくても良いので、逓倍数は、フォーマットに合わせて適宜設定する。パルス幅設定部12で与える遅延量は、シリアル通信のボーレートから求められる1ビットあたりの周期に基づいて設定する。例えば、ボーレートが9600bpsであれば、1bitの周期は1/9600 [s] = 0.104 [ms]であり、遅延量はその半分の0.052 [ms]に設定する。クロック生成回路610は、図4に示される内部のカウンタ103で発生したクロックパルスの数を計数しており、逓倍数に達すると、クロックの発生が停止される。このとき、併せてスタートビット検出回路61もリセットされる。スタートビット検出回路61は、シリアル信号のハイレベルからローレベルへの変化を検出する回路によって実現されるが、データの中にも同じ変化は十分にあり得るので、その変化を誤ってクロック生成回路610の起動信号としないように、起動信号は1フレーム中ハイを維持するように構成されている。1フレームの終了時点でリセットすることにより、次に受信されるローレベル信号は必ずスタートビットであることが保証される。発生するクロックは、受信されたシリアル信号に立ち上がりが同期しているが、パルス幅設定部12に設定される遅延量が、シリアル信号のボーレートに正確に対応するとは限らないので、シリアル信号の取り込みには、生成されたクロックの反転信号を用いる。図7では、後段のS/P変換回路63からFIFO64まで反転クロック使って動作する例を示している。本例によれば、シリアル通信の受信用クロックは、スタートビットを受信して初めて生成され始め、フレームの受信完了で停止するので、必要最低限のクロックパルスを供給すればよく、消費電力を削減することができる。特に待機時には、スタートビットの受信を待つために常時クロック信号を供給しつづける必要があったが、これを全く停止しても、スタートビットを受信した瞬間からクロック供給を再開することができるので、待機時の消費電力をゼロにすることができ、待機電力の削減での効果が著しく大きい。   When the start bit detection circuit 61 detects that the start bit of the serial signal has been received, the start bit detection circuit 61 sets the start signal STA2 to a high level. The clock generation circuit 610 starts clock generation in response to the activation signal STA2 becoming high. The operation of the clock generation circuit 610 is a multiplication mode shown in FIG. The multiplication number is set to 10 bits so as to receive a start bit of 1 bit, data of 8 bits, and parity bit of 1 bit. As described with reference to FIG. 8, the data bits may be 7 bits, and the parity bit may not be added. Therefore, the multiplication number is appropriately set according to the format. The delay amount given by the pulse width setting unit 12 is set based on the cycle per bit obtained from the baud rate of serial communication. For example, if the baud rate is 9600 bps, the 1-bit period is 1/9600 [s] = 0.104 [ms], and the delay amount is set to 0.052 [ms], which is half of that. The clock generation circuit 610 counts the number of clock pulses generated by the internal counter 103 shown in FIG. 4, and when the multiplication number is reached, the clock generation is stopped. At this time, the start bit detection circuit 61 is also reset. The start bit detection circuit 61 is realized by a circuit that detects a change in the serial signal from a high level to a low level. However, the same change may be sufficiently present in the data, so that the clock generation circuit erroneously changes the change. The activation signal is configured to remain high during one frame so that the activation signal of 610 is not used. By resetting at the end of one frame, it is guaranteed that the low level signal received next is always a start bit. The generated clock is synchronized with the received serial signal, but the delay amount set in the pulse width setting unit 12 does not always correspond to the baud rate of the serial signal. For this, an inverted signal of the generated clock is used. FIG. 7 shows an example in which operation is performed using an inverted clock from the S / P conversion circuit 63 to the FIFO 64 in the subsequent stage. According to this example, the serial communication reception clock starts to be generated only after receiving the start bit and stops upon completion of frame reception, so it is sufficient to supply the minimum necessary clock pulses, reducing power consumption. can do. Especially when waiting, it was necessary to continue to supply the clock signal constantly to wait for the reception of the start bit, but even if this is stopped completely, the clock supply can be restarted from the moment the start bit is received, The power consumption during standby can be reduced to zero, and the effect of reducing standby power is significantly great.

上述のように、パルス幅設定部12で与える遅延量は、シリアル通信のボーレートから求められる1ビットあたりの周期に基づいて設定するが、動作温度や電源電圧が想定と異なり、或いは、通信相手のボーレートが誤差を含む場合があり、必ずしも理想的なタイミングでデータを取り込むことができるとは限らない。シリアル信号の変化点から次の変化点の中央が理想的なデータ取り込みタイミングであるが、図10には、パルス幅設定部12によって設定された遅延量が、理想よりも少なく、クロック周期が短い場合を図示している。本例のクロック生成回路610は、PLLなどとは異なり、誤差を少なくしていくようなフィードバック手段を持たないので、誤差は徐々に蓄積する。しかし、誤差の蓄積は1フレームの期間に限られ、次のスタートビットを検出したときにリセットされる。通常、本例のような調歩同期シリアル通信では、フレーム長は高々10bitであるので、理想的なデータ取り込みタイミング201〜213と、実際のデータ取り込みタイミング301〜313との誤差の蓄積は大きくはなく、目的のビットを取り込むことができなくなるほど大きなずれとなることは、適宜パルス幅を定めることにより、回避することができる。   As described above, the delay amount given by the pulse width setting unit 12 is set based on the cycle per bit obtained from the baud rate of serial communication. However, the operating temperature and the power supply voltage are different from those assumed, or the communication partner The baud rate may include an error, and data cannot always be captured at an ideal timing. The center of the next change point from the change point of the serial signal is the ideal data capture timing. In FIG. 10, the delay amount set by the pulse width setting unit 12 is less than ideal and the clock cycle is short. The case is illustrated. Unlike the PLL and the like, the clock generation circuit 610 of this example does not have a feedback unit that reduces the error, so that the error gradually accumulates. However, error accumulation is limited to the period of one frame and is reset when the next start bit is detected. Normally, in asynchronous serial communication as in this example, the frame length is 10 bits at most, so the accumulation of errors between the ideal data capture timings 201 to 213 and the actual data capture timings 301 to 313 is not large. It is possible to avoid such a large shift that the target bit cannot be taken in by appropriately setting the pulse width.

理想的なデータ取り込みタイミング201〜213を実現するためには、図1に示されるような、パルス幅制御回路80をさらに設け、基準クロックに合わせる引き込み動作を行うことによって、受信されたシリアル信号に完全に同期したクロック信号を得ることが可能となる。基準クロック信号CLK0は、外部から入力するか、内部に発振回路を具備して生成すると良い。さらに、CPU40にクロック信号を供給するためのクロック発振回路30の出力クロックを元にして生成しても良い。初期化動作において、通信相手との間でボーレートの整合を行うときに、引き込み動作をして、パルス幅設定部12に設定すべき値を求めておくことが有効である。動作環境の変動に対しては、適宜引き込み動作を行って、追随することも可能となる。   In order to realize the ideal data capture timings 201 to 213, a pulse width control circuit 80 as shown in FIG. 1 is further provided, and by performing a pull-in operation in accordance with the reference clock, the received serial signal is converted into a received serial signal. It becomes possible to obtain a completely synchronized clock signal. The reference clock signal CLK0 may be input from the outside or generated by including an oscillation circuit inside. Further, it may be generated based on the output clock of the clock oscillation circuit 30 for supplying a clock signal to the CPU 40. In the initialization operation, it is effective to obtain a value to be set in the pulse width setting unit 12 by performing a pull-in operation when performing baud rate matching with the communication partner. With respect to fluctuations in the operating environment, it is possible to follow by performing a pull-in operation as appropriate.

本例では、1ビットのシリアルデータを受信するクロックをパルスとして説明したが、1ビットあたり複数回のデータ取り込みを行う、所謂オーバーサンプリングを適用することもできる。その場合は、逓倍数をオーバーサンプリング倍にすると同時にパルス幅設定部12で設定するパルス幅をオーバーサンプリング数分の1に減じて設定すればよい。オーバーサンプリングを行うことによって、前述のデータ取り込みタイミングの誤差の蓄積によって、万一サンプリング点が目的のビット以外にずれてしまった場合にも、救済することができるような回路構成が可能となる。   In this example, the clock for receiving 1-bit serial data has been described as a pulse, but so-called oversampling in which data is taken in multiple times per bit can also be applied. In that case, it is only necessary to set the multiplication number to the oversampling multiple and simultaneously reduce the pulse width set by the pulse width setting unit 12 to 1 / oversampling number. By performing oversampling, it is possible to realize a circuit configuration that can remedy even if the sampling point is shifted to a bit other than the target bit due to the accumulation of the error of the data fetch timing described above.

図11には、上記マイクロコントローラ1の別の構成例が示される。図11に示される回路が、図7に示されるのと大きく相違するのは、シリアル通信インタフェース60に代えてUSB(Universal Serial Bus)インタフェース70を備えた点である。本例におけるマイクロコントローラ1は、基本的には図7に示される基づいて実現されているが、USB特有の構成ブロックとして、差動増幅回路72、サスペンド復帰検出回路71、クロック発信安定判定回路77、クロック発信回路78が設けられる。USBは、D+とD−と呼ばれる相補の信号で通信を行うので、差動増幅回路72を使って受信する。通信はホストとファンクションと呼ばれる、マスタとスレーブの関係にあるデバイス間で行われ、例えばパーソナルコンピュータはホストの機能を有し、ファンクションの機能を持つUSBデバイスを接続可能とされている。USBファンクションデバイスは、通信の必要がないときには、サスペンドと呼ばれる待機状態にして、システムとしての消費電力を抑制することができる。本例は、待機状態での消費電力を抑えることができるので、ファンクションデバイスに好適である。USBのサスペンド状態は、本来相補で必ず逆の論理レベルを取るべきD+とD−が、ともに同じ論理レベルをとるなど特殊な状態で規定されており、D+とD−の状態を監視することによってサスペンド状態からの復帰を検知することができる。通信品質を保つために、クロック周波数の精度は、規格によって定められている。最も広く普及している12Mbpsのフルスピードと呼ばれるデータレートのモードを例にとると、USBファンクションのクロックには、2500ppmの精度が要求されている。本例では、このクロック精度を実現するために、クロック生成回路710とは別に、水晶振動子により発振するクロック発振回路78が設けられる。また、このクロック発振回路78での発振が安定しているか否かを判定するためのクロック発振安定判定回路77が設けられている。   FIG. 11 shows another configuration example of the microcontroller 1. The circuit shown in FIG. 11 is greatly different from that shown in FIG. 7 in that a USB (Universal Serial Bus) interface 70 is provided instead of the serial communication interface 60. The microcontroller 1 in this example is basically realized based on the configuration shown in FIG. 7, but includes a differential amplification circuit 72, a suspend return detection circuit 71, a clock transmission stability determination circuit 77 as a configuration block unique to USB. A clock transmission circuit 78 is provided. Since USB communicates with complementary signals called D + and D−, it receives using the differential amplifier circuit 72. Communication is performed between devices in a master-slave relationship called a host and a function. For example, a personal computer has a host function, and a USB device having a function function can be connected. When there is no need for communication, the USB function device can be placed in a standby state called “suspend” to suppress power consumption as a system. This example is suitable for a function device because power consumption in a standby state can be suppressed. The USB suspend state is defined in a special state such as D + and D−, which should be complementary and should always take the opposite logic levels, both have the same logic level. By monitoring the states of D + and D−, A return from the suspended state can be detected. In order to maintain communication quality, the accuracy of the clock frequency is defined by the standard. Taking the data rate mode called full speed of 12 Mbps, which is the most widely used, as an example, the USB function clock is required to have an accuracy of 2500 ppm. In this example, in order to realize this clock accuracy, a clock oscillation circuit 78 that oscillates by a crystal resonator is provided separately from the clock generation circuit 710. Further, a clock oscillation stability determination circuit 77 is provided for determining whether or not the oscillation in the clock oscillation circuit 78 is stable.

サスペンド復帰検出回路71によって、サスペンドからの復帰要求が与えられたことを検知すると、即座にクロック生成回路710からのクロック出力を開始して、送出されてくるデータを受信し、FIFO64などのバッファに順次蓄積する。これと平行して、クロック発振回路78に対してクロック発振動作開始の制御が行われる。クロック発振は、数msで安定するので、安定したことを検出した後に、供給するクロックを切り換える。   When the suspend return detection circuit 71 detects that a suspend return request has been given, it immediately starts clock output from the clock generation circuit 710, receives the transmitted data, and stores it in a buffer such as the FIFO 64. Accumulate sequentially. In parallel with this, the clock oscillation circuit 78 is controlled to start the clock oscillation operation. Since the clock oscillation stabilizes in a few ms, the supplied clock is switched after detecting the stability.

USBファンクションデバイスには、自身が電源を持つものと。ホストから電源供給を受けるものがあり、前者をセルフパワード、後者をバスパワードと呼んでいる。バスパワードデバイスの場合、サスペンド状態で消費を許されている電力は、500μA以下に制限されている。したがって、サスペンド状態でクロック発振を停止することは、非常に重要である。一方、サスペンドからの復帰要求を受け取ってから、ホストへ応答するまでの時間的制約に関しても、厳しい規定が設けられている。本例によれば、待機時すなわちサスペンド中はクロック発振を停止して、消費電力をほぼゼロに抑えることができ、サスペンドからの復帰にあたって、即座にクロック供給を再開するので、常時クロックを供給していた場合と同じ迅速さで、応答することができる。   A USB function device has its own power supply. Some of them receive power supply from the host, and the former is called self-powered and the latter is called bus-powered. In the case of a bus-powered device, the power allowed to be consumed in the suspended state is limited to 500 μA or less. Therefore, it is very important to stop the clock oscillation in the suspended state. On the other hand, strict regulations are also provided regarding the time constraint from the receipt of a return request from suspend until the response to the host. According to this example, the clock oscillation can be stopped during standby, that is, during suspend, so that power consumption can be reduced to almost zero, and the clock supply is resumed immediately upon return from suspend. You can respond as quickly as you would.

本例では、USBの規格が規定するクロック精度を満足するために、クロック発振回路78を別途設けた例を示した。クロック生成回路710に電源電圧変動の影響を受けない基準電源を設け、また、温度補償回路を設けて、パルス幅設定部12によるパルス幅の設定精度を向上して、規格を満足することもできる。この場合は、クロック生成回路710は自走モードで動作させる。したがって、図1に示されたクロック生成回路10から逓倍モードに必要な回路を削除して構成すればよい。さらに、CPU40のクロック供給のために、クロック発振回路30を具備している場合には、サスペンドからの復帰には自走モードで動作し、CPU40のクロック発振回路30の動作が安定した後に、そのクロックを元にした逓倍モードに切り換えることも可能である。また、ホストから受信されるUSB信号から、タイミング情報、すなわちビットレート情報を抽出して、それに対して引き込み動作を行っても良い。   In this example, in order to satisfy the clock accuracy defined by the USB standard, an example in which a clock oscillation circuit 78 is separately provided is shown. The clock generation circuit 710 can be provided with a reference power supply that is not affected by fluctuations in the power supply voltage, and a temperature compensation circuit can be provided to improve the setting accuracy of the pulse width by the pulse width setting unit 12 and satisfy the standard. . In this case, the clock generation circuit 710 is operated in the free-running mode. Therefore, the circuit necessary for the multiplication mode may be deleted from the clock generation circuit 10 shown in FIG. Further, in the case where the clock oscillation circuit 30 is provided for supplying the clock of the CPU 40, the operation is performed in the free-running mode for the return from the suspend, and after the operation of the clock oscillation circuit 30 of the CPU 40 is stabilized, It is also possible to switch to the multiplication mode based on the clock. Further, timing information, that is, bit rate information may be extracted from a USB signal received from the host, and a pull-in operation may be performed on the timing information.

また、CPU40にクロックを供給するクロック発振回路30と、USB用のクロック発振回路78は、共用することができる。この場合は、どちらか一方に復帰要求信号があったときに、発振動作を再開するように制御し、ともに発振不要になるのを待って発振を停止すればよい。共用することによって、回路規模が小さくすることができるだけでなく、外付けの水晶振動子を節約することができ、また、消費電力を低減することができるという効果もある。   The clock oscillation circuit 30 that supplies a clock to the CPU 40 and the USB clock oscillation circuit 78 can be shared. In this case, when either one of them has a return request signal, control is performed so that the oscillation operation is resumed, and the oscillation may be stopped after both oscillations become unnecessary. By sharing, not only the circuit scale can be reduced, but also an external crystal resonator can be saved, and power consumption can be reduced.

以上本発明者によってなされた発明を具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   Although the invention made by the present inventor has been specifically described above, the present invention is not limited thereto, and it goes without saying that various changes can be made without departing from the scope of the invention.

例えば、信号の極性や、ビット数、逓倍数の設定などは、上記の実施形態に制限されるものではない。また、クロック生成回路は、同一チップ上のCPUなどの回路のみにクロックを供給することに制限されるものではなく、システムを構成する他のLSIなどに供給するものであっても、システム全体として同様の作用効果を奏するものである。   For example, the polarity of the signal, the number of bits, and the setting of the multiplication number are not limited to the above embodiment. In addition, the clock generation circuit is not limited to supplying a clock only to a circuit such as a CPU on the same chip, and even if it is supplied to other LSIs constituting the system, the entire system The same effect is obtained.

以上の説明では主として本発明者によってなされた発明をその背景となった利用分野であるマイクロコントローラに適用した場合について説明したが、本発明はそれに限定されるものではなく、各種半導体集積回路に広く適用することができる。   In the above description, the case where the invention made by the present inventor is applied to a microcontroller, which is the field of use behind it, has been described. However, the present invention is not limited to this and is widely applied to various semiconductor integrated circuits. Can be applied.

本発明は、少なくともクロック信号を生成するためのクロック生成回路を含むことを条件に適用することができる。   The present invention can be applied on condition that at least a clock generation circuit for generating a clock signal is included.

本発明にかかる半導体集積回路の一例であるマイクロコントローラの構成例ブロック図である。1 is a block diagram illustrating a configuration example of a microcontroller as an example of a semiconductor integrated circuit according to the present invention. 上記マイクロコントローラにおける主要部の動作タイミング図である。It is an operation | movement timing diagram of the principal part in the said microcontroller. 上記マイクロコントローラにおける主要部の動作タイミング図である。It is an operation | movement timing diagram of the principal part in the said microcontroller. 上記マイクロコントローラにおける主要部の構成例回路図である。FIG. 2 is a circuit diagram illustrating a configuration example of a main part in the microcontroller. 図4に示される回路の動作タイミング図である。FIG. 5 is an operation timing chart of the circuit shown in FIG. 4. 上記マイクロコントローラにおける主要部の構成例回路図である。FIG. 2 is a circuit diagram illustrating a configuration example of a main part in the microcontroller. 上記マイクロコントローラの別の構成例ブロック図である。It is another example block diagram of a configuration of the microcontroller. 図7に示されるマイクロコントローラにおける主要部の動作タイミング図である。FIG. 8 is an operation timing chart of main parts in the microcontroller shown in FIG. 7. 図7に示されるマイクロコントローラにおける主要部の動作タイミング図である。FIG. 8 is an operation timing chart of main parts in the microcontroller shown in FIG. 7. 図7に示されるマイクロコントローラにおける主要部の動作タイミング図である。FIG. 8 is an operation timing chart of main parts in the microcontroller shown in FIG. 7. 上記マイクロコントローラの別の構成例ブロック図である。It is another example block diagram of a configuration of the microcontroller.

符号の説明Explanation of symbols

1 マイクロコントローラ
10 クロック生成回路
11 パルス発生回路
12 パルス幅設定部
13 モード選択回路
20 動作モード制御回路
21 選択回路
22 エッジ検出回路
30 発振回路
40 CPU
50 割り込み制御回路
60 シリアル通信インタフェース回路
61 スタートビット検出回路
62 ラッチ回路
63 シリアル・パラレル変換回路
64 FIFO
65 起動コマンド検出回路
610 クロック生成回路
70 USBインタフェース回路
71 サスペンド復帰検出回路
72 差動増幅回路
76 起動コマンド検出回路
77 クロック発振安定判定回路
78 クロック発振回路
710 クロック生成回路
DESCRIPTION OF SYMBOLS 1 Microcontroller 10 Clock generation circuit 11 Pulse generation circuit 12 Pulse width setting part 13 Mode selection circuit 20 Operation mode control circuit 21 Selection circuit 22 Edge detection circuit 30 Oscillation circuit 40 CPU
50 interrupt control circuit 60 serial communication interface circuit 61 start bit detection circuit 62 latch circuit 63 serial / parallel conversion circuit 64 FIFO
65 Startup command detection circuit 610 Clock generation circuit 70 USB interface circuit 71 Suspend return detection circuit 72 Differential amplifier circuit 76 Startup command detection circuit 77 Clock oscillation stability determination circuit 78 Clock oscillation circuit 710 Clock generation circuit

Claims (5)

振動子を用いて基準クロック信号を生成する発振回路と、
内部論理回路により所定パルス幅のクロック信号を連続的に生成する自走モードと、上記基準クロック信号の周波数を逓倍することでクロック信号を生成する逓倍モードとを備えたクロック生成回路と、
上記クロック生成回路によって生成されたクロック信号に同期動作可能な内部回路と、
上記内部回路が上記クロック信号に同期して動作される通常モードと、上記発振回路の発振動作が停止される待機モードとの切り換えを制御可能な動作モード制御回路と、を含み、
上記動作モード制御回路は、上記待機モードでは、上記発振回路の上記発振動作を停止させ、上記待機モードから上記通常モードへ遷移させる事象を検知したとき、上記発振回路の上記発振動作を再開させるとともに、上記クロック生成回路を上記自走モードで動作させ、その後、上記自走モードから上記逓倍モードに切り換えるものである半導体集積回路。
An oscillation circuit that generates a reference clock signal using an oscillator;
A clock generation circuit having a free-running mode for continuously generating a clock signal having a predetermined pulse width by an internal logic circuit, and a multiplication mode for generating a clock signal by multiplying the frequency of the reference clock signal;
An internal circuit capable of operating synchronously with the clock signal generated by the clock generation circuit;
An operation mode control circuit capable of controlling switching between a normal mode in which the internal circuit is operated in synchronization with the clock signal and a standby mode in which the oscillation operation of the oscillation circuit is stopped,
In the standby mode, the operation mode control circuit stops the oscillation operation of the oscillation circuit and restarts the oscillation operation of the oscillation circuit when detecting an event of transition from the standby mode to the normal mode. A semiconductor integrated circuit which operates the clock generation circuit in the free-running mode and then switches from the free-running mode to the multiplication mode.
振動子を用いて基準クロック信号を生成する発振回路と、
内部論理回路により所定パルス幅のクロック信号を連続的に生成する自走モードと、上記基準クロック信号の周波数を逓倍することでクロック信号を生成する逓倍モードとを備えたクロック生成回路と、
上記クロック生成回路によって生成されたクロック信号に同期動作可能な内部回路と、
上記内部回路が上記クロック信号に同期して動作される通常モードと、上記発振回路の発振動作が停止される待機モードとの切り換えを制御可能な動作モード制御回路と、
上記内部回路と外部との間のシリアル通信を可能とするシリアル通信インタフェース回路と、を含み、
上記動作モード制御回路は、上記待機モードでは、上記発振回路の上記発振動作を停止させ、上記シリアル通信インタフェース回路において上記待機モードから上記通常モードへ遷移させる事象が検知されたとき、上記発振回路の上記発振動作を再開させるとともに、上記クロック生成回路を上記自走モードで動作させ、その後、上記自走モードから上記逓倍モードに切り換えるものである半導体集積回路。
An oscillation circuit that generates a reference clock signal using an oscillator;
A clock generation circuit having a free-running mode for continuously generating a clock signal having a predetermined pulse width by an internal logic circuit, and a multiplication mode for generating a clock signal by multiplying the frequency of the reference clock signal;
An internal circuit capable of operating synchronously with the clock signal generated by the clock generation circuit;
An operation mode control circuit capable of controlling switching between a normal mode in which the internal circuit is operated in synchronization with the clock signal and a standby mode in which the oscillation operation of the oscillation circuit is stopped;
A serial communication interface circuit that enables serial communication between the internal circuit and the outside,
The operation mode control circuit stops the oscillation operation of the oscillation circuit in the standby mode, and detects an event of transition from the standby mode to the normal mode in the serial communication interface circuit. A semiconductor integrated circuit which restarts the oscillation operation, operates the clock generation circuit in the free-running mode, and then switches from the free-running mode to the multiplication mode.
上記クロック生成回路は、上記自走モードのためのパルス発生と、上記逓倍モードのためのパルス発生とを実現可能なパルス発生回路と、
上記動作モード制御回路の制御に応じて、上記自走モードによるパルス発生と上記逓倍モードによるパルス発生とを選択可能な選択回路と、を含んで成る請求項1又は2記載の半導体集積回路。
The clock generation circuit is capable of realizing pulse generation for the free-running mode and pulse generation for the multiplication mode;
3. The semiconductor integrated circuit according to claim 1, further comprising a selection circuit capable of selecting pulse generation in the free-running mode and pulse generation in the multiplication mode in accordance with control of the operation mode control circuit.
上記半導体集積回路は、上記クロック生成回路で発生するクロック信号のパルス幅を定めるパルス幅設定部を有するパルス幅制御回路をさらに具備し、
上記パルス幅制御回路は、パルス幅設定部で定められるパルス幅に基づくクロック周期に上記逓倍モードにおける逓倍数を乗じた値を上記基準クロック信号の周期と一致させるべく、上記パルス幅設定部に定められる上記パルス幅の調整を可能とする請求項3記載の半導体集積回路。
The semiconductor integrated circuit further includes a pulse width control circuit having a pulse width setting unit that determines a pulse width of a clock signal generated by the clock generation circuit,
The pulse width control circuit determines the pulse width setting unit so that a value obtained by multiplying the clock cycle based on the pulse width determined by the pulse width setting unit by the multiplication number in the multiplication mode matches the cycle of the reference clock signal. 4. The semiconductor integrated circuit according to claim 3, wherein said pulse width can be adjusted.
上記内部回路として、上記クロック生成回路によって生成されたクロック信号に同期動作可能な中央処理装置を含むとき、上記待機モードから上記通常モードへ遷移させる事象に呼応して上記中央処理装置に対する割り込み制御を実行可能な割り込み制御回路を設けた請求項4記載の半導体集積回路。 When the internal circuit includes a central processing unit that can operate synchronously with the clock signal generated by the clock generation circuit, interrupt control for the central processing unit is performed in response to an event of transition from the standby mode to the normal mode. 5. The semiconductor integrated circuit according to claim 4, further comprising an executable interrupt control circuit.
JP2005107175A 2005-04-04 2005-04-04 Semiconductor integrated circuit Withdrawn JP2006285823A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005107175A JP2006285823A (en) 2005-04-04 2005-04-04 Semiconductor integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005107175A JP2006285823A (en) 2005-04-04 2005-04-04 Semiconductor integrated circuit

Publications (1)

Publication Number Publication Date
JP2006285823A true JP2006285823A (en) 2006-10-19

Family

ID=37407660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005107175A Withdrawn JP2006285823A (en) 2005-04-04 2005-04-04 Semiconductor integrated circuit

Country Status (1)

Country Link
JP (1) JP2006285823A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008078697A (en) * 2006-09-19 2008-04-03 Matsushita Electric Ind Co Ltd Radio device, and program
JP2013058906A (en) * 2011-09-08 2013-03-28 Denso Corp Communication network system
US8841954B2 (en) 2012-06-15 2014-09-23 Denso Corporation Input signal processing device
US9374082B2 (en) 2012-09-21 2016-06-21 Samsung Electronics Co., Ltd. Clock control device of controlling clock stable time based on operational condition, semiconductor device including the same and clock control method
JP2019164777A (en) * 2018-03-15 2019-09-26 株式会社リコー Electronic apparatus having power source and method performed by the same
US10797645B2 (en) 2018-07-20 2020-10-06 Seiko Epson Corporation Circuit device, oscillator, electronic apparatus, and vehicle

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008078697A (en) * 2006-09-19 2008-04-03 Matsushita Electric Ind Co Ltd Radio device, and program
JP4760638B2 (en) * 2006-09-19 2011-08-31 パナソニック株式会社 Wireless device and program
JP2013058906A (en) * 2011-09-08 2013-03-28 Denso Corp Communication network system
US8841954B2 (en) 2012-06-15 2014-09-23 Denso Corporation Input signal processing device
US9374082B2 (en) 2012-09-21 2016-06-21 Samsung Electronics Co., Ltd. Clock control device of controlling clock stable time based on operational condition, semiconductor device including the same and clock control method
JP2019164777A (en) * 2018-03-15 2019-09-26 株式会社リコー Electronic apparatus having power source and method performed by the same
JP7247662B2 (en) 2018-03-15 2023-03-29 株式会社リコー ELECTRONIC DEVICE WITH POWER SUPPLY AND METHOD PERFORMED BY ELECTRONIC DEVICE WITH POWER SUPPLY
US10797645B2 (en) 2018-07-20 2020-10-06 Seiko Epson Corporation Circuit device, oscillator, electronic apparatus, and vehicle

Similar Documents

Publication Publication Date Title
US7047434B2 (en) Data transfer control device and electronic equipment
US5550489A (en) Secondary clock source for low power, fast response clocking
US8375239B2 (en) Clock control signal generation circuit, clock selector, and data processing device
US8558600B2 (en) Clock signal generation circuit
US20050235172A1 (en) Micro-controller having USB control unit, MC unit and oscillating circuit commonly used by the USB control unit and the MC unit
JP2005190483A (en) Processor system for reducing power consumption in idle mode and its method
JP5529555B2 (en) Semiconductor integrated circuit and operating voltage control method
KR20090125836A (en) Power-saving clocking technique
JP2006285823A (en) Semiconductor integrated circuit
EP3152762B1 (en) Programmable power for a memory interface
KR19990014219A (en) Clock generation method and apparatus
JP2009302692A (en) Clock and data recovery circuit
JP3993860B2 (en) DLL circuit
US6956416B2 (en) Powerup control of PLL
US8819401B2 (en) Semiconductor device and reset control method in semiconductor device
TWI638517B (en) Mitigation of long wake-up delay of a crystal oscillator
US6304979B1 (en) Logic to enable/disable a clock generator in a secure way
US6791428B2 (en) Duty cycle tuner for low power real time clock oscillator
JP4219601B2 (en) Information processing device
US6496078B1 (en) Activating on-chip oscillator using ring oscillator
US7848163B2 (en) Semiconductor memory device and method for driving the same
US7564314B2 (en) Systems and arrangements for operating a phase locked loop
JP2954199B1 (en) Oscillation control circuit
JP3699868B2 (en) Clock skew correction circuit and semiconductor integrated circuit
JPH10173520A (en) Pll circuit

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080701