JPH03136153A - Microcontroller - Google Patents

Microcontroller

Info

Publication number
JPH03136153A
JPH03136153A JP1275427A JP27542789A JPH03136153A JP H03136153 A JPH03136153 A JP H03136153A JP 1275427 A JP1275427 A JP 1275427A JP 27542789 A JP27542789 A JP 27542789A JP H03136153 A JPH03136153 A JP H03136153A
Authority
JP
Japan
Prior art keywords
data
redundant data
redundant
storage means
microcontroller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1275427A
Other languages
Japanese (ja)
Inventor
Shinichiro Ohashi
伸一郎 大橋
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1275427A priority Critical patent/JPH03136153A/en
Publication of JPH03136153A publication Critical patent/JPH03136153A/en
Pending legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To restore a system to the normal operation without the malfunction even at the time of the occurrence of data abnormality during power down by providing means for generation and storage of redundant data and providing a data checking means and a protecting means. CONSTITUTION:When the system is restored from power down, redundant data is read out from a redundant data storage means 7, and a comparing and checking means 8 compares data stored in a data storage means 5 and redundant data with each other to discriminate whether error occurs in this data or not. That is, when redundant data is generated, each data stored in the data storage means 5 is obtained and is compared with redundant data, and data is judged to be normal in the case of coincidence but the occurrence of error is judged in the case of disaccord. If the occurrence of abnormality (error) is judged, the system is reset to repeat the operation from initialization. Thus, the malfunction of the system is prevented to restore the system to the normal operation.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、誤動作防止を図ったマイクロコントローラ
に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcontroller designed to prevent malfunctions.

〔従来の技術〕[Conventional technology]

第3図は従来のマイクロコントローラ(MCU)の−例
を示す機能ブロック図である。図において、1はシステ
ムクロックを供給するクロック発生回路、2はシステム
クロックに同期してシステムの制御を行う制御手段、3
はシステムクロックを停止させて一時的に消費電力を抑
えるシステム停止手段である。また、4はデータの演算
や処理を行うデータ処理手段、5はデータを記憶するデ
ータ記憶手段である。
FIG. 3 is a functional block diagram showing an example of a conventional microcontroller (MCU). In the figure, 1 is a clock generation circuit that supplies a system clock, 2 is a control means that controls the system in synchronization with the system clock, and 3 is a clock generation circuit that supplies a system clock.
is a system stop means that temporarily reduces power consumption by stopping the system clock. Further, 4 is a data processing means for calculating and processing data, and 5 is a data storage means for storing data.

次に動作について説明する。第4図は第3図に示したマ
イクロコントローラの動作を示すフロチャートである。
Next, the operation will be explained. FIG. 4 is a flowchart showing the operation of the microcontroller shown in FIG.

システムが起動されると(ステップ10)、データ処理
手段4はデータの初期設定を行い(ステップ]1)、そ
の後、制御手段2およびデータ処理手段4により順次プ
ログラムが実行される。
When the system is started (step 10), the data processing means 4 initializes data (step 1), and then the control means 2 and the data processing means 4 sequentially execute programs.

一連の処理の途中において、実行すべき処理がなくなっ
た時には、消費電力を抑えるために制御手段2はシステ
ム停止手段3によりシステムクロックを停止させ(ステ
ップ13)、パワーダウンモードに入る。このとき、シ
ステム内で得られているデータはデータ記憶手段5に記
憶された状態となっている。そして、何らかの外的要因
によりプログラムを再開させる必要が生じ、それに応じ
てクロック発生回路1が能動化されてシステムクロック
が供給され始めると、パワーダウンモードから復帰しく
ステップ14)、再び制御手段2およびデータ処理手段
4によって、順次プログラムが実行される(ステップ1
7)。この際には、データ記憶手段5に記憶しておいた
データが利用される。また、プログラムがすべて終了す
ると、動作を終える(ステップ18)。
During a series of processes, when there is no more process to be executed, the control means 2 causes the system stop means 3 to stop the system clock in order to reduce power consumption (step 13), and enters the power down mode. At this time, the data obtained within the system is stored in the data storage means 5. Then, when it becomes necessary to restart the program due to some external factor and the clock generation circuit 1 is activated accordingly and starts supplying the system clock, the control means 2 and The data processing means 4 sequentially executes the program (step 1
7). At this time, data stored in the data storage means 5 is used. Furthermore, when all the programs are completed, the operation ends (step 18).

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来のマイクロコントローラは以上のように構成されて
いるので、パワーダウン中に外来ノイズなどによってデ
ータ記憶手段5内にデータ異常(エラー)があった場合
には、パワーダウンから復帰した後に、誤ったデータを
用いて処理を続行することになり、システムが誤動作す
るという問題点があった。
Conventional microcontrollers are configured as described above, so if there is a data abnormality (error) in the data storage means 5 due to external noise etc. during power down, the erroneous error will be detected after returning from power down. There was a problem that the system would malfunction because the data would be used to continue processing.

この発明は上記のような問題点を解消するためになされ
たもので、パワーダウン後の動作再開時において、シス
テムの誤動作を防止できるマイクロコントローラを得る
ことを目的とする。
The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a microcontroller that can prevent system malfunctions when restarting operation after power down.

〔課題を解決するための手段〕[Means to solve the problem]

この発明では、自己のシステムによるデータ処理が不要
となっている期間において前記システムを一時的に停止
させ、それによって当該システムの消費電力を一時的に
減少させるシステム停止手段を備えたマイクロコントロ
ーラにおいて:前記システム停止手段による前記システ
ムの一時的停止を行う際に、前記マイクロコントローラ
内のデータ記憶手段中に記憶させるべきデータについて
冗長データを作成する冗長データ作成手段と;前記冗長
データを記憶する冗長データ記憶手段と;前記システム
の一時的停止が解除された際に、前記冗長データ記憶手
段から読出された前記冗長データを用いることにより、
前記一時的停止の期間中に前記データ記憶手段内の前記
データにエラーが生じたか否かを調査するデータ調査手
段と;前記データに前記エラーが生じているときには、
前記システムを正常データ状態へと復帰させることによ
り、前記システムを誤動作から保護するシステム保護手
段とを設けている。
In the present invention, a microcontroller is provided with a system stop means for temporarily stopping the system during a period when data processing by the own system is unnecessary, thereby temporarily reducing the power consumption of the system: redundant data creating means for creating redundant data for data to be stored in data storage means in the microcontroller when the system is temporarily stopped by the system stopping means; redundant data for storing the redundant data; storage means; by using the redundant data read from the redundant data storage means when the temporary suspension of the system is released;
data investigating means for investigating whether an error has occurred in the data in the data storage means during the period of temporary suspension; when the error has occurred in the data;
A system protection means is provided for protecting the system from malfunction by restoring the system to a normal data state.

〔作用〕[Effect]

この発明の冗長データ作成手段は、システムの一時的停
止状態すなわちパワーダウンモードに入る前にデータに
冗長性を持たせる。そして、パワーダウンモードからの
復帰後、データ調査手段は、冗長データを利用してデー
タ異常(エラー)の有無を調べる。もし異常があればシ
ステム保護手段によりシステムは誤動作することなく正
常動作に復帰する。
The redundant data creation means of the present invention provides redundancy to data before the system enters a temporary stop state, that is, a power down mode. Then, after returning from the power down mode, the data investigation means uses the redundant data to investigate whether there is any data abnormality (error). If there is an abnormality, the system protection means allows the system to return to normal operation without malfunction.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示すマイクロコントロー
ラの機能ブロック図である。図において、1〜5は第3
図に示した従来のものと実質的に同一のものである。そ
して、6〜9がこの発明の特徴に応じて新たに設けられ
る手段であり、このうち、6は元データに冗長性を持た
せるために冗長部分(冗長データ)を作成する冗長デー
タ作成手段、7はこの冗長データを記憶する冗長データ
記憶手段である。また、8は元データと冗長データの比
較を行うデータ比較調査手段、9はシステムを正常動作
に復帰させるシステム保護手段である。
FIG. 1 is a functional block diagram of a microcontroller showing one embodiment of the present invention. In the figure, 1 to 5 are the third
This is substantially the same as the conventional one shown in the figure. 6 to 9 are means newly provided according to the characteristics of the present invention, and among these, 6 is a redundant data creation means for creating a redundant part (redundant data) in order to provide redundancy to the original data; 7 is redundant data storage means for storing this redundant data. Further, 8 is a data comparison investigation means for comparing original data and redundant data, and 9 is a system protection means for restoring the system to normal operation.

次に動作について説明する。第2図はこの実施例のフロ
ーチャートであり、ステップ10のスタートの後、ステ
ップ11で従来例と同様の初期設定を行い、その後にデ
ータ処理を行う。
Next, the operation will be explained. FIG. 2 is a flowchart of this embodiment. After the start of step 10, initial settings similar to those of the conventional example are performed in step 11, and then data processing is performed.

そして、このシステムにおけるデータ処理が要求されな
くなったときには、データ記憶手段5に記憶しておくべ
き各データに対してチエツク用の冗長データを冗長デー
タ作成手段6によって作成する(ステップ12)。
When data processing in this system is no longer required, redundant data for checking is created for each data to be stored in the data storage means 5 by the redundant data creation means 6 (step 12).

冗長データとしては種々のものが採用可能であるが、た
とえばチエツクサム法による冗長データを利用する。す
なわち、データ記憶手段5に記憶しておくべき各データ
の和の下位8ビツトを冗長データとする。
Although various types of redundant data can be used, for example, redundant data based on the checksum method is used. That is, the lower 8 bits of the sum of each data to be stored in the data storage means 5 are made redundant data.

このようにして作成された冗長データは冗長データ記憶
手段7に記憶させる。そして、従来例と同様のパワーダ
ウン処理を行う(ステップ13)。
The redundant data created in this way is stored in the redundant data storage means 7. Then, power down processing similar to the conventional example is performed (step 13).

ステップ14においてシステムがパワーダウンモードか
ら復帰すると、冗長データが冗長データ記憶手段7から
読出される。そして、比較調査手段8は、データ記憶手
段5に記憶しておいたデータにエラーが発生しているか
どうかを、このデータと上記冗長データとを比較するこ
とにより判定する(ステップ15)。すなわち、冗長デ
ータがチエツクサム法に従って作成されているときには
、データ記憶手段5に記憶しておいた各データの和の下
位8ビツトを求め、それと冗長データとを比較する。そ
れらが一致すればデータは正常であり、一致していなけ
ればエラー発生と判断する。
When the system returns from the power down mode in step 14, redundant data is read from the redundant data storage means 7. Then, the comparison investigation means 8 determines whether an error has occurred in the data stored in the data storage means 5 by comparing this data with the redundant data (step 15). That is, when the redundant data is created according to the checksum method, the lower 8 bits of the sum of each data stored in the data storage means 5 are obtained and compared with the redundant data. If they match, the data is normal; if they do not match, it is determined that an error has occurred.

データが正常であるときには、ステップ16から17に
進んでプログラムに従った処理を続行するが、異常(エ
ラー)が発生していると判定されたときにはステップ1
1に戻ってシステムをリセットし、初期設定から動作を
繰返す。これは、第1図のシステム保護手段9によって
行われ、それによってシステムの誤動作が防止されるこ
とになる。
If the data is normal, proceed to steps 16 to 17 and continue processing according to the program, but if it is determined that an abnormality (error) has occurred, step 1
Return to step 1 to reset the system and repeat the operation from the initial settings. This is done by the system protection means 9 of FIG. 1, thereby preventing malfunctions of the system.

なお、上記実施例ではソフト的な構成に対応してチエツ
クサム法を利用したが、ハード的な構成の場合にはパリ
ティビットなどを冗長データとして作成してもよい。ま
た、冗長データがエラー検出のみを可能とするデータで
あるときには、初期設定によってシステムを正常データ
状態へ戻すが、冗長データとしてエラー訂正をも可能と
したデータを作成させるときには、それによってエラー
訂正を行えば初期設定に戻らなくてもよい。いずれにし
ても、システムの誤動作は防止可能である。
In the above embodiment, the checksum method is used in response to a software configuration, but in the case of a hardware configuration, a parity bit or the like may be created as redundant data. In addition, when the redundant data is data that only allows error detection, the initial settings return the system to a normal data state, but when creating data that also allows error correction as redundant data, it can be used to perform error correction. If you do this, there is no need to return to the initial settings. In any case, system malfunctions can be prevented.

〔発明の効果〕〔Effect of the invention〕

以上のように、この発明によれば、マイクロコントロー
ラに、冗長データの作成および記憶のための手段を設け
るとともに、データ調査手段と保護手段とを備えたので
、パワーダウン中に外来ノイズなどによるデータ異常が
発生しても、システムが誤動作することがなく、正常動
作に復帰できるという効果がある。
As described above, according to the present invention, the microcontroller is provided with a means for creating and storing redundant data, as well as a data investigation means and a protection means. Even if an abnormality occurs, the system does not malfunction and can return to normal operation.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例によるマイクロコントロー
ラの機能ブロック図、第2図はこの実施例の動作例を示
すフローチャート、第3図は従来のマイクロコントロー
ラの一例を示す機能ブロック図、第4図は従来のマイク
ロコントローラの動作例を示すフローチャートである。 図において、2は制御手段、3はシステム停止手段、4
はデータ処理手段、5はデータ記憶手段6は冗長データ
作成手段、7は冗長データ記憶手段、8はデータ比較調
査手段、9はシステム保護手段である。 なお、各図中同一符号は同一または相当部分を示す。
FIG. 1 is a functional block diagram of a microcontroller according to an embodiment of the present invention, FIG. 2 is a flowchart showing an example of the operation of this embodiment, FIG. 3 is a functional block diagram showing an example of a conventional microcontroller, and FIG. The figure is a flowchart showing an example of the operation of a conventional microcontroller. In the figure, 2 is a control means, 3 is a system stop means, and 4 is a control means.
5 is a data processing means, 5 is a data storage means 6 is a redundant data creation means, 7 is a redundant data storage means, 8 is a data comparison and investigation means, and 9 is a system protection means. Note that the same reference numerals in each figure indicate the same or corresponding parts.

Claims (1)

【特許請求の範囲】[Claims] (1)自己のシステムによるデータ処理が不要となって
いる期間において前記システムを一時的に停止させ、そ
れによって当該システムの消費電力を一時的に減少させ
るシステム停止手段を備えたマイクロコントローラにお
いて、 前記システム停止手段による前記システムの一時的停止
を行う際に、前記マイクロコントローラ内のデータ記憶
手段中に記憶させるべきデータについて冗長データを作
成する冗長データ作成手段と、 前記冗長データを記憶する冗長データ記憶手段と、 前記システムの一時的停止が解除された際に、前記冗長
データ記憶手段から読出された前記冗長データを用いる
ことにより、前記一時的停止の期間中に前記データ記憶
手段内の前記データにエラーが生じたか否かを調査する
データ調査手段と、前記データに前記エラーが生じてい
るときには、前記システムを正常データ状態へと復帰さ
せることにより、前記システムを誤動作から保護するシ
ステム保護手段とを設けたことを特徴とするマイクロコ
ントローラ。
(1) In a microcontroller, the microcontroller is equipped with a system stop means that temporarily stops the system during a period when data processing by the own system is unnecessary, thereby temporarily reducing the power consumption of the system. redundant data creation means for creating redundant data for data to be stored in data storage means in the microcontroller when the system is temporarily stopped by the system stop means; and redundant data storage for storing the redundant data. means, when the temporary suspension of the system is released, the redundant data read from the redundant data storage means is used to update the data in the data storage means during the period of the temporary suspension. a data investigation means for investigating whether an error has occurred; and a system protection means for protecting the system from malfunction by restoring the system to a normal data state when the error has occurred in the data. A microcontroller characterized by:
JP1275427A 1989-10-23 1989-10-23 Microcontroller Pending JPH03136153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1275427A JPH03136153A (en) 1989-10-23 1989-10-23 Microcontroller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1275427A JPH03136153A (en) 1989-10-23 1989-10-23 Microcontroller

Publications (1)

Publication Number Publication Date
JPH03136153A true JPH03136153A (en) 1991-06-10

Family

ID=17555369

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1275427A Pending JPH03136153A (en) 1989-10-23 1989-10-23 Microcontroller

Country Status (1)

Country Link
JP (1) JPH03136153A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0611038U (en) * 1992-07-10 1994-02-10 日新電機株式会社 Data processing device
JPH0816488A (en) * 1994-06-29 1996-01-19 Nec Corp Electronic disk device
JP2008210096A (en) * 2007-02-26 2008-09-11 Auto Network Gijutsu Kenkyusho:Kk Memory check system of electronic control unit
JP4609958B1 (en) * 2009-09-08 2011-01-12 二郎 工藤 Auxiliary power unit for suitcase
JP2015035078A (en) * 2013-08-08 2015-02-19 シャープ株式会社 Control device and image forming apparatus having the same

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60209863A (en) * 1984-04-03 1985-10-22 Fujitsu Ltd Control system of data processing device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60209863A (en) * 1984-04-03 1985-10-22 Fujitsu Ltd Control system of data processing device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0611038U (en) * 1992-07-10 1994-02-10 日新電機株式会社 Data processing device
JPH0816488A (en) * 1994-06-29 1996-01-19 Nec Corp Electronic disk device
JP2008210096A (en) * 2007-02-26 2008-09-11 Auto Network Gijutsu Kenkyusho:Kk Memory check system of electronic control unit
JP4609958B1 (en) * 2009-09-08 2011-01-12 二郎 工藤 Auxiliary power unit for suitcase
JP2015035078A (en) * 2013-08-08 2015-02-19 シャープ株式会社 Control device and image forming apparatus having the same

Similar Documents

Publication Publication Date Title
US5175847A (en) Computer system capable of program execution recovery
JPS63501178A (en) Fail-safe architecture for computer systems
KR970062904A (en) Database recovery method using double-sided nonvolatile memory and method thereof
JPH09282056A (en) Network hibernation system and control method for the same
US6081892A (en) Initial program load
JPH03136153A (en) Microcontroller
US7159152B2 (en) System with a monitoring device that monitors the proper functioning of the system, and method of operating such a system
JP3063334B2 (en) Highly reliable information processing equipment
JP2000298594A (en) Controlling method of fault tolerance and redundant computer system
JP2000059981A (en) Digital protective relay device
JP2004252525A (en) Emulator and program
KR0152240B1 (en) Method for restoring memory data discrepancy
JPH04367047A (en) Memory check method after recovery of power supply
JP2006323494A (en) Failure recovery method and microcomputer
JPH0354638A (en) Instruction retrying processing system
JP2002063044A (en) Arithmetic unit and program-rewriting method
JP2000163274A (en) Electronic equipment and recording medium with rom data monitoring program recorded thereon
JPS593796A (en) Checking method of data in memory
JPS61278953A (en) Method for checking error in ram
JPS5829052A (en) Microcomputer device with malfunction preventing function
JP2695775B2 (en) How to recover from computer system malfunction
JP2001273197A (en) Flash memory rewriting method
JP2806779B2 (en) Journal block recovery method and journal block recovery method
JPH04337856A (en) Management system for duplexing storage device
JPH10161815A (en) Disk duplex management device and method therefor