JP2005293476A - Flash memory rewriting system, flash memory rewriting method and program - Google Patents
Flash memory rewriting system, flash memory rewriting method and program Download PDFInfo
- Publication number
- JP2005293476A JP2005293476A JP2004111079A JP2004111079A JP2005293476A JP 2005293476 A JP2005293476 A JP 2005293476A JP 2004111079 A JP2004111079 A JP 2004111079A JP 2004111079 A JP2004111079 A JP 2004111079A JP 2005293476 A JP2005293476 A JP 2005293476A
- Authority
- JP
- Japan
- Prior art keywords
- rewriting
- flash memory
- data
- memory
- predetermined area
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 230000004044 response Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 66
- 239000002131 composite material Substances 0.000 abstract description 52
- 238000004891 communication Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000011161 development Methods 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 2
- 150000001875 compounds Chemical class 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
【課題】 書き換えた後のフラッシュメモリ内に、書き換え前の古い内容が残ることのないフラッシュメモリ書き換えシステムを提供する。
【解決手段】 複合処理装置1は、データ書き換え可能なフラッシュメモリ63と、フラッシュメモリ63に書き込まれるデータを一時的に保存するRAM62と、フラッシュメモリ63へのデータの書き込みを制御するCPU61と、を備え、前記CPU61は、ホストコンピュータ100から受信する書き換え方法指示コマンドに応じて、フラッシュメモリ63の書き換え方法を選択する。
【選択図】 図2
PROBLEM TO BE SOLVED: To provide a flash memory rewriting system in which old contents before rewriting do not remain in a flash memory after rewriting.
A composite processing apparatus includes: a flash memory that can rewrite data; a RAM that temporarily stores data to be written to the flash memory; and a CPU that controls writing of data to the flash memory. The CPU 61 selects a rewriting method for the flash memory 63 in accordance with a rewriting method instruction command received from the host computer 100.
[Selection] Figure 2
Description
本発明は、フラッシュメモリ書き換えシステム、フラッシュメモリ書き換え方法及びプログラムに関する。 The present invention relates to a flash memory rewriting system, a flash memory rewriting method, and a program.
情報機器、たとえばプリンタ、スキャナ等の機器においては、ファームウェアがブートセクタとメインプログラムセクタとに分離されて、フラッシュメモリに格納されている。例えば、プリンタの場合、プリンタの通常モードを制御するプログラムであるメインプログラムがメインプログラムセクタに格納されている。また、プリンタの起動処理を実行する起動プログラムや、プリンタの書き換えモードを制御してフラッシュメモリを書き換える書き換えモードプログラムなどはブートセクタに格納されている。ここで、セクタとは、フラッシュメモリにおいて一括して消去書き込み可能な領域である。 In information devices such as printers and scanners, firmware is separated into a boot sector and a main program sector and stored in a flash memory. For example, in the case of a printer, a main program that is a program for controlling the normal mode of the printer is stored in the main program sector. In addition, a boot program for executing a printer boot process and a rewrite mode program for controlling the printer rewrite mode to rewrite the flash memory are stored in the boot sector. Here, the sector is an area that can be erased and written collectively in the flash memory.
フラッシュメモリの書き換えは、セクタ単位で行われる。通常、情報機器への新しい機能の追加や、ファームウェアのバグ修正や、特定顧客向けのカスタマイズなどのために、情報機器のファームウェアはバージョンアップされるので、フラッシュメモリの書き換えは比較的頻繁に行われる。 The flash memory is rewritten in units of sectors. Usually, information device firmware is upgraded to add new functions to information devices, firmware bug fixes, customization for specific customers, etc., so flash memory is rewritten relatively frequently. .
従来のフラッシュメモリの書き換え時には、先ず、フラッシュメモリ内の更新対象セクタ内のデータをRAMにコピーする。そして、コピーの終了後、更新対象セクタをセクタ消去プログラムにより一括消去(セクタの初期化)する。 When rewriting a conventional flash memory, first, the data in the update target sector in the flash memory is copied to the RAM. Then, after the copy is completed, the sector to be updated is collectively erased (sector initialization) by the sector erase program.
次に、RAMにコピーされたデータを編集し、RAMでの編集の終了後、編集されたデータ(以下、新セクタ格納データ)を、書き込み可能なデータサイズ分(例えば、1ワード)取り出して更新対象セクタに書き込む。そして、新セクタ格納データを更新対象セクタに全て書き込んだか否かを判定し、新セクタ格納データを更新対象セクタに全て書き込んでいない場合には書き込みを続行し、一方新セクタ格納データを更新対象セクタに全て書き込んだ場合には、セクタの書き換え処理を終了する(特許文献1参照)。
上述のフラッシュメモリの書き換え方法では、フラッシュメモリのプログラムの一部だけを書き換える場合には、書き換え対象のプログラムコードを1セクタ単位でRAMにコピーしてからRAM上で編集し、書き換えた内容をフラッシュメモリのセクタに書き戻すという手順により実行されている。 In the above flash memory rewriting method, when only a part of the flash memory program is rewritten, the program code to be rewritten is copied to the RAM in 1-sector units, then edited on the RAM, and the rewritten content is flashed. It is executed by the procedure of writing back to the memory sector.
この手順では、図6(b)のように1セクタ中の書き換え前のデータ領域が書き換え後のデータ領域と全く同じであり、例えばフラッシュメモリ中に記録された所定値の変更(例えば“値1”から“値0”への変更)等の場合には問題が発生しないが、図6(a)に示すように、プログラム全体におよぶ更新が必要で、1セクタ中の書き換え前のデータ領域が書き換え後のデータ領域より大きい場合、書き換え後のセクタ中に書き換え前の古い内容が一部残ってしまう可能性がある。この場合、書き換え後のセクタ中のファームウェアは、古い内容のデータにはアクセスしないため問題が発生しないと考えられるが、この書き換えにより厳密には製造メーカ内で評価中のファームウェア(旧プログラム領域なし)と製品に組み込まれたファームウェア(旧プログラム領域あり)が全く同じではなくなる。したがって、ファームウェア中にプログラムエラー等が存在した場合、製品版のファームウェアでは、偶然旧プログラム領域中の値を読んで装置が異常動作する等、評価中には顕在化しなかった問題が生じてしまうおそれがあり、ファームウェアの品質を確保できたとは言えない状況が生じてしまう虞もある。 In this procedure, as shown in FIG. 6B, the data area before rewriting in one sector is exactly the same as the data area after rewriting. For example, a predetermined value recorded in the flash memory is changed (for example, “value 1”). In the case of “change from“ 0 ”to“ value 0 ”), no problem occurs, but as shown in FIG. 6A, the entire program needs to be updated, and the data area before rewriting in one sector is If the data area is larger than the rewritten data area, there is a possibility that a part of old contents before rewriting may remain in the sector after rewriting. In this case, the firmware in the sector after rewriting does not access the data of the old contents, so it is considered that there will be no problem. However, the firmware under evaluation within the manufacturer strictly by this rewriting (no old program area) And the firmware embedded in the product (with the old program area) is not exactly the same. Therefore, if there is a program error in the firmware, the product version firmware may accidentally read the values in the old program area and cause the device to operate abnormally. There may be a situation where it cannot be said that the quality of the firmware can be ensured.
本発明は、書き換え前の領域より小さい領域の書き換えを実行した場合でも、書き換えた後のフラッシュメモリのセクタには、書き換えた新プログラム領域の外部に、書き換え前の古い内容が残ることのないフラッシュメモリ書き換えシステム、フラッシュメモリ書き換え方法及びプログラムを提供しつつ、必要な状況に応じて、部分的なフラッシュメモリの書き換え方法を選択する方法を提供することを目的とする。 In the present invention, even when rewriting of an area smaller than the area before rewriting is performed, the flash memory sector after rewriting does not leave the old contents before rewriting outside the rewritten new program area. An object of the present invention is to provide a method for selecting a partial flash memory rewriting method according to a necessary situation while providing a memory rewriting system, a flash memory rewriting method, and a program.
(1) データ書き換え可能なフラッシュメモリと、
前記フラッシュメモリに書き込まれるデータを一時的に保存する揮発性メモリと、
前記フラッシュメモリへの前記データの書き込みを制御する制御部とを備え、
前記制御部は、ホストコンピュータから受信する書き換え方法指示コマンドに応じて、前記フラッシュメモリの書き換え方法を選択することを特徴とするフラッシュメモリ書き換えシステム。
(2) 前記制御部は、前記ホストコンピュータから受信する前記書き換え方法指示コマンドに応じて、部分書き換えプログラム及び一括書き換えプログラムのうち何れか一つを実行して、前記フラッシュメモリ内のデータを書き換えることを特徴とする(1)記載のフラッシュメモリ書き換えシステム。
(3) 前記制御部は、前記部分書き換えプログラムに応じて、前記フラッシュメモリ内の所定領域に記憶されているデータを前記揮発性メモリ内のデータ展開領域に展開し、前記フラッシュメモリ内の前記所定領域を初期化し、前記揮発性メモリにコピーされたデータを編集し、編集された前記データを前記フラッシュメモリの前記所定領域に書き込むことを特徴とする(2)記載のフラッシュメモリ書き換えシステム。
(4) 前記制御部は、前記一括書き換えプログラムに応じて、前記揮発性メモリ内のデータ展開領域を初期化し、前記フラッシュメモリ内の所定領域を初期化し、前記データ展開領域に書き込みデータを展開し、前記書き込みデータを前記フラッシュメモリの前記所定領域に書き込むことを特徴とする(2)記載のフラッシュメモリ書き換えシステム。
(5) (1)〜(4)の何れか1項に記載のフラッシュメモリ書き換えシステムを備えたプリンタ。
(6) (1)〜(4)の何れか1項に記載のフラッシュメモリ書き換えシステムを備えた情報機器。
(7) ホストコンピュータから受信する書き換え方法指示コマンドに応じて、フラッシュメモリの書き換え方法を選択する選択ステップと、
選択された書き換え方法に応じてフラッシュメモリの書き換えを行う書き換えステップと、を備えたことを特徴とするフラッシュメモリ書き換え方法。
(8) 前記書き換えステップでは、前記ホストコンピュータから受信する前記書き換え方法指示コマンドに応じて、部分書き換え及び一括書き換えのうち何れか一つを実行して、前記不揮発性メモリ内のデータを書き換えることを特徴とする(7)記載のフラッシュメモリ書き換え方法。
(9) 前記部分書き換えを実行する場合には、
前記不揮発性メモリ内の所定領域に記憶されているデータを前記揮発性メモリ内のデータ展開領域に展開するステップと、
前記不揮発性メモリ内の前記所定領域を初期化するステップと、
前記揮発性メモリにコピーされたデータを編集するステップと、
編集された前記データを前記不揮発性メモリの前記所定領域に書き込むステップと、を実行することを特徴とする(8)記載のフラッシュメモリ書き換え方法。
(10) 前記一括書き換えを実行する場合には、
前記揮発性メモリ内のデータ展開領域を初期化するステップと、
前記不揮発性メモリ内の所定領域を初期化するステップと、
前記データ展開領域に書き込みデータを展開するステップと、
前記書き込みデータを前記不揮発性メモリの前記所定領域に書き込むステップと、を実行することを特徴とする(8)記載のフラッシュメモリ書き換え方法。
(11) ホストコンピュータから受信する書き換え方法指示コマンドに応じて、フラッシュメモリの書き換え方法を選択する選択ステップと、
選択された書き換え方法に応じてフラッシュメモリの書き換えを行う書き換えステップと、をコンピュータに実行させることを特徴とするフラッシュメモリ書き換えプログラム。
(12) 前記書き換えステップでは、前記ホストコンピュータから受信する前記書き換え方法指示コマンドに応じて、部分書き換え及び一括書き換えのうち何れか一つを実行して、前記不揮発性メモリ内のデータを書き換えることを特徴とする(11)記載のフラッシュメモリ書き換えプログラム。
(13) 前記部分書き換えを実行する場合には、
前記不揮発性メモリ内の所定領域に記憶されているデータを前記揮発性メモリ内のデータ展開領域に展開するステップと、
前記不揮発性メモリ内の前記所定領域を初期化するステップと、
前記揮発性メモリにコピーされたデータを編集するステップと、
編集された前記データを前記不揮発性メモリの前記所定領域に書き込むステップと、をコンピュータに実行させることを特徴とする(12)記載のフラッシュメモリ書き換えプログラム。
(14) 前記一括書き換えを実行する場合には、
前記揮発性メモリ内のデータ展開領域を初期化するステップと、
前記不揮発性メモリ内の所定領域を初期化するステップと、
前記データ展開領域に書き込みデータを展開するステップと、
前記書き込みデータを前記不揮発性メモリの前記所定領域に書き込むステップと、をコンピュータに実行させることを特徴とする(12)記載のフラッシュメモリ書き換えプログラム。
(1) Flash memory with data rewritable,
Volatile memory for temporarily storing data written to the flash memory;
A control unit for controlling the writing of the data to the flash memory,
The flash memory rewriting system, wherein the control unit selects a rewriting method of the flash memory according to a rewriting method instruction command received from a host computer.
(2) The control unit executes any one of a partial rewrite program and a batch rewrite program in accordance with the rewrite method instruction command received from the host computer, and rewrites data in the flash memory. (1) The flash memory rewriting system according to (1).
(3) The control unit expands data stored in a predetermined area in the flash memory in a data expansion area in the volatile memory according to the partial rewrite program, and the predetermined part in the flash memory. The flash memory rewriting system according to (2), wherein an area is initialized, data copied to the volatile memory is edited, and the edited data is written to the predetermined area of the flash memory.
(4) The control unit initializes a data expansion area in the volatile memory according to the batch rewrite program, initializes a predetermined area in the flash memory, and expands write data in the data expansion area. The flash memory rewriting system according to (2), wherein the write data is written to the predetermined area of the flash memory.
(5) A printer including the flash memory rewriting system according to any one of (1) to (4).
(6) An information device including the flash memory rewriting system according to any one of (1) to (4).
(7) a selection step of selecting a flash memory rewriting method according to a rewriting method instruction command received from the host computer;
A flash memory rewriting method comprising: a rewriting step of rewriting a flash memory in accordance with a selected rewriting method.
(8) In the rewriting step, in accordance with the rewriting method instruction command received from the host computer, one of partial rewriting and batch rewriting is executed to rewrite data in the nonvolatile memory. The flash memory rewriting method according to (7), characterized in that
(9) When executing the partial rewriting,
Expanding data stored in a predetermined area in the non-volatile memory into a data expansion area in the volatile memory;
Initializing the predetermined area in the nonvolatile memory;
Editing the data copied to the volatile memory;
The step of writing the edited data into the predetermined area of the non-volatile memory is executed. The flash memory rewriting method according to (8),
(10) When performing the batch rewriting,
Initializing a data expansion area in the volatile memory;
Initializing a predetermined area in the nonvolatile memory;
Expanding the write data in the data expansion area;
The step of writing the write data into the predetermined area of the nonvolatile memory is performed. The flash memory rewriting method according to (8),
(11) a selection step of selecting a flash memory rewrite method in response to a rewrite method instruction command received from the host computer;
A flash memory rewriting program that causes a computer to execute a rewriting step of rewriting a flash memory in accordance with a selected rewriting method.
(12) In the rewriting step, in accordance with the rewriting method instruction command received from the host computer, any one of partial rewriting and batch rewriting is executed to rewrite data in the nonvolatile memory. The flash memory rewriting program as set forth in (11), characterized in that
(13) When executing the partial rewriting,
Expanding data stored in a predetermined area in the non-volatile memory into a data expansion area in the volatile memory;
Initializing the predetermined area in the nonvolatile memory;
Editing the data copied to the volatile memory;
The flash memory rewriting program according to (12), which causes a computer to execute the step of writing the edited data into the predetermined area of the nonvolatile memory.
(14) When performing the batch rewriting,
Initializing a data expansion area in the volatile memory;
Initializing a predetermined area in the nonvolatile memory;
Expanding the write data in the data expansion area;
(12) The flash memory rewriting program according to (12), which causes a computer to execute the step of writing the write data into the predetermined area of the nonvolatile memory.
本発明によれば、部分書き換えの方が好ましい状況においては、フラッシュメモリの部分書き換えを実行させ、そして一括書き換えの方が好ましい状況においては、フラッシュメモリの一括書き換えを実行させることができる。すなわち、書き換え前の領域より書き換え後の領域が小さい時等、部分書き換えを行った場合には、書き換えた後のフラッシュメモリのセクタに書き換えた新データ領域の外部に、書き換え前の古い内容が残るような場合には一括書き換えを行い、それ以外の場合には部分書き換えを実行するように構成することができる。これにより、フラッシュメモリ内に常に不要なデータが存在しない状態を作り出すことが可能となり、誤動作の少ないシステムを提供することが可能となる。 According to the present invention, partial rewriting of the flash memory can be executed in a situation where partial rewriting is preferred, and batch rewriting of the flash memory can be executed in a situation where batch rewriting is preferred. In other words, when partial rewriting is performed, such as when the area after rewriting is smaller than the area before rewriting, the old contents before rewriting remain outside the new data area rewritten in the sector of the flash memory after rewriting. In such a case, batch rewriting can be performed, and in other cases, partial rewriting can be performed. As a result, it is possible to create a state in which unnecessary data does not always exist in the flash memory, and it is possible to provide a system with few malfunctions.
以下、図面を参照しながら、本発明に係るフラッシュメモリ書き換えシステムの実施の形態について詳細に説明する。以下の説明では、フラッシュメモリ書き換えシステムを備えた複合処理装置を例に挙げ、この複合処理装置のファームウェアを書き換える場合について例示する。 Hereinafter, embodiments of a flash memory rewriting system according to the present invention will be described in detail with reference to the drawings. In the following description, a composite processing apparatus provided with a flash memory rewriting system is taken as an example, and a case of rewriting the firmware of the composite processing apparatus is illustrated.
図1は、本実施形態の複合処理装置を含むデータ処理システムを示す斜視図である。
本実施形態の複合処理装置1は、図1に示すように、給紙部3に装填される小切手Sを筐体1aに形成された用紙搬送路P1に沿って排紙部4まで搬送するとともに、カード挿入口20から挿入される第2の読み取り媒体であるカードCを同じく筐体1aに形成された用紙搬送路P2に沿って搬送可能に構成されている。そして、複合処理装置1は、用紙搬送路P1に沿って小切手Sを搬送しながら、小切手S上の画像を読み取り、小切手Sに印字された磁気文字を読み取り、かつ小切手S上への印字を行うとともに、用紙搬送路P2に沿ってカードCを搬送しながら、カードC上の画像を読み取ることが可能な画像読取装置兼磁気文字読み取り装置兼印字装置である。複合処理装置1は、通信ケーブル50を介してホストコンピュータ100と通信可能に接続されている。
FIG. 1 is a perspective view showing a data processing system including the composite processing apparatus of the present embodiment.
As shown in FIG. 1, the composite processing apparatus 1 according to the present embodiment conveys the check S loaded in the paper feeding unit 3 to the paper discharge unit 4 along the paper conveyance path P1 formed in the housing 1a. The card C that is the second reading medium inserted from the card insertion slot 20 is configured to be transportable along the paper transport path P2 formed in the housing 1a. Then, the composite processing apparatus 1 reads the image on the check S, conveys the check S while conveying the check S along the paper conveyance path P1, reads the magnetic character printed on the check S, and performs printing on the check S. At the same time, it is an image reading device / magnetic character reading device / printing device capable of reading an image on the card C while conveying the card C along the paper conveyance path P2. The composite processing apparatus 1 is communicably connected to the host computer 100 via a communication cable 50.
ホストコンピュータ100は、本体部100aと、この本体部100aに一体に設けられたディスプレイとしての表示部103と、オペレータが各種入力を行うための入力部102を有している。このホストコンピュータ100は、複合処理装置1を制御する制御端末であり、複合処理装置1は、このホストコンピュータ100から送信される各種制御コマンドに応じて画像読取、印字、磁気文字読取等の実行を行う。ホストコンピュータ100は、ファームウェアの書き換え時には、複合処理装置1にファームウェア書き換え指示コマンドを送信するとともに、新しいファームウェアデータをコマンド形式で送信する。これにより、複合処理装置1は、フラッシュメモリ内のファームウェアの書き換えを実行する。 The host computer 100 includes a main unit 100a, a display unit 103 as a display provided integrally with the main unit 100a, and an input unit 102 for an operator to perform various inputs. The host computer 100 is a control terminal that controls the composite processing apparatus 1. The composite processing apparatus 1 executes image reading, printing, magnetic character reading, and the like in accordance with various control commands transmitted from the host computer 100. Do. When rewriting the firmware, the host computer 100 transmits a firmware rewrite instruction command to the composite processing apparatus 1 and transmits new firmware data in a command format. Thereby, the composite processing apparatus 1 executes rewriting of firmware in the flash memory.
図2は、本実施形態の複合処理装置1とホストコンピュータ100を備えたデータ処理システムの電気的構成を示すブロック図であり、図3はフラッシュメモリ63内に保存されたデータを示すメモリマップである。 FIG. 2 is a block diagram showing an electrical configuration of a data processing system including the composite processing apparatus 1 and the host computer 100 according to the present embodiment. FIG. 3 is a memory map showing data stored in the flash memory 63. is there.
まず、複合処理装置1の構成について説明する。
複合処理装置1は、CPU61と、RAM62と、フラッシュメモリ63と、通信制御部64と、搬送制御部65と、印字制御部66と、画像読取制御部67と、磁気文字読取制御部68とを備えて構成されている。
First, the configuration of the composite processing apparatus 1 will be described.
The composite processing apparatus 1 includes a CPU 61, a RAM 62, a flash memory 63, a communication control unit 64, a conveyance control unit 65, a print control unit 66, an image reading control unit 67, and a magnetic character reading control unit 68. It is prepared for.
CPU61は、複合処理装置1の制御中枢を担うメイン制御部である。CPU61は、フラッシュメモリ63に書き込まれているファームウェアを実行して、複合処理装置1の全体を制御する各種処理を実行する。 The CPU 61 is a main control unit that plays a central role in controlling the composite processing apparatus 1. The CPU 61 executes the firmware written in the flash memory 63 and executes various processes for controlling the entire composite processing apparatus 1.
RAM62は、複合処理装置1のメインメモリとして設けられた揮発性のメモリである。RAM62は、CPU61の各種演算における一時データバッファ、受信データを一時保存する受信バッファ、印刷データを一時保存する印刷バッファ等として用いられる。また、RAM62は、後述するフラッシュメモリ63のデータ書き換え時におけるデータ一時退避・書き換え領域としても用いられる。 The RAM 62 is a volatile memory provided as a main memory of the composite processing apparatus 1. The RAM 62 is used as a temporary data buffer for various operations of the CPU 61, a reception buffer for temporarily storing received data, a print buffer for temporarily storing print data, and the like. The RAM 62 is also used as a data temporary save / rewrite area when data is rewritten in the flash memory 63 described later.
フラッシュメモリ63は、複合処理装置1で実行されるブートプログラム、メインプログラム等のファームウェアや複合処理装置1の制御に用いられる各種設定値等が書き込まれた不揮発性のメモリであり、複合処理装置1の電源オフ時でもその内部のデータを失うことなく、保持することができる。 The flash memory 63 is a nonvolatile memory in which firmware such as a boot program and a main program executed in the composite processing apparatus 1 and various setting values used for control of the composite processing apparatus 1 are written. Even when the power is turned off, the internal data can be retained without loss.
図3に示すように、フラッシュメモリ63内の記憶領域は、複数のセクタと呼ばれる領域に分割されている。本実施形態の例では、セクタ10に複合処理装置1の起動処理を実行するブートプログラムを記憶する「ブートプログラム領域」が、セクタ7およびセクタ8に起動処理後の複合処理装置1の各種動作を制御するメインプログラムを記憶する「メインプログラム領域」が、そしてセクタ9に各種設定値が記憶された「データ領域」がそれぞれ割り当てられている。
この、フラッシュメモリ63は、各セクタ単位でのみデータの消去および書き込みが可能となっている。フラッシュメモリ63のデータを書き換える具体的な方法については、後述する。
As shown in FIG. 3, the storage area in the flash memory 63 is divided into areas called a plurality of sectors. In the example of this embodiment, the “boot program area” that stores the boot program for executing the startup processing of the composite processing apparatus 1 in the sector 10 performs various operations of the composite processing apparatus 1 after the startup processing in the sectors 7 and 8. A “main program area” for storing a main program to be controlled and a “data area” for storing various setting values are allocated to the sector 9.
The flash memory 63 can erase and write data only in units of sectors. A specific method for rewriting data in the flash memory 63 will be described later.
通信制御部64は、ホストコンピュータ100との通信を制御する制御部である。ホストコンピュータ100から送信される各種コマンドは、通信制御部64を介して受信され、RAM62内の受信バッファに保存される。また、複合処理装置1内の各種状況を示すステータス信号は、この通信制御部64を介してホストコンピュータ100に送信される。 The communication control unit 64 is a control unit that controls communication with the host computer 100. Various commands transmitted from the host computer 100 are received via the communication control unit 64 and stored in a reception buffer in the RAM 62. Further, status signals indicating various situations in the composite processing apparatus 1 are transmitted to the host computer 100 via the communication control unit 64.
搬送制御部65は、用紙搬送路P1内の小切手Sの搬送動作および用紙搬送路P2内のカードCの搬送動作を制御する制御部である。具体的に、搬送制御部65は、図示せぬ用紙検出器の検出結果に応じて、図示せぬステッピングモータを駆動して各用紙搬送路P1、P2に沿って配置された搬送ローラを回転駆動することにより、小切手SやカードCを搬送する。 The conveyance control unit 65 is a control unit that controls the conveyance operation of the check S in the paper conveyance path P1 and the conveyance operation of the card C in the paper conveyance path P2. Specifically, the conveyance control unit 65 drives a stepping motor (not shown) according to the detection result of a paper detector (not shown) to rotationally drive the conveyance rollers arranged along the paper conveyance paths P1 and P2. By doing so, the check S and the card C are conveyed.
印字制御部66は、筐体1a内に設けられた印字ヘッドを駆動する制御部である。複合処理装置1内には、インクジェット方式の印字ヘッドが設けられており、ホストコンピュータ100から受信した印字データに基づき、この印字ヘッドから吐出されるインク量および吐出タイミング等を制御する。 The print control unit 66 is a control unit that drives a print head provided in the housing 1a. The composite processing apparatus 1 is provided with an ink jet type print head, and controls the amount of ink discharged from the print head, the discharge timing, and the like based on print data received from the host computer 100.
画像読取制御部67は、複合処理装置1の用紙搬送路P1、P2に沿って設けられた画像読取センサ(スキャナ)を制御する制御部である。画像読取センサは、この画像読取制御部67からの指示に応じて、用紙搬送路P1、P2を搬送される小切手SまたはカードCに読取光を照射し、その反射光を受信して小切手SまたはカードCの画像データを取得する。 The image reading control unit 67 is a control unit that controls image reading sensors (scanners) provided along the sheet conveyance paths P <b> 1 and P <b> 2 of the composite processing apparatus 1. In response to an instruction from the image reading control unit 67, the image reading sensor irradiates the check S or card C conveyed on the paper conveyance paths P1 and P2 with reading light, receives the reflected light, and receives the check S or The image data of the card C is acquired.
磁気文字読取制御部68は、複合処理装置1の用紙搬送路P1に沿って設けられたMICR(Magnet Ink Character Reader)の動作制御を行う制御部である。MICRは、磁気文字読取制御部68の指示に応じて、用紙搬送路P1に沿って搬送される小切手Sに磁気インクで印字された磁気文字を読み取り、磁気文字データを取得する。 The magnetic character reading control unit 68 is a control unit that controls the operation of a MICR (Magnet Ink Character Reader) provided along the paper transport path P1 of the composite processing apparatus 1. The MICR reads magnetic characters printed with magnetic ink on the check S conveyed along the paper conveyance path P1 in accordance with an instruction from the magnetic character reading control unit 68, and acquires magnetic character data.
次に、ホストコンピュータ100の構成について説明する。
ホストコンピュータ100は、主制御部101と、入力部102と、表示部103と、通信制御部104と、データ保持部105とを備えている。
Next, the configuration of the host computer 100 will be described.
The host computer 100 includes a main control unit 101, an input unit 102, a display unit 103, a communication control unit 104, and a data holding unit 105.
主制御部101は、CPU、RAM、ROM、他各種コントローラから構成されるホストコンピュータ100の制御中枢であり、入力部102、表示部103、通信制御部104、データ保持部105の動作を制御する。また、主制御部101は、各種プログラムを実行することにより、複合処理装置1を制御するための各種コマンドを生成し、複合処理装置1を制御する。 The main control unit 101 is a control center of the host computer 100 including a CPU, a RAM, a ROM, and other various controllers, and controls operations of the input unit 102, the display unit 103, the communication control unit 104, and the data holding unit 105. . The main control unit 101 executes various programs to generate various commands for controlling the composite processing apparatus 1 and controls the composite processing apparatus 1.
入力部102は、オペレータが各種データ入力をするためのマンマシンインターフェースであり、キーボードや各種入力機器等から構成することができる。また、表示部103は、液晶等のディスプレイ装置で構成されており、オペレータへの視覚的な情報の通知を行う。 The input unit 102 is a man-machine interface for an operator to input various data, and can be configured from a keyboard, various input devices, and the like. The display unit 103 is configured by a display device such as a liquid crystal and notifies the operator of visual information.
通信制御部104は、複合処理装置1との通信を制御する制御部である。主制御部101によって生成された各種コマンドは、この通信制御部104を介して複合処理装置1に送信される。また、複合処理装置1内の各種状況を示すステータス信号は、この通信制御部104を介して複合処理装置1から受信される。 The communication control unit 104 is a control unit that controls communication with the composite processing apparatus 1. Various commands generated by the main control unit 101 are transmitted to the composite processing apparatus 1 via the communication control unit 104. Also, status signals indicating various situations in the composite processing apparatus 1 are received from the composite processing apparatus 1 via the communication control unit 104.
データ保持部105は、ホストコンピュータ100のデータ記憶領域として構成されるものである。本実施形態では、このデータ保持部105にフラッシュメモリ63内の書き換え用データが保存されているとして、以下説明を行う。 The data holding unit 105 is configured as a data storage area of the host computer 100. In the present embodiment, the following description will be given on the assumption that the rewrite data in the flash memory 63 is stored in the data holding unit 105.
次に、本実施形態における複合処理装置1のフラッシュメモリ1の書き換えについて説明する。ここでは、まずフラッシュメモリ1の書き換え方法を選択するコマンドについて説明する。 Next, rewriting of the flash memory 1 of the composite processing apparatus 1 in this embodiment will be described. Here, a command for selecting a rewriting method of the flash memory 1 will be described first.
本実施形態のホストコンピュータ100は、複合処理装置1にフラッシュメモリ63の書き換え方法を指定する書き換え方式選択コマンドを送信可能に構成されている。書き換え方式選択コマンドの形式としては、たとえば、以下のようなものが例示される。
ESC 100 n ・・・(1)
The host computer 100 of the present embodiment is configured to be able to transmit a rewrite method selection command for designating a rewrite method of the flash memory 63 to the composite processing apparatus 1. Examples of the format of the rewrite method selection command include the following.
ESC 100 n (1)
式(1)において、“ESC”はコマンド体系の種類を示しており、引数“100”は、このESCコマンド体系におけるコマンドの種類、ここでは式(1)のコマンドがフラッシュメモリ書き換え方法を指定するコマンドであることを示している。そして、nは、書き換え方法を示す因数であり、例えば「n=0」の場合は、このコマンドがフラッシュメモリの部分書き換えを、そして「n=1」の場合はフラッシュメモリの一括書き換えをそれぞれ指定するものであることを意味している。 In Expression (1), “ESC” indicates the type of command system, and the argument “100” indicates the type of command in this ESC command system. Here, the command in Expression (1) specifies the flash memory rewriting method. Indicates a command. N is a factor indicating the rewrite method. For example, when “n = 0”, this command designates partial rewrite of the flash memory, and when “n = 1” designates batch rewrite of the flash memory. Is meant to be.
図4は、フラッシュメモリ63の書き換え方法を模式的に示す模式図であり、(a)はフラッシュメモリのセクタnの部分書き換えを、(b)はフラッシュメモリのセクタnの一括書き換えを示している。 4A and 4B are schematic diagrams schematically showing a rewriting method of the flash memory 63, where FIG. 4A shows partial rewriting of the sector n of the flash memory, and FIG. 4B shows batch rewriting of the sector n of the flash memory. .
まず、図4(a)を参照しながら、フラッシュメモリの部分書き換えについて説明する。
「フラッシュメモリの部分書き換え」とは、フラッシュメモリ63のセクタnにおける一部のデータのみを書き換える処理を指す。この部分書き換えにおいては、CPU61がフラッシュメモリ63内の例えばブートプログラム領域に書き込まれたフラッシュメモリ書き換えプログラムを実行することにより処理がなされる。
First, partial rewriting of a flash memory will be described with reference to FIG.
“Partial rewriting of flash memory” refers to a process of rewriting only a part of data in sector n of the flash memory 63. In this partial rewriting, the CPU 61 executes processing by executing a flash memory rewriting program written in, for example, a boot program area in the flash memory 63.
図4(a)を参照しながら具体的に説明すると、この部分書き換えでは、まずデータの書き換え対象となるフラッシュメモリ63内のセクタn内の全データをRAM62内のデータ展開領域にコピーする(ステップS1)。 Specifically, with reference to FIG. 4A, in this partial rewriting, first, all the data in the sector n in the flash memory 63 to be rewritten is copied to the data development area in the RAM 62 (steps). S1).
RAM62内のデータ展開領域にセクタnの全データがコピーされると、セクタnの全データXは、フラッシュメモリ63内におけるアドレスに対応してRAM62内に展開された状態となる。そして、この全データXのうち、部分書き換えを行う書き換え領域Yのデータを新しいデータで置換することにより書き換えが実行され、書き換え領域Yが書き換えれたセクタnのデータZが生成される(ステップS2)。
なお、この部分書き換えを行う場合には、書き換えを行う前と後で書き換え領域Yの大きさが変化してはならない。
When all data in sector n is copied to the data expansion area in RAM 62, all data X in sector n is expanded in RAM 62 corresponding to the address in flash memory 63. Then, the rewriting is executed by replacing the data in the rewriting area Y to be partially rewritten with the new data among all the data X, and the data Z of the sector n in which the rewriting area Y is rewritten is generated (step S2). .
When performing this partial rewriting, the size of the rewriting area Y must not change before and after rewriting.
次に、フラッシュメモリ63内のセクタnに対して初期化処理が施され、セクタn内のデータは一括消去(例えば、すべてのアドレスに何も書き込まれていない状態=0xFFが書き込まれている状態)される(ステップS3)。そして、RAM62内に展開されている書き換え後のセクタnのデータZは、フラッシュメモリ63のセクタnへ書き込みがなされ、セクタnに記録されることにより、フラッシュメモリの部分書き換えが終了する(ステップS4)。
以上が、「フラッシュメモリの部分書き換え」のフローである。このフラッシュメモリの部分書き換えは、例えばフラッシュメモリ中に記録された所定値の変更(例えば“値1”から“値0”への変更)等、書き換えを行う前と後で書き換え領域Yの大きさが変化しないような状況の場合に好適に適用できる。
Next, initialization processing is performed on the sector n in the flash memory 63, and the data in the sector n is batch erased (for example, a state in which nothing is written at all addresses = 0xFF is written) (Step S3). Then, the data Z of the sector n after rewriting developed in the RAM 62 is written into the sector n of the flash memory 63 and recorded in the sector n, whereby the partial rewriting of the flash memory is completed (step S4). ).
The above is the flow of “partial rewriting of flash memory”. This partial rewriting of the flash memory is performed by, for example, changing the predetermined area recorded in the flash memory (for example, changing from “value 1” to “value 0”) before and after rewriting, and the size of the rewriting area Y It can be suitably applied to a situation where no change occurs.
次に、図4(b)を参照しながら、フラッシュメモリの一括書き換えについて説明する。
「フラッシュメモリの一括書き換え」とは、図4(a)を使って述べた「フラッシュメモリの部分書き換え」のフローの中で、フラッシュメモリ63からRAM62へのデータのコピーを行うことなくフラッシュメモリ63のセクタnの全データを消去し、全く新しいデータをセクタnに書き込む処理を指す。この一括書き換えにおいても、CPU61がフラッシュメモリ63内の例えばブートプログラム領域に書き込まれたフラッシュメモリ書き換えプログラムを実行することにより処理がなされる。
Next, batch rewriting of the flash memory will be described with reference to FIG.
“Batch rewriting of flash memory” refers to the flash memory 63 without copying data from the flash memory 63 to the RAM 62 in the flow of “partial rewriting of flash memory” described with reference to FIG. The process of erasing all data in sector n and writing completely new data into sector n. Even in this batch rewriting, processing is performed by the CPU 61 executing a flash memory rewriting program written in, for example, a boot program area in the flash memory 63.
図4(b)を参照しながら具体的に説明すると、この一括書き換えでは、まずフラッシュメモリ63のセクタnに書き込まれるべきデータが展開される予定のRAM62内のデータ展開領域が初期化されて、データ展開領域にデータが無い状態(例えば、すべてのアドレスに何も書き込まれていない状態=0xFFが書き込まれている状態)とされる(ステップS11)。 Specifically, referring to FIG. 4B, in this batch rewriting, first, a data expansion area in the RAM 62 where data to be written to the sector n of the flash memory 63 is to be expanded is initialized, A state where there is no data in the data development area (for example, a state where nothing is written to all addresses = 0xFF is written) (step S11).
RAM62のデータ展開領域の初期化がなされると、この初期化がなされたデータ展開領域内にセクタnに書き込まれるデータWが書き込まれて、セクタn内のアドレスに応じて展開される(ステップS12)。そして、フラッシュメモリ63内のセクタnに対して初期化処理が施され、セクタn内のデータは一括消去(例えば、すべてのアドレスに何も書き込まれていない状態=0xFFが書き込まれている状態)される(ステップS13)。そして、このRAM62に展開されたデータWをフラッシュメモリ63のセクタnに書き込まれ、セクタnに記録されることにより、フラッシュメモリの一括書き換えが終了する(ステップS14)。
以上が、「フラッシュメモリの一括書き換え」のフローである。このフラッシュメモリの一括書き換えは、例えばプログラム全体におよぶ完全更新時の書き換え等、フラッシュメモリ中の書き換えを行う前と後でセクタn内のデータ量が変化するような状況の場合に好適に適用できる。
When the data expansion area of the RAM 62 is initialized, the data W to be written in the sector n is written in the data expansion area that has been initialized, and is expanded in accordance with the address in the sector n (step S12). ). Then, the initialization process is performed on the sector n in the flash memory 63, and the data in the sector n is erased at once (for example, the state where nothing is written to all addresses = 0xFF is written) (Step S13). Then, the data W developed in the RAM 62 is written in the sector n of the flash memory 63 and recorded in the sector n, whereby the batch rewriting of the flash memory is completed (step S14).
The above is the “flash memory batch rewrite” flow. This batch rewriting of the flash memory can be suitably applied in a situation where the amount of data in the sector n changes before and after rewriting in the flash memory, such as rewriting at the time of complete update over the entire program. .
本実施形態では、このフラッシュメモリの部分書き換えと一括書き換えの特徴を考慮し、ホストコンピュータ100は、書き換え方式選択コマンドを複合処理装置1に送信して、複合処理装置1におけるフラッシュメモリの書き換え方法を変化させるようにしている。複合処理装置1は、書き換え方式選択コマンドを受信し、そのコマンド解析を行った結果、部分書き換えが指示されていれば、例えばRAM62内に部分書き換えに対応する書き換えプログラムを実行し、一方、一括書き換えが指示されていれば、RAM62内に一括書き換えに対応する書き換えプログラムを実行することにより、書き換え方法が選択される。 In the present embodiment, in consideration of the characteristics of partial rewriting and batch rewriting of the flash memory, the host computer 100 transmits a rewriting method selection command to the multi-processing device 1 and performs a rewriting method of the flash memory in the multi-processing device 1. I try to change it. If the composite processing apparatus 1 receives the rewrite method selection command and analyzes the command, if partial rewrite is instructed, for example, the rewrite program corresponding to the partial rewrite is executed in the RAM 62, while batch rewrite is performed. Is instructed, a rewriting method is selected by executing a rewriting program corresponding to batch rewriting in the RAM 62.
次に、このフラッシュメモリの書き換えの全体のフローを説明する。
図5は、本実施形態のフラッシュメモリの書き換えの全体の流れを示すフローチャートである。
Next, an overall flow of rewriting of the flash memory will be described.
FIG. 5 is a flowchart showing an overall flow of rewriting of the flash memory according to the present embodiment.
まず、ホストコンピュータ100は、例えばオペレータが入力部102を介して複合処理装置100のフラッシュメモリ63の書き換え指示を入力すると、複合処理装置1にフラッシュメモリ書き換えコマンドを送信して、フラッシュメモリ63の書き換えモードへの移行を指示する(ステップS21)。 First, for example, when the operator inputs an instruction to rewrite the flash memory 63 of the composite processing apparatus 100 via the input unit 102, the host computer 100 transmits a flash memory rewrite command to the composite processing apparatus 1 to rewrite the flash memory 63. An instruction to shift to the mode is given (step S21).
複合処理装置1は、ホストコンピュータ100からフラッシュメモリ書き換えコマンドを受信すると(ステップS22)、複合処理装置1を再起動してCPU、RAM等の初期化を行い、ブートプログラム領域からフラッシュメモリ書き換えプログラムを読み出して、フラッシュメモリ書き換えモードに移行するとともに、フラッシュメモリ書き換えモードへのホストコンピュータ100に移行完了を通知する(ステップS23)。 When the composite processing apparatus 1 receives the flash memory rewrite command from the host computer 100 (step S22), the composite processing apparatus 1 is restarted to initialize the CPU, RAM, etc., and the flash memory rewrite program is loaded from the boot program area. The data is read to shift to the flash memory rewrite mode and notify the host computer 100 to the flash memory rewrite mode of the completion of the shift (step S23).
そして、ホストコンピュータ100は、複合処理装置1がフラッシュメモリ書き換えモードへ移行すると、まず書き換え方法指示コマンドを複合処理装置1に送信して、フラッシュメモリ63の書き換え方法として部分書き換えかまたは一括書き換えを指示する(ステップS24)。そして、複合処理装置1は書き換え方法指示コマンドを受信すると(ステップS25)、書き換え方法指示コマンドに応じたフラッシュメモリ63の書き換えプログラムを実行する(ステップS26)。 When the composite processing apparatus 1 shifts to the flash memory rewrite mode, the host computer 100 first transmits a rewrite method instruction command to the composite processing apparatus 1 to instruct partial rewrite or batch rewrite as the rewrite method of the flash memory 63. (Step S24). Then, upon receiving the rewrite method instruction command (step S25), the composite processing apparatus 1 executes a rewrite program of the flash memory 63 according to the rewrite method instruction command (step S26).
ここで、書き換え方法指示コマンドが部分書き換えを指示していれば、部分書き換えプログラムを実行し、ステップS27でホストコンピュータ100から送信される書き換えデータを基に、図4(a)に示すようにフラッシュメモリ63のデータを書き換えが指示されたセクタ毎に部分書き換えする(ステップS28)。
一方、書き換え方法指示コマンドが一括書き換えを指示していれば、一括書き換えプログラムを実行し、ステップS27でホストコンピュータ100から送信される書き換えデータを基に、図4(b)に示すようにフラッシュメモリ63のデータを書き換えが指示されたセクタ毎に一括書き換えする(ステップS29)。
If the rewrite method instruction command indicates partial rewrite, the partial rewrite program is executed, and the flash as shown in FIG. 4A is executed based on the rewrite data transmitted from the host computer 100 in step S27. Data in the memory 63 is partially rewritten for each sector instructed to rewrite (step S28).
On the other hand, if the rewrite method instruction command instructs batch rewrite, the batch rewrite program is executed, and the flash memory as shown in FIG. 4B is executed based on the rewrite data transmitted from the host computer 100 in step S27. The 63 data is rewritten at once for each sector instructed to rewrite (step S29).
そして、ステップS28及びステップS29において、フラッシュメモリ63の書き換えが終了すると、終了処理を行って複合処理装置1はリセットされて再起動される(ステップS30)。これにより、複合処理装置1のフラッシュメモリ63内のデータが書き換えられ、書き換え後は、フラッシュメモリ63内の書き換えられたデータに基づいて、複合処理装置1は動作する。
以上が、本実施形態におけるフラッシュメモリ書き換えのフローである。
In step S28 and step S29, when the rewriting of the flash memory 63 is completed, the termination processing is performed, and the composite processing apparatus 1 is reset and restarted (step S30). Thereby, the data in the flash memory 63 of the composite processing apparatus 1 is rewritten, and after the rewriting, the composite processing apparatus 1 operates based on the rewritten data in the flash memory 63.
The above is the flow of flash memory rewriting in the present embodiment.
以上説明したように、本実施形態の複合処理装置1は、データ書き換え可能なフラッシュメモリ63と、フラッシュメモリ63に書き込まれるデータを一時的に保存するRAM62と、フラッシュメモリ63へのデータの書き込みを制御するCPU61と、を備え、前記CPU61は、ホストコンピュータ100から受信する書き換え方法指示コマンドに応じて、フラッシュメモリ63の書き換え方法を選択する。 As described above, the composite processing apparatus 1 according to the present embodiment has the data rewritable flash memory 63, the RAM 62 that temporarily stores data to be written to the flash memory 63, and the writing of data to the flash memory 63. The CPU 61 selects a flash memory 63 rewrite method in response to a rewrite method instruction command received from the host computer 100.
具体的には、CPU61は、ホストコンピュータ100から受信する書き換え方法指示コマンドに応じて、部分書き換えプログラム及び一括書き換えプログラムのうち何れか一つのを実行して、フラッシュメモリ63内のデータを書き換える。 Specifically, the CPU 61 rewrites data in the flash memory 63 by executing one of the partial rewrite program and the batch rewrite program in response to a rewrite method instruction command received from the host computer 100.
具体的には、CPU61は、部分書き換えプログラムが実行される場合には、フラッシュメモリ63内の所定領域に記憶されているデータをRAM62内のデータ展開領域に展開し、そしてフラッシュメモリ62内の所定領域を初期化し、RAM62に展開されたデータを編集し、編集されたデータをフラッシュメモリ63の所定領域に書き込む。 Specifically, when the partial rewriting program is executed, the CPU 61 expands data stored in a predetermined area in the flash memory 63 into a data expansion area in the RAM 62 and then stores the predetermined data in the flash memory 62. The area is initialized, the data developed in the RAM 62 is edited, and the edited data is written in a predetermined area of the flash memory 63.
また、CPU61は、一括書き換えプログラムが実行される場合には、RAM62内のデータ展開領域を初期化し、フラッシュメモリ63内の所定領域を初期化し、データ展開領域に書き込みデータを展開し、書き込みデータをフラッシュメモリ63の所定領域に書き込む。 When the batch rewrite program is executed, the CPU 61 initializes the data expansion area in the RAM 62, initializes a predetermined area in the flash memory 63, expands write data in the data expansion area, and stores the write data. Write to a predetermined area of the flash memory 63.
本実施形態によれば、部分書き換えの方が好ましい状況においては、複合処理装置1にフラッシュメモリ63の部分書き換えを実行させ、そして一括書き換えの方が好ましい状況においては、複合処理装置1にフラッシュメモリ63の一括書き換えを実行させることができる。例えば、書き換え前の領域より書き換え後の領域が小さい時等部分書き換えを行った場合には、書き換えた後のフラッシュメモリのセクタに書き換えた新プログラム領域の外部に、書き換え前の古い内容が残るような場合には一括書き換えを行い、それ以外の場合には部分書き換えを実行するように構成することができる。 According to the present embodiment, in a situation where partial rewriting is preferred, the composite processing device 1 is caused to execute partial rewriting of the flash memory 63, and in a situation where batch rewriting is preferred, the composite processing device 1 is allowed to execute flash memory. 63 batch rewriting can be executed. For example, when partial rewriting is performed, such as when the area after rewriting is smaller than the area before rewriting, the old contents before rewriting remain outside the new program area rewritten in the sector of the flash memory after rewriting. In such a case, batch rewriting can be performed, and in other cases, partial rewriting can be performed.
したがって、例えばフラッシュメモリ63内のプログラム全体におよぶ完全更新時の書き換え等、フラッシュメモリ内のデータの増減が予想されるような場合には、複合処理装置1に一括書き換えを選択させることにより、書き換えられるセクタ内に書き換え前のプログラムが残らず、製造メーカー側が意図したとおりのデータ構造をフラッシュメモリ63内に構築することができる。これにより、意図せぬプログラムエラー等により、書き換え後のプログラムを実行することにより書き換え前のプログラムの一部が実行され、誤動作が発生するといった問題の生じない複合処理装置1を提供することが可能となる。 Therefore, for example, in the case where an increase or decrease in data in the flash memory is expected, such as rewriting at the time of a complete update over the entire program in the flash memory 63, the rewrite can be performed by causing the composite processing apparatus 1 to select batch rewriting. As a result, the data structure as intended by the manufacturer can be built in the flash memory 63 without any program before rewriting remaining in the sector. Accordingly, it is possible to provide the composite processing apparatus 1 in which a part of the program before the rewriting is executed by executing the program after the rewriting due to an unintended program error or the like, and no problem such as a malfunction occurs. It becomes.
一方、フラッシュメモリ63内のある設定値を書き換える等、その領域の書き換えが他の領域に影響を及ぼさないような場合には、部分書き換えを選択させることにより、プログラムを書き換えることが可能となる。部分書き換えの場合には、ホストコンピュータ100から複合処理装置へのデータ転送量が少なくてすむので、迅速にフラッシュメモリ63内のデータ書き換えが実行できる。 On the other hand, when rewriting a certain setting value in the flash memory 63 does not affect other areas, the program can be rewritten by selecting partial rewriting. In the case of partial rewriting, the amount of data transferred from the host computer 100 to the composite processing apparatus can be reduced, so that data rewriting in the flash memory 63 can be executed quickly.
また、ホストコンピュータ100は、フラッシュメモリ63内に不要なプログラムが残ったままとならないような書き換え方法を指示する書き換え方法指示コマンドを生成し、書き換え方法指示コマンドに応じてフラッシュメモリ63内のデータを書き換えるように構成することにより、フラッシュメモリ63内の書き換え履歴を保持していれば、今現在のフラッシュメモリ63内の状態がどのような状態になっているか完全に把握することが可能である。したがって、フラッシュメモリ63の書き換え回数が増加しても、常にフラッシュメモリ63内の状態を鑑みながら、フラッシュメモリ63内に不要なデータが存在しないように書き換えを実行して、常に安定な動作を実現できるデータ状態をフラッシュメモリ63内に構築することができる。 In addition, the host computer 100 generates a rewrite method instruction command for instructing a rewrite method so that an unnecessary program does not remain in the flash memory 63, and the data in the flash memory 63 is transferred according to the rewrite method instruction command. By configuring so that rewriting is performed, if the rewriting history in the flash memory 63 is held, it is possible to completely grasp the current state in the flash memory 63. Therefore, even if the number of times the flash memory 63 is rewritten increases, rewriting is performed so that unnecessary data does not exist in the flash memory 63, always considering the state in the flash memory 63, and stable operation is always realized. A possible data state can be established in the flash memory 63.
なお、本実施形態では、印刷機能、画像読取機能及び磁気文字読取機能を備えた複合処理装置1を例に挙げて説明を行ったが、これに限られることはなく、印刷機能のみを有するプリンタ、画像読取機能のみを有するスキャナ、磁気文字読取機能のみを有するMICR装置、その他フラッシュメモリを有する各種情報機器に適用してもよい。 In this embodiment, the composite processing apparatus 1 having a printing function, an image reading function, and a magnetic character reading function has been described as an example. However, the present invention is not limited to this, and a printer having only a printing function. The present invention may be applied to a scanner having only an image reading function, a MICR apparatus having only a magnetic character reading function, and other various information devices having a flash memory.
1・・ 複合処理装置 61・・CPU 62・・RAM 63・・フラッシュメモリ 64・・通信制御部 65・・搬送制御部 66・・印字制御部 67・・画像読取制御部 68・・磁気文字読取制御部 100・・ホストコンピュータ 101・・主制御部 102・・入力部 103・・表示部 104・・通信制御部 105・・データ保持部 1 .. Complex processing device 61... CPU 62... RAM 63 .. Flash memory 64 .. Communication control unit 65 .. Conveyance control unit 66 .. Print control unit 67 .. Image reading control unit 68. Control unit 100... Host computer 101.. Main control unit 102.. Input unit 103.. Display unit 104 .. Communication control unit 105.
Claims (14)
前記フラッシュメモリに書き込まれるデータを一時的に保存する揮発性メモリと、
前記フラッシュメモリへの前記データの書き込みを制御する制御部とを備え、
前記制御部は、ホストコンピュータから受信する書き換え方法指示コマンドに応じて、前記フラッシュメモリの書き換え方法を選択することを特徴とするフラッシュメモリ書き換えシステム。 Data rewritable flash memory,
Volatile memory for temporarily storing data written to the flash memory;
A control unit for controlling the writing of the data to the flash memory,
The flash memory rewriting system, wherein the control unit selects a rewriting method of the flash memory according to a rewriting method instruction command received from a host computer.
選択された書き換え方法に応じてフラッシュメモリの書き換えを行う書き換えステップと、を備えたことを特徴とするフラッシュメモリ書き換え方法。 A selection step of selecting a flash memory rewriting method according to a rewriting method instruction command received from the host computer;
A flash memory rewriting method comprising: a rewriting step of rewriting a flash memory in accordance with a selected rewriting method.
前記不揮発性メモリ内の所定領域に記憶されているデータを前記揮発性メモリ内のデータ展開領域に展開するステップと、
前記不揮発性メモリ内の前記所定領域を初期化するステップと、
前記揮発性メモリにコピーされたデータを編集するステップと、
編集された前記データを前記不揮発性メモリの前記所定領域に書き込むステップと、を実行することを特徴とする請求項8記載のフラッシュメモリ書き換え方法。 When performing the partial rewriting,
Expanding data stored in a predetermined area in the non-volatile memory into a data expansion area in the volatile memory;
Initializing the predetermined area in the nonvolatile memory;
Editing the data copied to the volatile memory;
The flash memory rewriting method according to claim 8, further comprising: writing the edited data in the predetermined area of the nonvolatile memory.
前記揮発性メモリ内のデータ展開領域を初期化するステップと、
前記不揮発性メモリ内の所定領域を初期化するステップと、
前記データ展開領域に書き込みデータを展開するステップと、
前記書き込みデータを前記不揮発性メモリの前記所定領域に書き込むステップと、を実行することを特徴とする請求項8記載のフラッシュメモリ書き換え方法。 When performing the batch rewriting,
Initializing a data expansion area in the volatile memory;
Initializing a predetermined area in the nonvolatile memory;
Expanding the write data in the data expansion area;
9. The flash memory rewriting method according to claim 8, wherein the step of writing the write data into the predetermined area of the nonvolatile memory is performed.
選択された書き換え方法に応じてフラッシュメモリの書き換えを行う書き換えステップと、をコンピュータに実行させることを特徴とするフラッシュメモリ書き換えプログラム。 A selection step of selecting a flash memory rewriting method according to a rewriting method instruction command received from the host computer;
A flash memory rewriting program that causes a computer to execute a rewriting step of rewriting a flash memory in accordance with a selected rewriting method.
前記不揮発性メモリ内の所定領域に記憶されているデータを前記揮発性メモリ内のデータ展開領域に展開するステップと、
前記不揮発性メモリ内の前記所定領域を初期化するステップと、
前記揮発性メモリにコピーされたデータを編集するステップと、
編集された前記データを前記不揮発性メモリの前記所定領域に書き込むステップと、をコンピュータに実行させることを特徴とする請求項12記載のフラッシュメモリ書き換えプログラム。 When performing the partial rewriting,
Expanding data stored in a predetermined area in the non-volatile memory into a data expansion area in the volatile memory;
Initializing the predetermined area in the nonvolatile memory;
Editing the data copied to the volatile memory;
13. The flash memory rewriting program according to claim 12, further comprising: causing a computer to execute the step of writing the edited data into the predetermined area of the nonvolatile memory.
前記揮発性メモリ内のデータ展開領域を初期化するステップと、
前記不揮発性メモリ内の所定領域を初期化するステップと、
前記データ展開領域に書き込みデータを展開するステップと、
前記書き込みデータを前記不揮発性メモリの前記所定領域に書き込むステップと、をコンピュータに実行させることを特徴とする請求項12記載のフラッシュメモリ書き換えプログラム。
When performing the batch rewriting,
Initializing a data expansion area in the volatile memory;
Initializing a predetermined area in the nonvolatile memory;
Expanding the write data in the data expansion area;
13. The flash memory rewriting program according to claim 12, further comprising: causing a computer to execute the step of writing the write data into the predetermined area of the nonvolatile memory.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004111079A JP2005293476A (en) | 2004-04-05 | 2004-04-05 | Flash memory rewriting system, flash memory rewriting method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004111079A JP2005293476A (en) | 2004-04-05 | 2004-04-05 | Flash memory rewriting system, flash memory rewriting method and program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2005293476A true JP2005293476A (en) | 2005-10-20 |
Family
ID=35326303
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004111079A Withdrawn JP2005293476A (en) | 2004-04-05 | 2004-04-05 | Flash memory rewriting system, flash memory rewriting method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2005293476A (en) |
-
2004
- 2004-04-05 JP JP2004111079A patent/JP2005293476A/en not_active Withdrawn
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7383431B2 (en) | Control system and method for rewriting data in a flash memory and a data storage medium in which a program is stored for rewriting data in a flash memory | |
| JP4768237B2 (en) | Portable electronic device and method for controlling portable electronic device | |
| JP6543122B2 (en) | INFORMATION PROCESSING APPARATUS, METHOD OF INITIALIZING NONVOLATILE STORAGE DEVICE BY THE INFORMATION PROCESSING APPARATUS, AND PROGRAM | |
| US7634648B2 (en) | Data processing apparatus and control method for a data processing apparatus that temporarily provides a plurality of boot sectors in flash ROM | |
| US7558949B2 (en) | Data processing apparatus and control method for verifying that version codes in selected boot sector and main sector match | |
| KR20010051298A (en) | Output device, method of controlling it, and medium storing a program | |
| JP4784100B2 (en) | Processing device and firmware download method thereof. | |
| JP2005293476A (en) | Flash memory rewriting system, flash memory rewriting method and program | |
| JP2001344156A (en) | Apparatus having flash memory and data rewriting method | |
| JP4238930B2 (en) | Memory rewrite control system. | |
| JPH06314202A (en) | Image forming device | |
| JP2003114807A (en) | Electronics device and method for rewriting main body control program | |
| US20070150072A1 (en) | Method for controlling electronic apparatus, program for controlling electronic apparatus, electronic apparatus, and recording apparatus | |
| JP5341947B2 (en) | IC card, control method of IC card, and control method of portable electronic device | |
| JPH11232183A (en) | Printer control information managing device and recording medium for recording control information management program | |
| JPH05274157A (en) | Image forming device | |
| JP2002007152A (en) | Download method and device | |
| JP2000263897A (en) | Image-forming apparatus and method for updating control program of image-forming apparatus | |
| JPH10289077A (en) | Printing equipment | |
| JPH06219021A (en) | Image forming device | |
| JP2004334443A (en) | Firmware download method, firmware download system and firmware download program | |
| JP2005231135A (en) | PRINT CONTROL DEVICE, PRINT DEVICE, PROGRAM START METHOD, AND PROGRAM | |
| JP2008059360A (en) | Printer | |
| JP2007069514A (en) | Inkjet recording device | |
| JP2005063120A (en) | Program rewriting device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20070605 |