[go: up one dir, main page]

JP2004013854A - Flash memory memory rewrite control system, memory rewrite control method, program for executing each step of memory rewrite control method, and information recording medium - Google Patents

Flash memory memory rewrite control system, memory rewrite control method, program for executing each step of memory rewrite control method, and information recording medium Download PDF

Info

Publication number
JP2004013854A
JP2004013854A JP2002170633A JP2002170633A JP2004013854A JP 2004013854 A JP2004013854 A JP 2004013854A JP 2002170633 A JP2002170633 A JP 2002170633A JP 2002170633 A JP2002170633 A JP 2002170633A JP 2004013854 A JP2004013854 A JP 2004013854A
Authority
JP
Japan
Prior art keywords
boot
sector
data
flash memory
update
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
JP2002170633A
Other languages
Japanese (ja)
Other versions
JP4062421B2 (en
Inventor
Yushi Takamizawa
高見沢 雄史
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2002170633A priority Critical patent/JP4062421B2/en
Priority to EP03011150A priority patent/EP1372068A3/en
Priority to CN031424147A priority patent/CN100407177C/en
Priority to KR10-2003-0037432A priority patent/KR100507884B1/en
Priority to US10/460,459 priority patent/US7383431B2/en
Publication of JP2004013854A publication Critical patent/JP2004013854A/en
Application granted granted Critical
Publication of JP4062421B2 publication Critical patent/JP4062421B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Stored Programmes (AREA)

Abstract

【課題】少なくとも3個のブートセクタを有したフラッシュメモリにより、1回のダウンロード作業にて、フラッシュメモリの所定のセクタを書き換えることが可能なフラッシュメモリのメモリ書き換え制御システム、メモリ書き換え制御方法、メモリ書き換え制御方法の各工程を実行させるプログラムおよび情報記録媒体を提供する。
【解決手段】第1のブートセクタ201には、制御装置を起動するための最低限の機能を実行させるブートデータを格納し、第2のブートセクタ202には、起動ブートセクタ201および第2のブートセクタ202以外のフラッシュメモリのセクタを書き換える機能を実行させるデータを格納し、第3のブートセクタ203には、起動ブートセクタ201および第3のブートセクタ203以外のフラッシュメモリのセクタを書き換える機能を実行させるデータを格納し、各ブートセクタによるブート処理を実行する。
【選択図】 図2
A flash memory having at least three boot sectors, a flash memory memory rewrite control system, a memory rewrite control method, and a memory capable of rewriting a predetermined sector of the flash memory in one download operation. A program and an information recording medium for executing each step of the rewrite control method are provided.
A first boot sector stores boot data for executing a minimum function for starting a control device, and a second boot sector stores a boot boot sector and a second boot sector. Data for executing a function of rewriting a sector of the flash memory other than the boot sector 202 is stored, and a function of rewriting a sector of the flash memory other than the boot sector 201 and the third boot sector 203 is stored in the third boot sector 203. The data to be executed is stored, and the boot process by each boot sector is executed.
[Selection] Fig. 2

Description

【0001】
【発明の属する技術分野】
本発明は、フラッシュメモリのメモリ書き換え制御システム、メモリ書き換え制御方法、メモリ書き換え制御方法の各工程を実行させるプログラムおよび情報記録媒体に関する。特に、少なくとも3個のブートセクタを有したフラッシュメモリにより、1回のダウンロード作業にて、フラッシュメモリの所望のセクタを書き換えることが可能なフラッシュメモリのメモリ書き換え制御システム、メモリ書き換え制御方法、メモリ書き換え制御方法の各工程を実行させるプログラムおよび情報記録媒体に関する。
【0002】
【従来の技術】
プリンタ、スキャナ等の制御装置においては、ファームウェアのブートプログラムとメインプログラムとが分離されて、フラッシュメモリに格納されている。例えば、プリンタの場合、プリンタの通常モードを制御するプログラムであるメインプログラムおよびフォントデータがメインセクタに格納されている。また、プリンタの起動処理を実行するプログラムと、プリンタの書き換え制御モードを制御してメインセクタに格納されているメインプログラムおよびフォントデータ等の書き換え処理を実行するプログラムとがブートセクタに格納されている。ここで、セクタは、フラッシュメモリにおいて一括して消去可能な領域である。
【0003】
ブートセクタに格納されているデータ(ブートデータ)を書き換える場合、ブートデータは、自プログラムが格納されているセクタを書き換えることをソフト的に禁止していることから、3回のダウンロード処理が必要であった。
【0004】
図9は、従来の書き換え処理によるデータ遷移を説明する図である。フラッシュメモリの書き換え処理において、ブートセクタ以外のフラッシュメモリのセクタの書き換え処理はブートセクタに格納されているブートデータによって実行され、ブートセクタの書き換え処理は、新たにダウンロードしたブートリライトデータによって実行される。
【0005】
ブートデータにより、1回目のダウンロード処理にてブートリライトデータを取得し、メインセクタのデータを消去し、メインセクタに取得したブートリライトデータを書き込む(図9の▲1▼)。
【0006】
次に、ブートリライトデータにより、2回目のダウンロード処理にて新ブートデータを取得し、ブートセクタのデータを消去し、ブートセクタに取得した新ブートデータを書き込む(図9の▲2▼)。
【0007】
新ブートデータにより、3回目のダウンロード処理にて新メインデータを取得し、メインセクタのブートリライトデータを消去し、メインセクタに取得した新メインデータを書き込む(図9の▲3▼)。
【0008】
【発明が解決しようとする課題】
上述したように、フラッシュメモリのブートセクタに格納されているデータの書き換え作業は、3回のダウンロード作業を実行しなければ完了しないことから、作業手順が煩雑であり、作業エラーが発生しやすいという問題点があった。また、書き換え作業にかかる時間も長時間となってしまうという問題点もあった。
【0009】
従って、本発明は、以上のような問題点を解決するためになされたもので、制御装置を起動させる最低限の機能を実行させるブートデータを第1のブートセクタに、フラッシュメモリを書き換える機能を実行させるブートデータを第2のブートセクタおよび第3のブートセクタに格納し、第1のブートセクタの機能により第2のブートセクタの機能または第3のブートセクタの機能を実行させるかを判定し、判定された第2のブートセクタの機能または第3のブートセクタの機能により第1のブートセクタおよび判定された自身のブートセクタを除いたフラッシュメモリのセクタを書き換えるフラッシュメモリのメモリ書き換え制御システム、メモリ書き換え制御方法、メモリ書き換え制御方法の各工程を実行させるプログラムおよび情報記録媒体を提供することを目的とする。
【0010】
【課題を解決するための手段】
本発明者は、上述した従来の問題点を解決すべく研究を重ねた。その結果、少なくとも3個のブートセクタをフラッシュメモリに設け、第1のブートセクタには、制御装置を起動させるための最低限の機能を実行させる書き換え不要のブートデータを格納し、第2のブートセクタには、第1のブートセクタおよび第2のブートセクタを除いたフラッシュメモリの所望のセクタを書き換える機能、第1のブートセクタに格納されている以外の起動時の処理機能等を実行させるブートデータを格納し、第3のブートセクタには、第1のブートセクタおよび第3のブートセクタを除いたフラッシュメモリの所望のセクタを書き換える機能、第1のブートセクタに格納されている以外の起動時の処理機能等を実行させるブートデータを格納することにより、ブートセクタの書き換え処理異常による制御装置の起動不能状態を回避することができるばかりでなく、フラッシュメモリのブートセクタ書き換え処理の作業手順が簡素化され、処理に要する時間を短縮することができることが判明した。上記研究結果に基づき、以下の発明を提供する。
【0011】
本発明の、フラッシュメモリのメモリ書き換え制御システムの1つの態様は、一括消去可能な記憶領域であるセクタを複数個有し、ブート処理を実行させるためのブートデータを格納した少なくとも3個のブートセクタを有したフラッシュメモリのメモリ書き換え制御システムであって、少なくとも3個のブートセクタの中の第1のブートセクタに格納されている第1のブートデータにより起動される、第1のブートセクタを除いた複数のブートセクタのそれぞれに格納されているブートデータの中から所要のブートデータを、それぞれのブートセクタに格納されているブートデータ更新判定データに基づいて判定するブートデータ判定部と、ブートデータ判定部によって判定された所要のブートデータが少なくとも3個のブートセクタの中の第2のブートセクタに格納されている場合に、第2のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを書き換える第1の書き換え部と、ブートデータ判定部によって判定された所要のブートデータが少なくとも3個のブートセクタの中の第3のブートセクタに格納されている場合に、第3のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを書き換える第2の書き換え部とを備えたフラッシュメモリのメモリ書き換え制御システムである。
【0012】
本発明の、フラッシュメモリのメモリ書き換え制御システムの別の態様は、上述の第1の書き換え部が、フラッシュメモリを書き換えるための更新データを受信する第1の更新データ受信部と、第1の更新データ受信部によって受信した更新データを書き込むための、第2のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを判定する第1のセクタ判定部と、第1のセクタ判定部によって判定されたフラッシュメモリの所望のセクタに、第1の更新データ受信部によって受信した更新データを書き込む第1の更新データ書き込み部と、ブートデータ更新判定データを算出する第1の更新判定データ算出部とを備えたフラッシュメモリのメモリ書き換え制御システムである。
【0013】
本発明の、フラッシュメモリのメモリ書き換え制御システムの別の態様は、上述の第2の書き換え部が、フラッシュメモリを書き換えるための更新データを受信する第2の更新データ受信部と、第2の更新データ受信部によって受信した更新データを書き込むための、第3のブートセクタおよび第1のブートセクタを除いたフラッシュメモリの所望のセクタを判定する第2のセクタ判定部と、第2のセクタ判定部によって判定されたフラッシュメモリの所望のセクタに、第2の更新データ受信部によって受信した更新データを書き込む第2の更新データ書き込み部と、ブートデータ更新判定データを算出する第2の更新判定データ算出部とを備えたフラッシュメモリのメモリ書き換え制御システムである。
【0014】
本発明の、フラッシュメモリのメモリ書き換え制御システムの別の態様は、上述のブートデータ更新判定データが、フラッシュメモリに備えられている複数個のブートセクタのブートデータを書き換えた回数を通算したブート更新回数と、ブートセクタに格納されているブートデータの正当性を検証するためのブートセクタのチェックサムとを備えていることを特徴とするフラッシュメモリのメモリ書き換え制御システムである。
【0015】
本発明の、フラッシュメモリのメモリ書き換え制御方法の1つの態様は、一括消去可能な記憶領域であるセクタを複数個有し、セクタの中にブート処理を実行させるためのブートデータを格納した少なくとも3個のブートセクタを有したフラッシュメモリのメモリ書き換え制御方法であって、(a)少なくとも3個のブートセクタの中の第1のブートセクタに格納されている第1のブートデータにより起動される、第1のブートセクタを除いた複数のブートセクタのそれぞれに格納されているブートデータの中から所要のブートデータを、それぞれのブートセクタに格納されているブートデータ更新判定データに基づいて判定するブートデータ判定工程と、(b)ブートデータ判定工程によって判定された所要のブートデータが少なくとも3個のブートセクタの中の第2のブートセクタに格納されている場合に、第2のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを書き換える第1の書き換え工程と、(c)ブートデータ判定工程によって判定された所要のブートデータが少なくとも3個のブートセクタの中の第3のブートセクタに格納されている場合に、第3のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを書き換える第2の書き換え工程とを備えたフラッシュメモリのメモリ書き換え制御方法である。
【0016】
本発明の、フラッシュメモリのメモリ書き換え制御方法の別の態様は、上述の第1の書き換え工程(b)が、(b1)フラッシュメモリを書き換えるための更新データを受信する第1の更新データ受信工程と、(b2)第1の更新データ受信工程によって受信した更新データを書き込むための、第2のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを判定する第1のセクタ判定工程と、(b3)第1のセクタ判定工程によって判定されたフラッシュメモリの所望のセクタに、第1の更新データ受信工程によって受信した更新データを書き込む第1の更新データ書き込み工程と、(b4)ブートデータ更新判定データを算出する第1の更新判定データ算出工程とを備えたフラッシュメモリのメモリ書き換え制御方法である。
【0017】
本発明の、フラッシュメモリのメモリ書き換え制御方法の別の態様は、上述の第2の書き換え工程(c)が、(c1)フラッシュメモリを書き換えるための更新データを受信する第2の更新データ受信工程と、(c2)第2の更新データ受信工程によって受信した更新データを書き込むための、第3のブートセクタおよび第1のブートセクタを除いた、フラッシュメモリの所望のセクタを判定する第2のセクタ判定工程と、(c3)第2のセクタ判定工程によって判定されたフラッシュメモリの所望のセクタに、第2の更新データ受信工程によって受信した更新データを書き込む第2の更新データ書き込み工程と、(c4)ブートデータ更新判定データを算出する第2の更新判定データ算出工程とを備えたフラッシュメモリのメモリ書き換え制御方法である。
【0018】
本発明の、フラッシュメモリのメモリ書き換え制御方法の別の態様は、上述のブートデータ更新判定データが、フラッシュメモリに備えられている複数個のブートセクタのブートデータを書き換えた回数を通算したブート更新回数と、ブートセクタに格納されているブートデータの正当性を検証するためのブートセクタのチェックサムとを備えていることを特徴とするフラッシュメモリのメモリ書き換え制御方法である。
【0019】
本発明の、プログラムの1つの態様は、上述のフラッシュメモリのメモリ書き換え制御方法の各工程を実行させるプログラムである。
【0020】
本発明の、情報記録媒体の1つの態様は、上述のフラッシュメモリのメモリ書き換え制御方法の各工程を実行させるプログラムを記録したコンピュータに読み取り可能な情報記録媒体である。
【0021】
【発明の実施の形態】
本発明の一実施態様を、図面を参照しながら説明する。なお、以下に説明する実施態様は説明のためのものであり、本発明の範囲を制限するものではない。従って、当業者であればこれらの各要素もしくは全要素をこれと均等なものによって置換した実施態様を採用することが可能であるが、これらの実施態様も本発明の範囲に含まれる。
【0022】
図1は、フラッシュメモリのメモリ書き換え制御システムのハードウェアの構成を示す図である。メモリ書き換え制御システム100は、一括して消去可能な最小単位の記憶領域であるセクタ毎に分割された書き換えが可能であるフラッシュメモリ101、読み書きが可能であるRAM102およびメモリ書き換え制御システム100を有する制御装置の制御を実行するCPU103を備えている。
【0023】
フラッシュメモリ101は、制御装置の通常モードの制御を実行するメインプログラム、フォントデータ等を記憶し、更に、制御装置の起動処理を制御したり、フラッシュメモリ101に記憶されているデータを書き換えたりするブートプログラムを記憶している。以下、ブートプログラムが格納されるセクタを「ブートセクタ」、メインプログラム、フォントデータ等が格納されるセクタを「メインセクタ」という。また、ブートセクタに格納されているブートプログラムのデータを「ブートデータ」、メインセクタに格納されているメインプログラム、フォントデータ等のデータを「メインデータ」という。
【0024】
図2は、本発明のフラッシュメモリにおけるブートセクタの構成の一例を示す図である。以下、3個のセクタによって構成されたブートセクタを例に挙げて説明する。フラッシュメモリ101におけるブートセクタは第1のブートセクタ201、第2のブートセクタ202および第3のブートセクタ203の3個のセクタから構成される。
【0025】
第1のブートセクタ201には、制御装置を起動するための最低限の機能を実行させるブートデータが格納されている。例えば、制御装置を起動させるための最低限の機能として、CPU103の初期化、スタックの初期化等の各種初期化、RAM102のチェック、ゲートアレイレジスタのチェック等の各種チェック、起動モードの判定等の各種判定等が挙げられる。以下、第1のブートセクタ201を「起動ブートセクタ」と呼ぶ。また、起動ブートセクタ201に格納されるブートデータを「起動ブートデータ」、起動ブートデータによって実行される処理を「起動ブート処理」と呼ぶ。
【0026】
第2のブートセクタ202には、起動ブート処理である制御装置を起動させるための最低限の機能以外の起動時における各種機能およびフラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるブートデータが格納されている。例えば、起動ブート処理である制御装置を起動させるための最低限の機能以外の起動時における機能として、通信インタフェースの種別判定、各通信インタフェースに対応した処理、各種ステータスコマンドに対応した処理等が挙げられる。起動ブート処理は、フラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるブートデータによって、起動ブートセクタ201および第2のブートセクタ(自身のセクタ)202以外のフラッシュメモリ101に格納されたブートデータおよびメインデータを書き換え処理を実行させる。以下、第2のブートセクタ202を「WブートセクタA」、WブートセクタA202に格納されるWブートデータを「WブートデータA」、WブートデータAによって実行されるWブート処理を「Wブート処理A」と呼ぶ。
【0027】
第3のブートセクタ203には、起動ブート処理である制御装置を起動させるための最低限の機能以外の起動時における各種機能およびフラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるWブートデータAとほぼ同様のブートデータが格納されている。起動ブート処理は、フラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるブートデータによって、起動ブートセクタ201および第3のブートセクタ(自身のセクタ)203以外のフラッシュメモリ101に格納されたブートデータおよびメインデータを書き換え処理を実行させる。以下、第3のブートセクタ203を「WブートセクタB」、WブートセクタB203に格納されるWブートデータを「WブートデータB」、WブートデータBによって実行されるWブート処理を「Wブート処理B」と呼ぶ。
【0028】
起動ブートセクタ201に格納されている起動ブートデータは、ファームウェアバグが発見された場合のバグ修正以外には、書き換えられることの無いデータである。従って、書き換えられるブートセクタ(以下、「Wブートセクタ」と呼ぶ)は、WブートセクタA202およびWブートセクタB203となる。即ち、Wブートセクタの一方のブート処理により他方のWブートセクタを書き換えることにより、正常に動作する少なくとも1個のWブートセクタを保障することができる。以下、Wブートセクタに格納されているブートデータを「Wブートデータ」、Wブートデータによって実行されるブート処理を「Wブート処理」と呼ぶ。
【0029】
また、WブートセクタA202およびWブートセクタB203には、各Wブートセクタ領域の正当性を検証するためのチェックサム、Wブートセクタのデータ更新回数であるWブート更新回数およびWブートセクタを指定するWブートIDが格納されている。チェックサムおよびWブート更新回数は、ブートデータ更新判定データとして利用される。即ち、起動ブート処理は、Wブート更新回数およびチェックサムに基づいて、最新のWブートデータが格納されているWブートセクタを判定し、判定したWブートセクタに格納されているWブートデータによってWブート処理を実行させる。
【0030】
図3は、フラッシュメモリのメモリ書き換え制御システムの構成の一例を示すブロック図である。メモリ書き換え制御システム100は、ブートデータ判定部301、第1の書き換え部302および第2の書き換え部303を備えている。更に、第1の書き換え部302は、第1の更新データ受信部321、第1のセクタ判定部322、第1の更新データ書き込み部323および第1の更新判定データ算出部324を備え、第2の書き換え部303は、第2の更新データ受信部331、第2のセクタ判定部332、第2の更新データ書き込み部333および第2の更新判定データ算出部334を備えている。
【0031】
ブートデータ判定部301は、図2の起動ブートセクタ201の起動ブート処理の機能部であり、WブートセクタA202のWブート処理AまたはWブートセクタB203のWブート処理Bのどちらの処理を実行させるかを、ブートデータ更新判定データであるWブートセクタに格納されているチェックサムおよびWブート更新回数に基づいて判定する。
【0032】
第1の書き換え部302は、図2のWブートセクタA202のWブート処理Aの機能部であり、起動ブートセクタ201およびWブートセクタA202を除いたフラッシュメモリ101を構成する複数個のセクタの所望のセクタを書き換える。即ち、第1の書き換え部302により、WブートセクタB203に格納されるWブートデータBを書き換える。
【0033】
第1の書き換え部302の第1の更新データ受信部321は、所定の通信インタフェースを利用してホスト装置から更新データを受信する。更新データは、所定のフォーマットに従って、所定サイズのデータ単位(レコード単位)で受信される。第1の書き換え部302の第1のセクタ判定部322は、第1の更新データ受信部321によって受信した更新データを格納するフラッシュメモリ101のセクタがどこのセクタであるかを判定し、起動ブートセクタ201およびWブートセクタA202である場合は、更新データによる書き換えを実行しないようにする。第1の書き換え部302の第1の更新データ書き込み部323は、更新データを起動ブートセクタ201およびWブートセクタA202を除いたフラッシュメモリ101の所望のセクタに書き込む。第1の書き換え部302の第1の更新判定データ算出部324は、書き換えられたフラッシュメモリ101のWブートセクタB203のチェックサムおよびメインセクタのチェックサムを算出し、WブートセクタA202のWブート更新回数に基づいて、WブートセクタB203のWブート更新回数を算出する。
【0034】
第2の書き換え部303は、図2のWブートセクタB203のWブート処理Bの機能部であり、起動ブートセクタ201およびWブートセクタB203を除いたフラッシュメモリ101を構成する複数個のセクタの所望のセクタを書き換える。即ち、第2の書き換え部303により、WブートセクタA202に格納されるWブートデータAを書き換える。
【0035】
第2の書き換え部303の第2の更新データ受信部331は、所定の通信インタフェースを利用してホスト装置から更新データを受信する。更新データは、所定のフォーマットに従って、所定のサイズのデータを受信データ単位として受信される。第2の書き換え部303の第2のセクタ判定部332は、第2の更新データ受信部331によって受信した更新データを格納するフラッシュメモリ101のセクタがどこのセクタであるかを判定し、起動ブートセクタ201およびWブートセクタB203である場合は、更新データによる書き換えを実行しないようにする。第2の書き換え部303の第2の更新データ書き込み部333は、更新データを起動ブートセクタ201およびWブートセクタB203を除いたフラッシュメモリ101の所望のセクタに書き込む。第2の書き換え部303の第2の更新判定データ算出部334は、書き換えられたフラッシュメモリ101のWブートセクタA202のチェックサムおよびメインセクタのチェックサムを算出し、WブートセクタB203のWブート更新回数に基づいて、WブートセクタA202のWブート更新回数を算出する。
【0036】
図4は、2個のWブートセクタによるWブートデータの書き換え順序を示す図である。まず、フラッシュメモリ101のWブートセクタA202およびWブートセクタB203には、WブートデータAおよびWブートデータBがともに格納された状態で出荷される。また、Wブート更新回数は、一方のWブートセクタを「1」、他方のWブートセクタを「0」として出荷される。例えば、WブートセクタA202のWブート更新回数を「1」、WブートセクタB203のWブート更新回数を「0」として出荷される。
【0037】
起動ブート処理によって実行される最新のWブート処理がWブート処理AであるかWブート処理Bであるかを、WブートセクタA202およびWブートセクタB203における各Wブートセクタ領域のチェックサムおよびWブート更新回数に基づいて判定する。WブートセクタA202およびWブートセクタB203のチェックサムがともに正常である場合は、Wブート更新回数の大きいWブートセクタのWブート処理を実行させる。また、WブートセクタA202およびWブートセクタB203のチェックサムの一方が正常である場合は、正常であるチェックサムのWブートセクタのWブート処理を実行させる。
【0038】
実行中のWブートセクタのWブート処理により非実行中のWブートセクタのWブートデータを書き換え、Wブート更新回数を更新する。例えば、図に示すように1回目のWブートセクタの書き換えの場合、即ち、1回目の書き込みの場合、実行されているWブート処理は、Wブート処理Aである。従って、書き換えられるWブートセクタは、WブートセクタB203となる。即ち、Wブート処理AによりWブートセクタB203のWブートデータBが更新される。
【0039】
また、WブートセクタB203のWブート更新回数は、WブートセクタA202のWブート更新回数に1を加えた回数になる。即ち、更新されたWブートセクタのWブート更新回数の方が、実行中のWブートセクタのWブート更新回数よりも大きくなる。尚、図に示すように、例外として、更新回数がFFFFh回である場合、次の更新回数は0回となる。即ち、Wブート更新回数は、10000h回書き込むと出荷時の状態に戻る。
【0040】
図5は、ブート処理の手順の一例を示す図である。起動ブートセクタ201の起動ブート処理、WブートセクタA202のWブート処理AおよびWブートセクタB203のWブート処理Bによる処理手順の一例を示す。まず、制御装置の電源が投入されると、CPU103の初期化、スタックの初期化等の各種初期化、RAM102のチェック、ゲートアレイレジスタのチェック等の各種チェック、起動モードの判定等の各種判定等を実行する(S501)。
【0041】
次に、メモリ書き換えモードであるか否かを判定し(S502)、メモリ書き換えモードではない場合(S502;No)は、メインセクタのチェックサムを検証し(S512)、チェックサムが正常であるか否か、即ち、メインセクタのデータが正常であるか否かを判定する(S513)。チェックサムが異常である場合(S513;No)は、エラー表示等のエラー処理を実行する(S515)。一方、チェックサムが正常である場合(S513;Yes)は、メインプログラムの各種処理を実行する(S514)。
【0042】
メモリ書き換えモードである場合(S502;Yes)は、WブートセクタA202のチェックサムおよびWブートセクタB203のチェックサムを検証する(S503)。WブートセクタA202およびWブートセクタB203のチェックサムがともに異常であるか否かを判定し(S504)、WブートセクタA202およびWブートセクタB203のチェックサムがともに異常である場合(S504;Yes)は、エラー表示等のエラー処理を実行する(S505)。
【0043】
一方、WブートセクタA202およびWブートセクタB203のチェックサムがともに異常ではない場合(S504;No)は、WブートセクタA202およびWブートセクタB203のチェックサムがともに正常であるか否かを判定し(S506)、WブートセクタA202およびWブートセクタB203のチェックサムがともに正常である場合(S506;Yes)は、WブートセクタA202のWブート更新回数およびWブートセクタB203のWブート更新回数を取得し(S507)、WブートセクタA202のWブート更新回数がWブートセクタB203のWブート更新回数よりも大きいか否かを判定する(S508)。
【0044】
WブートセクタA202のWブート更新回数がWブートセクタB203のWブート更新回数よりも大きい場合、即ち、WブートデータAがWブートデータBよりも新しいWブートデータである場合(S508;Yes)は、WブートセクタA202のWブート処理Aによるメモリ書き換え処理を実行する(S510)。一方、WブートセクタA202のWブート更新回数がWブートセクタB203のWブート更新回数以下の場合、即ち、WブートデータBがWブートデータAよりも新しいWブートデータである場合(S508;No)は、WブートセクタB203のWブート処理Bによるメモリ書き換え処理を実行する(S509)。
【0045】
WブートセクタA202およびWブートセクタB203のチェックサムがともに正常ではない場合、即ち、どちらか一方のWブートセクタが異常である場合(S506;No)は、WブートセクタA202のチェックサムが正常であるか否かを判定し(S511)、WブートセクタA202のチェックサムが正常である場合(S511;Yes)は、WブートセクタA202のWブート処理Aによるメモリ書き換え処理を実行する(S510)。一方、WブートセクタA202のチェックサムが異常である場合、即ち、WブートセクタB203のチェックサムが正常である場合(S511;No)は、WブートセクタB203のWブート処理Bによるメモリ書き換え処理を実行する(S509)。
【0046】
また、通常モードからメモリ書き換えモードへ移行する場合は、メモリ書き換えモード移行コマンドを受信することにより(S516)、ステップS503へ移行し、フラッシュメモリの書き換えが実行される。
【0047】
図6は、Wブート処理AまたはWブート処理Bによるフラッシュメモリ書き換え処理の手順の一例を示す図である。まず、フラッシュメモリ101を書き換えるための更新データをホスト装置から受信するための通信インタフェースの判別および各種初期化を実行し(S601)、実行中のWブートセクタのWブート処理を認識するためにWブートIDを取得する(S602)。
【0048】
次に、更新データをレコード単位に受信する(S603)。以下、受信したレコード単位の更新データを「受信レコードデータ」と呼ぶ。次に、受信レコードデータが終了レコードであるか否か、即ち、更新データの受信が終了であるか否かを判定する(S604)。
【0049】
受信レコードデータが終了レコードではない場合(S604;No)は、受信レコードデータが格納すべきフラッシュメモリのセクタの更新データであるか否か判定する(S605)。受信レコードデータには、格納開始アドレスが格納されており、この格納開始アドレスに基づいて、格納すべきフラッシュメモリのセクタが判定される。また、書き換えられるセクタは、起動ブートセクタおよび実行中のWブートセクタ以外のセクタである。
【0050】
受信レコードデータが格納すべきフラッシュメモリのセクタの更新データである場合(S605;Yes)は、受信レコードデータの書き込み処理を実行し(S606)、ホスト装置へ正常に受信したことを通知するための正常受信ステータスを送信し(S607)、ステップS603に戻り、次の更新データであるレコードデータを受信する。一方、受信レコードデータが格納すべきフラッシュメモリのセクタの更新データではない場合(S605;No)は、ステップS603に戻り、次の更新データであるレコードデータを受信する。
【0051】
受信レコードデータが終了レコードである場合(S604;Yes)は、メインセクタのチェックサムおよび非実行中のWブートセクタのチェックサムを算出して書き込み(S608)、メモリ書き換えモードにおける所定の終了処理を実行し(S609)、最後にCPUのリセット処理を実行する(S610)。
【0052】
図7は、フラッシュメモリの書き換え範囲を示す図である。図7(a)は、Wブート処理Aが実行されている場合のフラッシュメモリの書き換え範囲を示す図であり、図7(b)は、Wブート処理Bが実行されている場合のフラッシュメモリの書き換え範囲を示す図である。図に示すように、以下に示す4項目のデータ以外のデータを受信レコードデータに基づいて書き換える。
【0053】
・起動ブートデータ:書き換えられることの無いブートデータである。
・実行中のWブートセクタのWブートデータ:Wブート処理Aが実行中の場合は、WブートデータAであり、Wブート処理Bが実行中の場合は、WブートデータBである。
・非実行中のWブートセクタのチェックサム:Wブート処理Aが実行中の場合は、WブートセクタB203のチェックサムであり、Wブート処理Bが実行中の場合は、WブートセクタA202のチェックサムである。
・メインセクタのチェックサム:メインセクタ全領域のチェックサムである。
【0054】
フラッシュメモリ101のデータ書き換え方法には様々な方法がある。例えば、以下に説明する書き換え方法を利用して実行することができる。
第1の書き換え方法は、フラッシュメモリ101を構成する全てのセクタにおいて、セクタ全域の更新データをレコードデータとして順次受信する場合である。ここで、未使用領域のレコードデータは0xffとして受信する。受信レコードデータが書き換え対象となるセクタ(更新対象セクタ)の初めての更新データである場合に、更新対象セクタのデータを消去し、所定の格納開始アドレスに基づいて受信レコードデータを更新対象セクタに書き込む。受信レコードデータが更新対象セクタの初めての更新データではない場合は、所定の格納開始アドレスに基づいて受信レコードデータを更新対象セクタに書き込む。
【0055】
第2の書き換え方法は、Wブートセクタのデータにおいては、データが存在する部分の更新データを受信しセクタ全域を書き換え、Wブートセクタ以外のセクタにおいては、更新すべきデータのみを受信し、その受信レコードデータの部分のみを書き換える場合である。Wブートセクタが更新対象セクタである場合は、受信レコードデータが更新対象セクタの初めての更新データである場合に、更新対象セクタのデータをRAM上に複写し、更新対象セクタのデータを消去する。RAM上のセクタイメージにデータが存在する部分の全ての受信レコードデータを書き込み、書き込まれたRAM上のセクタイメージを更新対象セクタに書き戻す。Wブートセクタ以外のセクタが更新対象セクタである場合は、更新対象セクタのデータをRAM上に複写し、更新すべき部分の受信レコードデータを書き込み、更新対象セクタのデータを消去し、書き込まれたRAM上のセクタイメージを更新対象セクタに書き戻す。
【0056】
第3の書き換え方法は、フラッシュメモリ101の構成する全てのセクタにおいて、更新すべきデータのみを受信し、その受信レコードデータの部分のみを書き換える場合である。更新対象セクタのデータをRAM上に複写し、更新すべき部分の受信レコードデータを書き込み、更新対象セクタのデータを消去し、書き込まれたRAM上のセクタイメージを更新対象セクタに書き戻す。
【0057】
図8は、Wブートセクタの書き換え方法の詳細を示す図である。図8(a)は、Wブート処理Aが実行されている場合のWブートセクタの書き換え方法を示す図であり、図8(b)は、Wブート処理Bが実行されている場合のWブートセクタの書き換え方法を示す図である。例えば、図8(a)に示すように、Wブート処理Aが実行されている場合は、WブートセクタB203のWブートデータBを順次受信し、その受信レコードデータを所定の格納開始アドレスに基づいて、WブートセクタB203に書き込む。次に、WブートセクタB203のWブート更新回数を算出し、WブートセクタB203の所定の領域に書き込む。ここで、WブートセクタA202のブートセクタ更新回数がNである場合、WブートセクタB203のWブート更新回数は(N+1)となる。次に、WブートセクタB203のチェックサムを算出し、WブートセクタB203の所定の領域に書き込む。また、図8(b)に示すように、Wブート処理Bが実行されている場合も、Wブート処理Aが実行されている場合と同様である。即ち、WブートセクタA202のWブートデータAは、受信レコードデータに基づいて書き換えられ、WブートセクタA202のWブート更新回数とWブートセクタA202のチェックサムは、算出した値が書き込まれる。
【0058】
既に正常に機能しているブート処理に新しい機能を追加する場合に、追加される機能についてのブートデータをWブートデータとしてWブートセクタに書き込むことにより、ブートデータの書き換え作業における、書き換えエラーによる制御装置の起動不能状態を回避することができる。
【0059】
また、本発明のプログラムは、上述したフラッシュメモリのメモリ書き換え制御方法の各工程を実行させるプログラムである。また、本発明の情報記録媒体は、上述したフラッシュメモリの書き換え制御方法の各工程を実行させるプログラムを記録することもできる。また、本発明の情報記録媒体は、コンパクト・ディスク、フレキシブル・ディスク、ハード・ディスク、光磁気ディスク、ディジタル・バーサタイル・ディスク、磁気テープ、もしくはメモリ・カードであっても良い。
【0060】
【発明の効果】
以上説明したように、本発明によれば、ブートセクタとして起動ブートセクタ、WブートセクタAおよびWブートセクタBをフラッシュメモリに設け、起動ブートセクタには、制御装置を起動させるための最低限の機能を実行させる書き換え不要のブートデータを格納し、WブートセクタAには、起動ブートセクタおよびWブートセクタAを除いたフラッシュメモリの所望のセクタを書き換える機能、起動ブートセクタに格納されている以外の起動時の処理機能等を実行させるブートデータを格納し、WブートセクタBには、起動ブートセクタおよびWブートセクタBを除いたフラッシュメモリの所望のセクタを書き換える機能、起動ブートセクタに格納されている以外の起動時の処理機能等を実行させるブートデータを格納することにより、Wブートセクタの書き換え処理異常による制御装置の起動不能状態を回避することができる。
【0061】
また、1回のダウンロード作業のみでブートデータを書き換えることができることから、作業手順が簡素化され、作業エラーの発生を削減することができる。更に、書き換え作業の時間を削減することができる。
【図面の簡単な説明】
【図1】メモリ書き換え制御システムのハードウェアの構成を示す図である。
【図2】本発明のフラッシュメモリにおけるブートセクタの構成を示す図である。
【図3】メモリ書き換え制御システムの構成の一例を示すブロック図である。
【図4】2個のWブートセクタによるWブートデータの書き換え順序を示す図である。
【図5】ブート処理の手順を示す図である。
【図6】Wブート処理AまたはWブート処理Bによるフラッシュメモリ書き換え処理の手順を示す図である。
【図7】(a)は、Wブート処理Aが実行されている場合のフラッシュメモリの書き換え範囲を示す図であり、
(b)は、Wブート処理Bが実行されている場合のフラッシュメモリの書き換え範囲を示す図である。
【図8】(a)は、Wブート処理Aが実行されている場合のWブートセクタの書き換え方法を示す図であり、
(b)は、Wブート処理Bが実行されている場合のWブートセクタの書き換え方法を示す図である。
【図9】従来の書き換え処理によるデータ遷移を説明する図である。
【符号の説明】
100  メモリ書き換え制御システム
101  フラッシュメモリ
102  RAM
103  CPU
201  起動ブートセクタ
202  WブートセクタA
203  WブートセクタB
301  ブートデータ判定部
302  第1の書き換え部
303  第2の書き換え部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a memory rewrite control system for a flash memory, a memory rewrite control method, a program for executing each step of the memory rewrite control method, and an information recording medium. In particular, a flash memory memory rewriting control system, a memory rewriting control method, and a memory rewriting system capable of rewriting a desired sector of the flash memory in a single download operation using a flash memory having at least three boot sectors The present invention relates to a program for executing each step of a control method and an information recording medium.
[0002]
[Prior art]
In a control device such as a printer or a scanner, a boot program and a main program of firmware are separated and stored in a flash memory. For example, in the case of a printer, a main program which is a program for controlling a normal mode of the printer and font data are stored in a main sector. Further, a program for executing a printer start-up process, a main program for controlling the rewrite control mode of the printer, and a program for executing a rewrite process of font data and the like stored in the main sector are stored in the boot sector. . Here, the sector is an area that can be collectively erased in the flash memory.
[0003]
When rewriting the data (boot data) stored in the boot sector, the boot data needs to be downloaded three times since the rewriting of the sector in which the own program is stored is software-prohibited. there were.
[0004]
FIG. 9 is a diagram illustrating data transition by a conventional rewriting process. In the rewriting process of the flash memory, the rewriting process of the sectors of the flash memory other than the boot sector is executed by the boot data stored in the boot sector, and the rewriting process of the boot sector is executed by the newly downloaded boot rewrite data. .
[0005]
The boot rewrite data is obtained in the first download processing by the boot data, the data of the main sector is erased, and the obtained boot rewrite data is written in the main sector ((1) in FIG. 9).
[0006]
Next, new boot data is acquired in the second download process by the boot rewrite data, the data in the boot sector is erased, and the acquired new boot data is written in the boot sector ((2) in FIG. 9).
[0007]
With the new boot data, new main data is obtained in the third download process, the boot rewrite data in the main sector is erased, and the obtained new main data is written in the main sector ((3) in FIG. 9).
[0008]
[Problems to be solved by the invention]
As described above, the work of rewriting the data stored in the boot sector of the flash memory is not completed unless the download work is performed three times, so that the work procedure is complicated and a work error is likely to occur. There was a problem. In addition, there is a problem that the time required for the rewriting operation is also long.
[0009]
Therefore, the present invention has been made in order to solve the above problems, and has a function of rewriting a flash memory with boot data for executing a minimum function of activating a control device as a first boot sector. The boot data to be executed is stored in the second boot sector and the third boot sector, and it is determined whether the function of the first boot sector performs the function of the second boot sector or the function of the third boot sector. A flash memory memory rewrite control system for rewriting sectors of the flash memory excluding the first boot sector and the determined own boot sector by the determined function of the second boot sector or the function of the third boot sector; Memory rewrite control method, program for executing each step of memory rewrite control method, and information storage And to provide a medium.
[0010]
[Means for Solving the Problems]
The present inventor has conducted studies to solve the above-mentioned conventional problems. As a result, at least three boot sectors are provided in the flash memory, and the first boot sector stores boot data that does not need to be rewritten to execute the minimum function for activating the control device, In the sector, a boot for executing a function of rewriting a desired sector of the flash memory excluding the first boot sector and the second boot sector, a boot processing function other than the one stored in the first boot sector, and the like. A function for storing data and rewriting a desired sector of the flash memory excluding the first boot sector and the third boot sector in the third boot sector, and starting other than the first boot sector. The boot data for executing the processing function at the time of storage is stored. Not only it is possible to avoid a state, work procedures of the boot sector rewriting processing of the flash memory is simplified, it has been found that it is possible to shorten the time required for processing. Based on the above research results, the following invention is provided.
[0011]
One aspect of a memory rewrite control system for a flash memory according to the present invention has at least three boot sectors that have a plurality of sectors that are collectively erasable storage areas and store boot data for executing a boot process. Memory rewrite control system for a flash memory, comprising: a first boot sector that is started by first boot data stored in a first boot sector among at least three boot sectors, excluding a first boot sector. A boot data determination unit that determines required boot data from boot data stored in each of the plurality of boot sectors based on the boot data update determination data stored in each boot sector; The required boot data determined by the determining unit is in at least three boot sectors. When stored in the second boot sector, the boot data is determined by the first rewrite unit that rewrites a desired sector of the flash memory excluding the second boot sector and the first boot sector, and the boot data determination unit. If the required boot data is stored in a third boot sector among the at least three boot sectors, a desired sector of the flash memory excluding the third boot sector and the first boot sector is stored. A flash memory rewriting control system including a second rewriting unit for rewriting.
[0012]
According to another aspect of the present invention, there is provided a flash memory memory rewriting control system, wherein the first rewriting unit receives update data for rewriting the flash memory; A first sector determination unit for determining a desired sector of the flash memory excluding the second boot sector and the first boot sector for writing update data received by the data reception unit, and a first sector determination Update data writing unit for writing the update data received by the first update data receiving unit to a desired sector of the flash memory determined by the unit, and first update determination data for calculating boot data update determination data A flash memory rewrite control system including a calculation unit.
[0013]
Another aspect of the memory rewrite control system for a flash memory according to the present invention is the above-described second rewrite unit, wherein the second rewrite unit receives update data for rewriting the flash memory; A second sector determining unit for determining a desired sector of the flash memory excluding the third boot sector and the first boot sector for writing the update data received by the data receiving unit; and a second sector determining unit. Update data writing unit for writing the update data received by the second update data receiving unit to a desired sector of the flash memory determined by the above, and second update determination data calculation for calculating boot data update determination data And a flash memory memory rewriting control system including
[0014]
Another aspect of the memory rewrite control system for a flash memory according to the present invention is that the boot data update determination data is obtained by adding the number of times the boot data of a plurality of boot sectors provided in the flash memory has been rewritten. A flash memory memory rewriting control system comprising a number of times and a checksum of a boot sector for verifying the validity of boot data stored in the boot sector.
[0015]
One aspect of the flash memory rewriting control method according to the present invention is to provide a flash memory having at least three sectors each of which is a storage area that can be erased in a batch and in which boot data for executing a boot process is stored. A memory rewriting control method for a flash memory having a number of boot sectors, the method comprising: (a) activation by first boot data stored in a first boot sector among at least three boot sectors; Boot for determining required boot data from among the boot data stored in each of the plurality of boot sectors except the first boot sector based on the boot data update determination data stored in each boot sector The required boot data determined in the data determination step and (b) the boot data determination step is at least 3 A first rewriting step of rewriting a desired sector of the flash memory excluding the second boot sector and the first boot sector when stored in the second boot sector among the boot sectors of c) Excluding the third boot sector and the first boot sector when the required boot data determined in the boot data determination step is stored in the third boot sector among the at least three boot sectors. And a second rewriting step of rewriting a desired sector of the flash memory.
[0016]
Another aspect of the memory rewriting control method for a flash memory according to the present invention is that the first rewriting step (b) includes the step of: (b1) a first update data receiving step of receiving update data for rewriting the flash memory And (b2) a first sector for determining a desired sector of the flash memory, excluding the second boot sector and the first boot sector, for writing the update data received in the first update data receiving step. A determination step; (b3) a first update data writing step of writing the update data received by the first update data reception step to a desired sector of the flash memory determined by the first sector determination step; Rewriting the flash memory including a first update determination data calculation step of calculating boot data update determination data It is your way.
[0017]
Another aspect of the memory rewriting control method for a flash memory according to the present invention is that the second rewriting step (c) includes the step of: (c1) a second updating data receiving step of receiving update data for rewriting the flash memory. And (c2) determining a desired sector of the flash memory for writing the update data received in the second update data receiving step, excluding the third boot sector and the first boot sector. A determination step; (c3) a second update data writing step of writing the update data received by the second update data reception step to a desired sector of the flash memory determined by the second sector determination step; (c4) A) rewriting the flash memory including a second update determination data calculation step of calculating boot data update determination data It is your way.
[0018]
Another aspect of the memory rewriting control method of the flash memory according to the present invention is that the boot data update determination data is obtained by adding the number of times the boot data of a plurality of boot sectors provided in the flash memory has been rewritten. A flash memory memory rewriting control method comprising a number of times and a checksum of a boot sector for verifying the validity of boot data stored in the boot sector.
[0019]
One embodiment of the program according to the present invention is a program for executing each step of the above-described flash memory memory rewrite control method.
[0020]
One aspect of the information recording medium of the present invention is a computer-readable information recording medium that stores a program for executing each step of the above-described flash memory memory rewriting control method.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
One embodiment of the present invention will be described with reference to the drawings. The embodiments described below are for explanation, and do not limit the scope of the present invention. Therefore, those skilled in the art can adopt embodiments in which each of these elements or all elements are replaced by equivalents, and these embodiments are also included in the scope of the present invention.
[0022]
FIG. 1 is a diagram showing a hardware configuration of a memory rewrite control system of a flash memory. The memory rewrite control system 100 includes a rewritable flash memory 101 divided into sectors, which is a storage area of a minimum unit that can be collectively erased, a readable / writable RAM 102, and a memory rewrite control system 100. It has a CPU 103 for controlling the apparatus.
[0023]
The flash memory 101 stores a main program for executing control in the normal mode of the control device, font data, and the like, and further controls a startup process of the control device and rewrites data stored in the flash memory 101. It stores a boot program. Hereinafter, a sector in which the boot program is stored is referred to as a “boot sector”, and a sector in which the main program, font data, and the like are stored is referred to as a “main sector”. The data of the boot program stored in the boot sector is referred to as “boot data”, and the data of the main program, font data, and the like stored in the main sector is referred to as “main data”.
[0024]
FIG. 2 is a diagram showing an example of a configuration of a boot sector in the flash memory of the present invention. Hereinafter, a boot sector constituted by three sectors will be described as an example. The boot sector in the flash memory 101 is composed of three sectors, a first boot sector 201, a second boot sector 202, and a third boot sector 203.
[0025]
The first boot sector 201 stores boot data for executing a minimum function for activating the control device. For example, the minimum functions for starting the control device include various initializations such as initialization of the CPU 103, initialization of a stack, various checks such as a check of the RAM 102, a check of a gate array register, and determination of a start mode. Various determinations and the like can be mentioned. Hereinafter, the first boot sector 201 is referred to as a “boot boot sector”. The boot data stored in the boot boot sector 201 is referred to as “boot boot data”, and the processing performed by the boot data is referred to as “boot boot processing”.
[0026]
In the second boot sector 202, a boot for executing various functions at the time of booting other than the minimum function for booting the control device, which is boot boot processing, and a function for rewriting data stored in the flash memory 101, is provided. Data is stored. For example, as startup functions other than the minimum functions for starting the control device, which are startup boot processings, functions at the time of startup include determination of the type of communication interface, processing corresponding to each communication interface, processing corresponding to various status commands, and the like. Can be In the boot boot processing, boot data stored in the flash memory 101 other than the boot boot sector 201 and the second boot sector (own sector) 202 is generated by boot data for executing a function for rewriting data stored in the flash memory 101. The boot data and the main data are rewritten. Hereinafter, the second boot sector 202 is referred to as “W boot sector A”, the W boot data stored in the W boot sector A 202 is referred to as “W boot data A”, and the W boot process executed by the W boot data A is referred to as “W boot data”. Process A ".
[0027]
In the third boot sector 203, W for executing various functions at the time of startup other than the minimum function for starting the control device, which is a startup boot process, and a function for rewriting data stored in the flash memory 101 are provided. Almost the same boot data as the boot data A is stored. In the boot boot process, boot data for executing a function for rewriting data stored in the flash memory 101 is stored in the flash memory 101 other than the boot boot sector 201 and the third boot sector (own sector) 203. The boot data and the main data are rewritten. Hereinafter, the third boot sector 203 is referred to as “W boot sector B”, the W boot data stored in the W boot sector B 203 is referred to as “W boot data B”, and the W boot process executed by the W boot data B is referred to as “W boot data”. Process B ".
[0028]
The boot boot data stored in the boot boot sector 201 is data that is not rewritten except for bug correction when a firmware bug is found. Therefore, the boot sectors to be rewritten (hereinafter, referred to as “W boot sector”) are the W boot sector A 202 and the W boot sector B 203. That is, by rewriting the other W boot sector by one boot process of the W boot sector, at least one normally operating W boot sector can be guaranteed. Hereinafter, the boot data stored in the W boot sector is referred to as “W boot data”, and the boot process executed by the W boot data is referred to as “W boot process”.
[0029]
In the W boot sector A 202 and the W boot sector B 203, a checksum for verifying the validity of each W boot sector area, and the number of W boot updates and the number of data updates of the W boot sector are specified. The W boot ID is stored. The checksum and the W boot update count are used as boot data update determination data. That is, the boot boot process determines the W boot sector in which the latest W boot data is stored based on the W boot update count and the checksum, and determines the W boot sector based on the W boot data stored in the determined W boot sector. Execute the boot process.
[0030]
FIG. 3 is a block diagram showing an example of a configuration of a memory rewrite control system of a flash memory. The memory rewrite control system 100 includes a boot data determination unit 301, a first rewrite unit 302, and a second rewrite unit 303. Further, the first rewriting unit 302 includes a first update data receiving unit 321, a first sector determination unit 322, a first update data writing unit 323, and a first update determination data calculation unit 324, The rewriting unit 303 includes a second update data receiving unit 331, a second sector determination unit 332, a second update data writing unit 333, and a second update determination data calculation unit 334.
[0031]
The boot data determination unit 301 is a functional unit for the boot process of the boot boot sector 201 in FIG. 2 and executes either the W boot process A of the W boot sector A 202 or the W boot process B of the W boot sector B 203. Is determined based on the checksum stored in the W boot sector, which is the boot data update determination data, and the W boot update count.
[0032]
The first rewriting unit 302 is a functional unit of the W boot process A of the W boot sector A 202 in FIG. 2, and performs a desired operation of a plurality of sectors constituting the flash memory 101 excluding the boot boot sector 201 and the W boot sector A 202. Rewrite the sector. That is, the first rewriting unit 302 rewrites the W boot data B stored in the W boot sector B203.
[0033]
The first update data receiving unit 321 of the first rewriting unit 302 receives update data from the host device using a predetermined communication interface. The update data is received in data units (record units) of a predetermined size according to a predetermined format. The first sector determining unit 322 of the first rewriting unit 302 determines which sector of the flash memory 101 storing the update data received by the first update data receiving unit 321 is, In the case of the sector 201 and the W boot sector A202, rewriting with the update data is not executed. The first update data writing unit 323 of the first rewriting unit 302 writes the update data in a desired sector of the flash memory 101 excluding the boot boot sector 201 and the W boot sector A202. The first update determination data calculation unit 324 of the first rewrite unit 302 calculates the checksum of the W boot sector B203 of the rewritten flash memory 101 and the checksum of the main sector, and updates the W boot sector A202 of the W boot sector A202. Based on the number of times, the number of times of updating the W boot in the W boot sector B203 is calculated.
[0034]
The second rewriting unit 303 is a functional unit of the W boot process B of the W boot sector B 203 of FIG. 2, and is a function of a plurality of sectors constituting the flash memory 101 excluding the boot boot sector 201 and the W boot sector B 203. Rewrite the sector. That is, the W rewrite unit 303 rewrites the W boot data A stored in the W boot sector A 202.
[0035]
The second update data receiving unit 331 of the second rewriting unit 303 receives update data from the host device using a predetermined communication interface. The update data is received according to a predetermined format with data of a predetermined size as a reception data unit. The second sector determination unit 332 of the second rewrite unit 303 determines which sector of the flash memory 101 storing the update data received by the second update data reception unit 331 is the boot sector. In the case of the sector 201 and the W boot sector B203, rewriting with the update data is not executed. The second update data writing unit 333 of the second rewriting unit 303 writes the update data in a desired sector of the flash memory 101 excluding the boot sector 201 and the W boot sector B203. The second update determination data calculation unit 334 of the second rewrite unit 303 calculates the checksum of the W boot sector A 202 and the checksum of the main sector of the rewritten flash memory 101, and updates the W boot sector B 203 of the W boot sector. Based on the number of times, the number of times of updating W boot in the W boot sector A 202 is calculated.
[0036]
FIG. 4 is a diagram showing the order of rewriting W boot data by two W boot sectors. First, the W boot sector A 202 and the W boot sector B 203 of the flash memory 101 are shipped with both the W boot data A and the W boot data B stored therein. The W boot update count is shipped with one W boot sector being “1” and the other W boot sector being “0”. For example, the W boot sector A 202 is shipped with the W boot update count of “1” and the W boot sector B 203 with the W boot update count of “0”.
[0037]
Whether the latest W boot process executed by the boot process is the W boot process A or the W boot process B is determined by checking the W boot sector A 202 and the W boot sector B 203 of each W boot sector area and the W boot. The determination is made based on the number of updates. If the checksums of the W boot sector A 202 and the W boot sector B 203 are both normal, the W boot process of the W boot sector having a large number of W boot updates is executed. When one of the checksums of the W boot sector A 202 and the W boot sector B 203 is normal, the W boot process of the W boot sector having the normal checksum is executed.
[0038]
The W boot data of the non-executing W boot sector is rewritten by the W boot process of the executing W boot sector, and the W boot update count is updated. For example, as shown in the figure, in the case of the first rewriting of the W boot sector, that is, in the case of the first writing, the W boot process being executed is the W boot process A. Therefore, the rewritten W boot sector becomes the W boot sector B203. That is, the W boot process A updates the W boot data B of the W boot sector B 203.
[0039]
The W boot update count of the W boot sector B 203 is equal to the number obtained by adding 1 to the W boot update count of the W boot sector A 202. That is, the number of times of updating the W boot of the updated W boot sector is larger than the number of times of updating of the W boot of the currently executing W boot sector. As shown in the figure, as an exception, when the number of updates is FFFFh, the next number of updates is 0. That is, the W boot update count returns to the state at the time of shipment after writing 10000h times.
[0040]
FIG. 5 is a diagram illustrating an example of the procedure of the boot process. An example of a processing procedure of a boot boot process of a boot boot sector 201, a W boot process A of a W boot sector A 202, and a W boot process B of a W boot sector B 203 will be described. First, when the power of the control device is turned on, various initializations such as initialization of the CPU 103, initialization of the stack, etc., various checks such as a check of the RAM 102, a check of the gate array register, various determinations such as a determination of a start mode, etc. Is executed (S501).
[0041]
Next, it is determined whether the mode is the memory rewrite mode (S502). If the mode is not the memory rewrite mode (S502; No), the checksum of the main sector is verified (S512), and the checksum is normal. No, that is, whether the data of the main sector is normal is determined (S513). If the checksum is abnormal (S513; No), error processing such as error display is executed (S515). On the other hand, when the checksum is normal (S513; Yes), various processes of the main program are executed (S514).
[0042]
If the mode is the memory rewrite mode (S502; Yes), the checksum of the W boot sector A202 and the checksum of the W boot sector B203 are verified (S503). It is determined whether the checksums of the W boot sector A 202 and the W boot sector B 203 are both abnormal (S504), and if both the checksums of the W boot sector A 202 and the W boot sector B 203 are abnormal (S504; Yes). Executes an error process such as an error display (S505).
[0043]
On the other hand, when both the checksums of the W boot sector A 202 and the W boot sector B 203 are not abnormal (S504; No), it is determined whether the checksums of the W boot sector A 202 and the W boot sector B 203 are both normal. (S506) If both the checksums of the W boot sector A 202 and the W boot sector B 203 are normal (S506; Yes), the number of times of updating the W boot of the W boot sector A 202 and the number of updating of the W boot of the W boot sector B 203 are obtained. Then, it is determined whether or not the W boot update count of the W boot sector A 202 is larger than the W boot update count of the W boot sector B 203 (S508).
[0044]
If the W boot update count of the W boot sector A 202 is larger than the W boot update count of the W boot sector B 203, that is, if the W boot data A is newer than the W boot data B (S508; Yes), Then, the memory rewriting process by the W boot process A of the W boot sector A 202 is executed (S510). On the other hand, when the W boot update count of the W boot sector A 202 is equal to or less than the W boot update count of the W boot sector B 203, that is, when the W boot data B is newer than the W boot data A (S508; No). Executes the memory rewriting process by the W boot process B of the W boot sector B 203 (S509).
[0045]
If the checksum of both W boot sector A 202 and W boot sector B 203 is not normal, that is, if one of the W boot sectors is abnormal (S506; No), the checksum of W boot sector A 202 is normal. It is determined whether there is any data (S511). If the checksum of the W boot sector A202 is normal (S511; Yes), a memory rewrite process by the W boot process A of the W boot sector A202 is executed (S510). On the other hand, when the checksum of the W boot sector A 202 is abnormal, that is, when the checksum of the W boot sector B 203 is normal (S511; No), the memory rewriting process by the W boot process B of the W boot sector B 203 is performed. Execute (S509).
[0046]
When the mode shifts from the normal mode to the memory rewrite mode, the process shifts to step S503 by receiving the memory rewrite mode shift command (S516), and the flash memory is rewritten.
[0047]
FIG. 6 is a diagram illustrating an example of a procedure of the flash memory rewriting process by the W boot process A or the W boot process B. First, a communication interface for receiving update data for rewriting the flash memory 101 from the host device is determined and various initializations are performed (S601), and W is executed to recognize the W boot process of the W boot sector being executed. A boot ID is obtained (S602).
[0048]
Next, update data is received for each record (S603). Hereinafter, the received update data for each record is referred to as “received record data”. Next, it is determined whether or not the received record data is the end record, that is, whether or not the reception of the update data is finished (S604).
[0049]
If the received record data is not an end record (S604; No), it is determined whether the received record data is update data of a sector of the flash memory to be stored (S605). A storage start address is stored in the received record data, and a sector of the flash memory to be stored is determined based on the storage start address. The sectors to be rewritten are sectors other than the boot boot sector and the W boot sector being executed.
[0050]
If the received record data is update data of a sector of the flash memory to be stored (S605; Yes), the received record data is written (S606) to notify the host device that the data has been received normally. A normal reception status is transmitted (S607), and the process returns to step S603 to receive record data as the next update data. On the other hand, if the received record data is not the update data of the sector of the flash memory to be stored (S605; No), the process returns to step S603 and receives the record data as the next update data.
[0051]
If the received record data is an end record (S604; Yes), the checksum of the main sector and the checksum of the non-executed W boot sector are calculated and written (S608), and a predetermined end process in the memory rewrite mode is performed. (S609), and finally, the CPU is reset (S610).
[0052]
FIG. 7 is a diagram showing a rewriting range of the flash memory. FIG. 7A is a diagram showing the rewriting range of the flash memory when the W boot process A is being executed, and FIG. 7B is a diagram showing the flash memory when the W boot process B is being executed. It is a figure showing a rewriting range. As shown in the figure, data other than the following four items of data is rewritten based on the received record data.
[0053]
-Boot data: boot data that is not rewritten.
W boot data of the W boot sector being executed: W boot data A when W boot processing A is being executed, and W boot data B when W boot processing B is being executed.
Checksum of non-executed W boot sector: When W boot process A is being executed, it is the checksum of W boot sector B 203, and when W boot process B is being executed, the W boot sector A 202 is checked. Sam.
-Checksum of main sector: Checksum of the entire area of the main sector.
[0054]
There are various methods for rewriting data in the flash memory 101. For example, it can be executed using the rewriting method described below.
The first rewriting method is a case where, in all the sectors constituting the flash memory 101, update data of the entire sector is sequentially received as record data. Here, the record data of the unused area is received as 0xff. If the received record data is the first update data of a sector to be rewritten (update target sector), the data of the update target sector is erased and the received record data is written to the update target sector based on a predetermined storage start address. . If the received record data is not the first update data of the update target sector, the received record data is written to the update target sector based on a predetermined storage start address.
[0055]
In the second rewriting method, in the data of the W boot sector, the update data of the portion where the data exists is received and the entire sector is rewritten. In the sectors other than the W boot sector, only the data to be updated is received. This is the case where only the received record data is rewritten. When the W boot sector is the update target sector, if the received record data is the first update data of the update target sector, the data of the update target sector is copied onto the RAM and the data of the update target sector is erased. All the received record data of the portion where data exists in the sector image on the RAM is written, and the written sector image on the RAM is written back to the update target sector. When a sector other than the W boot sector is the update target sector, the data of the update target sector is copied on the RAM, the received record data of the portion to be updated is written, the data of the update target sector is erased, and the written data is written. The sector image on the RAM is written back to the update target sector.
[0056]
The third rewriting method is a case where only the data to be updated is received in all the sectors constituting the flash memory 101 and only the received record data portion is rewritten. The data of the update target sector is copied onto the RAM, the received record data of the portion to be updated is written, the data of the update target sector is erased, and the written sector image on the RAM is written back to the update target sector.
[0057]
FIG. 8 is a diagram showing details of the method of rewriting the W boot sector. FIG. 8A is a diagram illustrating a method of rewriting the W boot sector when the W boot process A is executed, and FIG. 8B is a diagram illustrating the W boot process when the W boot process B is executed. FIG. 4 is a diagram illustrating a sector rewriting method. For example, as shown in FIG. 8A, when the W boot process A is being executed, the W boot data B of the W boot sector B 203 is sequentially received, and the received record data is determined based on a predetermined storage start address. And writes it in the W boot sector B203. Next, the number of times of updating the W boot in the W boot sector B203 is calculated and written in a predetermined area of the W boot sector B203. Here, when the boot sector update count of the W boot sector A 202 is N, the W boot update count of the W boot sector B 203 is (N + 1). Next, the checksum of the W boot sector B203 is calculated and written to a predetermined area of the W boot sector B203. Also, as shown in FIG. 8B, the case where the W boot process B is executed is the same as the case where the W boot process A is executed. That is, the W boot data A of the W boot sector A 202 is rewritten based on the received record data, and the calculated value is written as the W boot update count of the W boot sector A 202 and the checksum of the W boot sector A 202.
[0058]
When a new function is added to a boot process that is already functioning normally, the boot data for the added function is written to the W boot sector as W boot data, thereby controlling the rewriting operation of the boot data due to a rewrite error. It is possible to avoid a state in which the apparatus cannot be started.
[0059]
Further, a program of the present invention is a program for executing each step of the above-described flash memory memory rewrite control method. Further, the information recording medium of the present invention can record a program for executing each step of the above-described flash memory rewrite control method. The information recording medium of the present invention may be a compact disk, a flexible disk, a hard disk, a magneto-optical disk, a digital versatile disk, a magnetic tape, or a memory card.
[0060]
【The invention's effect】
As described above, according to the present invention, a boot boot sector, a W boot sector A, and a W boot sector B are provided in a flash memory as boot sectors, and the boot boot sector has a minimum required for booting the control device. A boot data that does not need to be rewritten is stored in the W boot sector A, and a boot sector and a function for rewriting a desired sector of the flash memory excluding the W boot sector A are stored in the boot boot sector. The boot data for executing the processing function at the time of booting is stored in the W boot sector B. The boot boot sector and the function of rewriting a desired sector of the flash memory excluding the W boot sector B are stored in the boot boot sector. By storing boot data to execute processing functions at startup other than W can be avoided start disabled state of the rewrite process abnormal by the control device of the boot sector.
[0061]
Further, since the boot data can be rewritten only by one download operation, the operation procedure is simplified, and the occurrence of operation errors can be reduced. Further, the time for the rewriting operation can be reduced.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a hardware configuration of a memory rewrite control system.
FIG. 2 is a diagram showing a configuration of a boot sector in the flash memory of the present invention.
FIG. 3 is a block diagram illustrating an example of a configuration of a memory rewrite control system.
FIG. 4 is a diagram showing an order of rewriting W boot data by two W boot sectors.
FIG. 5 is a diagram illustrating a procedure of a boot process.
FIG. 6 is a diagram showing a procedure of a flash memory rewriting process by a W boot process A or a W boot process B;
FIG. 7A is a diagram showing a rewriting range of a flash memory when a W boot process A is being executed;
(B) is a diagram showing a rewriting range of the flash memory when the W boot process B is being executed.
FIG. 8A is a diagram showing a method of rewriting a W boot sector when a W boot process A is being executed;
(B) is a diagram showing a method of rewriting the W boot sector when the W boot process B is being executed.
FIG. 9 is a diagram illustrating data transition by a conventional rewriting process.
[Explanation of symbols]
100 Memory rewrite control system
101 Flash memory
102 RAM
103 CPU
201 Boot boot sector
202 W boot sector A
203 W boot sector B
301 Boot data judgment unit
302 First Rewriting Unit
303 second rewriting unit

Claims (10)

一括消去可能な記憶領域であるセクタを複数個有し、ブート処理を実行させるためのブートデータを格納した少なくとも3個のブートセクタを有したフラッシュメモリのメモリ書き換え制御システムであって、
少なくとも3個の前記ブートセクタの中の第1のブートセクタに格納されている第1のブートデータにより起動される、前記第1のブートセクタを除いた複数の前記ブートセクタのそれぞれに格納されている前記ブートデータの中から所要の前記ブートデータを、それぞれの前記ブートセクタに格納されているブートデータ更新判定データに基づいて判定するブートデータ判定部と、
前記ブートデータ判定部によって判定された前記所要のブートデータが少なくとも3個の前記ブートセクタの中の第2のブートセクタに格納されている場合に、前記第2のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを書き換える第1の書き換え部と、
前記ブートデータ判定部によって判定された前記所要のブートデータが少なくとも3個の前記ブートセクタの中の第3のブートセクタに格納されている場合に、前記第3のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを書き換える第2の書き換え部と、
を備えたフラッシュメモリのメモリ書き換え制御システム。
A memory rewriting control system for a flash memory having a plurality of sectors which are storage areas capable of being collectively erased, and having at least three boot sectors storing boot data for executing a boot process,
The boot sector stored in each of the plurality of boot sectors excluding the first boot sector, which is started by first boot data stored in the first boot sector among the at least three boot sectors. A boot data determination unit that determines the required boot data from the boot data based on the boot data update determination data stored in each boot sector;
When the required boot data determined by the boot data determination unit is stored in a second boot sector among the at least three boot sectors, the second boot sector and the first boot sector are stored. A first rewriting unit for rewriting a desired sector of the flash memory excluding a sector;
When the required boot data determined by the boot data determination unit is stored in a third boot sector among the at least three boot sectors, the third boot sector and the first boot sector are stored. A second rewriting unit for rewriting a desired sector of the flash memory excluding a sector,
Flash memory rewriting control system equipped with.
前記第1の書き換え部が、前記フラッシュメモリを書き換えるための更新データを受信する第1の更新データ受信部と、
前記第1の更新データ受信部によって受信した前記更新データを書き込むための、前記第2のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを判定する第1のセクタ判定部と、
前記第1のセクタ判定部によって判定された前記フラッシュメモリの所望の前記セクタに、前記第1の更新データ受信部によって受信した前記更新データを書き込む第1の更新データ書き込み部と、
前記ブートデータ更新判定データを算出する第1の更新判定データ算出部と、
を備えた請求項1に記載のフラッシュメモリのメモリ書き換え制御システム。
A first update data receiving unit, wherein the first rewrite unit receives update data for rewriting the flash memory;
A first determining a desired sector of the flash memory for writing the update data received by the first update data receiving unit, excluding the second boot sector and the first boot sector; A sector determination unit;
A first update data writing unit that writes the update data received by the first update data reception unit to a desired sector of the flash memory determined by the first sector determination unit;
A first update determination data calculation unit that calculates the boot data update determination data;
The flash memory memory rewriting control system according to claim 1, further comprising:
前記第2の書き換え部が、前記フラッシュメモリを書き換えるための更新データを受信する第2の更新データ受信部と、
前記第2の更新データ受信部によって受信した前記更新データを書き込むための、前記第3のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを判定する第2のセクタ判定部と、
前記第2のセクタ判定部によって判定された前記フラッシュメモリの所望の前記セクタに、前記第2の更新データ受信部によって受信した前記更新データを書き込む第2の更新データ書き込み部と、
前記ブートデータ更新判定データを算出する第2の更新判定データ算出部と、
を備えた請求項1または2に記載のフラッシュメモリのメモリ書き換え制御システム。
A second update data receiving unit, wherein the second rewrite unit receives update data for rewriting the flash memory;
A second step of determining a desired sector of the flash memory, excluding the third boot sector and the first boot sector, for writing the update data received by the second update data receiving unit; A sector determination unit;
A second update data writing unit that writes the update data received by the second update data reception unit to a desired sector of the flash memory determined by the second sector determination unit;
A second update determination data calculation unit that calculates the boot data update determination data;
The memory rewriting control system for a flash memory according to claim 1, further comprising:
前記ブートデータ更新判定データが、前記フラッシュメモリに備えられている複数個の前記ブートセクタの前記ブートデータを書き換えた回数を通算したブート更新回数と、
前記ブートセクタに格納されている前記ブートデータの正当性を検証するための前記ブートセクタのチェックサムと、
を備えていることを特徴とする請求項1から3のいずれか1項に記載のフラッシュメモリのメモリ書き換え制御システム。
The boot data update determination data, the number of boot updates obtained by adding the number of times of rewriting the boot data of the plurality of boot sectors provided in the flash memory,
A checksum of the boot sector for verifying the validity of the boot data stored in the boot sector;
The memory rewrite control system for a flash memory according to any one of claims 1 to 3, further comprising:
一括消去可能な記憶領域であるセクタを複数個有し、前記セクタの中にブート処理を実行させるためのブートデータを格納した少なくとも3個のブートセクタを有したフラッシュメモリのメモリ書き換え制御方法であって、
(a)少なくとも3個の前記ブートセクタの中の第1のブートセクタに格納されている第1のブートデータにより起動される、前記第1のブートセクタを除いた複数の前記ブートセクタのそれぞれに格納されている前記ブートデータの中から所要の前記ブートデータを、それぞれの前記ブートセクタに格納されているブートデータ更新判定データに基づいて判定するブートデータ判定工程と、
(b)前記ブートデータ判定工程によって判定された前記所要のブートデータが少なくとも3個の前記ブートセクタの中の第2のブートセクタに格納されている場合に、前記第2のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを書き換える第1の書き換え工程と、
(c)前記ブートデータ判定工程によって判定された前記所要のブートデータが少なくとも3個の前記ブートセクタの中の第3のブートセクタに格納されている場合に、前記第3のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを書き換える第2の書き換え工程と、
を備えたフラッシュメモリのメモリ書き換え制御方法。
A flash memory memory rewriting control method having a plurality of sectors which are storage areas that can be erased in a batch, and having at least three boot sectors storing boot data for executing boot processing in the sectors. hand,
(A) For each of the plurality of boot sectors excluding the first boot sector, which is started by the first boot data stored in the first boot sector among the at least three boot sectors. A boot data determination step of determining the required boot data from the stored boot data based on boot data update determination data stored in each of the boot sectors;
(B) when the required boot data determined in the boot data determination step is stored in a second boot sector among the at least three boot sectors, the second boot sector and the second boot sector; A first rewriting step of rewriting a desired sector of the flash memory excluding one boot sector;
(C) when the required boot data determined in the boot data determination step is stored in a third boot sector among the at least three boot sectors, the third boot sector and the third boot sector; A second rewriting step of rewriting a desired sector of the flash memory excluding one boot sector;
A memory rewriting control method for a flash memory provided with:
前記第1の書き換え工程(b)が、(b1)前記フラッシュメモリを書き換えるための更新データを受信する第1の更新データ受信工程と、(b2)前記第1の更新データ受信工程によって受信した前記更新データを書き込むための、前記第2のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを判定する第1のセクタ判定工程と、(b3)前記第1のセクタ判定工程によって判定された前記フラッシュメモリの所望の前記セクタに、前記第1の更新データ受信工程によって受信した前記更新データを書き込む第1の更新データ書き込み工程と、
(b4)前記ブートデータ更新判定データを算出する第1の更新判定データ算出工程と、
を備えた請求項5に記載のフラッシュメモリのメモリ書き換え制御方法。
The first rewriting step (b) includes: (b1) a first update data receiving step of receiving update data for rewriting the flash memory; and (b2) the first update data receiving step of receiving the first update data reception step. A first sector determination step of determining a desired sector of the flash memory excluding the second boot sector and the first boot sector for writing update data; and (b3) the first sector determination step. A first update data writing step of writing the update data received by the first update data reception step to a desired sector of the flash memory determined by the sector determination step;
(B4) a first update determination data calculation step of calculating the boot data update determination data;
6. The method according to claim 5, further comprising the step of:
前記第2の書き換え工程(c)が、(c1)前記フラッシュメモリを書き換えるための更新データを受信する第2の更新データ受信工程と、(c2)前記第2の更新データ受信工程によって受信した前記更新データを書き込むための、前記第3のブートセクタおよび前記第1のブートセクタを除いた、前記フラッシュメモリの所望の前記セクタを判定する第2のセクタ判定工程と、(c3)前記第2のセクタ判定工程によって判定された前記フラッシュメモリの所望の前記セクタに、前記第2の更新データ受信工程によって受信した前記更新データを書き込む第2の更新データ書き込み工程と、
(c4)前記ブートデータ更新判定データを算出する第2の更新判定データ算出工程と、
を備えた請求項5または6に記載のフラッシュメモリのメモリ書き換え制御方法。
The second rewriting step (c) includes: (c1) a second update data receiving step of receiving update data for rewriting the flash memory; and (c2) a second update data receiving step of receiving the second update data reception step. A second sector determining step of determining a desired sector of the flash memory excluding the third boot sector and the first boot sector for writing update data; and (c3) the second sector determining step. A second update data writing step of writing the update data received by the second update data reception step to a desired sector of the flash memory determined by the sector determination step;
(C4) a second update determination data calculation step of calculating the boot data update determination data;
7. The method according to claim 5, further comprising the step of:
前記ブートデータ更新判定データが、前記フラッシュメモリに備えられている複数個の前記ブートセクタの前記ブートデータを書き換えた回数を通算したブート更新回数と、
前記ブートセクタに格納されている前記ブートデータの正当性を検証するための前記ブートセクタのチェックサムと、
を備えていることを特徴とする請求項5から7のいずれか1項に記載のフラッシュメモリのメモリ書き換え制御方法。
The boot data update determination data, the number of boot updates obtained by adding the number of times of rewriting the boot data of the plurality of boot sectors provided in the flash memory,
A checksum of the boot sector for verifying the validity of the boot data stored in the boot sector;
The method according to any one of claims 5 to 7, further comprising:
請求項5から8のいずれか1項に記載のフラッシュメモリのメモリ書き換え制御方法の各工程を実行させるプログラム。A program for executing each step of the flash memory memory rewriting control method according to any one of claims 5 to 8. 請求項5から8のいずれか1項に記載のフラッシュメモリのメモリ書き換え制御方法の各工程を実行させるプログラムを記録したコンピュータに読み取り可能な情報記録媒体。A computer-readable information recording medium storing a program for executing each step of the flash memory memory rewriting control method according to claim 5.
JP2002170633A 2002-06-11 2002-06-11 Memory rewrite control method and program for executing each step of memory rewrite control method Expired - Fee Related JP4062421B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2002170633A JP4062421B2 (en) 2002-06-11 2002-06-11 Memory rewrite control method and program for executing each step of memory rewrite control method
EP03011150A EP1372068A3 (en) 2002-06-11 2003-05-23 System, method and program for rewriting a flash memory
CN031424147A CN100407177C (en) 2002-06-11 2003-06-11 Flash memory rewriting control system and memory rewriting control method
KR10-2003-0037432A KR100507884B1 (en) 2002-06-11 2003-06-11 System for controlling rewrite in memory, method for controlling rewrite in memory, and information recording media for storing programs which excute each steps in method for controlling rewrite in memory
US10/460,459 US7383431B2 (en) 2002-06-11 2003-06-11 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

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002170633A JP4062421B2 (en) 2002-06-11 2002-06-11 Memory rewrite control method and program for executing each step of memory rewrite control method

Publications (2)

Publication Number Publication Date
JP2004013854A true JP2004013854A (en) 2004-01-15
JP4062421B2 JP4062421B2 (en) 2008-03-19

Family

ID=30436836

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002170633A Expired - Fee Related JP4062421B2 (en) 2002-06-11 2002-06-11 Memory rewrite control method and program for executing each step of memory rewrite control method

Country Status (1)

Country Link
JP (1) JP4062421B2 (en)

Also Published As

Publication number Publication date
JP4062421B2 (en) 2008-03-19

Similar Documents

Publication Publication Date Title
KR100507884B1 (en) System for controlling rewrite in memory, method for controlling rewrite in memory, and information recording media for storing programs which excute each steps in method for controlling rewrite in memory
JP5528782B2 (en) Nonvolatile memory recovery after a power failure
TWI515660B (en) Firmware variable update method
US6560703B1 (en) Redundant updatable self-booting firmware
ES2371995T3 (en) UPDATE OF THE FIRMWARE OF AN ELECTRONIC DEVICE.
KR20010072128A (en) Method and apparatus for updating a nonvolatile memory
JP4791061B2 (en) Firmware version management method and information processing apparatus for computer system
US8775758B2 (en) Memory device and method for performing a write-abort-safe firmware update
US7634648B2 (en) Data processing apparatus and control method for a data processing apparatus that temporarily provides a plurality of boot sectors in flash ROM
JP2010198252A (en) Non-volatile memory device, write-in method for nonvolatile memory, and nonvolatile memory write-in program
US8527733B2 (en) Memory system
JP6447469B2 (en) Rewriting system
JP2005157528A (en) Memory device
JP2006227830A (en) Information processing device and control method of information processing device
JP4238930B2 (en) Memory rewrite control system.
US7007036B2 (en) Method and apparatus for embedding configuration data
JP4062429B2 (en) Memory rewrite control method and program for executing each step of memory rewrite control method
JP6575157B2 (en) Firmware download method and firmware embedded device
EP4113288B1 (en) Systems and method for bootup activation of firmware images
JP4062421B2 (en) Memory rewrite control method and program for executing each step of memory rewrite control method
JP2004013536A (en) Flash memory rewrite control system, flash memory rewrite control method, program for executing each step of flash memory rewrite control method, and information recording medium
JP2002007152A (en) Download method and device
JP2014112419A (en) Mobile terminal apparatus, software update method, operation control method, and program
JP2001053891A (en) Method and apparatus for updating program in portable terminal device
JP2000163321A (en) Data processing method and apparatus and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070307

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070327

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070402

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070515

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20070528

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070531

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070627

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070822

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070919

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071108

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: 20071205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071218

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140111

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees