JP3305667B2 - How to write firmware data - Google Patents

How to write firmware data

Info

Publication number
JP3305667B2
JP3305667B2 JP32081998A JP32081998A JP3305667B2 JP 3305667 B2 JP3305667 B2 JP 3305667B2 JP 32081998 A JP32081998 A JP 32081998A JP 32081998 A JP32081998 A JP 32081998A JP 3305667 B2 JP3305667 B2 JP 3305667B2
Authority
JP
Japan
Prior art keywords
data
buffer
partial data
control device
command
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
JP32081998A
Other languages
Japanese (ja)
Other versions
JP2000148502A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP32081998A priority Critical patent/JP3305667B2/en
Publication of JP2000148502A publication Critical patent/JP2000148502A/en
Application granted granted Critical
Publication of JP3305667B2 publication Critical patent/JP3305667B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ファームウェアデ
ータの書込み方法に関し、特に、上位装置から送信した
ファームウェアデータを、制御装置に備えたバッファを
経由して記憶装置に書き込むファームウェアデータの書
込み方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of writing firmware data, and more particularly to a method of writing firmware data transmitted from a host device to a storage device via a buffer provided in a control device.

【0002】[0002]

【従来の技術】従来、フラッシュ型ROM(Read Only M
emory)等の記憶装置を製品化する際に、パーソナルコン
ピュータ等の上位装置からファームウェアデータを送信
し、書込み装置等の制御装置を経由して上記ROMに書
き込むアップデート方式が知られている。ファームウェ
アデータとは、ソフトウェアをハードウェア化して組み
込んだもの、つまりROMに記憶させた基本プログラム
やデータ等のことを意味する。
2. Description of the Related Art Conventionally, a flash ROM (Read Only M)
When a storage device such as an emory is commercialized, an update method is known in which firmware data is transmitted from a higher-level device such as a personal computer and written into the ROM via a control device such as a writing device. The firmware data refers to a piece of software that is implemented as hardware, that is, a basic program or data stored in a ROM.

【0003】図7は、上記アップデート方式を実現する
各装置の概略構成を示すブロック図である。この構成
で、制御装置22は、上位装置21から送信されたファ
ームウェアデータを一時的に格納するバッファ23を備
えており、制御装置22には、バッファ23に格納され
たファームウェアデータが書き込まれるROM24が接
続される。
FIG. 7 is a block diagram showing a schematic configuration of each device for realizing the update method. In this configuration, the control device 22 includes a buffer 23 for temporarily storing firmware data transmitted from the host device 21. The control device 22 includes a ROM 24 to which the firmware data stored in the buffer 23 is written. Connected.

【0004】図8は、従来のアップデート方式における
上位装置側の作動を示すフローチャート、図9は、従来
のアップデート方式における制御装置側の作動を示すフ
ローチャートである。図8及び図9を参照して、上記従
来のアップデート方式における処理について説明する。
FIG. 8 is a flowchart showing the operation of the host device in the conventional update system, and FIG. 9 is a flowchart showing the operation of the control device in the conventional update system. With reference to FIGS. 8 and 9, processing in the above-described conventional update method will be described.

【0005】この従来例では、上位装置21と制御装置
22との通信手段として、例えば、標準インタフェース
であるRS232Cを用いるとする。この場合に、上位装置2
1が制御装置22へコマンド1を送信すると(図8のス
テップA19)、コマンド1を受け取った制御装置22
(図9のステップA32)は、バッファ23内をクリア
する(ステップA33)。この結果、バッファ23に対
するクリア処理が異常終了した場合には(ステップA3
4)、制御装置22は全動作を終了する。一方、バッフ
ァ23に対するクリア処理が正常に終了した場合には、
制御装置22は、正常に終了した旨の信号を上位装置2
1に送信する(ステップA35)。
In this conventional example, it is assumed that, for example, RS232C, which is a standard interface, is used as communication means between the host device 21 and the control device 22. In this case, the host device 2
When command 1 transmits command 1 to control device 22 (step A19 in FIG. 8), control device 22 that has received command 1
(Step A32 in FIG. 9) clears the buffer 23 (Step A33). As a result, if the clearing process for the buffer 23 ends abnormally (step A3
4), the control device 22 ends all operations. On the other hand, when the clearing process for the buffer 23 is completed normally,
The control device 22 sends a signal indicating the normal end to the host device 2
1 (step A35).

【0006】上位装置21は、正常終了の旨の信号を受
信した場合に(図8のステップA20)、コマンド2を
送信する(ステップA21)。次いで、制御装置22
は、コマンド2を受け取ると(図9のステップA3
6)、コマンド2に含まれる書込み位置情報をもとに、
受け取った部分データをバッファ23内に書き込む(ス
テップA37)。更に、この書込み処理が正常終了した
か否か、つまりバッファ23内に書き込まれた部分デー
タに付加されたチェックサムデータと、部分データの書
込み時に計算したサムデータとの比較によってバッファ
23内の部分データが正常であるか否かを判定し(ステ
ップA38)、部分データが異常である場合には全動作
を終了する。一方、部分データが正常である場合には、
制御装置22は、正常終了した旨の信号を上位装置21
に送信する(ステップA39)。
When the host device 21 receives the signal indicating the normal end (step A20 in FIG. 8), it transmits the command 2 (step A21). Next, the control device 22
Receives command 2 (step A3 in FIG. 9).
6), based on the write position information included in the command 2,
The received partial data is written into the buffer 23 (step A37). Further, whether or not the writing process has been completed normally, that is, the checksum data added to the partial data written in the buffer 23 and the sum data calculated at the time of writing the partial data are compared to determine whether the partial processing in the buffer 23 has been completed. It is determined whether or not the data is normal (step A38). If the partial data is abnormal, the entire operation is terminated. On the other hand, if the partial data is normal,
The control device 22 sends a signal indicating the normal end to the host device 21.
(Step A39).

【0007】次いで、上位装置21は、正常終了の信号
を受信すると(図8のステップA22)、ファームウェ
アデータにおけるすべての部分データを制御装置22に
送信したか否かを判定する(ステップA23)。この結
果、部分データを全ては送信していない場合には、上位
装置21は、制御装置22へ再び次の部分データをコマ
ンド2として送信する(ステップA21)。ステップA
23で、上位装置21が全ての部分データの送信を終了
した場合には、上位装置21は、制御装置22にコマン
ド3を送信する(ステップA24)。
Next, upon receiving the signal of normal termination (step A22 in FIG. 8), the host device 21 determines whether or not all the partial data in the firmware data has been transmitted to the control device 22 (step A23). As a result, if not all of the partial data has been transmitted, the higher-level device 21 transmits the next partial data to the control device 22 again as the command 2 (step A21). Step A
In 23, when the higher-level device 21 has finished transmitting all the partial data, the higher-level device 21 transmits the command 3 to the control device 22 (step A24).

【0008】更に、制御装置22は、コマンド3を受け
取ると(図9のステップA40)、バッファ23内に書
き込まれた各部分データに付加されたチェックサムデー
タと、各部分データの書込み時に計算したサムデータと
を比較することによって、バッファ23内の正当性をチ
ェックし(ステップA41)、正当でない場合には全動
作を終了する。一方、全ての部分データが正当である場
合には、制御装置22は、バッファ23内の全てのデー
タをROM24に書き込み(ステップA42)、アップ
デートを終了する。
Further, upon receiving the command 3 (step A40 in FIG. 9), the control device 22 calculates the checksum data added to each of the partial data written in the buffer 23 and calculates at the time of writing each of the partial data. By comparing with the sum data, the validity in the buffer 23 is checked (step A41), and if not valid, the whole operation is ended. On the other hand, if all the partial data are valid, the control device 22 writes all the data in the buffer 23 into the ROM 24 (step A42), and ends the update.

【0009】[0009]

【発明が解決しようとする課題】ところで、上記従来の
アップデート方式には次のような問題点があった。例え
ば、上位装置21から制御装置22に送信されるファー
ムウェアデータは、100バイトの部分データ1000
0個から成る1000000バイトと、各部分データに
付加された1バイトのコマンド部と各4バイトの書込み
開始位置部及び書込み終了位置部とから成るコマンド2
を含んでいる。このファームウェアデータを送信する際
に、通信レートが例えば19200bpsであると、フ
ァームウェアデータ全体の送信には、(1+4+4+100)×
10000×8(ビット)÷19200=454(秒)という多大な通信
時間が必要であった。
However, the above-mentioned conventional update method has the following problems. For example, firmware data transmitted from the higher-level device 21 to the control device 22 includes 100-byte partial data 1000.
Command 2 consisting of 10000000 bytes consisting of 0 bytes, a 1-byte command part added to each partial data, and a 4-byte write start position and a write end position
Contains. When transmitting the firmware data, if the communication rate is, for example, 19200 bps, (1 + 4 + 4 + 100) ×
A huge communication time of 10000 × 8 (bits) / 19200 = 454 (seconds) was required.

【0010】本発明は、上記に鑑み、上位装置から送信
したファームウェアデータを制御装置を介して記憶装置
に書き込む際の通信時間をできるだけ短縮させることが
できるファームウェアデータの書込み方法を提供するこ
とを目的とする。
In view of the above, it is an object of the present invention to provide a firmware data writing method capable of shortening communication time when writing firmware data transmitted from a host device to a storage device via a control device as much as possible. And

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、本発明のファームウェアデータの書込み方法は、制
御装置の上位に位置する上位装置から送信したファーム
ウェアデータを、前記制御装置に備えたバッファを経由
して記憶装置に書き込むファームウェアデータの書込み
方法において、前記バッファに特定データパターンを書
き込むクリア処理を行うためのクリアコマンドを、前記
上位装置から前記制御装置に送信するステップと、前記
上位装置で、前記バッファに書き込むべきファームウェ
アデータの全体を複数の部分データに分割し、各部分デ
ータにおける有効部分データと前記特定のデータパター
ンと同じ値の無効部分データとに判別するステップと、
前記有効部分データに前記バッファへの書込み位置情報
を付加したバッファ書込みコマンドを前記制御装置に送
信し、前記特定データパターンが書き込まれた前記バッ
ファに該有効部分データを書き込むステップとを有する
ことを特徴とする。
In order to achieve the above object, a method of writing firmware data according to the present invention is directed to a method for writing firmware data transmitted from a higher-level device located above a control device to a buffer provided in the control device. Transmitting a clear command for performing a clear process of writing a specific data pattern to the buffer from the host device to the control device, wherein the host device sends the clear command to the control device. Dividing the entire firmware data to be written into the buffer into a plurality of partial data, and determining valid partial data in each partial data and invalid partial data having the same value as the specific data pattern;
Transmitting, to the control device, a buffer write command obtained by adding write position information to the buffer to the valid part data, and writing the valid part data to the buffer in which the specific data pattern is written. And

【0012】従来方式では、複数の部分データに含まれ
る有効部分データ及び無効部分データをすべて送信した
のに対し、本発明の書込み方法では、クリアコマンドに
従ってバッファに特定データパターンを書き込むクリア
処理を行ってから、ファームウェアデータを解析して無
効部分データと有効部分データとに分割し、有効部分デ
ータのみに書込み位置情報を付加してバッファ書込みコ
マンドとして送信することができる。これにより、実際
に送信するデータのバイト数を減少させることができ、
上位装置から送信したファームウェアデータを記憶装置
に書き込む際の通信時間を大幅に短縮させることができ
る。また、部分データの判別ステップに先立ってクリア
コマンドを発生するので、後続するファームウェアデー
タの書込み処理が円滑になる。
In the conventional method, all valid partial data and invalid partial data included in a plurality of partial data are transmitted. On the other hand, in the writing method of the present invention, a clear process for writing a specific data pattern into a buffer according to a clear command is performed. After that, the firmware data can be analyzed and divided into invalid partial data and valid partial data, and write position information can be added to only the valid partial data and transmitted as a buffer write command. This can reduce the number of bytes of data actually transmitted,
The communication time for writing the firmware data transmitted from the host device to the storage device can be greatly reduced. Further, since the clear command is generated prior to the step of determining the partial data, the subsequent firmware data writing process is facilitated.

【0013】[0013]

【0014】また、前記バッファに有効部分データを書
き込むステップに後続して、前記バッファに書き込まれ
た有効部分データを前記記憶装置に書き込むための書込
みコマンドを前記上位装置から制御装置に送信するステ
ップを含むことが好ましい。これにより、バッファに一
旦書き込んだ有効部分データを記憶装置に速やかに書き
込むことができる。
[0014] Further, after the step of writing valid partial data to the buffer, a step of transmitting a write command for writing the valid partial data written to the buffer to the storage device from the higher-level device to the control device. It is preferred to include. As a result, the valid part data once written in the buffer can be quickly written to the storage device.

【0015】好ましくは、前記書込みコマンドに従って
前記有効部分データを前記記憶装置に書き込んだ後に、
前記バッファに書き込まれた有効部分データの良否を判
定し、該有効部分データが不良の場合には、前記上位装
置から制御装置に前記バッファ書込みコマンドを再度送
信するステップを更に含む。この場合、書き込まれた有
効部分データが不良の場合にバッファ書込みコマンドを
再度送信することにより、それまでバッファに良好に書
き込まれた有効部分データを無駄にすることなく、処理
を続行することができる。
Preferably, after writing the valid partial data to the storage device according to the write command,
Determining whether the valid partial data written to the buffer is good or not, and if the valid partial data is defective, retransmitting the buffer write command from the host device to the control device. In this case, by transmitting the buffer write command again when the written valid partial data is defective, the processing can be continued without wasting the valid partial data that has been successfully written in the buffer until then. .

【0016】[0016]

【発明の実施の形態】図面を参照して本発明を更に詳細
に説明する。図1は、本発明の第1実施形態例における
ファームウェアデータのアップデート方式(書込み方
法)を説明するためのブロック図である。同図におい
て、制御装置12はバッファ13を備えており、制御装
置12には、上位装置11と、書換え可能なフラッシュ
型ROM等のROM14とが夫々接続されている。
The present invention will be described in more detail with reference to the drawings. FIG. 1 is a block diagram for explaining a firmware data update method (writing method) according to the first embodiment of the present invention. In FIG. 1, the control device 12 includes a buffer 13. The control device 12 is connected to a host device 11 and a ROM 14 such as a rewritable flash ROM.

【0017】上位装置11は、ファームウェアデータの
解析、及び、制御装置12との通信を行う。制御装置1
2は、上位装置11との間で通信を行い、上位装置11
から受け取ったコマンド情報に基づいて、バッファ13
及びROM14に対するファームウェアデータの読出し
/書込み処理を行う。
The host device 11 analyzes firmware data and communicates with the control device 12. Control device 1
2 communicates with the host device 11 and
Buffer 13 based on the command information received from
And a process of reading / writing firmware data from / to the ROM 14.

【0018】バッファ13には、ファームウェアデータ
が、制御装置12によって一時的に読出し/書込み処理
される。ROM14には、バッファ13に一時的に書き
込まれたファームウェアデータが制御装置12によって
書き込まれる。また、ROM14内のファームウェアデ
ータを制御装置12が読み込むことにより、制御装置1
2自身がアップデートされる。
The firmware data is temporarily read / written to / from the buffer 13 by the control device 12. The firmware data temporarily written to the buffer 13 is written to the ROM 14 by the control device 12. The control device 12 reads the firmware data in the ROM 14 so that the control device 1
2 itself is updated.

【0019】上記アップデート方式では、概ね次のよう
に処理が進む。すなわち、上位装置11が、予めバッフ
ァ13を特定のデータパターンで書き込みできるよう
に、対応するコマンドを制御装置12に送信すると、上
位装置11が、ファームウェアデータを複数の部分デー
タに分割し、各部分データの有効/無効の判定を行う。
この結果、上位装置11は、部分データが特定のデータ
パターンでない有効部分データの場合には、この部分デ
ータの書込み開始位置の情報、書込み終了位置の情報及
びコマンド部から成るコマンドを制御装置12に送信す
る。一方、部分データが特定のデータパターンである無
効部分データの場合には、上位装置11はコマンドの送
信を行わない。
In the above update method, the processing generally proceeds as follows. That is, when the host device 11 transmits a corresponding command to the control device 12 so that the buffer 13 can be written in a specific data pattern in advance, the host device 11 divides the firmware data into a plurality of partial data, and Determines whether data is valid or invalid.
As a result, when the partial data is valid partial data that is not a specific data pattern, the higher-level device 11 sends to the control device 12 a command including information on a write start position, information on a write end position, and a command portion of the partial data. Send. On the other hand, when the partial data is invalid partial data having a specific data pattern, the host device 11 does not transmit a command.

【0020】制御装置12は、コマンドを受信した場合
に、書込み開始位置の情報及び書込み終了位置の情報に
従って、有効部分データをバッファ13に書き込む。そ
して、分割された有効部分データの通信がすべて終了す
ると、上位装置11は、制御装置12に対してアップデ
ートするようにコマンドを送信する。制御装置12は、
このコマンドを受信すると、バッファ13に書き込まれ
たファームウェアデータの正当性をチェックしてから、
バッファ13内のファームウェアデータをROM14に
書き込む。このように、予めバッファ13を特定のデー
タパターンで書き込んでクリアした後に、特定のデータ
パターン以外の有効部分データのみを、書き込み位置情
報を付加して通信するので、高速な通信処理が可能にな
る。
When receiving the command, the control device 12 writes the effective partial data into the buffer 13 in accordance with the information on the write start position and the information on the write end position. Then, when all the communication of the divided valid part data is completed, the upper level device 11 transmits a command to the control device 12 to update. The control device 12
When this command is received, the firmware data written in the buffer 13 is checked for validity,
The firmware data in the buffer 13 is written to the ROM 14. As described above, after writing and clearing the buffer 13 with the specific data pattern in advance, only the effective part data other than the specific data pattern is communicated with the write position information added, so that high-speed communication processing can be performed. .

【0021】図4に、上位装置11から送信されるコマ
ンドの構成を模式的に示す。上位装置11から送信され
るコマンドには、コマンド部のみから構成されるコマン
ド1及び3と、コマンド部、書込み開始位置部、書込み
終了位置部及び部分データ部から構成されるコマンド2
とがある。書込み開始位置部及び書込み終了位置部は、
書込み位置情報を構成する。コマンド1はバッファ13
内をクリアする命令であり、コマンド2は部分データの
転送処理とバッファ13への書込み処理とを行わせるた
めの命令であり、コマンド3はROM14への書込み処
理を行わせるための命令である。
FIG. 4 schematically shows the structure of a command transmitted from the host device 11. Commands transmitted from the higher-level device 11 include commands 1 and 3 composed of only a command part, and commands 2 composed of a command part, a write start position part, a write end position part, and a partial data part.
There is. The write start position part and the write end position part are
Construct write position information. Command 1 is buffer 13
The command 2 is a command for performing the process of transferring the partial data and the process of writing to the buffer 13, and the command 3 is a command for performing the process of writing to the ROM 14.

【0022】次いで、上記アップデート方式の処理をフ
ローチャートを参照して、詳細に説明する。図2は、上
位装置11側の動作を示すフローチャート、図3は制御
装置12側の動作を示すフローチャートである。
Next, the processing of the update method will be described in detail with reference to a flowchart. FIG. 2 is a flowchart showing the operation of the host device 11, and FIG. 3 is a flowchart showing the operation of the control device 12.

【0023】図2のステップA1で、上位装置11が制
御装置12へコマンド1(図4)を送信すると、制御装
置12がコマンド1を受け取り(図3のステップA
8)、16進数でFFという値(以下、FFと呼ぶ)を
バッファ13内の全てのエリアに書き込む(以下、この
書込み処理を「バッファ13をクリアする」と呼ぶ)
(ステップA9)。16進数のFFは、2進数の「11
111111」であって、データに含まれる8ビットの
すべてが「1」である初期状態を表す。つまり、FFの
部分データとは、実際にはデータとしての機能を有しな
い無効の部分データを示す。
When the host device 11 transmits the command 1 (FIG. 4) to the control device 12 at step A1 in FIG. 2, the control device 12 receives the command 1 (step A1 in FIG. 3).
8) Write a hexadecimal value of FF (hereinafter, referred to as FF) to all areas in the buffer 13 (hereinafter, this writing process is referred to as "clearing the buffer 13").
(Step A9). Hexadecimal FF is represented by binary “11”.
111111 ", indicating an initial state in which all 8 bits included in the data are" 1 ". That is, the partial data of the FF indicates invalid partial data that does not actually have a function as data.

【0024】図3のステップA10では、バッファ13
のクリア処理が正常に終了したか否かを判定し、異常終
了した場合には、制御装置12は全動作を終了する。一
方、バッファ13のクリアが正常終了した場合には、ス
テップA11で、制御装置12が上位装置11に正常終
了した旨の信号を送信する。
In step A10 of FIG.
It is determined whether or not the clearing process has been completed normally. If the clearing process has been abnormally completed, the control device 12 ends all the operations. On the other hand, if the clearing of the buffer 13 has been completed normally, the control device 12 transmits a signal to the effect that the clearing has been normally completed to the host device 11 in step A11.

【0025】上位装置11は、正常終了を示す信号を受
信すると(図2のステップA2)、送信するファームウ
ェアデータ(以下、部分データに対して全データとも呼
ぶ)を適切に分割したデータ(部分データ)が全てFF
であるか否かを判定する(ステップA3)。この結果、
部分データの内容が全てFFである場合には、上位装置
11は、この部分データを無効部分データであると判定
し、ステップA6で、全ての部分データの送信が終了し
た否かを判定する。一方、ステップA3で、部分データ
の内容の全てがFFということではない場合には、上位
装置11は、この部分データを有効部分データであると
判定し、この有効部分データに書込み位置情報とコマン
ド部とを付加してコマンド2(図4)とし、制御装置1
2に送信する(ステップA4)。
When the host device 11 receives the signal indicating the normal end (step A2 in FIG. 2), the firmware data to be transmitted (hereinafter also referred to as “all data” for the partial data) is appropriately divided into data (partial data). ) Are all FF
Is determined (step A3). As a result,
If the contents of the partial data are all FFs, the host device 11 determines that the partial data is invalid partial data, and determines in step A6 whether transmission of all the partial data has been completed. On the other hand, if the content of the partial data is not all FF in step A3, the host device 11 determines that the partial data is valid partial data, and writes the write position information and the command in the valid partial data. Command 2 (FIG. 4) by adding
2 (step A4).

【0026】制御装置12は、上位装置11からのコマ
ンド2を受け取ると(図3のステップA12)、コマン
ド2に含まれる書込み位置情報をもとに、コマンド2に
含まれる有効部分データを、バッファ13の書込み開始
位置から書込み終了位置に書込む(ステップA13)。
When the control device 12 receives the command 2 from the host device 11 (step A12 in FIG. 3), the control device 12 stores the valid part data included in the command 2 into a buffer based on the write position information included in the command 2. Then, writing is performed from the write start position to the write end position (step A13).

【0027】更にステップA14で、上記書込み処理が
正常終了したか否か、つまりバッファ13内に書き込ま
れた有効部分データに付加されたチェックサムデータ
と、有効部分データの書込み時に計算したサムデータと
の比較によってバッファ13内の部分データが正常であ
るか否かを判定し、有効部分データが異常である場合に
は制御装置12は全動作を終了する。一方、部分データ
が正常である場合には、制御装置12は、正常終了した
旨の信号を上位装置11に送信する(ステップA1
5)。
Further, in step A14, it is determined whether or not the writing process has been normally completed, that is, the checksum data added to the valid partial data written in the buffer 13, the sum data calculated at the time of writing the valid partial data, and It is determined whether or not the partial data in the buffer 13 is normal by the comparison of the above. If the valid partial data is abnormal, the control device 12 ends the entire operation. On the other hand, if the partial data is normal, the control device 12 transmits a signal indicating normal end to the host device 11 (step A1).
5).

【0028】上位装置11は、正常終了した旨の信号を
受信すると(図2のステップA5)、ステップA6で、
全ての有効部分データを制御装置12に送信したか否か
を判定する。この結果、まだ全ての有効部分データを送
信していない場合には、上位装置11は、ステップA3
に戻り、次の部分データの内容が全てFFであるか否か
を再び判定する。これ以降、分割された部分データのチ
ェック、送信を繰り返し、全ての有効部分データの送信
を終了した場合に(ステップA6)、上位装置11は制
御装置12にコマンド3(図4)を送信する(ステップ
A7)。
When the host device 11 receives the signal indicating the normal end (step A5 in FIG. 2), at step A6,
It is determined whether or not all the effective partial data has been transmitted to the control device 12. As a result, when not all the effective partial data has been transmitted yet, the upper level device 11 proceeds to step A3.
It is determined again whether or not the contents of the next partial data are all FF. Thereafter, checking and transmission of the divided partial data are repeated, and when transmission of all valid partial data is completed (step A6), the higher-level device 11 transmits a command 3 (FIG. 4) to the control device 12 (FIG. 4). Step A7).

【0029】次いで、制御装置12は、図3のステップ
A16でコマンド3を受信すると、ステップA17で、
バッファ13内に書き込まれた各有効部分データに付加
されたチェックサムデータと、各有効部分データの書込
み時に計算したサムデータとを比較することによって、
バッファ13内のデータの正当性をチェックし、正当で
ない場合には全動作を終了する。一方、全ての有効部分
データが正当である場合には、制御装置12は、バッフ
ァ13内の全ての有効部分データをROM14に書き込
み(ステップA18)、アップデートを終了する。
Next, when the control device 12 receives the command 3 in step A16 in FIG.
By comparing the checksum data added to each valid part data written in the buffer 13 with the sum data calculated at the time of writing each valid part data,
The validity of the data in the buffer 13 is checked, and if it is not valid, the entire operation is terminated. On the other hand, when all the valid partial data are valid, the control device 12 writes all the valid partial data in the buffer 13 into the ROM 14 (step A18), and ends the update.

【0030】次に、本アップデート方式を具体例を挙げ
て説明する。図5は、この具体例を模式的に示す図であ
る。ファームウェアデータ(全データ)1の総データ数
を1000000バイトとし、部分データ1つ当たりの
データ数を100バイトとするとき、ファームウェアデ
ータ1は、部分データ1から部分データ10000まで
の10000個の部分データに分割される。この内で、
例えば、部分データ2と、5000から9999までの
各部分データとが夫々、FFで書かれたデータであると
する。
Next, the update method will be described with a specific example. FIG. 5 is a diagram schematically showing this specific example. When the total number of firmware data (all data) 1 is 1,000,000 bytes and the number of data per partial data is 100 bytes, the firmware data 1 is composed of 10000 partial data from partial data 1 to 10000 partial data. Is divided into In this,
For example, it is assumed that the partial data 2 and each of the partial data from 5000 to 9999 are data written in FF.

【0031】また、上位装置11と制御装置12との通
信手段としては、標準インタフェースであるRS232Cを用
いるとする。この場合、上位装置11から制御装置12
へコマンド1を送信すると、コマンド1を受け取った制
御装置12は、バッファ13内をFFでクリアする。バ
ッファ13のクリア処理が正常終了した場合、制御装置
12は、上位装置11に正常終了した旨の信号を送信す
る。
It is assumed that RS232C, which is a standard interface, is used as a communication means between the host device 11 and the control device 12. In this case, the host device 11 sends the control device 12
When the command 1 is transmitted to the controller 12, the control device 12 that has received the command 1 clears the buffer 13 with FF. When the clearing process of the buffer 13 has been completed normally, the control device 12 transmits a signal to the effect that the process has been normally completed to the host device 11.

【0032】正常終了の旨の信号を受信した上位装置1
1は、部分データ1のチェックを行う。この場合、図5
に示すように、部分データ1は、内部の100バイトの
データが全てFFではないので、上位装置11は、部分
データ1を有効部分データとして判定し、コマンド部が
2で、書込み開始位置部が1及び書込み終了位置部が1
00の書込み位置情報を部分データ1に付加してコマン
ド2とし、制御装置12に送信する。
Host device 1 that has received a signal indicating normal termination
No. 1 checks partial data 1. In this case, FIG.
As shown in (1), since the 100-byte data inside is not all FFs in the partial data 1, the upper level device 11 determines the partial data 1 as valid partial data, the command part is 2, and the write start position part is 1 and write end position part is 1
The write position information of 00 is added to the partial data 1 to make a command 2, which is transmitted to the control device 12.

【0033】制御装置12は、コマンド2を受け取る
と、バッファ13内の書込み開始位置部1から書込み終
了位置部100の範囲に、受け取った部分データ1を書
き込む。更に、書込み処理が正常終了したか否かを判定
し、正常終了した場合には、制御装置12は、正常終了
した旨の信号を上位装置11に送信する。
When receiving the command 2, the control device 12 writes the received partial data 1 in the range from the write start position 1 to the write end position 100 in the buffer 13. Further, it is determined whether or not the writing process has been normally completed. If the writing process has been normally completed, the control device 12 transmits a signal to the effect that the writing process has been normally completed to the host device 11.

【0034】上位装置11は、正常終了の信号を受信す
ると、有効な全ての部分データを送信したか否かを判定
する。このとき、まだ1つの部分データしか送信してい
ないので、次の部分データ2に対するチェックを行う。
Upon receiving the signal of the normal end, the host device 11 determines whether or not all valid partial data has been transmitted. At this time, since only one piece of partial data has been transmitted, a check is made for the next partial data 2.

【0035】更に、全てのデータがFFから成る部分デ
ータ2を無効部分データと判定するので、この部分デー
タ2の送信は行わず、上位装置11は、全ての部分デー
タの送信が終了したか否かを判定する。この場合、まだ
部分データ2までしか終了していないので、次の部分デ
ータ3に対するチェックを行う。
Further, since the partial data 2 in which all the data are FFs are determined to be invalid partial data, the transmission of the partial data 2 is not performed, and the host device 11 determines whether or not the transmission of all the partial data has been completed. Is determined. In this case, since only the partial data 2 has been completed, the next partial data 3 is checked.

【0036】以下、部分データ10000まで上記処理
を繰り返し実行し、制御装置12に全ての有効部分デー
タの送信を終了した時点で、上位装置11はコマンド3
を制御装置12に送信する。
Thereafter, the above processing is repeatedly executed up to the partial data 10000, and when the transmission of all the valid partial data to the control device 12 is completed, the host device 11
Is transmitted to the control device 12.

【0037】次いで、制御装置12は、コマンド3を受
け取ると、バッファ13内に書き込まれた全てのデータ
の正当性を判定し、正当である場合には、バッファ13
内に一時的に書き込んだ全ての有効部分データをROM
14に書き込む。
Next, upon receiving the command 3, the control device 12 determines the validity of all data written in the buffer 13, and if the data is valid,
All valid part data temporarily written in ROM
Write to 14.

【0038】次いで、本発明の第2実施形態例について
説明する。図6は、本実施形態例における上位装置11
側の動作を示すフローチャートである。同図は、第1実
施形態例における図2のフローチャートと、ステップA
5で正常終了の信号を受信しなかった場合の処理が異な
る。図6と、第1実施形態例で用いた図3〜5とを参照
して本実施形態例を説明する。
Next, a second embodiment of the present invention will be described. FIG. 6 shows the host device 11 in this embodiment.
It is a flowchart showing the operation of the side. FIG. 9 shows the flowchart of FIG.
5 is different from the processing when the signal of the normal end is not received. This embodiment will be described with reference to FIG. 6 and FIGS. 3 to 5 used in the first embodiment.

【0039】本実施形態例においても、上位装置11と
制御装置12との通信手段にRS232Cを用いるとする。例
えば、上位装置11から制御装置12に対し、部分デー
タ9999までの送信が終了し(図6のステップA25
〜A28)、制御装置12が、部分データ9999のバ
ッファ13への書込みを正常終了したとする(図3のス
テップA8〜A14)。これにより、上位装置11が、
図6のステップA29で正常終了の旨の信号を制御装置
12から受信すると、ステップA30で全ての有効部分
データの送信をチェックした後に、ステップA27で、
次の部分データ10000のチェックを行う。
Also in this embodiment, it is assumed that RS232C is used as a communication means between the host device 11 and the control device 12. For example, the transmission of partial data 9999 from the higher-level device 11 to the control device 12 ends (step A25 in FIG. 6).
To A28), and assume that the control device 12 has normally finished writing the partial data 9999 to the buffer 13 (steps A8 to A14 in FIG. 3). As a result, the host device 11
When a signal indicating the normal end is received from the control device 12 in step A29 of FIG. 6, after checking the transmission of all valid partial data in step A30, in step A27,
The next partial data 10000 is checked.

【0040】この場合、図5に示すように、部分データ
10000の内容は全てがFFということではないの
で、上位装置11は、部分データ10000を有効部分
データ判定し、コマンド部が2で、書込み開始位置部が
999901、書込み終了位置部が1000000、部
分データが10000から成るコマンド2として制御装
置12に送信する(図6のステップA28)。制御装置
12は、コマンド2を受信すると(図3のステップA1
2)、バッファ13に部分データ10000を書き込む
(ステップA13)。
In this case, as shown in FIG. 5, since the contents of the partial data 10000 are not all FFs, the host device 11 determines the partial data 10000 as valid partial data, The start position part is 999901, the write end position part is 1,000,000, and the partial data is transmitted to the control device 12 as a command 2 composed of 10,000 (step A28 in FIG. 6). When receiving the command 2 (step A1 in FIG. 3)
2) Write the partial data 10000 into the buffer 13 (step A13).

【0041】ここで、何らかの理由で部分データ100
00の書込み処理が異常終了、つまり、書込み後の部分
データ10000に異常がある場合には(図3のステッ
プA14)、上位装置11は、制御装置12から正常終
了の旨の信号を受信することができないので(図6のス
テップA29)、ステップA28を繰り返し、同一のコ
マンド2を制御装置12に再度送信する。
Here, for some reason, the partial data 100
If the writing process of 00 is abnormally ended, that is, if the partial data 10000 after writing has an error (step A14 in FIG. 3), the upper level device 11 receives a signal indicating normal end from the control device 12. Since it is not possible (step A29 in FIG. 6), step A28 is repeated and the same command 2 is transmitted to the control device 12 again.

【0042】制御装置12は、図3のステップA14の
結果で全動作を終了した後、始めに戻り、図3のステッ
プA8のNoを経由し、ステップA12で、上位装置1
1からのコマンド2を受信する。次いで、バッファ13
への部分データ10000の書込みが成功したならば
(ステップA14)、上位装置11に正常終了の旨の信
号を送信する(ステップA15)。
After ending all the operations according to the result of step A14 in FIG. 3, the control device 12 returns to the beginning, passes No in step A8 in FIG.
Command 2 from 1 is received. Next, the buffer 13
If the writing of the partial data 10000 to the host device succeeds (step A14), a signal indicating the normal end is transmitted to the host device 11 (step A15).

【0043】更に、上位装置11が、正常終了した旨の
信号を制御装置12から受信すると(図6のステップA
29)、次いで、有効な全ての部分データを送信したか
否かのチェックを行う(ステップA30)。この場合、
部分データ10000が送信され、正常に終了したの
で、上位装置11は、制御装置12にコマンド3を送信
する(ステップA31)。
Further, when the host device 11 receives a signal indicating the normal end from the control device 12 (step A in FIG. 6).
29) Then, it is checked whether or not all valid partial data have been transmitted (step A30). in this case,
Since the partial data 10000 has been transmitted and ended normally, the host device 11 transmits the command 3 to the control device 12 (step A31).

【0044】制御装置12は、コマンド3を受け取ると
(図3のステップ16)、バッファ13内に書き込まれ
た全ての有効部分データの正当性を判定する(ステップ
A17)。この結果、全ての有効部分データが正当であ
れば、バッファ13内の全ての有効部分データをROM
14に書き込む(ステップA18)。
When receiving the command 3 (step 16 in FIG. 3), the control device 12 judges the validity of all the valid partial data written in the buffer 13 (step A17). As a result, if all valid partial data are valid, all valid partial data in
14 (step A18).

【0045】本実施形態例では、第1実施形態例におけ
る効果に加え、上位装置11が、部分データを含むコマ
ンド2の送信後、制御装置12から正常終了の信号を受
信できなかった場合に、同じコマンド2を再度送信する
ことにより、それまで制御装置12がバッファ13に書
き込んだ有効部分データを無駄にすることなく、アップ
デート処理を引き続き実行できるという効果が得られ
る。
In the present embodiment, in addition to the effects of the first embodiment, when the host device 11 cannot receive a normal end signal from the control device 12 after transmitting the command 2 including the partial data, By transmitting the same command 2 again, it is possible to obtain an effect that the update process can be continuously executed without wasting the effective partial data written in the buffer 13 by the control device 12 until then.

【0046】以上のように、第1及び第2実施形態例で
は、予めバッファ13をFFでクリアすることにより、
FFで構成されるような無効部分データを送信する必要
が無く、送信する部分データ数が減少する。このため、
ファームウェアデータ(全データ)を全て上位装置11
から制御装置12へ送信する従来方式に比して、バッフ
ァ13への書込みが高速になる。
As described above, in the first and second embodiments, the buffer 13 is cleared in advance by the FF,
There is no need to transmit invalid partial data composed of FFs, and the number of partial data to be transmitted is reduced. For this reason,
All firmware data (all data) is stored in the host device 11
The writing to the buffer 13 is faster than in the conventional method in which the data is transmitted to the control device 12 from the memory.

【0047】例えば、図5を参照すると、部分データ1
と、部分データ3〜4999と、部分データ10000
との計5000個のみをコマンド2として送信すれば良
い。この場合、コマンド2におけるコマンド部が1バイ
ト、書込み開始位置部が4バイト、書込み終了位置部が
4バイトとするとき、通信レートが19200bpsで
あれば、通信時間は(1+4+4+100)×5000×8÷19200=
227(秒)で済むことになり、従来方式における454
(秒)に比して大幅に短縮する。また、上位装置11か
らバッファ13に送信するデータ数が減少するので、何
らかの理由で部分データが送信途中で破壊されたり、部
分データが届かないなどの障害が発生する確率が大幅に
減少する。これにより、通信する部分データの安全性を
確保することができる。
For example, referring to FIG.
, Partial data 3 to 4999, and partial data 10000
And only 5,000 commands as command 2 need be transmitted. In this case, when the command part in the command 2 is 1 byte, the write start position part is 4 bytes, and the write end position part is 4 bytes, if the communication rate is 19200 bps, the communication time is (1 + 4 + 4 + 100) × 5000 × 8 × 19200 =
It takes only 227 (seconds), which is 454
(Seconds). Further, since the number of data to be transmitted from the higher-level device 11 to the buffer 13 is reduced, the probability that a failure such as partial data being destroyed during transmission or partial data not being received for some reason is greatly reduced. Thereby, the security of the partial data to be communicated can be ensured.

【0048】以上、本発明をその好適な実施形態例に基
づいて説明したが、本発明のファームウェアデータの書
込み方法は、上記実施形態例の構成にのみ限定されるも
のではなく、上記実施形態例の構成から種々の修正及び
変更を施したファームウェアデータの書込み方法も、本
発明の範囲に含まれる。
Although the present invention has been described based on the preferred embodiment, the method for writing firmware data of the present invention is not limited to the configuration of the above-described embodiment. The method of writing firmware data obtained by making various modifications and changes from the configuration described above is also included in the scope of the present invention.

【0049】[0049]

【発明の効果】以上説明したように、本発明のファーム
ウェアデータの書込み方法によると、上位装置から送信
したファームウェアデータを制御装置を介して記憶装置
に書き込む際の通信時間をより短縮させることができ
る。
As described above, according to the firmware data writing method of the present invention, it is possible to further reduce the communication time when writing the firmware data transmitted from the host device to the storage device via the control device. .

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

【図1】本発明の第1実施形態例におけるアップデート
方式を説明するためのブロック図である。
FIG. 1 is a block diagram for explaining an update method according to a first embodiment of the present invention.

【図2】第1実施形態例における上位装置側の動作を示
すフローチャートである。
FIG. 2 is a flowchart showing an operation of the host device in the first embodiment.

【図3】第1実施形態例における制御装置側の動作を示
すフローチャートである。
FIG. 3 is a flowchart showing an operation on the control device side in the first embodiment.

【図4】上位装置から送信されるコマンドの構成を模式
的に示す図である。
FIG. 4 is a diagram schematically showing a configuration of a command transmitted from a higher-level device.

【図5】ファームウェアデータの具体例を模式的に示す
図である。
FIG. 5 is a diagram schematically showing a specific example of firmware data.

