JP3113486B2 - CPU system - Google Patents

CPU system

Info

Publication number
JP3113486B2
JP3113486B2 JP4959494A JP4959494A JP3113486B2 JP 3113486 B2 JP3113486 B2 JP 3113486B2 JP 4959494 A JP4959494 A JP 4959494A JP 4959494 A JP4959494 A JP 4959494A JP 3113486 B2 JP3113486 B2 JP 3113486B2
Authority
JP
Japan
Prior art keywords
cpu
information
memory
reset
volatile memory
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.)
Expired - Fee Related
Application number
JP4959494A
Other languages
Japanese (ja)
Other versions
JPH07261887A (en
Inventor
一郎 藤沖
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4959494A priority Critical patent/JP3113486B2/en
Publication of JPH07261887A publication Critical patent/JPH07261887A/en
Application granted granted Critical
Publication of JP3113486B2 publication Critical patent/JP3113486B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Power Sources (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明はCPUシステムに関し、
更に詳しくはシステムの立ち上げ情報をバックアップ保
持する書込回数制限付きの不揮発性メモリ(EEPRO
M)を備えるCPUシステムに関する。今日、あらゆる
電子機器は制御部にCPUを備えており、該CPUはパ
ワーオンリセット又は操作やプログラムによるリセット
後に所定の立ち上げ情報に従ってシステム(機器)を所
定機能に立ち上げる。かかる立ち上げ情報は、製造時よ
り固定ならばROMに記憶しておけば良いが、例えば移
動無線電話機(移動機)においては、この立ち上げ情報
の中に機器番号、電話番号、その他の様々な制御パラメ
ータ等が含まれており、該データは移動機の運用中にも
変化する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CPU system,
More specifically, a non-volatile memory (EEPRO) with a limited number of times of writing for holding backup of system startup information
M). Today, all electronic devices include a CPU in a control unit, and the CPU starts up a system (device) to a predetermined function according to predetermined startup information after a power-on reset or a reset by an operation or a program. Such startup information may be stored in a ROM if it is fixed from the time of manufacture. For example, in a mobile radio telephone (mobile device), the startup information includes an equipment number, a telephone number, and various other information. Control data and the like are included, and the data changes during operation of the mobile device.

【0002】そこで、立ち上げ情報をバックアップ保持
する必要があり、その手段としては、従来より小型、低
価格な書込回数制限付きの不揮発性メモリ(EEPRO
M)が多く使用されるが、書込回数が制限に達してしま
うと移動機そのものが使えなくなるので、不揮発性メモ
リの使用をいかに長持ちさせるかは重要な課題となって
いる。
Therefore, it is necessary to hold the start-up information as a backup. As a means for this, a non-volatile memory (EEPRO) with a smaller number of writes and a limited number of times of writing is conventionally available.
M) is often used, but when the number of times of writing reaches the limit, the mobile device itself becomes unusable, so how to extend the use of the nonvolatile memory is an important issue.

【0003】[0003]

【従来の技術】従来は、主電源断時に所定時間のバッテ
リーバックアップを行うと共に、この時間を利用して無
条件に立ち上げ情報を不揮発性メモリに退避していた。
2. Description of the Related Art Conventionally, when a main power supply is turned off, a battery is backed up for a predetermined time, and the start-up information is unconditionally saved in a non-volatile memory using this time.

【0004】[0004]

【発明が解決しようとする課題】しかし、EEPROM
等の不揮発性メモリはRAMに比べてデータ書込処理に
多大な時間(例えば1バイト当たり10mS)を要す
る。このため、従来の機器は使い勝手が悪く、かつバッ
クアップバッテリーの消耗が早かった。また、電源OF
Fする度に不揮発性メモリの書込回数が増すので、10
年経たないうちに書込制限回数(例えば数万回)に達し
てしまい、従来の機器はこれにより寿命が制限されるこ
ともあった。
SUMMARY OF THE INVENTION However, the EEPROM
A non-volatile memory such as the above requires much time (for example, 10 mS per byte) for data writing processing as compared with a RAM. For this reason, the conventional device is inconvenient and the backup battery is quickly consumed. Power supply OF
Since the number of times of writing in the non-volatile memory increases each time the
The writing limit (for example, tens of thousands of times) is reached before the age passes, and the life of the conventional device is sometimes limited by this.

【0005】本発明の目的は、システムの立ち上げ情報
をバックアップ保持する不揮発性メモリが長持ちするC
PUシステムを提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a nonvolatile memory for backing up system startup information which has a long life.
It is to provide a PU system.

【0006】[0006]

【課題を解決するための手段】上記の課題は図1の構成
により解決される。即ち、本発明のCPUシステムは、
システムの主制御を行うCPU1と、システムの立ち上
げ情報をバックアップ保持する不揮発性メモリ2と、前
記不揮発性メモリ2の立ち上げ情報を記憶すると共に必
要に応じてCPU1によりその内容を更新される揮発性
メモリ3と、システムの主電源31の断時に該システム
への給電を所定時間バックアップするバックアップ電源
32と、主電源の断検出によりCPU1に対して第1の
割込を発生する断検出回路35とを備え、CPU1は前
記第1の割込処理において不揮発性メモリ2と揮発性メ
モリ3の各立ち上げ情報を比較すると共に、不一致が存
在する場合のみ揮発性メモリ3の立ち上げ情報を不揮発
性メモリ2に書き込むものである。
The above-mentioned problem is solved by the structure shown in FIG. That is, the CPU system of the present invention
A CPU 1 for performing main control of the system, a non-volatile memory 2 for backing up system startup information, and a volatile for storing the startup information of the non-volatile memory 2 and updating its contents as necessary. Memory 3, a backup power supply 32 for backing up power supply to the system for a predetermined time when the main power supply 31 of the system is cut off, and a cutoff detection circuit 35 for generating a first interrupt to the CPU 1 by detecting the cutoff of the main power supply. The CPU 1 compares the start-up information of the nonvolatile memory 2 and the start-up information of the volatile memory 3 in the first interrupt processing, and stores the start-up information of the volatile memory 3 only when there is a mismatch. This is to write in the memory 2.

【0007】[0007]

【作用】システムに電源投入するとCPU1は不揮発性
メモリ2の立ち上げ情報でシステムを立ち上げ、該不揮
発性メモリ2の立ち上げ情報を揮発性メモリ3にロード
する。又は不揮発性メモリ2の立ち上げ情報を揮発性メ
モリ3にロードし、該揮発性メモリ3の立ち上げ情報で
システムを立ち上げる。何れにしても、稼動中は揮発性
メモリ3にアクセスすることで、立ち上げ情報の高速読
み出し、及び書き込み(更新)が行える。
When the power of the system is turned on, the CPU 1 starts up the system with the startup information of the nonvolatile memory 2 and loads the startup information of the nonvolatile memory 2 into the volatile memory 3. Alternatively, the startup information of the non-volatile memory 2 is loaded into the volatile memory 3 and the system is started using the startup information of the volatile memory 3. In any case, by accessing the volatile memory 3 during operation, the startup information can be read and written (updated) at high speed.

【0008】システムの主電源31が断になると、バッ
クアップ電源32は該システムへの給電を所定時間バッ
クアップする。また同時に断検出回路35は主電源の断
検出によりCPU1に対して第1の割込を発生する。そ
して、CPU1は前記第1の割込処理において、不揮発
性メモリ2と揮発性メモリ3の各立ち上げ情報を比較す
ると共に、不一致が存在する場合のみ揮発性メモリ3の
立ち上げ情報を不揮発性メモリ2に書き込む。
When the main power supply 31 of the system is turned off, the backup power supply 32 backs up power supply to the system for a predetermined time. At the same time, the disconnection detection circuit 35 generates a first interrupt to the CPU 1 by detecting the disconnection of the main power supply. Then, in the first interrupt processing, the CPU 1 compares the activation information of the nonvolatile memory 2 and the activation information of the volatile memory 3 and, when there is a mismatch, interprets the activation information of the volatile memory 3 as the nonvolatile memory. Write to 2.

【0009】従って、現実にはシステムの稼動中に揮発
性メモリ3の立ち上げ情報が更新されない場合も多いか
ら、かかる場合には不揮発性メモリ2への書き込みを行
わず、もって不揮発性メモリ2が長持ちする。好ましく
は、操作又はプログラムによって生成されるリセット信
号によりCPU1に対して第2の割込を発生する割込発
生回路10と、前記第2の割込処理においてCPU1に
より該割込がリセット信号に起因する旨の特定の情報を
セットされる第1の記憶手段33 と、前記リセット信号
のCPU1への入力を所定時間遅延させる遅延回路12
とを備え、CPU1はシステムの立ち上げ時に前記第1
の記憶手段33 の内容を識別すると共に、該内容が前記
特定の情報の場合は揮発性メモリ3の立ち上げ情報でシ
ステムを立ち上げ、それ以外の場合は不揮発性メモリ2
の立ち上げ情報でシステムを立ち上げる。
Therefore, in practice, the start-up information of the volatile memory 3 is often not updated during the operation of the system. In such a case, writing to the non-volatile memory 2 is not performed. long lasting. Preferably, an interrupt generation circuit 10 that generates a second interrupt to the CPU 1 by a reset signal generated by an operation or a program, and the interrupt caused by the reset signal by the CPU 1 in the second interrupt processing. a first storage means 3 3 is set to a specific information indicating that the delay circuit delays a predetermined time the input to CPU1 of the reset signal 12
The CPU 1 operates at the time of starting up the system.
With identifying the content of the storage unit 3 3, if the contents of said specific information launch system startup information in the volatile memory 3, the nonvolatile memory 2 otherwise
Start the system with the startup information.

【0010】主電源断以外の立ち上げ時には揮発性メモ
リ3の立ち上げ情報は破壊されていないので、仮に揮発
性メモリ3の内容が更新されていてもこれを不揮発性メ
モリ2に退避する必要はない。従って、かかる場合も不
揮発性メモリ2への書き込みを行わず、もって不揮発性
メモリ2が長持ちする。また好ましくは、パワーオンリ
セット信号によりセット/リセットされ、かつ操作又は
プログラムによって生成されるリセット信号によりリセ
ット/セットされる第2の記憶手段14を備え、CPU
1はシステムの立ち上げ時に前記第2の記憶手段14の
内容を判別すると共に、該内容がセット/リセットの場
合は不揮発性メモリ2の立ち上げ情報でシステムを立ち
上げ、リセット/セットの場合は揮発性メモリ3の立ち
上げ情報でシステムを立ち上げる。
Since the startup information of the volatile memory 3 is not destroyed at the time of startup other than when the main power is turned off, even if the contents of the volatile memory 3 have been updated, it is not necessary to save the updated content to the nonvolatile memory 2. Absent. Accordingly, even in such a case, writing to the nonvolatile memory 2 is not performed, and the nonvolatile memory 2 lasts longer. Also preferably, a second storage means 14 which is set / reset by a power-on reset signal and reset / set by a reset signal generated by an operation or a program, is provided.
Reference numeral 1 denotes the contents of the second storage means 14 when the system is started, and when the contents are set / reset, the system is started based on the start-up information of the nonvolatile memory 2; The system is started based on the startup information of the volatile memory 3.

【0011】従って、上記同様にして不揮発性メモリ2
が長持ちすると共に、本CPUシステムは一層簡単な回
路及び制御で実現できる。また好ましくは、不揮発性メ
モリ2は夫々が立ち上げ情報を記憶可能な複数のメモリ
ブロック21 〜2n を備え、一つのメモリブロックヘの
立ち上げ情報の書込回数が所定値を超えたことにより次
のメモリブロックへの書き込みが行われるものである。
従って、不揮発性メモリ2の見かけ上の寿命が格段に延
びる。
Therefore, in the same manner as described above, the nonvolatile memory 2
And the CPU system can be realized with simpler circuits and control. Also preferably, the non-volatile memory 2 to a plurality of memory blocks 2 1 to 2 n capable of storing up information up the respective write count launch information of one memory block F has exceeded a predetermined value Thus, writing to the next memory block is performed.
Therefore, the apparent life of the nonvolatile memory 2 is significantly extended.

【0012】[0012]

【実施例】以下、添付図面に従って本発明による実施例
を詳細に説明する。なお、全図を通して同一符号は同一
又は相当部分を示すものとする。図2は実施例のCPU
応用システムのブロック図で、このCPU応用システム
はCPUを含む制御部100と、機器固有の機能を実現
する機能部200と電源部300とから成る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments according to the present invention will be described below in detail with reference to the accompanying drawings. Note that the same reference numerals indicate the same or corresponding parts throughout the drawings. FIG. 2 shows a CPU according to the embodiment.
FIG. 1 is a block diagram of an application system. The CPU application system includes a control unit 100 including a CPU, a function unit 200 that implements functions unique to the device, and a power supply unit 300.

【0013】制御部100において、1はシステムの主
制御を行うCPU、2はシステムの立ち上げ情報をバッ
クアップ保持する例えばEEPROMの書込回数制限付
き不揮発性メモリからなるバックアップメモリ(BME
M)、21 〜2n は、夫々が、未使用/使用中/使用済
の使用状態を保持する使用フラグUFと、このエリアへ
の書込回数をカウントし、保持する書込カウンタCTR
と、立ち上げ情報BDATの記憶エリアとを含むメモリ
ブロックである。3はRAM等の揮発性メモリからなる
データメモリ(DMEM)、31 は立ち上げ情報(AD
AT)、32 はメモリブロック21 〜2n を指すポイン
タ(P)、33 はリセット要因を保持するレジスタCR
EG(第1の記憶手段33 に相当)である。
In the control unit 100, reference numeral 1 denotes a CPU for performing main control of the system, and 2 denotes a backup memory (BME) composed of a nonvolatile memory for limiting the number of times of writing, for example, an EEPROM for holding backup of system startup information.
M) 2 1 to 2 n are a use flag UF for holding an unused / used / used state of use, and a write counter CTR for counting the number of times of writing to this area and holding it.
And a storage area for startup information BDAT. 3 is a data memory comprising a volatile memory such as a RAM (DMEM), 3 1 launched information (AD
AT), 3 2 register pointer to the memory block 2 1 ~2 n (P), 3 3 holds the reset factor CR
A EG (corresponding to the first memory means 3 3).

【0014】更に、4は図4,図5の制御プログラムを
記憶しているROMからなるプログラムメモリ(PME
M)、5はCPU1の共通バス、6はパワーオンリセッ
ト回路、61 はシュミットトリガ回路(ST)、7はマ
ニュアルリセットボタン、8はインバータ回路(I)、
9は入力の立ち下がりで所定パルス幅のマニュアルリセ
ットパルスMRPを発生するパルスジェネレータ(P
G)、10はORゲート回路O(割込発生回路10に相
当)、11はCPU1のリセットコマンド(プログラム
リセット)をデコードしてプログラムリセットパルスP
RPを生成するバスデコーダ(BD)、12は遅延回路
(DL)、13はNORゲート回路(NO)である。
Further, reference numeral 4 denotes a program memory (PME) comprising a ROM storing the control programs of FIGS.
M), the common bus is 5 CPU 1, a power-on reset circuit 6, 6 1 Schmitt trigger circuit (ST), 7 a manual reset button, 8 inverter circuit (I),
9 is a pulse generator (P) that generates a manual reset pulse MRP having a predetermined pulse width at the fall of the input.
G), 10 is an OR gate circuit O (corresponding to the interrupt generation circuit 10), 11 is a program that decodes a reset command (program reset) of the CPU 1 and outputs a program reset pulse P
A bus decoder (BD) for generating RP, 12 is a delay circuit (DL), and 13 is a NOR gate circuit (NO).

【0015】機能部200において、21はCPU1の
エクステンションバス、22は移動体通信機等の機能を
実現する機能回路(FC)である。更に電源部300に
おいて、31はバッテリーからなる主電源、32は同じ
くバッテリーからなるバックアップ電源、33は電源O
N/OFFスイッチ、34は半導体スイッチ素子又はリ
レー等からなるスイッチ回路、35は主電源断を検出す
るシュミットトリガ回路ST(断検出回路35に相当)
である。
In the functional unit 200, reference numeral 21 denotes an extension bus of the CPU 1, and reference numeral 22 denotes a functional circuit (FC) for realizing functions of a mobile communication device or the like. Further, in the power supply unit 300, 31 is a main power supply composed of a battery, 32 is a backup power supply composed of the same battery, and 33 is a power supply O.
An N / OFF switch; 34, a switch circuit composed of a semiconductor switch element or a relay;
It is.

