JPH07261887A - CPU system - Google Patents

CPU system

Info

Publication number
JPH07261887A
JPH07261887A JP4959494A JP4959494A JPH07261887A JP H07261887 A JPH07261887 A JP H07261887A JP 4959494 A JP4959494 A JP 4959494A JP 4959494 A JP4959494 A JP 4959494A JP H07261887 A JPH07261887 A JP H07261887A
Authority
JP
Japan
Prior art keywords
cpu
memory
startup information
volatile memory
reset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP4959494A
Other languages
Japanese (ja)
Other versions
JP3113486B2 (en
Inventor
Ichirou Fujioki
一郎 藤沖
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

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

Abstract

(57)【要約】 【目的】 本発明はCPUシステムに関し、システムの
立ち上げ情報をバックアップ保持する不揮発性メモリが
長持ちするCPUシステムの提供を目的とする。 【構成】 システムの主制御を行うCPU1と、システ
ムの立ち上げ情報をバックアップ保持する不揮発性メモ
リ2と、前記不揮発性メモリ2の立ち上げ情報を記憶す
ると共に必要に応じてCPU1によりその内容を更新さ
れる揮発性メモリ3と、システムの主電源31の断時に
該システムへの給電を所定時間バックアップするバック
アップ電源32と、主電源の断検出によりCPU1に対
して第1の割込を発生する断検出回路35とを備え、C
PU1は前記第1の割込処理において不揮発性メモリ2
と揮発性メモリ3の各立ち上げ情報を比較すると共に、
不一致が存在する場合のみ揮発性メモリ3の立ち上げ情
報を不揮発性メモリ2に書き込む。また、CPU1はシ
ステムの立ち上げ時にリセット後の立ち上げか電源断後
の立ち上げかを判別し、前者の場合は揮発性メモリ3の
立ち上げ情報でシステムを立ち上げ、後者の場合は不揮
発性メモリ2の立ち上げ情報でシステムを立ち上げる。
(57) [Abstract] [Object] The present invention relates to a CPU system, and an object of the present invention is to provide a CPU system in which a nonvolatile memory for backing up and holding system startup information lasts a long time. [Structure] A CPU 1 that performs main control of the system, a nonvolatile memory 2 that backs up and holds system startup information, and startup information of the nonvolatile memory 2 that is stored and updated by the CPU 1 as necessary. Volatile memory 3, a backup power supply 32 that backs up power to the system for a predetermined time when the main power supply 31 of the system is cut off, and a disconnection that generates a first interrupt to the CPU 1 by detecting the disconnection of the main power supply. A detection circuit 35, and C
PU1 is a nonvolatile memory 2 in the first interrupt processing.
And comparing each startup information of the volatile memory 3,
Only when there is a mismatch, the startup information of the volatile memory 3 is written in the nonvolatile memory 2. Further, the CPU 1 determines at the time of system startup whether the system is booted after resetting or powering off. In the former case, the system is booted by the boot information of the volatile memory 3, and in the latter case, it is non-volatile. The system is started up with the startup information of the memory 2.

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 writes that backs up system startup information
M) with a CPU system. Nowadays, every electronic device has a CPU in a control unit, and the CPU starts a system (device) to a predetermined function according to predetermined startup information after power-on reset or reset by an operation or a program. If the start-up information is fixed from the time of manufacture, it may be stored in the ROM. For example, in a mobile radio telephone (mobile device), the start-up information includes a device number, a telephone number, and various other information. The control parameters and the like are included, and the data changes during the operation of the mobile device.

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

【0003】[0003]

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

【0004】[0004]

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

【0005】本発明の目的は、システムの立ち上げ情報
をバックアップ保持する不揮発性メモリが長持ちするC
PUシステムを提供することにある。
An object of the present invention is to provide a long-lasting C memory for a non-volatile memory for backup-holding system startup information.
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 problems can be solved by the structure shown in FIG. That is, the CPU system of the present invention is
A CPU 1 that performs the main control of the system, a nonvolatile memory 2 that backs up and holds system startup information, and startup information of the nonvolatile memory 2 that is stored and the contents of which are updated by the CPU 1 as needed. Memory 3, a backup power supply 32 that backs up power 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 that generates a first interrupt to the CPU 1 by detecting the disconnection of the main power supply. The CPU 1 compares the startup information of the nonvolatile memory 2 with the startup information of the volatile memory 3 in the first interrupt processing, and the startup information of the volatile memory 3 is nonvolatile only when there is a mismatch. The data is written in the memory 2.