【図6】本発明の第2実施形態例における上位装置側の
動作を示すフローチャートである。
FIG. 6 is a flowchart illustrating an operation of a higher-level device according to a second embodiment of the present invention.

【図7】従来のアップデート方式を説明するためのブロ
ック図である。
FIG. 7 is a block diagram for explaining a conventional update method.

【図8】従来の上位装置側の動作を示すフローチャート
である。
FIG. 8 is a flowchart showing the operation of a conventional higher-level device.

【図9】従来の制御装置側の動作を示すフローチャート
である。
FIG. 9 is a flowchart showing an operation of a conventional control device.

【符号の説明】[Explanation of symbols]

11:上位装置 12:制御装置 13:バッファ 14:ROM 11: Host device 12: Control device 13: Buffer 14: ROM

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 制御装置の上位に位置する上位装置から
送信したファームウェアデータを、前記制御装置に備え
たバッファを経由して記憶装置に書き込むファームウェ
アデータの書込み方法において、 前記バッファに特定データパターンを書き込むクリア処
理を行うためのクリアコマンドを、前記上位装置から前
記制御装置に送信するステップと、 前記上位装置で、前記バッファに書き込むべきファーム
ウェアデータの全体を複数の部分データに分割し、各部
分データにおける有効部分データと前記特定のデータパ
ターンと同じ値の無効部分データとに判別するステップ
と、 前記有効部分データに前記バッファへの書込み位置情報
を付加したバッファ書込みコマンドを前記制御装置に送
信し、前記特定データパターンが書き込まれた前記バッ
ファに該有効部分データを書き込むステップとを有する
ことを特徴とするファームウェアデータの書込み方法。
1. A firmware data writing method for writing firmware data transmitted from a host device located above a control device to a storage device via a buffer provided in the control device, wherein a specific data pattern is written to the buffer. Transmitting a clear command for performing a write clear process from the higher-level device to the controller; and, in the higher-level device, dividing the entire firmware data to be written into the buffer into a plurality of partial data, Discriminating between valid part data and invalid part data having the same value as the specific data pattern, and transmitting a buffer write command in which write position information to the buffer is added to the valid part data to the control device, The buffer in which the specific data pattern is written Writing the valid part data into the firmware data.
【請求項2】 前記バッファに有効部分データを書き込
むステップに後続して、前記バッファに書き込まれた有
効部分データを前記記憶装置に書き込むための書込みコ
マンドを前記上位装置から制御装置に送信するステップ
を含むことを特徴とする請求項1に記載のファームウェ
アデータの書込み方法。
2. A step of transmitting a write command for writing the effective partial data written in the buffer to the storage device from the host device to the control device, following the step of writing the effective partial data to the buffer. The method for writing firmware data according to claim 1, further comprising:
【請求項3】 前記書込みコマンドに従って前記有効部
分データを前記記憶装置に書き込んだ後に、前記バッフ
ァに書き込まれた有効部分データの良否を判定し、該有
効部分データが不良の場合には、前記上位装置から制御
装置に前記バッファ書込みコマンドを再度送信するステ
ップを更に含むことを特徴とする請求項2に記載のファ
ームウェアデータの書込み方法。
3. After the valid partial data is written to the storage device according to the write command, the validity of the valid partial data written to the buffer is determined. 3. The method according to claim 2, further comprising transmitting the buffer write command from the device to the control device again.
JP32081998A 1998-11-11 1998-11-11 How to write firmware data Expired - Fee Related JP3305667B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32081998A JP3305667B2 (en) 1998-11-11 1998-11-11 How to write firmware data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32081998A JP3305667B2 (en) 1998-11-11 1998-11-11 How to write firmware data

Publications (2)

Publication Number Publication Date
JP2000148502A JP2000148502A (en) 2000-05-30
JP3305667B2 true JP3305667B2 (en) 2002-07-24

Family

ID=18125595

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32081998A Expired - Fee Related JP3305667B2 (en) 1998-11-11 1998-11-11 How to write firmware data

Country Status (1)

Country Link
JP (1) JP3305667B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030032257A (en) * 2001-10-17 2003-04-26 삼성전자주식회사 Method for upgrading program and apparatus therefor
JP4041491B2 (en) * 2002-06-14 2008-01-30 松下電器産業株式会社 Semiconductor integrated circuit device, data storage verification device, and data storage verification method
JP2013141137A (en) 2012-01-05 2013-07-18 Ricoh Co Ltd Composite system

Also Published As

Publication number Publication date
JP2000148502A (en) 2000-05-30

Similar Documents

Publication Publication Date Title
EP0147794B1 (en) Error recovery method and apparatus
JP4896524B2 (en) Method for confirming completion of data transmission from wireless identification system to replaceable unit monitor
US4136384A (en) Loop type data highway system
KR20000023497A (en) Microcomputer provided with flash memory and method of storing program into flash memory
JP2006190257A (en) Data transfer device and its method
US7430619B2 (en) Communication device, host apparatus, and communication method
JP3305667B2 (en) How to write firmware data
JP2001202295A (en) Subsystem
US4680699A (en) Terminal control apparatus for parallel execution of data editing and data transmission/reception control
JPS61278958A (en) Data transfer device
JP3497066B2 (en) Data write / read method in flash memory and storage device using flash memory
US20020023245A1 (en) Transmission controlling apparatus, transmission controlling method, data processing unit, and data recording medium
JPS63228856A (en) Communication controller
JPH0535616A (en) Data transfer system
JPH07122084A (en) Electronic device
US6438644B1 (en) Method to prevent a flash memory from being miswritten
JP3358701B2 (en) Verify method and verify device
JPS63228855A (en) Communication controller
JPH0787425B2 (en) Individual identification method
JP2963229B2 (en) Tape mark writing device for magnetic tape storage device
JPH08272752A (en) Parallel processor
JPH04112537U (en) data transfer device
JP2644571B2 (en) Remote IPL control method
JPH07281836A (en) Data transfer method
JPH1165943A (en) Data transfer device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090510

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100510

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees