JP2010128537A - Sales data processor and program - Google Patents

Sales data processor and program Download PDF

Info

Publication number
JP2010128537A
JP2010128537A JP2008299322A JP2008299322A JP2010128537A JP 2010128537 A JP2010128537 A JP 2010128537A JP 2008299322 A JP2008299322 A JP 2008299322A JP 2008299322 A JP2008299322 A JP 2008299322A JP 2010128537 A JP2010128537 A JP 2010128537A
Authority
JP
Japan
Prior art keywords
power supply
data
hibernation
area
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.)
Granted
Application number
JP2008299322A
Other languages
Japanese (ja)
Other versions
JP5444698B2 (en
JP2010128537A5 (en
Inventor
Takahiro Futagawa
隆宏 二川
Tomoyuki Yamashita
智之 山下
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2008299322A priority Critical patent/JP5444698B2/en
Publication of JP2010128537A publication Critical patent/JP2010128537A/en
Publication of JP2010128537A5 publication Critical patent/JP2010128537A5/ja
Application granted granted Critical
Publication of JP5444698B2 publication Critical patent/JP5444698B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Cash Registers Or Receiving Machines (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the consumption of an auxiliary power source to be used for the backup of data in the case of interrupting a main power source in a sales data processor. <P>SOLUTION: In an ECR, a CPU (Central Processing Unit) 10 executes the deletion processing of data stored in a memory for hibernation 14 in a spare time in which there is not any other processing to be executed, and when power supply from an AC power source 31 is interrupted, executes the deletion processing of undeleted residual data stored in the memory for hibernation 14, and saves data stored in the main memory 13 into the memory for hibernation 14 by feeding from an auxiliary power source. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、売上データ処理装置及びプログラムに関する。   The present invention relates to a sales data processing apparatus and a program.

従来、ECR(電子レジスタ)等の売上データ処理装置では、主電源遮断時のシステムの動作状態を示すデータを電池でバックアップされた揮発性メモリに保存しておくことで、停電時や誤操作による主電源の遮断時でもすぐに電源遮断前の動作状態で起動できるようにしている。しかし、近年、売上データ処理装置の高機能化が進み、それに伴いメモリも大容量となっている。そのため、店舗の夏季休業等により主電源の遮断状態が長時間続いた場合に備えて大容量のバックアップ電池が必要となっている。   Conventionally, in sales data processing devices such as ECR (electronic registers), data indicating the operating state of the system when the main power supply is shut down is stored in a volatile memory backed up by a battery, which can be used mainly when a power failure occurs. Even when the power is cut off, it can be started immediately in the operating state before the power is cut off. In recent years, however, sales data processing devices have become more sophisticated, and the memory has also increased in capacity. Therefore, a large-capacity backup battery is required in case the main power supply is shut off for a long time due to a summer holiday of the store.

例えば、特許文献1には、商用電源の瞬断あるいは停電時において中央処理装置と揮発性メモリのみをバッテリでバックアップし、消費電力の大きい周辺装置はバックアップしないようにした商品情報ターミナルが記載されている。
特開平5−11893号公報
For example, Patent Document 1 describes a product information terminal in which only a central processing unit and a volatile memory are backed up by a battery and a peripheral device with high power consumption is not backed up when a commercial power supply is interrupted or a power failure occurs. Yes.
JP-A-5-11893

しかしながら、特許文献1の技術においては、主電源である商用電源の瞬断あるいは停電時のバッテリの容量は低減できるが、店舗の夏季休業等により主電源の遮断状態が長時間続く場合には、大容量のバッテリが必要となる。   However, in the technology of Patent Document 1, although the capacity of the battery at the time of a momentary interruption of a commercial power source that is a main power source or a power failure can be reduced, A large capacity battery is required.

一方、主電源が遮断された際に、補助電源の給電により揮発性メモリのデータを不揮発性記憶手段に退避させることも考えられるが、この場合、前回の主電源の遮断時に不揮発性記憶手段に退避されたデータが残っているため、まず不揮発性記憶手段に記憶されたデータの消去をしてから揮発性メモリのデータの退避を行わなければならない。そのため、主電源を遮断してから動作が完全に停止するまでに時間がかかり、補助電源の消耗が大きい。   On the other hand, when the main power is shut off, it is conceivable to save the data in the volatile memory to the nonvolatile storage means by supplying power from the auxiliary power supply. Since the saved data remains, the data stored in the nonvolatile storage means must first be erased before the data in the volatile memory is saved. For this reason, it takes time until the operation is completely stopped after the main power supply is shut off, and the auxiliary power supply is greatly consumed.

本発明の課題は、売上データ処理装置において、主電源遮断時のデータのバックアップに使用される補助電源の消耗を低減させることである。   An object of the present invention is to reduce the consumption of an auxiliary power source used for data backup when a main power source is shut down in a sales data processing apparatus.

上記課題を解決するため、請求項1に記載の発明の売上データ処理装置は、
主電源からの給電によりデータを記憶する揮発性記憶手段と、
前記主電源の遮断時に前記揮発性記憶手段に記憶されているデータを退避するための不揮発性記憶手段と、
処理の空き時間に前記不揮発性記憶手段に記憶されているデータの消去処理を実行し、前記主電源が遮断された際に、補助電源からの給電により前記不揮発性記憶手段に記憶されている未消去の残存データの消去処理を実行し前記揮発性記憶手段に記憶されているデータを前記不揮発性記憶手段に退避させる制御手段と、
を備える。
In order to solve the above-mentioned problem, the sales data processing device of the invention described in claim 1
Volatile storage means for storing data by power supply from the main power supply;
Nonvolatile storage means for saving data stored in the volatile storage means when the main power supply is shut off;
The data stored in the nonvolatile storage means is erased during the processing free time, and when the main power supply is shut off, the data stored in the nonvolatile storage means is not supplied with power from the auxiliary power supply. Control means for executing erasure processing of residual data for erasure and for saving data stored in the volatile storage means to the nonvolatile storage means;
Is provided.

請求項2に記載の発明は、請求項1に記載の発明において、
前記不揮発性記憶手段を複数備え、
前記制御手段は、前記揮発性記憶手段に記憶されているデータを前記複数の不揮発性記憶手段に分散して退避させる。
The invention according to claim 2 is the invention according to claim 1,
A plurality of the nonvolatile storage means;
The control unit distributes and stores data stored in the volatile storage unit to the plurality of nonvolatile storage units.

請求項3に記載の発明は、請求項1又は2に記載の発明において、
前記補助電源からの電源の供給と遮断とを切り替える切り替え手段を備え、
前記制御手段は、前記主電源が遮断された際に前記切り替え手段により前記補助電源に給電を行わせ、前記不揮発性記憶手段へのデータ退避の終了後、前記切り替え手段により前記補助電源を遮断させる。
The invention according to claim 3 is the invention according to claim 1 or 2,
Comprising a switching means for switching between supply and interruption of power from the auxiliary power supply,
The control means causes the switching means to supply power to the auxiliary power supply when the main power is cut off, and causes the switching means to cut off the auxiliary power supply after data saving to the nonvolatile storage means is completed. .

請求項4に記載の発明のプログラムは、
主電源からの給電によりデータを記憶する揮発性記憶手段と、前記主電源の遮断時に前記揮発性記憶手段に記憶されているデータを退避するための不揮発性記憶手段と、を備える売上データ処理装置に用いられるコンピュータを、
処理の空き時間に前記不揮発性記憶手段に記憶されているデータの消去処理を実行し、前記主電源が遮断された際に、補助電源からの給電により前記不揮発性記憶手段に記憶されている未消去の残存データの消去処理を実行し前記揮発性記憶手段に記憶されているデータを前記不揮発性記憶手段に退避させる制御手段、
として機能させる。
The program of the invention described in claim 4 is:
A sales data processing apparatus comprising: volatile storage means for storing data by power supply from a main power supply; and nonvolatile storage means for saving data stored in the volatile storage means when the main power supply is shut off The computer used for
The data stored in the nonvolatile storage means is erased during the processing free time, and when the main power supply is shut off, the data stored in the nonvolatile storage means is not supplied with power from the auxiliary power supply. Control means for executing erasure processing of residual data for erasure and for saving data stored in the volatile storage means to the nonvolatile storage means;
To function as.

本発明によれば、売上データ処理装置において、主電源遮断時のデータのバックアップに使用される補助電源の消耗を低減させることが可能となる。   According to the present invention, in the sales data processing apparatus, it is possible to reduce the consumption of the auxiliary power source used for data backup when the main power source is shut off.

(実施形態1)
まず、本発明の実施形態1について説明する。
図1に、実施形態1におけるECR1の機能構成例を示す。
ECR1は、店舗に設けられ、オペレータの操作に基づいて商品登録処理(取引された日時、商品名、商品の売上個数、売上金額等の売上データ、担当者等の登録処理)、点検処理、精算処理、店舗内の売上集計等を行う売上データ処理装置である。ECR1としては、例えば、電子レジスタ等が適用可能である。
(Embodiment 1)
First, Embodiment 1 of the present invention will be described.
FIG. 1 shows a functional configuration example of the ECR 1 in the first embodiment.
ECR1 is provided in the store, and product registration processing (transaction date and time, product name, number of sales of products, sales data such as sales amount, registration processing of person in charge, etc.), inspection processing, and settlement based on operator operations This is a sales data processing device that performs processing, total sales in a store, and the like. As ECR1, for example, an electronic register or the like is applicable.

図1に示すように、ECR1は、CPU10と、RTC11と、プログラム格納メモリ12と、メインメモリ13と、ハイバネーション用メモリ14と、メイン表示装置151と、サブ表示装置152と、LED16と、印字装置17と、入力装置18と、ストレージI/F19と、通信部20と、を備えて構成され、各部はバス21を介して接続されて構成されている。   As shown in FIG. 1, the ECR 1 includes a CPU 10, an RTC 11, a program storage memory 12, a main memory 13, a hibernation memory 14, a main display device 151, a sub display device 152, an LED 16, and a printing device. 17, an input device 18, a storage I / F 19, and a communication unit 20, and each unit is configured to be connected via a bus 21.

CPU(Central Processing Unit)10は、ECR1の各部を集中制御する制御手段
である。CPU10は、プログラム格納メモリ12に記憶されている各種プログラムをメインメモリ13に展開し、メインメモリ13に展開されたプログラムとの協働により、ECR1全体の制御及び各種処理を実行する。
A CPU (Central Processing Unit) 10 is control means for centrally controlling each part of the ECR 1. The CPU 10 expands various programs stored in the program storage memory 12 in the main memory 13 and executes control of the entire ECR 1 and various processes in cooperation with the programs expanded in the main memory 13.

例えば、CPU10は、AC電源状態監視回路34(図3参照)からAC電源供給を通知する信号が入力されると、プログラム格納メモリ12に記憶されている起動処理プログラム及び終了処理プログラムをメインメモリ13の起動処理・終了処理用ワークエリア131(図2参照)に読み出して、読み出した起動処理プログラムとの協働により後述する起動処理を実行する。   For example, when a signal for notifying AC power supply is input from the AC power supply state monitoring circuit 34 (see FIG. 3), the CPU 10 stores the start processing program and the end processing program stored in the program storage memory 12 into the main memory 13. The startup process / end process work area 131 (see FIG. 2) is read and the startup process described later is executed in cooperation with the read startup process program.

起動処理によりECR1が起動されると、CPU10は、メインメモリ13に記憶されているECR制御プログラムとの協働により後述するECR制御処理を実行し、ECR1の各部を制御する。具体的には、入力装置18からの入力があると、CPU10は、入力に応じた処理プログラムを起動させ、商品登録処理、点検処理、精算処理、店舗内の売上集計処理等を行う。入力装置18からの入力がない、即ち他に実行すべき処理のない空き時間には、後述する書込みエリア事前消去処理を実行する。なお、「他に実行すべき処理」には、実行すべき処理があるか否かを判断して実行する「ECR制御処理」は含まない。   When the ECR 1 is activated by the activation process, the CPU 10 executes an ECR control process, which will be described later, in cooperation with an ECR control program stored in the main memory 13, and controls each part of the ECR 1. Specifically, when there is an input from the input device 18, the CPU 10 activates a processing program corresponding to the input, and performs a product registration process, an inspection process, a checkout process, an in-store sales aggregation process, and the like. When there is no input from the input device 18, that is, when there is no other process to be executed, a write area pre-erasing process described later is executed. Note that “another process to be executed” does not include an “ECR control process” executed by determining whether there is a process to be executed.

また、CPU10は、動作中にAC電源状態監視回路34からAC電源遮断を通知する信号が入力されると、メインメモリ13に記憶されている終了処理プログラムとの協働により、サスペンド処理(第1の退避処理)、ハイバネーション処理(第2の退避処理)を含む終了処理を実行する。   Further, when a signal for notifying AC power supply interruption is input from the AC power supply state monitoring circuit 34 during the operation, the CPU 10 performs a suspend process (first process) in cooperation with the termination process program stored in the main memory 13. Ending process) and a hibernation process (second saving process) are executed.

ここで、本実施形態において、サスペンド処理とは、AC電源31の遮断時にCPU10のシステム動作状態を示すデータ(プログラムカウンタ(PC)、スタックポインタ(SP)、レジスタ、システムデータ等)を揮発性のメインメモリ13に退避する処理をいう。ハイバネーション処理とは、メインメモリ13に記憶されているシステム動作状態を示すデータ等を不揮発性のハイバネーション用メモリ14に退避する処理をいう。   Here, in the present embodiment, the suspend process refers to volatile data (program counter (PC), stack pointer (SP), register, system data, etc.) indicating the system operation state of the CPU 10 when the AC power supply 31 is shut off. This is a process of saving to the main memory 13. The hibernation process is a process of saving data indicating the system operation state stored in the main memory 13 to the nonvolatile hibernation memory 14.

ハイバネーション処理中にAC電源状態監視回路34からAC電源供給を通知する信号が入力されると、CPU10は、ハイバネーション処理を中断させて起動処理を実行し、メインメモリ13に退避されているシステム動作状態を示すデータに基づいてAC電源遮断前の状態にシステムを復帰させる。   When a signal for notifying the AC power supply is input from the AC power state monitoring circuit 34 during the hibernation process, the CPU 10 interrupts the hibernation process, executes the start process, and saves the system operation state saved in the main memory 13. The system is returned to the state before the AC power supply is cut off based on the data indicating.

RTC(Real Time Clock)11は、計時回路を内蔵し、現在時刻及び現在日付を計時
してCPU10に出力する。RTC11は、RTC用バックアップ電源111が備えられており(図3参照)、AC電源31及びバックアップ用電源32の何れからも電源が供給されない状態でも動作可能となっている。
An RTC (Real Time Clock) 11 has a built-in clock circuit, clocks the current time and the current date, and outputs them to the CPU 10. The RTC 11 includes an RTC backup power supply 111 (see FIG. 3), and can operate even when no power is supplied from either the AC power supply 31 or the backup power supply 32.

プログラム格納メモリ12は、不揮発性のROM(Read Only Memory)等により構成され、図2に示すように、ECR1で実行可能な各種プログラムやECR1の固有データ(例えば、ECR1のMACアドレス、タッチパネルキャリブレーションデータ等)を記憶する。   The program storage memory 12 is configured by a nonvolatile ROM (Read Only Memory) or the like, and as shown in FIG. 2, various programs that can be executed by the ECR1 and unique data of the ECR1 (for example, the MAC address of the ECR1, touch panel calibration) Data).

メインメモリ13は、CPU10によって実行される各種プログラム及びこれらプログラムに係る各種データ等を記憶する揮発性記憶手段である。
メインメモリ13は、図2に示すように、起動処理・終了処理用ワークエリア131、サスペンド用エリア132、コピー領域133、システムデータ領域134、設定データ領域135、ユーザデータ領域136を有している。
The main memory 13 is volatile storage means for storing various programs executed by the CPU 10 and various data related to these programs.
As shown in FIG. 2, the main memory 13 has a work area 131 for start processing / end processing, a suspend area 132, a copy area 133, a system data area 134, a setting data area 135, and a user data area 136. .

起動処理・終了処理用ワークエリア131は、AC電源投入時にCPU10によりプログラム格納メモリ12から読み出された起動処理プログラム、終了処理プログラム(サブルーチンの処理を含む)を記憶するとともに、これらのプログラムが動作するためのワークエリアである。起動処理・終了処理用ワークエリア131は、消去ブロック番号領域131aを有している。消去ブロック番号領域131aは、ハイバネーション用メモリ14において最終に消去されたブロックのブロック番号(1〜n)を記憶するための領域である。ブロックとは、ハイバネーション用メモリ14において一度にデータ書込み及び消去可能なデータ単位を示す。なお、「0」は、ハイバネーション用メモリ14が未消去状態であることを示す。 サスペンド用エリア132は、サスペンド処理において、CPU10のシステム動作状態を示すデータ(プログラムカウンタ(PC)、スタックポインタ(SP)、レジスタ、システムデータ等)を退避するための領域である。
コピー領域133は、プログラム格納メモリ12に記憶されているプログラムのコピーを書込むための領域である。
システムデータ領域134は、スタック、変数やオペレーティングシステム(OS)のシステムデータを記憶する領域である。
設定データ領域135は、入力装置18を介して設定された周辺機器(メイン表示装置151、サブ表示装置152、印字装置17、入力装置18等)に関する各種設定データを記憶する領域である。
ユーザデータ領域136は、入力装置18を介して入力された売上データ、メイン表示装置151で表示中の表示データ、印字装置17に印字させる印字データ等のユーザデータを記憶する領域である。
The start process / end process work area 131 stores a start process program and an end process program (including subroutine processing) read from the program storage memory 12 by the CPU 10 when the AC power is turned on, and these programs operate. It is a work area to do. The work area 131 for start process / end process has an erase block number area 131a. The erase block number area 131a is an area for storing the block numbers (1 to n) of blocks that are finally erased in the hibernation memory 14. The block indicates a data unit in which data can be written and erased at once in the hibernation memory 14. “0” indicates that the hibernation memory 14 is in an unerased state. The suspend area 132 is an area for saving data indicating the system operation state of the CPU 10 (program counter (PC), stack pointer (SP), register, system data, etc.) in the suspend process.
The copy area 133 is an area for writing a copy of the program stored in the program storage memory 12.
The system data area 134 is an area for storing stack, variables, and operating system (OS) system data.
The setting data area 135 is an area for storing various setting data related to peripheral devices (main display device 151, sub display device 152, printing device 17, input device 18, etc.) set via the input device 18.
The user data area 136 is an area for storing user data such as sales data input via the input device 18, display data being displayed on the main display device 151, and print data to be printed on the printing device 17.

ハイバネーション用メモリ14は、フラッシュメモリ等の不揮発性メモリにより構成され、AC電源31の遮断時にメインメモリ13に記憶されているデータを退避するための不揮発性記憶手段である。ハイバネーション用メモリ14は、n個のブロックのデータ書込みが可能である。
また、本実施の形態において、ハイバネーション用メモリ14は、CPU10から書込み指示されたデータの上位Bitを格納するためのハイバネーション用メモリ14a、CPU10から書込み指示されたデータの下位Bitを格納するためのハイバネーション用メモリ14bを備えて構成されている。ハイバネーション処理におけるデータの書込み速度及び消去速度を向上させるためである。
The hibernation memory 14 is constituted by a nonvolatile memory such as a flash memory, and is a nonvolatile storage means for saving data stored in the main memory 13 when the AC power supply 31 is shut off. The hibernation memory 14 can write data in n blocks.
Further, in the present embodiment, the hibernation memory 14 is a hibernation memory 14a for storing the upper bit of the data instructed by the CPU 10, and a hibernation for storing the lower bit of the data instructed by the CPU 10. The memory 14b is provided. This is to improve the data writing speed and erasing speed in the hibernation process.

ハイバネーション用メモリ14は、図2に示すように、ヘッダ領域141、バックアップ領域142、チェックサム格納領域143を有している。ヘッダ領域141は、ハイバネーション処理が完了したことを示すハイバネーション完了フラグを設定するためのハイバネーション完了フラグ領域141aを有する領域である。バックアップ領域142は、ハイバネーション処理において、メインメモリ13の起動処理・終了処理用ワークエリア131以外の領域のデータを退避するための領域である。チェックサム格納領域143は、ハイバネーション処理において算出されたチェックサムを書込むための領域である。   As shown in FIG. 2, the hibernation memory 14 includes a header area 141, a backup area 142, and a checksum storage area 143. The header area 141 is an area having a hibernation completion flag area 141a for setting a hibernation completion flag indicating that the hibernation process has been completed. The backup area 142 is an area for saving data in an area other than the start / end process work area 131 of the main memory 13 in the hibernation process. The checksum storage area 143 is an area for writing the checksum calculated in the hibernation process.

メイン表示装置151、サブ表示装置152は、LCD(Liquid Crystal Display)や有機EL(Electro-Luminescence)ディスプレイ等により構成され、CPU10から入力される表示信号の指示に従って、各種画面を表示する。メイン表示装置151は、オペレータ側に向けて設けられた表示装置であり、サブ表示装置152は、顧客側に向けて設けられた表示装置である。   The main display device 151 and the sub display device 152 are configured by an LCD (Liquid Crystal Display), an organic EL (Electro-Luminescence) display, or the like, and display various screens according to instructions of a display signal input from the CPU 10. The main display device 151 is a display device provided toward the operator side, and the sub display device 152 is a display device provided toward the customer side.

LED(Light Emitting Diode)16は、CPU10から入力される指示信号に応じて駆動され、点灯、点滅する。   An LED (Light Emitting Diode) 16 is driven in response to an instruction signal input from the CPU 10 and is lit and blinks.

印字装置17は、例えば、サーマルプリンタ(感熱式プリンタ)であり、レシート用、ジャーナル用のロール紙(感熱紙)を有し、CPU10から入力される指示信号に従って、各ロール紙に対して金額等のデータをプリントアウトする。   The printing device 17 is, for example, a thermal printer (thermal printer), and has receipt and journal roll paper (thermal paper), and according to an instruction signal input from the CPU 10, the amount of money for each roll paper, etc. Print out the data.

入力装置18は、電源キー、カーソルキー、文字、数字入力キーや、INITキー、FCキー等の各種機能キー等を備えたレジ用のキーボードを含む構成とし、オペレータによる各キーの操作信号をCPU10に出力する。また、入力装置18は、メイン表示装置151の画面上に設けられたタッチパネルを含む。タッチパネルは、メイン表示装置151の上面を覆うように設置されており、オペレータの指などを用いた操作によって押圧入力された所望の入力位置を検出し、その検出信号をCPU10に出力する。また、入力装置18は、商品に設けられたバーコードを読み取るバーコードリーダやバーコードスキャナ等を備える。   The input device 18 includes a cash register keyboard having power keys, cursor keys, characters, numeric input keys, and various function keys such as an INIT key and an FC key. Output to. The input device 18 includes a touch panel provided on the screen of the main display device 151. The touch panel is installed so as to cover the upper surface of the main display device 151, detects a desired input position pressed by an operation using an operator's finger or the like, and outputs a detection signal to the CPU 10. The input device 18 includes a barcode reader, a barcode scanner, or the like that reads a barcode provided on a product.

ストレージI/F19は、CF(Compact Flash)カード、SDカード(Secure Digital Card)等の外部ストレージ19aを接続可能であり、外部ストレージ19aとのデータの入出力を行う。   The storage I / F 19 can be connected to an external storage 19a such as a CF (Compact Flash) card or an SD card (Secure Digital Card), and inputs / outputs data to / from the external storage 19a.

通信部20は、LAN(Local Area Network)アダプタやルータ等により構成され、LANやインターネット等の通信ネットワークを介してサーバ100等の外部機器とデータ送受信を行う。   The communication unit 20 includes a LAN (Local Area Network) adapter, a router, and the like, and performs data transmission / reception with an external device such as the server 100 via a communication network such as a LAN or the Internet.

図3に、ECR1における電源系の要部構成例を示す。
図3に示す電源生成回路33は、AC電源(主電源)31、及び、スイッチ35を介して補助電源としてのバックアップ用電源(充電池)32に接続されている。電源生成回路33は、AC電源31から入力されたAC(交流)電源電力をDC(直流)電源電力に変換し、図1に示す各部にそれぞれ供給する。また、電源生成回路33は、スイッチ35を介してバックアップ用電源32から入力された電源電力をCPU10、RTC11、プログラム格納メモリ12、メインメモリ13及びハイバネーション用メモリ14a、14b、LED16に供給する。
AC電源状態監視回路34は、AC電源31の電源状態を監視する電源監視手段であり、AC電源31から電源が供給されている間は、AC電源供給を通知する信号(HIGH信号)をCPU10に出力し、AC電源31からの電源が遮断されている間は、AC電源遮断を通知する信号(LOW信号)をCPU10に出力する。
スイッチ35は、CPU10からのバックアップ用電源ON/OFFスイッチ切替制御信号に基づいて、バックアップ電源32のON/OFF(電源の供給/遮断)を切り替える切り替え手段である。
FIG. 3 shows a configuration example of a main part of the power supply system in ECR1.
3 is connected to an AC power source (main power source) 31 and a backup power source (rechargeable battery) 32 as an auxiliary power source via a switch 35. The power source generation circuit 33 converts AC (alternating current) power source power input from the AC power source 31 into DC (direct current) power source power and supplies it to each unit shown in FIG. The power supply generation circuit 33 supplies the power supply power input from the backup power supply 32 via the switch 35 to the CPU 10, RTC 11, program storage memory 12, main memory 13, and hibernation memories 14 a and 14 b and the LED 16.
The AC power supply state monitoring circuit 34 is a power supply monitoring unit that monitors the power supply state of the AC power supply 31. While power is supplied from the AC power supply 31, a signal (HIGH signal) for notifying the supply of AC power is sent to the CPU 10. While the power is output from the AC power supply 31, a signal (LOW signal) for notifying the AC power supply cutoff is output to the CPU 10.
The switch 35 is switching means for switching ON / OFF (power supply / shutdown) of the backup power supply 32 based on a backup power ON / OFF switch switching control signal from the CPU 10.

このように、AC電源31からの電源が供給状態である場合、電源生成回路33によりECR1の各部にAC電源31からの電源が供給される。AC電源31が遮断されると、CPU10からの制御に基づいて、CPU10、RTC11、プログラム格納メモリ12、メインメモリ13及びハイバネーション用メモリ14a、14b、LED16のみにバックアップ用電源32からの電源が供給される。このように構成することで、バックアップ用電源32の消耗を必要最低限に抑えることができる。なお、AC電源31遮断後一定時間T内は回路的に電源が保持されている。この一定時間内にCPU10はバックアップ用電源32をONに切り替え、CPU動作電源、メモリ動作電源を維持する。   As described above, when the power supply from the AC power supply 31 is in the supply state, the power supply generation circuit 33 supplies the power supply from the AC power supply 31 to each part of the ECR1. When the AC power supply 31 is shut off, the power from the backup power supply 32 is supplied only to the CPU 10, RTC 11, program storage memory 12, main memory 13, hibernation memories 14 a and 14 b, and LED 16 based on the control from the CPU 10. The With this configuration, it is possible to minimize the consumption of the backup power supply 32. Note that the power supply is held in a circuit for a certain time T after the AC power supply 31 is cut off. Within this predetermined time, the CPU 10 switches on the backup power source 32 and maintains the CPU operating power source and the memory operating power source.

次に、実施形態1におけるECR1の主要な動作についてフローチャートを参照して詳細に説明する。なお、実施形態1においては、シングルタスクで各種処理が実行される場合の一例について説明する。   Next, main operations of the ECR 1 in the first embodiment will be described in detail with reference to flowcharts. In the first embodiment, an example in which various processes are executed in a single task will be described.

まず、ECR1の起動後にCPU10により実行されるECR制御処理について説明する。図4に、ECR制御処理のフローチャートを示す。ECR制御処理は、CPU10とECR制御プログラムとの協働によるソフトウエア処理により実現される。   First, an ECR control process executed by the CPU 10 after the activation of the ECR 1 will be described. FIG. 4 shows a flowchart of the ECR control process. The ECR control processing is realized by software processing in cooperation with the CPU 10 and the ECR control program.

まず、起動処理・終了処理用ワークエリア131の消去ブロック番号領域131aに0が設定される(ステップS1)。   First, 0 is set in the erase block number area 131a of the work area 131 for start process / end process (step S1).

次いで、入力装置18から入力がされたか否かが判断され(ステップS2)、入力装置18から入力がされてないと判断されると(ステップS2;NO)、書込みエリア事前消去処理が実行される(ステップS3)。   Next, it is determined whether or not an input has been made from the input device 18 (step S2). If it is determined that no input has been made from the input device 18 (step S2; NO), a write area pre-erasing process is executed. (Step S3).

図5に、ステップS3においてCPU10により実行される書込みエリア事前消去処理を示す。書込みエリア事前消去処理は、CPU10と書込みエリア事前消去処理プログラムとの協働により実行される。   FIG. 5 shows the write area pre-erasing process executed by the CPU 10 in step S3. The writing area pre-erasing process is executed in cooperation with the CPU 10 and the writing area pre-erasing process program.

ここで、書込みエリア事前消去処理は、ハイバネーション用メモリ14a、14bに記憶されているデータを消去する処理である。ハイバネーション用メモリ14a、14bには、上述したように、AC電源31の遮断時にメインメモリ13に記憶されているデータが退避される(書込まれる)。このデータ退避は、後述する終了処理において、バックアップ用電源32の給電により行われる。しかし、ハイバネーション用メモリ14a、14bにデータを書込む前に、まず前回のAC遮断時に書込まれたデータをハイバネーション用メモリ14a、14bから消去する必要がある。この処理を全て終了処理において行うと、AC電源31が遮断されてから動作が完全に停止するまでに時間がかかり、バックアップ用電源32が消耗する。そこで、CPU10において他に実行すべき処理のない、即ち、商品登録処理や他の処理が要求又は実行されていない「処理の空き時間」に書込みエリア事前消去処理を実行することで、AC電源31の遮断時におけるハイバネーション用メモリ14a、14bからのデータ消去にかかる時間を短縮し、バックアップ用電源32の消耗を低減する。即ち、本実施形態において、「処理の空き時間」とは、CPU10が商品登録処理や他の処理を要求又は実行していない時間をいう。   Here, the write area pre-erasing process is a process of erasing data stored in the hibernation memories 14a and 14b. As described above, the data stored in the main memory 13 is saved (written) in the hibernation memories 14a and 14b when the AC power supply 31 is shut off. This data saving is performed by supplying power from the backup power source 32 in an end process to be described later. However, before writing data to the hibernation memories 14a and 14b, it is necessary to first erase the data written at the time of the previous AC interruption from the hibernation memories 14a and 14b. If this process is all performed in the end process, it takes time until the operation is completely stopped after the AC power supply 31 is shut off, and the backup power supply 32 is consumed. Therefore, the AC power supply 31 is executed by executing the write area pre-erasing process in “processing idle time” when there is no other process to be executed in the CPU 10, that is, the product registration process or other process is not requested or executed. The time required for erasing data from the hibernation memories 14a and 14b at the time of interruption is reduced, and the consumption of the backup power source 32 is reduced. In other words, in this embodiment, the “processing idle time” refers to a time during which the CPU 10 does not request or execute a product registration process or other processes.

書込みエリア事前消去処理においては、まず、メインメモリ13の消去ブロック番号領域131aに記憶されている番号が取得される(ステップS101)。次いで、取得された番号がハイバネーション用メモリ14a、14bの最終ブロック番号nであるか否かが判断される(ステップS102)。   In the write area pre-erasure process, first, the number stored in the erase block number area 131a of the main memory 13 is acquired (step S101). Next, it is determined whether or not the acquired number is the last block number n of the hibernation memories 14a and 14b (step S102).

取得された番号が最終ブロック番号nではないと判断されると(ステップS102;NO)、取得された番号の次の番号のブロックのデータ消去がハイバネーション用メモリ14a、14bに指示される(ステップS103)。そして、処理は、ハイバネーション用メモリ14a、14bからのブロック消去完了の通知待ち状態となる。ハイバネーション用メモリ14a、14bにおいては、1ブロック分のデータ消去が終了すると、CPU10にブロック消去完了が通知される。   If it is determined that the acquired number is not the final block number n (step S102; NO), the hibernation memories 14a and 14b are instructed to erase the data of the block having the number next to the acquired number (step S103). ). Then, the process waits for a block erase completion notification from the hibernation memories 14a and 14b. In the hibernation memories 14a and 14b, when the data erase for one block is completed, the CPU 10 is notified of the completion of the block erase.

1ブロック分のデータ消去が完了した旨がハイバネーション用メモリ14a、14bから通知されると(ステップS104;YES)、データ消去されたブロックのブロック番号が消去ブロック番号領域131aに書込まれ(ステップS105)、処理は図4のステップS2に戻る。   When it is notified from the hibernation memories 14a and 14b that data erasure for one block has been completed (step S104; YES), the block number of the block from which data has been erased is written into the erase block number area 131a (step S105). ), The process returns to step S2 of FIG.

一方、ステップS102において、取得された番号が最終ブロック番号nであると判断されると(ステップS102;YES)、書込みエリア事前消去処理は終了し、図4のステップS2に戻る。   On the other hand, if it is determined in step S102 that the acquired number is the final block number n (step S102; YES), the write area pre-erasing process is terminated, and the process returns to step S2 in FIG.

図4のステップS2において、入力装置18から入力がされたと判断されると(ステップS2;YES)、当該入力が商品登録の指示であるか否か判断される(ステップS4)。当該入力が商品登録の指示であると判断されると(ステップS4;YES)、商品登録処理が実行される(ステップS5)。商品登録処理は、商品が取引された日時、商品名、商品の売上個数、売上金額等の売上データ、担当者等をユーザデータ領域136に登録する処理である。そして、商品名、売上(購入)個数、売上(購入)金額、お預かり金額、返金額等が印字装置17によりレシートに印字され(ステップS6)、処理はステップS8に移行する。   If it is determined in step S2 of FIG. 4 that input has been made from the input device 18 (step S2; YES), it is determined whether or not the input is an instruction to register a product (step S4). If it is determined that the input is a product registration instruction (step S4; YES), a product registration process is executed (step S5). The product registration process is a process for registering the date and time when the product was traded, the product name, the sales volume of the product, the sales data such as the sales amount, the person in charge, etc. in the user data area 136. Then, the product name, the number of sales (purchase), the amount of sales (purchase), the deposit amount, the return amount, etc. are printed on the receipt by the printing device 17 (step S6), and the process proceeds to step S8.

入力装置18からの入力が商品登録の指示ではないと判断されると(ステップS4;NO)、入力に応じた他の処理が実行され(ステップS7)、処理はステップS8に移行する。   If it is determined that the input from the input device 18 is not a product registration instruction (step S4; NO), another process corresponding to the input is executed (step S7), and the process proceeds to step S8.

ステップS8においては、AC電源監視回路34から入力される通知信号に基づいてAC電源31の電源状態が判断される。AC電源31が供給状態であると判断されると(ステップS8;NO)、処理はステップS2に戻る。AC電源31が遮断状態であると判断されると(ステップS8;YES)、終了処理が実行され(ステップS9)、ECR制御処理は終了する。   In step S <b> 8, the power state of the AC power supply 31 is determined based on the notification signal input from the AC power supply monitoring circuit 34. If it is determined that the AC power supply 31 is in the supply state (step S8; NO), the process returns to step S2. If it is determined that the AC power supply 31 is in a cut-off state (step S8; YES), an end process is executed (step S9), and the ECR control process ends.

図6に、図4のステップS9においてCPU10により実行される終了処理のフローチャートを示す。当該処理は、CPU10と終了処理プログラムとの協働により実行される。   FIG. 6 shows a flowchart of the end process executed by the CPU 10 in step S9 of FIG. This processing is executed in cooperation with the CPU 10 and the end processing program.

まず、サスペンド処理(第1の退避処理)が実行され、CPU10に記憶されているスタックポインタ、プログラムカウンタ、レジスタ、システムデータ等がメインメモリ13のサスペンド用エリア132に退避される(ステップS201)。   First, a suspend process (first save process) is executed, and the stack pointer, program counter, register, system data, etc. stored in the CPU 10 are saved in the suspend area 132 of the main memory 13 (step S201).

次いで、バックアップ用電源ON/OFFスイッチ切替制御信号によりスイッチ35がONに切り替えられることにより、バックアップ用電源32がONに切り替えられる(ステップS202)。   Next, the backup power supply 32 is switched ON by switching the switch 35 ON by the backup power ON / OFF switch switching control signal (step S202).

次いで、ハイバネーション処理(第2の退避処理)が実行され、メインメモリ13における起動処理・終了処理用ワークエリア131以外の領域のデータがハイバネーション用メモリ14に退避(バックアップ)される(ステップS203)。なお、ハイバネーション処理実行中にAC電源監視回路34によりAC電源供給を通知する信号が入力されると、CPU10により本処理は中断され、図11a〜図11bに示す起動処理が実行される。   Next, hibernation processing (second saving processing) is executed, and data in an area other than the activation / termination processing work area 131 in the main memory 13 is saved (backed up) in the hibernation memory 14 (step S203). When a signal for notifying the AC power supply is input by the AC power supply monitoring circuit 34 during the execution of the hibernation process, the process is interrupted by the CPU 10 and the startup process shown in FIGS. 11a to 11b is executed.

図7に、図6のステップS203においてCPU10により実行されるハイバネーション処理のフローチャートを示す。当該処理は、CPU10とハイバネーション処理プログラムとの協働によるソフトウエア処理により実現される。   FIG. 7 shows a flowchart of the hibernation process executed by the CPU 10 in step S203 of FIG. This processing is realized by software processing by cooperation between the CPU 10 and the hibernation processing program.

ハイバネーション処理においては、まず、LED16の点滅が開始される(ステップS301)。次いで、書込みエリア消去処理が実行される(ステップS302)。
図8に、書込みエリア消去処理のフローチャートを示す。
図8に示すように、書込みエリア消去処理においては、まず、消去ブロック番号領域131aに記憶されている番号が取得される(ステップS1000)。次いで、取得された番号がハイバネーション用メモリ14a、14bの最終ブロック番号nであるか否かが判断される(ステップS1001)。取得された番号が最終ブロック番号nであると判断されると(ステップS1001;YES)、書込みエリア消去処理は終了し、処理は図7のステップS303に移行する。
In the hibernation process, first, the LED 16 starts blinking (step S301). Next, a write area erasing process is executed (step S302).
FIG. 8 shows a flowchart of the write area erasing process.
As shown in FIG. 8, in the write area erase process, first, the number stored in the erase block number area 131a is acquired (step S1000). Next, it is determined whether or not the acquired number is the last block number n of the hibernation memories 14a and 14b (step S1001). If it is determined that the acquired number is the final block number n (step S1001; YES), the write area erasing process is terminated, and the process proceeds to step S303 in FIG.

取得された番号が最終ブロック番号nではないと判断されると(ステップS1001;NO)、次の番号のブロックのデータ消去がハイバネーション用メモリ14a、14bに指示される(ステップS1002)。   If it is determined that the acquired number is not the final block number n (step S1001; NO), data deletion of the next numbered block is instructed to the hibernation memories 14a and 14b (step S1002).

次いで、AC電源状態監視回路34から入力される信号が監視され、AC電源31の電源状態が判断される(ステップS1003)。AC電源31が遮断状態であると判断されると(ステップS1003;AC電源遮断状態)、 ハイバネーション用メモリ14a、14bにおいて、1ブロックの消去が完了したか否かが判断される。ここで、ハイバネーション用メモリ14a、14bにおいては、1ブロック分のデータ消去が終了すると、CPU10にブロック消去完了が通知される。1ブロックの消去が完了していないと判断されると(ステップS1004;NO)、処理はステップS1003に戻る。   Next, the signal input from the AC power supply state monitoring circuit 34 is monitored to determine the power supply state of the AC power supply 31 (step S1003). If it is determined that the AC power supply 31 is in the cut-off state (step S1003; AC power supply cut-off state), it is determined whether or not erasure of one block is completed in the hibernation memories 14a and 14b. Here, in the hibernation memories 14a and 14b, when the data erase for one block is completed, the CPU 10 is notified of the completion of the block erase. If it is determined that erasure of one block has not been completed (step S1004; NO), the process returns to step S1003.

1ブロックの消去が完了したと判断されると(ステップS1004;YES)、ハイバネーション用メモリ14a、14bの全領域の消去が完了したか否かが判断され、完了していないと判断されると(ステップS1005;NO)、処理はステップS1002に戻り、次の番号の1ブロックについての消去が実行される。ハイバネーション用メモリ14a、14bの全領域の消去が完了したと判断されると(ステップS1005;YES)、書込みエリア消去処理は終了し、処理は図7のステップS303に移行する。   If it is determined that the erasure of one block has been completed (step S1004; YES), it is determined whether or not the erasure of all areas of the hibernation memories 14a and 14b has been completed, and if it is determined that the erasure has not been completed ( In step S1005; NO), the process returns to step S1002, and erasure is performed for one block of the next number. If it is determined that erasure of all areas of the hibernation memories 14a and 14b has been completed (step S1005; YES), the write area erasure process is terminated, and the process proceeds to step S303 in FIG.

一方、ステップS1003において、AC電源31が供給状態であると判断されると(ステップS1003;AC電源供給状態)、スイッチ35によりバックアップ用電源32がOFFに切り替えられ(ステップS1006)、本処理は中断され、図11a〜図11bに示す起動処理(ハイバネーション中断リスタート)に移行する。   On the other hand, when it is determined in step S1003 that the AC power supply 31 is in the supply state (step S1003; AC power supply state), the backup power supply 32 is switched off by the switch 35 (step S1006), and this process is interrupted. Then, the process proceeds to the activation process (hibernation interruption restart) shown in FIGS. 11a to 11b.

図7のステップS303においては、書込み処理が実行される。
図9に、書込み処理のフローチャートを示す。
図9に示すように、書込み処理においては、まず、退避対象のデータ、即ち、メインメモリ13の起動処理・終了処理用ワークエリア131以外の領域に記憶されているデータがハイバネーション用メモリ14a、14bに1ブロック分ずつ転送され、1ブロック分のデータ書込みが指示される(ステップS2001)。ハイバネーション用メモリ14aには、データの上位Bit(例えば、8Bitデータであれば上位4Bit)が1ブロック分転送され、ハイバネーション用メモリ14bには、データの下位Bit(例えば、8Bitデータであれば下位4Bit)が1ブロック分転送される。
In step S303 in FIG. 7, a writing process is executed.
FIG. 9 shows a flowchart of the writing process.
As shown in FIG. 9, in the writing process, first, data to be saved, that is, data stored in an area other than the start / end process work area 131 of the main memory 13 is stored in the hibernation memories 14a and 14b. Are transferred one block at a time, and data writing for one block is instructed (step S2001). One block of data is transferred to the hibernation memory 14a (for example, upper 4 bits for 8 bit data), and the lower bit of data (for example, lower 4 bits for 8 bit data) is transferred to the hibernation memory 14b. ) Is transferred for one block.

次いで、AC電源状態監視回路34から入力される信号が監視され、AC電源31の電源状態が判断される(ステップS2002)。AC電源31が遮断状態であると判断されると(ステップS2002;AC電源遮断状態)、 ハイバネーション用メモリ14a、14bにおいて、1ブロックの書込みが完了したか否かが判断される(ステップS2003)。ここで、ハイバネーション用メモリ14a、14bにおいては、1ブロック分のデータ書込みが終了すると、CPU10にブロック書込み完了が通知される。1ブロックの書込みが完了していないと判断されると(ステップS2003;NO)、処理はステップS2002に戻る。   Next, the signal input from the AC power supply state monitoring circuit 34 is monitored, and the power supply state of the AC power supply 31 is determined (step S2002). When it is determined that the AC power supply 31 is in the cut-off state (step S2002; AC power supply cut-off state), it is determined whether or not writing of one block is completed in the hibernation memories 14a and 14b (step S2003). Here, in the hibernation memories 14a and 14b, when the data writing for one block is completed, the CPU 10 is notified of the completion of the block writing. If it is determined that writing of one block has not been completed (step S2003; NO), the process returns to step S2002.

1ブロックの書込みが完了したと判断されると(ステップS2003;YES)、メインメモリ13の起動処理・終了処理用ワークエリア131以外の全領域のデータの書込みが完了したか否かが判断され、完了していないと判断されると(ステップS2004;NO)、処理はステップS2001に戻り、次のブロックについての書込みが実行される。メインメモリ13の起動処理・終了処理用ワークエリア131以外の全領域のデータの書込みが完了したと判断されると(ステップS2004;YES)、処理は図7のステップS304に移行する。上記書込み処理によりハイバネーション用メモリ14a、14bに書込まれたデータをバックアップデータとよぶ。   If it is determined that writing of one block is completed (step S2003; YES), it is determined whether writing of data in all areas other than the activation / end processing work area 131 of the main memory 13 is completed, If it is determined that it has not been completed (step S2004; NO), the process returns to step S2001, and writing for the next block is executed. If it is determined that the writing of data in all the areas other than the work area 131 for start processing / end processing in the main memory 13 is completed (step S2004; YES), the process proceeds to step S304 in FIG. The data written to the hibernation memories 14a and 14b by the above writing process is called backup data.

一方、ステップS2002において、AC電源31が供給状態であると判断されると(ステップS2002;AC電源供給状態)、スイッチ35によりバックアップ用電源32がOFFに切り替えられ(ステップS2005)、本処理は中断され、図11a〜図11bに示す起動処理(ハイバネーション中断リスタート)に移行する。   On the other hand, when it is determined in step S2002 that the AC power supply 31 is in the supply state (step S2002; AC power supply state), the backup power supply 32 is turned off by the switch 35 (step S2005), and this process is interrupted. Then, the process proceeds to the activation process (hibernation interruption restart) shown in FIGS. 11a to 11b.

図7のステップS304においては、書込み内容保証処理が実行される。
書込み内容保証処理は、メインメモリ13における退避対象となったデータとハイバネーション用メモリ14に退避されたデータの整合性を確認するための処理である。
In step S304 of FIG. 7, a write content guarantee process is executed.
The written content guarantee process is a process for confirming the consistency between the data to be saved in the main memory 13 and the data saved in the hibernation memory 14.

図10に、書込み内容保証処理のフローチャートを示す。
図10に示すように、書込み内容保証処理においては、まず、メインメモリ13に記憶されているハイバネーション用メモリ14a、14bへの退避対象となったデータ、具体的には、起動処理・終了処理用ワークエリア131以外の領域に書込まれたデータと、ハイバネーション用メモリ14a、14bに退避されたデータのベリファイ処理(誤り検査)が実行される(ステップS3001)。なお、ベリファイ処理により誤りがあった場合は、ハイバネーション処理を再実行することが好ましい。
FIG. 10 shows a flowchart of the write content guarantee process.
As shown in FIG. 10, in the written content guarantee processing, first, the data to be saved to the hibernation memories 14a and 14b stored in the main memory 13, specifically, for the start processing / end processing A verification process (error check) is performed on the data written in the area other than the work area 131 and the data saved in the hibernation memories 14a and 14b (step S3001). If there is an error in the verify process, it is preferable to re-execute the hibernation process.

次いで、メインメモリ13上における退避対象となったデータのチェックサム(合計値)が算出され(ステップS3002)、算出されたチェックサムがハイバネーション用メモリ14a、14bのチェックサム格納領域143に書込まれる(ステップS3003)。そして、ハイバネーション用メモリ14a、14bのハイバネーション完了フラグ領域141aにハイバネーション完了フラグONが設定され(ステップS3004)、処理は図7のステップS305に移行する。   Next, a checksum (total value) of data to be saved on the main memory 13 is calculated (step S3002), and the calculated checksum is written to the checksum storage area 143 of the hibernation memories 14a and 14b. (Step S3003). The hibernation completion flag ON is set in the hibernation completion flag area 141a of the hibernation memories 14a and 14b (step S3004), and the process proceeds to step S305 in FIG.

図7のステップS305においては、LED16の点滅が停止され(ステップS305)、ハイバネーション処理は終了し、処理は図6のステップS204に移行する。   In step S305 in FIG. 7, the blinking of the LED 16 is stopped (step S305), the hibernation process ends, and the process proceeds to step S204 in FIG.

図6のステップS204においては、スイッチ35によりバックアップ用電源32がOFFに切り替えられ、終了処理は終了する。   In step S204 of FIG. 6, the backup power source 32 is switched off by the switch 35, and the end process ends.

バックアップ用電源32がOFFに切り替えられた後、AC電源31が遮断状態から供給状態となると、CPU10により、プログラム格納メモリ12の起動処理プログラム及び終了処理プログラムがメインメモリ13の起動処理・終了処理用ワークエリア131に読み出される。そして、図11a〜図11bに示す起動処理が実行される。   After the backup power supply 32 is switched off, when the AC power supply 31 is switched from the shut-off state to the supply state, the CPU 10 starts the start processing program and the end processing program in the program storage memory 12 for the start processing and end processing in the main memory 13. Read to work area 131. And the starting process shown to FIG. 11 a-FIG. 11 b is performed.

図11a〜図11bに、起動処理のフローチャートを示す。当該処理は、CPU10と起動処理プログラムとの協働によるソフトウエア処理により実現される。ここで、起動処理は図11a〜図11bに示す「リセットスタート」の位置から開始されるが、ハイバネーション処理中断時においては、ハイバネーション処理プログラムによって図11aに示す「ハイバネーション中断リスタート」の位置への移行が指示されているため、「ハイバネーション中断リスタート」の位置から処理が開始される。   11a to 11b show a flowchart of the activation process. This processing is realized by software processing through cooperation between the CPU 10 and the activation processing program. Here, the starting process is started from the position of “reset start” shown in FIGS. 11a to 11b. When the hibernation process is interrupted, the hibernation process program moves to the position of “hibernation interruption restart” shown in FIG. 11a. Since the shift is instructed, the processing is started from the position of “hibernation interruption restart”.

「リセットスタート」から処理が開始された場合、まず、システム初期化処理が実行される(ステップS10)。システム初期化処理とは、CPU10がこれから使用するシステム環境を認識し、システムを確立させるための処理である。例えば、どのようなメモリが接続されているかをCPU10が認識する処理等が挙げられる。
次いで、リセットスタートであることを示すスタート情報がメインメモリ13の起動処理・終了処理用ワークエリア131に設定され(ステップS11)、処理はステップS14に移行する。
When the process is started from “reset start”, first, a system initialization process is executed (step S10). The system initialization process is a process for the CPU 10 to recognize a system environment to be used and establish a system. For example, a process in which the CPU 10 recognizes what kind of memory is connected can be cited.
Next, start information indicating a reset start is set in the work area 131 for start processing / end processing of the main memory 13 (step S11), and the process proceeds to step S14.

「ハイバネーション中断リスタート」から処理が開始された場合、まず、ハイバネーション用システム初期化処理が実行される(ステップS12)。ハイバネーション処理を中断して起動処理が開始された場合にはCPU10は動作中であるので、システム初期化処理の全てを行う必要はない。そこで、ステップS12においては、例えば、CPU10内のキャッシュ情報の初期化等、一部の初期化処理が行われる。
次いで、ハイバネーション中断リスタートであることを示すスタート情報がメインメモリ13の起動処理・終了処理用ワークエリア131に設定され(ステップS13)、処理はステップS14に移行する。
When the process is started from “hibernation interruption restart”, a hibernation system initialization process is first executed (step S12). When the hibernation process is interrupted and the startup process is started, the CPU 10 is operating, and therefore it is not necessary to perform all the system initialization processes. Therefore, in step S12, for example, a part of initialization processing such as initialization of cache information in the CPU 10 is performed.
Next, start information indicating that the hibernation interruption restart is set in the work area 131 for start processing / end processing of the main memory 13 (step S13), and the processing proceeds to step S14.

ステップS14においては、メイン表示装置151、サブ表示装置152、印字装置17、入力装置18等の周辺機器のドライバが初期化される(ステップS14)。   In step S14, drivers for peripheral devices such as the main display device 151, the sub display device 152, the printing device 17, and the input device 18 are initialized (step S14).

次いで、入力装置18のINITキーが押下されたか否かが判断される(ステップS15)。ここで、INITキー(イニシャルキー)は、ECR1の設置の際にディーラーが使用するキーであり、メインメモリ13上の起動処理・終了処理用ワークエリア131以外の領域のデータ、即ち、設定データやユーザデータを含む全てのデータを初期化することを指示するためのキーである。入力装置18の電源キーがOFFされた後、INITキーを押しながら電源キーがONに切り替えられると、INITキーが有効となる。即ち、INITキーが押下されるタイミングでは、ほとんどの場合、ハイバネーション処理中断後のリスタートとなる。   Next, it is determined whether or not the INIT key of the input device 18 has been pressed (step S15). Here, the INIT key (initial key) is a key used by the dealer when the ECR 1 is installed, and data in an area other than the start / end processing work area 131 on the main memory 13, that is, setting data, This is a key for instructing to initialize all data including user data. After the power key of the input device 18 is turned off, the INIT key becomes valid when the power key is switched on while pressing the INIT key. That is, at the timing when the INIT key is pressed, in most cases, the restart occurs after the hibernation process is interrupted.

INITキーが押下された場合(ステップS15;YES)、処理は図11bのステップS35に移行し、プログラム格納メモリ12のプログラムに誤りがないかチェックが行われる。チェック結果がOKである場合(ステップS35;OK)、プログラム格納メモリ12のプログラムがメインメモリ13のコピー領域133にコピーされ(ステップS36)、ECR1がINIT状態にて起動され(ステップS37)、本処理は終了する。INIT状態にて起動とは、メインメモリ13から起動処理・終了処理用ワークエリア131以外の領域のデータ、即ち、サスペンド用エリア132、システムデータ領域134、設定データ領域135、ユーザデータ領域136のデータが消去された後に起動されることを意味する。起動後は、図4に示すECR制御処理が実行される。チェック結果がNGである場合(ステップS35;NG)、システムエラーが発生したことを示すシステムエラーメッセージ、例えば「システムエラー」という文字列がメイン表示装置151に表示され(ステップS38)、本処理は終了する。   If the INIT key has been pressed (step S15; YES), the process proceeds to step S35 in FIG. 11b, and a check is made to see if there is an error in the program storage memory 12 program. If the check result is OK (step S35; OK), the program in the program storage memory 12 is copied to the copy area 133 of the main memory 13 (step S36), and ECR1 is started in the INIT state (step S37). The process ends. Activation in the INIT state means that data in the area other than the activation / end process work area 131 from the main memory 13, that is, data in the suspend area 132, the system data area 134, the setting data area 135, and the user data area 136. Means that it will be activated after it is erased. After startup, the ECR control process shown in FIG. 4 is executed. When the check result is NG (step S35; NG), a system error message indicating that a system error has occurred, for example, a character string “system error” is displayed on the main display device 151 (step S38). finish.

INITキーが押下されていない場合(ステップS15;NO)、FCキーが押下されたか否かが判断される(ステップS16)。ここで、FCキー(フラグクリアキー)は、メインメモリ13上の起動処理・終了処理用ワークエリア131以外のデータのうち設定データを残して初期化することを指示するためのキーである。入力装置18の電源キーがOFFされた後、FCキーを押しながら電源キーがONに切り替えられると、FCキーが有効となる。即ち、FCキーが押下されるタイミングでは、ほとんどの場合、ハイバネーション処理中断後のリスタートとなる。FCキーが押下されていない場合(ステップS16;NO)、処理はステップS18に移行する。FCキーが押下されている場合(ステップS16;YES)、FCキー検知済みを示すフラグがメインメモリ13上の起動処理・終了処理用ワークエリア131に設定され(ステップS17)、処理はステップS18に移行する。   If the INIT key has not been pressed (step S15; NO), it is determined whether or not the FC key has been pressed (step S16). Here, the FC key (flag clear key) is a key for instructing to leave the setting data among the data other than the work area 131 for start processing / end processing on the main memory 13 to initialize. After the power key of the input device 18 is turned off, when the power key is switched on while pressing the FC key, the FC key becomes valid. That is, in most cases, the timing at which the FC key is pressed is a restart after the hibernation process is interrupted. If the FC key has not been pressed (step S16; NO), the process proceeds to step S18. If the FC key has been pressed (step S16; YES), a flag indicating that the FC key has been detected is set in the work area 131 for start processing / end processing on the main memory 13 (step S17), and the processing proceeds to step S18. Transition.

ステップS18においては、ハイバネーション処理中断後のリスタートであるか否かが判断される。具体的に、起動処理・終了処理用ワークエリア131に設定されているスタート情報が参照され、設定されているスタート情報がハイバネーション中断リスタートであることを示す情報である場合は、ハイバネーション中断リスタートであると判断される。設定されているスタート情報がリセットスタートであることを示す情報である場合は、ハイバネーション中断リスタートではないと判断される。ハイバネーション処理中断後のリスタートであると判断されると(ステップS18;YES)、処理は図11bのステップS23に移行する。即ち、ステップS19〜S22の処理がスキップされる。ハイバネーション処理中断後のリスタートである場合、メインメモリ13にAC電源31遮断前のメインメモリ13上のデータがそのまま残されているので、ハイバネーション用メモリ14からデータを復帰させる必要はない。   In step S18, it is determined whether or not the restart is after the hibernation process is interrupted. Specifically, when the start information set in the work area 131 for start processing / end processing is referred to and the set start information is information indicating that the hibernation interruption restart is performed, the hibernation interruption restart is performed. It is judged that. If the set start information is information indicating a reset start, it is determined that the hibernation interrupted restart is not performed. If it is determined that the restart is after the hibernation process is interrupted (step S18; YES), the process proceeds to step S23 in FIG. 11b. That is, the processes in steps S19 to S22 are skipped. In the case of restart after interruption of the hibernation process, the data on the main memory 13 before the AC power supply 31 is cut off remains in the main memory 13, so that it is not necessary to restore the data from the hibernation memory 14.

ハイバネーション処理中断後のリスタートではないと判断されると(ステップS18;NO)、ハイバネーション用メモリ14のハイバネーション完了フラグ領域141aが参照される。ハイバネーション完了フラグがONに設定されている場合(ステップS19;YES)、チェックサムの検証が行われる(ステップS20)。即ち、チェックサム格納領域143に記憶されているチェックサムとバックアップ領域142に記憶されているデータの合計値とが一致するか否かの検証が行われる。チェックサムの検証結果がOKである場合(ステップS20;OK)、ハイバネーション用メモリ14のバックアップ領域142に記憶されているバックアップデータがメインメモリ13に書き戻される(ステップS21)。   If it is determined that the restart is not after the hibernation process is interrupted (step S18; NO), the hibernation completion flag area 141a of the hibernation memory 14 is referred to. If the hibernation completion flag is set to ON (step S19; YES), checksum verification is performed (step S20). That is, it is verified whether or not the checksum stored in the checksum storage area 143 matches the total value of the data stored in the backup area 142. If the checksum verification result is OK (step S20; OK), the backup data stored in the backup area 142 of the hibernation memory 14 is written back to the main memory 13 (step S21).

次いで、メインメモリ13に書き戻されたプログラムに誤りがないかチェックが行われる(ステップS22)。チェック結果がOKである場合(ステップS22;OK)、FCキーが検知済みであるか否かが判断される(図11bのステップS23)。FCキーが検知済みではないと判断されると(ステップS23;NO)、サスペンド用エリア132上のプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等がCPU10に書き戻される(ステップS24)。また、周辺機器がAC電源遮断前の状態へ復帰される(ステップS25)。例えば、メイン表示装置151にメインメモリ13のユーザデータに含まれる表示データが送信され、AC電源遮断前の表示状態に戻される。そして、AC電源遮断前の状態でシステムが復帰され(ステップS26)、本処理は終了する。   Next, it is checked whether or not there is an error in the program written back to the main memory 13 (step S22). If the check result is OK (step S22; OK), it is determined whether or not the FC key has been detected (step S23 in FIG. 11b). If it is determined that the FC key has not been detected (step S23; NO), the program counter, stack pointer, register, system data, etc. on the suspend area 132 are written back to the CPU 10 (step S24). Further, the peripheral device is returned to the state before the AC power supply is cut off (step S25). For example, the display data included in the user data in the main memory 13 is transmitted to the main display device 151, and the display state before the AC power cut-off is restored. Then, the system is restored in a state before the AC power supply is shut off (step S26), and this process ends.

一方、FCキーが検知済みであると判断されると(ステップS23;YES)、処理は図11bのステップS27に移行し、プログラム格納メモリ12のプログラムに誤りがないかチェックが行われる。チェック結果がOKである場合(ステップS27;OK)、プログラム格納メモリ12のプログラムがメインメモリ13のコピー領域133にコピーされ(ステップS28)、ECR1がFC状態にて起動され(ステップS29)、本処理は終了する。FC状態にて起動とは、メインメモリ13のサスペンド用エリア132、システムデータ領域134、ユーザデータ領域136のデータが消去された後に起動されることを意味する。起動後は、図4に示すECR制御処理が実行される。チェック結果がNGである場合(ステップS27;NG)、システムエラーが発生したことを示すシステムエラーメッセージ、例えば「システムエラー」という文字列がメイン表示装置151に表示され(ステップS30)、本処理は終了する。   On the other hand, if it is determined that the FC key has been detected (step S23; YES), the process proceeds to step S27 in FIG. 11b, and a check is made as to whether there is an error in the program in the program storage memory 12. If the check result is OK (step S27; OK), the program in the program storage memory 12 is copied to the copy area 133 of the main memory 13 (step S28), and ECR1 is activated in the FC state (step S29). The process ends. Activation in the FC state means activation after data in the suspend area 132, the system data area 134, and the user data area 136 of the main memory 13 are erased. After startup, the ECR control process shown in FIG. 4 is executed. If the check result is NG (step S27; NG), a system error message indicating that a system error has occurred, for example, a character string “system error” is displayed on the main display device 151 (step S30). finish.

一方、ステップS19でハイバネーション完了フラグがONでないと判断された場合(ステップS19;NO)、ステップS20でチェックサムの検証がNGであると判断された場合(ステップS20;NG)、又は、ステップS22でメインメモリ13のプログラムチェック結果がNGである場合(ステップS22;NG)、処理は図11bのステップS31に移行し、プログラム格納メモリ12のプログラムに誤りがないかチェックが行われる。チェック結果がOKである場合(ステップS31;OK)、プログラム格納メモリ12のプログラムがメインメモリ13のコピー領域133にコピーされ(ステップS32)、ECR1がバックアップエラー状態にて起動され(ステップS33)、本処理は終了する。バックアップエラー状態にて起動とは、メイン表示装置151に「バックアップエラーが発生しました」等のメッセージが表示され、メインメモリ13から起動処理・終了処理用ワークエリア131以外の領域のデータ、即ち、サスペンド用エリア132、システムデータ領域134、設定データ領域135、ユーザデータ領域136のデータが消去された後、起動されることを意味する。起動後は、図4に示すECR制御処理が実行される。プログラムのチェック結果がNGである場合(ステップS31;NG)、システムエラーが発生したことを示すシステムエラーメッセージ、例えば「システムエラー」という文字列がメイン表示装置151に表示され(ステップS34)、本処理は終了する。   On the other hand, if it is determined in step S19 that the hibernation completion flag is not ON (step S19; NO), if it is determined in step S20 that checksum verification is NG (step S20; NG), or step S22. If the result of the program check in the main memory 13 is NG (step S22; NG), the process proceeds to step S31 in FIG. 11b to check whether there is an error in the program in the program storage memory 12. If the check result is OK (step S31; OK), the program in the program storage memory 12 is copied to the copy area 133 of the main memory 13 (step S32), and ECR1 is activated in a backup error state (step S33). This process ends. Starting in the backup error state means that a message such as “A backup error has occurred” is displayed on the main display device 151, and data in an area other than the work area 131 for start processing / end processing from the main memory 13, that is, This means that after the data in the suspend area 132, the system data area 134, the setting data area 135, and the user data area 136 are deleted, the data is activated. After startup, the ECR control process shown in FIG. 4 is executed. When the check result of the program is NG (step S31; NG), a system error message indicating that a system error has occurred, for example, a character string “system error” is displayed on the main display device 151 (step S34). The process ends.

図12に、AC電源31の電源遮断前のメイン表示装置151及びAC電源31の電源供給後のメイン表示装置151の画面表示例を示す。図12では、商品登録処理中に停電等によりAC電源31が遮断された場合を示している。上述のように、終了処理では、CPU10のプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等のシステムの動作状態を示すデータがメインメモリ13に退避され、バックアップ電源32のOFF前に更に不揮発性メモリであるハイバネーション用メモリ14に退避される。再度AC電源31が供給状態になった場合には、メインメモリ13上(又はハイバネーション用メモリ14)からプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等がCPU10に読み出される。そのため、中断された商品登録処理プログラムの処理の実行位置をAC電源遮断前の状態に戻すことができ、図12に示すように、AC電源遮断前と同じ画面がメイン表示装置151に表示される。ユーザは、AC電源遮断前に行った登録をやり直すことなく、商品登録処理を継続して実行することが可能となる。   FIG. 12 shows screen display examples of the main display device 151 before the AC power supply 31 is turned off and the main display device 151 after the AC power supply 31 is supplied with power. FIG. 12 shows a case where the AC power supply 31 is interrupted due to a power failure or the like during the product registration process. As described above, in the termination process, data indicating the operating state of the system such as the program counter, stack pointer, register, and system data of the CPU 10 is saved in the main memory 13 and further stored in the nonvolatile memory before the backup power source 32 is turned off. It is saved in a certain hibernation memory 14. When the AC power supply 31 is turned on again, the program counter, stack pointer, register, system data, etc. are read out from the main memory 13 (or the hibernation memory 14) to the CPU 10. Therefore, the execution position of the suspended product registration processing program can be returned to the state before the AC power supply is cut off, and the same screen as before the AC power supply is cut off is displayed on the main display device 151 as shown in FIG. . The user can continue to execute the merchandise registration process without redoing the registration performed before the AC power is shut off.

また、バックアップ用電源32のOFF前にメインメモリ13上のデータが不揮発メモリであるハイバネーション用メモリ14に退避されるので、大容量のバックアップ用電源を搭載することなく、長期のAC電源遮断後に電源遮断前の状態にシステムを復帰させることが可能となる。   In addition, since the data on the main memory 13 is saved in the hibernation memory 14 which is a nonvolatile memory before the backup power supply 32 is turned off, the power supply is turned on after long-term AC power supply cut-off without mounting a large-capacity backup power supply. It becomes possible to return the system to the state before the shutdown.

ハイバネーション用メモリ14に退避されたデータは、CPU10において他に実行すべき処理のない空き時間に書込みエリア事前消去処理により事前に消去されるので、AC電源31の遮断時にバックアップ用電源32からの給電をうけて実行されるハイバネーション処理におけるハイバネーション用メモリ14a、14bからのデータ消去にかかる時間を短縮することが可能となる。その結果、バックアップ電源32の消耗を低減することが可能となる。   Since the data saved in the hibernation memory 14 is erased in advance by the write area pre-erasing process in the idle time when there is no other processing to be executed in the CPU 10, power is supplied from the backup power source 32 when the AC power source 31 is shut off. Therefore, it is possible to reduce the time required for erasing data from the hibernation memories 14a and 14b in the hibernation process executed in response to the above. As a result, the consumption of the backup power source 32 can be reduced.

また、ハイバネーション処理の実行時以外はバックアップ用電源32がOFFに切り替えられるので、バックアップ電源32の消耗を必要最低限に抑えることが可能となる。   Further, since the backup power supply 32 is switched off except when the hibernation process is executed, it is possible to minimize the consumption of the backup power supply 32.

また、ハイバネーション用メモリ14が複数備えられ、データの書込み及び消去を複数のハイバネーション用メモリ14において並行して行うので、ハイバネーション用メモリ14へのデータ書込み速度及び消去速度を向上させることができる。その結果、バックアップ電源32の消耗を低減することが可能となる。   Further, since a plurality of hibernation memories 14 are provided and data writing and erasing are performed in parallel in the plurality of hibernation memories 14, the data writing speed and erasing speed to the hibernation memory 14 can be improved. As a result, the consumption of the backup power source 32 can be reduced.

また、ハイバネーション処理が終了するまではAC電源遮断時におけるメインメモリ13の状態が保持され、ハイバネーション処理中には、CPU10によりAC電源31の電源状態が監視され、AC電源31が供給状態となった場合には、ハイバネーション処理を中断して起動処理に移行し、メインメモリ13に記憶されているシステム動作状態を示すデータをCPU10に書き戻してAC電源遮断前の状態で動作を復帰させる制御が行われる。具体的に、ハイバネーション処理は、書込みエリアの消去処理、書込み処理、書込み内容保証処理を含んで構成されるが、CPU10により、ハイバネーション用メモリ14における1ブロック毎のデータ消去中、書込み中にAC電源状態が監視されており、AC電源31が供給状態となった場合は、ハイバネーション処理を中断して起動処理のハイバネーション中断リスタート位置に移行する制御が行われる。従って、ハイバネーション処理中にAC電源31が供給状態となった場合、ハイバネーション処理の完了を待つことなく直ちにAC電源遮断前のシステム状態に復帰することが可能となる。   Further, the state of the main memory 13 at the time of AC power interruption is maintained until the hibernation process is completed. During the hibernation process, the power state of the AC power supply 31 is monitored by the CPU 10 and the AC power supply 31 is in the supply state. In such a case, the hibernation process is interrupted and the process proceeds to the start-up process, and data indicating the system operation state stored in the main memory 13 is written back to the CPU 10 so that the operation is returned to the state before the AC power supply is shut off. Is called. Specifically, the hibernation process includes a write area erasure process, a write process, and a write content guarantee process. The CPU 10 uses the AC power supply during data erasure and writing for each block in the hibernation memory 14. When the state is monitored and the AC power supply 31 is in the supply state, control is performed to interrupt the hibernation process and shift to the hibernation interruption restart position of the activation process. Therefore, when the AC power supply 31 is in a supply state during the hibernation process, it is possible to immediately return to the system state before the AC power supply cut-off without waiting for the completion of the hibernation process.

また、書込み内容保証処理では、メインメモリ13の退避対象データとハイバネーション用メモリ14に退避されたデータとの整合性をチェックするデータベリファイ処理の実施、書込んだバックアップデータのチェックサムの書込み、ハイバネーション完了フラグONの設定が行われるので、ハイバネーション用メモリ14に退避されたデータとハイバネーション用メモリ14からメインメモリ13に書き戻されるデータの整合性を保証することが可能となる。   In the write content guarantee process, a data verify process for checking the consistency between the save target data in the main memory 13 and the data saved in the hibernation memory 14 is performed, the checksum of the written backup data is written, and hibernation is performed. Since the completion flag ON is set, it is possible to guarantee the consistency between the data saved in the hibernation memory 14 and the data written back to the main memory 13 from the hibernation memory 14.

(実施形態2)
次に、本発明の実施形態2について説明する。
実施形態2においては、マルチタスクで各種処理が実行される場合の一例について説明する。
(Embodiment 2)
Next, Embodiment 2 of the present invention will be described.
In the second embodiment, an example in which various processes are executed by multitasking will be described.

なお、実施形態2において、プログラム格納メモリ12には、オペレーティングシステムが記憶されている。オペレーティングシステムには、後述するECR制御処理(実施形態1と区別するためECR制御処理Bとする)、外部入力イベント割込み処理、タイマ割込み処理、終了処理、を実行するためのプログラムが含まれる。また、プログラム格納メモリ12には、商品登録処理タスク、書込みエリア事前消去処理タスクを実行するための各種プログラムが記憶されている。なお、各タスクのプログラムは、処理関数により構成される。   In the second embodiment, the program storage memory 12 stores an operating system. The operating system includes a program for executing ECR control processing (hereinafter referred to as ECR control processing B for distinguishing from the first embodiment), external input event interrupt processing, timer interrupt processing, and termination processing. The program storage memory 12 stores various programs for executing the product registration processing task and the write area pre-erasing processing task. Each task program is constituted by a processing function.

その他のECR1の構成については図1〜3を用いて実施形態1で説明したものと同様であるので説明を援用し、以下実施形態2の動作について説明する。   Since the configuration of the other ECR 1 is the same as that described in the first embodiment with reference to FIGS. 1 to 3, the operation of the second embodiment will be described below with reference to the description.

図13〜図16に、CPU10とオペレーティングシステムとの協働により実行される処理のフローチャートを示す。   FIGS. 13 to 16 show flowcharts of processing executed in cooperation with the CPU 10 and the operating system.

図13〜図16に示す処理は、CPU10とオペレーティングシステムの協働により以下のように切り替えながら実行される。
ECR1の起動後は、まず、図13に示すECR制御処理Bが実行される。入力装置18による入力(外部入力イベント割込み)が発生すると、ECR制御処理Bは中断され、図14に示す外部入力イベント割込み処理が実行される。外部入力イベント割込み処理が終了すると、ECR制御処理Bの中断した実行位置から処理が再開される。CPU10の内部クロックによるタイマ割込みが発生すると、ECR制御処理Bは中断され、図15に示すタイマ割込み処理が実行される。タイマ割込み処理が終了すると、ECR制御処理Bの中断した位置の処理に戻る。AC電源状態監視回路34によりAC電源遮断を通知する信号が入力され、電源遮断割込みが発生すると、図16に示す終了処理が実行され、ECR1の動作が停止される。
The processing shown in FIGS. 13 to 16 is executed while switching as follows by the cooperation of the CPU 10 and the operating system.
After the activation of ECR1, first, ECR control processing B shown in FIG. 13 is executed. When an input (external input event interrupt) by the input device 18 occurs, the ECR control process B is interrupted and the external input event interrupt process shown in FIG. 14 is executed. When the external input event interrupt process ends, the process is resumed from the execution position where the ECR control process B was interrupted. When a timer interrupt is generated by the internal clock of the CPU 10, the ECR control process B is interrupted and the timer interrupt process shown in FIG. 15 is executed. When the timer interrupt process ends, the process returns to the process at the position where the ECR control process B was interrupted. When a signal for notifying AC power supply interruption is input by the AC power supply state monitoring circuit 34 and a power supply interruption interrupt occurs, the termination process shown in FIG. 16 is executed, and the operation of ECR1 is stopped.

図13を参照してECR制御処理Bについて説明する。
まず、タスク登録処理が実行される(ステップS41)。タスク登録処理は、例えば、メインメモリ13のシステムデータ領域134に、OSのシステムデータとしてタスクとなる処理(処理関数)へのポインタ及びタスクの実行優先度(以下、単に優先度という)を登録する処理、タスクのスタックエリアを確保する処理等が含まれる。
The ECR control process B will be described with reference to FIG.
First, a task registration process is executed (step S41). In the task registration process, for example, a pointer to a process (processing function) serving as a task (system function) and a task execution priority (hereinafter simply referred to as priority) are registered in the system data area 134 of the main memory 13. The process includes a process and a process for securing a task stack area.

図17に、メインメモリ13のシステムデータ領域134に、オペレーティングシステムのシステムデータとして登録される情報の一例を示す。
タスク登録処理では、図17に示す優先度1の登録タスク情報134a、優先度2の登録タスク情報134b、優先度3の登録タスク情報134cが登録される。ここでは、優先度1が最も高く、優先度3が最も低い優先度を示している。各登録タスク情報には、タスクとなる処理(処理関数)へのポインタ等が含まれる。実施形態2においては、優先度1の登録タスク情報134aとして、商品登録処理タスク(タスクAとする)が書込まれており、優先度3の登録タスク情報134cとして、書込みエリア事前消去処理タスク(タスクCとする)が書込まれている。なお、図17においては、タスクの優先度が3段階の場合を例として示しているが、これに限定されない。
その他、オペレーティングシステムのシステムデータには、図17に示すように、その他情報134dが書込まれる。その他情報134dには、登録された各タスクの起動要求フラグ等が書込まれる。本実施形態2においては、タスクAの起動要求フラグ、タスクCの起動要求フラグ、タスクCの次の起動までの指定時間及びタスクCの次の実行位置等が書込まれる。タスクAの起動要求フラグ及びタスクCの起動要求フラグが「1」の場合は起動要求があることを示し、「0」の場合は起動要求がないことを示す。なお、タスク登録処理においては、タスクAの起動要求フラグの初期値として「0」が、タスクCの起動要求フラグの初期値として「1」が書込まれる。
FIG. 17 shows an example of information registered as system data of the operating system in the system data area 134 of the main memory 13.
In the task registration process, registered task information 134a with priority level 1, registered task information 134b with priority level 2 and registered task information 134c with priority level 3 shown in FIG. 17 are registered. Here, priority 1 is the highest and priority 3 is the lowest. Each registered task information includes a pointer to a process (processing function) to be a task. In the second embodiment, the product registration processing task (referred to as task A) is written as the priority 1 registration task information 134a, and the write area pre-erase processing task (priority 3 registration task information 134c) Task C) is written. In FIG. 17, the case where the priority of the task is three levels is shown as an example, but the present invention is not limited to this.
In addition, as shown in FIG. 17, other information 134d is written in the system data of the operating system. In the other information 134d, an activation request flag of each registered task is written. In the second embodiment, an activation request flag for task A, an activation request flag for task C, a designated time until the next activation of task C, the next execution position of task C, and the like are written. When the activation request flag of task A and the activation request flag of task C are “1”, it indicates that there is an activation request, and when “0”, there is no activation request. In the task registration process, “0” is written as the initial value of the task A activation request flag, and “1” is written as the initial value of the task C activation request flag.

次いで、システムデータ領域134のタスクAの起動要求フラグが参照され、タスクAの起動要求フラグが「1」であるか否かが判断される(ステップS42)。   Next, the activation request flag for task A in the system data area 134 is referred to, and it is determined whether the activation request flag for task A is “1” (step S42).

タスクAの起動要求フラグは、初期値は「0」であるが、入力装置18から商品登録処理の要求が入力され、入力装置18による外部入力イベント割込みが発生すると、図14に示すように、外部入力イベント割込み処理が実行され、「1」に書き替えられる(図14のステップS51)。   Although the initial value of the task A activation request flag is “0”, when a request for product registration processing is input from the input device 18 and an external input event interrupt is generated by the input device 18, as shown in FIG. External input event interrupt processing is executed and rewritten to “1” (step S51 in FIG. 14).

タスクAの起動要求フラグが「1」であると判断されると(ステップS42;YES)、タスクAの起動要求フラグが「0」に書き替えられ(ステップS43)、商品登録処理タスク(タスクA)が実行される(ステップS44)。   If it is determined that the task A activation request flag is “1” (step S42; YES), the task A activation request flag is rewritten to “0” (step S43), and the product registration processing task (task A) ) Is executed (step S44).

商品登録処理タスクは、入力装置18からの入力に従って、商品が取引された日時、商品名、商品の売上個数、売上金額等の売上データ、担当者等をユーザデータ領域136に登録し、商品名、売上(購入)個数、売上(購入)金額、お預かり金額、返金額等が印字装置17によりレシートに印字する処理である。
商品登録処理タスクの実行中に外部入力イベント割込み又はタイマ割込みが発生すると、商品登録処理タスクは中断され、外部入力イベント割込み処理又はタイマ割込み処理が実行される。このとき、中断されたタスクの実行位置はCPU10のレジスタに書込まれ、割り込みによる処理の終了後、中断された実行位置から商品登録処理タスクが再開される。
In accordance with the input from the input device 18, the product registration processing task registers the date and time when the product was traded, the product name, the sales quantity of the product, the sales data such as the sales amount, the person in charge, etc. in the user data area 136, and the product name In this process, the number of sales (purchase), sales (purchase) amount, deposit amount, return amount, etc. are printed on the receipt by the printing device 17.
If an external input event interrupt or timer interrupt occurs during the execution of the product registration processing task, the product registration processing task is interrupted, and the external input event interrupt processing or timer interrupt processing is executed. At this time, the execution position of the interrupted task is written into the register of the CPU 10, and after completion of the processing by interruption, the product registration processing task is resumed from the interrupted execution position.

ステップS44の処理が終了すると、処理はステップS42に戻る。
ステップS42において、タスクAの起動要求フラグが「0」であると判断されると(ステップS42;NO)、システムデータ領域134のタスクCの起動要求フラグが参照され、タスクCの起動要求フラグが「1」であるか否かが判断される(ステップS45)。 タスクCの起動要求フラグが「1」であると判断されると(ステップS45;YES)、タスクCの起動要求フラグが「0」に書き替えられ(ステップS46)、書込みエリア事前消去処理タスク(タスクC)が実行される(ステップS47)。
When the process of step S44 ends, the process returns to step S42.
If it is determined in step S42 that the task A activation request flag is “0” (step S42; NO), the task C activation request flag in the system data area 134 is referred to, and the task C activation request flag is set. It is determined whether or not “1” (step S45). If it is determined that the task C activation request flag is “1” (step S45; YES), the task C activation request flag is rewritten to “0” (step S46), and the write area pre-erase processing task ( Task C) is executed (step S47).

図18に、書込みエリア事前消去処理タスクのフローチャートを示す。
ここで、書込みエリア事前消去処理タスクは、ハイバネーション用メモリ14a、14bに記憶されているデータを消去する処理である。ハイバネーション用メモリ14a、14bには、上述したように、AC電源31の遮断時にメインメモリ13に記憶されているデータが退避される(書込まれる)。このデータ退避は、後述する電源遮断割込みによって実行される終了処理において、バックアップ用電源32の給電により行われる。しかし、ハイバネーション用メモリ14a、14bにデータを書込む前に、まず前回のAC遮断時に書込まれたデータをハイバネーション用メモリ14a、14bから消去する必要がある。この処理を全て終了処理において行うと、AC電源31が遮断されてから動作が完全に停止するまでに時間がかかり、バックアップ用電源32が消耗する。そこで、CPU10において他に実行すべき処理のない、即ち、商品登録処理タスク等が実行されていない空き時間に書込みエリア事前消去処理タスクを実行することで、AC電源31の遮断時におけるハイバネーション用メモリ14a、14bからのデータ消去にかかる時間を短縮し、バックアップ用電源32の消耗を低減する。
FIG. 18 shows a flowchart of the write area pre-erasing process task.
Here, the write area pre-erasing process task is a process of erasing data stored in the hibernation memories 14a and 14b. As described above, the data stored in the main memory 13 is saved (written) in the hibernation memories 14a and 14b when the AC power supply 31 is shut off. This data saving is performed by supplying power from the backup power supply 32 in an end process executed by a power-off interrupt described later. However, before the data is written to the hibernation memories 14a and 14b, it is necessary to first erase the data written at the previous AC cutoff from the hibernation memories 14a and 14b. If this process is all performed in the end process, it takes time until the operation is completely stopped after the AC power supply 31 is shut off, and the backup power supply 32 is consumed. Therefore, the hibernation memory when the AC power supply 31 is cut off is executed by executing the write area pre-erase processing task in the idle time when there is no other processing to be executed in the CPU 10, that is, the product registration processing task or the like is not executed. The time required for erasing data from 14a and 14b is shortened, and consumption of the backup power source 32 is reduced.

まず、消去ブロック番号領域131aに記憶されている番号が取得される(ステップS401)。次いで、取得された番号がハイバネーション用メモリ14a、14bの最終ブロック番号nであるか否かが判断される(ステップS402)。   First, the number stored in the erase block number area 131a is acquired (step S401). Next, it is determined whether or not the acquired number is the last block number n of the hibernation memories 14a and 14b (step S402).

取得された番号が最終ブロック番号nではないと判断されると(ステップS402;NO)、取得された番号の次の番号のブロックのデータ消去がハイバネーション用メモリ14a、14bに指示される(ステップS403)。そして、システムデータ領域134に、書込みエリア事前消去処理タスク(タスクC)の次の起動までの指定時間及びタスクCの次の実行位置の情報(書込みエリア事前消去処理が再開されたときに実行を開始する位置、具体的には、ステップS405)が書込まれ、書込みエリア事前消去処理タスクは待ち状態となる(ステップS404)。   If it is determined that the acquired number is not the final block number n (step S402; NO), the hibernation memory 14a, 14b is instructed to erase the data of the block having the number next to the acquired number (step S403). ). In the system data area 134, information on the designated time until the next start of the write area pre-erasing process task (task C) and information on the next execution position of task C (executed when the write area pre-erasing process is resumed) The starting position, specifically, step S405) is written, and the write area pre-erase processing task enters a waiting state (step S404).

図13に戻り、書込みエリア事前消去処理タスクが待ち状態となると、ECR制御処理Bに戻り、ステップS42から処理が実行される。
ECR制御処理Bが予め定められた一定時間実行されると、タイマ割込みが発生し、図15に示すタイマ割込み処理が実行される。タイマ割込みの発生は、CPU10の内部クロックにより管理される。
Returning to FIG. 13, when the write area pre-erasing process task is in a waiting state, the process returns to the ECR control process B, and the process is executed from step S42.
When the ECR control process B is executed for a predetermined time, a timer interrupt is generated and the timer interrupt process shown in FIG. 15 is executed. Generation of the timer interrupt is managed by the internal clock of the CPU 10.

ここで、図15を参照してタイマ割込み処理について説明する。
まず、システムデータ領域134に書込まれている、タスクCの次の起動までの指定時間が経過したか否かが判断される(ステップS61)。タスクCの次の起動までの指定時間が経過したか否かは、CPU10の内部クロックにより管理される。
Here, the timer interrupt process will be described with reference to FIG.
First, it is determined whether or not the specified time written in the system data area 134 until the next activation of task C has elapsed (step S61). Whether or not the designated time until the next activation of task C has elapsed is managed by the internal clock of the CPU 10.

タスクCの次の起動までの指定時間が経過していないと判断されると(ステップS61;NO)、タイマ割込み処理は終了する。
タスクCの次の起動までの指定時間が経過したと判断されると(ステップS61;YES)、タスクCの起動要求フラグが「1」に書き替えられ、タイマ割込み処理は終了する。
When it is determined that the designated time until the next activation of the task C has not elapsed (step S61; NO), the timer interrupt process ends.
When it is determined that the designated time until the next activation of task C has elapsed (step S61; YES), the activation request flag of task C is rewritten to “1”, and the timer interrupt process ends.

タイマ割込み処理が終了すると、処理は図13に示すECR制御処理BのステップS42に移行する。ステップS42において、タスクAの起動要求フラグが「1」であると判断されると(ステップS42;YES)、上述のステップS43、S44の処理が実行される。ステップS42において、タスクAの起動要求フラグが「0」であると判断されると(ステップS42;NO)、システムデータ領域134のタスクCの起動要求フラグが参照され、タスクCの起動要求フラグが「1」であるか否かが判断される(ステップS45)。   When the timer interrupt process ends, the process proceeds to step S42 of the ECR control process B shown in FIG. If it is determined in step S42 that the activation request flag for task A is “1” (step S42; YES), the processes of steps S43 and S44 described above are executed. If it is determined in step S42 that the task A activation request flag is “0” (step S42; NO), the task C activation request flag in the system data area 134 is referred to, and the task C activation request flag is set. It is determined whether or not “1” (step S45).

タスクCの起動要求フラグが「1」ではないと判断されると(ステップS45;NO)、処理はステップS42に戻る。タスクCの起動要求フラグが「1」であると判断されると(ステップS45;YES)、処理はステップS46に進み、タスクCの起動要求フラグが「0」に書き替えられ、書込みエリア事前消去処理が再開される(ステップS47)。   When it is determined that the task C activation request flag is not “1” (step S45; NO), the process returns to step S42. If it is determined that the task C activation request flag is “1” (step S45; YES), the process proceeds to step S46, the task C activation request flag is rewritten to “0”, and the write area pre-erase is performed. Processing is resumed (step S47).

ここで、システムデータ領域134には、書込みエリア事前消去処理が再開されたときの実行位置として、図18のステップS405の位置が書込まれているので、書込みエリア事前消去処理は図18のステップS405から再開される。   Here, since the position of step S405 in FIG. 18 is written in the system data area 134 as the execution position when the write area pre-erase process is resumed, the write area pre-erase process is performed in the step of FIG. The process is resumed from S405.

図18のステップS405においては、ステップS403において指示したブロックのデータ消去が終了したか否かの問い合わせがハイバネーション用メモリ14a、14bに送信され、指示されたブロックのデータ消去が終了していない旨がハイバネーション用メモリ14a、14bから応答されると(ステップS405;NO)、処理はステップS404に戻る。指示されたブロックのデータ消去が終了した旨がハイバネーション用メモリ14a、14bから応答されると(ステップS405;YES)、データ消去されたブロックのブロック番号が消去ブロック番号領域131aに書込まれ(ステップS406)、処理は図4のステップS401に戻る。   In step S405 in FIG. 18, an inquiry as to whether or not the data erasure of the block designated in step S403 has been completed is transmitted to the hibernation memories 14a and 14b, indicating that the data erasure of the designated block has not been completed. When a response is received from the hibernation memories 14a and 14b (step S405; NO), the process returns to step S404. When the hibernation memory 14a, 14b responds that the erasure of the designated block has been completed (step S405; YES), the block number of the data-erased block is written into the erasure block number area 131a (step S405). In step S406, the process returns to step S401 in FIG.

一方、ステップS402において、取得された番号が最終ブロック番号nであると判断されると(ステップS402;YES)、書込みエリア事前消去処理タスクは終了し、処理は図13のステップS42に移行する。   On the other hand, if it is determined in step S402 that the acquired number is the final block number n (step S402; YES), the write area pre-erasing process task is terminated, and the process proceeds to step S42 in FIG.

AC電源状態監視回路34からAC電源遮断を通知する信号が入力されると、電源遮断割込みが発生し、図16に示す終了処理が実行される。終了処理は、実施形態1において図6を用いて説明したものと同様であるので詳細説明を援用する。即ち、サスペンド処理(ステップS71)、スイッチ35の切り替えによるバックアップ用電源32のONへの切り替え(ステップS72)、ハイバネーション処理(ステップS73)、スイッチ35の切り替えによるバックアップ用電源32のOFFへの切り替え(ステップS74)が行われ、動作が停止される。ハイバネーション処理の書込みエリア消去処理(図8参照)においては、書込みエリア事前消去処理タスクによって消去しきれなかった未処理の残存データのみを消去すればよいので、AC電源31の遮断時におけるハイバネーション用メモリ14a、14bからのデータ消去にかかる時間を短縮し、バックアップ電源32の消耗を低減することが可能となる。   When a signal for notifying AC power supply interruption is input from the AC power supply state monitoring circuit 34, a power supply interruption interrupt occurs, and the termination process shown in FIG. 16 is executed. Since the end process is the same as that described with reference to FIG. 6 in the first embodiment, the detailed description is cited. That is, the suspend process (step S71), the backup power supply 32 is switched on by switching the switch 35 (step S72), the hibernation process (step S73), and the backup power supply 32 is switched off by switching the switch 35 (step S72). Step S74) is performed and the operation is stopped. In the write area erase process (see FIG. 8) of the hibernation process, only unprocessed residual data that could not be erased by the write area pre-erase process task has to be erased. The time required for erasing data from 14a and 14b can be shortened, and consumption of the backup power supply 32 can be reduced.

AC電源状態監視回路34からAC電源投入を通知する信号が入力されると、図11a〜図11bに示す起動処理が実行される。起動処理は、実施形態1において説明したものと同様であるので説明を援用する。   When a signal for notifying that the AC power is turned on is input from the AC power supply state monitoring circuit 34, the startup process shown in FIGS. 11a to 11b is executed. Since the activation process is the same as that described in the first embodiment, the description is incorporated.

以上説明したように、実施形態2におけるECR1によれば、AC電源31の遮断時にメインメモリ13上のデータが不揮発メモリであるハイバネーション用メモリ14に退避されるので、大容量のバックアップ用電源を搭載することなく、長期のAC電源遮断後に電源遮断前の状態にシステムを復帰させることが可能となる。   As described above, according to the ECR 1 in the second embodiment, the data on the main memory 13 is saved to the hibernation memory 14 which is a non-volatile memory when the AC power supply 31 is cut off, so a large-capacity backup power supply is installed. Without this, the system can be restored to the state before the power shutdown after the AC power shutdown for a long time.

ハイバネーション用メモリ14に退避されたデータは、CPU10において他に実行すべきタスクのない空き時間に書込みエリア事前消去処理タスクにより事前に消去されるので、AC電源31の遮断時にバックアップ用電源32からの給電をうけて実行されるハイバネーション処理におけるハイバネーション用メモリ14a、14bからのデータ消去にかかる時間を短縮することが可能となる。その結果、バックアップ電源32の消耗を低減することが可能となる。   Since the data saved in the hibernation memory 14 is erased in advance by the write area pre-erase processing task in the idle time when there is no other task to be executed in the CPU 10, the data from the backup power source 32 is cut off when the AC power source 31 is shut off. It is possible to reduce the time required for erasing data from the hibernation memories 14a and 14b in the hibernation process executed with power supply. As a result, the consumption of the backup power source 32 can be reduced.

また、ハイバネーション処理の実行時以外はバックアップ用電源32がOFFに切り替えられるので、バックアップ電源32の消耗を必要最低限に抑えることが可能となる。   Further, since the backup power supply 32 is switched off except when the hibernation process is executed, it is possible to minimize the consumption of the backup power supply 32.

また、ハイバネーション用メモリ14が複数備えられ、データの書込み及び消去を複数のハイバネーション用メモリ14において並行して行うので、ハイバネーション用メモリ14へのデータ書込み速度及び消去速度を向上させることができる。その結果、バックアップ電源32の消耗を低減することが可能となる。   Further, since a plurality of hibernation memories 14 are provided and data writing and erasing are performed in parallel in the plurality of hibernation memories 14, the data writing speed and erasing speed to the hibernation memory 14 can be improved. As a result, the consumption of the backup power source 32 can be reduced.

また、ハイバネーション処理が終了するまではAC電源遮断時におけるメインメモリ13の状態が保持され、ハイバネーション処理中には、CPU10によりAC電源31の電源状態が監視され、AC電源31が供給状態となった場合には、ハイバネーション処理を中断して起動処理に移行し、メインメモリ13に記憶されているシステム動作状態を示すデータをCPU10に書き戻してAC電源遮断前の状態で動作を復帰させる制御が行われる。具体的に、ハイバネーション処理は、書込みエリアの消去処理、書込み処理、書込み内容保証処理を含んで構成されるが、CPU10により、ハイバネーション用メモリ14における1ブロック毎のデータ消去中、書込み中にAC電源状態が監視されており、AC電源31が供給状態となった場合は、ハイバネーション処理を中断して起動処理のハイバネーション中断リスタート位置に移行する制御が行われる。従って、ハイバネーション処理中にAC電源31が供給状態となった場合、ハイバネーション処理の完了を待つことなく直ちにAC電源遮断前のシステム状態に復帰することが可能となる。   Further, the state of the main memory 13 at the time of AC power interruption is maintained until the hibernation process is completed. During the hibernation process, the power state of the AC power supply 31 is monitored by the CPU 10 and the AC power supply 31 is in the supply state. In such a case, the hibernation process is interrupted and the process proceeds to the start-up process, and data indicating the system operation state stored in the main memory 13 is written back to the CPU 10 so that the operation is returned to the state before the AC power supply is shut off. Is called. Specifically, the hibernation process includes a write area erasure process, a write process, and a write content guarantee process. The CPU 10 uses the AC power supply during data erasure and writing for each block in the hibernation memory 14. When the state is monitored and the AC power supply 31 is in the supply state, control is performed to interrupt the hibernation process and shift to the hibernation interruption restart position of the activation process. Therefore, when the AC power supply 31 is in a supply state during the hibernation process, it is possible to immediately return to the system state before the AC power supply cut-off without waiting for the completion of the hibernation process.

また、書込み内容保証処理では、メインメモリ13の退避対象データとハイバネーション用メモリ14に退避されたデータとの整合性をチェックするデータベリファイ処理の実施、書込んだバックアップデータのチェックサムの書込み、ハイバネーション完了フラグONの設定が行われるので、ハイバネーション用メモリ14に退避されたデータとハイバネーション用メモリ14からメインメモリ13に書き戻されるデータの整合性を保証することが可能となる。   In the write content guarantee process, a data verify process for checking the consistency between the save target data in the main memory 13 and the data saved in the hibernation memory 14 is performed, the checksum of the written backup data is written, and hibernation is performed. Since the completion flag ON is set, it is possible to guarantee the consistency between the data saved in the hibernation memory 14 and the data written back to the main memory 13 from the hibernation memory 14.

なお、上記実施形態1〜2における記述内容は、本発明に係るECR1の好適な一例であり、これに限定されるものではない。
例えば、メインメモリ13に記憶されるデータは一例であり、これに限定されない。
その他、ECR1を構成する各装置の細部構成及び細部動作に関しても、発明の趣旨を逸脱することのない範囲で適宜変更可能である。
In addition, the description content in the said Embodiment 1-2 is a suitable example of ECR1 which concerns on this invention, and is not limited to this.
For example, the data stored in the main memory 13 is an example and is not limited to this.
In addition, the detailed configuration and detailed operation of each device constituting the ECR 1 can be appropriately changed without departing from the spirit of the invention.

本発明の実施形態におけるECRの機能構成例を示すブロック図である。It is a block diagram which shows the function structural example of ECR in embodiment of this invention. 図1のCPU、プログラム格納メモリ、メインメモリ、ハイバネーション用メモリのデータ格納例及びデータの流れを示す図である。FIG. 2 is a diagram illustrating a data storage example and a data flow of the CPU, program storage memory, main memory, and hibernation memory of FIG. 1. 図1のECRの電源系の要部構成例を示す図である。It is a figure which shows the principal part structural example of the power supply system of ECR of FIG. 図1のCPUにより実行されるECR制御処理を示すフローチャートである。It is a flowchart which shows the ECR control process performed by CPU of FIG. 図1のCPUにより実行される書込みエリア事前消去処理を示すフローチャートである。It is a flowchart which shows the write-area pre-erasure process performed by CPU of FIG. 図1のCPUにより実行される終了処理を示すフローチャートである。It is a flowchart which shows the completion | finish process performed by CPU of FIG. 図1のCPUにより実行されるハイバネーション処理を示すフローチャートである。It is a flowchart which shows the hibernation process performed by CPU of FIG. 図1のCPUにより実行される書込みエリア消去処理を示すフローチャートである。3 is a flowchart showing a write area erasing process executed by a CPU of FIG. 1. 図1のCPUにより実行される書込み処理を示すフローチャートである。It is a flowchart which shows the write-in process performed by CPU of FIG. 図1のCPUにより実行される書込み内容保証処理を示すフローチャートである。It is a flowchart which shows the written content guarantee process performed by CPU of FIG. 図1のCPUにより実行される起動処理を示すフローチャートである。It is a flowchart which shows the starting process performed by CPU of FIG. 図1のCPUにより実行される起動処理を示すフローチャートである。It is a flowchart which shows the starting process performed by CPU of FIG. 図1のメイン表示装置のAC電源遮断前後における表示例を示す図である。It is a figure which shows the example of a display before and after AC power supply interruption | blocking of the main display apparatus of FIG. 図1のCPUにより実行されるECR制御処理Bを示すフローチャートである。It is a flowchart which shows the ECR control process B performed by CPU of FIG. 図1のCPUにより実行される外部入力イベント割込み処理を示すフローチャートである。It is a flowchart which shows the external input event interruption process performed by CPU of FIG. 図1のCPUにより実行されるタイマ割込み処理を示すフローチャートである。It is a flowchart which shows the timer interruption process performed by CPU of FIG. 図1のCPUにより実行される電源遮断割込み処理を示すフローチャートである。It is a flowchart which shows the power-supply-cutting interruption process performed by CPU of FIG. 図2に示すメインメモリのシステムデータ領域に、オペレーティングシステムのシステムデータとして登録される情報の一例を示す図である。It is a figure which shows an example of the information registered as system data of an operating system in the system data area | region of the main memory shown in FIG. 図1のCPUにより実行される書込みエリア事前消去処理タスクを示すフローチャートである。It is a flowchart which shows the write-area pre-erase processing task performed by CPU of FIG.

符号の説明Explanation of symbols

1 ECR
10 CPU
11 RTC
12 プログラム格納メモリ
13 メインメモリ
131 起動処理・終了処理用ワークエリア
131a 消去ブロック番号領域
132 サスペンド用エリア
133 コピー領域
134 システムデータ領域
135 設定データ領域
136 ユーザデータ領域
14 ハイバネーション用メモリ
141 ヘッダ領域
142 バックアップ領域
143 チェックサム格納領域
151 メイン表示装置
152 サブ表示装置
16 LED
17 印字装置
18 入力装置
19 ストレージI/F
19a 外部ストレージ
20 通信部
1 ECR
10 CPU
11 RTC
12 Program storage memory 13 Main memory 131 Work area for start / end processing 131a Erase block number area 132 Suspend area 133 Copy area 134 System data area 135 Setting data area 136 User data area 14 Hibernation memory 141 Header area 142 Backup area 143 Checksum storage area 151 Main display device 152 Sub display device 16 LED
17 Printing device 18 Input device 19 Storage I / F
19a External storage 20 Communication unit

Claims (4)

主電源からの給電によりデータを記憶する揮発性記憶手段と、
前記主電源の遮断時に前記揮発性記憶手段に記憶されているデータを退避するための不揮発性記憶手段と、
処理の空き時間に前記不揮発性記憶手段に記憶されているデータの消去処理を実行し、前記主電源が遮断された際に、補助電源からの給電により前記不揮発性記憶手段に記憶されている未消去の残存データの消去処理を実行し前記揮発性記憶手段に記憶されているデータを前記不揮発性記憶手段に退避させる制御手段と、
を備える売上データ処理装置。
Volatile storage means for storing data by power supply from the main power supply;
Nonvolatile storage means for saving data stored in the volatile storage means when the main power supply is shut off;
The data stored in the nonvolatile storage means is erased during the processing free time, and when the main power supply is shut off, the data stored in the nonvolatile storage means is not supplied with power from the auxiliary power supply. Control means for executing erasure processing of residual data for erasure and for saving data stored in the volatile storage means to the nonvolatile storage means;
A sales data processing apparatus.
前記不揮発性記憶手段を複数備え、
前記制御手段は、前記揮発性記憶手段に記憶されているデータを前記複数の不揮発性記憶手段に分散して退避させる請求項1に記載の売上データ処理装置。
A plurality of the nonvolatile storage means;
The sales data processing apparatus according to claim 1, wherein the control unit distributes and saves data stored in the volatile storage unit to the plurality of nonvolatile storage units.
前記補助電源からの電源の供給と遮断とを切り替える切り替え手段を備え、
前記制御手段は、前記主電源が遮断された際に前記切り替え手段により前記補助電源に給電を行わせ、前記不揮発性記憶手段へのデータ退避の終了後、前記切り替え手段により前記補助電源を遮断させる請求項1又は2に記載の売上データ処理装置。
Comprising a switching means for switching between supply and interruption of power from the auxiliary power supply,
The control means causes the switching means to supply power to the auxiliary power supply when the main power is cut off, and causes the switching means to cut off the auxiliary power supply after data saving to the nonvolatile storage means is completed. The sales data processing apparatus according to claim 1 or 2.
主電源からの給電によりデータを記憶する揮発性記憶手段と、前記主電源の遮断時に前記揮発性記憶手段に記憶されているデータを退避するための不揮発性記憶手段と、を備える売上データ処理装置に用いられるコンピュータを、
処理の空き時間に前記不揮発性記憶手段に記憶されているデータの消去処理を実行し、前記主電源が遮断された際に、補助電源からの給電により前記不揮発性記憶手段に記憶されている未消去の残存データの消去処理を実行し前記揮発性記憶手段に記憶されているデータを前記不揮発性記憶手段に退避させる制御手段、
として機能させるためのプログラム。
A sales data processing apparatus comprising: volatile storage means for storing data by power supply from a main power supply; and nonvolatile storage means for saving data stored in the volatile storage means when the main power supply is shut off The computer used for
The data stored in the nonvolatile storage means is erased during the processing free time, and when the main power supply is shut off, the data stored in the nonvolatile storage means is not supplied with power from the auxiliary power supply. Control means for executing erasure processing of residual data for erasure and for saving data stored in the volatile storage means to the nonvolatile storage means;
Program to function as.
JP2008299322A 2008-11-25 2008-11-25 Data processing apparatus and program Active JP5444698B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008299322A JP5444698B2 (en) 2008-11-25 2008-11-25 Data processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008299322A JP5444698B2 (en) 2008-11-25 2008-11-25 Data processing apparatus and program

Publications (3)

Publication Number Publication Date
JP2010128537A true JP2010128537A (en) 2010-06-10
JP2010128537A5 JP2010128537A5 (en) 2011-11-04
JP5444698B2 JP5444698B2 (en) 2014-03-19

Family

ID=42328920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008299322A Active JP5444698B2 (en) 2008-11-25 2008-11-25 Data processing apparatus and program

Country Status (1)

Country Link
JP (1) JP5444698B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013250609A (en) * 2012-05-30 2013-12-12 Canon Inc Information processing device, control method for information processing device, and program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62140154A (en) * 1985-12-16 1987-06-23 Hitachi Ltd Data holding system for memory device
JP2003256295A (en) * 2002-03-06 2003-09-10 Matsushita Electric Works Ltd Storage device and backup method for storage device
JP2004259093A (en) * 2003-02-27 2004-09-16 Casio Comput Co Ltd Data processor and program for data processing
JP2007004237A (en) * 2005-06-21 2007-01-11 Rinnai Corp Data backup device
JP2009187062A (en) * 2008-02-01 2009-08-20 Fujitsu Ltd Information processor, control part for controlling data storage performed in information processor and control method for data storage
JP2010026789A (en) * 2008-07-18 2010-02-04 Casio Comput Co Ltd Sales data processor and program
JP2010026791A (en) * 2008-07-18 2010-02-04 Casio Comput Co Ltd Sales data processor and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62140154A (en) * 1985-12-16 1987-06-23 Hitachi Ltd Data holding system for memory device
JP2003256295A (en) * 2002-03-06 2003-09-10 Matsushita Electric Works Ltd Storage device and backup method for storage device
JP2004259093A (en) * 2003-02-27 2004-09-16 Casio Comput Co Ltd Data processor and program for data processing
JP2007004237A (en) * 2005-06-21 2007-01-11 Rinnai Corp Data backup device
JP2009187062A (en) * 2008-02-01 2009-08-20 Fujitsu Ltd Information processor, control part for controlling data storage performed in information processor and control method for data storage
JP2010026789A (en) * 2008-07-18 2010-02-04 Casio Comput Co Ltd Sales data processor and program
JP2010026791A (en) * 2008-07-18 2010-02-04 Casio Comput Co Ltd Sales data processor and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013250609A (en) * 2012-05-30 2013-12-12 Canon Inc Information processing device, control method for information processing device, and program

Also Published As

Publication number Publication date
JP5444698B2 (en) 2014-03-19

Similar Documents

Publication Publication Date Title
JP2988866B2 (en) Computer system
JP4768237B2 (en) Portable electronic device and method for controlling portable electronic device
JPH04362717A (en) System restarting device
JP2009146061A (en) Information processing device and start-up method of the device
JP4820271B2 (en) Image processing apparatus and image processing method
JP2008200943A (en) Image forming apparatus
CN100456313C (en) Information display device
JP2010026791A (en) Sales data processor and program
JP2012216014A (en) Information processor and data protection method
JP5444698B2 (en) Data processing apparatus and program
JP2003216511A (en) Non-volatile memory device, data updating method, data updating program and computer readable recording medium with recorded program
JP5349104B2 (en) Electronic device and program update method
CN112035171A (en) Factory setting restoration method and system based on UEFI firmware
JP2002099390A (en) Disk controller
JP2010026789A (en) Sales data processor and program
JP6737013B2 (en) Image forming apparatus, starting method, and computer program
JP2008009494A (en) Image forming device
JP2013200602A (en) Image processing apparatus
JP6000655B2 (en) Information processing apparatus, information processing apparatus control method, and program
JP2012088780A (en) Information processor, information processor control method and program
JP5341947B2 (en) IC card, control method of IC card, and control method of portable electronic device
JP2001306345A (en) Information processor and pos terminal
JP2007065852A (en) Information processor
JP2000081921A (en) Computer system
JP3812281B2 (en) Printing device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110914

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110914

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110914

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130418

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131209

R150 Certificate of patent or registration of utility model

Ref document number: 5444698

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150