JP4062429B2 - Memory rewrite control method and program for executing each step of memory rewrite control method - Google Patents

Memory rewrite control method and program for executing each step of memory rewrite control method Download PDF

Info

Publication number
JP4062429B2
JP4062429B2 JP2002255270A JP2002255270A JP4062429B2 JP 4062429 B2 JP4062429 B2 JP 4062429B2 JP 2002255270 A JP2002255270 A JP 2002255270A JP 2002255270 A JP2002255270 A JP 2002255270A JP 4062429 B2 JP4062429 B2 JP 4062429B2
Authority
JP
Japan
Prior art keywords
boot
data
sector
update
rewriting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002255270A
Other languages
Japanese (ja)
Other versions
JP2004094628A (en
Inventor
豪 廣池
雄史 高見沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2002255270A priority Critical patent/JP4062429B2/en
Priority to EP03011150A priority patent/EP1372068A3/en
Priority to US10/460,459 priority patent/US7383431B2/en
Priority to KR10-2003-0037432A priority patent/KR100507884B1/en
Priority to CN031424147A priority patent/CN100407177C/en
Publication of JP2004094628A publication Critical patent/JP2004094628A/en
Application granted granted Critical
Publication of JP4062429B2 publication Critical patent/JP4062429B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、プリンタ、スキャナ等の装置におけるファームウェアのブートプログラムとメインプログラムが格納されているフラッシュメモリを書き換えるフラッシュメモリの書き換え制御システムにおけるメモリ書き換え制御方法及びメモリ書き換え制御方法の各工程をコンピュータに実行させるためのプログラムに関する。
【0002】
【従来の技術】
プリンタ、スキャナ等の装置においては、ファームウェアのブートプログラムとメインプログラムとが分離されて、フラッシュメモリに格納されている。例えば、プリンタの場合、プリンタの通常モード(ここでは、印字動作を行うモードをいう)を制御するプログラムであるメインプログラム及びフォントデータがメインセクタに格納されている。また、プリンタの起動処理を実行するプログラムと、プリンタのメモリ書き換えモード(ここでは、フラッシュメモリに格納されたプログラム等のデータの書き換えを行うモードをいう)を制御して、メインセクタに格納されているメインプログラム及びフォントデータ等の書き換え処理を実行するプログラムとがブートセクタに格納されている。ここで、セクタは、フラッシュメモリにおいて一括して消去可能な領域である。
【0003】
ブートセクタに格納されているデータ(ブートデータ)を書き換える場合、ブートデータは、自プログラムが格納されているセクタを書き換えることをソフト的に禁止していることから、3回のダウンロード処理が必要であった。
【0004】
図10は、従来の書き換え処理によるデータ遷移を説明する図である。フラッシュメモリの書き換え処理において、ブートセクタ以外のフラッシュメモリのセクタの書き換え処理はブートセクタに格納されているブートデータによって実行され、ブートセクタの書き換え処理は、新たにダウンロードしたブートリライトデータによって実行される。
【0005】
ブートデータにより、1回目のダウンロード処理にてブートリライトデータを取得し、メインセクタのデータを消去し、メインセクタに取得したブートリライトデータを書き込む(図10の(1))。
【0006】
次に、ブートリライトデータにより、2回目のダウンロード処理にて新ブートデータを取得し、ブートセクタのデータを消去し、ブートセクタに取得した新ブートデータを書き込む(図10の(2))。
【0007】
新ブートデータにより、3回目のダウンロード処理にて新メインデータを取得し、メインセクタのブートリライトデータを消去し、メインセクタに取得した新メインデータを書き込む(図10の(3))。
【0008】
【発明が解決しようとする課題】
上述したように、フラッシュメモリのブートセクタに格納されているデータの書き換え作業は、3回のダウンロード作業を実行しなければ完了しないことから、作業手順が煩雑であり、作業エラーが発生しやすいという問題点があった。また、書き換え作業にかかる時間も長時間となってしまうという問題点もあった。
【0009】
そこで、本発明は、以上のような問題点を解決するためになされたもので、装置を起動させる最低限の機能を実行させるブートデータを第1のブートセクタに、第1のブートセクタに格納されている以外の起動時の処理機能等とフラッシュメモリを書き換える機能を実行させるブートデータを第2のブートセクタ及び第3のブートセクタに格納し、第1のブートセクタの機能により第2または第3のブートセクタの機能のどちらを実行させるかを判定し、判定された第2または第3のブートセクタの機能により、判定された自身のブートセクタ以外の第1のブートセクタを含むフラッシュメモリのセクタのデータを書き換えるメモリ書き換え制御システムにおけるメモリ書き換え制御方法及びメモリ書き換え制御方法の各工程をコンピュータに実行させるためのプログラムを提供することを目的とする。
【0010】
【課題を解決するための手段】
【0011】
【0012】
【0013】
【0014】
本発明のメモリ書き換え制御方法は、中央処理装置と、起動ブートデータを格納する起動ブートセクタ起動ブートデータの起動の後に選択的に起動されるブートデータを格納する少なくとも2個のブートセクタ及び起動ブートデータ又は前記ブートデータの起動の後に起動されるメインデータを格納するメインセクタ有し、セクタ単位でデータ消去可能なフラッシュメモリからなるメモリ書き換え制御システムにおけるメモリ書き換え制御方法であって、中央処理装置が、(a)当該制御システムの起動時に、起動ブートデータを実行することによって当該制御システムのハードウェアの初期化を行う初期化工程と、当該制御システムの起動モードの判定を行なう起動モード判定工程と、起動モード判定工程によって判定された起動モードがフラッシュメモリのメモリ書き換えモードである場合に、ブートセクタのそれぞれに格納されたブートデータの中から、ブートセクタのそれぞれに格納されたブートデータ更新判定データに基づいて、起動ブートデータの後に起動すべきブートデータを選択するブートデータ判定工程と、を実行し(b)ブートデータ判定工程によって選択された前記ブートデータを実行することによって、フラッシュメモリの更新データをホスト装置から受信するための通信インタフェースの初期化を行う通信インタフェース初期化工程と、当該ブートデータが格納されたブートセクタを除く前記ブートセクタ、起動ブートセクタ及びメインセクタに格納されたデータを更新データにより書き換える書き換え工程と、を実行する、ことを特徴とする。
【0015】
また、書き換え工程は、フラッシュメモリに格納されたデータを書き換えるための更新データをホスト装置から受信する更新データ受信工程と、更新データ受信工程によって受信された更新データに基づいて、起動ブートセクタ、ブートセクタ及びメインセクタの中から更新データを格納すべきセクタを選択するセクタ判定工程と、セクタ判定工程によって選択されたセクタに、更新データ受信工程によって受信された更新データを書き込む更新データ書き込み工程と、セクタ判定工程によって選択されたセクタがブートセクタである場合に、ブートデータ更新判定データを算出し更新する更新判定データ算出工程と、を備えることが好ましい。
【0016】
また、ブートデータ更新判定データが、ブートセクタのブートデータを書き換えた回数を通算したブート更新回数と、ブートデータの正当性を検証するブートデータのチェックサムとを備えて構成されており、更新判定データ算出工程は、ブート更新回数とチェックサムとを算出しブートデータ更新判定データを更新することが好ましい。
【0017】
これらの場合において、書き換え工程は、更新データ受信工程によって受信された更新データが、フラッシュメモリの所定のアドレスに所定のデータ長を有する特定データを書き込む旨の所定の更新データであるか否かを判定し、更新データが所定の更新データである場合にのみ、ブートセクタ及びメインセクタのみを書き換え可能状態にする通常書き換えモードから起動ブートデータも書き換え可能状態にするブート書き換えモードに移行することが好ましい。
【0018】
本発明のプログラムは、上述の起動ブートデータと少なくとも2個のブートデータとからなることを特徴とする
【0019】
【0020】
【発明の実施の形態】
本発明の一実施態様を、図面を参照しながら説明する。なお、以下に説明する実施態様は説明のためのものであり、本発明の範囲を制限するものではない。従って、当業者であればこれらの各要素もしくは全要素をこれと均等なものによって置換した実施態様を採用することが可能であるが、これらの実施態様も本発明の範囲に含まれる。
【0021】
図1は、フラッシュメモリ書き換え制御システムのハードウェアの構成を示す図である。メモリ書き換え制御システム100は、一括して消去可能な最小単位の記憶領域であるセクタ毎に分割された書き換えが可能であるフラッシュメモリ101、読み書きが可能であるRAM102及びメモリ書き換え制御システム100の制御を実行するCPU103を備えている。
【0022】
フラッシュメモリ101は、装置の通常モードの制御を実行するメインプログラム、フォントデータ等を記憶し、更に、装置の起動処理を制御したり、フラッシュメモリ101に記憶されているデータを書き換えたりするブートプログラムを記憶している。以下、ブートプログラムが格納されるセクタを「ブートセクタ」、メインプログラム、フォントデータ等が格納されるセクタを「メインセクタ」という。また、ブートセクタに格納されているブートプログラムのデータを「ブートデータ」、メインセクタに格納されているメインプログラム、フォントデータ等のデータを「メインデータ」という。
【0023】
図2は、本発明のフラッシュメモリにおけるブートセクタの構成の一例を示す図である。以下、3個のセクタによって構成されたブートセクタを例に挙げて説明する。フラッシュメモリ101におけるブートセクタは第1のブートセクタ201、第2のブートセクタ202及び第3のブートセクタ203の3個のセクタから構成される。
【0024】
第1のブートセクタ201には、装置を起動するための最低限の機能を実行させるブートデータが格納されている。例えば、装置を起動させるための最低限の機能として、CPU103の初期化、スタックの初期化等の各種初期化、RAM102のチェック、ゲートアレイレジスタのチェック等の各種チェック、起動モードの判定等の各種判定等が挙げられる。以下、第1のブートセクタ201を「起動ブートセクタ」と呼ぶ。また、起動ブートセクタ201に格納されるブートデータを「起動ブートデータ」、起動ブートデータによって実行される処理を「起動ブート処理」と呼ぶ。
【0025】
第2のブートセクタ202には、装置を起動させるための最低限の機能以外の起動時における各種機能及びフラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるブートデータが格納されている。例えば、装置を起動させるための最低限の機能以外の起動時における機能として、通信インタフェースの種別判定、各通信インタフェースに対応した処理、各種ステータスコマンドに対応した処理等が挙げられる。起動ブート処理は、フラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるブートデータによって、第2のブートセクタ(自身のセクタ)202以外のフラッシュメモリ101に格納されたブートデータ及びメインデータを書き換える処理を実行させる。以下、第2のブートセクタ202を「WブートセクタA」、WブートセクタA202に格納されるWブートデータを「WブートデータA」、WブートデータAによって実行されるWブート処理を「Wブート処理A」と呼ぶ。
【0026】
第3のブートセクタ203には、装置を起動させるための最低限の機能以外の起動時における各種機能及びフラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるWブートデータAとほぼ同様のブートデータが格納されている。起動ブート処理は、フラッシュメモリ101に格納されたデータを書き換えるための機能を実行させるブートデータによって、第3のブートセクタ(自身のセクタ)203以外のフラッシュメモリ101に格納されたブートデータ及びメインデータを書き換える処理を実行させる。以下、第3のブートセクタ203を「WブートセクタB」、WブートセクタB203に格納されるWブートデータを「WブートデータB」、WブートデータBによって実行されるWブート処理を「Wブート処理B」と呼ぶ。
【0027】
即ち、Wブートセクタの一方のWブート処理により他方のWブートセクタを書き換えることによって、正常に動作する少なくとも1個のWブートセクタを保障することができる。
【0028】
また、Wブートセクタには、Wブートデータが正しく記憶されているかどうかを検証するためのチェックサム、Wブートセクタのデータ更新回数であるWブート更新回数及びWブートセクタを指定するWブートIDが格納されている。チェックサム及びWブート更新回数は、ブートデータ更新判定データとして利用される。即ち、起動ブート処理は、チェックサム及びWブート更新回数に基づいて、最新のWブートデータが格納されているWブートセクタを判定し、判定したWブートセクタに格納されているWブートデータによってWブート処理を実行させる。
【0029】
ところで、起動ブートセクタ201に格納されている起動ブートデータの書き換え作業には、書き換えエラーによって装置が起動不能状態になるという恐れがある。このため、通常は、起動ブートセクタを書き換え対象セクタとせずにWブートセクタ及びメインセクタのみを書き換え対象セクタとすることにより、起動ブートデータを保護している(以下、通常書き換えモードと呼ぶ)。しかし、ファームウェアバグが発見された場合のバグ修正や、起動ブートデータのバージョンアップ等、起動ブートデータの書き換えが必要な場合がある。そのため、メモリ書き換え制御システム100は、Wブートセクタ及びメインセクタに加えて、起動ブートセクタも書き換え対象セクタとするブート書き換えモードを有している。
【0030】
メモリ書き換え制御システム100は、ホスト装置から送信されるフラッシュメモリ101に格納されたデータを書き換えるための更新データの中に、フラッシュメモリ101の所定のアドレスに所定のデータ長を有する特定データを書き込む旨のデータを検出した場合にブート書き換えモードに移行する。所定のアドレス及び特定データは、予め任意に決定したものであればよく、本実施形態においては、特定データを、データ長が7バイトのキャラクタコード“REWRITE”とし、所定のアドレスを、実行中のWブートセクタがWブートセクタA202の場合には0xF1FFE0番地、実行中のWブートセクタがWブートセクタB203の場合には0xF0FFE0番地としている。なお、上記2つのアドレスのそれぞれを、特定データを書き込む所定のアドレスとして1つの更新データ中に含めることができる。この場合には、実行中のWブートセクタが何れであっても、ブート書き換えモードに移行させることが可能となる。
【0031】
図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を備えている。
【0032】
ブートデータ判定部301は、図2の起動ブートセクタ201の起動ブート処理の機能であり、WブートセクタA202のWブート処理AまたはWブートセクタB203のWブート処理Bのどちらの処理を実行させるかを、ブートデータ更新判定データであるWブートセクタに格納されているチェックサムが正しいか否かを検証し、Wブート更新回数が最大のものであるかを検証することにより判定する。
【0033】
第1の書き換え部302は、図2のWブートセクタA202のWブート処理Aの機能であり、WブートセクタA202を除くフラッシュメモリ101を構成するセクタを書き換える。即ち、起動ブートセクタ201に格納された起動ブートデータ、WブートセクタB203に格納されたWブートデータB、メインセクタに格納されたメインデータは、第1の書き換え部302によって書き換え可能である。
【0034】
第1の更新データ受信部321は、所定の通信インタフェースを利用してホスト装置から更新データを受信する。更新データは、所定のフォーマットに従って、所定のサイズのデータを受信データ単位(レコード単位)として送受信される。第1のセクタ判定部322は、第1の更新データ受信部321によって受信した更新データを格納するフラッシュメモリ101のセクタがどこのセクタであるかを判定し、WブートセクタA202である場合は、更新データによる書き換えを実行しないようにする。また、受信した更新データを解析してブート書き換えモードに移行するか否かを判定し、そのモードに移行しない場合であって更新データを格納すべきセクタが起動ブートセクタ201である場合は、更新データによる書き換えを実行しないようにする。
【0035】
第1の更新データ書き込み部323は、第1のセクタ判定部322の判定結果に基づいて、更新データをフラッシュメモリ101の指定されたセクタに書き込む。第1の更新判定データ算出部324は、書き換えられたフラッシュメモリ101のWブートセクタB203のチェックサム及びメインセクタのチェックサムを算出し、WブートセクタA202のWブート更新回数に基づいて、WブートセクタB203のWブート更新回数を算出して、それぞれ更新する。
【0036】
第2の書き換え部303は、図2のWブートセクタB203のWブート処理Bの機能であり、WブートセクタB203を除くフラッシュメモリ101を構成するセクタを書き換える。即ち、起動ブートセクタ201に格納された起動ブートデータ、WブートセクタA202に格納されたWブートデータA、メインセクタに格納されたメインデータは、第2の書き換え部303によって書き換え可能である。
【0037】
第2の更新データ受信部331は、所定の通信インタフェースを利用してホスト装置からの更新データをレコード単位で受信する。第2のセクタ判定部332は、第2の更新データ受信部331によって受信した更新データを格納するフラッシュメモリ101のセクタがどこのセクタであるかを判定し、WブートセクタB203である場合は、更新データによる書き換えを実行しないようにする。また、受信した更新データを解析して、ブート書き換えモードに移行するか否かを判定し、そのモードに移行しない場合であって更新データを格納すべきセクタが起動ブートセクタ201である場合は、更新データによる書き換えを実行しないようにする。
【0038】
第2の更新データ書き込み部333は、第2のセクタ判定部332の判定結果に基づいて、更新データをフラッシュメモリ101の指定されたセクタに書き込む。第2の更新判定データ算出部334は、書き換えられたフラッシュメモリ101のWブートセクタA202のチェックサム及びメインセクタのチェックサムを算出し、WブートセクタB203のWブート更新回数に基づいて、WブートセクタA202のWブート更新回数を算出して、それぞれ更新する。
【0039】
図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」とする。
【0040】
起動ブート処理によって実行される最新のWブート処理がWブート処理AであるかWブート処理Bであるかを、WブートセクタA202及びWブートセクタB203における各Wブートセクタ領域のチェックサム及びWブート更新回数に基づいて判定する。WブートセクタA202及びWブートセクタB203のチェックサムがともに正常である場合は、Wブート更新回数の大きいWブートセクタのWブート処理を実行させる。また、WブートセクタA202及びWブートセクタB203のチェックサムの一方が正常である場合は、正常であるチェックサムのWブートセクタのWブート処理を実行させる。
【0041】
実行中のWブートセクタのWブート処理により非実行中のWブートセクタのWブートデータを書き換え、Wブート更新回数を更新する。例えば、図に示すように1回目のWブートセクタの書き換えの場合、即ち、1回目の書き込みの場合、実行されているWブート処理は、Wブート処理Aである。従って、書き換えられるWブートセクタは、WブートセクタB203となる。即ち、Wブート処理AによりWブートセクタB203のWブートデータBが更新される。
【0042】
また、WブートセクタB203のWブート更新回数は、WブートセクタA202のWブート更新回数に1を加えた回数になる。即ち、更新されたWブートセクタのWブート更新回数の方が、実行中のWブートセクタのWブート更新回数よりも大きくなる。尚、図に示すように、例外として、更新回数がFFFFh回である場合、次の更新回数は0回となる。即ち、Wブート更新回数は、10000h回書き込むと出荷時の状態に戻る。
【0043】
図5は、ブート処理の手順の一例を示す図である。起動ブートセクタ201の起動ブート処理、WブートセクタA202のWブート処理A及びWブートセクタB203のWブート処理Bによる処理手順の一例を示す。まず、装置の電源が投入されると、CPU103の初期化、スタックの初期化等の各種初期化、RAM102のチェック、ゲートアレイレジスタのチェック等の各種チェック、起動モードの判定等の各種判定等を実行する(S501)。
【0044】
次に、装置が備えるディップスイッチの状態を検出してメモリ書き換えモードであるか否かを判定し(S502)、メモリ書き換えモードではない場合、即ち通常モードである場合(S502;No)は、メインセクタのチェックサムを検証し(S512)、チェックサムが正常であるか否か、即ち、メインセクタのデータが正常であるか否かを判定する(S513)。チェックサムが異常である場合(S513;No)は、エラー表示等のエラー処理を実行する(S515)。一方、チェックサムが正常である場合(S513;Yes)は、メインプログラムの各種処理を実行する(S514)。
【0045】
メモリ書き換えモードである場合(S502;Yes)は、WブートセクタA202のチェックサム及びWブートセクタB203のチェックサムを検証する(S503)。WブートセクタA202及びWブートセクタB203のチェックサムがともに異常であるか否かを判定し(S504)、WブートセクタA202及びWブートセクタB203のチェックサムがともに異常である場合(S504;Yes)は、エラー表示等のエラー処理を実行する(S505)。
【0046】
一方、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)。
【0047】
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)。
【0048】
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)。
【0049】
また、通常モードからメモリ書き換えモードへ移行する場合は、メモリ書き換えモード移行コマンドを受信することにより(S516)、ステップS503へ移行し、フラッシュメモリの書き換えが実行される。
【0050】
図6は、ブート書き換えモードへの移行判定処理の手順の一例を示す図である。本処理は、通常書き換えモードからブート書き換えモードへ移行するか否かを判定する処理であって、図4に示すメモリ書き換え処理(S509、S510)の中で行われる。
【0051】
まず、受信した更新データをレコード単位で解析し、指定されたアドレスが所定のアドレス(本例では、0xF1FFE0番地、0xF0FFE0番地)であるか否かを判定する(S601)。指定アドレスが所定アドレスである場合(S601;Yes)は、指定されたデータのデータ長が所定のデータ長(本例では7バイトで)であるか否かを判定する(S602)。データ長が所定データ長である場合(S521;Yes)は、指定されたデータの内容が特定データ(本例ではキャラクタコード“REWRITE”)であるか否かを判定する(S603)。指定データの内容が特定データである場合(S603;Yes)は、正常に受信したことを通知するための正常受信ステータスデータをホスト装置に送信し(S604)、フラッシュメモリ101の書き換え対象セクタに起動ブートセクタ201を追加するフラグをセットして(S605)、受信したレコードを読み捨てる(S606)。
【0052】
また、指定アドレスが所定アドレスではない場合(S601;No)、データ長が所定データ長ではない場合(S602;No)及びデータの内容が特定データではない場合(S603;No)には、書き換え対象セクタに起動ブートセクタ201を追加するフラグをセットすることなく本判定処理を終了する。この場合、通常書き換えモードのままとなる。
【0053】
図7は、Wブート処理AまたはWブート処理Bによるフラッシュメモリ書き換え処理の手順の一例を示す図である。まず、フラッシュメモリ101を書き換えるための更新データをホスト装置から受信するための通信インタフェースの判別及び各種初期化を実行し(S701)、実行中のWブートセクタのWブート処理を認識するためにWブートIDを取得する(S702)。
【0054】
次に、更新データをレコード単位に受信する(S703)。以下、受信したレコード単位の更新データを「受信レコードデータ」と呼ぶ。そして、受信レコードデータが、所定のアドレスに特定のデータを書き込む旨のデータであるか否かを判定し、その判定結果に基づいてブート書き換えモードに移行するか通常書き換えモードのままでいるかを決定する(S704;図6のブート書き換えモード移行判定処理)。次に、受信レコードデータが終了レコードであるか否か、即ち更新データの受信が終了であるか否かを判定する(S705)。
【0055】
受信レコードデータが終了レコードではない場合(S705;No)は、受信レコードデータが格納すべきフラッシュメモリのセクタの更新データであるか否か判定する(S706)。受信レコードデータには、格納開始アドレスが格納されており、この格納開始アドレスに基づいて、格納すべきフラッシュメモリのセクタが判定される。また、書き換えられるセクタは、通常書き換えモードでは起動ブートセクタおよび実行中のWブートセクタ以外のセクタ、ブート書き換えモードでは実行中のWブートセクタ以外のセクタである。
【0056】
受信レコードデータが格納すべきフラッシュメモリのセクタの更新データである場合(S706;Yes)は、受信レコードデータの書き込み処理を実行し(S707)、正常に受信したことを通知するための正常受信ステータスをホスト装置に送信し(S708)、ステップS603に戻り、次の更新データであるレコードデータを受信する。一方、受信レコードデータが格納すべきフラッシュメモリのセクタの更新データではない場合(S706;No)は、ステップS603に戻り、次の更新データであるレコードデータを受信する。
【0057】
受信レコードデータが終了レコードである場合(S705;Yes)は、受信レコードデータの書き込み処理が行なわれたメインセクタ及び/又は非実行中のWブートセクタのチェックサムをそれぞれ算出して書き込み(S709)、メモリ書き換えモードにおける所定の終了処理を実行し(S710)、最後にCPUのリセット処理を実行する(S711)。なお、ステップS704においてブート書き換えモードに移行した場合、起動ブートセクタ201を書き換え対象セクタとするためにセットされたフラグは、ステップS710の終了処理によってリセットされる。
【0058】
ここで、ホスト装置から送信される更新データは、各セクタ毎に、即ち起動ブートセクタ201、Wブートセクタ202、203及びメインセクタ毎に、構成されたものであってもよいし、任意の複数のセクタの更新データを統括したものであってもよい。
【0059】
図8は、フラッシュメモリの書き換え範囲を示す図である。図8(a)は、Wブート処理Aが実行されている場合のフラッシュメモリの書き換え範囲を示す図であり、図8(b)は、Wブート処理Bが実行されている場合のフラッシュメモリの書き換え範囲を示す図である。図に示すように、以下に示す3項目のデータ以外のデータを受信レコードデータに基づいて書き換える。
・実行中のWブートセクタのWブートデータ:Wブート処理Aが実行中の場合は、WブートデータAであり、Wブート処理Bが実行中の場合は、WブートデータBである。
・非実行中のWブートセクタのチェックサム:Wブート処理Aが実行中の場合は、WブートセクタB203のチェックサムであり、Wブート処理Bが実行中の場合は、WブートセクタA202のチェックサムである。
・メインセクタのチェックサム:メインセクタ全領域のチェックサムである。
なお、上述したとおり、通常書き換えモードの場合には、起動ブートデータも書き換え範囲に含まれない。
【0060】
フラッシュメモリ101のデータ書き換え方法には様々な方法がある。例えば、以下に説明する書き換え方法を利用して実行することができる。
【0061】
第1の書き換え方法は、フラッシュメモリ101を構成する全てのセクタにおいて、セクタ全域の更新データをレコードデータとして順次受信する場合である。ここで、未使用領域のレコードデータは0xffとして受信する。受信レコードデータが書き換え対象となるセクタ(更新対象セクタ)の初めての更新データである場合に、更新対象セクタのデータを消去し、所定の格納開始アドレスに基づいて受信レコードデータを更新対象セクタに書き込む。受信レコードデータが更新対象セクタの初めての更新データではない場合は、所定の格納開始アドレスに基づいて受信レコードデータを更新対象セクタに書き込む。
【0062】
第2の書き換え方法は、Wブートセクタのデータにおいては、データが存在する部分の更新データを受信しセクタ全域を書き換え、Wブートセクタ以外のセクタにおいては、更新すべきデータのみを受信し、その受信レコードデータの部分のみを書き換える場合である。Wブートセクタが更新対象セクタである場合は、受信レコードデータが更新対象セクタの初めての更新データである場合に、更新対象セクタのデータをRAM上に複写し、更新対象セクタのデータを消去する。RAM上のセクタイメージにデータが存在する部分の全ての受信レコードデータを書き込み、書き込まれたRAM上のセクタイメージを更新対象セクタに書き戻す。Wブートセクタ以外のセクタが更新対象セクタである場合は、更新対象セクタのデータをRAM上に複写し、更新すべき部分の受信レコードデータを書き込み、更新対象セクタのデータを消去し、書き込まれたRAM上のセクタイメージを更新対象セクタに書き戻す。
【0063】
第3の書き換え方法は、フラッシュメモリ101の構成する全てのセクタにおいて、更新すべきデータのみを受信し、その受信レコードデータの部分のみを書き換える場合である。更新対象セクタのデータをRAM上に複写し、更新すべき部分の受信レコードデータを書き込み、更新対象セクタのデータを消去し、書き込まれたRAM上のセクタイメージを更新対象セクタに書き戻す。
【0064】
図9は、Wブートセクタの書き換え方法の詳細を示す図である。図9(a)は、Wブート処理Aが実行されている場合のWブートセクタの書き換え方法を示す図であり、図9(b)は、Wブート処理Bが実行されている場合のWブートセクタの書き換え方法を示す図である。例えば、図9(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の所定の領域に書き込む。また、図9(b)に示すように、Wブート処理Bが実行されている場合も、Wブート処理Aが実行されている場合と同様である。即ち、WブートセクタA202のWブートデータAは、受信レコードデータに基づいて書き換えられ、WブートセクタA202のWブート更新回数とWブートセクタA202のチェックサムは、算出した値が書き込まれる。
【0065】
既に正常に機能しているブート処理に新しい機能を追加する場合に、追加される機能についてのブートデータをWブートデータとしてWブートセクタに書き込むことにより、ブートデータの書き換え作業における、書き換えエラーによる装置の起動不能状態を回避することができる。
【0066】
本発明は、Wブートセクタが3個以上ある場合にも適用可能であって、起動ブートセクタに格納された起動ブートデータを、チェックサム及びブート更新回数に基づいて複数のWブートセクタの中から実行すべきWブートセクタを判定し実行させるよう構成することができる。
【0067】
また、本発明のプログラムは、上述した起動ブートデータと少なくとも2個のブートデータとからなるプログラムである。
【0068】
【発明の効果】
以上説明したように、本発明によれば、起動ブートセクタと、少なくとも2個のブートセクタとをフラッシュメモリに設け、起動ブートセクタには、装置を起動させるための最低限の機能を実現させる起動ブートデータを格納し、少なくとも2個のブートセクタのそれぞれには、自身のブートセクタを除くフラッシュメモリの起動ブートセクタを含む他のセクタを書き換える機能と起動ブートデータが有する以外の起動時の処理機能等を実現させるブートデータを格納することにより、ブートセクタの書き換え処理異常による装置の起動不能状態を回避することができる。
【0069】
また、起動ブートデータの書き換えが必要な場合には、所定のアドレスに特定データを書き込む旨のデータを更新データに含めて送信することにより、ブートセクタ及びメインセクタのみを書き換え可能状態にする通常書き換えモードから起動ブートデータも書き換え可能状態にするブート書き換えモードに移行するようにし、起動ブートデータの書き換えを容易に行うことができる。即ち、起動ブートデータを書き換える場合であっても、特別の書き換えプログラム等を用意する必要がなく、Wブートデータやメインデータと同様の作業手順で書き換えることができる。
【0070】
また、1回のダウンロード作業のみで起動ブートデータ、Wブートデータ及びメインデータを書き換えることができることから、作業手順が簡素化され、作業エラーの発生を削減することができる。更に、書き換え作業の時間を削減することができる。
【図面の簡単な説明】
【図1】 メモリ書き換え制御システムのハードウェアの構成を示す図である。
【図2】 本発明のフラッシュメモリにおけるブートセクタの構成を示す図である。
【図3】 メモリ書き換え制御システムの構成の一例を示すブロック図である。
【図4】 2個のWブートセクタによるWブートデータの書き換え順序を示す図である。
【図5】 ブート処理の手順を示す図である。
【図6】 ブート書き換えモードへの移行判定処理の手順を示す図である。
【図7】 Wブート処理AまたはWブート処理Bによるフラッシュメモリ書き換え処理の手順を示す図である。
【図8】 (a)は、Wブート処理Aが実行されている場合のフラッシュメモリの書き換え範囲を示す図であり、
(b)は、Wブート処理Bが実行されている場合のフラッシュメモリの書き換え範囲を示す図である。
【図9】 (a)は、Wブート処理Aが実行されている場合のWブートセクタの書き換え方法を示す図であり、
(b)は、Wブート処理Bが実行されている場合のWブートセクタの書き換え方法を示す図である。
【図10】 従来の書き換え処理によるデータ遷移を説明する図である。
【符号の説明】
100 メモリ書き換え制御システム
101 フラッシュメモリ
102 RAM
103 CPU
201 起動ブートセクタ
202 WブートセクタA
203 WブートセクタB
301 ブートデータ判定部
302 第1の書き換え部
303 第2の書き換え部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a flash memory rewrite control system for rewriting a flash memory in which a firmware boot program and a main program are stored in an apparatus such as a printer or a scanner. In The present invention relates to a memory rewrite control method and a program for causing a computer to execute each step of the memory rewrite control method.
[0002]
[Prior art]
In apparatuses such as printers and scanners, a firmware boot program and a main program are separated and stored in a flash memory. For example, in the case of a printer, a main program and font data, which are programs for controlling the normal mode of the printer (here, a mode for performing a printing operation), are stored in the main sector. It also controls the program that executes the printer startup process and the memory rewrite mode of the printer (here, the mode that rewrites data such as the program stored in the flash memory) and stores it in the main sector. The main program and the program for executing rewriting processing such as font data are stored in the boot sector. Here, the sector is an area that can be erased collectively in the flash memory.
[0003]
When rewriting the data (boot data) stored in the boot sector, the boot data is software-inhibited from rewriting the sector where the program is stored, so three downloads are required. there were.
[0004]
FIG. 10 is a diagram for explaining data transition by a conventional rewriting process. In the flash memory rewriting process, the flash memory sector rewriting process other than the boot sector is executed by the boot data stored in the boot sector, and the boot sector rewriting process is executed by the newly downloaded boot rewrite data. .
[0005]
With the boot data, the boot rewrite data is acquired in the first download process, the main sector data is erased, and the acquired boot rewrite data is written into the main sector ((1) in FIG. 10).
[0006]
Next, using the boot rewrite data, new boot data is acquired in the second download process, the boot sector data is erased, and the acquired new boot data is written in the boot sector ((2) in FIG. 10).
[0007]
With the new boot data, new main data is acquired in the third download process, the boot rewrite data of the main sector is erased, and the acquired new main data is written into the main sector ((3) in FIG. 10).
[0008]
[Problems to be solved by the invention]
As described above, the rewriting work of the data stored in the boot sector of the flash memory is not completed unless the download process is executed three times, so that the work procedure is complicated and work errors are likely to occur. There was a problem. There is also a problem that the time required for the rewriting work becomes long.
[0009]
Therefore, the present invention has been made to solve the above-described problems, and stores boot data for executing a minimum function for starting the apparatus in the first boot sector and in the first boot sector. Boot data for executing a processing function at start-up other than the above and a function for rewriting the flash memory are stored in the second boot sector and the third boot sector, and the second or second boot sector functions according to the function of the first boot sector. Of the flash memory including the first boot sector other than its own boot sector according to the function of the determined second or third boot sector. Memory rewrite control system for rewriting sector data In An object is to provide a program for causing a computer to execute each step of the memory rewrite control method and the memory rewrite control method.
[0010]
[Means for Solving the Problems]
[0011]
[0012]
[0013]
[0014]
The memory rewrite control method of the present invention includes: A central processing unit; Startup boot sector that stores startup boot data , At least two boot sectors that store boot data that is selectively activated after activation of the boot data as well as Main sector for storing boot data or main data to be booted after boot data is booted The Flash memory that can be erased in units of sectors When A memory rewrite control method in a memory rewrite control system comprising: a central processing unit: (A) At startup of the control system, Boot data By running , Concerned An initialization process for initializing the hardware of the control system; Concerned A boot mode determination process for determining the boot mode of the control system, and the boot data stored in each of the boot sectors when the boot mode determined by the boot mode determination process is the memory rewrite mode of the flash memory A boot data determination step of selecting boot data to be started after the startup boot data based on the boot data update determination data stored in each of the boot sectors; Run , (B) The boot data selected by the boot data determination step By running A communication interface initialization step for initializing a communication interface for receiving flash memory update data from the host device; Concerned A rewriting step of rewriting the data stored in the boot sector, the boot boot sector, and the main sector excluding the boot sector in which the boot data is stored with update data; Run the It is characterized by that.
[0015]
The rewriting process includes an update data receiving process for receiving update data for rewriting data stored in the flash memory from the host device, and an activation boot sector, a boot based on the update data received by the update data receiving process. A sector determination step of selecting a sector in which update data is to be stored from the sector and the main sector, an update data writing step of writing the update data received by the update data reception step into the sector selected by the sector determination step, It is preferable to include an update determination data calculation step of calculating and updating boot data update determination data when the sector selected in the sector determination step is a boot sector.
[0016]
The boot data update determination data includes a boot update count obtained by adding up the number of times the boot sector boot data has been rewritten, and a boot data checksum for verifying the validity of the boot data. In the data calculation step, it is preferable to calculate the boot update count and the checksum to update the boot data update determination data.
[0017]
In these cases, the rewriting step determines whether or not the update data received by the update data receiving step is predetermined update data for writing specific data having a predetermined data length at a predetermined address of the flash memory. It is preferable to shift from the normal rewrite mode in which only the boot sector and the main sector are in a rewritable state to the boot rewrite mode in which the boot boot data is also in a rewritable state only when the update data is predetermined update data. .
[0018]
Of the present invention A program is characterized by comprising the above-described startup boot data and at least two pieces of boot data .
[0019]
[0020]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to the drawings. In addition, the embodiment described below is for explanation, and does not limit the scope of the present invention. Accordingly, those skilled in the art can employ embodiments in which each or all of these elements are replaced by equivalents thereof, and these embodiments are also included in the scope of the present invention.
[0021]
FIG. 1 is a diagram showing a hardware configuration of a flash memory rewrite control system. The memory rewrite control system 100 controls the flash memory 101 that can be rewritten for each sector, which is a minimum storage area that can be erased collectively, the RAM 102 that can be read and written, and the memory rewrite control system 100. A CPU 103 is provided for execution.
[0022]
The flash memory 101 stores a main program for controlling the normal mode of the apparatus, font data, and the like, and further controls a boot process of the apparatus and rewrites data stored in the flash memory 101. Is remembered. Hereinafter, the sector in which the boot program is stored is referred to as “boot sector”, and the sector in which the main program, font data, and the like are stored is referred to as “main sector”. The boot program data stored in the boot sector is referred to as “boot data”, and the main program and font data stored in the main sector are referred to as “main data”.
[0023]
FIG. 2 is a diagram showing an example of the configuration of the boot sector in the flash memory of the present invention. Hereinafter, a boot sector composed of three sectors will be described as an example. The boot sector in the flash memory 101 includes three sectors, a first boot sector 201, a second boot sector 202, and a third boot sector 203.
[0024]
The first boot sector 201 stores boot data for executing a minimum function for starting the apparatus. For example, as a minimum function for starting the device, various initializations such as initialization of the CPU 103, initialization of the stack, etc., checking of the RAM 102, checking of the gate array register, etc., determination of the startup mode, etc. Judgment etc. are mentioned. Hereinafter, the first boot sector 201 is referred to as a “startup boot sector”. The boot data stored in the boot boot sector 201 is referred to as “boot boot data”, and the process executed by the boot boot data is referred to as “boot boot process”.
[0025]
The second boot sector 202 stores boot data for executing various functions at the time of start-up other than the minimum function for starting the apparatus and a function for rewriting data stored in the flash memory 101. . For example, functions at the time of activation other than the minimum function for activating the apparatus include communication interface type determination, processing corresponding to each communication interface, processing corresponding to various status commands, and the like. In the boot process, the boot data and the main data stored in the flash memory 101 other than the second boot sector (own sector) 202 are boot data for executing a function for rewriting the data stored in the flash memory 101. Execute the process of rewriting. Hereinafter, the second boot sector 202 is designated as “W boot sector A”, the W boot data stored in the W boot sector A 202 is designated as “W boot data A”, and the W boot processing executed by the W boot data A is designated as “W boot Called “Process A”.
[0026]
The third boot sector 203 is almost the same as the W boot data A for executing various functions at the time of startup other than the minimum function for starting the apparatus and the function for rewriting data stored in the flash memory 101. Boot data is stored. In the boot process, the boot data and main data stored in the flash memory 101 other than the third boot sector (own sector) 203 are boot data for executing a function for rewriting the data stored in the flash memory 101. Execute the process of rewriting. Hereinafter, the third boot sector 203 is “W boot sector B”, the W boot data stored in the W boot sector B 203 is “W boot data B”, and the W boot process executed by the W boot data B is “W boot”. Called “Process B”.
[0027]
That is, by rewriting one W boot sector by the other W boot process, it is possible to guarantee at least one W boot sector that operates normally.
[0028]
The W boot sector has a checksum for verifying whether or not the W boot data is correctly stored, a W boot update count that is the data update count of the W boot sector, and a W boot ID that designates the W boot sector. Stored. The checksum and the W boot update count are used as boot data update determination data. In other words, the startup boot process determines the W boot sector in which the latest W boot data is stored based on the checksum and the number of W boot updates, and uses the W boot data stored in the determined W boot sector. Run the boot process.
[0029]
By the way, in the rewriting work of the booting boot data stored in the booting boot sector 201, there is a risk that the device becomes unable to start due to a rewriting error. For this reason, normally, the boot boot data is protected by setting only the W boot sector and the main sector as the rewrite target sector without using the boot boot sector as the rewrite target sector (hereinafter referred to as a normal rewrite mode). However, there are cases where it is necessary to rewrite the boot boot data, such as bug correction when a firmware bug is found, or upgrade of the boot boot data. For this reason, the memory rewrite control system 100 has a boot rewrite mode in which the boot boot sector is a rewrite target sector in addition to the W boot sector and the main sector.
[0030]
The memory rewrite control system 100 writes specific data having a predetermined data length at a predetermined address of the flash memory 101 in update data for rewriting data stored in the flash memory 101 transmitted from the host device. When boot data is detected, the boot rewrite mode is entered. The predetermined address and the specific data may be arbitrarily determined in advance. In this embodiment, the specific data is a character code “REWRITE” having a data length of 7 bytes, and the predetermined address is When the W boot sector is the W boot sector A 202, the address is 0xF1FFE0, and when the W boot sector being executed is the W boot sector B203, the address is 0xF0FFE0. Each of the two addresses can be included in one update data as a predetermined address for writing specific data. In this case, it is possible to shift to the boot rewrite mode regardless of the W boot sector being executed.
[0031]
FIG. 3 is a block diagram showing an example of the configuration of a flash memory memory rewrite control system. 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 determining unit 322, a first update data writing unit 323, and a first update determining data calculating unit 324, and The rewriting unit 303 includes a second update data reception unit 331, a second sector determination unit 332, a second update data write unit 333, and a second update determination data calculation unit 334.
[0032]
The boot data determination unit 301 is a function of the boot 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 by verifying whether the checksum stored in the W boot sector, which is the boot data update determination data, is correct, and verifying whether the W boot update count is the maximum.
[0033]
The first rewriting unit 302 is a function of the W boot process A of the W boot sector A 202 in FIG. 2, and rewrites sectors constituting the flash memory 101 excluding the W boot sector A 202. In other words, the first boot unit 302 can rewrite the boot boot data stored in the boot boot sector 201, the W boot data B stored in the W boot sector B 203, and the main data stored in the main sector.
[0034]
The first update data receiving unit 321 receives update data from the host device using a predetermined communication interface. The update data is transmitted and received in units of received data (record units) according to a predetermined format. The first sector determination unit 322 determines which sector of the flash memory 101 that stores the update data received by the first update data reception unit 321 is the W boot sector A202. Do not execute rewrite with update data. Further, the received update data is analyzed to determine whether or not to shift to the boot rewrite mode. If the mode is not shifted to the mode and the sector to store the update data is the boot boot sector 201, the update is performed. Avoid rewriting data.
[0035]
The first update data writing unit 323 writes the update data to the designated sector of the flash memory 101 based on the determination result of the first sector determination unit 322. The first update determination data calculation unit 324 calculates the checksum of the W boot sector B203 and the main sector of the rewritten flash memory 101, and calculates the W boot based on the W boot update count of the W boot sector A202. The number of W boot updates for sector B203 is calculated and updated.
[0036]
The second rewriting unit 303 is a function of the W boot process B of the W boot sector B 203 in FIG. 2, and rewrites sectors constituting the flash memory 101 excluding the W boot sector B 203. In other words, the start boot data stored in the start boot sector 201, the W boot data A stored in the W boot sector A 202, and the main data stored in the main sector can be rewritten by the second rewriting unit 303.
[0037]
The second update data receiving unit 331 receives update data from the host device in units of records using a predetermined communication interface. The second sector determination unit 332 determines which sector of the flash memory 101 that stores the update data received by the second update data reception unit 331 is, and if the sector is the W boot sector B203, Do not execute rewrite with update data. Further, the received update data is analyzed to determine whether or not to shift to the boot rewrite mode. When the mode is not shifted to the mode and the sector to store the update data is the boot boot sector 201, Do not execute rewrite with update data.
[0038]
The second update data writing unit 333 writes the update data in the designated sector of the flash memory 101 based on the determination result of the second sector determination unit 332. The second update determination data calculation unit 334 calculates the checksum of the W boot sector A202 and the main sector of the rewritten flash memory 101, and calculates the W boot based on the number of W boot updates of the W boot sector B203. The number of W boot updates for sector A202 is calculated and updated.
[0039]
FIG. 4 is a diagram showing a rewrite order of 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. As for the number of times of updating the W boot, “1” is stored in one W boot sector and “0” is stored in the other W boot sector. In this embodiment, the W boot update count of the W boot sector A 202 is “1”, and the W boot update count of the W boot sector B 203 is “0”.
[0040]
Whether the latest W boot process executed by the boot process is the W boot process A or the W boot process B, checksum and W boot of each W boot sector area in the W boot sector A 202 and the W boot sector B 203 Determine based on the number of updates. When 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 the large number of W boot updates is executed. If one of the checksums of the W boot sector A 202 and the W boot sector B 203 is normal, the W boot process for the W boot sector having the normal check sum is executed.
[0041]
The W boot data of the non-executed 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 rewrite of the W boot sector, that is, in the case of the first write, the W boot process being executed is the W boot process A. Therefore, the W boot sector to be rewritten is the W boot sector B203. That is, the W boot data A of the W boot sector B 203 is updated by the W boot process A.
[0042]
The number of times of W boot update of the W boot sector B 203 is the number obtained by adding 1 to the number of times of W boot update of the W boot sector A 202. That is, the number of times of W boot update of the updated W boot sector is larger than the number of times of W boot update of the W boot sector being executed. As shown in the figure, as an exception, when the number of updates is FFFFh, the next number of updates is 0. That is, when the W boot update count is written 10,000 h times, it returns to the state at the time of shipment.
[0043]
FIG. 5 is a diagram illustrating an example of a boot processing procedure. An example of a processing procedure by the startup boot process of the startup boot sector 201, the W boot process A of the W boot sector A 202, and the W boot process B of the W boot sector B 203 will be described. First, when the power of the device is turned on, various initializations such as initialization of the CPU 103, initialization of the stack, etc., checking of the RAM 102, checking of the gate array register, etc., various determinations such as determination of the start mode, etc. Execute (S501).
[0044]
Next, the state of the dip switch provided in the apparatus is detected to determine whether or not the memory rewrite mode is set (S502). If the memory rewrite mode is not set, that is, the normal mode (S502; No), The checksum of the sector is verified (S512), and it is determined whether or not the checksum is normal, that is, whether or not the data of the main sector is normal (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).
[0045]
When the memory rewrite mode is selected (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 or not the checksums of the W boot sector A202 and the W boot sector B203 are both abnormal (S504), and when the checksums of the W boot sector A202 and the W boot sector B203 are both abnormal (S504; Yes) Executes error processing such as error display (S505).
[0046]
On the other hand, if 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 or not the check sums of the W boot sector A 202 and the W boot sector B 203 are both normal. (S506) When the checksums of the W boot sector A202 and the W boot sector B203 are both normal (S506; Yes), the W boot update count of the W boot sector A202 and the W boot update count of the W boot sector B203 are acquired. Then, it is determined whether or not the W boot update count of the W boot sector A202 is larger than the W boot update count of the W boot sector B203 (S508).
[0047]
When the W boot update count of the W boot sector A202 is larger than the W boot update count of the W boot sector B203, that is, when 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 A202 is less than or equal to the W boot update count of the W boot sector B203, that is, when the W boot data B is newer than the W boot data A (S508; No) Executes the memory rewrite process by the W boot process B of the W boot sector B 203 (S509).
[0048]
If the checksums of the W boot sector A 202 and the W boot sector B 203 are not normal, that is, if one of the W boot sectors is abnormal (S506; No), the check sum of the W boot sector A 202 is normal. If the checksum of the W boot sector A202 is normal (S511; Yes), the memory rewriting 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 A202 is abnormal, that is, when the checksum of the W boot sector B203 is normal (S511; No), the memory rewriting process by the W boot process B of the W boot sector B203 is performed. Execute (S509).
[0049]
When shifting from the normal mode to the memory rewrite mode, when a memory rewrite mode shift command is received (S516), the process proceeds to step S503, and the flash memory is rewritten.
[0050]
FIG. 6 is a diagram illustrating an example of a procedure for determining whether to enter the boot rewrite mode. This process is a process for determining whether or not to shift from the normal rewrite mode to the boot rewrite mode, and is performed in the memory rewrite process (S509, S510) shown in FIG.
[0051]
First, the received update data is analyzed in record units, and it is determined whether or not the designated address is a predetermined address (address 0xF1FFE0, address 0xF0FFE0 in this example) (S601). If the specified address is a predetermined address (S601; Yes), it is determined whether the data length of the specified data is a predetermined data length (7 bytes in this example) (S602). When the data length is the predetermined data length (S521; Yes), it is determined whether or not the content of the designated data is specific data (character code “REWRITE” in this example) (S603). When the content of the specified data is specific data (S603; Yes), normal reception status data for notifying that the data has been normally received is transmitted to the host device (S604), and activated to the sector to be rewritten in the flash memory 101. A flag for adding the boot sector 201 is set (S605), and the received record is discarded (S606).
[0052]
If the designated address is not a predetermined address (S601; No), the data length is not a predetermined data length (S602; No), and the data content is not specific data (S603; No), the rewrite target This determination process ends without setting a flag for adding the boot boot sector 201 to the sector. In this case, the normal rewrite mode is maintained.
[0053]
FIG. 7 is a diagram illustrating an example of a procedure of flash memory rewriting processing by W boot processing A or W boot processing 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 (S701), and the W boot process of the currently executing W boot sector is recognized. A boot ID is acquired (S702).
[0054]
Next, update data is received in record units (S703). Hereinafter, the received update data for each record is referred to as “received record data”. Then, it is determined whether or not the received record data is data indicating that specific data is to be written to a predetermined address, and it is determined whether to enter the boot rewrite mode or remain in the normal rewrite mode based on the determination result. (S704; boot rewrite mode transition determination process in FIG. 6). Next, it is determined whether or not the received record data is an end record, that is, whether or not reception of update data is complete (S705).
[0055]
If the received record data is not an end record (S705; No), it is determined whether the received record data is update data of a sector of the flash memory to be stored (S706). The reception record data stores a storage start address, and based on this storage start address, the sector of the flash memory to be stored is determined. The sectors to be rewritten are sectors other than the boot boot sector and the currently executing W boot sector in the normal rewrite mode, and sectors other than the currently executing W boot sector in the boot rewrite mode.
[0056]
When the received record data is update data of the sector of the flash memory to be stored (S706; Yes), the received record data is written (S707), and the normal reception status for notifying that the reception is normal is received. Is sent to the host device (S708), and the process returns to step S603 to receive the record data as the next update data. On the other hand, when the received record data is not the update data of the sector of the flash memory to be stored (S706; No), the process returns to step S603, and the record data as the next update data is received.
[0057]
If the received record data is an end record (S705; Yes), the checksums of the main sector and / or the non-executed W boot sector to which the received record data has been written are calculated and written (S709). Then, predetermined end processing in the memory rewrite mode is executed (S710), and finally CPU reset processing is executed (S711). Note that when the boot rewrite mode is entered in step S704, the flag set to set the startup boot sector 201 as the rewrite target sector is reset by the end process in step S710.
[0058]
Here, the update data transmitted from the host device may be configured for each sector, that is, for each of the boot boot sector 201, the W boot sectors 202 and 203, and the main sector. The update data of these sectors may be integrated.
[0059]
FIG. 8 is a diagram showing the rewrite range of the flash memory. FIG. 8A is a diagram showing a rewrite range of the flash memory when the W boot process A is executed, and FIG. 8B is a diagram of the flash memory when the W boot process B is executed. It is a figure which shows the rewriting range. As shown in the figure, data other than the following three items of data is rewritten based on the received record data.
W boot data of the W boot sector being executed: W boot data A when the W boot process A is being executed, and W boot data B when the W boot process 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 B203, and when W boot process B is being executed, check of W boot sector A202 Sam.
Main sector checksum: The checksum of the entire main sector area.
As described above, in the normal rewrite mode, the boot data is not included in the rewrite range.
[0060]
There are various methods for rewriting data in the flash memory 101. For example, it can be executed using the rewriting method described below.
[0061]
The first rewriting method is a case where update data of the entire sector is sequentially received as record data in all sectors constituting the flash memory 101. Here, the record data of the unused area is received as 0xff. When the received record data is the first update data of the 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.
[0062]
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, and in the sectors other than the W boot sector, only the data to be updated is received. In this case, only the received record data portion is rewritten. When the W boot sector is an update target sector, if the received record data is the first update data of the update target sector, the update target sector data is copied onto the RAM and the update target sector data 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. If a sector other than the W boot sector is the update target sector, the data of the update target sector is copied onto the RAM, the received record data of the part to be updated is written, the data of the update target sector is erased, and the data is written The sector image on the RAM is written back to the update target sector.
[0063]
The third rewriting method is a case in which only data to be updated is received in all 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 part 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.
[0064]
FIG. 9 is a diagram showing details of the W boot sector rewriting method. FIG. 9A is a diagram showing a method for rewriting the W boot sector when the W boot process A is executed, and FIG. 9B is a diagram showing the W boot when the W boot process B is executed. It is a figure which shows the rewriting method of a sector. For example, as shown in FIG. 9A, when the W boot process A is executed, the W boot data B of the W boot sector B 203 is sequentially received, and the received record data is based on a predetermined storage start address. Write to the W boot sector B203. Next, the number of times of W boot update of the W boot sector B 203 is calculated and written in a predetermined area of the W boot sector B 203. 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 in a predetermined area of the W boot sector B203. Further, as shown in FIG. 9B, 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 values are written as the W boot update count of the W boot sector A 202 and the check sum of the W boot sector A 202.
[0065]
When a new function is added to a boot process that is already functioning normally, the boot data for the added function is written in the W boot sector as the W boot data, thereby rewriting error in the boot data rewriting operation. Can be avoided.
[0066]
The present invention can also be applied to the case where there are three or more W boot sectors, and boot boot data stored in the boot boot sector is selected from a plurality of W boot sectors based on the checksum and the number of boot updates. It can be configured to determine and execute the W boot sector to be executed.
[0067]
In addition, the program of the present invention is described above. Consists of boot data and at least two boot data It is a program.
[0068]
【The invention's effect】
As described above, according to the present invention, the boot boot sector and at least two boot sectors are provided in the flash memory, and the boot boot sector has a boot that realizes a minimum function for booting the apparatus. Boot data is stored, and each of at least two boot sectors has a function of rewriting other sectors including the boot boot sector of the flash memory excluding its own boot sector and a processing function at the start-up other than the boot boot data has By storing the boot data that realizes the above, it is possible to avoid a state in which the apparatus cannot be started due to an abnormal boot sector rewrite process.
[0069]
Also, when it is necessary to rewrite the boot boot data, the normal rewrite is performed so that only the boot sector and the main sector can be rewritten by transmitting the update data with data indicating that the specific data is written at a predetermined address. The boot boot data can be rewritten from the mode to the boot rewrite mode in which the boot boot data can be rewritten, and the boot boot data can be easily rewritten. That is, even when the boot boot data is rewritten, it is not necessary to prepare a special rewrite program or the like, and can be rewritten by the same work procedure as the W boot data and main data.
[0070]
In addition, since the boot boot data, the W boot data, and the main data can be rewritten with only one download operation, the work procedure is simplified and the occurrence of work errors can be reduced. Furthermore, the time required for rewriting 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 showing an example of the configuration of a memory rewrite control system.
FIG. 4 is a diagram showing a rewrite order of W boot data by two W boot sectors.
FIG. 5 is a diagram illustrating a procedure of boot processing.
FIG. 6 is a diagram illustrating a procedure of a transition determination process for boot rewrite mode.
FIG. 7 is a diagram showing a procedure of flash memory rewriting processing by W boot processing A or W boot processing B.
FIG. 8A is a diagram showing a flash memory rewrite range when W boot processing A is executed;
(b) is a diagram showing the rewrite range of the flash memory when the W boot process B is executed.
FIG. 9A is a diagram showing a W boot sector rewriting method when W boot processing A is executed;
(b) is a diagram showing a method of rewriting the W boot sector when the W boot process B is executed.
FIG. 10 is a diagram for explaining 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 determination unit
302 First rewriting unit
303 2nd rewriting part

Claims (5)

中央処理装置と、起動ブートデータを格納する起動ブートセクタ前記起動ブートデータの起動の後に選択的に起動されるブートデータを格納する少なくとも2個のブートセクタ及び前記起動ブートデータ又は前記ブートデータの起動の後に起動されるメインデータを格納するメインセクタ有し、前記セクタ単位でデータ消去可能なフラッシュメモリからなるメモリ書き換え制御システムにおけるメモリ書き換え制御方法であって、
前記中央処理装置が、
(a)前記制御システムの起動時に、前記起動ブートデータを実行して
当該制御システムのハードウェアの初期化を行う初期化工程と、
当該制御システムの起動モードの判定を行なう起動モード判定工程と、
前記起動モード判定工程によって判定された前記起動モードが前記フラッシュメモリのメモリ書き換えモードである場合に、前記ブートセクタのそれぞれに格納された前記ブートデータの中から、前記ブートセクタのそれぞれに格納されたブートデータ更新判定データに基づいて、前記起動ブートデータの後に起動すべきブートデータを選択するブートデータ判定工程と、を実行し
(b)前記ブートデータ判定工程によって選択された前記ブートデータを実行して
前記フラッシュメモリの更新データをホスト装置から受信するための通信インタフェースの初期化を行う通信インタフェース初期化工程と、
当該ブートデータが格納されたブートセクタを除く前記ブートセクタ、前記起動ブートセクタ及び前記メインセクタに格納されたデータを前記更新データにより書き換える書き換え工程と、を実行する、
ことを特徴とするメモリ書き換え制御方法。
A central processing unit, start activation boot sector for storing boot data, the start of the boot data at least two storing boot data which are selectively activated after the start boot sector and the start boot data or the boot data has a main sector for storing main data is started after the startup, a memory rewriting control method in a memory rewriting control system including a data erasable flash memory by the sectors,
The central processing unit is
(A) At the start of the control system, execute the boot data
An initialization step for performing hardware initialization of the control system,
An activation mode determination step for determining an activation mode of the control system;
When the boot mode determined by the boot mode determination step is a memory rewrite mode of the flash memory, the boot data stored in each of the boot sectors is stored in each of the boot sectors. based on the boot data update judgment data, perform, and boot data determination step of selecting a boot data to be started after the startup boot data,
(B) executing the boot data selected in the boot data determination step;
A communication interface initialization step for initializing a communication interface for receiving update data of the flash memory from a host device;
The boot sector, except for the boot sector in which the boot data has been stored, and executes a rewriting step of rewriting the stored boot the boot sector and the main sector data by the update data,
And a memory rewrite control method.
前記書き換え工程は、
前記フラッシュメモリに格納されたデータを書き換えるための前記更新データを前記ホスト装置から受信する更新データ受信工程と、
前記更新データ受信工程によって受信された前記更新データに基づいて、前記起動ブートセクタ、前記ブートセクタ及び前記メインセクタの中から更新データを格納すべきセクタを選択するセクタ判定工程と、
前記セクタ判定工程によって選択された前記セクタに、前記更新データ受信工程によって受信された前記更新データを書き込む更新データ書き込み工程と、
前記セクタ判定工程によって選択された前記セクタが前記ブートセクタである場合に、前記ブートデータ更新判定データを算出し更新する更新判定データ算出工程と、
を備えたことを特徴とする請求項に記載のメモリ書き換え制御方法。
The rewriting process includes
An update data receiving step of receiving the update data for rewriting data stored in the flash memory from the host device;
Based on the update data received by the update data reception step, a sector determination step of selecting a sector in which update data is to be stored from the boot boot sector, the boot sector, and the main sector;
An update data writing step of writing the update data received by the update data receiving step into the sector selected by the sector determination step;
An update determination data calculation step of calculating and updating the boot data update determination data when the sector selected in the sector determination step is the boot sector;
The memory rewrite control method according to claim 1 , further comprising:
前記ブートデータ更新判定データは、前記ブートセクタの前記ブートデータを書き換えた回数を通算したブート更新回数と、前記ブートデータの正当性を検証する前記ブートデータのチェックサムとを備えて構成され、
前記更新判定データ算出工程は、前記ブート更新回数と前記チェックサムとを算出し前記ブートデータ更新判定データを更新することを特徴とする請求項に記載のメモリ書き換え制御方法。
The boot data update determination data includes a boot update count obtained by adding up the number of times the boot data of the boot sector is rewritten, and a checksum of the boot data for verifying the validity of the boot data.
3. The memory rewrite control method according to claim 2 , wherein the update determination data calculation step calculates the boot update count and the checksum to update the boot data update determination data.
前記書き換え工程は、前記更新データ受信工程によって受信された更新データが、前記フラッシュメモリの所定のアドレスに所定のデータ長を有する特定データを書き込む旨の所定の更新データであるか否かを判定し、前記更新データが前記所定の更新データである場合にのみ、前記ブートセクタ及び前記メインセクタのみを書き換え可能状態にする通常書き換えモードから前記起動ブートデータも書き換え可能状態にするブート書き換えモードに移行することを特徴とする請求項またはのいずれか1項に記載のメモリ書き換え制御方法。The rewriting step determines whether or not the update data received by the update data receiving step is predetermined update data for writing specific data having a predetermined data length at a predetermined address of the flash memory. Only when the update data is the predetermined update data, the normal rewrite mode in which only the boot sector and the main sector are in a rewritable state shifts to the boot rewrite mode in which the boot boot data is also in a rewritable state. memory rewriting control method according to any one of claims 2 or 3, characterized in that. 請求項1から4のいずれか1項に記載の起動ブートデータと少なくとも2個のブートデータとからなることを特徴とするプログラム A program comprising the boot data according to any one of claims 1 to 4 and at least two pieces of boot data .
JP2002255270A 2002-06-11 2002-08-30 Memory rewrite control method and program for executing each step of memory rewrite control method Expired - Fee Related JP4062429B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2002255270A JP4062429B2 (en) 2002-08-30 2002-08-30 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
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
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
CN031424147A CN100407177C (en) 2002-06-11 2003-06-11 Rewriting control system and rewriting control method for flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002255270A JP4062429B2 (en) 2002-08-30 2002-08-30 Memory rewrite control method and program for executing each step of memory rewrite control method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2007290950A Division JP4238930B2 (en) 2007-11-08 2007-11-08 Memory rewrite control system.

Publications (2)

Publication Number Publication Date
JP2004094628A JP2004094628A (en) 2004-03-25
JP4062429B2 true JP4062429B2 (en) 2008-03-19

Family

ID=32060827

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP4062429B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006227830A (en) 2005-02-16 2006-08-31 Seiko Epson Corp Information processor and method for controlling information processor
JP2007025821A (en) 2005-07-12 2007-02-01 Seiko Epson Corp Information processor and control method therefor
JP2007115066A (en) * 2005-10-21 2007-05-10 Meidensha Corp Boot program rewriting method for digital terminal
US9442840B2 (en) * 2012-12-19 2016-09-13 Qualcomm Incorporated Virtual boundary codes in a data image of a read-write memory device

Also Published As

Publication number Publication date
JP2004094628A (en) 2004-03-25

Similar Documents

Publication Publication Date Title
US7634648B2 (en) Data processing apparatus and control method for a data processing apparatus that temporarily provides a plurality of boot sectors in flash ROM
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
TWI384367B (en) System of updating firmware and method thereof
US6622246B1 (en) Method and apparatus for booting and upgrading firmware
KR101427755B1 (en) Device and method for firmware upgrade using usb
TWI515660B (en) Firmware variable update method
US6584559B1 (en) Firmware download scheme for high-availability systems
WO2022007656A1 (en) Bootloader software updating method and apparatus, embedded controller, and storage medium
US7558949B2 (en) Data processing apparatus and control method for verifying that version codes in selected boot sector and main sector match
US20050251673A1 (en) Updatable firmware having boot and/or communication redundancy
US20110320794A1 (en) Flash System And Method For Updating The Flash System
JP3268130B2 (en) Data processing device using flash EEPROM
CN101815988A (en) Firmware image update and management
JP2006260330A (en) Version management method of firmware for computer system and information processor
JP4062429B2 (en) Memory rewrite control method and program for executing each step of memory rewrite control method
JP4238930B2 (en) Memory rewrite control system.
JP6447469B2 (en) Rewriting system
US20050223268A1 (en) Method of writing non-volatile memory that avoids corrupting the vital initialization code
US10120677B2 (en) Method of rewriting printer firmware, and printer
JP6582438B2 (en) Information processing apparatus, system setting method, and computer program
JP4062421B2 (en) Memory rewrite control method and program for executing each step of memory rewrite control method
EP4113288B1 (en) Systems and method for bootup activation of firmware images
JP2001344156A (en) Device with flash memory and data rewriting method
JP2014112419A (en) Mobile terminal apparatus, software update method, operation control method, and program
WO2020043361A1 (en) Installing application program code on a vehicle control system

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