【0016】図3は実施例のCPU応用システムの動作
タイミングチャートである。以下、図2も参照して動作
を説明する。図3の(A)はシステム稼動中にリセット
信号が発生した場合のタイミングチャートを示してい
る。リセットボタン7を押して離すと、離した時に同期
してマニュアルリセットパルスMRP(=リセットパル
スRP)が発生する。又はCPU1が共通バス5にリセ
ットコマンドを送出すると、これに同期してプログラム
リセットパルスPRP(=リセットパルスRP)が発生
する。リセットパルスRPはCPU1の第2の割込入力
端子I2 に入力しており、該リセットパルスRPの立ち
下がりによりCPU1は後述のリセット要因記録処理
を実行する。
FIG. 3 is an operation timing chart of the CPU application system of the embodiment. Hereinafter, the operation will be described with reference to FIG. FIG. 3A shows a timing chart when a reset signal is generated during operation of the system. When the reset button 7 is pressed and released, a manual reset pulse MRP (= reset pulse RP) is generated in synchronization with the release. Alternatively, when the CPU 1 sends a reset command to the common bus 5, a program reset pulse PRP (= reset pulse RP) is generated in synchronization with this. The reset pulse RP is input to the second interrupt input terminal I 2 of the CPU 1, the falling of the reset pulse RP CPU 1 executes the reset factor recording process described below.

【0017】一方、遅延回路12は処理の実行完了よ
りも大きな遅延時間T1 を有しており、該時間T1 が経
過すると遅延リセットパルスRPDが発生し、これによ
りCPU1は実際にリセットされる。そして、この遅延
リセットパルスRPDが無くなると、プログラムメモリ
4の所定番地から始まる後述のシステムの立ち上げ処理
を実行する。
On the other hand, the delay circuit 12 has a delay time T 1 longer than the completion of the processing, and when the time T 1 elapses, a delay reset pulse RPD is generated, whereby the CPU 1 is actually reset. . Then, when the delayed reset pulse RPD disappears, a start-up process of a system described later starting from a predetermined address of the program memory 4 is executed.

【0018】図3の(B)はシステム稼動中に主電源V
が断となった場合のタイミングチャートを示している。
電源ON/OFFスイッチ33をOFFにすると、主電
源Vは急速に低下し、これを検出したシュミットトリガ
回路35はCPU1の第1の割込端子I1 に電源断割込
を発生する。一方、トランジスタQはコンデンサC2
蓄積電荷のために暫くは導通しており、これによりスイ
ッチ回路34はONに保たれ、システムにはバックアッ
プ電源32から引き続きバックアップ電源V´が供給さ
れる。この間に、CPU1は主電源断割込信号の立ち下
がりにより後述の主電源断処理を実行する。トランジ
スタQが導通している時間T2 は主電源断処理の実行
完了よりも大きな時間を有しており、この間にCPU1
は主電源断処理を終了する。そして、時間T2 を経過
するとトランジスタQがOFFし、これによりバックア
ップ電源V´の給電もストップし、システムは電源OF
F状態になる。
FIG. 3B shows the state of the main power supply V during the operation of the system.
4 shows a timing chart in the case where is disconnected.
When the power ON / OFF switch 33 is turned off, the main power supply V drops rapidly, and upon detecting this, the Schmitt trigger circuit 35 generates a power interruption at the first interrupt terminal I 1 of the CPU 1. On the other hand, the transistor Q is conducting a while for the accumulated charge the capacitor C 2, thereby the switch circuit 34 is kept ON, the continued backup power V'is supplied from the backup power supply 32 in the system. During this time, the CPU 1 executes the below-described main power supply interruption process by the fall of the main power supply interruption signal. Time T 2 the transistor Q is conducting has a greater time than execution completion of the main power-off process, during which CPU1
Ends the main power cutoff process. Then, when the time T 2 has elapsed, the transistor Q is turned off, whereby the power supply of the backup power supply V ′ is stopped, and the system turns off the power supply OF.
The state becomes the F state.

【0019】やがて、電源ON/OFFスイッチ33を
ONにすると、主電源VはダイオードD4 を介してコン
デンサC2 を急速にチャージし、トランジスタQを速や
かにONにする。また主電源VはダイオードD2 を介し
てスイッチ回路34に給電され、かつスイッチ回路34
のONにより主電源Vはシステムに供給される。因み
に、この状態ではダイオードD3 は逆方向にバイアスさ
れており、もってバックアップ電源32の消耗は無い。
[0019] Then, when the power ON / OFF switch 33 to ON, the main power source V is rapidly charged capacitor C 2 through the diode D 4, rapidly to ON transistor Q. The main power source V is powered on the switch circuit 34 via the diode D 2, and switch circuit 34
Is turned on, the main power supply V is supplied to the system. Incidentally, the diode D 3 in this state is reverse biased, no depletion of the backup power supply 32 has.

【0020】主電源Vがシステムに供給されると、パワ
ーオンリセット回路6はパワーオンリセット信号PWR
を発生する。これによりCPU1はパワーオンリセット
されると共に、該パワーオンリセット信号PWRが無く
なると、プログラムメモリ4の所定番地から始まる後述
のシステムの立ち上げ処理を実行する。図4は実施例
のCPU応用システムのフローチャートである。なお、
この例ではバックアップメモリ2のメモリブロックが一
つの場合を説明する。
When the main power supply V is supplied to the system, the power-on reset circuit 6 outputs a power-on reset signal PWR.
Occurs. As a result, the power-on reset of the CPU 1 is performed, and when the power-on reset signal PWR is lost, the CPU 1 executes a system start-up process described later starting from a predetermined address of the program memory 4. FIG. 4 is a flowchart of the CPU application system of the embodiment. In addition,
In this example, the case where the backup memory 2 has one memory block will be described.

【0021】システムの稼動中に操作又はプログラムに
よるリセット信号RPが発生すると、リセット要因記録
処理に割込入力する。このようなリセット信号RPに
基づく再立ち上げの処理では、仮にデータメモリ3の立
ち上げ情報ADATが更新されていても、これをリスタ
ート時に利用できるから、これをバックアップメモリ2
に退避する必要はなく、このことがリスタート時に分か
るようにしておく。即ち、ステップS1ではリセット要
因レジスタCREGにこのリセットの要因がCPU稼動
中における操作又はプログラムによるリセット信号が発
生した旨の情報(例えば符号「G」)をセットし、ステ
ップS2ではCPU1はアイドル状態になる。
When a reset signal RP generated by an operation or a program is generated during operation of the system, an interrupt is input to a reset factor recording process. In such a restart process based on the reset signal RP, even if the start information ADAT in the data memory 3 has been updated, it can be used at the time of restart.
You do not need to evacuate to this, and you will know this when restarting. That is, in step S1, information (for example, reference symbol "G") indicating that the reset factor has been generated by an operation or a program while the CPU is operating is set in the reset factor register CREG, and in step S2, the CPU 1 is set to the idle state. Become.

【0022】またシステム稼動中に主電源断を検出する
と主電源断処理に割込入力する。ステップS11では
リセット要因レジスタCREGに「0」をセットする。
なお、本実施例では電源断により揮発性RAMからなる
データメモリ3の内容は「0」になると仮定しているの
で、ステップS11の処理は必ずしも必要では無い。ス
テップS12ではデータメモリ3の立ち上げ情報ADA
Tとバックアップメモリ2の立ち上げ情報BDATとを
比較し、ステップS13では全て一致か否かを判別す
る。全て一致ではない場合はステップS14でデータメ
モリ3の立ち上げ情報ADATをバックアップメモリ2
の立ち上げ情報BDATに退避する。また全て一致の場
合はステップS14の処理をスキップする。ステップS
15ではCPU1はアイドル状態になり、バックアップ
電源の断を待つ。
When the main power supply interruption is detected during the operation of the system, an interrupt is inputted to the main power supply interruption processing. In step S11, "0" is set in the reset factor register CREG.
In this embodiment, it is assumed that the contents of the data memory 3 composed of the volatile RAM become “0” due to the power-off, so that the processing in step S11 is not necessarily required. In step S12, the startup information ADA of the data memory 3
T is compared with the start-up information BDAT of the backup memory 2, and in step S13, it is determined whether or not all match. If they do not all match, the start-up information ADAT of the data memory 3 is stored in the backup memory 2 in step S14.
To the startup information BDAT. If all match, the process of step S14 is skipped. Step S
At 15, CPU 1 enters an idle state and waits for the backup power supply to be turned off.

【0023】またCPU1はリセット信号RSが入力さ
れた後は共通の立ち上げ処理を実行する。ステップS
21ではリセット要因レジスタCREGの内容が「G」
か否かを判別する。「G」でない(Gが破棄されてい
る)場合)は電源断があったので、ステップS22でバ
ックアップメモリ2の立ち上げ情報BDATをデータメ
モリ3の立ち上げ情報ADATにロードする。以後、デ
ータメモリ3で高速読出、及び高速書込(更新)を可能
とするためである。また「G」の場合はデータメモリ3
の立ち上げ情報ADATは破壊されていないのでステッ
プS22の処理をスキップする。ステップS23ではデ
ータメモリ3の立ち上げ情報ADATでシステムを立ち
上げる。ステップS24では本CPUシステムに固有の
機能制御を行うと共に、立ち上げ情報ADATの更新が
必要となった場合には適宜にその更新を行う。
After the reset signal RS is input, the CPU 1 executes a common start-up process. Step S
At 21, the content of the reset cause register CREG is "G".
It is determined whether or not. If it is not “G” (G is discarded), the power has been turned off, so the startup information BDAT of the backup memory 2 is loaded into the startup information ADAT of the data memory 3 in step S22. Thereafter, the data memory 3 enables high-speed reading and high-speed writing (updating). In the case of "G", the data memory 3
Since the startup information ADAT is not destroyed, the process of step S22 is skipped. In step S23, the system is started with the start information ADAT in the data memory 3. In step S24, a function control specific to the CPU system is performed, and when the startup information ADAT needs to be updated, the update is performed as appropriate.

【0024】図5は他の実施例の主電源断処理のフロ
ーチャートである。この例はバックアップメモリ2が複
数のメモリブロック21 〜2n を備えており、これらを
順に使用することでバックアップメモリ2の一層の延命
を図る処理である。ステップS31〜S33の処理は図
4の(B)のステップS11〜S13の処理と同様であ
る。ステップS33の判別で全て一致ではない場合は、
ステップS34で現時点のポインタPが指す書込カウン
タの内容CTR(P)が書込制限回数mより大か否かを
判別する。CTR(P)>mでないの場合はステップS
39に進み、データメモリ3の立ち上げ情報ADATを
バックアップメモリ2の当該ポインタPの指すメモリブ
ロックの立ち上げ情報BDAT(P)に退避する。
FIG. 5 is a flowchart of a main power-off process according to another embodiment. In this example, the backup memory 2 includes a plurality of memory blocks 2 1 to 2 n , and is a process for extending the life of the backup memory 2 by using them sequentially. The processing in steps S31 to S33 is the same as the processing in steps S11 to S13 in FIG. If not all match in the determination in step S33,
In step S34, it is determined whether or not the content CTR (P) of the write counter indicated by the current pointer P is greater than the write limit number m. If CTR (P)> m, step S
Proceeding to 39, the startup information ADAT of the data memory 3 is saved to the startup information BDAT (P) of the memory block indicated by the pointer P in the backup memory 2.

【0025】またCTR(P)>mの場合はステップS
35で当該ポインタPが指す使用フラグの内容を「使用
中」から「使用済」に書換え、ステップS36でポイン
タPを次のメモリブロックに更新する。ステップS37
ではポインタPが最大ブロック数nを超えているか否か
を判別し、超えていればこのCPUシステムの寿命であ
る旨を使用者に知らせるべく、ステップS41で例えば
機能部200の不図示のブザーや警報ランプに警報を発
生する。
If CTR (P)> m, step S
At 35, the content of the use flag pointed to by the pointer P is rewritten from "in use" to "used", and at step S36, the pointer P is updated to the next memory block. Step S37
In step S41, it is determined whether or not the pointer P has exceeded the maximum block number n. If the pointer P has exceeded the maximum block number n, the buzzer (not shown) of the functional section 200 Generate an alarm on the alarm lamp.

【0026】またP>nでなければステップS38で前
記更新されたメモリブロックの使用フラグUF(P)を
「未使用」から「使用中」に書換え、ステップS39で
データメモリ3の立ち上げ情報ADATをバックアップ
メモリ2の立ち上げ情報BDAT(P)に退避する。ス
テップS40では書込カウンタCTR(P)の内容に+
1する。
If P> n is not satisfied, the use flag UF (P) of the updated memory block is rewritten from "unused" to "in use" in step S38, and the start-up information ADAT of the data memory 3 is changed in step S39. Is saved in the startup information BDAT (P) of the backup memory 2. In step S40, the content of the write counter CTR (P) is incremented by +
Do one.

【0027】また上記ステップS33の判別で全て一致
の場合は何もしないでステップS42のアイドル状態に
入る。従って、書込制限回数=mのEEPROMを使用
して実際にはm×n回の書込が行えることになり、もっ
て機器の寿命が格段に延びることになる。図6は他の実
施例のCPU応用システムのブロック図で、図において
14はリセット要因レジスタCREGの代わりに設けた
フリップフロップ回路FF(第2の記憶手段14に相
当)である。
In the case where the determinations in step S33 are all coincident, the process enters the idle state in step S42 without doing anything. Therefore, m × n times of writing can actually be performed using an EEPROM with the number of times of writing = m, and the life of the device is significantly extended. FIG. 6 is a block diagram of a CPU application system according to another embodiment. In FIG. 6, reference numeral 14 denotes a flip-flop circuit FF (corresponding to the second storage means 14) provided in place of the reset factor register CREG.

【0028】このフリップフロップ回路14はパワーオ
ンリセット信号PWRの立ち下がりでセットされ、かつ
操作又はプログラムによるリセット信号RPによりリセ
ットされる。従って、システムの立ち上げ時には、CP
U1は図4の(C)のステップS21の判別処理で共通
バス5を介してフリップフロップ回路14の出力信号C
を検査することにより、電源断による立ち上げなのか、
稼動中のリセット信号による立ち上げなのかを確実に判
別できる。
The flip-flop circuit 14 is set at the fall of the power-on reset signal PWR and is reset by a reset signal RP by operation or program. Therefore, when starting up the system,
U1 is an output signal C of the flip-flop circuit 14 via the common bus 5 in the determination processing of step S21 of FIG.
By inspecting the
It is possible to reliably determine whether or not the startup is due to the reset signal during operation.

【0029】従って、この実施例によれば、図2のリセ
ット要因レジスタCREGは必要ないし、またリセット
要因レジスタCREGを制御するためのリセット要因記
録処理も必要ないから、CPU1の第2の割込端子I
2 も、また該処理を完了させるための遅延回路12も
必要無い。従って、この実施例では回路及び処理が簡略
化される。
Therefore, according to this embodiment, the reset factor register CREG shown in FIG. 2 is not required, and the reset factor recording process for controlling the reset factor register CREG is not required. I
Neither 2 nor the delay circuit 12 for completing the processing is required. Therefore, the circuit and processing are simplified in this embodiment.

【0030】なお、上記実施例では立ち上げ情報はシス
テムの立ち上げ時にのみ使用されたが、電話番号やその
他のパラメータ情報が含まれることに鑑み、本発明の立
ち上げ情報は機器の運用時にも参照されることは明らか
である。また、リセット要因レジスタCREG33 をR
AM3に設けたが、これに限らない。CPU1内のリセ
ット信号RSによりリセットされないレジスタを使用し
ても良いし、特別なレジスタを共通バス5に接続して設
けても良い。特別なレジスタを共通バス5に接続した場
合はバックアップ電源32で常時これに給電すれば、セ
ットした情報が失われることは無い。
In the above embodiment, the start-up information is used only when the system is started up. However, in view of the fact that telephone numbers and other parameter information are included, the start-up information of the present invention is also used when the equipment is operated. It is clear that reference is made. Further, the reset source register CREG3 3 R
Although provided in AM3, it is not limited to this. A register that is not reset by the reset signal RS in the CPU 1 may be used, or a special register may be connected to the common bus 5. When a special register is connected to the common bus 5, if the power is always supplied to this by the backup power supply 32, the set information is not lost.

【0031】また、上記本発明に好適なる実施例を述べ
たが、本発明思想を逸脱しない範囲内で、構成及び制御
の様々な変更が行えることは言うまでも無い。
Although the preferred embodiment of the present invention has been described, it goes without saying that various changes in the configuration and control can be made without departing from the spirit of the present invention.

【0032】[0032]

【発明の効果】以上述べた如く本発明によれば、CPU
1は主電源の断検出による第1の割込処理において不揮
発性メモリ2と揮発性メモリ3の各立ち上げ情報を比較
すると共に、不一致が存在する場合のみ揮発性メモリ3
の立ち上げ情報を不揮発性メモリ2に書き込むので、書
込回数制限付き不揮発性メモリ2への書込回数を格段に
低減でき、機器の寿命が格段に延びる。
As described above, according to the present invention, the CPU
Reference numeral 1 denotes a comparison between the startup information of the nonvolatile memory 2 and the start-up information of the volatile memory 3 in the first interrupt processing based on the detection of the interruption of the main power supply.
Is written to the nonvolatile memory 2, the number of times of writing to the nonvolatile memory 2 with the limited number of times of writing can be significantly reduced, and the life of the device is significantly extended.

【0033】また、不揮発性メモリ2を複数のメモリブ
ロック21 〜2n となしてこれらを順次使用するので不
揮発性メモリ2の見かけ上の書込制限回数は大幅にアッ
プする。
Further, since the nonvolatile memory 2 is formed into a plurality of memory blocks 2 1 to 2 n and these are sequentially used, the apparent write limit of the nonvolatile memory 2 is greatly increased.

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

【図1】図1は本発明の原理的構成図である。FIG. 1 is a diagram showing the basic configuration of the present invention.

【図2】図2は実施例のCPU応用システムのブロック
図である。
FIG. 2 is a block diagram of a CPU application system according to the embodiment;

【図3】図3は実施例のCPU応用システムの動作タイ
ミングチャートである。
FIG. 3 is an operation timing chart of the CPU application system of the embodiment.

【図4】図4は実施例のCPU応用システムのフローチ
ャートである。
FIG. 4 is a flowchart of the CPU application system of the embodiment.

【図5】図5は他の実施例の処理のフローチャートで
ある。
FIG. 5 is a flowchart of a process according to another embodiment.

【図6】図6は他の実施例のCPU応用システムのブロ
ック図である。
FIG. 6 is a block diagram of a CPU application system according to another embodiment.

【符号の説明】[Explanation of symbols]

1 CPU 2 不揮発性メモリ 3 揮発性メモリ 31 主電源 32 バックアップ電源 35 断検出回路 DESCRIPTION OF SYMBOLS 1 CPU 2 Non-volatile memory 3 Volatile memory 31 Main power supply 32 Backup power supply 35 Disconnection detection circuit

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 1/30 G06F 1/00 370 G06F 12/16 340 G11C 16/02 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int. Cl. 7 , DB name) G06F 1/30 G06F 1/00 370 G06F 12/16 340 G11C 16/02

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 システムの主制御を行うCPU(1)
と、 システムの立ち上げ情報をバックアップ保持する不揮発
性メモリ(2)と、 前記不揮発性メモリ(2)の立ち上げ情報を記憶すると
共に必要に応じてCPU(1)によりその内容を更新さ
れる揮発性メモリ(3)と、 システムの主電源(31)の断時に該システムへの給電
を所定時間バックアップするバックアップ電源(32)
と、 主電源の断検出によりCPU(1)に対して第1の割込
を発生する断検出回路(35)とを備え、 CPU(1)は前記第1の割込処理において不揮発性メ
モリ(2)と揮発性メモリ(3)の各立ち上げ情報を比
較すると共に、不一致が存在する場合のみ揮発性メモリ
(3)の立ち上げ情報を不揮発性メモリ(2)に書き込
むことを特徴とするCPUシステム。
A CPU for performing main control of the system;
A non-volatile memory (2) for backing up system startup information; a volatile memory for storing the startup information of the non-volatile memory (2) and updating its contents as needed by the CPU (1). Power supply (32) for backing up the power supply to the system for a predetermined time when the main power supply (31) of the system is cut off
And a disconnection detection circuit (35) for generating a first interrupt to the CPU (1) upon detection of the disconnection of the main power supply. CPU which compares the startup information of the volatile memory (2) with the startup information of the volatile memory (3) and writes the startup information of the volatile memory (3) to the nonvolatile memory (2) only when there is a mismatch. system.
【請求項2】 操作又はプログラムによって生成される
リセット信号によりCPU(1)に対して第2の割込を
発生する割込発生回路(10)と、 前記第2の割込処理においてCPU(1)により該割込
がリセット信号に起因する旨の特定の情報をセットされ
る第1の記憶手段(33 )と、 前記リセット信号のCPU(1)への入力を所定時間遅
延させる遅延回路(12)とを備え、 CPU(1)はシステムの立ち上げ時に前記第1の記憶
手段(33 )の内容を識別すると共に、該内容が前記特
定の情報の場合は揮発性メモリ(3)の立ち上げ情報で
システムを立ち上げ、それ以外の場合は不揮発性メモリ
(2)の立ち上げ情報でシステムを立ち上げることを特
徴とする請求項1のCPUシステム。
2. An interrupt generating circuit (10) for generating a second interrupt to a CPU (1) by a reset signal generated by an operation or a program, and a CPU (1) in said second interrupt processing. ) by a first storage means該割write is set specific information to the effect that due to the reset signal (3 3), a delay circuit for a predetermined time delay the input to the CPU (1) of the reset signal ( 12) and provided with, CPU (1) along with identifying the contents of raising the first storage unit when the system (3 3), if the contents of the specific information of the volatile memory (3) 2. The CPU system according to claim 1, wherein the system is started with the start information, and otherwise, the system is started with the start information of the nonvolatile memory.
【請求項3】 パワーオンリセット信号によりセット/
リセットされ、かつ操作又はプログラムによって生成さ
れるリセット信号によりリセット/セットされる第2の
記憶手段(14)を備え、 CPU(1)はシステムの立ち上げ時に前記第2の記憶
手段(14)の内容を判別すると共に、該内容がセット
/リセットの場合は不揮発性メモリ(2)の立ち上げ情
報でシステムを立ち上げ、リセット/セットの場合は揮
発性メモリ(3)の立ち上げ情報でシステムを立ち上げ
ることを特徴とする請求項1のCPUシステム。
3. A method of setting / resetting a power-on reset signal.
A second storage means (14) which is reset and reset / set by a reset signal generated by an operation or a program, wherein the CPU (1) stores the second storage means (14) at system start-up; The contents are discriminated, and if the contents are set / reset, the system is started with the start-up information of the nonvolatile memory (2). If the contents are reset / set, the system is started with the start-up information of the volatile memory (3). The CPU system according to claim 1, wherein the CPU system is started up.
【請求項4】 不揮発性メモリ(2)は夫々が立ち上げ
情報を記憶可能な複数のメモリブロック(21 〜2n
を備え、一つのメモリブロックヘの立ち上げ情報の書込
回数が所定値を超えたことにより次のメモリブロックへ
の書き込みが行われることを特徴とする請求項1のCP
Uシステム。
4. A nonvolatile memory (2) comprising a plurality of memory blocks (2 1 to 2 n ) each capable of storing start-up information.
2. The CP according to claim 1, wherein when the number of times of starting information writing to one memory block exceeds a predetermined value, writing to the next memory block is performed.
U system.
JP4959494A 1994-03-18 1994-03-18 CPU system Expired - Fee Related JP3113486B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4959494A JP3113486B2 (en) 1994-03-18 1994-03-18 CPU system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4959494A JP3113486B2 (en) 1994-03-18 1994-03-18 CPU system

Publications (2)

Publication Number Publication Date
JPH07261887A JPH07261887A (en) 1995-10-13
JP3113486B2 true JP3113486B2 (en) 2000-11-27

Family

ID=12835569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4959494A Expired - Fee Related JP3113486B2 (en) 1994-03-18 1994-03-18 CPU system

Country Status (1)

Country Link
JP (1) JP3113486B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2034745A1 (en) 2007-09-07 2009-03-11 Canon Kabushiki Kaisha Projection display apparatus
CN105280231A (en) * 2015-07-23 2016-01-27 深圳市振邦智能科技有限公司 Method and apparatus for reducing erasure/write frequency of EEPROM

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003188949A (en) * 2001-12-21 2003-07-04 Nec Corp Portable telephone set, its data protecting method and program
GB2396533B (en) * 2001-12-21 2005-06-29 Nec Corp Cellular phone,and data protection method and program thereof
JP2006350930A (en) * 2005-06-20 2006-12-28 Fuji Xerox Co Ltd Control circuit and information processor
JP2008059007A (en) * 2006-08-29 2008-03-13 Hitachi Ltd Semiconductor storage device
JP2012063884A (en) 2010-09-14 2012-03-29 Toshiba Corp Storage device, electronics and control method of storage device
JP6011272B2 (en) * 2012-11-22 2016-10-19 富士通株式会社 Storage device, recovery method, and recovery program
CN106604138A (en) * 2016-12-08 2017-04-26 Tcl集团股份有限公司 Remote restoration method and system for intelligent television

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2034745A1 (en) 2007-09-07 2009-03-11 Canon Kabushiki Kaisha Projection display apparatus
JP2009064285A (en) * 2007-09-07 2009-03-26 Canon Inc Projection display device
CN105280231A (en) * 2015-07-23 2016-01-27 深圳市振邦智能科技有限公司 Method and apparatus for reducing erasure/write frequency of EEPROM

Also Published As

Publication number Publication date
JPH07261887A (en) 1995-10-13

Similar Documents

Publication Publication Date Title
US5557777A (en) Method and apparatus for system recovery from power loss
US6839568B2 (en) User setting information management method and management system for portable telephone
US8683457B1 (en) Updating firmware of an electronic device by storing a version identifier in a separate header
US20090013198A1 (en) Electronic apparatus with improved memory power management
US7908469B2 (en) Method for executing power on self test on a computer system and updating SMBIOS information partially
JP2009134692A (en) Auto repair method of system configuration using single key control
CN102016824A (en) System on a chip integrated circuit, processing system and methods for use therewith
JP3113486B2 (en) CPU system
US20170046229A1 (en) Dual boot computer system
US5435005A (en) Method and system for controlling resuming operation of an AC-driven computer system using an external memory
KR19990007309A (en) How to reset the system
WO2000054133A1 (en) Information processor, method for saving/loading data, and information recorded medium
CN108873668B (en) Time calibration method, processor and time calibration system
US6713778B2 (en) Register setting method and semiconductor device
TW201926054A (en) Cable modem and operating method thereof
JPH09305395A (en) Electronic equipment
JP2008009494A (en) Image forming device
JP4702343B2 (en) Mobile terminal device
JP2001154927A (en) Data backup device and storage medium storing backup control program
JP4655398B2 (en) Vehicle control device with backup function
JPH0527875A (en) Electronic equipment
JP2002182805A (en) Information terminal and recording medium recorded with power management processing program
JP2001331325A (en) Initial startup device, its method and recording medium
TW202209116A (en) Bios recovery system and method
CN115454513A (en) Method and device for testing automatic dormancy and automatic dormancy functions in Linux system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000905

LAPS Cancellation because of no payment of annual fees