JP2009116719A - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP2009116719A
JP2009116719A JP2007290555A JP2007290555A JP2009116719A JP 2009116719 A JP2009116719 A JP 2009116719A JP 2007290555 A JP2007290555 A JP 2007290555A JP 2007290555 A JP2007290555 A JP 2007290555A JP 2009116719 A JP2009116719 A JP 2009116719A
Authority
JP
Japan
Prior art keywords
cpu
circuit
sleep
signal
sequencer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007290555A
Other languages
Japanese (ja)
Inventor
Yoshitaka Ueda
義孝 上田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Electronics Corp
Original Assignee
NEC Electronics 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 NEC Electronics Corp filed Critical NEC Electronics Corp
Priority to JP2007290555A priority Critical patent/JP2009116719A/en
Publication of JP2009116719A publication Critical patent/JP2009116719A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

<P>PROBLEM TO BE SOLVED: To solve a problem wherein relatively great electric power is consumed because a CPU wakes up periodically to carry out an operation for monitoring an input and output circuit, in the prior art, although a microcomputer having a sleep operation mode to make the CPU sleep is known. <P>SOLUTION: This microcomputer includes the CPU for receiving a supply of a CPU clock to execute a command, the input and output circuit for receiving a CPU processing request from an external circuit, and a monitoring control circuit for carrying out a monitoring operation of accessing the input and output circuit, in a sleep period of the CPU, to detect the CPU processing request. The CPU stops the execution of the command in the sleep period. The monitoring control circuit is operated in the sleep period, and releases the sleep period, when detecting the CPU processing request. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、マイクロコンピュータに関する。   The present invention relates to a microcomputer.

スリープモード等の低消費電力モードを有し、不揮発性メモリを内蔵するマイクロコンピュータが知られる。近年、自動車内の各種制御が電子化され、この多くの処理を分散して行うため、多くのマイクロコンピュータが車両内で使用されている。特に車両内で使用され、車両内通信システムに接続されるマイクロコンピュータは、ボディ制御用マイコンとして知られる。ボディ制御用マイコンによって起動される各種制御プロセスは、常時機能しているわけでなく、イベント発生時に処理が行われ、イベントとイベントの間の時間帯は、ウェイト状態(マイクロコンピュータはスリープ状態)になっている。マイクロコンピュータは、イベント発生を外部機能ブロックの状態(ステータス)を参照することにより認識し、処理動作を行っている。   A microcomputer having a low power consumption mode such as a sleep mode and incorporating a nonvolatile memory is known. In recent years, various controls in automobiles have been computerized, and many microcomputers are used in vehicles because many processes are performed in a distributed manner. In particular, a microcomputer used in a vehicle and connected to an in-vehicle communication system is known as a body control microcomputer. The various control processes started by the body control microcomputer do not always function, but are processed when an event occurs, and the time zone between events is in a wait state (the microcomputer is in a sleep state) It has become. The microcomputer recognizes the occurrence of an event by referring to the state (status) of the external function block, and performs a processing operation.

近年、フラッシュメモリ内蔵マイクロコンピュータが、自動車の各種電子機器の制御に使用されることが多くなった。この用途には、近年多くの半導体LSI(Large Scale Integration)が適用されてきているため低消費電力化の要求が強くなってきている。自動車用のボディ制御用マイコンは常時動作をしていることはまずなく、分散処理を行う目的で制御システムを構成している。ボディ制御用マイコンは、定期的な処理を行う制御が中心となっているので、処理を行っていない間に、低消費電力モードを使用している場合が多い。また、処理を行っていない期間が、通常動作(プログラム処理動作)を行っている期間に比べて長くなる環境で使用されるため、処理を行っていない期間の消費電力を低減できれば非常に有益である。   In recent years, microcomputers with built-in flash memory are often used to control various electronic devices in automobiles. In recent years, many semiconductor LSIs (Large Scale Integrations) have been applied to this application, and thus there is an increasing demand for low power consumption. Microcomputers for body control for automobiles rarely operate at all times, and constitute a control system for the purpose of performing distributed processing. Since the microcomputer for body control is mainly controlled to perform periodic processing, the low power consumption mode is often used while the processing is not performed. In addition, since it is used in an environment where the period during which processing is not performed is longer than the period during which normal operation (program processing operation) is performed, it would be very beneficial if power consumption during the period during which processing was not performed could be reduced. is there.

特開平11−288409号公報(特許文献1参照)には、低消費電力を実現するための低消費電力モードを持つマイクロコンピュータが記載されている。低消費電力モードから通常動作への移行時に内蔵フラッシュメモリではなく、内蔵RAM(Random Access Memory)から初期動作のプログラムを実行させるという特徴を有している。低消費電力モード時に、フラッシュEEPROM(Electronically Erasable and Programmable Read Only Memory)によるプログラム実行処理を、内蔵RAMによるプログラム実行処理により行う代替手段を有する。   Japanese Patent Laid-Open No. 11-288409 (see Patent Document 1) describes a microcomputer having a low power consumption mode for realizing low power consumption. In the transition from the low power consumption mode to the normal operation, the initial operation program is executed from the internal RAM (Random Access Memory) instead of the internal flash memory. In the low power consumption mode, there is an alternative means for performing program execution processing by flash EEPROM (Electronically Erasable and Programmable Read Only Memory) by program execution processing by built-in RAM.

特開2002−63150号公報(特許文献2参照)には、入力パルスを低周波クロックとするタイマで時間を計測し、定期的に外部端子のレベルを判定することにより、スリープモードを解除するマイクロコンピュータが記載されている。スリープモード時(CPUは停止している状態。内部は低周波発振器と一部の周辺回路のみが動作している状態。)には低周波発振器5から供給されるクロックで内部カウンタ又はタイマを動作させて、定期的にスリープモードを内部割り込み信号等を用いて解除する。このとき、予め設定しておいた割り込みベクタ・アドレス(内部RAM領域)からプログラム(命令)を読み出し、CPUに転送する。CPUは、転送されたプログラム(命令)を実行し、周辺IOの状態(フラグ:ステータスレジスタ)を読み出し、CPU処理が必要な状態(周辺IOの動作要求:動作モード変更、又はCPU処理要求:演算処理、分岐、データR/W処理等)にあるかを確認する。CPUは、CPU処理が必要な状況にあることを周辺IOレジスタの値を読み出すことにより認知すると、当該処理に必要なプログラムを格納したアドレス(番地)へ分岐する分岐制御を行う。CPU処理が不要と判断した場合には、再びスリープモード状態の期間を設定するタイマ又はカウンタを初期化し、再スタートさせる。同時に、CPUの動作を停止して、再びスリープモード状態へ移行する。   Japanese Patent Laying-Open No. 2002-63150 (see Patent Document 2) discloses a micro that cancels a sleep mode by measuring time with a timer that uses an input pulse as a low-frequency clock and periodically determining the level of an external terminal. Computer is listed. In sleep mode (when the CPU is stopped. Internally, only the low-frequency oscillator and some peripheral circuits are operating), the internal counter or timer operates with the clock supplied from the low-frequency oscillator 5 The sleep mode is periodically canceled using an internal interrupt signal or the like. At this time, a program (instruction) is read from a preset interrupt vector address (internal RAM area) and transferred to the CPU. The CPU executes the transferred program (instruction), reads the state of the peripheral IO (flag: status register), and requires CPU processing (peripheral IO operation request: operation mode change, or CPU processing request: calculation Processing, branching, data R / W processing, etc.). When the CPU recognizes that the CPU processing is necessary by reading the value of the peripheral IO register, the CPU performs branch control to branch to the address (address) storing the program necessary for the processing. If it is determined that the CPU processing is unnecessary, the timer or counter for setting the sleep mode state period is again initialized and restarted. At the same time, the operation of the CPU is stopped, and the mode is shifted to the sleep mode again.

CPUは、外部回路(外部回路は、キーレスエントリやランプ制御などの外部モジュール)からのウェイクアップ信号がない場合は、数ms〜数100msのスリープ期間の後、発振手段からの内部ウェイクアップ信号によって起動される。そして、フラッシュメモリのセットアップ時間を待ち、接続された外部回路の状態監視(アナログ・デジタル入力値の判定など)を行う。CPUへの処理要求がなければ、再び数ms〜数100msのスリープ期間へ移行し、CPUへの処理要求があれば処理用のプログラムを実行する。外部回路からのウェイクアップ信号があった場合は、CPUはスリープ期間の途中で起動し、外部回路との間で通信等の処理を行う。メモリには、少量多品種展開および出荷後のリプログラムを考慮して、フラッシュメモリを使用している。マスクROMのみをメモリとして使用した場合には、セットアップ時間の短縮は可能だが、少量多品種展開および出荷後のリプログラムができないというデメリットがある。   When there is no wakeup signal from an external circuit (external circuit is an external module such as keyless entry or lamp control), the CPU uses an internal wakeup signal from the oscillation means after a sleep period of several ms to several hundred ms. It is activated. Then, after waiting for the setup time of the flash memory, the state of the connected external circuit is monitored (analog / digital input value determination, etc.). If there is no processing request to the CPU, the process shifts again to a sleep period of several ms to several hundred ms, and if there is a processing request to the CPU, a processing program is executed. When there is a wake-up signal from the external circuit, the CPU is activated during the sleep period and performs processing such as communication with the external circuit. As the memory, a flash memory is used in consideration of a small variety of products and reprogramming after shipment. When only the mask ROM is used as the memory, the setup time can be shortened, but there is a demerit that it is not possible to develop a small variety of products and reprogram after shipping.

特開平11−288409号公報JP 11-288409 A 特開2002−63150号公報JP 2002-63150 A

上記特許文献2に記載された従来のマイクロコンピュータは、スリープ期間中もクロックを供給し、タイマ回路またはカウンタ回路を使用して、スリープ期間を解除するための時間を計測している。スリープ期間中に、クロックの動作電流と、タイマまたはカウンタ回路の動作電流とが消費されている。また、上記特許文献1及び2に記載された従来のマイクロコンピュータは、スリープ状態から通常状態に起床(ウェイクアップ)するときには、内蔵プログラムメモリを起動し、命令を実行するCPUによって、外部IO状態を確認する。   The conventional microcomputer described in Patent Document 2 supplies a clock even during the sleep period, and measures the time for canceling the sleep period using a timer circuit or a counter circuit. During the sleep period, the clock operating current and the timer or counter circuit operating current are consumed. In addition, when the conventional microcomputers described in Patent Documents 1 and 2 wake up from the sleep state to the normal state, the built-in program memory is activated, and the external IO state is set by the CPU that executes the instruction. Check.

一般的にはCPUには多くの機能が含まれており、外部IO状態を確認する処理を行う際には、多くの機能ブロック(論理回路が動作:プログラムカウンタ回路、メモリ制御回路、IR(Instruction Register)回路、命令デコード回路、タイミング生成回路、命令実行回路、レジスタアクセス回路、データバス回路、レジスタ内容チェックのための演算処理制御回路、演算回路、演算結果判定処理制御回路、演算結果判定処理制御、分岐処理制御回路等)が動作する。このときの消費電力は一般的に〔F(動作周波数)×C(動作負荷容量(ゲート数に比例))×V(動作電圧)〕の大きさに比例して表現できる。従って、外部IO状態を確認する際の動作も、通常動作と同等の消費電力が必要となる。   In general, a CPU includes many functions. When a process for confirming an external IO state is performed, a large number of functional blocks (logic circuits operate: program counter circuit, memory control circuit, IR (Instruction) (Register) circuit, instruction decode circuit, timing generation circuit, instruction execution circuit, register access circuit, data bus circuit, arithmetic processing control circuit for register content check, arithmetic circuit, arithmetic result judgment processing control circuit, arithmetic result judgment processing control , Branch processing control circuit, etc.) operate. The power consumption at this time can be generally expressed in proportion to the size of [F (operating frequency) × C (operating load capacity (proportional to the number of gates)) × V (operating voltage)]. Therefore, the operation for confirming the external IO state also requires power consumption equivalent to the normal operation.

そのため、従来のマイクロコンピュータは、CPUのスリープ動作モードから起床して、外部IO状態を確認する際の動作で、CPUが通常動作モードにあるときと同じ電力を必要とする欠点を有している。一般にボディマイコン制御において、スリープ状態から間欠的に起き上がり外部IO状態を観測し、外部IOに変化がない場合には再びスリープ状態に戻る制御が行われている。従来のマイクロコンピュータでは、スリープ状態から起床する時のプログラムメモリの起動電力や、CPUでプログラム実行に必要となる消費電力は通常動作時と同じ電力が必要になる欠点を有している。また、特許文献2のマイクロコンピュータでは、スリープ状態において、スリープ期間の時間計測に、クロック計数によるカウントアップを行っていたため、クロック生成及び供給に必要な電力を消費してしまう問題もあった。   For this reason, the conventional microcomputer wakes up from the sleep operation mode of the CPU and confirms the external IO state, and thus has the disadvantage of requiring the same power as when the CPU is in the normal operation mode. . In general, in body microcomputer control, control is performed in which an external IO state that rises intermittently from a sleep state is observed, and when the external IO does not change, the sleep state is restored again. The conventional microcomputer has a drawback that the starting power of the program memory when waking up from the sleep state and the power consumption necessary for executing the program by the CPU require the same power as in the normal operation. Further, the microcomputer disclosed in Patent Document 2 has a problem in that power necessary for clock generation and supply is consumed because the clock count is used to count the sleep period in the sleep state.

以下に、[発明を実施するための最良の形態]で使用される番号・符号を用いて、[課題を解決するための手段]を説明する。これらの番号・符号は、[特許請求の範囲]の記載と[発明を実施するための最良の形態]との対応関係を明らかにするために括弧付きで付加されたものである。ただし、それらの番号・符号を、[特許請求の範囲]に記載されている発明の技術的範囲の解釈に用いてはならない。   [Means for Solving the Problems] will be described below using the numbers and symbols used in [Best Mode for Carrying Out the Invention]. These numbers and symbols are added in parentheses in order to clarify the correspondence between the description of [Claims] and [Best Mode for Carrying Out the Invention]. However, these numbers and symbols should not be used for the interpretation of the technical scope of the invention described in [Claims].

本発明によるマイクロコンピュータ(11)においては、CPU(40)は、CPUクロックの供給を受けて、命令を実行する。入出力回路(32〜38)は、外部回路(20〜24)からCPU処理要求を受ける。監視制御回路(30)は、CPU(40)のスリープ期間に、入出力回路(32〜38)にアクセスして、CPU処理要求を検出する監視動作を行う。CPU(40)は、スリープ期間に、命令の実行を停止する。監視制御回路(30)は、スリープ期間に動作して、CPU処理要求を検出したときに、スリープ期間を解除する。   In the microcomputer (11) according to the present invention, the CPU (40) receives a CPU clock and executes instructions. The input / output circuits (32 to 38) receive CPU processing requests from the external circuits (20 to 24). The monitoring control circuit (30) accesses the input / output circuits (32 to 38) during the sleep period of the CPU (40) and performs a monitoring operation for detecting a CPU processing request. The CPU (40) stops executing instructions during the sleep period. The supervisory control circuit (30) operates during the sleep period and cancels the sleep period when a CPU processing request is detected.

本発明では、入出力回路(32〜38)にアクセスして、CPU処理要求を検出する監視動作を行う監視制御回路(30)を有している。よって、CPU(40)は、スリープ期間中に定期的に起床し、入出力回路(32〜38)にアクセスし、CPU処理要求を検出するためのプログラムを実行する必要が無くなる。従って、プログラムを実行するCPU(40)及びプログラムを格納するフラッシュメモリを起動し、かつ、動作させるために必要となる消費電力が不要となり、低消費電力化を図ることが可能になる。   The present invention includes a monitoring control circuit (30) that performs a monitoring operation for accessing the input / output circuits (32 to 38) and detecting a CPU processing request. Therefore, the CPU (40) does not need to wake up periodically during the sleep period, access the input / output circuits (32 to 38), and execute a program for detecting a CPU processing request. Therefore, the power consumption required for starting and operating the CPU (40) for executing the program and the flash memory for storing the program is not required, and the power consumption can be reduced.

本発明によれば、マイクロコンピュータの消費電力を低減することができる。   According to the present invention, the power consumption of the microcomputer can be reduced.

本発明の実施形態を、図面を用いて詳述する。図1に、車両を示す。図1において、車両10は、マイクロコンピュータ11を搭載している。マイクロコンピュータ11と、その外部に配置された外部回路とは、車両内通信システムを構築している。マイクロコンピュータ11は、複数の入出力端子12〜18と、振動子端子19とを有している。入出力端子12〜18は、図示されている外部回路20〜24又は不図示の外部回路に接続されている。入出力端子12には、ステアリングセンサなどのセンサ信号を、デジタル信号として、マイクロコンピュータ11へ伝えるセンサ系インタフェース回路20が接続されている。入出力端子13には、マイクロコンピュータ11へパルスを入力するパルス入力インタフェース回路21が接続されている。入出力端子14には、スイッチが入力されたこと、故障診断を行うことなどを、マイクロコンピュータ11へ知らせるスイッチ入力インタフェース回路22が接続されている。入出力端子15には、圧力センサ、位置センサ、加速度センサなどのセンサ信号を、アナログ値として、マイクロコンピュータ11へ伝えるアナログ入力インタフェース回路23が接続されている。入出力端子16には、車両内通信システムから通知される外部割込み信号が入力される。入出力端子17には、車両内通信システムから通知される電圧モニタ信号が入力される。入出力端子18には、車両内通信システムの車両内通信バス(CAN(Controller Area Network)又はLIN(Local Interconnect Network))を介して、データを送受信するトランシーバ24が接続されている。振動子端子19は、模式的に一つの記号で図示されているが、詳細には2個の端子を有していて、不図示の水晶振動子に接続されている。その他、マイクロコンピュータ11は、不図示の電源端子を有し、電源の供給を受けている。   Embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a vehicle. In FIG. 1, a vehicle 10 is equipped with a microcomputer 11. The microcomputer 11 and an external circuit arranged outside thereof constitute an in-vehicle communication system. The microcomputer 11 has a plurality of input / output terminals 12 to 18 and a vibrator terminal 19. The input / output terminals 12 to 18 are connected to the illustrated external circuits 20 to 24 or an external circuit (not shown). Connected to the input / output terminal 12 is a sensor interface circuit 20 that transmits a sensor signal such as a steering sensor to the microcomputer 11 as a digital signal. A pulse input interface circuit 21 for inputting a pulse to the microcomputer 11 is connected to the input / output terminal 13. Connected to the input / output terminal 14 is a switch input interface circuit 22 that notifies the microcomputer 11 that a switch has been input and that a failure diagnosis is to be performed. The input / output terminal 15 is connected to an analog input interface circuit 23 that transmits sensor signals such as a pressure sensor, a position sensor, and an acceleration sensor to the microcomputer 11 as analog values. An external interrupt signal notified from the in-vehicle communication system is input to the input / output terminal 16. A voltage monitor signal notified from the in-vehicle communication system is input to the input / output terminal 17. A transceiver 24 for transmitting and receiving data is connected to the input / output terminal 18 via an in-vehicle communication bus (CAN (Controller Area Network) or LIN (Local Interconnect Network)) of the in-vehicle communication system. The vibrator terminal 19 is schematically shown by one symbol, but in detail, has two terminals and is connected to a crystal vibrator (not shown). In addition, the microcomputer 11 has a power supply terminal (not shown) and is supplied with power.

図2に、マイクロコンピュータの主要ブロックの構成図を示す。図2において、マイクロコンピュータ11は、プログラムの命令を実行するCPU40を有している。入出力端子12〜18には、入出力回路32〜38が接続されている。入出力回路32〜38は、マイクロコンピュータ11の入力信号を受け、出力信号を保持する。入出力回路32は、入出力端子12から入力されるデジタルのセンサ信号を受ける。入出力回路33は、入出力端子13から入力されるパルスを受け、タイマ/カウンタ回路42へ転送する。入出力回路34は、入出力端子14から入力されるスイッチ入力信号を受ける。入出力回路35は、入出力端子15から入力されるアナログ信号を受け、アナログ・デジタル変換回路43へ転送する。入出力回路36は、入出力端子16から入力される外部割込み信号を受ける。入出力回路37は、入出力端子17から入力される電圧モニタ信号を受ける。入出力回路の一つである車両内通信コントロール回路38は、入出力端子18から入力されるトランシーバ24の出力信号を受ける。   FIG. 2 shows a configuration diagram of main blocks of the microcomputer. In FIG. 2, the microcomputer 11 has a CPU 40 that executes program instructions. Input / output circuits 32 to 38 are connected to the input / output terminals 12 to 18. The input / output circuits 32 to 38 receive the input signal of the microcomputer 11 and hold the output signal. The input / output circuit 32 receives a digital sensor signal input from the input / output terminal 12. The input / output circuit 33 receives the pulse input from the input / output terminal 13 and transfers it to the timer / counter circuit 42. The input / output circuit 34 receives a switch input signal input from the input / output terminal 14. The input / output circuit 35 receives an analog signal input from the input / output terminal 15 and transfers the analog signal to the analog / digital conversion circuit 43. The input / output circuit 36 receives an external interrupt signal input from the input / output terminal 16. The input / output circuit 37 receives a voltage monitor signal input from the input / output terminal 17. The in-vehicle communication control circuit 38 which is one of the input / output circuits receives the output signal of the transceiver 24 input from the input / output terminal 18.

図2において、オシレータ46は、振動子端子19に接続された振動子により発振し、メインクロックを生成する。クロック制御回路48は、メインクロックに基づいて、CPUクロックと周辺クロックとを生成し、各回路ブロックに供給する。CPUクロックは、CPU40に供給される。周辺クロックは、CPU40の周辺に配置される回路ブロックに供給される。   In FIG. 2, the oscillator 46 oscillates by a vibrator connected to the vibrator terminal 19 to generate a main clock. The clock control circuit 48 generates a CPU clock and a peripheral clock based on the main clock and supplies them to each circuit block. The CPU clock is supplied to the CPU 40. The peripheral clock is supplied to circuit blocks arranged around the CPU 40.

図2に示すように、マイクロコンピュータ11には、監視制御回路30が設けられている。監視制御回路30は、入出力回路32〜38に接続されている。監視制御回路30は、CPU40がスリープしているときに動作する。このとき、監視制御回路30は、入出力回路32〜38を監視する。監視制御回路30は、入出力回路32〜38へ読出制御信号を送出すると共に、バスDB1を介してステータス・データを読み出し、マイクロコンピュータ11に対するCPU処理要求が有るか否かを確認する。なお、スリープとは、CPUが有する動作モードの一つで、命令又は内/外部信号によりCPUの動作が停止している状態を言う。一般に、この状態(動作停止)はCPUクロックが停止する。   As shown in FIG. 2, the microcomputer 11 is provided with a monitoring control circuit 30. The monitoring control circuit 30 is connected to the input / output circuits 32 to 38. The monitoring control circuit 30 operates when the CPU 40 is sleeping. At this time, the monitoring control circuit 30 monitors the input / output circuits 32 to 38. The supervisory control circuit 30 sends a read control signal to the input / output circuits 32 to 38 and reads the status data via the bus DB1 to check whether there is a CPU processing request for the microcomputer 11. Note that sleep is one of the operation modes of the CPU and refers to a state in which the operation of the CPU is stopped by an instruction or an internal / external signal. In general, in this state (operation stop), the CPU clock stops.

その他、マイクロコンピュータ11は、プログラムを記憶するフラッシュメモリ、このフラッシュメモリを制御する不揮発性メモリ制御回路、ワークエリアに用いられるRAMなどの回路ブロックを有している。   In addition, the microcomputer 11 has circuit blocks such as a flash memory for storing a program, a nonvolatile memory control circuit for controlling the flash memory, and a RAM used for a work area.

図2において、マイクロコンピュータ11に電源が供給されると、CPU40が起動する。CPU40は、所定の命令を実行し終えると、スリープ移行信号を送出する。スリープ移行信号の送出により、オシレータ46及びクロック制御回路48の動作が停止し、マイクロコンピュータ11の各回路ブロックへのクロック供給が停止する。CPU40は、CPUクロックの供給停止により、スリープに入る。スリープ移行信号は、監視制御回路30へも送出される。監視制御回路30は、スリープ移行信号を受信すると、監視動作を開始する。監視制御回路30は、読出制御信号を送出すると共に、バスDB1からステータス・データを読み出して、入出力回路32〜38の監視を行う。   In FIG. 2, when power is supplied to the microcomputer 11, the CPU 40 is activated. When the CPU 40 has finished executing the predetermined command, it sends a sleep transition signal. By sending the sleep transition signal, the operations of the oscillator 46 and the clock control circuit 48 are stopped, and the clock supply to each circuit block of the microcomputer 11 is stopped. The CPU 40 enters a sleep mode when the supply of the CPU clock is stopped. The sleep transition signal is also sent to the monitoring control circuit 30. When receiving the sleep transition signal, the monitoring control circuit 30 starts a monitoring operation. The monitoring control circuit 30 sends out a read control signal and reads status data from the bus DB1 to monitor the input / output circuits 32 to 38.

ステータス・データを解析することにより、マイクロコンピュータ11に対するCPU処理要求を検出した場合、監視制御回路30は、スリープ解除信号を送出して、動作を停止する。スリープ解除信号の送出により、オシレータ46及びクロック制御回路48の動作が再開し、マイクロコンピュータ11の各回路ブロックへのクロック供給が始まる。CPU40は、CPUクロックの供給再開により、起床する。CPU40は、CPU処理要求を受信した入出力回路32〜38にアクセスし、CPU処理要求の内容を確認し、その内容に応じた所定のプログラムを実行する。   When analyzing the status data and detecting a CPU processing request to the microcomputer 11, the monitoring control circuit 30 sends a sleep release signal and stops its operation. By sending the sleep release signal, the operations of the oscillator 46 and the clock control circuit 48 are resumed, and the clock supply to each circuit block of the microcomputer 11 is started. The CPU 40 wakes up by restarting the supply of the CPU clock. The CPU 40 accesses the input / output circuits 32 to 38 that have received the CPU processing request, confirms the content of the CPU processing request, and executes a predetermined program according to the content.

例えば、アナログ入力インタフェース回路23は、一連のアナログ信号を送出する前に、アナログ/デジタル変換開始信号を送出し、マイクロコンピュータ11に対してCPU処理要求を通知する。図2において、入出力回路35は、アナログ/デジタル変換開始信号を受ける。CPU40がスリープしているとき、監視制御回路30は、入出力回路35へ読出制御信号を送出する。アナログ/デジタル変換開始信号は、入出力回路35、アナログ・デジタル変換回路43、及びバスDB1を経由して、監視制御回路30へ転送される。アナログ/デジタル変換開始信号を検出すると、監視制御回路30は、スリープ解除信号を送出して、スリープしているCPU40を起こしにいく。   For example, the analog input interface circuit 23 sends an analog / digital conversion start signal before sending a series of analog signals, and notifies the microcomputer 11 of a CPU processing request. In FIG. 2, an input / output circuit 35 receives an analog / digital conversion start signal. When the CPU 40 is sleeping, the supervisory control circuit 30 sends a read control signal to the input / output circuit 35. The analog / digital conversion start signal is transferred to the monitoring control circuit 30 via the input / output circuit 35, the analog / digital conversion circuit 43, and the bus DB1. When the analog / digital conversion start signal is detected, the supervisory control circuit 30 sends a sleep release signal to wake up the sleeping CPU 40.

図3に、マイクロコンピュータの状態遷移図を示す。図示するように、マイクロコンピュータ11は、通常動作モード50と、スリープ動作モード51とを有している。マイクロコンピュータ11が通常動作モード50にあるとき、CPU40は、CPUクロックの供給を受けて、命令を実行する。監視制御回路30は、消費電力を低減するため、望ましくは、動作を停止する。一方、マイクロコンピュータ11がスリープ動作モード51にあるとき、CPU40は動作を停止し、監視制御回路30が動作する。監視制御回路30は、入出力回路32〜38を監視し、CPU処理要求が有るか否かを確認する。図3において、通常動作モード50からスリープ動作モード51への切り替えは、スリープ移行信号の送出を契機として行われる。また、スリープ動作モード51から通常動作モード50への切り替えは、スリープ解除信号の送出を契機として行われる。スリープ移行信号は、CPU40が所定の命令を実行し終えたことを契機として送出することができる。スリープ解除信号は、監視制御回路30が、CPU処理要求を検出したことを契機として送出することができる。   FIG. 3 shows a state transition diagram of the microcomputer. As shown in the figure, the microcomputer 11 has a normal operation mode 50 and a sleep operation mode 51. When the microcomputer 11 is in the normal operation mode 50, the CPU 40 receives a CPU clock and executes an instruction. The monitoring control circuit 30 desirably stops its operation in order to reduce power consumption. On the other hand, when the microcomputer 11 is in the sleep operation mode 51, the CPU 40 stops operating and the monitoring control circuit 30 operates. The monitoring control circuit 30 monitors the input / output circuits 32 to 38 and checks whether there is a CPU processing request. In FIG. 3, switching from the normal operation mode 50 to the sleep operation mode 51 is performed in response to the transmission of the sleep transition signal. In addition, switching from the sleep operation mode 51 to the normal operation mode 50 is performed in response to transmission of a sleep release signal. The sleep transition signal can be sent when the CPU 40 has finished executing a predetermined command. The sleep release signal can be sent when the monitoring control circuit 30 detects a CPU processing request.

図4に、監視制御回路のブロック構成図を示す。図4において、監視制御回路30は、時間計測回路61と、シーケンサ62とを有している。監視制御回路30は、スリープ動作モード51へ移行することを通知するスリープ移行信号を受信し、また、スリープ動作モード51から通常動作モード50への移行を通知するスリープ解除信号を送信する。監視制御回路30において、スリープ移行信号は、時間計測回路61に入力される。時間計測回路61は、一定時間を計測した後、監視起動信号を出力する。シーケンサ62は、この監視起動信号を入力することにより、予め決められたシーケンス制御に従って動作を開始し、入出力回路32〜38からステータス・データを読み出す。シーケンサ62は、CPU処理要求が検出されなかった場合には、スリープ継続信号を出力する。このスリープ継続信号は、時間計測回路61へ入力される。一方、CPU処理要求が検出された場合には、スリープ解除信号を出力する。スリープ解除信号は、オシレータ46及びクロック制御回路48へ入力される。   FIG. 4 shows a block configuration diagram of the monitoring control circuit. In FIG. 4, the monitoring control circuit 30 includes a time measurement circuit 61 and a sequencer 62. The supervisory control circuit 30 receives a sleep transition signal for notifying the transition to the sleep operation mode 51 and transmits a sleep cancellation signal for notifying the transition from the sleep operation mode 51 to the normal operation mode 50. In the monitoring control circuit 30, the sleep transition signal is input to the time measurement circuit 61. The time measuring circuit 61 outputs a monitoring activation signal after measuring a certain time. The sequencer 62 inputs the monitoring start signal, starts operation according to predetermined sequence control, and reads status data from the input / output circuits 32 to 38. The sequencer 62 outputs a sleep continuation signal when a CPU processing request is not detected. This sleep continuation signal is input to the time measurement circuit 61. On the other hand, when a CPU processing request is detected, a sleep release signal is output. The sleep release signal is input to the oscillator 46 and the clock control circuit 48.

図5に、シーケンサのブロック構成図を示す。ここでは、説明を簡素化するために、四つのみの入出力回路32〜35を監視するシーケンサ62の構成例を示している。簡単な設計変更により、多数の入出力回路を監視できるシーケンサを作ることが可能である。なお、タイマ/カウンタ回路42及びアナログ・デジタル変換回路43の図示を省略している。図5において、シーケンサ62は、シーケンサ(SQC)クロック生成回路63と、タイミング発生回路64と、読出制御回路65と、レジスタ66と、判定回路67とを有している。図中、SQCクロック生成回路63は、監視起動信号を受信することにより動作を開始し、シーケンサ62内部で使用されるSQCクロックSQC_CLKを生成する。タイミング発生回路64は、SQCクロックSQC_CLKに基づいて、タイミング信号T1〜T4を発生する。読出制御回路65は、タイミング信号T1〜T4に基づいて、読出制御信号と、監視終了信号TEと、ポート・データ・チェック信号RWRとを出力する。読出制御信号は、ポートデータ読出信号PRDと、ポート選択信号CS1〜CS4とを有する。レジスタ66は、ポート・データ・チェック信号RWRのオンに同期して、バスDB1からステータス・データを取り込み、記憶する。判定回路67は、レジスタ66に書き込まれたステータス・データを読み出し、前回のステータス・データと、今回のステータス・データとの間に、CPU処理要求を示す変化が生じていないかを判定する。変化無の場合、スリープ継続信号を送出する。変化有の場合、CPU処理要求に対処するため、スリープ解除信号を送出してCPUを起こしにいく。   FIG. 5 shows a block configuration diagram of the sequencer. Here, in order to simplify the description, a configuration example of a sequencer 62 that monitors only four input / output circuits 32 to 35 is shown. With a simple design change, it is possible to create a sequencer that can monitor a large number of input / output circuits. The timer / counter circuit 42 and the analog / digital conversion circuit 43 are not shown. In FIG. 5, the sequencer 62 includes a sequencer (SQC) clock generation circuit 63, a timing generation circuit 64, a read control circuit 65, a register 66, and a determination circuit 67. In the figure, an SQC clock generation circuit 63 starts its operation upon receiving a monitor activation signal, and generates an SQC clock SQC_CLK used inside the sequencer 62. The timing generation circuit 64 generates timing signals T1 to T4 based on the SQC clock SQC_CLK. The read control circuit 65 outputs a read control signal, a monitoring end signal TE, and a port data check signal RWR based on the timing signals T1 to T4. The read control signal includes a port data read signal PRD and port selection signals CS1 to CS4. The register 66 fetches status data from the bus DB1 and stores it in synchronization with the port data check signal RWR being turned on. The determination circuit 67 reads the status data written in the register 66, and determines whether a change indicating a CPU processing request has occurred between the previous status data and the current status data. When there is no change, a sleep continuation signal is transmitted. When there is a change, in order to cope with the CPU processing request, a sleep release signal is sent to wake up the CPU.

図6に、図5のシーケンサの動作を説明するタイミングチャートを示す。図6において、監視起動信号がオンになることにより、SQCクロックSQC_CLKが生成されている。このSQCクロックSQC_CLKの一つ目の立ち上がりでタイミング信号T1が生成されている。タイミング信号T2は、三つ目のSQCクロックSQC_CLKの立ち上がりで生成されている。タイミング信号T3は、五つ目のSQCクロックSQC_CLKの立ち上がりで生成され、タイミング信号T4は、七つ目のSQCクロックSQC_CLKの立ち上がりで生成されている。タイミング信号T1に一周期だけ遅れて、ポートデータ読出信号PRDがオンになっている。その後、ポート選択信号CS1がオンになると、入出力回路32のステータス・データがバスDB1に現れ、ポート選択信号CS2がオンになると、入出力回路33のステータス・データがバスDB1に現れ、ポート選択信号CS3がオンになると、入出力回路34のステータス・データがバスDB1に現れ、ポート選択信号CS4がオンになると、入出力回路35のステータス・データがバスDB1に現れている。各ポート選択信号CS1〜CS4のオンに続いて、ポート・データ・チェック信号RWRがオンになり、このタイミングで、レジスタ66への書き込みが行われている。ポート・データ・チェック信号RWRを利用せずに、レジスタ66への書き込みタイミングを制御することは可能であるが、当例のように、ポート・データ・チェック信号RWRを利用した方が制御は容易と考えられる。四つの入出力回路32〜35の各ステータス・データを順次レジスタ66へ書き込んだ後、監視終了信号TEがオンになり、SQCクロックSQC_CLKの生成が停止している。図6は、各ステータス・データDBを解析した結果、CPU処理要求が検出されなかった場合の例であり、監視終了信号TEがオンになった後、シーケンサ62からは、スリープ継続信号が送出されている。スリープ解除信号は、送出されていない。なお、各ステータス・データDBを解析した結果、CPU処理要求が検出された場合には、監視終了信号TEがオンになった後、シーケンサ62からは、スリープ解除信号が送出され、スリープ継続信号は送出されない。   FIG. 6 is a timing chart for explaining the operation of the sequencer of FIG. In FIG. 6, the SQC clock SQC_CLK is generated by turning on the monitor activation signal. The timing signal T1 is generated at the first rising edge of the SQC clock SQC_CLK. The timing signal T2 is generated at the rising edge of the third SQC clock SQC_CLK. The timing signal T3 is generated at the rising edge of the fifth SQC clock SQC_CLK, and the timing signal T4 is generated at the rising edge of the seventh SQC clock SQC_CLK. The port data read signal PRD is turned on with a delay of one cycle from the timing signal T1. Thereafter, when the port selection signal CS1 is turned on, the status data of the input / output circuit 32 appears on the bus DB1, and when the port selection signal CS2 is turned on, the status data of the input / output circuit 33 appears on the bus DB1 to select the port. When the signal CS3 is turned on, the status data of the input / output circuit 34 appears on the bus DB1, and when the port selection signal CS4 is turned on, the status data of the input / output circuit 35 appears on the bus DB1. The port data check signal RWR is turned on after each port selection signal CS1 to CS4 is turned on, and writing to the register 66 is performed at this timing. Although it is possible to control the write timing to the register 66 without using the port data check signal RWR, it is easier to control using the port data check signal RWR as in this example. it is conceivable that. After the status data of the four input / output circuits 32 to 35 are sequentially written to the register 66, the monitoring end signal TE is turned on, and the generation of the SQC clock SQC_CLK is stopped. FIG. 6 shows an example in which a CPU processing request is not detected as a result of analyzing each status data DB. After the monitoring end signal TE is turned on, the sequencer 62 sends a sleep continuation signal. ing. The sleep release signal is not sent. As a result of analyzing each status data DB, when a CPU processing request is detected, after the monitoring end signal TE is turned on, the sequencer 62 sends a sleep release signal, and the sleep continuation signal is Not sent out.

図7に、時間計測回路の構成図を示す。図7の時間計測回路61は、タイマやカウンタなどを用いてクロックを計数することなく、C(容量)×R(抵抗)の時定数を利用して時間を計測する。より具体的に言えば、キャパシタC1へのチャージ・アップ時間を利用して時間を計測する。図7において、時間計測回路61は、エッジ検出で反転するRS型フリップフロップ回路75と、ワンショットパルス発生回路76と、トランジスタ77とを有している。フリップフロップ回路75は、スリープ動作モードを設定する。スリープ移行信号又はスリープ継続信号がオンになるエッジでセット状態に反転し、出力信号Aがオンになる。ワンショットパルス発生回路76は、オンになったF/F出力信号Aを入力すると、間欠動作設定パルスPSをひとつ出力する。トランジスタ77は、間欠動作設定パルスPSを受けるとオンになる。このとき、トランジスタ77のソースとドレインが導通し、キャパシタC1に蓄積された電荷が放電する。間欠動作設定パルスPSがローになると、トランジスタ77はオフになり、トランジスタTR1を介してキャパシタC1に電荷が充電される。その後、キャパシタC1の電位が一定値を超えると、インバータINV1の出力がローに、インバータINV1と同等の特性を有するインバータINV2の出力がハイになり、監視起動信号がオンになる。この監視起動信号は、シーケンサ62へ出力されるとともに、エッジ検出のフリップフロップ回路75をリセットする。なお、キャパシタC1は、時間計測回路61の外部に、場合によっては、マイクロコンピュータ11の外部に設けることも可能である。   FIG. 7 shows a configuration diagram of the time measuring circuit. The time measuring circuit 61 in FIG. 7 measures time using a time constant of C (capacitance) × R (resistance) without counting a clock using a timer, a counter, or the like. More specifically, the time is measured using the charge-up time for the capacitor C1. In FIG. 7, the time measurement circuit 61 includes an RS flip-flop circuit 75 that is inverted by edge detection, a one-shot pulse generation circuit 76, and a transistor 77. The flip-flop circuit 75 sets a sleep operation mode. At the edge when the sleep transition signal or the sleep continuation signal is turned on, the signal is inverted to the set state, and the output signal A is turned on. The one-shot pulse generation circuit 76 outputs one intermittent operation setting pulse PS when the turned-on F / F output signal A is input. The transistor 77 is turned on when receiving the intermittent operation setting pulse PS. At this time, the source and drain of the transistor 77 become conductive, and the charge accumulated in the capacitor C1 is discharged. When the intermittent operation setting pulse PS becomes low, the transistor 77 is turned off, and the capacitor C1 is charged through the transistor TR1. After that, when the potential of the capacitor C1 exceeds a certain value, the output of the inverter INV1 becomes low, the output of the inverter INV2 having the same characteristics as the inverter INV1 becomes high, and the monitor activation signal is turned on. The monitoring activation signal is output to the sequencer 62 and resets the edge detection flip-flop circuit 75. Note that the capacitor C1 can be provided outside the time measuring circuit 61 and, in some cases, outside the microcomputer 11.

図8に、図7の時間計測回路の動作説明図である。図8において、スリープ継続信号の立ち上がりが検出されると、スリープ動作モード設定FF75が反転してセット状態になり、FF出力Aがオンになっている。このタイミングで、間欠動作設定パルスPSが出力されている。キャパシタC1が放電を開始し、C1電位がINV1閾値を下回ったところで監視起動信号がローになり、時間計測期間に入る。時間計測期間では、いったん電荷を放電したキャパシタC1に、電荷が再充電される。この再充電の過程で、C1電位がINV1閾値を超えると、監視起動信号がオンになり、エッヂ検出のスリープ動作モード設定FF75が反転してリセット状態になり、FF出力Aがオフになる。ここで、スリープ期間における時間計測期間が終了し、シーケンサ動作期間が始まる。シーケンサ動作期間では、シーケンサ62が監視動作を行う。監視動作の結果、CPU処理要求が検出されなかった場合には、シーケンサ62は、スリープ継続信号を送出して動作を停止する。このスリープ継続信号により、再び、キャパシタC1が放電を開始し、監視起動信号がローになり、時間計測期間が始まり、監視制御回路30の間欠動作が繰り返される。   FIG. 8 is an operation explanatory diagram of the time measuring circuit of FIG. In FIG. 8, when the rising edge of the sleep continuation signal is detected, the sleep operation mode setting FF 75 is inverted and set, and the FF output A is turned on. At this timing, the intermittent operation setting pulse PS is output. When the capacitor C1 starts discharging and the C1 potential falls below the INV1 threshold, the monitor activation signal goes low, and the time measurement period starts. In the time measurement period, the charge is recharged in the capacitor C1 once discharged. If the C1 potential exceeds the INV1 threshold value during the recharging process, the monitor activation signal is turned on, the edge detection sleep operation mode setting FF75 is inverted to be in a reset state, and the FF output A is turned off. Here, the time measurement period in the sleep period ends, and the sequencer operation period starts. In the sequencer operation period, the sequencer 62 performs a monitoring operation. If the CPU processing request is not detected as a result of the monitoring operation, the sequencer 62 sends a sleep continuation signal and stops the operation. Due to this sleep continuation signal, the capacitor C1 starts discharging again, the monitor activation signal becomes low, the time measurement period starts, and the intermittent operation of the monitor control circuit 30 is repeated.

図9に、時間計測回路の変形例を示す。図9の時間計測回路78は、図7の時間計測回路61と同様のタイミングで動作することが可能であり、置換可能である。図9の時間計測回路78は、タイマやカウンタなどを用いてクロック計数をすることなく、リーク電流による電荷のリーク時間を利用して時間を計測する。図9において、時間計測回路78は、エッジ検出で反転するRS型フリップフロップ回路75と、ワンショットパルス発生回路76と、トランジスタ79とを有している。トランジスタ79は、間欠動作設定パルスPSを受けるとオンになる。このとき、トランジスタ79のソースとドレインが導通し、キャパシタC1に電荷が充電される。間欠動作設定パルスPSがローになると、トランジスタ79はオフになり、キャパシタC1から電荷がリークする。その後、キャパシタC1の電位が一定値を下回ると、インバータINV1の出力が反転してハイになり、監視起動信号がオンになる。この監視起動信号は、シーケンサ62へ出力されるとともに、エッジ検出のフリップフロップ回路75をリセットする。なお、キャパシタC1は、時間計測回路78の外部に、場合によっては、マイクロコンピュータ11の外部に設けることも可能である。   FIG. 9 shows a modification of the time measuring circuit. The time measuring circuit 78 in FIG. 9 can operate at the same timing as the time measuring circuit 61 in FIG. 7 and can be replaced. The time measuring circuit 78 in FIG. 9 measures time by using the charge leakage time due to the leakage current without counting the clock using a timer or a counter. In FIG. 9, the time measurement circuit 78 includes an RS flip-flop circuit 75 that is inverted by edge detection, a one-shot pulse generation circuit 76, and a transistor 79. The transistor 79 is turned on when receiving the intermittent operation setting pulse PS. At this time, the source and drain of the transistor 79 become conductive, and the capacitor C1 is charged. When the intermittent operation setting pulse PS becomes low, the transistor 79 is turned off, and charge leaks from the capacitor C1. Thereafter, when the potential of the capacitor C1 falls below a certain value, the output of the inverter INV1 is inverted and becomes high, and the monitor activation signal is turned on. The monitoring activation signal is output to the sequencer 62 and resets the edge detection flip-flop circuit 75. Note that the capacitor C1 can be provided outside the time measuring circuit 78, and in some cases, outside the microcomputer 11.

図10は、図9の時間計測回路の動作説明図である。図10において、スリープ移行信号の立ち上がりが検出されると、スリープ動作モード設定FF75がセットされ、FF出力Aがオンになり、間欠動作設定パルスPSが出力されている。キャパシタC1が充電を開始し、C1電位がINV1閾値を超えたところで監視起動信号がローになり、時間計測期間に入る。時間計測期間では、キャパシタC1から、充電した電荷がリークする。このリークの過程で、C1電位がINV1閾値を下回ると、インバータINV1の出力が反転してハイになり、監視起動信号がオンになり、エッヂ検出のスリープ動作モード設定FF出力Aがリセットされてオフになる。ここで、スリープ期間における時間計測期間が終了し、シーケンサ動作期間が始まる。その後も、電荷のリークが継続されるが、監視動作を終了したシーケンサ62からスリープ継続信号が通知されると、再び、FF出力Aがオンになり、間欠動作設定パルスPSが出力され、キャパシタC1に電荷が再充電される。   FIG. 10 is an explanatory diagram of the operation of the time measuring circuit of FIG. In FIG. 10, when the rising edge of the sleep transition signal is detected, the sleep operation mode setting FF 75 is set, the FF output A is turned on, and the intermittent operation setting pulse PS is output. The capacitor C1 starts charging, and when the C1 potential exceeds the INV1 threshold, the monitor activation signal becomes low, and the time measurement period starts. In the time measurement period, the charged charge leaks from the capacitor C1. If the C1 potential falls below the INV1 threshold during this leakage process, the output of the inverter INV1 is inverted and becomes high, the monitor activation signal is turned on, and the sleep operation mode setting FF output A for edge detection is reset and turned off. become. Here, the time measurement period in the sleep period ends, and the sequencer operation period starts. After that, charge leakage continues, but when the sleep continuation signal is notified from the sequencer 62 that has finished the monitoring operation, the FF output A is turned on again, the intermittent operation setting pulse PS is output, and the capacitor C1 The charge is recharged.

図7〜図10に説明した時間計測回路61,78では、時間を計数する手段にクロック及びタイマ/カウンタ回路を使用していない。そのため、監視制御回路30が時間計測期間にあるときの電力消費を、リーク電流又はチャージ電流によるもののみに削減することが出来る。一般的にクロック回路及びタイマ/カウンタ回路を動作させたときの動作電流は、数百マイクロアンペア程度必要になる。本実施の形態による時間計測回路61,78では、1マイクロアンペア以下の電流(リーク電流又はチャージ電流)の消費に抑えることが可能である。   The time measuring circuits 61 and 78 described in FIGS. 7 to 10 do not use a clock and timer / counter circuit as means for counting time. Therefore, power consumption when the monitoring control circuit 30 is in the time measurement period can be reduced only to that due to leakage current or charge current. Generally, several hundreds of microamperes are required for the operating current when the clock circuit and the timer / counter circuit are operated. In the time measuring circuits 61 and 78 according to the present embodiment, current consumption (leakage current or charge current) of 1 microampere or less can be suppressed.

図11に、マイクロコンピュータの動作を説明するタイミングチャートを示す。図11は、シーケンサ62による監視動作において、CPU処理要求が検出されなかった場合の例である。図11において、CPU40は、所定の命令を実行し終えると、スリープ移行信号を送出する。CPU40の動作は停止し、監視制御回路30の動作が始まる。監視制御回路30では、まず、時間計測回路61が動作する。時間計測回路61が、一定時間を計測すると、監視起動信号が送出されて、シーケンサ62の動作が始まる。シーケンサ62が、タイミング信号に合わせて、入出力回路32〜35へ読出制御信号を送出すると、バスDB1に、順次、各入出力回路32〜35のステータス・データが現れる。その後、監視終了信号が送出されると共に、CPU処理要求が検出されなかった場合のスリープ継続信号が時間計測回路61へ送出される。スリープ解除信号は送出されない。CPU40は停止したままであり、スリープ動作モード51が継続される。   FIG. 11 is a timing chart for explaining the operation of the microcomputer. FIG. 11 shows an example when a CPU processing request is not detected in the monitoring operation by the sequencer 62. In FIG. 11, when the CPU 40 has finished executing a predetermined command, it sends a sleep transition signal. The operation of the CPU 40 is stopped and the operation of the monitoring control circuit 30 is started. In the monitoring control circuit 30, first, the time measuring circuit 61 operates. When the time measuring circuit 61 measures a certain time, a monitoring start signal is sent and the operation of the sequencer 62 starts. When the sequencer 62 sends a read control signal to the input / output circuits 32 to 35 in accordance with the timing signal, the status data of the input / output circuits 32 to 35 sequentially appear on the bus DB1. Thereafter, a monitoring end signal is sent out, and a sleep continuation signal when no CPU processing request is detected is sent out to the time measuring circuit 61. No sleep release signal is sent. The CPU 40 remains stopped and the sleep operation mode 51 is continued.

図12に、マイクロコンピュータの動作を説明する別のタイミングチャートを示す。図12は、シーケンサ62による監視動作において、CPU処理要求が検出された場合の例である。図12において、CPU40は、所定の命令を実行し終えると、スリープ移行信号を送出する。CPU40の動作は停止し、監視制御回路30の動作が始まる。監視制御回路30では、まず、時間計測回路61が動作する。時間計測回路61が、一定時間を計測すると、監視起動信号が送出されて、シーケンサ62の動作が始まる。シーケンサ62が、タイミング信号に合わせて、入出力回路32〜35へ読出制御信号を送出すると、バスDB1に、順次、各入出力回路32〜35のステータス・データが現れる。その後、監視終了信号が送出されると共に、CPU処理要求が検出された場合のスリープ解除信号が発出される。スリープ継続信号は送出されない。マイクロコンピュータ11は、スリープ動作モード51から通常動作モード50へ遷移する。発振安定期間を経て、クロック制御回路48によって供給されるCPUクロックが安定すると、CPU40は動作を再開し、CPU処理要求に対処する。   FIG. 12 shows another timing chart for explaining the operation of the microcomputer. FIG. 12 shows an example when a CPU processing request is detected in the monitoring operation by the sequencer 62. In FIG. 12, when the CPU 40 finishes executing a predetermined command, it sends a sleep transition signal. The operation of the CPU 40 is stopped and the operation of the monitoring control circuit 30 is started. In the monitoring control circuit 30, first, the time measuring circuit 61 operates. When the time measuring circuit 61 measures a certain time, a monitoring start signal is sent and the operation of the sequencer 62 starts. When the sequencer 62 sends a read control signal to the input / output circuits 32 to 35 in accordance with the timing signal, the status data of the input / output circuits 32 to 35 sequentially appear on the bus DB1. Thereafter, a monitoring end signal is sent out, and a sleep release signal is issued when a CPU processing request is detected. The sleep continuation signal is not sent. The microcomputer 11 transitions from the sleep operation mode 51 to the normal operation mode 50. After the oscillation stabilization period, when the CPU clock supplied by the clock control circuit 48 is stabilized, the CPU 40 resumes the operation and copes with the CPU processing request.

図13に、シーケンサの変形例を示す。図13のシーケンサ70は、図5のシーケンサ62におけるレジスタ66及び判定回路67部分に変更を加えたものであり、図5のシーケンサ62が有するSQCクロック生成回路63と、タイミング発生回路64と、読出制御回路65と同じ回路ブロックを有している。図13において、基準値記憶回路72は、CPU処理要求を示す論理が成立する条件となる所定の基準値を記憶する。基準値は、デフォルト値を予め設定しておくことが可能であり、また、通常動作モードのときに、CPU40から書き込むことが可能である。比較回路73は、レジスタ71の値と基準値記憶回路72の基準値とを比較する。判定回路74は、比較回路73が不一致を示していた場合には、CPU処理要求を示す論理が成立していないと判定して、スリープ継続信号を送出する。一致を示していた場合には、CPU処理要求を示す論理が成立したと判定して、スリープ解除信号を送出する。図5のシーケンサ62は、入出力回路32〜35のステータス・データについて、前回のものと今回のものとを比較して、相対的な判定を行う例であり、図13のシーケンサ70は、所定の基準値と比較して、絶対的な判定を行う例である。   FIG. 13 shows a modification of the sequencer. The sequencer 70 in FIG. 13 is obtained by changing the register 66 and the determination circuit 67 in the sequencer 62 in FIG. 5. The sequencer 62 in FIG. 5 includes an SQC clock generation circuit 63, a timing generation circuit 64, and a read circuit. It has the same circuit block as the control circuit 65. In FIG. 13, the reference value storage circuit 72 stores a predetermined reference value that is a condition for establishing a logic indicating a CPU processing request. As the reference value, a default value can be set in advance, and can be written from the CPU 40 in the normal operation mode. The comparison circuit 73 compares the value of the register 71 with the reference value of the reference value storage circuit 72. If the comparison circuit 73 indicates a mismatch, the determination circuit 74 determines that the logic indicating the CPU processing request is not established, and sends a sleep continuation signal. If they match, it is determined that a logic indicating a CPU processing request has been established, and a sleep release signal is transmitted. The sequencer 62 in FIG. 5 is an example in which the status data of the input / output circuits 32 to 35 is compared with the previous one and the current one, and the relative determination is performed. The sequencer 70 in FIG. In this example, absolute determination is performed in comparison with the reference value.

本実施の形態における監視制御回路30においては、CPU処理要求の有無を確認する手段に、メモリから命令を読み出し、解釈し、実行するCPUを使用していないため、消費電力が低減されている。例えば、CPUの主要機能ブロックを構成するゲート数は数万ゲート必要であるが、本実施の形態によるシーケンサ62では、その百分の一以下である数百ゲート程度で実現可能である。CPU40やシーケンサ62の消費電力は、〔F(動作周波数)×C(動作負荷容量)×V(動作電圧)〕で計算することができるが、この式のC(動作負荷容量)はゲート数に比例するので、本実施の形態では、1桁以上の大きな低消費電力化を期待できる。また、消費電流で見ても、一般にCPUの消費電流は、数十ミリアンペア程度である。一方、本実施の形態によるシーケンサ62の消費電流は、数百マイクロアンペア程度で実現することが可能であるから、本実施の形態による車載マイクロコンピュータでは、消費電流が顕著に低減されることがわかる。   In the monitoring control circuit 30 according to the present embodiment, power consumption is reduced because a CPU that reads, interprets, and executes instructions from the memory is not used as means for confirming the presence or absence of a CPU processing request. For example, the number of gates constituting the main functional block of the CPU needs tens of thousands of gates, but the sequencer 62 according to the present embodiment can be realized with several hundred gates, which is one hundredth or less. The power consumption of the CPU 40 and the sequencer 62 can be calculated by [F (operating frequency) × C (operating load capacity) × V (operating voltage)], where C (operating load capacity) is the number of gates. Since this is proportional, in this embodiment, a large reduction in power consumption of one digit or more can be expected. In terms of current consumption, generally, CPU current consumption is about several tens of milliamperes. On the other hand, since the current consumption of the sequencer 62 according to the present embodiment can be realized at about several hundred microamperes, it can be seen that the current consumption is significantly reduced in the in-vehicle microcomputer according to the present embodiment. .

図1は、車両を示す図である。FIG. 1 is a diagram illustrating a vehicle. 図2は、マイクロコンピュータの主要ブロックの構成図である。FIG. 2 is a configuration diagram of main blocks of the microcomputer. 図3は、マイクロコンピュータの状態遷移図である。FIG. 3 is a state transition diagram of the microcomputer. 図4は、監視制御回路のブロック構成図である。FIG. 4 is a block diagram of the monitoring control circuit. 図5は、シーケンサのブロック構成図である。FIG. 5 is a block diagram of the sequencer. 図6は、図5のシーケンサの動作を説明するタイミングチャートである。FIG. 6 is a timing chart for explaining the operation of the sequencer of FIG. 図7は、時間計測回路の構成図である。FIG. 7 is a configuration diagram of the time measuring circuit. 図8は、図7の時間計測回路の動作説明図である。FIG. 8 is an explanatory diagram of the operation of the time measuring circuit of FIG. 図9は、時間計測回路の変形例を示す図である。FIG. 9 is a diagram illustrating a modification of the time measurement circuit. 図10は、図9の時間計測回路の動作説明図である。FIG. 10 is an explanatory diagram of the operation of the time measuring circuit of FIG. 図11は、マイクロコンピュータの動作を説明するタイミングチャートを示す図である。FIG. 11 is a timing chart for explaining the operation of the microcomputer. 図12は、マイクロコンピュータの動作を説明する別のタイミングチャートを示す図である。FIG. 12 is a diagram showing another timing chart for explaining the operation of the microcomputer. 図13は、シーケンサの変形例を示す図である。FIG. 13 is a diagram illustrating a modification of the sequencer.

符号の説明Explanation of symbols

10 車両
11 マイクロコンピュータ
12〜18 入出力端子
19 振動子端子
20〜24 外部回路
25 車両内通信バス
30 監視制御回路
32〜38 入出力回路
40 CPU
42 タイマ/カウンタ回路
43 アナログ・デジタル変換回路
46 オシレータ
48 クロック制御回路
50 通常動作モード
51 スリープ動作モード
61,78 時間計測回路
62,70 シーケンサ
63 シーケンサ(SQC)クロック生成回路
64 タイミング発生回路
65 読出制御回路
66,71 レジスタ
67,74 判定回路
72 基準値記憶回路
73 比較回路
75 フリップフロップ回路
76 ワンショットパルス発生回路
77,79 トランジスタ
DESCRIPTION OF SYMBOLS 10 Vehicle 11 Microcomputer 12-18 Input / output terminal 19 Vibrator terminals 20-24 External circuit 25 In-vehicle communication bus 30 Monitoring control circuit 32-38 Input / output circuit 40 CPU
42 Timer / Counter Circuit 43 Analog / Digital Conversion Circuit 46 Oscillator 48 Clock Control Circuit 50 Normal Operation Mode 51 Sleep Operation Mode 61, 78 Time Measurement Circuit 62, 70 Sequencer 63 Sequencer (SQC) Clock Generation Circuit 64 Timing Generation Circuit 65 Read Control Circuits 66 and 71 Registers 67 and 74 Determination circuit 72 Reference value storage circuit 73 Comparison circuit 75 Flip-flop circuit 76 One-shot pulse generation circuits 77 and 79 Transistors

Claims (9)

CPUクロックの供給を受けて、命令を実行するCPUと、
外部回路からCPU処理要求を受ける入出力回路と、
前記CPUのスリープ期間に、前記入出力回路にアクセスして、前記CPU処理要求を検出する監視動作を行う監視制御回路とを具備し、
前記CPUは、
前記スリープ期間に、命令の実行を停止し、
前記監視制御回路は、
前記スリープ期間に動作して、前記CPU処理要求を検出したときに、前記スリープ期間を解除する
マイクロコンピュータ。
A CPU that receives a CPU clock and executes instructions;
An input / output circuit that receives a CPU processing request from an external circuit;
A monitoring control circuit that performs a monitoring operation of accessing the input / output circuit and detecting the CPU processing request during a sleep period of the CPU;
The CPU
During the sleep period, stop execution of instructions,
The monitoring control circuit includes:
A microcomputer that operates during the sleep period and releases the sleep period when the CPU processing request is detected.
前記監視制御回路は、
シーケンサを有し、
前記シーケンサによって、前記CPU処理要求を検出する監視動作を行う
請求項1記載のマイクロコンピュータ。
The monitoring control circuit includes:
Have a sequencer,
The microcomputer according to claim 1, wherein a monitoring operation for detecting the CPU processing request is performed by the sequencer.
前記シーケンサは、
シーケンサクロックを生成するシーケンサクロック生成回路を具備し、
前記シーケンサクロックに基づいて動作する
請求項2記載のマイクロコンピュータ。
The sequencer is
A sequencer clock generation circuit for generating a sequencer clock;
The microcomputer according to claim 2, which operates based on the sequencer clock.
前記監視制御回路は、
前記シーケンサが間欠的に動作するように、間欠制御を行う
請求項2又は3に記載のマイクロコンピュータ。
The monitoring control circuit includes:
The microcomputer according to claim 2 or 3, wherein intermittent control is performed so that the sequencer operates intermittently.
前記監視制御回路は、
時間計測を行う時間計測回路を更に有し、
前記時間計測回路が計測する時間を用いて、前記間欠制御を行う
請求項4記載のマイクロコンピュータ。
The monitoring control circuit includes:
It further has a time measuring circuit for measuring time,
The microcomputer according to claim 4, wherein the intermittent control is performed using a time measured by the time measuring circuit.
前記時間計測回路は、
クロックを計数することなく、C(容量)×R(抵抗)の時定数を利用した時間に基づいて又はリーク電流を利用した電荷のリーク時間に基づいて、時間計測を行う
請求項5記載のマイクロコンピュータ。
The time measuring circuit is
6. The micro of claim 5, wherein the time measurement is performed based on a time using a time constant of C (capacitance) × R (resistance) without counting a clock or based on a charge leakage time using a leakage current. Computer.
前記監視制御回路は、
前記時間計測回路が時間を計測する動作と、前記シーケンサが前記CPU処理要求を検出する監視動作を行う動作とが交互に行われるように、前記間欠制御を行う
請求項5又は6記載のマイクロコンピュータ。
The monitoring control circuit includes:
The microcomputer according to claim 5 or 6, wherein the intermittent control is performed so that an operation in which the time measurement circuit measures time and an operation in which the sequencer performs a monitoring operation to detect the CPU processing request are alternately performed. .
前記時間計測回路は、
スリープ期間へ移行することを通知するスリープ移行信号又はスリープ期間を継続することを通知するスリープ継続信号を受信すると動作を開始し、所定時間を計測した後、監視起動信号を送出し、
前記シーケンサは、
前記監視起動信号を受信すると動作を開始し、前記入出力回路を監視し、前記CPU処理要求が検出されなかった場合には、前記スリープ継続信号を送出し、前記CPU処理要求が検出された場合には、前記スリープ期間を解除するスリープ解除信号を送出する
請求項7記載のマイクロコンピュータ。
The time measuring circuit is
When a sleep transition signal for notifying transition to the sleep period or a sleep continuation signal for notifying that the sleep period continues is received, the operation is started, and after a predetermined time is measured, a monitor activation signal is transmitted,
The sequencer is
When the monitoring activation signal is received, the operation is started, the input / output circuit is monitored, and when the CPU processing request is not detected, the sleep continuation signal is transmitted, and the CPU processing request is detected The microcomputer according to claim 7, wherein a sleep cancel signal for canceling the sleep period is transmitted.
前記CPUは、
前記スリープ期間に、前記CPUクロックの供給を受けない
請求項1〜8いずれか1項に記載のマイクロコンピュータ。
The CPU
The microcomputer according to claim 1, wherein the CPU clock is not supplied during the sleep period.
JP2007290555A 2007-11-08 2007-11-08 Microcomputer Pending JP2009116719A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007290555A JP2009116719A (en) 2007-11-08 2007-11-08 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007290555A JP2009116719A (en) 2007-11-08 2007-11-08 Microcomputer

Publications (1)

Publication Number Publication Date
JP2009116719A true JP2009116719A (en) 2009-05-28

Family

ID=40783781

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007290555A Pending JP2009116719A (en) 2007-11-08 2007-11-08 Microcomputer

Country Status (1)

Country Link
JP (1) JP2009116719A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016219865A (en) * 2015-05-14 2016-12-22 株式会社東海理化電機製作所 Radio wave receiving device
US9817707B2 (en) 2014-10-23 2017-11-14 Denso Corporation Controller for reducing power
KR20200001981A (en) * 2018-06-28 2020-01-07 미쓰미덴기가부시기가이샤 Semiconductor integrated circuit device for electronic control and gas cooking stove electronic control device
US20210306031A1 (en) * 2013-03-14 2021-09-30 Dexcom, Inc. Systems and methods for processing and transmitting sensor data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61188609A (en) * 1985-02-18 1986-08-22 Fujitsu Ltd Microcomputer
JP2003186863A (en) * 2001-12-20 2003-07-04 Matsushita Electric Ind Co Ltd Reception circuit
JP2003296292A (en) * 2002-03-29 2003-10-17 Denso Corp Port sampling circuit device and microcomputer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61188609A (en) * 1985-02-18 1986-08-22 Fujitsu Ltd Microcomputer
JP2003186863A (en) * 2001-12-20 2003-07-04 Matsushita Electric Ind Co Ltd Reception circuit
JP2003296292A (en) * 2002-03-29 2003-10-17 Denso Corp Port sampling circuit device and microcomputer

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210306031A1 (en) * 2013-03-14 2021-09-30 Dexcom, Inc. Systems and methods for processing and transmitting sensor data
US9817707B2 (en) 2014-10-23 2017-11-14 Denso Corporation Controller for reducing power
JP2016219865A (en) * 2015-05-14 2016-12-22 株式会社東海理化電機製作所 Radio wave receiving device
KR20200001981A (en) * 2018-06-28 2020-01-07 미쓰미덴기가부시기가이샤 Semiconductor integrated circuit device for electronic control and gas cooking stove electronic control device
JP2020003129A (en) * 2018-06-28 2020-01-09 ミツミ電機株式会社 Electronic control semiconductor integrated circuit device and gas cooking device electronic control device
JP7104314B2 (en) 2018-06-28 2022-07-21 ミツミ電機株式会社 Semiconductor integrated circuit equipment for electronic control and electronic control equipment for gas stoves
KR102572987B1 (en) 2018-06-28 2023-08-31 미쓰미덴기가부시기가이샤 Semiconductor integrated circuit device for electronic control and gas cooking stove electronic control device

Similar Documents

Publication Publication Date Title
JP5951429B2 (en) Watchdog circuit, power supply IC, and watchdog monitoring system
JP4404125B2 (en) Electronic control device and signal monitoring circuit
US8046615B2 (en) Microcomputer system with reduced power consumption
JP4535170B2 (en) Microcomputer system
EP2573683A1 (en) Data processor and electronic control unit
JP5231047B2 (en) Control device
JP5359742B2 (en) Power saving control apparatus, image forming apparatus, and program
JP2009037456A (en) Micro-controller and its control method
JP4665846B2 (en) Microcomputer and electronic control device
JP4151566B2 (en) Microcomputer
JP2009116719A (en) Microcomputer
JP2008107914A (en) Microcomputer, program and electronic control device for vehicle
JP3988636B2 (en) Microcomputer and vehicle ECU
JP2008102830A (en) Microcomputer, program and electronic control device for vehicle
JP4715760B2 (en) Microcomputer and control system
JP5465799B2 (en) Control device
JP2011070309A (en) Switch state detection device and processing system
JP2011039608A (en) Processing system, operation state control method and computer program
JP5324340B2 (en) Microcomputer
JP2013091365A (en) Electronic control device
CN103713960B (en) Watchdog circuit for embedded system
JP2009265880A (en) Microcomputer, and external register data processing method therefor
JP3711849B2 (en) Microcomputer
JPH08339308A (en) Digital processor
JP2010258635A (en) Control apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110530

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110602

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20111003