【0007】[0007]

【作用】システムに電源投入するとCPU1は不揮発性
メモリ2の立ち上げ情報でシステムを立ち上げ、該不揮
発性メモリ2の立ち上げ情報を揮発性メモリ3にロード
する。又は不揮発性メモリ2の立ち上げ情報を揮発性メ
モリ3にロードし、該揮発性メモリ3の立ち上げ情報で
システムを立ち上げる。何れにしても、稼動中は揮発性
メモリ3にアクセスすることで、立ち上げ情報の高速読
み出し、及び書き込み(更新)が行える。
When the system is powered 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 up with 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 cut off, the backup power supply 32 backs up the 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, the CPU 1 compares the startup information of the nonvolatile memory 2 and the startup information of the volatile memory 3 in the first interrupt processing, and sets the startup information of the volatile memory 3 to the nonvolatile memory only when there is a mismatch. Write to 2.

【0009】従って、現実にはシステムの稼動中に揮発
性メモリ3の立ち上げ情報が更新されない場合も多いか
ら、かかる場合には不揮発性メモリ2への書き込みを行
わず、もって不揮発性メモリ2が長持ちする。好ましく
は、操作又はプログラムによって生成されるリセット信
号によりCPU1に対して第2の割込を発生する割込発
生回路10と、前記第2の割込処理においてCPU1に
より該割込がリセット信号に起因する旨の特定の情報を
セットされる第1の記憶手段33 と、前記リセット信号
のCPU1への入力を所定時間遅延させる遅延回路12
とを備え、CPU1はシステムの立ち上げ時に前記第1
の記憶手段33 の内容を識別すると共に、該内容が前記
特定の情報の場合は揮発性メモリ3の立ち上げ情報でシ
ステムを立ち上げ、それ以外の場合は不揮発性メモリ2
の立ち上げ情報でシステムを立ち上げる。
Therefore, in reality, in many cases, the startup information of the volatile memory 3 is not updated during the operation of the system. In such a case, the writing to the non-volatile memory 2 is not performed, so that the non-volatile memory 2 is not updated. long lasting. Preferably, an interrupt generation circuit 10 for generating 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. First storage means 3 3 in which specific information to the effect that it is set and a delay circuit 12 for delaying the input of the reset signal to the CPU 1 for a predetermined time are provided.
And the CPU 1 has the first
The content of the storage means 3 3 is identified, and if the content is the specific information, the system is started up by the startup information of the volatile memory 3, otherwise the nonvolatile memory 2 is started.
Start up 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 startup except when the main power is turned off, even if the content of the volatile memory 3 is updated, it is not necessary to save it in the nonvolatile memory 2. Absent. Therefore, even in such a case, writing to the non-volatile memory 2 is not performed, and thus the non-volatile memory 2 lasts a long time. Further, preferably, the CPU is provided with a second storage means 14 which is set / reset by a power-on reset signal and is reset / set by a reset signal generated by an operation or a program.
Reference numeral 1 determines the contents of the second storage means 14 when the system is started up, and when the contents are set / reset, the system is started up by the start-up information of the non-volatile memory 2, and when the contents are reset / set. The system is started up with 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
In addition to being long-lasting, the present CPU system can be realized by a simpler circuit 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 By this, writing to the next memory block is performed.
Therefore, the apparent life of the non-volatile memory 2 is significantly extended.

【0012】[0012]

【実施例】以下、添付図面に従って本発明による実施例
を詳細に説明する。なお、全図を通して同一符号は同一
又は相当部分を示すものとする。図2は実施例のCPU
応用システムのブロック図で、このCPU応用システム
はCPUを含む制御部100と、機器固有の機能を実現
する機能部200と電源部300とから成る。
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The same reference numerals denote the same or corresponding parts throughout the drawings. FIG. 2 is a CPU of the embodiment
In the block diagram of the application system, the CPU application system includes a control unit 100 including a CPU, a function unit 200 that implements a device-specific function, 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, 1 is a CPU for performing main control of the system, and 2 is a backup memory (BME) which is a non-volatile memory with a limited number of times of writing, such as an EEPROM, which holds backup information of system startup.
M) 2 1 to 2 n each have a use flag UF for holding an unused / in use / used state, and a write counter CTR for counting and holding the number of times of writing to this area.
And a storage area for the 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 is a pointer (P) pointing to the memory blocks 2 1 to 2 n , and 3 3 is a register CR holding a reset factor
EG (corresponding to the first storage 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, 4 is a program memory (PME) including a ROM for storing the control programs shown in FIGS.
M), 5 is a common bus of the CPU 1, 6 is a power-on reset circuit, 6 1 is a Schmitt trigger circuit (ST), 7 is a manual reset button, 8 is an inverter circuit (I),
Reference numeral 9 is a pulse generator (P which generates a manual reset pulse MRP having a predetermined pulse width at the falling edge of the input).
G), 10 is an OR gate circuit O (corresponding to the interrupt generation circuit 10), 11 is a program reset pulse P by decoding the reset command (program reset) of the CPU 1.
A bus decoder (BD) that generates 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, 21 is an extension bus of the CPU 1, and 22 is a functional circuit (FC) for realizing the functions of a mobile communication device and the like. Further, in the power source unit 300, 31 is a main power source made of a battery, 32 is a backup power source also made of a battery, and 33 is a power source O.
N / OFF switch, 34 is a switch circuit including a semiconductor switch element or relay, and 35 is a Schmitt trigger circuit ST (corresponding to the disconnection detection circuit 35) for detecting disconnection of the main power supply.
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. The operation will be described below with reference to FIG. FIG. 3A shows a timing chart when a reset signal is generated during system operation. 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, and the falling of the reset pulse RP causes the CPU 1 to execute the reset factor recording process described later.

【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 execution of 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 system start-up process, which will be 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 main power source V during system operation.
The timing chart in the case of disconnection is shown.
When the power supply ON / OFF switch 33 is turned off, the main power supply V is rapidly lowered, and the Schmitt trigger circuit 35 which has detected this causes a power interruption interrupt to the first interrupt terminal I 1 of the CPU 1. On the other hand, the transistor Q has been conducting for a while due to the electric charge accumulated in the capacitor C 2 , so that the switch circuit 34 is kept ON and the backup power supply V ′ is continuously supplied from the backup power supply 32 to the system. During this period, the CPU 1 executes the main power-off processing, which will be described later, when the main power-off interrupt signal falls. The time T 2 during which the transistor Q is conducting has a time longer than the completion of execution of the main power-off process, and during this time, the CPU 1
Ends the main power-off process. Then, when the time T 2 elapses, the transistor Q is turned off, so that the power supply of the backup power supply V ′ is also stopped and the system is turned off.
It becomes the F state.

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

【0020】主電源Vがシステムに供給されると、パワ
ーオンリセット回路6はパワーオンリセット信号PWR
を発生する。これによりCPU1はパワーオンリセット
されると共に、該パワーオンリセット信号PWRが無く
なると、プログラムメモリ4の所定番地から始まる後述
のシステムの立ち上げ処理を実行する。図4は実施例
のCPU応用システムのフローチャートである。なお、
この例ではバックアップメモリ2のメモリブロックが一
つの場合を説明する。
When the main power V is supplied to the system, the power-on reset circuit 6 causes the power-on reset signal PWR.
To occur. As a result, the CPU 1 is power-on-reset, and when the power-on reset signal PWR disappears, the CPU 1 executes a system start-up process, which will be 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 the operation of the system, the reset factor recording process is interrupted. In such a restart process based on the reset signal RP, even if the startup information ADAT of the data memory 3 is updated, it can be used at the time of restart, so that it can be used as the backup memory 2
There is no need to evacuate to, so be sure to know this when restarting. That is, in step S1, the reset factor register CREG is set with information indicating that the reset factor has caused a reset signal by an operation or a program during CPU operation (for example, reference sign "G"), and in step S2, the CPU 1 is set in 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はアイドル状態になり、バックアップ
電源の断を待つ。
Further, if the main power cutoff is detected while the system is operating, the main power cutoff processing is interrupted. In step S11, "0" is set in the reset factor register CREG.
In the present embodiment, it is assumed that the content of the data memory 3 composed of the volatile RAM becomes "0" due to the power interruption, so that the process of step S11 is not always necessary. In step S12, the startup information ADA of the data memory 3
T is compared with the startup information BDAT of the backup memory 2, and it is determined in step S13 whether they all match. If they do not match, the startup information ADAT in the data memory 3 is saved 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, the CPU 1 becomes idle and waits for the backup power supply to be cut 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の更新が
必要となった場合には適宜にその更新を行う。
Further, the CPU 1 executes a common start-up process after the reset signal RS is input. Step S
21, the content of the reset factor register CREG is "G".
Or not. If it is not "G" (when G is discarded), the power has been cut 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. This is because thereafter, high-speed reading and high-speed writing (updating) can be performed in the data memory 3. 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 up with the startup information ADAT of the data memory 3. In step S24, the function control peculiar to the present CPU system is performed, and when the startup information ADAT needs to be updated, it is updated 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 flow chart of the main power-off process of another embodiment. In this example, the backup memory 2 is provided with a plurality of memory blocks 2 1 to 2 n , and these are used in order to further extend the life of the backup memory 2. The processing of steps S31 to S33 is the same as the processing of steps S11 to S13 of FIG. If it is determined in step S33 that they do not match,
In step S34, it is determined whether or not the content CTR (P) of the write counter indicated by the pointer P at the present time point is larger than the write limit number m. If CTR (P)> m is not satisfied, step S
In step 39, the startup information ADAT of the data memory 3 is saved in the startup information BDAT (P) of the memory block pointed to by the pointer P of 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 usage flag pointed to by the pointer P is rewritten from "in use" to "used", and the pointer P is updated to the next memory block at step S36. Step S37
Then, it is determined whether or not the pointer P exceeds the maximum number n of blocks, and if it exceeds the maximum number of blocks n, in step S41, for example, a buzzer (not shown) of the functional unit 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 usage flag UF (P) of the updated memory block is rewritten from "unused" to "in use" in step S38, and the startup information ADAT of the data memory 3 is written in step S39. Is saved in the startup information BDAT (P) of the backup memory 2. In step S40, the contents of the write counter CTR (P) are added to +
Do 1

【0027】また上記ステップS33の判別で全て一致
の場合は何もしないでステップS42のアイドル状態に
入る。従って、書込制限回数=mのEEPROMを使用
して実際にはm×n回の書込が行えることになり、もっ
て機器の寿命が格段に延びることになる。図6は他の実
施例のCPU応用システムのブロック図で、図において
14はリセット要因レジスタCREGの代わりに設けた
フリップフロップ回路FF(第2の記憶手段14に相
当)である。
If all of them match in the determination in step S33, nothing is done and the idle state is entered in step S42. Therefore, writing can be actually performed m × n times by using the EEPROM with the write limit number = m, and thus the life of the device is significantly extended. FIG. 6 is a block diagram of a CPU application system of another embodiment. In the figure, reference numeral 14 is 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 falling edge of the power-on reset signal PWR and reset by the reset signal RP by the operation or the program. Therefore, when starting the system, CP
U1 is the output signal C of the flip-flop circuit 14 via the common bus 5 in the determination processing in step S21 of FIG.
By inspecting, whether the startup is due to power off,
It can be surely determined whether the startup is due to the reset signal during operation.

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

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

【0031】また、上記本発明に好適なる実施例を述べ
たが、本発明思想を逸脱しない範囲内で、構成及び制御
の様々な変更が行えることは言うまでも無い。
Although the preferred embodiments of the present invention have been described above, it goes without saying that various changes in 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
1 compares each startup information of the non-volatile memory 2 and the volatile memory 3 in the first interrupt processing by detecting the disconnection of the main power source, and only when there is a mismatch, the volatile memory 3
Since the start-up information is written in the non-volatile memory 2, the number of writings in the non-volatile memory 2 with a limited number of writings can be significantly reduced, and the life of the device is significantly extended.

【0033】また、不揮発性メモリ2を複数のメモリブ
ロック21 〜2n となしてこれらを順次使用するので不
揮発性メモリ2の見かけ上の書込制限回数は大幅にアッ
プする。
Further, the writing limit number of apparent non-volatile memory 2 because sequential use of these forms of non-volatile memory 2 and a plurality of memory blocks 2 1 to 2 n are significantly up.

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

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

【図2】図2は実施例のCPU応用システムのブロック
図である。
FIG. 2 is a block diagram of a CPU application system according to an 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 flow chart of processing of 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 断検出回路 1 CPU 2 Non-volatile memory 3 Volatile memory 31 Main power supply 32 Backup power supply 35 Disconnection detection circuit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G11C 16/06 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI technical display location G11C 16/06

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 システムの主制御を行うCPU(1)
と、 システムの立ち上げ情報をバックアップ保持する不揮発
性メモリ(2)と、 前記不揮発性メモリ(2)の立ち上げ情報を記憶すると
共に必要に応じてCPU(1)によりその内容を更新さ
れる揮発性メモリ(3)と、 システムの主電源(31)の断時に該システムへの給電
を所定時間バックアップするバックアップ電源(32)
と、 主電源の断検出によりCPU(1)に対して第1の割込
を発生する断検出回路(35)とを備え、 CPU(1)は前記第1の割込処理において不揮発性メ
モリ(2)と揮発性メモリ(3)の各立ち上げ情報を比
較すると共に、不一致が存在する場合のみ揮発性メモリ
(3)の立ち上げ情報を不揮発性メモリ(2)に書き込
むことを特徴とするCPUシステム。
1. A CPU (1) for main control of the system
A nonvolatile memory (2) for backing up and holding system startup information; and a volatile memory for storing startup information of the nonvolatile memory (2) and updating the content by the CPU (1) as necessary. Power supply memory (3) and backup power supply (32) that backs up power 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) by detecting the disconnection of the main power source. The CPU (1) is a nonvolatile memory () in the first interrupt processing. 2) The startup information of the volatile memory (3) is compared, and the startup information of the volatile memory (3) is written to the non-volatile 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 generation circuit (10) for generating a second interrupt to the CPU (1) by a reset signal generated by an operation or a program, and the CPU (1 ) 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 the CPU (1) identifies the contents of the first storage means (3 3 ) when the system is started up, and when the contents are the specific information, the volatile memory (3) 2. The CPU system according to claim 1, wherein the system is started up with the startup information, and otherwise the system is started up with the startup information of the non-volatile memory (2).
【請求項3】 パワーオンリセット信号によりセット/
リセットされ、かつ操作又はプログラムによって生成さ
れるリセット信号によりリセット/セットされる第2の
記憶手段(14)を備え、 CPU(1)はシステムの立ち上げ時に前記第2の記憶
手段(14)の内容を判別すると共に、該内容がセット
/リセットの場合は不揮発性メモリ(2)の立ち上げ情
報でシステムを立ち上げ、リセット/セットの場合は揮
発性メモリ(3)の立ち上げ情報でシステムを立ち上げ
ることを特徴とする請求項1のCPUシステム。
3. Set / set by a power-on reset signal
A second storage means (14) that is reset and is reset / set by a reset signal generated by an operation or a program is provided, and the CPU (1) stores the second storage means (14) of the second storage means (14) when the system is started up. In addition to determining the contents, if the contents are set / reset, the system is started by the startup information of the nonvolatile memory (2), and if it is the reset / set, the system is started by the startup information of the volatile memory (3). The CPU system according to claim 1, which is started up.
【請求項4】 不揮発性メモリ(2)は夫々が立ち上げ
情報を記憶可能な複数のメモリブロック(21 〜2n
を備え、一つのメモリブロックヘの立ち上げ情報の書込
回数が所定値を超えたことにより次のメモリブロックへ
の書き込みが行われることを特徴とする請求項1のCP
Uシステム。
4. The non-volatile memory (2) comprises a plurality of memory blocks (2 1 to 2 n ) each capable of storing startup information.
2. The CP according to claim 1, wherein the CP is written to the next memory block when the number of times of writing the start-up information to one memory block exceeds a predetermined value.
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 true JPH07261887A (en) 1995-10-13
JP3113486B2 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2385495A (en) * 2001-12-21 2003-08-20 Nec Corp Data backup in a foldable cellular phone
GB2396533A (en) * 2001-12-21 2004-06-23 Nec Corp Cellular phone with data protection program
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 memory device
US8021003B2 (en) 2007-09-07 2011-09-20 Canon Kabushiki Kaisha Projection display apparatus having nonvolatile memory
JP2012063884A (en) * 2010-09-14 2012-03-29 Toshiba Corp Storage device, electronics and control method of storage device
JP2014106567A (en) * 2012-11-22 2014-06-09 Fujitsu Ltd Storage device, restoration method, and restoration program
CN106604138A (en) * 2016-12-08 2017-04-26 Tcl集团股份有限公司 Remote restoration method and system for intelligent television

Families Citing this family (1)

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

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2385495A (en) * 2001-12-21 2003-08-20 Nec Corp Data backup in a foldable cellular phone
GB2396533A (en) * 2001-12-21 2004-06-23 Nec Corp Cellular phone with data protection program
GB2396533B (en) * 2001-12-21 2005-06-29 Nec Corp Cellular phone,and data protection method and program thereof
GB2385495B (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 memory device
US8021003B2 (en) 2007-09-07 2011-09-20 Canon Kabushiki Kaisha Projection display apparatus having nonvolatile memory
JP2012063884A (en) * 2010-09-14 2012-03-29 Toshiba Corp Storage device, electronics and control method of storage device
US8411526B2 (en) 2010-09-14 2013-04-02 Kabushiki Kaisha Toshiba Storage device, electronic device, and storage device control method
JP2014106567A (en) * 2012-11-22 2014-06-09 Fujitsu Ltd Storage device, restoration method, and restoration program
CN106604138A (en) * 2016-12-08 2017-04-26 Tcl集团股份有限公司 Remote restoration method and system for intelligent television

Also Published As

Publication number Publication date
JP3113486B2 (en) 2000-11-27

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
CN109634645B (en) Firmware upgrading method and terminal
ES2824830T3 (en) Software update procedure for an embedded device
CN101916201B (en) Android-based mobile terminal cold-boot method and device
US20080288767A1 (en) Computer system
US8291250B2 (en) Management of power states in a portable computing device
JP2009134692A (en) Auto repair method of system configuration using single key control
US20090013198A1 (en) Electronic apparatus with improved memory power management
WO2011063584A1 (en) Deep standby method and device for embedded system
JP3113486B2 (en) CPU system
CN104424047A (en) NVRAM data recovery method and NVRAM data recovery device
US5435005A (en) Method and system for controlling resuming operation of an AC-driven computer system using an external memory
TW201331841A (en) Electronic apparatus and BIOS updating apparatus thereof
CN100549959C (en) Bootstrap on-line upgrading method
WO2000054133A1 (en) Information processor, method for saving/loading data, and information recorded medium
CN112214353B (en) Firmware recovery method, device, computer equipment and storage medium
CN118550766A (en) System snapshot-based system recovery method, device, equipment and medium
CN100394392C (en) Automatic starting control method and system for computer program recovery mode
JP3186758B2 (en) Mobile terminal device
JP2001154927A (en) Data backup device and storage medium storing backup control program
KR100970706B1 (en) How to enter and resume suspend mode on a portable computer
CN113467796B (en) Solid state disk and starting method
JP2008009494A (en) Image forming device
CN101488089A (en) Computer system and its starting method

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