JP2009116851A - Microcomputer system - Google Patents

Microcomputer system Download PDF

Info

Publication number
JP2009116851A
JP2009116851A JP2008145773A JP2008145773A JP2009116851A JP 2009116851 A JP2009116851 A JP 2009116851A JP 2008145773 A JP2008145773 A JP 2008145773A JP 2008145773 A JP2008145773 A JP 2008145773A JP 2009116851 A JP2009116851 A JP 2009116851A
Authority
JP
Japan
Prior art keywords
main
sub
main cpu
power supply
cpu
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.)
Granted
Application number
JP2008145773A
Other languages
Japanese (ja)
Other versions
JP4535170B2 (en
Inventor
Shinichiro Taguchi
慎一郎 田口
Kenji Yamada
健二 山田
Akimitsu Inoue
昭光 井上
Hideaki Ishihara
秀昭 石原
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2008145773A priority Critical patent/JP4535170B2/en
Priority to US12/285,481 priority patent/US8046615B2/en
Publication of JP2009116851A publication Critical patent/JP2009116851A/en
Application granted granted Critical
Publication of JP4535170B2 publication Critical patent/JP4535170B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Microcomputers (AREA)
  • Power Sources (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microcomputer system that can attempt energy saving, by more appropriately supplying power supply control to a main CPU section. <P>SOLUTION: A sub-microcomputer 3, having a sub-CPU 8 and a power supply control section 24 that controls power supply to a main microcomputer 2, is disposed in addition to the main microcomputer 2, having a main CPU 4. A sub-clock section 9 that supplies a sub-clock signal of lower frequency to the sub-microcomputer 3 is able to change-over between a continuous mode and an intermittent mode. When the main CPU 4 gives an operation stop notification to the sub-CPU 8, by determining that own operation stop condition is met, the sub-CPU 8 recognizes the notification, stops power supply to the main microcomputer 2, and sets the sub-clock section 9 in the intermittent mode. The sub-CPU 8 determines whether the operation start condition is satisfied in a period, while the sub-clock signal is supplied in the intermittent mode. And when the condition is met, the sub-CPU 8 changes-over the sub-clock section 9 to the continuous mode to restart power supply to the main microcomputer 2. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、メインCPU部に供給されるメインクロック信号よりも低い周波数のサブクロック信号が供給されて動作することで、メインCPU部の動作制御を行う構成部を備えるマイクロコンピュータシステムに関する。   The present invention relates to a microcomputer system including a configuration unit that performs operation control of a main CPU unit by operating with a sub-clock signal having a frequency lower than that of a main clock signal supplied to a main CPU unit.

マイクロコンピュータにおいては、消費電力の低減を図るため、処理すべきイベントが発生しない状態になると、動作クロックの供給を停止して内部状態を保持するいわゆるスリープモードに移行するように構成されるものがある。例えば特許文献1には、CPUにクロック信号を供給するメイン発振回路の動作を、前記クロック信号よりも低い周波数のCR発振信号により動作するハードウエアロジックにより制御する構成が開示されている。すなわち、マイクロコンピュータをスリープモードに移行させると、CR発振信号をタイマによりカウントして、所定時間が経過するとメイン発振回路を再起動し、マイクロコンピュータをウェイクアップさせる。
特開平8−76873号公報
Some microcomputers are configured to shift to a so-called sleep mode in which the operation clock supply is stopped and the internal state is maintained when an event to be processed does not occur in order to reduce power consumption. is there. For example, Patent Document 1 discloses a configuration in which the operation of a main oscillation circuit that supplies a clock signal to a CPU is controlled by hardware logic that operates with a CR oscillation signal having a frequency lower than that of the clock signal. That is, when the microcomputer is shifted to the sleep mode, the CR oscillation signal is counted by the timer, and when the predetermined time has elapsed, the main oscillation circuit is restarted to wake up the microcomputer.
JP-A-8-76873

ところで、近年マイクロコンピュータ(マイコン)のプロセスの微細化が進んだ結果、電源が供給されている回路に発生するリーク電流が増加する傾向にある。そのため、CPUに対するクロック信号の供給のみを停止しても、上記のようなリーク電流(オフリーク)が存在することで低消費電力化を図ることが困難になりつつある。そこで、マイコン
を動作させる必要がない場合には、極力電源を遮断することで低消費電力化を図る技術が検討されている。
By the way, as a result of progress in miniaturization of a microcomputer (microcomputer) process in recent years, a leak current generated in a circuit to which power is supplied tends to increase. For this reason, even if only the supply of the clock signal to the CPU is stopped, it is becoming difficult to achieve low power consumption due to the presence of the leakage current (off-leakage) as described above. Therefore, when it is not necessary to operate the microcomputer, a technique for reducing power consumption by cutting off the power supply as much as possible has been studied.

マイコンに供給する電源を遮断して低消費電力化を図るには、適切なタイミングでマイコンに電源を供給し、再起動する構成が必要となる。しかしながら、特許文献1のように上記の機能をハードウエアロジックで構成すると、所定時間が経過すればマイクロコンピュータに電源を投入して起動させることになり、消費電力の低減効果が小さくなるという問題がある。   In order to reduce the power consumption by shutting off the power supplied to the microcomputer, a configuration is required in which the power is supplied to the microcomputer and restarted at an appropriate timing. However, when the above functions are configured by hardware logic as in Patent Document 1, the microcomputer is turned on and started up after a predetermined time has elapsed, and the effect of reducing power consumption is reduced. is there.

本発明は上記事情に鑑みてなされたものであり、その目的は、メインCPU部に対する電源の供給制御をより適切に行い、低消費電力化を図ることができるマイクロコンピュータシステムを提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a microcomputer system capable of appropriately controlling power supply to the main CPU unit and reducing power consumption. .

請求項1記載のマイクロコンピュータシステムによれば、メインCPUを含んで構成されるメインCPU部とは別に、サブCPUと、メインCPU部の少なくとも一部に対する電源供給を制御する電源供給制御回路とを備えるサブCPU部を設ける。また、サブCPU部に低周波数のサブクロック信号を供給するサブ発振回路を、連続モードと間欠モードとに切り替え可能に構成する。そして、メインCPUが、自身の動作停止条件が成立したと判断してサブCPUに動作停止通知を行うと、サブCPUは、その通知を認識し、メインCPU部に対する電源供給を停止させると共にサブ発振回路を間欠モードに設定する。また、サブCPUは、間欠モードにおいてサブクロック信号が供給されている期間にメインCPU部の動作開始条件が成立したか否かを判断し、条件が成立するとサブ発振回路を連続モードに切り替えてメインCPU部に対する電源供給を再開させる。   According to the microcomputer system of the first aspect, the sub CPU and the power supply control circuit for controlling the power supply to at least a part of the main CPU unit are provided separately from the main CPU unit including the main CPU. A sub CPU unit is provided. In addition, a sub oscillation circuit that supplies a sub-clock signal with a low frequency to the sub CPU unit is configured to be switchable between a continuous mode and an intermittent mode. When the main CPU determines that its own operation stop condition is satisfied and sends an operation stop notification to the sub CPU, the sub CPU recognizes the notification, stops the power supply to the main CPU unit, and sub-oscillates. Set the circuit to intermittent mode. In addition, the sub CPU determines whether or not the operation start condition of the main CPU unit is satisfied during the period in which the sub clock signal is supplied in the intermittent mode. If the condition is satisfied, the sub CPU switches the sub oscillation circuit to the continuous mode and switches to the main mode. The power supply to the CPU unit is resumed.

すなわち、メインCPU部に対する電源供給を停止させている期間はサブクロック信号によりサブCPUが間欠的に動作し、その動作期間にメインCPU部の動作開始条件が成立したと判断すればメインCPU部に電源を供給して起動させる。したがって、メインCPU部の起動の要否をサブCPUによって確実に判断することができる。更に、サブCPUが間欠的に動作することで、総じて消費電力の低減を図ることができる。   That is, when the power supply to the main CPU unit is stopped, the sub CPU operates intermittently by the sub clock signal, and if it is determined that the operation start condition of the main CPU unit is satisfied during the operation period, the main CPU unit Start by supplying power. Therefore, it is possible to reliably determine whether or not the main CPU unit needs to be activated by the sub CPU. Furthermore, since the sub CPU operates intermittently, overall power consumption can be reduced.

請求項2記載のマイクロコンピュータシステムによれば、メインCPUを含んで構成されるメインCPU部とは別に、サブCPUと、メインCPU部の少なくとも一部に対する電源供給を制御する電源供給制御回路とを備えるサブCPU部を設ける。そして、メインCPUは、自身の動作停止条件が成立したと判断すると、その時点でメイン揮発性記憶素子に記憶されている制御情報をメイン不揮発性記憶素子に書き込んで記憶させてからサブCPUに動作停止通知を行う。サブCPUは、その通知を認識するとメインCPU部に対する電源供給を停止させると共にサブ発振回路を間欠モードに設定し、サブクロック信号が供給されている期間にメインCPU部の動作開始条件が成立したか否かを判断し、条件が成立するとサブ発振回路を連続モードに切り替えてからメインCPU部に対する電源供給を再開させる。メインCPUは、電源供給が再開されて起動すると、メイン不揮発性記憶素子に記憶されている制御情報をメイン揮発性記憶素子に書き戻して制御情報に基づく処理を実行する。
したがって、請求項1と同様に、メインCPU部の起動の要否をサブCPUによって確実に判断し、消費電力の低減を図ることができる。また、メインCPU部の電源供給が停止されても、制御情報はメイン不揮発性記憶素子に記憶されるので、電源供給が再開された場合に、メインCPUは記憶された制御情報に基づいて処理を継続することができる。
According to the microcomputer system of the second aspect, the sub CPU and the power supply control circuit for controlling the power supply to at least a part of the main CPU unit are provided separately from the main CPU unit including the main CPU. A sub CPU unit is provided. When the main CPU determines that its own operation stop condition is satisfied, the control information stored in the main volatile memory element at that time is written and stored in the main nonvolatile memory element, and then the sub CPU operates. Stop notification. Upon recognizing the notification, the sub CPU stops the power supply to the main CPU unit and sets the sub oscillation circuit to the intermittent mode, and whether the operation start condition of the main CPU unit is satisfied during the period when the sub clock signal is supplied. If the condition is satisfied, the sub oscillation circuit is switched to the continuous mode and then the power supply to the main CPU unit is resumed. When the main CPU restarts when the power supply is resumed, the main CPU writes the control information stored in the main nonvolatile memory element back to the main volatile memory element, and executes processing based on the control information.
Therefore, similarly to the first aspect, it is possible to reliably determine whether or not the main CPU unit needs to be activated by the sub CPU, thereby reducing power consumption. Even if the power supply of the main CPU unit is stopped, the control information is stored in the main non-volatile storage element. Therefore, when the power supply is resumed, the main CPU performs processing based on the stored control information. Can continue.

請求項3記載のマイクロコンピュータシステムによれば、メインCPUは、自身の動作停止条件が成立したと判断するとサブCPUに対して動作停止通知を行い、サブCPUは、その通知を認識するとメインCPU部への電源供給を停止させ、その時点でメイン揮発性記憶素子に記憶されている制御情報をメイン不揮発性記憶素子に書き込んで記憶させると共に、メインCPU部の電源供給停止期間に使用するI/O制御情報をサブ揮発性記憶素子に書き込んで記憶させてから、各メイン記憶素子に対する電源供給を停止させる。更に、サブ発振回路を間欠モードに設定し、サブクロック信号が供給されている期間にメインCPU部の動作開始条件が成立したか否かを判断する。   According to the microcomputer system of the third aspect, when the main CPU determines that its own operation stop condition is satisfied, the main CPU issues an operation stop notification to the sub CPU. When the sub CPU recognizes the notification, the main CPU section The power supply to the I / O is stopped, and the control information stored in the main volatile storage element at that time is written and stored in the main nonvolatile storage element, and the I / O used during the power supply stop period of the main CPU unit After the control information is written and stored in the sub volatile memory element, the power supply to each main memory element is stopped. Further, the sub oscillation circuit is set to the intermittent mode, and it is determined whether or not the operation start condition of the main CPU unit is satisfied during the period when the sub clock signal is supplied.

そして、サブCPUは、前記動作開始条件が成立するとサブ発振回路を連続モードに切り替えて各メイン記憶素子への電源供給を再開させ、メイン不揮発性記憶素子に記憶されている制御情報をメイン揮発性記憶素子に書き戻すと共に、サブ揮発性記憶素子に記憶されているメインCPU部の電源供給停止期間に使用したI/O制御情報をメイン揮発性記憶素子に書き戻してからメインCPU部への電源供給を再開させ、メインCPUは、電源供給が再開されて起動すると制御情報に基づく処理を実行する。
したがって、請求項2ではメインCPUが行っていた、メイン側の揮発性記憶素子−不揮発性記憶素子間の情報転送をサブCPUが行うので、メインCPU部への電源供給をより早く停止させ、またより遅く再開させることができる。
Then, when the operation start condition is satisfied, the sub CPU switches the sub oscillation circuit to the continuous mode, restarts the power supply to each main memory element, and transfers the control information stored in the main nonvolatile memory element to the main volatile memory. The I / O control information used during the power supply stop period of the main CPU unit stored in the sub volatile storage element is written back to the main volatile storage element after being written back to the storage element and then the power to the main CPU unit When the supply is resumed and the power supply is resumed and activated, the main CPU executes processing based on the control information.
Therefore, since the sub CPU performs information transfer between the main volatile memory element and the non-volatile memory element, which is performed by the main CPU in claim 2, the power supply to the main CPU section is stopped earlier, and It can be resumed later.

請求項4記載のマイクロコンピュータシステムによれば、メインCPUは、自身の動作停止条件が成立したと判断するとサブCPUに対して動作停止通知を行い、サブCPUは、その通知を認識するとメインCPU部への電源供給を停止させ、その時点でメイン揮発性記憶素子に記憶されている制御情報をメイン不揮発性記憶素子に書き込んで記憶させると共に、メインCPU部の電源供給停止期間に使用するI/O制御情報をサブ揮発性記憶素子に書き込んで記憶させてから、各メイン記憶素子に対する電源供給を停止させる。
したがって、メインCPU部への電源供給を停止させた場合に、メイン側における揮発性記憶素子から不揮発性記憶素子間の情報転送をサブCPUが行うので、メインCPU部への電源供給をより早く停止させることができる。
According to the microcomputer system of the fourth aspect, when the main CPU determines that its own operation stop condition is satisfied, the main CPU issues an operation stop notification to the sub CPU. When the sub CPU recognizes the notification, the main CPU section The power supply to the I / O is stopped, and the control information stored in the main volatile storage element at that time is written and stored in the main nonvolatile storage element, and the I / O used during the power supply stop period of the main CPU unit After the control information is written and stored in the sub volatile memory element, the power supply to each main memory element is stopped.
Therefore, when the power supply to the main CPU section is stopped, the sub CPU performs information transfer between the volatile storage element and the nonvolatile storage element on the main side, so the power supply to the main CPU section is stopped earlier. Can be made.

請求項5記載のマイクロコンピュータシステムによれば、サブCPUは、メインCPU部,及び前記各メイン記憶素子に対する電源供給が停止されている間にメインCPU部の動作開始条件が成立したか否かを判断する。そして、動作開始条件が成立すると各メイン記憶素子への電源供給を再開させ、メイン不揮発性記憶素子に記憶されている制御情報をメイン揮発性記憶素子に書き戻すと共に、サブ揮発性記憶素子に記憶されているメインCPU部の電源供給停止期間に使用したI/O制御情報をメイン揮発性記憶素子に書き戻してからメインCPU部への電源供給を再開させ、メインCPUは、電源供給が再開されて起動すると制御情報に基づく処理を実行する。
したがって、メインCPU部の動作開始条件が成立した場合に、メイン側の不揮発性記憶素子−揮発性記憶素子間の情報転送をサブCPUが行うので、メインCPU部への電源供給をより遅く再開させることができる。
According to the microcomputer system of the fifth aspect, the sub CPU determines whether or not an operation start condition of the main CPU unit is satisfied while power supply to the main CPU unit and each main storage element is stopped. to decide. When the operation start condition is satisfied, the power supply to each main memory element is resumed, and the control information stored in the main nonvolatile memory element is written back to the main volatile memory element and stored in the sub volatile memory element. The I / O control information used during the power supply stop period of the main CPU unit is written back to the main volatile storage element and then the power supply to the main CPU unit is resumed. The main CPU resumes the power supply. When activated, the process based on the control information is executed.
Therefore, when the operation start condition of the main CPU unit is established, the sub CPU performs information transfer between the main nonvolatile memory element and the volatile memory element, so that the power supply to the main CPU unit is resumed later. be able to.

請求項6記載のマイクロコンピュータシステムによれば、メインCPUは、メイン不揮発性記憶素子に制御情報を全て書き込むと、「書込み完了情報」をメイン不揮発性記憶素子に併せて書き込み、電源供給が再開されて起動した場合、メイン不揮発性記憶素子に「書込み完了情報」が記憶されていなければ制御情報を読み出さずに初期化を実行する。したがって、メイン不揮発性記憶素子に記憶されている制御情報が不完全である場合に、メインCPUがその情報に基づき誤動作することを回避できる。   According to the microcomputer system of the sixth aspect, when all the control information is written in the main nonvolatile memory element, the main CPU writes “write completion information” together with the main nonvolatile memory element, and the power supply is resumed. If “write completion information” is not stored in the main nonvolatile memory element, initialization is executed without reading the control information. Therefore, when the control information stored in the main nonvolatile memory element is incomplete, it is possible to avoid the main CPU from malfunctioning based on the information.

請求項7記載のマイクロコンピュータシステムによれば、サブCPUは、メイン不揮発性記憶素子に制御情報を全て書き込むと、「書込み完了情報」をメイン不揮発性記憶素子に併せて書き込み、電源供給が再開されて起動した場合に、メイン不揮発性記憶素子に「書込み完了情報」が記憶されていない場合は、制御情報を読み出すことなく初期化を実行する。したがって、請求項6と同様の効果が得られる。   According to the microcomputer system of the seventh aspect, when the sub CPU writes all the control information in the main nonvolatile memory element, the sub CPU writes “write completion information” together with the main nonvolatile memory element, and the power supply is resumed. When “write completion information” is not stored in the main nonvolatile memory element, initialization is performed without reading out the control information. Therefore, the same effect as in the sixth aspect can be obtained.

請求項8記載のマイクロコンピュータシステムによれば、メイン不揮発性記憶素子をフラッシュメモリとする。すなわち、フラッシュメモリは、データの読み書きに要する時間が比較的長いので、そのようなメモリと揮発性記憶素子との間のデータ転送をサブCPUが行うシステムに本発明を適用すれば、メインCPU部に電源を供給する期間をより短くすることができる。   According to the microcomputer system of the eighth aspect, the main nonvolatile memory element is a flash memory. That is, the flash memory requires a relatively long time for reading and writing data. Therefore, if the present invention is applied to a system in which a sub CPU transfers data between such a memory and a volatile memory element, the main CPU section The period during which the power is supplied to the battery can be further shortened.

請求項9記載のマイクロコンピュータシステムによれば、メインCPUは、電源電圧の低下が検出された場合に動作停止条件が成立したと判断するので、例えば瞬時停電などが発生することで処理の継続が困難となる蓋然性が高い場合に、メインCPU部側の動作を停止させて消費電力を低減し、電源のバックアップに寄与することができる。   According to the microcomputer system of the ninth aspect, since the main CPU determines that the operation stop condition is satisfied when a drop in the power supply voltage is detected, the processing is continued due to, for example, an instantaneous power failure. When the probability of being difficult is high, the operation on the main CPU side can be stopped to reduce power consumption and contribute to power backup.

請求項10記載のマイクロコンピュータシステムによれば、サブCPUは、メインCPU部に対する電源供給が停止されている間にI/O制御を行うので、メインCPUの動作が停止している間もI/O制御を継続することができる。   According to the microcomputer system of the tenth aspect, the sub CPU performs I / O control while the power supply to the main CPU unit is stopped. Therefore, the I / O control is also performed while the operation of the main CPU is stopped. O control can be continued.

請求項11記載のマイクロコンピュータシステムによれば、サブCPU部に、外部との入出力を行うためのI/O制御部と通信を行うための通信制御部を備え、サブCPUは、メインCPU部に対する電源供給を停止させる場合は通信制御部の通信速度を低速に設定し、メインCPU部に電源供給を行っている間は通信速度を高速に設定する。すなわち、メインCPU部が動作しない期間は、低周波数のサブクロック信号によりサブCPUのみが動作するので、通信速度を低速にしても処理効率が低下する問題がなく、消費電力を低減することができる。   According to the microcomputer system of the eleventh aspect, the sub CPU unit includes the communication control unit for communicating with the I / O control unit for performing input / output with the outside, and the sub CPU is the main CPU unit. When stopping the power supply to, the communication speed of the communication control unit is set to a low speed, and the communication speed is set to a high speed while supplying power to the main CPU. That is, during the period when the main CPU does not operate, only the sub CPU operates by the low-frequency sub clock signal, so that there is no problem of reducing the processing efficiency even when the communication speed is low, and the power consumption can be reduced. .

請求項12記載のマイクロコンピュータシステムによれば、通信制御部は、メインCPU部に対する電源供給が停止されている間は、I/O制御部に記憶されている制御情報を周期的に転送して取得する。したがって、メインCPUが起動した場合は、最新のI/O制御情報を直ちに取得することができる。   According to the microcomputer system of the twelfth aspect, the communication control unit periodically transfers the control information stored in the I / O control unit while the power supply to the main CPU unit is stopped. get. Therefore, when the main CPU is activated, the latest I / O control information can be acquired immediately.

請求項13記載のマイクロコンピュータシステムによれば、サブCPUは、メインCPU部に対する電源供給を停止させている期間に、通信制御部を介して取得した制御情報に基づいてメインCPU部の動作開始条件が成立したか否かを判断する。したがって、外部との通信を介してメインCPU部の動作を再開させることができる。   According to the microcomputer system of the thirteenth aspect, the sub CPU operates under the condition for starting the operation of the main CPU unit based on the control information acquired through the communication control unit during the period when the power supply to the main CPU unit is stopped. It is determined whether or not is established. Therefore, the operation of the main CPU unit can be resumed through communication with the outside.

(第1実施例)
以下、本発明の第1実施例について図1乃至図7を参照して説明する。図1は、例えば車載機器の電子制御を行うために適用したマイクロコンピュータシステムの構成を概略的に示す機能ブロック図である。マイクロコンピュータシステム1は、メインマイクロコンピュータ(メインCPU部)2と、サブマイクロコンピュータ(サブCPU部)3とで構成されている。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a functional block diagram schematically showing a configuration of a microcomputer system applied for electronic control of on-vehicle equipment, for example. The microcomputer system 1 includes a main microcomputer (main CPU section) 2 and a sub microcomputer (sub CPU section) 3.

メインマイコン2は、メインCPU4,メインクロック部5,(メイン)不揮発性記憶素子6,(メイン)揮発性記憶素子7等で構成されている。メインCPU4は、メインクロック部5より供給される例えば周波数100MHz程度のメインクロック信号により動作するもので、例えば32ビットCPUであり、マイコンシステム1における処理の主たる部分を実行する。メインクロック部5は、具体的には図示しないが、外付けの発振子を含む発振回路より出力される基準クロック信号を、逓倍回路により逓倍することでメインクロック信号を生成する。
不揮発性記憶素子6は、例えばフラッシュメモリであり、メインCPU4の制御プログラムやデータ等が記憶されている。揮発性記憶素子7は、例えばSRAM,DRAM,レジスタ,フリップフロップなどであり、メインCPU4が制御プログラムを実行する場合のワークエリアとして使用される。
The main microcomputer 2 includes a main CPU 4, a main clock unit 5, a (main) nonvolatile memory element 6, a (main) volatile memory element 7, and the like. The main CPU 4 is operated by a main clock signal having a frequency of about 100 MHz supplied from the main clock unit 5 and is, for example, a 32-bit CPU, and executes a main part of processing in the microcomputer system 1. Although not specifically shown, the main clock unit 5 generates a main clock signal by multiplying a reference clock signal output from an oscillation circuit including an external oscillator by a multiplication circuit.
The nonvolatile storage element 6 is, for example, a flash memory, and stores a control program, data, and the like for the main CPU 4. The volatile memory element 7 is, for example, an SRAM, DRAM, register, flip-flop, etc., and is used as a work area when the main CPU 4 executes a control program.

サブマイコン3は、サブCPU8,サブクロック部(サブ発振回路)9,通信制御部10等で構成されている。サブCPU8は、サブクロック部9より供給される例えば周波数数MHz程度のサブクロック信号により動作するもので、例えば8ビット,或いは16ビットCPUであり、マイコンシステム1の低消費電力制御や通信制御、その他の補助的な処理を実行する。また、通信制御部10は、メインマイコン2の内部ともバスを介して接続されている。
I/O部11は、I/O制御部12,通信制御部13で構成されており、I/O制御部12は、外部との間で、例えば操作スイッチなどに関する信号の入出力を制御し、また、それらの信号を、通信制御部13を介してマイコンシステム1側の通信制御部10との間で通信(例えば全二重シリアル通信)を行う。
The sub microcomputer 3 includes a sub CPU 8, a sub clock unit (sub oscillation circuit) 9, a communication control unit 10, and the like. The sub CPU 8 is operated by, for example, a sub clock signal having a frequency of about several MHz supplied from the sub clock unit 9, and is an 8-bit or 16-bit CPU, for example, low power consumption control or communication control of the microcomputer system 1, Perform other auxiliary processing. The communication control unit 10 is also connected to the inside of the main microcomputer 2 via a bus.
The I / O unit 11 includes an I / O control unit 12 and a communication control unit 13, and the I / O control unit 12 controls input / output of signals related to, for example, operation switches with the outside. Further, these signals are communicated (for example, full-duplex serial communication) with the communication control unit 10 on the microcomputer system 1 side via the communication control unit 13.

図2は、サブマイコン3のより詳細な構成を示すものである。サブクロック部9は、サブクロック発振回路21,発振制御回路22及び発振停止回路23で構成されている。サブクロック発振回路21は、例えばCR発振回路,或いは複数の論理反転回路をリング状に接続して構成されるリングオシレータなどで構成されている。サブCPU8は、発振制御回路22を介して、サブクロック発振回路21の発振動作を間欠的に停止させる制御が可能となっている。例えば、サブCPU8が発振動作の停止を設定指示すると、発振制御回路22はサブクロック発振回路21の発振動作を停止させるが、一定時間が経過すると発振動作を自動的に再開させるようになっている。また、発振停止回路23は、発振回路21が出力するサブクロック信号を阻止するゲートロジックである。そして、通信制御部10及び電源制御部24に対しては、サブCPU8と共に、発振停止回路23を介してサブクロック信号が供給されている。   FIG. 2 shows a more detailed configuration of the sub-microcomputer 3. The sub clock unit 9 includes a sub clock oscillation circuit 21, an oscillation control circuit 22, and an oscillation stop circuit 23. The sub clock oscillation circuit 21 is constituted by, for example, a CR oscillation circuit or a ring oscillator configured by connecting a plurality of logic inversion circuits in a ring shape. The sub CPU 8 can be controlled to intermittently stop the oscillation operation of the sub clock oscillation circuit 21 via the oscillation control circuit 22. For example, when the sub CPU 8 instructs to stop the oscillating operation, the oscillation control circuit 22 stops the oscillating operation of the sub clock oscillating circuit 21, but the oscillating operation is automatically restarted after a predetermined time has elapsed. . The oscillation stop circuit 23 is a gate logic that blocks the sub clock signal output from the oscillation circuit 21. A sub clock signal is supplied to the communication control unit 10 and the power supply control unit 24 through the oscillation stop circuit 23 together with the sub CPU 8.

電源VDDは、図示しないバックアップコンデンサ等のバックアップ手段によりバックアップされてサブマイコン3に供給されている。電源制御部(電源供給制御回路)24は、サブCPU8により制御され、電源VDDをメインマイコン2側に対して供給,遮断する(図1の「内部電源」に相当する)。電圧低下検出部25は、電源VDDの電圧が所定レベルを下回ったか否かを検出するためのコンパレータ,或いはA/D変換回路を備えて構成されている。そして、メインCPU4,サブCPU8,通信制御部10,発振停止回路23,電源制御部24は、バスを介して相互に接続されている。
尚、メインマイコン2については、図示を省略しているが、実際には複数の周辺回路が搭載されている。したがって、サブマイコン3は、メインマイコン2を構成している回路ゲート数よりも少ない回路ゲート数で構成されている。
The power supply VDD is backed up by backup means such as a backup capacitor (not shown) and supplied to the sub-microcomputer 3. The power control unit (power supply control circuit) 24 is controlled by the sub CPU 8 to supply and shut off the power VDD to the main microcomputer 2 side (corresponding to “internal power” in FIG. 1). The voltage drop detection unit 25 includes a comparator or an A / D conversion circuit for detecting whether or not the voltage of the power supply VDD has fallen below a predetermined level. The main CPU 4, the sub CPU 8, the communication control unit 10, the oscillation stop circuit 23, and the power supply control unit 24 are connected to each other through a bus.
The main microcomputer 2 is not shown, but actually has a plurality of peripheral circuits. Therefore, the sub-microcomputer 3 is configured with a smaller number of circuit gates than the number of circuit gates constituting the main microcomputer 2.

次に、本実施例の作用について図3乃至図7を参照して説明する。図3は、通常動作状態(電源正常時)においてメインマイコン2に対する電源供給を停止させた後、電源供給を再開させる場合の処理を示すタイミングチャートである。また、図4は、電源(電圧)降下時における図3相当図である。そして、図5はメインマイコン2に対する電源供給を停止させる場合の(a)メインマイコン2側,(b)サブマイコン3側の処理を示すフローチャートである。   Next, the operation of the present embodiment will be described with reference to FIGS. FIG. 3 is a timing chart showing processing in the case where the power supply to the main microcomputer 2 is stopped after the power supply to the main microcomputer 2 is stopped in the normal operation state (when the power is normal). FIG. 4 is a diagram corresponding to FIG. 3 when the power supply (voltage) drops. FIG. 5 is a flowchart showing processing on the (a) main microcomputer 2 side and (b) sub-microcomputer 3 side when power supply to the main microcomputer 2 is stopped.

<間欠動作モードへの移行処理>
図5(a)において、メインCPU4は、リセットが解除されると、揮発性記憶素子7等の初期化処理を行った後(ステップM1)、制御プログラムに応じた通常の動作を実行する(ステップM2)。その通常動作の実行中は、電圧低下検出部25が電源VDDの電圧低下を検出したか否かを判断すると共に(ステップM3)、マイコンシステム1として間欠動作への移行が可能か否かを判断する(ステップM4)。ここで、マイコンシステム1の「間欠動作」とは、メインマイコン2に対する電源供給は停止させ、サブマイコン3側のみがサブクロック信号によって間欠的に動作している状態を言う。
<Transition process to intermittent operation mode>
In FIG. 5A, when the reset is released, the main CPU 4 performs an initialization process for the volatile memory element 7 and the like (step M1) and then performs a normal operation according to the control program (step S1). M2). During the execution of the normal operation, it is determined whether or not the voltage drop detection unit 25 has detected a voltage drop of the power supply VDD (step M3), and whether or not the microcomputer system 1 can shift to the intermittent operation is determined. (Step M4). Here, “intermittent operation” of the microcomputer system 1 refers to a state in which power supply to the main microcomputer 2 is stopped and only the sub-microcomputer 3 side is intermittently operated by the sub-clock signal.

ステップM4においては、間欠動作への移行が可能か否の判断条件として、例えばI/O部11を介したECU間の通信や、外部スイッチの入力操作などが発生していないか、等である。ステップM2〜M4のループを回っている間に、ステップM3,M4の何れか一方において「YES」と判断すると、メインCPU4は、不揮発性記憶素子6の書き込み状態情報を格納するアドレスに、「書き込み中」を示すデータを書き込む(ステップM5)。尚、ステップM3で「YES」と判断した場合には、サブCPU8によるアクセスが可能な領域に設定されるフラグ格納領域に「電源降下フラグ」をセットしてから(ステップM3a)ステップM5に移行する。   In step M4, as conditions for determining whether or not the transition to the intermittent operation is possible, for example, communication between ECUs via the I / O unit 11, input operation of an external switch, or the like has occurred. . If “YES” is determined in any one of steps M3 and M4 during the loop of steps M2 to M4, the main CPU 4 sets “write” to the address where the write state information of the nonvolatile memory element 6 is stored. Data indicating “medium” is written (step M5). If “YES” is determined in step M3, a “power-down flag” is set in a flag storage area set as an area accessible by the sub CPU 8 (step M3a), and the process proceeds to step M5. .

それから、メインCPU4は、その時点の制御情報を例えば内部レジスタ等から読み出すと(ステップM6)、読み出した制御情報を不揮発性記憶素子6の所定領域に書き込んで記憶させる(ステップM7)。そして、全ての制御情報(全領域)の格納が完了するまで(ステップM8:NO)ステップM6,M7の処理を繰り返し、格納が完了すると(ステップM8:YES)、不揮発性記憶素子6の書き込み状態情報の格納アドレスに、「書き込み完了」を示すデータを書き込む(ステップM9)。それから、制御情報の格納が完了したことをサブマイコン3に通知すると(ステップM10)、電源が遮断されるまで待機する。   Then, when the main CPU 4 reads the control information at that time from, for example, an internal register (step M6), the main CPU 4 writes and stores the read control information in a predetermined area of the nonvolatile memory element 6 (step M7). Then, until the storage of all the control information (all areas) is completed (step M8: NO), the processes of steps M6 and M7 are repeated. When the storage is completed (step M8: YES), the writing state of the nonvolatile memory element 6 is completed. Data indicating “write complete” is written to the information storage address (step M9). Then, when the sub-microcomputer 3 is notified that the storage of the control information has been completed (step M10), it waits until the power is shut off.

尚、ステップM10における通知は、例えばメインCPU4,サブCPU8の双方がアクセス可能なメモリやレジスタが共有バスに接続されており、メインCPU4がそれらの特定領域にデータを書き込んだことをサブCPU8がポーリングにより検出することで行うようにする。また、メインCPU4がサブCPU8に対して直接割り込みを発生させて行っても良い。   Note that the notification in step M10 is, for example, that the sub CPU 8 polls that the main CPU 4 has written data to these specific areas because the memory and registers accessible to both the main CPU 4 and the sub CPU 8 are connected to the shared bus. It is made to do by detecting by. Alternatively, the main CPU 4 may generate an interrupt directly to the sub CPU 8.

図5(b)において、サブCPU8は、リセットが解除されるとメインCPU4と同様に初期化を行い(ステップS1)、続いて、通信制御部10の通信速度を高速側(例えば数10Mbps程度)に設定する(ステップS2)。それから、制御プログラムに応じた通常の動作を実行する(ステップS3)。その通常動作の実行中は、電源VDDの電圧低下が検出されており、且つステップM10における通知があったか否か(ステップS4)、また、メインCPU4側における間欠動作への移行可能条件が成立し、且つステップM10における通知があったか否かを判断する(ステップS5)。   In FIG. 5B, when the reset is released, the sub CPU 8 performs initialization in the same manner as the main CPU 4 (step S1), and subsequently sets the communication speed of the communication control unit 10 to the high speed side (for example, about several tens of Mbps). (Step S2). Then, a normal operation according to the control program is executed (step S3). During the execution of the normal operation, a voltage drop of the power supply VDD is detected and whether or not there is a notification in step M10 (step S4), and the condition for enabling the transition to the intermittent operation on the main CPU 4 side is established, Further, it is determined whether or not there is a notification in step M10 (step S5).

ステップS4,S5の何れかの要因に対応して、メインCPU4より上記「通知」があると(YES)、サブCPU8は、通信制御部10の通信速度を低速側(例えば1Mbps程度)に設定する(ステップS6)。そして、電源制御部24内部のレジスタに、メインマイコン2側に対する電源供給を停止させるためのデータを書き込むと(ステップS7)、発振制御回路22に対してサブクロック発振回路21の発振動作を停止させる設定を行い(すなわち、サブマイコン3は間欠的に動作を停止している間にSLEEP状態となる,ステップS8)、マイコンシステム1の間欠動作モードに移行する。   In response to any of the factors of steps S4 and S5, when the “notification” is received from the main CPU 4 (YES), the sub CPU 8 sets the communication speed of the communication control unit 10 to the low speed side (for example, about 1 Mbps). (Step S6). Then, when data for stopping the power supply to the main microcomputer 2 side is written in the register inside the power control unit 24 (step S7), the oscillation control circuit 22 stops the oscillation operation of the subclock oscillation circuit 21. Setting is performed (that is, the sub-microcomputer 3 is in the SLEEP state while the operation is intermittently stopped, step S8), and the microcomputer system 1 shifts to the intermittent operation mode.

ここで、図3のタイミングチャートでは、(d)のメインマイコン状態と、(h)のサブマイコン状態に、図5のフローチャートにおける各ステップの実行タイミングを示している。図5の処理が完了すると、メインマイコン2は電源供給が遮断されて動作を停止し、サブマイコン3は、サブクロック信号が間欠的に供給されて動作する(図3(g)参照)。   Here, in the timing chart of FIG. 3, the execution timing of each step in the flowchart of FIG. 5 is shown in the main microcomputer state of (d) and the sub-microcomputer state of (h). When the processing of FIG. 5 is completed, the main microcomputer 2 is shut off and the operation is stopped, and the sub-microcomputer 3 is operated with the sub-clock signal being intermittently supplied (see FIG. 3G).

<間欠動作モード中におけるサブマイコン3の処理>
図6は、サブマイコン3に対し、サブクロック信号が間欠的に供給されて動作する場合の処理を示すフローチャートである。サブCPU8は、通信制御部10,13を介してI/O制御部12と低速通信を行い(ステップS11)、I/O制御部12に対する外部からの信号入力状態(メインマイコン2側の復帰要因に関するもの)を確認する(ステップS12)。
<Processing of sub-microcomputer 3 in intermittent operation mode>
FIG. 6 is a flowchart showing processing when the sub-microcomputer 3 operates by intermittently supplying a sub-clock signal. The sub CPU 8 performs low-speed communication with the I / O control unit 12 via the communication control units 10 and 13 (step S11), and a signal input state from the outside to the I / O control unit 12 (return factor on the main microcomputer 2 side) Are confirmed) (step S12).

更に、図示しない過電流や過電圧,異常発熱等の検出回路による検出状態を確認すると(ステップS13)、サブCPU8は、フラグ格納領域に「電源降下フラグ」がセットされているか否かを判断し(ステップS14)、上記フラグがセットされていなければ(NO)続くステップS15,S16の判断を行う。上記フラグがセットされている場合は(YES)、メインマイコン2側を通常動作に復帰させる条件として電源VDDの電圧降下が解消した(未検出)か否かを判断する(ステップS18)。   Furthermore, when the detection state by a detection circuit (not shown) such as an overcurrent, overvoltage, abnormal heat generation or the like is confirmed (step S13), the sub CPU 8 determines whether or not the “power supply drop flag” is set in the flag storage area ( In step S14), if the flag is not set (NO), the subsequent steps S15 and S16 are determined. If the flag is set (YES), it is determined whether or not the voltage drop of the power supply VDD has been eliminated (undetected) as a condition for returning the main microcomputer 2 to normal operation (step S18).

ステップS15で判断する通常動作復帰条件は、例えばECU間通信や外部スイッチ入力等のイベントが発生していたり、ステップS13における電流異常や電源電圧の異常等が検出された場合である。
続くステップS16では、もう1つの通常動作復帰条件として、予め仕様で定められた間欠動作の設定時間が終了したか否かを判断する。ここでの時間計測は、例えばサブCPU8が間欠動作中における起動の回数(図6のフローを何回実行したか)をカウントすることで行っても良い。
The normal operation return condition determined in step S15 is, for example, when an event such as communication between ECUs or external switch input has occurred, or when a current abnormality or power supply voltage abnormality is detected in step S13.
In subsequent step S16, as another normal operation return condition, it is determined whether or not the set time of the intermittent operation defined in the specification has ended. The time measurement here may be performed, for example, by counting the number of times the sub CPU 8 is activated during the intermittent operation (how many times the flow in FIG. 6 has been executed).

ステップS14〜S16の何れでも「NO」と判断した場合、またステップS18で「NO」と判断した場合、サブCPU8は、発振制御回路22に対してサブクロック発振回路21の発振動作を停止させる設定を再度行い(ステップS17)、SLEEP状態に移行する。一方、ステップS15,S16,S18の何れかで「YES」と判断すると、電源制御部24内部のレジスタに、メインマイコン2側に対する電源供給を再開させるためのデータを書き込んで(ステップS20)電源復帰動作→通常動作モードに移行する。尚、ステップS18で「YES」と判断した場合は、「電源降下フラグ」をリセットしてから(ステップS19)ステップS20に移行する。   If it is determined “NO” in any of steps S14 to S16, or if “NO” is determined in step S18, the sub CPU 8 sets the oscillation control circuit 22 to stop the oscillation operation of the sub clock oscillation circuit 21. Is performed again (step S17), and the state shifts to the SLEEP state. On the other hand, if “YES” is determined in any of steps S15, S16, and S18, data for resuming power supply to the main microcomputer 2 side is written in a register in the power supply control unit 24 (step S20). Moves from operation to normal operation mode. If "YES" is determined in the step S18, the "power supply drop flag" is reset (step S19), and the process proceeds to the step S20.

<通常動作モードへの移行処理>
図7は、間欠動作からメインマイコン2側に対する電源供給を再開して通常動作モードに移行する場合の(a)メインマイコン2側,(b)サブマイコン3側の処理を示すフローチャートである。図7(a)において、メインCPU4は、不揮発性記憶素子6の書き込み状態情報の格納アドレスよりデータを読み出すと(ステップM11)、そのデータが「書き込み完了」を示すデータか否かを判断する(ステップM12)。「書き込み完了」を示すデータであれば(YES)、ステップM7において不揮発性記憶素子6に記憶させた制御情報を読み出して(ステップM14)、揮発性記憶素子7に書き戻す(ステップM15)。そして、制御情報を全領域について書き戻すと(ステップM16:YES)通常動作に移行する。
<Transition to normal operation mode>
FIG. 7 is a flowchart showing processing on the (a) main microcomputer 2 side and (b) sub-microcomputer 3 side when the supply of power to the main microcomputer 2 side is resumed from the intermittent operation to shift to the normal operation mode. In FIG. 7A, when the main CPU 4 reads data from the storage address of the write state information of the nonvolatile memory element 6 (step M11), the main CPU 4 determines whether or not the data indicates “write complete” (step S11). Step M12). If the data indicates “write complete” (YES), the control information stored in the nonvolatile memory element 6 in step M7 is read (step M14) and written back to the volatile memory element 7 (step M15). Then, when the control information is written back for the entire area (step M16: YES), the process proceeds to the normal operation.

一方、ステップM12において、書き込み状態情報の格納アドレスより読み出したデータが「書き込み中」を示す場合は(NO)、間欠動作モードに移行する場合の制御情報の書き込みが全て完了しなかったことを示す。この制御情報に基づいて処理を継続しようとすると誤動作する可能性が極めて高いので、この場合は、ステップM1と同様の初期化を実行する(ステップM13)。
尚、メインCPU4は、電源が投入されて起動した場合に、最初にステップM1の初期化を実行するか、ステップM11を実行するかの処理分岐についても、例えばステップM1を一度実行済みであるか否かを判断するためのフラグを参照した結果に応じて行うようになっている。
図7(b)に示すサブマイコン3側の処理は、この場合ステップS2と同様に、通信制御部10の通信速度を高速側に設定する処理のみであり(ステップS21)、その後、通常動作を実行する。
On the other hand, if the data read from the storage address of the write state information indicates “being written” in step M12 (NO), it indicates that the writing of the control information when shifting to the intermittent operation mode has not been completed. . If the process is continued based on this control information, there is a very high possibility of malfunctioning. In this case, initialization similar to step M1 is executed (step M13).
Whether the main CPU 4 has executed step M1 once for the processing branch of whether to execute initialization of step M1 first or step M11 when the power is turned on and started. The determination is made according to the result of referring to the flag for determining whether or not.
In this case, the processing on the sub-microcomputer 3 side shown in FIG. 7B is only the processing for setting the communication speed of the communication control unit 10 to the high speed side as in step S2 (step S21). Execute.

尚、図3,図4のタイミングチャートは、実質的な処理内容は略同じであり、図4(a)に示す電源VDDの電圧が変化している点が異なっている。すなわち、メインマイコン2側では、図4(d)に示すように、通常動作している間に電源VDDの電圧降下が検出された時点がステップM3で「YES」と判断されるタイミングとなる。また、サブマイコン3側では、図4(h)に示すように、間欠動作中に電源VDDの電圧降下が検出されなくなった時点がステップS18で「YES」と判断されるタイミングとなる。   The timing charts of FIGS. 3 and 4 are substantially the same in the content of processing, and are different in that the voltage of the power supply VDD shown in FIG. That is, on the main microcomputer 2 side, as shown in FIG. 4D, the time point when the voltage drop of the power supply VDD is detected during the normal operation is the timing when “YES” is determined in step M3. On the sub-microcomputer 3 side, as shown in FIG. 4 (h), the time point when the voltage drop of the power supply VDD is not detected during the intermittent operation is the timing when “YES” is determined in step S18.

以上のように本実施例のマイコンシステム1では、メインCPU4を含んで構成されるメインマイコン2とは別に、サブCPU8と、メインマイコン2に対する電源供給を制御する電源制御部24とを備えるサブマイコン3を設ける。また、サブマイコン3に低周波数のサブクロック信号を供給するサブクロック部9を、連続モードと間欠モードとに切り替え可能に構成した。
そして、メインCPU4が、自身の動作停止条件が成立したと判断してサブCPU8に動作停止通知を行うと、サブCPU8は、その通知を認識し、メインマイコン2に対する電源供給を停止させると共にサブクロック部9を間欠モードに設定する。また、サブCPU8は、間欠モードにおいてサブクロック信号が供給されている期間にメインマイコン2の動作開始条件が成立したか否かを判断し、条件が成立するとサブクロック部9を連続モードに切り替えてメインマイコン2に対する電源供給を再開させる。
As described above, in the microcomputer system 1 of the present embodiment, a sub microcomputer including a sub CPU 8 and a power control unit 24 that controls power supply to the main microcomputer 2 separately from the main microcomputer 2 including the main CPU 4. 3 is provided. Further, the sub clock unit 9 that supplies the sub-clock signal of the low frequency to the sub microcomputer 3 is configured to be switchable between the continuous mode and the intermittent mode.
When the main CPU 4 determines that its own operation stop condition is satisfied and sends an operation stop notification to the sub CPU 8, the sub CPU 8 recognizes the notification and stops the power supply to the main microcomputer 2 and the sub clock. The unit 9 is set to the intermittent mode. Further, the sub CPU 8 determines whether or not the operation start condition of the main microcomputer 2 is satisfied during the period in which the sub clock signal is supplied in the intermittent mode, and switches the sub clock unit 9 to the continuous mode when the condition is satisfied. The power supply to the main microcomputer 2 is resumed.

すなわち、メインマイコン2に対する電源供給を停止させている期間はサブCPUが間欠的に動作し、その動作期間にメインマイコン2の動作開始条件が成立したと判断すればメインマイコン2に電源を供給して起動させることで、メインマイコン2の起動の要否をサブCPU8によって確実に判断することができる。更に、サブCPU8が間欠的に動作することで、総じて消費電力の低減を図ることができる。   That is, when the power supply to the main microcomputer 2 is stopped, the sub CPU operates intermittently. If it is determined that the operation start condition of the main microcomputer 2 is satisfied during the operation period, the main microcomputer 2 is supplied with power. Thus, the sub CPU 8 can reliably determine whether the main microcomputer 2 needs to be activated. Furthermore, since the sub CPU 8 operates intermittently, overall power consumption can be reduced.

また、メインCPU4は、自身の動作停止条件が成立したと判断すると、その時点で記憶されている制御情報を不揮発性記憶素子6に書き込んで記憶させてからサブCPU8に動作停止通知を行い、メインCPU5は、電源供給が再開されて起動すると、不揮発性記憶素子6に記憶されている制御情報を揮発性記憶素子7に書き戻して制御情報に基づく処理を実行する。したがって、メインマイコン2の電源供給が停止されても、制御情報は不揮発性記憶素子6に記憶されるので、電源供給が再開された場合に、メインCPU4は、記憶された制御情報に基づいて処理を継続することができる。   When the main CPU 4 determines that its own operation stop condition is satisfied, the main CPU 4 writes the control information stored at that time in the nonvolatile memory element 6 and stores it, and then notifies the sub CPU 8 of the operation stop. When the power supply is resumed and started up, the CPU 5 writes the control information stored in the nonvolatile memory element 6 back to the volatile memory element 7 and executes a process based on the control information. Therefore, even if the power supply to the main microcomputer 2 is stopped, the control information is stored in the non-volatile storage element 6. Therefore, when the power supply is resumed, the main CPU 4 performs processing based on the stored control information. Can continue.

また、メインCPU4は、不揮発性記憶素子6に制御情報を全て書き込むと、「書込み完了情報」を不揮発性記憶素子6に併せて書き込み、電源供給が再開されて起動した場合、不揮発性記憶素子6に「書込み完了情報」が記憶されていなければ制御情報を読み出さずに初期化を実行する。したがって、不揮発性記憶素子6に記憶されている制御情報が不完全である場合に、その情報に基づき誤動作することを回避できる。
更に、メインCPU4は、電源VDDの電圧低下が検出された場合に動作停止条件が成立したと判断するので、例えば瞬時停電などが発生することで処理の継続が困難となる蓋然性が高い場合に、メインマイコン2の動作を停止させて消費電力を低減し、電源のバックアップに寄与することができる。
When the main CPU 4 writes all the control information to the nonvolatile memory element 6, the main CPU 4 writes “write completion information” together with the nonvolatile memory element 6. If “write completion information” is not stored in the memory, initialization is executed without reading the control information. Therefore, when the control information stored in the nonvolatile memory element 6 is incomplete, it is possible to avoid malfunctioning based on the information.
Furthermore, since the main CPU 4 determines that the operation stop condition is satisfied when a voltage drop of the power supply VDD is detected, for example, when there is a high probability that the processing will be difficult due to an instantaneous power failure or the like. The operation of the main microcomputer 2 can be stopped to reduce power consumption and contribute to power backup.

加えて、サブマイコン3に、外部との入出力を行うためのI/O制御部12と通信を行うための通信制御部10を備え、サブCPU8は、メインマイコン2に対する電源供給を停止させる場合は通信制御部10の通信速度を低速に設定し、メインマイコン2に電源供給を行っている間は通信速度を高速に設定する。すなわち、メインマイコン2が動作しない期間は、低周波数のサブクロック信号によりサブCPUのみが動作するので、通信速度を低速にしても処理効率が低下する問題がなく、消費電力を低減することができる。
そして、サブCPU8は、メインマイコン2に対する電源供給を停止させている期間に、通信制御部10を介して取得した制御情報に基づいてメインマイコン2の動作開始条件が成立したか否かを判断するので、外部(例えば他のマイコンなど)との通信を介してメインマイコン2の動作を再開させることができる。
In addition, the sub microcomputer 3 includes a communication control unit 10 for communicating with the I / O control unit 12 for performing input / output with the outside, and the sub CPU 8 stops power supply to the main microcomputer 2 Sets the communication speed of the communication control unit 10 to low speed, and sets the communication speed to high speed while supplying power to the main microcomputer 2. That is, during the period when the main microcomputer 2 does not operate, only the sub CPU is operated by the low-frequency sub clock signal, so that there is no problem that the processing efficiency is lowered even if the communication speed is low, and the power consumption can be reduced. .
Then, the sub CPU 8 determines whether or not an operation start condition for the main microcomputer 2 is satisfied based on control information acquired via the communication control unit 10 during a period in which power supply to the main microcomputer 2 is stopped. Therefore, the operation of the main microcomputer 2 can be resumed through communication with the outside (for example, another microcomputer).

(第2実施例)
図8乃至図15は本発明の第2実施例を示すものであり、第1実施例と同一部分には同一符号を付して説明を省略し、以下異なる部分について説明する。図8は、第2実施例のマイクロコンピュータシステム31の構成を示す。マイコンシステム31は、メインマイクロコンピュータ(メインCPU部)32と、サブマイクロコンピュータ(サブCPU部)33と、記憶素子部34とで構成されている。記憶素子部34は、第1実施例ではメインマイコン3に搭載されていた記憶素子6,7を独立させたチップであり、メインマイコン32側,サブマイコン33側の何れからもアクセスが可能に構成されている。
(Second embodiment)
FIGS. 8 to 15 show a second embodiment of the present invention. The same parts as those of the first embodiment are denoted by the same reference numerals and the description thereof will be omitted. Hereinafter, different parts will be described. FIG. 8 shows the configuration of the microcomputer system 31 of the second embodiment. The microcomputer system 31 includes a main microcomputer (main CPU unit) 32, a sub microcomputer (sub CPU unit) 33, and a storage element unit 34. The storage element unit 34 is a chip in which the storage elements 6 and 7 mounted in the main microcomputer 3 in the first embodiment are made independent, and can be accessed from either the main microcomputer 32 side or the sub microcomputer 33 side. Has been.

メインマイコン32は、メインCPU4に替わるメインCPU35と、その周辺回路であるロジック回路36(A〜D,例えばゲートアレイ等)とを備えており、これらのロジック回路36も、メインクロック信号が供給されて動作する。
また、サブマイコン33は、サブCPU8,通信制御部10,電源制御部24に替わるサブCPU37,通信制御部38,電源制御部(電源供給制御回路)39と、(サブ)揮発性記憶素子40と、セレクタ41とを備えている。電源制御部39は、メインマイコン32に対する電源供給制御だけでなく、記憶素子部34に対する電源供給制御も行うように構成されている。
The main microcomputer 32 includes a main CPU 35 that replaces the main CPU 4 and logic circuits 36 (A to D, such as a gate array) that are peripheral circuits thereof. These logic circuits 36 are also supplied with a main clock signal. Works.
The sub-microcomputer 33 includes a sub-CPU 37, a communication control unit 10, a communication control unit 38, a power control unit (power supply control circuit) 39, and a (sub) volatile storage element 40. The selector 41 is provided. The power control unit 39 is configured to perform not only power supply control for the main microcomputer 32 but also power supply control for the storage element unit 34.

揮発性記憶素子40は、メインマイコン側の揮発性記憶素子7と同様に、SRAM,DRAM,レジスタ,フリップフロップなどで構成され、サブCPU37が制御プログラムを実行する場合のワークエリアとして使用されるが、その容量は、揮発性記憶素子7よりも小さく設定されている。セレクタ41は、記憶素子部34に対して、メインクロック信号とサブクロック信号とを切替えて供給するもので、その切り替え制御はサブCPU37によって行われる。尚、サブマイコン33が間欠動作モードで動作している場合でも、揮発性記憶素子40には常に電源が供給されるようになっており、その記憶内容は揮発することなく保持されている。   The volatile memory element 40 is composed of SRAM, DRAM, registers, flip-flops, etc., like the volatile memory element 7 on the main microcomputer side, and is used as a work area when the sub CPU 37 executes the control program. The capacity is set smaller than that of the volatile memory element 7. The selector 41 switches and supplies the main clock signal and the sub clock signal to the storage element unit 34, and the switching control is performed by the sub CPU 37. Even when the sub-microcomputer 33 operates in the intermittent operation mode, the volatile memory element 40 is always supplied with power, and the stored contents are held without being volatilized.

図9は、第1実施例の図2相当図であり、サブマイコン33の詳細な構成を示すものである。電源制御部39は、サブCPU37により制御され、電源VDDをメインマイコン32側にメイン電源として供給,遮断すると共に、記憶素子部34に記憶素子電源として供給,遮断する。これらは、互いに独立に制御されるようになっている。また、電源制御部39及び揮発性記憶素子40に対しては、発振停止回路23を介してサブクロック信号が供給されており、通信制御部38に対しては、サブクロック発振回路21よりサブクロック信号が直接供給されている。
そして、メインCPU35,サブCPU37,通信制御部38,発振停止回路23,電源制御部39,各記憶素子6,7,40は、バスを介して相互に接続されている。尚、図9では、セレクタ41の図示を省略している。
FIG. 9 is a diagram corresponding to FIG. 2 of the first embodiment, and shows a detailed configuration of the sub-microcomputer 33. The power control unit 39 is controlled by the sub CPU 37 to supply and shut off the power VDD as the main power to the main microcomputer 32 side, and to supply and shut off the memory element 34 as the memory element power. These are controlled independently of each other. Further, a sub clock signal is supplied to the power supply control unit 39 and the volatile memory element 40 via the oscillation stop circuit 23, and a sub clock is supplied from the sub clock oscillation circuit 21 to the communication control unit 38. The signal is supplied directly.
The main CPU 35, the sub CPU 37, the communication control unit 38, the oscillation stop circuit 23, the power supply control unit 39, and the storage elements 6, 7, and 40 are connected to each other via a bus. In FIG. 9, the selector 41 is not shown.

図10は、通信制御部38の内部構成を示す機能ブロック図である。通信制御部38は、通信レート設定レジスタ42,通信モード設定レジスタ43,通信開始レジスタ44の各種制御レジスタと、通信完了フラグ45の格納領域とを備えている。通信クロック生成部46は、通信レート設定レジスタ42により設定されたデータ値に応じて、サブクロック信号に同期した通信クロック信号を生成して送受信シーケンサ47に供給する。   FIG. 10 is a functional block diagram showing the internal configuration of the communication control unit 38. The communication control unit 38 includes a communication rate setting register 42, a communication mode setting register 43, various control registers such as a communication start register 44, and a storage area for the communication completion flag 45. The communication clock generator 46 generates a communication clock signal synchronized with the sub clock signal according to the data value set by the communication rate setting register 42 and supplies the communication clock signal to the transmission / reception sequencer 47.

送信バッファ48には、サブCPU37により送信データがセットされ、受信バッファ49には、I/O部11側より受信したデータがセットされる。送受信シーケンサ47は、通信開始レジスタ44によって通信開始信号が与えられると、通信クロック信号に同期して、バッファ48,49を介してデータを送信,受信する通信処理を行い、その処理が完了すると通信完了フラグ45をセットする。
ANDゲート50の入力端子の一方には、通信シーケンサ47からの通信完了フラグセット信号が与えられ、入力端子の他方(負論理)には、通信モード設定レジスタ43からのモード設定データが与えられており、ANDゲート50の出力信号は、通信開始レジスタ44にクリア信号として出力される。
Transmission data is set in the transmission buffer 48 by the sub CPU 37, and data received from the I / O unit 11 side is set in the reception buffer 49. When a communication start signal is given by the communication start register 44, the transmission / reception sequencer 47 performs communication processing for transmitting and receiving data via the buffers 48 and 49 in synchronization with the communication clock signal. A completion flag 45 is set.
One of the input terminals of the AND gate 50 is supplied with a communication completion flag set signal from the communication sequencer 47, and the other input terminal (negative logic) is supplied with mode setting data from the communication mode setting register 43. The output signal of the AND gate 50 is output to the communication start register 44 as a clear signal.

図11は、通信制御部38の動作(受信処理)を示すタイミングチャートであり、(a)は通常動作モードの場合、(b)は自動リフレッシュモードの場合を示す。また、図中に示す丸数字は、図10に示す各部の信号に対応している。サブCPU37が、通信モード設定レジスタ43にデータ「0」をセットすると通常動作モード,データ「1」をセットすると自動リフレッシュモードとなる。   FIG. 11 is a timing chart showing the operation (reception processing) of the communication control unit 38, where (a) shows the case of the normal operation mode and (b) shows the case of the automatic refresh mode. Further, the circled numbers shown in the figure correspond to the signals of the respective parts shown in FIG. When the sub CPU 37 sets the data “0” in the communication mode setting register 43, the normal operation mode is set, and when the data “1” is set, the automatic refresh mode is set.

図11(a)の通常動作モードの場合は、サブCPU37が、通信開始レジスタ44に対して通信開始を指示するデータ「1」を書き込むと、送受信シーケンサ47が起動されて通信処理が開始され、「通信中」にデータの受信処理が行われる。そして、通信が終了すると、送受信シーケンサ47が通信完了フラグ45をセットし、その際のセット信号の出力によって通信開始レジスタ44がクリアされる。それと同時に、受信バッファ49のデータが更新される。   In the case of the normal operation mode of FIG. 11A, when the sub CPU 37 writes data “1” instructing the communication start to the communication start register 44, the transmission / reception sequencer 47 is activated to start communication processing. Data reception processing is performed during “communication”. When the communication is completed, the transmission / reception sequencer 47 sets the communication completion flag 45, and the communication start register 44 is cleared by the output of the set signal at that time. At the same time, the data in the reception buffer 49 is updated.

一方、図11(b)の自動リフレッシュモードの場合は、サブCPU37が通信開始レジスタ44に通信開始の指示データを書き込むと、上記と同様にして通信処理が開始される。そして、通信が終了すると、送受信シーケンサ47が通信完了フラグ45をセットするが、ANDゲート50により阻止されて通信開始レジスタ44はクリアされない。したがって、通信シーケンサ47は、直ちに次の通信処理を開始するので、受信バッファ49のデータは周期的に更新(自動リフレッシュ)される。   On the other hand, in the automatic refresh mode of FIG. 11B, when the sub CPU 37 writes the communication start instruction data in the communication start register 44, the communication process is started in the same manner as described above. When the communication is completed, the transmission / reception sequencer 47 sets the communication completion flag 45, but is blocked by the AND gate 50 and the communication start register 44 is not cleared. Accordingly, since the communication sequencer 47 immediately starts the next communication process, the data in the reception buffer 49 is periodically updated (automatic refresh).

次に、第2実施例の作用について図12乃至図15も参照して説明する。図12乃至図15は、第1実施例の図3,図5乃至図7相当図である。
<間欠動作モードへの移行処理>
図13(a)において、メインCPU35は、リセットが解除されると、ステップM1,M2に続いてステップM4を実行し、「YES」と判断すると間欠動作への移行が可能であることをサブマイコン33側に通知して(ステップM21)電源遮断待ち状態となる(ステップM22)。
Next, the operation of the second embodiment will be described with reference to FIGS. 12 to 15 are diagrams corresponding to FIGS. 3 and 5 to 7 of the first embodiment.
<Transition process to intermittent operation mode>
In FIG. 13A, when the reset is released, the main CPU 35 executes step M4 following steps M1 and M2, and if it is determined “YES”, the sub-microcomputer indicates that the transition to the intermittent operation is possible. 33 is notified (step M21), and a power-off waiting state is entered (step M22).

図13(b)において、サブCPU37は、リセットが解除されてステップS1〜S3を実行すると、メインCPU35からのステップM21による通知を待ち、間欠動作が可能か否かを判断する(ステップS22)。そして、メインCPU35より上記「通知」があると(YES)、電源制御部39内部のレジスタに、メインマイコン32側に対する電源供給を停止させるためのデータを書き込む(ステップS23)。それから、第1実施例ではメインCPU4が行った、ステップM5〜M9に相当する処理を実行する(ステップS24〜S28)。この時、サブCPU37は、セレクタ41をサブクロック信号側に切り替えて記憶素子部34に供給する。   In FIG. 13B, when the reset is released and the steps S1 to S3 are executed, the sub CPU 37 waits for a notification in step M21 from the main CPU 35 and determines whether or not an intermittent operation is possible (step S22). Then, when the “notification” is received from the main CPU 35 (YES), data for stopping the power supply to the main microcomputer 32 side is written in a register in the power control unit 39 (step S23). Then, in the first embodiment, processing corresponding to steps M5 to M9 performed by the main CPU 4 is executed (steps S24 to S28). At this time, the sub CPU 37 switches the selector 41 to the sub clock signal side and supplies it to the storage element unit 34.

すなわち、サブCPU37は、メインマイコン32に対する電源供給が停止されている間に、記憶素子部34の不揮発性記憶素子6,揮発性記憶素子7にアクセスし、揮発性記憶素子7に記憶されている制御情報を不揮発性記憶素子6に転送して記憶させる。そして、ステップS28を実行すると、揮発性記憶素子7より、メインマイコン32の動作が停止している間(間欠動作モード中)に行うI/O制御に使用する制御情報を、サブマイコン33側の揮発性記憶素子40にコピーする(ステップS29)。   That is, the sub CPU 37 accesses the nonvolatile memory element 6 and the volatile memory element 7 of the memory element unit 34 while the power supply to the main microcomputer 32 is stopped, and is stored in the volatile memory element 7. Control information is transferred to and stored in the nonvolatile memory element 6. When step S28 is executed, control information used for I / O control from the volatile memory element 7 while the operation of the main microcomputer 32 is stopped (during the intermittent operation mode) is sent to the sub-microcomputer 33 side. Copying to the volatile storage element 40 (step S29).

それから、サブCPU37は、通信制御部38のレジスタ42,43に書き込みを行い、通信速度を「低速」に設定すると共に自動リフレッシュモードを設定すると(ステップS30)、電源制御部39の、記憶素子部34に対する電源供給を遮断するためのレジスタに書き込みを行い(ステップS31)、自身をスリープモード(間欠動作モード)に設定する(ステップS8)。   Then, the sub CPU 37 writes in the registers 42 and 43 of the communication control unit 38, sets the communication speed to “low speed” and sets the automatic refresh mode (step S30). Write to the register for shutting off the power supply to 34 (step S31), and set itself to the sleep mode (intermittent operation mode) (step S8).

<間欠動作モード中におけるサブマイコン33の処理>
図14において、サブCPU37は、ステップS11〜S17を同様に実行する(但し図3に対応するケースのため、ステップS14を除く)。そして、ステップS15,S16の何れかで「YES」と判断すると、電源制御部39内部のレジスタに、記憶素子部34に対する電源供給を再開させるためのデータを書き込んで(ステップS32)電源復帰動作→通常動作モードに移行する。
尚、サブCPU37が間欠動作モードで動作している期間においても、通信制御部38にはサブクロック信号が供給され続けており、図11(b)に示す自動リフレッシュモードで通信処理が行われ、受信データが周期的にオーバーライトされている。
<Processing of sub-microcomputer 33 in intermittent operation mode>
In FIG. 14, the sub CPU 37 executes steps S11 to S17 in the same manner (however, because of the case corresponding to FIG. 3, it excludes step S14). If “YES” is determined in any one of steps S15 and S16, data for resuming the power supply to the storage element unit 34 is written in the register inside the power control unit 39 (step S32). Transition to normal operation mode.
Even during the period in which the sub CPU 37 operates in the intermittent operation mode, the sub clock signal is continuously supplied to the communication control unit 38, and communication processing is performed in the automatic refresh mode shown in FIG. Received data is periodically overwritten.

<通常動作モードへの移行処理>
図15(a)において、メインCPU35は、ステップM13の初期化処理を行うだけである。一方、図15(b)において、サブCPU37は、通信制御部38の通信速度を高速側に設定すると共に、通常動作モードに設定すると(ステップS33)、第1実施例ではメインCPU4が行った、ステップM11〜M16に相当する処理を実行する(ステップS34〜S39)。
<Transition to normal operation mode>
In FIG. 15A, the main CPU 35 only performs the initialization process of step M13. On the other hand, in FIG. 15B, when the sub CPU 37 sets the communication speed of the communication control unit 38 to the high speed side and sets to the normal operation mode (step S33), the main CPU 4 performs in the first embodiment. Processing corresponding to steps M11 to M16 is executed (steps S34 to S39).

すなわち、記憶素子部34には電源が供給されているので、サブCPU37は、不揮発性記憶素子6に記憶させた制御情報を揮発性記憶素子7に書き戻す。そして、ステップS39を実行すると、揮発性記憶素子40より、間欠動作モード中のI/O制御に使用した制御情報を、揮発性記憶素子7にコピーする(ステップS40)。それから、電源制御部39内部のレジスタに、メインマイコン32に対する電源供給を再開させるためのデータを書き込んで(ステップS41)通常動作モードに移行する。尚、ステップS41の事項前に、セレクタ41をメインクロック信号側に切り替える。   That is, since power is supplied to the storage element unit 34, the sub CPU 37 writes back the control information stored in the nonvolatile storage element 6 to the volatile storage element 7. When step S39 is executed, the control information used for the I / O control during the intermittent operation mode is copied from the volatile memory element 40 to the volatile memory element 7 (step S40). Then, data for resuming the power supply to the main microcomputer 32 is written in the register in the power control unit 39 (step S41), and the mode is shifted to the normal operation mode. In addition, before the matter of step S41, the selector 41 is switched to the main clock signal side.

ここで、図12(i)には、上述した一連の処理を行う場合におけるマイコンシステム31の電流消費状態の変化を示している。システム34全体が通常モードで動作している期間(1)及び(6)では電流消費が最大となっており、その内訳は、
・(A)メインマイコン32の動作電流及びリーク電流
・(B)記憶素子部34の動作電流及びリーク電流
・(C)サブマイコン33の動作電流及びリーク電流
となっている。
Here, FIG. 12I shows a change in the current consumption state of the microcomputer system 31 when the above-described series of processing is performed. During periods (1) and (6) when the entire system 34 is operating in the normal mode, the current consumption is maximum, and the breakdown is as follows:
(A) Operating current and leakage current of main microcomputer 32 (B) Operating current and leakage current of storage element section 34 (C) Operating current and leakage current of sub-microcomputer 33

通常モードから間欠動作モードに移行する過程では、先ずメインマイコン32の電源が遮断されるため、期間(2)では(B),(C)の和となる。そして、間欠動作モードに移行した期間(3)では記憶素子部34の電源が遮断されて(C)のみとなり、サブマイコン33内でサブクロック信号の供給が停止されている期間はサブマイコン33のリーク電流のみとなり、電流消費は最小となる。
間欠動作モードから通常動作モードに移行する過程では、先ずサブCPU37が連続モードで動作するため期間(4)では(C)となり、サブCPU37が各記憶素子6,7,40間のデータ転送を行う期間(5)では(B),(C)の和となる。そして、通常動作モードに復帰した期間(6)では(A)〜(C)の和となる。
In the process of shifting from the normal mode to the intermittent operation mode, the power source of the main microcomputer 32 is first shut off, so that the period (2) is the sum of (B) and (C). In the period (3) when the operation mode is shifted to the intermittent operation mode, the power supply to the memory element unit 34 is cut off and only the (C) is reached. The period in which the sub clock signal supply is stopped in the sub microcomputer 33 is Only leakage current is obtained, and current consumption is minimized.
In the process of shifting from the intermittent operation mode to the normal operation mode, first, since the sub CPU 37 operates in the continuous mode, the period (4) becomes (C), and the sub CPU 37 performs data transfer between the storage elements 6, 7, and 40. In the period (5), the sum of (B) and (C) is obtained. In the period (6) when the normal operation mode is restored, the sum of (A) to (C) is obtained.

以上のように第2実施例によれば、メインCPU35は、自身の動作停止条件が成立したと判断するとサブCPU37に動作停止通知を行い、サブCPU37は、その通知を認識するとメインマイコン32への電源供給を停止させ、その時点で揮発性記憶素子7に記憶されている制御情報を不揮発性記憶素子6に書き込んで記憶させると共に、メインマイコン32の電源供給停止期間に使用するI/O制御情報を、サブマイコン33側の揮発性記憶素子41に書き込んで記憶させてから記憶素子部34に対する電源供給を停止させる。それから、サブ発振回路21を間欠モードに設定し、サブクロック信号が供給されている期間にメインマイコン33の動作開始条件が成立したか否かを判断する。   As described above, according to the second embodiment, when the main CPU 35 determines that its own operation stop condition is satisfied, the main CPU 35 sends an operation stop notification to the sub CPU 37. When the sub CPU 37 recognizes the notification, the main CPU 35 notifies the main microcomputer 32. The power supply is stopped, and the control information stored in the volatile storage element 7 at that time is written and stored in the nonvolatile storage element 6, and the I / O control information used during the power supply stop period of the main microcomputer 32 is stored. Is written and stored in the volatile storage element 41 on the sub-microcomputer 33 side, and then the power supply to the storage element unit 34 is stopped. Then, the sub oscillation circuit 21 is set to the intermittent mode, and it is determined whether or not the operation start condition of the main microcomputer 33 is satisfied during the period when the sub clock signal is supplied.

そして、サブCPU37は、動作開始条件が成立するとサブ発振回路21を連続モードに切り替えて記憶素子部34への電源供給を再開させ、不揮発性記憶素子6に記憶されている制御情報を揮発性記憶素子7に書き戻すと共に、サブ側の揮発性記憶素子41に記憶されているメインマイコン32の電源供給停止期間に使用したI/O制御情報も揮発性記憶素子7に書き戻してからメインマイコン32への電源供給を再開させ、メインCPU33は、電源供給が再開されて起動すると制御情報に基づく処理を実行する。   Then, when the operation start condition is satisfied, the sub CPU 37 switches the sub oscillation circuit 21 to the continuous mode, restarts the power supply to the storage element unit 34, and stores the control information stored in the nonvolatile storage element 6 as a volatile memory. The I / O control information used during the power supply stop period of the main microcomputer 32 stored in the sub volatile storage element 41 is also written back to the volatile storage element 7 after being written back to the element 7. When the power supply is resumed, the main CPU 33 executes processing based on the control information when the power supply is resumed and started.

したがって、第1実施例ではメインCPU4が行っていた揮発性記憶素子7−不揮発性記憶素子6間のデータ転送をサブCPU37が行うので、メインマイコン32への電源供給をより早く停止させることができる。この場合、不揮発性記憶素子6を、データの読み書きに要する時間が比較的長いフラッシュメモリとするので、そのデータ転送を、消費電力が比較的小さいサブマイコン33に行わせて、電力消費を抑制することができる。   Therefore, since the sub CPU 37 performs the data transfer between the volatile memory element 7 and the nonvolatile memory element 6 performed by the main CPU 4 in the first embodiment, the power supply to the main microcomputer 32 can be stopped earlier. . In this case, since the nonvolatile memory element 6 is a flash memory that takes a relatively long time to read and write data, the data transfer is performed by the sub-microcomputer 33 with relatively low power consumption, thereby suppressing power consumption. be able to.

また、サブCPU37は、不揮発性記憶素子6に制御情報を全て書き込むと、「書込み完了情報」も併せて書き込み、電源供給が再開されて起動した場合に、不揮発性記憶素子6に「書込み完了情報」が記憶されていない場合は、制御情報を読み出すことなく初期化を実行するので、第1実施例と同様の効果が得られる。
更に、通信制御部38は、メインマイコン32に対する電源供給が停止されており、サブCPU37が間欠動作モードで動作している間に、I/O制御部11に記憶されている制御情報を周期的に受信するので、メインCPU35が起動した場合は、その情報を取得すれば直ちに最新のI/O制御情報を取得できる。
Further, when all the control information is written in the nonvolatile memory element 6, the sub CPU 37 also writes “write completion information” together. When the power supply is restarted and activated, the sub CPU 37 stores “write completion information” in the nonvolatile memory element 6. "Is not stored, the initialization is executed without reading out the control information, so the same effect as in the first embodiment can be obtained.
Further, the communication control unit 38 periodically supplies control information stored in the I / O control unit 11 while the power supply to the main microcomputer 32 is stopped and the sub CPU 37 operates in the intermittent operation mode. Therefore, when the main CPU 35 is activated, the latest I / O control information can be acquired immediately if the information is acquired.

本発明は上記し且つ図面に記載した実施例にのみ限定されるものではなく、以下のような変形または拡張が可能である。
メインマイコン2について、構成要素の少なくとも一部に対する電源供給を制御するようにしても良い。
サブマイコン3側が間欠的に動作する構成は必要に応じて設ければ良く、メインマイコン2の動作が停止している期間は、サブマイコン3は連続的に動作するように構成しても良い。
メインマイコン2とサブマイコン3とで動作用電源電圧が異なっても良い。その場合、電源制御部24に替えて、それぞれに対応する電源電圧を生成するシリーズレギューレータを備え、その動作を制御することでメインマイコン2に対する電源供給を制御しても良い。
The present invention is not limited to the embodiments described above and shown in the drawings, and the following modifications or expansions are possible.
You may make it control the power supply with respect to at least one part of a component about the main microcomputer 2. FIG.
A configuration in which the sub-microcomputer 3 side operates intermittently may be provided as necessary, and the sub-microcomputer 3 may be configured to operate continuously during a period when the operation of the main microcomputer 2 is stopped.
The operation power supply voltage may be different between the main microcomputer 2 and the sub-microcomputer 3. In that case, it replaces with the power supply control part 24, and the series regulator which produces | generates the power supply voltage corresponding to each may be provided, and the power supply with respect to the main microcomputer 2 may be controlled by controlling the operation | movement.

I/O制御部12がマイコンシステムの一部として搭載されている場合には、通信制御部10は不要である。
不揮発性記憶素子6に「書き込み中」を示すデータを格納する処理は、必要に応じて行えば良い。
不揮発性記憶素子6には、その他、EEPROM,FROM(登録商標)などのメモリを用いても良い。
また、メインマイコン2に対する電源供給を停止させる場合に、不揮発性記憶素子6に制御情報を記憶させる処理についても必要に応じて行えば良く、電源供給が再開された場合には、毎回ステップM1の「初期化」から処理を開始しても良い。
電源制御部24の入力側にチャージポンプ回路を設け、電源VDDの電圧降下が発生した場合にチャージポンプ回路を動作させて昇圧を行い、メインマイコン2側の処理時間を確保するように構成しても良い。
When the I / O control unit 12 is mounted as a part of the microcomputer system, the communication control unit 10 is not necessary.
The process of storing data indicating “being written” in the nonvolatile memory element 6 may be performed as necessary.
In addition, the nonvolatile memory element 6 may be a memory such as EEPROM or FROM (registered trademark).
Further, when the power supply to the main microcomputer 2 is stopped, the process of storing the control information in the nonvolatile memory element 6 may be performed as necessary. When the power supply is resumed, the process of step M1 is performed each time. Processing may be started from “initialization”.
A charge pump circuit is provided on the input side of the power supply control unit 24, and when the voltage drop of the power supply VDD occurs, the charge pump circuit is operated to boost the voltage and secure the processing time on the main microcomputer 2 side. Also good.

電源電圧の低下を検出した場合に対応する処理は、必要に応じて行えば良い。また、電源電圧の低下検出のみを、動作停止条件としても良い。
マイコンシステム1とI/O部11との間の通信は、半二重シリアル通信でも良い。
第2実施例において、通信制御部38の自動リフレッシュ処理は、必要に応じて行えば良い。
また、第2実施例において、間欠動作モードへの移行処理,通常動作モードへの移行処理の何れか一方を、メインCPU35が行うようにしても良い。
車載機器の電子制御を行うものに限ることなく、低消費電力化を図る必要があるアプリケーションについて広く適用することができる。
The processing corresponding to the case where a drop in the power supply voltage is detected may be performed as necessary. Further, only the detection of the power supply voltage drop may be set as the operation stop condition.
Communication between the microcomputer system 1 and the I / O unit 11 may be half-duplex serial communication.
In the second embodiment, the automatic refresh process of the communication control unit 38 may be performed as necessary.
In the second embodiment, the main CPU 35 may perform either the transition process to the intermittent operation mode or the transition process to the normal operation mode.
The present invention can be widely applied to applications that require low power consumption without being limited to those that perform electronic control of in-vehicle devices.

本発明の第1実施例であり、マイクロコンピュータシステムの構成を概略的に示す機能ブロック図1 is a functional block diagram schematically showing a configuration of a microcomputer system according to a first embodiment of the present invention. サブマイコンのより詳細な構成を示す図Diagram showing the detailed configuration of the sub-microcomputer 電源正常時においてメインマイコンに対する電源供給を停止させた後、電源供給を再開させる場合の処理を示すタイミングチャートTiming chart showing the processing when the power supply is resumed after stopping the power supply to the main microcomputer when the power is normal 電源電圧の低下を検出した場合の図3相当図3 equivalent diagram when a drop in power supply voltage is detected メインマイコンに対する電源供給を停止させる場合の(a)メインマイコン側,(b)サブマイコン側の処理を示すフローチャートFlowchart showing processing on (a) main microcomputer side and (b) sub-microcomputer side when power supply to the main microcomputer is stopped サブマイコンが間欠的に動作する場合の処理を示すフローチャートFlow chart showing processing when sub-microcomputer operates intermittently メインマイコンに対する電源供給を再開させる場合の図5相当図Figure corresponding to Fig. 5 when power supply to the main microcomputer is resumed 本発明の第2実施例を示す図1相当図FIG. 1 equivalent view showing a second embodiment of the present invention. 図2相当図2 equivalent diagram 通信制御部の構成を示す機能ブロック図Functional block diagram showing the configuration of the communication controller 通信制御部の動作を示すタイミングチャートで、(a)は通常動作モードの場合、(b)は自動リフレッシュモードの場合を示す図FIG. 4 is a timing chart showing the operation of the communication control unit, where (a) is a normal operation mode and (b) is an automatic refresh mode. 図3相当図3 equivalent figure 図5相当図Figure equivalent to FIG. 図6相当図6 equivalent diagram 図7相当図7 equivalent diagram

符号の説明Explanation of symbols

図面中、1はマイクロコンピュータシステム、2はメインマイクロコンピュータ(メインCPU部)、3はサブマイクロコンピュータ(サブCPU部)、4はメインCPU、6はメイン不揮発性記憶素子、7はメイン揮発性記憶素子、8はサブCPU、9はサブクロック部(サブ発振回路)、10は通信制御部、12はI/O制御部、24は電源制御部(電源供給制御回路)、31はマイクロコンピュータシステム、32はメインマイクロコンピュータ(メインCPU部)、33はサブマイクロコンピュータ(サブCPU部)、35はメインCPU、6は不揮発性記憶素子、38は通信制御部、39は電源制御部(電源供給制御回路)、41はサブ揮発性記憶素子を示す。   In the drawings, 1 is a microcomputer system, 2 is a main microcomputer (main CPU section), 3 is a sub microcomputer (sub CPU section), 4 is a main CPU, 6 is a main nonvolatile memory element, and 7 is a main volatile memory. Elements, 8 is a sub CPU, 9 is a sub clock unit (sub oscillation circuit), 10 is a communication control unit, 12 is an I / O control unit, 24 is a power supply control unit (power supply control circuit), 31 is a microcomputer system, 32 is a main microcomputer (main CPU section), 33 is a sub microcomputer (sub CPU section), 35 is a main CPU, 6 is a nonvolatile memory element, 38 is a communication control section, 39 is a power control section (power supply control circuit) ) And 41 are sub-volatile memory elements.

Claims (13)

メインクロック信号が供給されて動作するメインCPUを含んで構成されるメインCPU部と、
サブCPUを含み、前記メインCPU部よりも少ない回路ゲート数で構成されるサブCPU部と、
前記サブCPU部に供給され、前記メインクロック信号よりも低い周波数のサブクロック信号を発振出力すると共に、前記発振出力を連続的に行う連続モードと間欠的に行う間欠モードとに切り替え可能に構成されるサブ発振回路と、
前記サブCPU部に搭載され、前記メインCPU部の少なくとも一部に対する電源の供給を制御する電源供給制御回路とを備え、
前記メインCPUは、自身の動作停止条件が成立したと判断すると、前記サブCPUに対して動作停止通知を行い、
前記サブCPUは、
前記動作停止通知を認識すると、前記メインCPU部に対する電源供給を停止させると共に、前記サブ発振回路を間欠モードに設定し、
前記サブクロック信号が供給されている期間に、前記メインCPU部の動作開始条件が成立したか否かを判断し、
前記動作開始条件が成立すると、前記サブ発振回路を連続モードに切り替えて、前記メインCPU部に対する電源供給を再開させることを特徴とするマイクロコンピュータシステム。
A main CPU unit configured to include a main CPU that operates by being supplied with a main clock signal;
A sub CPU section including a sub CPU and having a smaller number of circuit gates than the main CPU section;
The sub CPU is supplied to the sub CPU unit and oscillates and outputs a sub clock signal having a frequency lower than that of the main clock signal, and can be switched between a continuous mode in which the oscillation output is continuously performed and an intermittent mode in which the oscillation is intermittently performed. A sub oscillation circuit,
A power supply control circuit mounted on the sub CPU unit and controlling power supply to at least a part of the main CPU unit;
When the main CPU determines that its own operation stop condition is satisfied, it performs an operation stop notification to the sub CPU.
The sub CPU is
When recognizing the operation stop notification, the power supply to the main CPU unit is stopped, and the sub oscillation circuit is set to the intermittent mode,
Determining whether an operation start condition of the main CPU unit is satisfied during a period in which the sub clock signal is supplied;
When the operation start condition is satisfied, the microcomputer system switches the sub oscillation circuit to a continuous mode and resumes power supply to the main CPU unit.
メインクロック信号が供給されて動作するメインCPUを含んで構成されるメインCPU部と、
前記メインCPU部に搭載されるメイン不揮発性記憶素子と、
前記メインCPU部に搭載され、前記メインCPUにより制御情報が記憶されるメイン揮発性記憶素子と、
サブCPUを含み、前記メインCPU部よりも少ない回路ゲート数で構成されるサブCPU部と、
前記サブCPU部に供給され、前記メインクロック信号よりも低い周波数のサブクロック信号を発振出力すると共に、前記発振出力を連続的に行う連続モードと間欠的に行う間欠モードとに切り替え可能に構成されるサブ発振回路と、
前記サブCPU部に搭載され、前記メインCPU部の少なくとも一部に対する電源の供給を制御する電源供給制御回路とを備え、
前記メインCPUは、自身の動作停止条件が成立したと判断すると、その時点で前記メイン揮発性記憶素子に記憶されている制御情報を前記メイン不揮発性記憶素子に書き込んで記憶させてから、前記サブCPUに対して動作停止通知を行い、
前記サブCPUは、
前記動作停止通知を認識すると、前記メインCPU部に対する電源供給を停止させると共に、前記サブ発振回路を間欠モードに設定し、前記サブクロック信号が供給されている期間に、前記メインCPU部の動作開始条件が成立したか否かを判断し、
前記動作開始条件が成立すると、前記サブ発振回路を連続モードに切り替えて、前記メインCPU部に対する電源供給を再開させ、
前記メインCPUは、電源供給が再開されて起動すると、前記メイン不揮発性記憶素子に記憶されている制御情報を前記メイン揮発性記憶素子に書き戻して、前記制御情報に基づく処理を実行することを特徴とするマイクロコンピュータシステム。
A main CPU unit configured to include a main CPU that operates by being supplied with a main clock signal;
A main nonvolatile memory element mounted on the main CPU unit;
A main volatile storage element mounted on the main CPU unit and storing control information by the main CPU;
A sub CPU section including a sub CPU and having a smaller number of circuit gates than the main CPU section;
The sub CPU is supplied to the sub CPU unit and oscillates and outputs a sub clock signal having a frequency lower than that of the main clock signal, and can be switched between a continuous mode in which the oscillation output is continuously performed and an intermittent mode in which the oscillation is intermittently performed. A sub oscillation circuit,
A power supply control circuit mounted on the sub CPU unit and controlling power supply to at least a part of the main CPU unit;
When the main CPU determines that its own operation stop condition is satisfied, the main CPU writes the control information stored in the main volatile storage element at that time to the main nonvolatile storage element, and then stores the control information. Notification of operation stop to the CPU
The sub CPU is
When the operation stop notification is recognized, the power supply to the main CPU unit is stopped, the sub oscillation circuit is set to the intermittent mode, and the operation of the main CPU unit is started during the period when the sub clock signal is supplied. Determine if the condition is met,
When the operation start condition is satisfied, the sub oscillation circuit is switched to the continuous mode, the power supply to the main CPU unit is resumed,
When the main CPU restarts when power supply is resumed, the main CPU writes the control information stored in the main nonvolatile memory element back to the main volatile memory element, and executes processing based on the control information. A microcomputer system that is characterized.
メインクロック信号が供給されて動作するメインCPUを含んで構成されるメインCPU部と、
サブCPUを含み、前記メインCPU部よりも少ない回路ゲート数で構成されるサブCPU部と、
前記サブCPU部に供給され、前記メインクロック信号よりも低い周波数のサブクロック信号を発振出力すると共に、前記発振出力を連続的に行う連続モードと間欠的に行う間欠モードとに切り替え可能に構成されるサブ発振回路と、
前記サブCPU部に搭載され、前記メインCPU部の少なくとも一部に対する電源の供給を制御する電源供給制御回路と、
前記メインCPUによって制御情報が記憶され、前記サブCPUによるアクセスも可能であるメイン揮発性記憶素子と、
前記メインCPUと前記サブCPUとの双方によるアクセスが可能であるメイン不揮発性記憶素子と、
前記サブCPUによって制御情報が記憶され、前記メイン揮発性記憶素子よりも小容量のサブ揮発性記憶素子とを備え、
前記メインCPUは、自身の動作停止条件が成立したと判断すると、前記サブCPUに対して動作停止通知を行い、
前記サブCPUは、
前記動作停止通知を認識すると、前記メインCPU部に対する電源供給を停止させ、その時点で前記メイン揮発性記憶素子に記憶されている制御情報を前記メイン不揮発性記憶素子に書き込んで記憶させると共に、前記メインCPU部に対する電源供給が停止されている間に使用するI/O制御情報を前記サブ揮発性記憶素子に書き込んで記憶させてから、前記各メイン記憶素子に対する電源供給を停止させると共に、前記サブ発振回路を間欠モードに設定し、前記サブクロック信号が供給されている期間に前記メインCPU部の動作開始条件が成立したか否かを判断し、
前記動作開始条件が成立すると、前記サブ発振回路を連続モードに切り替えて、前記各メイン記憶素子に対する電源供給を再開させ、前記メイン不揮発性記憶素子に記憶されている制御情報を前記メイン揮発性記憶素子に書き戻すと共に、前記サブ揮発性記憶素子に記憶されている、前記メインCPU部に対する電源供給が停止されている間に使用したI/O制御情報を前記メイン揮発性記憶素子に書き戻してから前記メインCPU部に対する電源供給を再開させ、
前記メインCPUは、電源供給が再開されて起動すると、前記制御情報に基づく処理を実行することを特徴とするマイクロコンピュータシステム。
A main CPU unit configured to include a main CPU that operates by being supplied with a main clock signal;
A sub CPU section including a sub CPU and having a smaller number of circuit gates than the main CPU section;
The sub CPU is supplied to the sub CPU unit and oscillates and outputs a sub clock signal having a frequency lower than that of the main clock signal, and can be switched between a continuous mode in which the oscillation output is continuously performed and an intermittent mode in which the oscillation is intermittently performed. A sub oscillation circuit,
A power supply control circuit that is mounted on the sub CPU unit and controls the supply of power to at least a part of the main CPU unit;
A main volatile storage element in which control information is stored by the main CPU and is accessible by the sub CPU;
A main nonvolatile memory element accessible by both the main CPU and the sub CPU;
Control information is stored by the sub CPU, and includes a sub volatile memory element having a smaller capacity than the main volatile memory element,
When the main CPU determines that its own operation stop condition is satisfied, it performs an operation stop notification to the sub CPU.
The sub CPU is
When recognizing the operation stop notification, the power supply to the main CPU unit is stopped, and the control information stored in the main volatile memory element at that time is written and stored in the main nonvolatile memory element, and The I / O control information to be used is written and stored in the sub volatile storage element while the power supply to the main CPU is stopped, and then the power supply to each main storage element is stopped, and the sub Set the oscillation circuit to intermittent mode, determine whether or not the operation start condition of the main CPU unit is satisfied during the period when the sub clock signal is supplied,
When the operation start condition is satisfied, the sub oscillation circuit is switched to a continuous mode, power supply to each main storage element is resumed, and control information stored in the main nonvolatile storage element is stored in the main volatile storage In addition to writing back to the element, I / O control information stored in the sub volatile storage element and used while the power supply to the main CPU unit is stopped is written back to the main volatile storage element. To resume power supply to the main CPU unit,
The main CPU executes processing based on the control information when power supply is resumed and started.
メインクロック信号が供給されて動作するメインCPUを含んで構成されるメインCPU部と、
サブCPUを含み、前記メインCPU部よりも少ない回路ゲート数で構成されるサブCPU部と、
前記サブCPU部に供給され、前記メインクロック信号よりも低い周波数のサブクロック信号を発振出力するサブ発振回路と、
前記サブCPU部に搭載され、前記メインCPU部の少なくとも一部に対する電源の供給を制御する電源供給制御回路と、
前記メインCPUによって制御情報が記憶され、前記サブCPUによるアクセスも可能であるメイン揮発性記憶素子と、
前記メインCPUと前記サブCPUとの双方によるアクセスが可能であるメイン不揮発性記憶素子と、
前記サブCPUによって制御情報が記憶され、前記メイン揮発性記憶素子よりも小容量のサブ揮発性記憶素子とを備え、
前記メインCPUは、自身の動作停止条件が成立したと判断すると、前記サブCPUに対して動作停止通知を行い、
前記サブCPUは、
前記動作停止通知を認識すると、前記メインCPU部に対する電源供給を停止させ、その時点で前記メイン揮発性記憶素子に記憶されている制御情報を前記メイン不揮発性記憶素子に書き込んで記憶させると共に、前記メインCPU部に対する電源供給が停止されている間に使用するI/O制御情報を前記サブ揮発性記憶素子に書き込んで記憶させてから、前記各メイン記憶素子に対する電源供給を停止させることを特徴とするマイクロコンピュータシステム。
A main CPU unit configured to include a main CPU that operates by being supplied with a main clock signal;
A sub CPU section including a sub CPU and having a smaller number of circuit gates than the main CPU section;
A sub oscillation circuit that is supplied to the sub CPU unit and oscillates and outputs a sub clock signal having a frequency lower than that of the main clock signal;
A power supply control circuit that is mounted on the sub CPU unit and controls the supply of power to at least a part of the main CPU unit;
A main volatile storage element in which control information is stored by the main CPU and is accessible by the sub CPU;
A main nonvolatile memory element accessible by both the main CPU and the sub CPU;
Control information is stored by the sub CPU, and includes a sub volatile memory element having a smaller capacity than the main volatile memory element,
When the main CPU determines that its own operation stop condition is satisfied, it performs an operation stop notification to the sub CPU.
The sub CPU is
When recognizing the operation stop notification, the power supply to the main CPU unit is stopped, and the control information stored in the main volatile memory element at that time is written and stored in the main nonvolatile memory element, and I / O control information to be used is written and stored in the sub volatile storage element while power supply to the main CPU is stopped, and then power supply to each main storage element is stopped. A microcomputer system.
メインクロック信号が供給されて動作するメインCPUを含んで構成されるメインCPU部と、
サブCPUを含み、前記メインCPU部よりも少ない回路ゲート数で構成されるサブCPU部と、
前記サブCPU部に供給され、前記メインクロック信号よりも低い周波数のサブクロック信号を発振出力するサブ発振回路と、
前記サブCPU部に搭載され、前記メインCPU部の少なくとも一部に対する電源の供給を制御する電源供給制御回路と、
前記メインCPUによって制御情報が記憶され、前記サブCPUによるアクセスも可能であるメイン揮発性記憶素子と、
前記メインCPUと前記サブCPUとの双方によるアクセスが可能であるメイン不揮発性記憶素子と、
前記サブCPUによって制御情報が記憶され、前記メイン揮発性記憶素子よりも小容量のサブ揮発性記憶素子とを備え、
前記サブCPUは、前記メインCPU部,及び前記各メイン記憶素子に対する電源供給が停止されている間に前記メインCPU部の動作開始条件が成立したか否かを判断し、
前記動作開始条件が成立すると、前記各メイン記憶素子に対する電源供給を再開させ、前記メイン不揮発性記憶素子に記憶されている制御情報を前記メイン揮発性記憶素子に書き戻すと共に、前記サブ揮発性記憶素子に記憶されている、前記メインCPU部に対する電源供給が停止されている間に使用したI/O制御情報を前記メイン揮発性記憶素子に書き戻してから前記メインCPU部に対する電源供給を再開させ、
前記メインCPUは、電源供給が再開されて起動すると、前記制御情報に基づく処理を実行することを特徴とするマイクロコンピュータシステム。
A main CPU unit configured to include a main CPU that operates by being supplied with a main clock signal;
A sub CPU section including a sub CPU and having a smaller number of circuit gates than the main CPU section;
A sub oscillation circuit that is supplied to the sub CPU unit and oscillates and outputs a sub clock signal having a frequency lower than that of the main clock signal;
A power supply control circuit that is mounted on the sub CPU unit and controls the supply of power to at least a part of the main CPU unit;
A main volatile storage element in which control information is stored by the main CPU and is accessible by the sub CPU;
A main nonvolatile memory element accessible by both the main CPU and the sub CPU;
Control information is stored by the sub CPU, and includes a sub volatile memory element having a smaller capacity than the main volatile memory element,
The sub CPU determines whether an operation start condition of the main CPU unit is satisfied while power supply to the main CPU unit and each main storage element is stopped,
When the operation start condition is satisfied, power supply to each main memory element is resumed, and control information stored in the main nonvolatile memory element is written back to the main volatile memory element, and the sub volatile memory The I / O control information stored in the device and used while the power supply to the main CPU unit is stopped is written back to the main volatile storage device, and then the power supply to the main CPU unit is resumed. ,
The main CPU executes processing based on the control information when power supply is resumed and started.
前記メインCPUは、
前記メイン不揮発性記憶素子に前記制御情報を全て書き込むと、「書込み完了情報」を前記メイン不揮発性記憶素子に併せて書き込み、
電源供給が再開されて起動した場合に、前記メイン不揮発性記憶素子に前記「書込み完了情報」が記憶されていない場合は、前記制御情報を読み出すことなく初期化を実行することを特徴とする請求項2記載のマイクロコンピュータシステム。
The main CPU is
When all the control information is written to the main nonvolatile memory element, “write completion information” is written together with the main nonvolatile memory element,
When the power supply is restarted and started up, if the “write completion information” is not stored in the main nonvolatile memory element, initialization is performed without reading the control information. Item 3. The microcomputer system according to Item 2.
前記サブCPUは、
前記メイン不揮発性記憶素子に前記制御情報を全て書き込むと、「書込み完了情報」を前記メイン不揮発性記憶素子に併せて書き込み、
電源供給が再開されて起動した場合に、前記メイン不揮発性記憶素子に前記「書込み完了情報」が記憶されていない場合は、前記制御情報を読み出すことなく初期化を実行することを特徴とする請求項3乃至5の何れかに記載のマイクロコンピュータシステム。
The sub CPU is
When all the control information is written to the main nonvolatile memory element, “write completion information” is written together with the main nonvolatile memory element,
When the power supply is restarted and started up, if the “write completion information” is not stored in the main nonvolatile memory element, initialization is performed without reading the control information. Item 6. The microcomputer system according to any one of Items 3 to 5.
前記メイン不揮発性記憶素子は、フラッシュメモリであることを特徴とする請求項3乃至5,7の何れかに記載のマイクロコンピュータシステム。   8. The microcomputer system according to claim 3, wherein the main nonvolatile memory element is a flash memory. 前記電源電圧の低下を検出する電圧低下検出回路を備え、
前記メインCPUは、前記電源電圧の低下が検出された場合に、前記動作停止条件が成立したと判断することを特徴とする請求項1乃至8の何れかに記載のマイクロコンピュータシステム。
A voltage drop detection circuit for detecting a drop in the power supply voltage;
9. The microcomputer system according to claim 1, wherein the main CPU determines that the operation stop condition is satisfied when a drop in the power supply voltage is detected.
前記サブCPUは、前記メインCPU部に対する電源供給が停止されている間に、I/O制御を行うことを特徴とする請求項1乃至9の何れかに記載のマイクロコンピュータシステム。   The microcomputer system according to claim 1, wherein the sub CPU performs I / O control while power supply to the main CPU is stopped. 前記サブCPU部に搭載され、外部との入出力を行うためのI/O制御部と通信を行うための通信制御部を備え、
前記サブCPUは、前記メインCPU部に対する電源供給を停止させる場合には、前記通信制御部における通信速度を低速に設定し、前記メインCPU部に電源供給を行っている間は、前記通信速度を高速に設定することを特徴とする請求項10記載のマイクロコンピュータシステム。
A communication control unit for communicating with an I / O control unit mounted on the sub CPU unit for input / output with the outside;
When the sub CPU stops the power supply to the main CPU unit, the communication speed in the communication control unit is set to a low speed, and the communication speed is set while power is supplied to the main CPU unit. 11. The microcomputer system according to claim 10, wherein the microcomputer system is set at high speed.
前記通信制御部は、前記メインCPU部に対する電源供給が停止されている間は、前記I/O制御部に記憶されている制御情報を、周期的に転送して取得することを特徴とする請求項11記載のマイクロコンピュータシステム。   The communication control unit is configured to periodically transfer and acquire control information stored in the I / O control unit while power supply to the main CPU unit is stopped. Item 12. The microcomputer system according to Item 11. 前記サブCPUは、前記メインCPU部に対する電源供給を停止させている期間に、前記通信制御部を介して取得した制御情報に基づいて、前記メインCPU部の動作開始条件が成立したか否かを判断することを特徴とする請求項11又は12記載のマイクロコンピュータシステム。   The sub CPU determines whether or not an operation start condition for the main CPU unit is satisfied based on control information acquired through the communication control unit during a period in which power supply to the main CPU unit is stopped. 13. The microcomputer system according to claim 11 or 12, wherein the determination is made.
JP2008145773A 2007-10-19 2008-06-03 Microcomputer system Expired - Fee Related JP4535170B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008145773A JP4535170B2 (en) 2007-10-19 2008-06-03 Microcomputer system
US12/285,481 US8046615B2 (en) 2007-10-19 2008-10-07 Microcomputer system with reduced power consumption

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2007272256 2007-10-19
JP2008145773A JP4535170B2 (en) 2007-10-19 2008-06-03 Microcomputer system

Publications (2)

Publication Number Publication Date
JP2009116851A true JP2009116851A (en) 2009-05-28
JP4535170B2 JP4535170B2 (en) 2010-09-01

Family

ID=40783888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008145773A Expired - Fee Related JP4535170B2 (en) 2007-10-19 2008-06-03 Microcomputer system

Country Status (1)

Country Link
JP (1) JP4535170B2 (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010061393A (en) * 2008-09-03 2010-03-18 Denso Corp Microcomputer
JP2011057144A (en) * 2009-09-11 2011-03-24 Hitachi Ltd Power supply system for vehicle and communication device
WO2011118487A1 (en) 2010-03-26 2011-09-29 ソニー株式会社 Information processing device and power supply control circuit
JP2012212413A (en) * 2011-03-18 2012-11-01 Denso Corp Signal input circuit
KR20130105480A (en) 2012-03-14 2013-09-25 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device and shift register
DE102013205642A1 (en) 2012-03-29 2013-10-02 Semiconductor Energy Laboratory Co., Ltd. Processor and method for its control
KR20140095428A (en) 2013-01-24 2014-08-01 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
KR20140124795A (en) 2012-01-23 2014-10-27 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
KR20150030177A (en) 2013-09-11 2015-03-19 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Memory device, semiconductor device, and electronic device
US8995218B2 (en) 2012-03-07 2015-03-31 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US9007090B2 (en) 2012-05-01 2015-04-14 Semiconductor Energy Laboratory Co., Ltd. Method of driving semiconductor device
US9104395B2 (en) 2012-05-02 2015-08-11 Semiconductor Energy Laboratory Co., Ltd. Processor and driving method thereof
US9454923B2 (en) 2013-05-17 2016-09-27 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US9705398B2 (en) 2012-05-02 2017-07-11 Semiconductor Energy Laboratory Co., Ltd. Control circuit having signal processing circuit and method for driving the control circuit
JP2017174067A (en) * 2016-03-23 2017-09-28 カシオ計算機株式会社 Electronic apparatus and power management method of electronic apparatus
DE112018008080T5 (en) 2018-10-19 2021-07-29 Mitsubishi Electric Corporation A method of controlling a power supply detection circuit and circuit system
US11714479B2 (en) 2020-06-22 2023-08-01 Seiko Epson Corporation Sensing apparatus and sensing system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6349861A (en) * 1986-08-19 1988-03-02 Fujitsu Ltd Method for processing battery fault
JPH0863405A (en) * 1994-08-23 1996-03-08 Toshiba Mec Kk Controller
JPH09109519A (en) * 1995-10-19 1997-04-28 Ricoh Co Ltd Image forming device
JP2001154763A (en) * 1999-11-30 2001-06-08 Nec Shizuoka Ltd Power saving device for local area network board
JP2002067449A (en) * 2000-08-31 2002-03-05 Ricoh Co Ltd Imaging apparatus having backup means
JP2002202828A (en) * 2000-12-28 2002-07-19 Mitsubishi Electric Corp Clock generating circuit
JP2002202963A (en) * 2000-12-28 2002-07-19 Denso Corp Single chip microcomputer in which output signal can be controlled by timer
JP2006221381A (en) * 2005-02-09 2006-08-24 Sharp Corp Processor system and image forming device provided with this processor system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6349861A (en) * 1986-08-19 1988-03-02 Fujitsu Ltd Method for processing battery fault
JPH0863405A (en) * 1994-08-23 1996-03-08 Toshiba Mec Kk Controller
JPH09109519A (en) * 1995-10-19 1997-04-28 Ricoh Co Ltd Image forming device
JP2001154763A (en) * 1999-11-30 2001-06-08 Nec Shizuoka Ltd Power saving device for local area network board
JP2002067449A (en) * 2000-08-31 2002-03-05 Ricoh Co Ltd Imaging apparatus having backup means
JP2002202828A (en) * 2000-12-28 2002-07-19 Mitsubishi Electric Corp Clock generating circuit
JP2002202963A (en) * 2000-12-28 2002-07-19 Denso Corp Single chip microcomputer in which output signal can be controlled by timer
JP2006221381A (en) * 2005-02-09 2006-08-24 Sharp Corp Processor system and image forming device provided with this processor system

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010061393A (en) * 2008-09-03 2010-03-18 Denso Corp Microcomputer
JP2011057144A (en) * 2009-09-11 2011-03-24 Hitachi Ltd Power supply system for vehicle and communication device
US8700942B2 (en) 2010-03-26 2014-04-15 Sony Corporation Information processing apparatus and power supply control circuit
WO2011118487A1 (en) 2010-03-26 2011-09-29 ソニー株式会社 Information processing device and power supply control circuit
US9261937B2 (en) 2010-03-26 2016-02-16 Sony Corporation Information processing apparatus and power supply control circuit
JP2012212413A (en) * 2011-03-18 2012-11-01 Denso Corp Signal input circuit
US9804645B2 (en) 2012-01-23 2017-10-31 Semiconductor Energy Laboratory Co., Ltd. Systems and methods for individually controlling power supply voltage to circuits in a semiconductor device
KR20200103848A (en) 2012-01-23 2020-09-02 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
KR20140124795A (en) 2012-01-23 2014-10-27 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
US11934243B2 (en) 2012-01-23 2024-03-19 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US11209880B2 (en) 2012-01-23 2021-12-28 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
KR20210111327A (en) 2012-01-23 2021-09-10 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
US9812178B2 (en) 2012-03-07 2017-11-07 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US8995218B2 (en) 2012-03-07 2015-03-31 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US9293174B2 (en) 2012-03-07 2016-03-22 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US9058892B2 (en) 2012-03-14 2015-06-16 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device and shift register
KR20130105480A (en) 2012-03-14 2013-09-25 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device and shift register
KR20130111343A (en) 2012-03-29 2013-10-10 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Processor and method for driving the same
US9372694B2 (en) 2012-03-29 2016-06-21 Semiconductor Energy Laboratory Co., Ltd. Reducing data backup and recovery periods in processors
DE102013205642A1 (en) 2012-03-29 2013-10-02 Semiconductor Energy Laboratory Co., Ltd. Processor and method for its control
US9503087B2 (en) 2012-05-01 2016-11-22 Semiconductor Energy Laboratory Co., Ltd. Method of driving semiconductor device
US9007090B2 (en) 2012-05-01 2015-04-14 Semiconductor Energy Laboratory Co., Ltd. Method of driving semiconductor device
US9705398B2 (en) 2012-05-02 2017-07-11 Semiconductor Energy Laboratory Co., Ltd. Control circuit having signal processing circuit and method for driving the control circuit
US9104395B2 (en) 2012-05-02 2015-08-11 Semiconductor Energy Laboratory Co., Ltd. Processor and driving method thereof
KR20140095428A (en) 2013-01-24 2014-08-01 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Semiconductor device
US10088886B2 (en) 2013-01-24 2018-10-02 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device comprising power gating device
US9454923B2 (en) 2013-05-17 2016-09-27 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device
US10090023B2 (en) 2013-09-11 2018-10-02 Semiconductor Energy Laboratory Co., Ltd. Memory device including memory circuit and selection circuit
KR20150030177A (en) 2013-09-11 2015-03-19 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Memory device, semiconductor device, and electronic device
US10747294B2 (en) 2016-03-23 2020-08-18 Casio Computer Co., Ltd. Electronic apparatus efficiently conducting power supply control
JP2017174067A (en) * 2016-03-23 2017-09-28 カシオ計算機株式会社 Electronic apparatus and power management method of electronic apparatus
DE112018008080T5 (en) 2018-10-19 2021-07-29 Mitsubishi Electric Corporation A method of controlling a power supply detection circuit and circuit system
US11385707B2 (en) 2018-10-19 2022-07-12 Mitsubishi Electric Corporation Power-supply detection-circuit control method and circuit system
US11714479B2 (en) 2020-06-22 2023-08-01 Seiko Epson Corporation Sensing apparatus and sensing system

Also Published As

Publication number Publication date
JP4535170B2 (en) 2010-09-01

Similar Documents

Publication Publication Date Title
JP4535170B2 (en) Microcomputer system
US8046615B2 (en) Microcomputer system with reduced power consumption
JP4621113B2 (en) Semiconductor integrated circuit device
US6407940B1 (en) Memory card device including a clock generator
JP4515093B2 (en) CPU power-down method and apparatus therefor
JP5231047B2 (en) Control device
JP2006107127A (en) Semiconductor integrated circuit device
JP3437174B2 (en) Power saving integrated circuit and control method of power saving integrated circuit
CN111506351A (en) Deep sleep method, wake-up method and sleep and wake-up method for system on chip
JP2006127466A (en) Microcomputer
US20040250147A1 (en) Uninterrupted system operation
US7219248B2 (en) Semiconductor integrated circuit operable to control power supply voltage
JP2004280783A (en) Microcomputer
JP5477401B2 (en) Electronic control unit
JPH11202968A (en) Microcomputer
JP2013151288A (en) Control device
US20100332874A1 (en) Microcomputer and microcomputer system
JP2009265880A (en) Microcomputer, and external register data processing method therefor
US8296592B2 (en) Semiconductor integrated circuit
JP4325261B2 (en) Electronic device and method for controlling semiconductor integrated circuit
JP2004070854A (en) Data processor
JP4383494B1 (en) Data processing system and debugging method
CN114326931B (en) Industrial-grade clock controller, industrial-grade control system, method and electronic device
JP2010067030A (en) Navigation apparatus
JP2007018288A (en) Arithmetic processor and power saving mode changeover method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090306

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091002

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091013

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091119

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100525

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100607

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130625

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140625

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees