JP6762656B2 - CPU standby return structure - Google Patents
CPU standby return structure Download PDFInfo
- Publication number
- JP6762656B2 JP6762656B2 JP2016058499A JP2016058499A JP6762656B2 JP 6762656 B2 JP6762656 B2 JP 6762656B2 JP 2016058499 A JP2016058499 A JP 2016058499A JP 2016058499 A JP2016058499 A JP 2016058499A JP 6762656 B2 JP6762656 B2 JP 6762656B2
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- external
- interrupt
- reset
- predetermined time
- 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.)
- Active
Links
Images
Landscapes
- Power Sources (AREA)
Description
本発明は、スリープ中のCPUを復帰させるCPUスタンバイ復帰構造に関し、特に、外部割込が入らない場合でも復帰を可能にするCPUスタンバイ復帰構造に関する。 The present invention relates to a CPU standby return structure that returns a sleeping CPU, and more particularly to a CPU standby return structure that enables recovery even when an external interrupt is not inserted.
CPUにおいて、ソフトウエアの暴走などによるフリーズを防止するために、WDT(Watchdog Timer)などがオーバーフローした場合にハードウエアリセットするものが知られている(例えば、特許文献1)。一方、例えば、回路規模が大きいCPUでは、設定によって特定の割込端子のみを残し、それ以外の外部入力ブロックを停止(電源を遮断)して消費電力を軽減するスリープ状態(超低消費電力モード)に移行できるものがある。このような超低消費電力モードでは、スリープ中にソフトウエアの暴走が生じることはないという考えの下、リセット端子も停止状態となり、ハードウエアリセットが行えないものがある。 It is known that a CPU resets hardware when a WDT (Watchdog Timer) or the like overflows in order to prevent a freeze due to a runaway of software (for example, Patent Document 1). On the other hand, for example, in a CPU with a large circuit scale, a sleep state (ultra-low power consumption mode) in which only a specific interrupt terminal is left depending on the setting and the other external input blocks are stopped (power is cut off) to reduce power consumption. ) Can be migrated. In such an ultra-low power consumption mode, the reset terminal is also stopped and hardware reset cannot be performed based on the idea that software runaway does not occur during sleep.
そして、通常時においては、図4に示すように、超低消費電力モード中にCPUのWKUP端子に外部割込IR1が入ると、CPUの起動WU1が発生し、CPUによってWDTのカウンタがリセットされる。このため、WDTリセットRS1は発生せず、ハードウエアリセットは行われない。 Then, in the normal state, as shown in FIG. 4, when the external interrupt IR1 is input to the WKUP terminal of the CPU during the ultra-low power consumption mode, the CPU start WU1 is generated, and the WDT counter is reset by the CPU. To. Therefore, the WDT reset RS1 does not occur, and the hardware reset is not performed.
ところで、図4に示すように、何らかの原因でWKUP端子に定期的な外部割込IR2が入らない場合(フリーズした場合)、CPUの起動WU2が発生しないため、WDTのカウンタがリセットされずにWDTがオーバーフローしてWDTリセットRS2が発生する。しかしながら、このときCPUが起動しておらず、リセット端子が機能していないため、ハードウエアリセットされずにフリーズ状態となってしまう。 By the way, as shown in FIG. 4, when the periodic external interrupt IR2 does not enter the WKUP terminal for some reason (when it freezes), the CPU startup WU2 does not occur, so the WDT counter is not reset and the WDT Overflows and WDT reset RS2 occurs. However, at this time, since the CPU is not started and the reset terminal is not functioning, the hardware is not reset and the product freezes.
そして、フリーズ状態になった場合には、従来、電源再投入による再起動が必要であった。すなわち、図5に示すように、超低消費電力モードに移行した状態で(ステップS11)、ソフトウエア制御ができなくなってフリーズした場合(ステップS12)、WDTなどによるハードウエアリセットを行おうとする(ステップS13)が、ハードウエアリセットが行えずにフリーズ状態が継続するため、電源再投入して(ステップS14)、再起動する(ステップS15)必要があった。 Then, when the frozen state is reached, it has conventionally been necessary to restart by turning on the power again. That is, as shown in FIG. 5, in the state of shifting to the ultra-low power consumption mode (step S11), when the software cannot be controlled and freezes (step S12), the hardware is reset by WDT or the like (step S12). In step S13), since the hardware cannot be reset and the frozen state continues, it is necessary to turn on the power again (step S14) and restart (step S15).
しかしながら、再起動のために、通常動作とは別に電源再投入ができる電源回路構成や、制御回路用のバックアップ電源など、専用のハードウエアが必要であり、部品実装面積や部品費用が増加する、という問題があった。 However, for restarting, dedicated hardware such as a power supply circuit configuration that can be turned on again separately from normal operation and a backup power supply for the control circuit is required, which increases the component mounting area and component cost. There was a problem.
そこで本発明は、外部割込が入らない場合でも復帰を可能にするCPUスタンバイ復帰構造を提供することを目的とする。 Therefore, an object of the present invention is to provide a CPU standby return structure that enables return even when an external interrupt is not inserted.
上記課題を解決するために、請求項1に記載の発明は、スリープ状態のCPUに所定の周期で外部割込を入れて、前記CPUを起動させる外部割込部と、外部タイマが第1の所定時間経過した際に、前記CPUをリセットする外部リセット部と、前記CPUに内蔵され、内部タイマが第2の所定時間経過した際に、前記CPUに内部割込を入れて前記CPUを起動させる内部割込部と、を備え、前記CPUは、前記外部割込によって起動すると前記外部タイマと前記内部タイマをリセットし、前記第1の所定時間は、前記第2の所定時間よりも長く設定され、前記第2の所定時間は、前記所定の周期よりも長く設定され、通常時は、前記外部割込によって起動した前記CPUが前記外部タイマと前記内部タイマをリセットし、前記CPUに前記外部割込が入らない場合には、前記第2の所定時間経過時に前記内部割込によって前記CPUが起動し、その後、前記第1の所定時間経過時に前記外部リセット部が前記CPUをリセットする、ことを特徴とするCPUスタンバイ復帰構造である。
In order to solve the above problem, in the invention according to
この発明によれば、通常時には、外部割込部によって所定の周期で、スリープ状態のCPUに外部割込が入ってCPUが起動し、外部タイマと内部タイマがリセットされる。これにより、CPUリセットと内部割込は発生しない。 According to the present invention, in a normal state, an external interrupt unit inserts an external interrupt into a sleeping CPU at a predetermined cycle to start the CPU, and the external timer and the internal timer are reset. As a result, CPU reset and internal interrupt do not occur.
一方、何らかの原因で外部割込部による外部割込が入らない場合、内部タイマが第2の所定時間経過して、内部割込部によってCPUに内部割込が入ってCPUが起動する。その後、外部タイマが第1の所定時間経過して、外部リセット部によってCPUがリセット・復帰される。 On the other hand, when the external interrupt by the external interrupt unit is not inserted for some reason, the internal timer enters the CPU by the internal interrupt unit after the second predetermined time elapses, and the CPU is started. After that, the external timer elapses for the first predetermined time, and the CPU is reset / restored by the external reset unit.
請求項1の発明によれば、何らかの原因でCPUに外部割込が入らない場合でも、内部割込部によってCPUに内部割込が入ってCPUが起動するため、確実にCPUをリセット・復帰することが可能となる。この結果、CPUの電源を再投入する必要がないために、部品実装面積や部品費用の増加を防止・抑制することができる。
According to the invention of
以下、この発明を図示の実施の形態に基づいて説明する。 Hereinafter, the present invention will be described based on the illustrated embodiment.
図1〜図3は、この発明の実施の形態を示し、図2は、この発明の実施の形態に係るCPUスタンバイ復帰構造を示す概略構成ブロック図である。このCPUスタンバイ復帰構造は、スリープ中のCPU1を復帰させる構造であり、図2に示すように、CPU1外に設けられた外部割込部2と外部リセット部3と、CPU1に内蔵された内部割込部4とを備えている。
1 to 3 show an embodiment of the present invention, and FIG. 2 is a schematic block diagram showing a CPU standby return structure according to the embodiment of the present invention. This CPU standby return structure is a structure for returning the
外部割込部2は、スリープ状態のCPU1に所定の周期で外部割込を入れて、CPU1を起動させるものであり、CPU1のWKUP端子11に接続されている。
The
外部リセット部3は、外部タイマを備え、この外部タイマが第1の所定時間経過した際に、CPU1をリセットするものであり、CPU1のリセット端子12に接続されている。ここで、この実施の形態では、外部タイマがWDTで、第1の所定時間経過時にWDTリセットをリセット端子12に入力することで、CPU1がハードウエアリセットされる。
The
内部割込部4は、CPU1の超低消費電力モード(スリープ)中でも動作可能なソフトウエア制御部で、内部タイマを備え、この内部タイマが第2の所定時間経過した際に、CPU1に内部割込を入れてCPU1を起動させるものである。
The
ここで、第1の所定時間は、第2の所定時間よりも長く設定され、第2の所定時間は、所定の周期よりも長く設定されている。つまり、最初に外部割込が発生し、次に内部割込が発生し、その後、CPUリセットが発生するように設定されている。具体的に、この実施の形態では、所定の周期が30秒、第2の所定時間が31秒、第1の所定時間が32秒に設定されている。 Here, the first predetermined time is set longer than the second predetermined time, and the second predetermined time is set longer than the predetermined cycle. That is, it is set so that the external interrupt occurs first, the internal interrupt occurs next, and then the CPU reset occurs. Specifically, in this embodiment, the predetermined cycle is set to 30 seconds, the second predetermined time is set to 31 seconds, and the first predetermined time is set to 32 seconds.
また、CPU1は、外部割込部2からの外部割込によって起動すると、外部リセット部3の外部タイマと内部割込部4の内部タイマをリセットする。
Further, when the
次に、このような構成のCPUスタンバイ復帰構造の作用および、CPUスタンバイ復帰方法について説明する。ここで、WKUP端子11を含む特定の割込端子や内部割込部4を残し、リセット端子12などのそれ以外の外部入力ブロックを停止(電源を遮断)して消費電力を軽減する、超低消費電力モード(スリープ状態の1つ)にCPU1が移行しているものとする。また、超低消費電力モード移行時には、外部割込部2(所定の周期)と外部リセット部3(外部タイマ)と内部割込部4(内部タイマ)がセットされる。さらに、超低消費電力モード中にCPU1が起動すると、すべての外部入力ブロックが機能する。
Next, the operation of the CPU standby return structure having such a configuration and the CPU standby return method will be described. Here, the power consumption is reduced by stopping (cutting off the power supply) other external input blocks such as the
図1に示すように、まず通常時には、所定の周期(30秒周期)で外部割込部2からWKUP端子11に外部割込IR1が入ると、CPU1の起動WU1が発生し、外部リセット部3の外部タイマと内部割込部4の内部タイマがリセットされる。これにより、WDTリセットRS1および内部割込IR11は発生しない。通常時は、このような処理を繰り返す。
As shown in FIG. 1, first, in a normal state, when the external interrupt IR1 is input from the
一方、ソフトウエアの暴走などの何らかの原因で外部割込部2による外部割込IR2が入らない場合、この外部割込IR2によるCPU1の起動WU2が発生しないため、外部リセット部3の外部タイマと内部割込部4の内部タイマがリセットされない。その後、内部タイマが第2の所定時間(31秒)経過すると、内部割込部4によってCPU1に内部割込IR12が入って、CPU1の起動WU3が発生する。これにより、CPU1が超低消費電力モードから通常モードに移行し、リセット端子12の機能が有効となる。
On the other hand, if the external interrupt IR2 by the
続いて、外部タイマが第1の所定時間(32秒)経過すると、外部リセット部3によってWDTリセットRS2がリセット端子12に入力され、CPU1がリセット・復帰される。ここで、CPU1の起動WU3中にWDTリセットRS2が発生するように、CPU1の起動時間や第1の所定時間が設定されている。例えば、内部割込(IR12)によってCPU1が起動した場合には、CPU1の起動(WU3)が継続するようになっている。
Subsequently, when the first predetermined time (32 seconds) elapses in the external timer, the WDT reset RS2 is input to the
このようにして、超低消費電力モード中にソフトウエアの暴走などによるフリーズが生じても、フリーズが解消される。すなわち、図3に示すように、超低消費電力モードに移行して内部タイマが設定された状態で(ステップS1)、ソフトウエア制御ができなくなってフリーズした場合(ステップS2)、内部割込部4によってCPU1に内部割込が発生し、超低消費電力モードが解除される(ステップS3)。続いて、外部リセット部3によってCPU1がハードウエアリセットされて(ステップS4)、再起動する(ステップS5)。
In this way, even if a freeze occurs due to a runaway of software or the like during the ultra-low power consumption mode, the freeze is eliminated. That is, as shown in FIG. 3, when the mode shifts to the ultra-low power consumption mode and the internal timer is set (step S1) and the software cannot be controlled and freezes (step S2), the internal interrupt
以上のように、このCPUスタンバイ復帰構造によれば、超低消費電力モード中に何らかの原因でCPU1に外部割込が入らない場合でも、内部割込部4によってCPU1に内部割込が入ってCPU1が起動するため、確実にCPU1をリセット・復帰することが可能となる。この結果、CPU1の電源を再投入する必要がないために、部品実装面積や部品費用の増加を防止・抑制することができる。
As described above, according to this CPU standby reset structure, even if the
以上、この発明の実施の形態について説明したが、具体的な構成は、上記の実施の形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計の変更等があっても、この発明に含まれる。例えば、上記の実施の形態では、所定の周期を30秒、第2の所定時間を31秒、第1の所定時間を32秒に設定しているが、他の周期、時間に設定してもよい。 Although the embodiment of the present invention has been described above, the specific configuration is not limited to the above-described embodiment, and even if there is a design change or the like within a range that does not deviate from the gist of the present invention. Included in the invention. For example, in the above embodiment, the predetermined cycle is set to 30 seconds, the second predetermined time is set to 31 seconds, and the first predetermined time is set to 32 seconds, but other cycles and times may be set. Good.
1 CPU
11 WKUP端子
12 リセット端子
2 外部割込部
3 外部リセット部
4 内部割込部
1 CPU
11
Claims (1)
外部タイマが第1の所定時間経過した際に、前記CPUをリセットする外部リセット部と、
前記CPUに内蔵され、内部タイマが第2の所定時間経過した際に、前記CPUに内部割込を入れて前記CPUを起動させる内部割込部と、
を備え、前記CPUは、前記外部割込によって起動すると前記外部タイマと前記内部タイマをリセットし、前記第1の所定時間は、前記第2の所定時間よりも長く設定され、前記第2の所定時間は、前記所定の周期よりも長く設定され、
通常時は、前記外部割込によって起動した前記CPUが前記外部タイマと前記内部タイマをリセットし、前記CPUに前記外部割込が入らない場合には、前記第2の所定時間経過時に前記内部割込によって前記CPUが起動し、その後、前記第1の所定時間経過時に前記外部リセット部が前記CPUをリセットする、
ことを特徴とするCPUスタンバイ復帰構造。 An external interrupt unit that activates the CPU by inserting an external interrupt into the sleeping CPU at a predetermined cycle.
An external reset unit that resets the CPU when the first predetermined time elapses with the external timer.
An internal interrupt unit built into the CPU that activates the CPU by inserting an internal interrupt into the CPU when the second predetermined time elapses.
When the CPU is activated by the external interrupt, the external timer and the internal timer are reset, the first predetermined time is set longer than the second predetermined time, and the second predetermined time is set. The time is set longer than the predetermined cycle ,
Normally, the CPU activated by the external interrupt resets the external timer and the internal timer, and if the external interrupt does not enter the CPU, the internal interrupt occurs after the second predetermined time elapses. The CPU is started by the interrupt, and then the external reset unit resets the CPU when the first predetermined time elapses.
A CPU standby return structure characterized by this.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016058499A JP6762656B2 (en) | 2016-03-23 | 2016-03-23 | CPU standby return structure |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016058499A JP6762656B2 (en) | 2016-03-23 | 2016-03-23 | CPU standby return structure |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2017174079A JP2017174079A (en) | 2017-09-28 |
| JP6762656B2 true JP6762656B2 (en) | 2020-09-30 |
Family
ID=59971211
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016058499A Active JP6762656B2 (en) | 2016-03-23 | 2016-03-23 | CPU standby return structure |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6762656B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3690555B2 (en) * | 1997-10-08 | 2005-08-31 | 富士通株式会社 | Time management change device and external interrupt protection device |
| JP2003067220A (en) * | 2001-08-24 | 2003-03-07 | Tokyo Gas Co Ltd | Computer system |
| JP4082211B2 (en) * | 2002-12-27 | 2008-04-30 | 株式会社デンソー | Microcomputer |
| JPWO2011145198A1 (en) * | 2010-05-20 | 2013-07-22 | ルネサスエレクトロニクス株式会社 | Data processor and electronic control unit |
-
2016
- 2016-03-23 JP JP2016058499A patent/JP6762656B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2017174079A (en) | 2017-09-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7975188B2 (en) | Restoration device for BIOS stall failures and method and computer program product for the same | |
| JP6692763B2 (en) | Control device and control program updating method | |
| CN103885847A (en) | Dog feeding method and device based on embedded system | |
| JP4393954B2 (en) | Microcomputer | |
| JP5241450B2 (en) | Semiconductor device and abnormality detection method thereof | |
| JP4000001B2 (en) | Clock control apparatus and clock control method | |
| JP2007323631A (en) | Cpu runaway determination circuit | |
| JP2016110642A (en) | Information processing device, restart execution method and restart execution program | |
| JP6723941B2 (en) | Control device and control program updating method | |
| JP6762656B2 (en) | CPU standby return structure | |
| JP2013125493A (en) | Computer system, standby power reduction method, and program | |
| US7428660B2 (en) | Starting control method, duplex platform system, and information processor | |
| JP2006229509A (en) | Information equipment and device restarting method | |
| JP6765874B2 (en) | Electronic control device | |
| JP2002149437A (en) | How to restart the software | |
| JP5277262B2 (en) | Electronic equipment and system management program | |
| JP5346964B2 (en) | Electronic equipment and system management program | |
| JP4535316B2 (en) | Terminal fail-safe system, terminal fail-safe method, and terminal fail-safe program | |
| JP7478065B2 (en) | Information processing device and information processing method | |
| JP2000172575A (en) | Memory backup system | |
| JP2014203087A (en) | Device and method for reboot of portable terminal | |
| JP2013214210A (en) | Fault tolerant system, method of changing operation frequency of cpu, and program | |
| JP5822870B2 (en) | Information processing device | |
| JP2021077068A (en) | Information processing device and information processing method | |
| JP2011134063A (en) | Watchdog timer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190315 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200302 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200310 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200428 |
|
| 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: 20200908 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200908 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6762656 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |