JPH02291040A - Electronic equipment - Google Patents

Electronic equipment

Info

Publication number
JPH02291040A
JPH02291040A JP1109105A JP10910589A JPH02291040A JP H02291040 A JPH02291040 A JP H02291040A JP 1109105 A JP1109105 A JP 1109105A JP 10910589 A JP10910589 A JP 10910589A JP H02291040 A JPH02291040 A JP H02291040A
Authority
JP
Japan
Prior art keywords
internal memory
checksum
power
check sum
turned
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
JP1109105A
Other languages
Japanese (ja)
Inventor
Hirokimi Shimizu
清水 裕公
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP1109105A priority Critical patent/JPH02291040A/en
Publication of JPH02291040A publication Critical patent/JPH02291040A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To avoid the destruction of information by comparing a check sum when a power source is turned on with a check sum when it is instructed to turn off the power source, deciding a check sum error and limiting an access to a file corresponding to the decided check sum error. CONSTITUTION:When it is instructed to turn off a power source 5, an arithmetic means 1 calculates the check sum for stored data and program in an internal memory 6 and the calculated check sum for the time of the power source turning off instruction is stored to the internal memory 6. When the power source 5 is turned on, the arithmetic means 1 calculates the check sum again for the data and program stored in the internal memory 6. When the power source 5 is turned on, the check sum to be calculated by the arithmetic means 1 is compared with the check sum, which is written to the internal memory 6, when it is instructed to turn off the power source 5. Then, the check sum error is detected and decided. In correspondence to the result of this decision, the access to the file corresponding to the check sum error is limited. Thus, the destruction of the information on the internal memory 6 can be avoided.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、内部電源によりパックアップされるメモリ
を有する電子機器に係り、特にメモリの記憶状態を自己
診断する電子機器に関するものてある。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an electronic device having a memory backed up by an internal power supply, and more particularly to an electronic device that self-diagnoses the storage state of the memory.

〔従来の技術〕[Conventional technology]

従来、この種の装置として、例えば特開昭63−499
52号公報等に示される電子機器においては、ハーンデ
ィターミナル装置として通信回線を利用してホストコン
ピュータと種々の情報交換処理を実行して所望とするデ
ータをメモリに記憶して随時読み出して処理することが
可能な構成となっている場合が多い。特に、外部記憶装
置、例えばハードディスク,フロッピーディスクを有し
ない電子機器では、バックアップ電源により内部メモリ
に記憶されたデータ,プログラムを保存管理している。
Conventionally, as this type of device, for example, Japanese Patent Application Laid-Open No. 63-499
In the electronic equipment disclosed in Publication No. 52, etc., a Handy terminal device executes various information exchange processes with a host computer using a communication line, stores desired data in memory, reads it out at any time, and processes it. In many cases, the configuration is such that this is possible. Particularly, in electronic devices that do not have an external storage device, such as a hard disk or floppy disk, data and programs stored in internal memory are stored and managed using a backup power source.

そして、電源投入時の初期段階で内部メモリの全体内容
をチェックサムを計算すること等により診断している。
At the initial stage when the power is turned on, the entire contents of the internal memory are diagnosed by calculating a checksum or the like.

〔発明か解決しようとする課題〕[Invention or problem to be solved]

ところが、近年の電子技術の進歩により、半導体メモリ
の集積度が向上して、内部メモリとして利用されるメモ
リ媒体の記憶容量か急速に増大した。
However, with recent advances in electronic technology, the degree of integration of semiconductor memories has improved, and the storage capacity of memory media used as internal memories has rapidly increased.

従って、従来のような内部メモリ全体のチェックサムに
よる内容保存状態診断て、チェックサムの真偽性の結果
、チェックサムエラーと診断された場合には、内部メモ
リの内容すべてについて使用不能となり、貴重なデータ
,プログラムを消失してしまう重大な問題点があった。
Therefore, if a checksum error is diagnosed as a result of checking the authenticity of the checksum using the conventional method of diagnosing the storage status of contents using a checksum of the entire internal memory, the entire contents of the internal memory will become unusable and valuable. There was a serious problem in that data and programs could be lost.

この発明は、上記の問題点を解決するためになされたも
ので、内部メモリ上に記憶されたデタ,プログラムを独
立したファイルとして記憶させ、そのファイルについて
個別にチェックサムを個別に計算することにより、ヂエ
ックサムエラに伴うシステム全体へのプログラム実行不
能,デタ読出し不能状態発生を回避できる電子機器を得
ることを目的とする。
This invention was made in order to solve the above problems, and by storing data and programs stored in internal memory as independent files, and calculating checksums for each file individually. The object of the present invention is to provide an electronic device that can avoid the inability to execute programs and the inability to read data to the entire system due to the DEX Samurai.

〔課題を解決するための手段) この発明に係る電子機器は、内部メモリに記1、徹され
たデータ,プログラムのヂエックサムを電源切断指示時
または電源投入時にファイル単位に個別演算する演算手
段と、電源切断指示時に演算手段により演算されたヂエ
ツクサムを内部メモリに書き込む書込み手段と、電源投
入時に演算手段により演算されるヂエックサムと書込み
手段により内部メモリに書き込まれた電源切断指示時の
チェックサムとを比較してヂエックサムエラーを判定す
る判定手段と、この判定手段により判定されたチェック
サムエラーに対応ずるファイルへのアクセスを制限する
制限手段とを設けたものである。
[Means for Solving the Problems] An electronic device according to the present invention includes a calculation means for individually calculating a file-by-file sum of data and programs stored in an internal memory at the time of power-off instruction or power-on; The writing means writes the checksum calculated by the calculation means when the power is turned on to the internal memory, and the checksum calculated by the calculation means when the power is turned on is compared with the checksum written to the internal memory by the writing means when the power is turned off. The present invention is provided with a determining means for determining a checksum error and a restricting means for restricting access to a file corresponding to a checksum error determined by the determining means.

〔作用〕[Effect]

この発明においては、電源切断指示時に演算手段が内部
メモリに記憶されたデータ,プログラムのヂエックサム
を演算し、演算された電源切断指示時のチェックザムか
書込み手段により内部メモリに記憶される。そして、電
源が投入されると、再度演算手段が内部メモリに記憶さ
れたデータプログラムのチェックサムを演算する。ここ
で、判定手段が電源投入時に演算手段により演算される
チェックサムと書込み手段により内部メモリに書き込ま
れた電源切断指示時のチェックサムとを比較してヂエッ
クサムエラーを検出判定する。この判定結果に応して制
限手段かチェックサムエラに対応ずるファイルへのアク
セスを制限し、内部メモリ上の情報破壊を回避させる。
In this invention, when a power-off instruction is given, the calculation means calculates a checksum of the data and program stored in the internal memory, and the calculated checksum at the time of the power-off instruction is stored in the internal memory by the writing means. Then, when the power is turned on, the calculating means again calculates the checksum of the data program stored in the internal memory. Here, the determining means compares the checksum calculated by the calculating means when the power is turned on with the checksum written in the internal memory by the writing means at the time of the power-off instruction, and detects and determines a diexum error. Depending on the result of this determination, the restriction means restricts access to the file corresponding to the checksum error to avoid destruction of information on the internal memory.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示す電子機器の構成を説
明するブロック図であり、1はCPUで、システムRO
M7内のシステムプログラムに従ってシステム全体を制
御する。2はキーポートで、動作するプログラムに対す
るデータ,コマンド等を指示人力する。3は表示器て、
プログラム実行に伴うシステム状態,人力データ,シス
テムエラー,メモリエラー等をメツセーシ表示ずる。
FIG. 1 is a block diagram illustrating the configuration of an electronic device showing an embodiment of the present invention, in which 1 is a CPU, a system RO
The entire system is controlled according to the system program in M7. 2 is a key port for manually inputting data, commands, etc. to the running program. 3 is the display,
Displays messages such as system status, human input data, system errors, memory errors, etc. associated with program execution.

4は電源コン]・ロール回路で、電源となる電池5の出
力を制御する。6は例えばRAM等で構成される内部メ
モリ(メモリ)で、バックアップ電源10により所定の
電位が印加されて、電源コントロール回路4がシステム
電源を切断しても常時記憶内容か保持される。
Reference numeral 4 denotes a power supply control roll circuit, which controls the output of the battery 5 serving as the power supply. Reference numeral 6 denotes an internal memory (memory) composed of, for example, a RAM, to which a predetermined potential is applied by a backup power supply 10, and the stored contents are always retained even if the power supply control circuit 4 turns off the system power supply.

なお、システムROM7には種々のシステムプログラム
のほかに後述する第3図,第4図に示すチェックサム処
理手順が記憶されている。
The system ROM 7 stores checksum processing procedures shown in FIGS. 3 and 4, which will be described later, in addition to various system programs.

8は通信ポー1・で、通信回線を介して図示しないポス
1・等の外部機器からのデータをシステムバス9に入力
するとともに、電子機器からのデータを通信回線に対し
て転送する。
A communication port 1.8 inputs data from an external device such as a port (not shown) to the system bus 9 via a communication line, and also transfers data from an electronic device to the communication line.

なお、CPU 1はこの発明の書込み手段,演算手段,
判定手段,制限手段等を兼ねており、電源切断指示時に
内部メモリ6に記憶されたデータプログラムのチェック
サムを演算し、演算された電源切断指示時のヂエックサ
ムかCPU1により内部メモリ6に記憶される。そして
、電源が投入されると、再度CPU 1か内部メモリ6
に記憶されたデータ,プログラムのヂエックサムを演算
する。ここで、電源投入時にCPU 1により演算され
るチェックサムと内部メモリ6に書き込まれた電源切断
指示時のチェックサムとを比較してチェックサムエラー
を検出判定する。この判定結果に応してCPUiがチェ
ックサムエラーに対応するファイルへのアクセスを制限
し、内部メモリ6上の情報破壊を後述するように回避さ
せる。
Note that the CPU 1 includes a writing means, an arithmetic means, and a calculating means of the present invention.
It also serves as a determining means, a limiting means, etc., and calculates the checksum of the data program stored in the internal memory 6 at the time of the power-off instruction, and stores the calculated checksum at the time of the power-off instruction in the internal memory 6 by the CPU 1. . Then, when the power is turned on, CPU 1 or internal memory 6
Calculates the exxsum of the data and programs stored in the . Here, the checksum calculated by the CPU 1 when the power is turned on is compared with the checksum written in the internal memory 6 at the time of the power-off instruction, and a checksum error is detected and determined. Depending on the result of this determination, the CPU i restricts access to the file corresponding to the checksum error, thereby avoiding destruction of information on the internal memory 6, as will be described later.

第2図は、第1図に示したメモリ6のメモリマプを説明
する模式図であり、11はディレクトリ部で、メモリ6
をファイルとして管理するために必要な管理情報を記憶
している。1213はプログラムファイルで、作成され
たまたは転送されたプログラムが記憶されている。14
.15はデータファイルで、作成されたまたは転送され
たデータが記憶されている。16は空き領域で、使用可
能な記憶領域となる。なお、ファイル管理処理について
は特開昭63−49953号公報等に詳細に示されてい
るので説明は省略する。
FIG. 2 is a schematic diagram illustrating a memory map of the memory 6 shown in FIG.
It stores the management information necessary to manage files as files. A program file 1213 stores a created or transferred program. 14
.. A data file 15 stores created or transferred data. 16 is an empty area, which is a usable storage area. Note that the file management process is described in detail in Japanese Patent Application Laid-Open No. 63-49953, etc., so a description thereof will be omitted.

次に第3図.第4図を参照しながらこの発明によるチェ
ックサムエラー判定処理動作について説明する。
Next, Figure 3. The checksum error determination processing operation according to the present invention will be explained with reference to FIG.

サム処理手順の一例を説明するフローチャートである。3 is a flowchart illustrating an example of a thumb processing procedure.

なお、(1)〜(5)は各ステップを示す。Note that (1) to (5) indicate each step.

オペレータまたはアプリケーションプログラムから電源
のオフを指示されたると、このフローが開始され、メモ
リ6内のディレクトリ部11をサチして(1)、有効な
ファイルを選択する。次いで、有効なファイルについて
すべてチェックサムの計算を終了したかどうかを判断し
(2)、YESならば電源をオフし(5)、処理を終了
する。
When an operator or an application program instructs to turn off the power, this flow is started, and the directory section 11 in the memory 6 is searched (1) to select a valid file. Next, it is determined whether checksum calculation has been completed for all valid files (2), and if YES, the power is turned off (5) and the process ends.

一方、ステップ(2)の判断において、NOならば個々
のファイルについてのチェックサムを計算して(3)、
対応するディレクトリ部11に計算した結果をセーブし
(4)、ステップ(1) に戻る。
On the other hand, if the judgment in step (2) is NO, calculate the checksum for each file (3),
Save the calculated results in the corresponding directory section 11 (4) and return to step (1).

このようにして、電源切断直前毎にメモリ6上の各ファ
イルについてのチェックサムが計算され、バックアップ
電源10によりメモリ6上に最新のファイル状態に関す
るチェックサムが常駐されることとなる。
In this way, the checksum for each file on the memory 6 is calculated immediately before the power is turned off, and the checksum regarding the latest file status is stored in the memory 6 by the backup power supply 10.

第4図はこの発明による電源投入時のチェックサム処理
手順の一例を説明するフローチャートである。なお、(
1)〜(9)は各ステップを示す。
FIG. 4 is a flowchart illustrating an example of a checksum processing procedure at power-on according to the present invention. In addition,(
1) to (9) indicate each step.

先ず、電源が投入されると、ディレクトリ部11上の管
理情報を参照してメモリ6上の有効なファイルをサーチ
し(l)、すべてのファイルについてチェクッサム判定
が完了したかどうかを判定し(2)、NOならば各ファ
イルのチェックサムを計算し(3)、電源切断時にセー
ブした当該ファイルのチェックサムと電源投入時に計算
された当該ファイルのチェックサムとが一致するかどう
かを逐一個別に調べ(4)、一致する場合(YESの場
合)にはステップ(1)に戻り、NOの場合(何らかの
原因でファイル内容が破壊された場合)はエラーフラグ
をセットし(5)、ステップ(1)に戻る。
First, when the power is turned on, a valid file on the memory 6 is searched by referring to the management information on the directory section 11 (l), and it is determined whether checksum judgment has been completed for all files (2). ), if NO, calculate the checksum of each file (3) and check individually whether the checksum of the file saved when the power was turned off and the checksum of the file calculated when the power was turned on match. (4) If they match (YES), return to step (1); if NO (if the file contents have been destroyed for some reason), set an error flag (5) and return to step (1) Return to

方、ステップ(2)の判断で、YESの場合はエラーフ
ラグがセットされたエラーファイルが存在するかどうか
を判断し(6)、Noならばステップ(9)に進み、ア
プリケーションプログラムを実行する。
On the other hand, if the determination in step (2) is YES, it is determined whether an error file with an error flag set exists (6), and if NO, the process proceeds to step (9) and the application program is executed.

方、ステップ(6)の判断で、YESの場合はエラーメ
ッセージを表示器3に表示し(7)、プログラム実行を
一時停止し(システムの実行を一時停止し) (8) 
.オペレータからの指示を待機する。
On the other hand, if the judgment in step (6) is YES, an error message is displayed on the display 3 (7), and the program execution is temporarily stopped (system execution is temporarily stopped) (8)
.. Wait for instructions from the operator.

なお、上記実施例ではメモリ6の保存性の確認手段とし
てチェックサムを使用して判定する場合について説明し
たが、判定情報としてはチェックサムに限定されるもの
ではなく、CRCチェック等の他の手段によっても判定
することが可能であり、この種の判定処理はこの発明の
技術思想に内包される。
In the above embodiment, a case has been described in which a checksum is used as a means for confirming the storability of the memory 6, but the determination information is not limited to the checksum, and other means such as a CRC check can be used. This type of determination processing is included in the technical idea of the present invention.

また、上記実施例では、第4図に示したフロ中において
、チェックサムエラーが発生した場合に、システムを一
時的に停止させて、オペレータの指示待ちとなる場合に
ついて説明したが、通常通りアプリケーションプログラ
ムを実行させておき、エラー発生したファイルへのアク
セスを検出した時点で、エラー報知するようにすれば、
システム実行に差し支えのないデータファイルにエラが
ある場合には、不要なシステム停止状態を未然に回避さ
せることができる。さらに、一度チェックサムエラーが
発生したファイルについては、チェックザム計算を回避
するように事前にチェックする処理を加えれは、ヂエッ
クサムエラー割算を短縮することができる。
Furthermore, in the above embodiment, when a checksum error occurs during the flow shown in FIG. 4, the system is temporarily stopped and waits for instructions from the operator. If you run the program and make it notify you of an error when it detects access to a file where an error has occurred,
If there is an error in a data file that does not affect system execution, unnecessary system stoppage can be avoided. Furthermore, if a file in which a checksum error has occurred once is checked in advance to avoid checksum calculation, the checksum error division can be shortened.

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

以上説明したように、この発明は内部メモリに記憶され
たデータ,プログラムのヂエックサムを電源切断指示時
または電源投入時にファイル単位に個別演算する演算手
段と、電源切断指示時に演算手段により演算されたヂエ
ツクサムを内部メモリに書き込む書込み手段と、電源役
人時に演算手段により演算されるチェックサムと書込み
手段により内部メモリに書き込まれた電源切断指示時の
チェックサムとを比較してチェックサムエラーを判定す
る判定手段と、この判定手段により判定されたチェック
サムエラーに対応ずるファイルへのアクセスを制限する
制限手段とを設けたので、電子機器の電源が切断されて
いる間、何らかの原因てメモリ上に保存されているデー
タが破壊された時に、プログラム実行に伴う被害を最小
限とすることができる。
As explained above, the present invention provides a calculation means for individually calculating the graphic sum of data and programs stored in an internal memory for each file when the power is turned off or turned on, and a calculation means that calculates the graphic sum of the data and programs stored in the internal memory individually for each file when the power is turned off or turned on. a writing means for writing into the internal memory; and a determining means for determining a checksum error by comparing the checksum calculated by the calculating means when the power supply is being processed with the checksum written to the internal memory by the writing means at the time of the power cut instruction. and a restriction means that restricts access to files corresponding to checksum errors determined by this determination means, so that files that are saved in the memory for some reason while the power of the electronic device is turned off are provided. If the data in the program is destroyed, the damage caused by program execution can be minimized.

従って、アプリケーションプログラム実行に起因した誤
動作,異常発生を事前に予測して対処できる等の優れた
効果を奏する。
Therefore, excellent effects such as being able to predict and deal with malfunctions and abnormalities caused by the execution of application programs in advance are achieved.

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

第1図はこの発明の一実施例を示す電子機器の構成を説
明するブロック図、第2図は、第1図に示したメモリの
メモリマブを説明する模式図、第3図はこの発明による
電源切断時のチェックサム処理手順の一例を説明するフ
ローチャート、第4図はこの発明による電源投入時のチ
ェックサム処理手順の一例を説明するフローヂャートで
ある。 図中、]はCPIJ、2はキーボード、3は表示器、4
は電源コン1−ロール回路、5は電池、6はメモリ、7
はシステムROM、8は通信ボー1・、9はシステムバ
ス、10はバックアップ電源である。 矛 図 ヨ5 図
FIG. 1 is a block diagram illustrating the configuration of an electronic device showing an embodiment of the present invention, FIG. 2 is a schematic diagram illustrating the memory module of the memory shown in FIG. 1, and FIG. 3 is a power supply according to the present invention. FIG. 4 is a flowchart illustrating an example of a checksum processing procedure at power-on according to the present invention. ] in the figure is CPIJ, 2 is the keyboard, 3 is the display, 4
is the power supply controller 1-roll circuit, 5 is the battery, 6 is the memory, 7
8 is a communication board 1., 9 is a system bus, and 10 is a backup power supply. Figure 5

Claims (1)

【特許請求の範囲】[Claims] バックアップされる内部メモリと、この内部メモリに記
憶されたデータ、プログラムをファイル単位に管理する
管理情報に基づいて前記データ、プログラムを読み出し
実行する電子機器において、前記内部メモリに記憶され
たデータ、プログラムのチェックサムを電源切断指示時
または電源投入時にファイル単位に個別演算する演算手
段と、前記電源切断指示時に前記演算手段により演算さ
れたチェックサムを前記内部メモリに書き込む書込み手
段と、電源投入時に前記演算手段により演算されるチェ
ックサムと前記書込み手段により前記内部メモリに書き
込まれた電源切断指示時のチェックサムとを比較してチ
ェックサムエラーを判定する判定手段と、この判定手段
により判定されたチェックサムエラーに対応するファイ
ルへのアクセスを制限する制限手段とを具備したことを
特徴とする電子機器。
In an electronic device that reads and executes the data and programs based on an internal memory to be backed up and management information that manages the data and programs stored in this internal memory in file units, the data and programs stored in the internal memory are read and executed. calculation means for individually calculating the checksum of each file for each file when the power is turned off or when the power is turned on; a writing means for writing the checksum calculated by the calculation means when the power is turned off in the internal memory; determining means for determining a checksum error by comparing the checksum calculated by the calculating means with the checksum written in the internal memory by the writing means at the time of the power-off instruction; and a check determined by the determining means. An electronic device comprising a restriction means for restricting access to a file corresponding to a thumb error.
JP1109105A 1989-05-01 1989-05-01 Electronic equipment Pending JPH02291040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1109105A JPH02291040A (en) 1989-05-01 1989-05-01 Electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1109105A JPH02291040A (en) 1989-05-01 1989-05-01 Electronic equipment

Publications (1)

Publication Number Publication Date
JPH02291040A true JPH02291040A (en) 1990-11-30

Family

ID=14501703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1109105A Pending JPH02291040A (en) 1989-05-01 1989-05-01 Electronic equipment

Country Status (1)

Country Link
JP (1) JPH02291040A (en)

Similar Documents

Publication Publication Date Title
US6523133B2 (en) Information processing apparatus that can hold internal information
JPH11272427A (en) Method for saving data and outside storage device
EP0886211B1 (en) Initial program load
KR100703164B1 (en) Data processing device and control method of the same
JPH02291040A (en) Electronic equipment
JP2019169136A (en) Method and device for calculating data in safety critical system
JP3048792B2 (en) Method of automatically replacing operating system and computer system using the same
JP3317361B2 (en) Battery backup control method for memory
JPH0784894A (en) Method for writing nonvolatile memory
JP2000293376A (en) Circuit and method for switching boot program
JPH06180674A (en) Data storage device
JP2923111B2 (en) Data processing method and apparatus
JPH0736536A (en) Programmable controller
JP3010737B2 (en) Data backup and restoration method for information processing equipment
JPH02291041A (en) Portable terminal equipment
WO2022159107A1 (en) Application security and mobility
CN117310596A (en) Metering on-line monitoring module parameter management method, device, equipment and medium
JPH11203115A (en) Controller
JP3483662B2 (en) Computer backup method
CN118069419A (en) Flash power-down protection method, device, equipment and storage medium
JP3340284B2 (en) Redundant system
JP2003242046A (en) Information processor, and operational method and program for information processor
JPH11149371A (en) Information processor and its control method
JPH05181681A (en) Supervisory and controlling method for os load
JPH07306793A (en) Method and device for shrinking of computer system