JP2000242488A - Memory reloading method - Google Patents

Memory reloading method

Info

Publication number
JP2000242488A
JP2000242488A JP11045344A JP4534499A JP2000242488A JP 2000242488 A JP2000242488 A JP 2000242488A JP 11045344 A JP11045344 A JP 11045344A JP 4534499 A JP4534499 A JP 4534499A JP 2000242488 A JP2000242488 A JP 2000242488A
Authority
JP
Japan
Prior art keywords
control board
data
flash memory
rewriting
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11045344A
Other languages
Japanese (ja)
Inventor
Masao Moriya
正夫 守屋
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP11045344A priority Critical patent/JP2000242488A/en
Publication of JP2000242488A publication Critical patent/JP2000242488A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To shorten download time or verify time while keeping the degree of freedom in the layout of a control board. SOLUTION: In the case of verify processing, the addresses of verify data are divided into first half and latter half, and a CPU 20 of a first control board 12 sequentially reads the address data of the first half from an IC card 50 and transmits than through a universal asynchronous receiver and transmitter(UART) 18 and a serial line 60 to a second control board 32. Parallel with this transmission, a CPU 40 of the second control board 32 sequentially reads the address data of the latter half from a flash memory 36 and transmits them through a UART 38 and the serial line 60 to the first control board 12. The first control board 12 performs verify for comparing the received data of the latter half with the data of the latter half of the IC card 50 and comparing the data of the first half received by the second control board 32 with the data of the first half in the flash memory 38.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、メモリ書き換え方
法に係り、更に詳しくは、書き換え可能メモリを用いて
いる制御装置のプログラムデータ等の書き換えやベリフ
ァイを行うメモリ書き換え方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory rewriting method, and more particularly, to a memory rewriting method for rewriting and verifying program data of a control device using a rewritable memory.

【0002】[0002]

【従来の技術】従来より、パーソナルコンピュータ等の
各種情報処理装置では、装置の制御を行う制御プログラ
ムがメモリなどに予め格納されていて、その制御プログ
ラムに従って情報処理動作が行われていた。
2. Description of the Related Art Conventionally, in various information processing apparatuses such as a personal computer, a control program for controlling the apparatus is stored in a memory or the like in advance, and the information processing operation is performed according to the control program.

【0003】この種の情報処理装置にあっては、例え
ば、装置を構成する制御基板として複数の制御基板(第
1制御板、第2制御板など)が設けられている。そし
て、その第1制御板と第2制御板とは、例えば、非同期
のシリアル伝送用LSI(LargeScale Integrated Circ
uit)であるUART(Universal Asynchronous Receiv
er and Transmitter)を介して双方向のシリアル通信回
線で接続されていて、第1制御板には、メモリカードコ
ネクタが設けられ、装置外部からメモリカード(ICカ
ード)などを挿入してプログラムデータ等の交換を可能
とし、他方の第2制御板は、コネクタ等の取り付けが困
難な装置内部に取り付けられていた。
In this type of information processing apparatus, for example, a plurality of control boards (first control board, second control board, etc.) are provided as control boards constituting the apparatus. The first control board and the second control board are, for example, an asynchronous serial transmission LSI (LargeScale Integrated Circuit).
UART (Universal Asynchronous Receiv)
The first control board is provided with a memory card connector, and a memory card (IC card) or the like is inserted from the outside of the device to program data and the like. Can be exchanged, and the other second control plate is mounted inside the device where it is difficult to mount a connector or the like.

【0004】また、第1制御板および第2制御板には、
プログラムデータを格納する書き換え可能メモリとし
て、例えば、フラッシュメモリなどが採用されていて、
プログラムデータのバージョンアップを行う場合は、I
Cカードに格納されたバージョンアッププログラムをフ
ラッシュメモリ側にコピーする、いわゆる、プログラム
ダウンロードを行っていた。
Further, the first control plate and the second control plate include:
As a rewritable memory for storing program data, for example, a flash memory or the like is adopted,
To upgrade the version of program data,
The so-called program download, in which the version-up program stored in the C card is copied to the flash memory side, has been performed.

【0005】上記構成を用いてプログラムダウンロード
を行う手順としては、例えば、第2制御板のフラッシュ
メモリの内容の書き換える場合、まず、第2制御板の
フラッシュメモリの内容を消去し(チップイレース)、
第1制御板にてICカードからデータをリードして、
そのアドレスとデータとを第2制御板にシリアル通信す
る。第2制御板では、受信したアドレスに対応させて
受信データをフラッシュメモリに書き込む。これらの動
作は、全ての対象アドレスに対して行うようにする。
[0005] As a procedure for downloading a program using the above configuration, for example, when rewriting the contents of the flash memory of the second control board, first, the contents of the flash memory of the second control board are erased (chip erase).
Read data from IC card with 1st control board,
The address and data are serially communicated to the second control board. The second control board writes the received data to the flash memory corresponding to the received address. These operations are performed for all target addresses.

【0006】さらに、そのプログラムダウンロードが成
功したか否かを確認する方法としては、ダウンロード対
象であるプログラムのアドレス全てについて、ダウンロ
ード元(ICカード側)とダウンロード先(フラッシュ
メモリ側)のデータ比較を行い、データが全て一致して
いることを確認する、いわゆるベリファイを行ってい
た。このベリファイは、プログラムダウンロード後の成
功確認をする場合や、現在のプログラムが何であるかを
確認するような場合に使用される。
Further, as a method of confirming whether or not the program has been successfully downloaded, a data comparison between a download source (IC card side) and a download destination (flash memory side) is performed for all addresses of a program to be downloaded. So-called verify, which is to confirm that all the data match. This verification is used when confirming success after downloading a program or when confirming what the current program is.

【0007】上記構成を用いてベリファイを行う手順と
しては、ICカードから第1制御板がプログラムデー
タ等を読み込み(以下、リードという)、第1制御板
は、そのリードしたアドレスとデータとをシリアル回線
を介して第2制御板に送信する。第2制御板では、受
信したアドレスのフラッシュメモリの内容と受信したデ
ータとを比較するようにする。
As a procedure for performing verification using the above configuration, a first control board reads program data and the like from an IC card (hereinafter referred to as a read), and the first control board serially reads the read address and data. The signal is transmitted to the second control board via the line. The second control board compares the content of the flash memory at the received address with the received data.

【0008】また、これとは逆に、第2制御板のフラ
ッシュメモリに格納されているデータをリードし、第
2制御板は、そのリードしたアドレスとデータとをシリ
アル回線を介して第1制御板に送信する。第1制御板
では、その受信したアドレスのICカードの内容と受信
したデータとを比較するようにしても良い。
On the contrary, the data stored in the flash memory of the second control board is read, and the second control board transmits the read address and data to the first control board via a serial line. Send to the board. The first control board may compare the contents of the IC card at the received address with the received data.

【0009】このように、上記何れかの方法を行う場合
でも、ベリファイを対象アドレスすべてに対して行うよ
うにする。また、上記したデータの書き換えやベリファ
イを行うものとして、特開平5−81012号、特開平
6−47996号、あるいは特開平7−64952号公
報などに開示されたものがあった。
As described above, even when any of the above methods is performed, the verification is performed for all the target addresses. Japanese Patent Application Laid-Open Nos. Hei 5-81012, Hei 6-47996, and Hei 7-64952 disclose data rewriting and verifying.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、このよ
うなダウンロードやベリファイを行うメモリ書き換え方
法にあっては、複数の制御基板の間が双方向の通信回線
で接続されているのは、ダウンロードデータを送受信す
る場合だけでなく、そのダウンロードデータを正確且つ
確実にダウンロードするために互いに連絡を取り合う必
要がある場合(ベリファイ時)にも使用することが可能
である。
However, in such a memory rewriting method for performing download and verification, a plurality of control boards are connected by a bidirectional communication line because download data is not transmitted. It can be used not only when transmitting and receiving, but also when it is necessary to communicate with each other in order to download the downloaded data accurately and reliably (during verification).

【0011】上記のように、制御基板を複数設けて、ユ
ーザインタフェースを受け持つ制御板とエンジンシーケ
ンスを受け持つ基板などに分けて、例えば、1枚の制御
板をICカードが装置外から容易に挿入できる場所に実
装すれば、他の制御板は必ずしもそのような場所に実装
する必要がなくなるため、制御板のレイアウトが自由に
なる。
As described above, a plurality of control boards are provided, and the control board is divided into a control board that handles a user interface and a board that handles an engine sequence. For example, one control board can be easily inserted into an IC card from outside the apparatus. If mounted in a place, other control boards do not necessarily need to be mounted in such a place, so that the layout of the control board becomes free.

【0012】しかし、このような状況下でベリファイを
行うと、第1制御板から第2制御板、あるいは、第2制
御板から第1制御板へシリアル通信を行う必要があるた
め、ベリファイに要する時間に加えて、通信時間が余計
にかかってしまうという問題があった。そこで、制御基
板を複数に分けることなく、直接ICカードが接続され
る制御板にフラッシュメモリを搭載するならば、通信時
間が不要になる分だけベリファイ時間が短縮できる反
面、制御板レイアウトの自由度が失われてしまうという
問題が生じる。
However, if verification is performed in such a situation, it is necessary to perform serial communication from the first control board to the second control board or from the second control board to the first control board. In addition to the time, there is a problem that extra communication time is required. Therefore, if the flash memory is mounted on the control board to which the IC card is directly connected without dividing the control board into a plurality, the verification time can be shortened by the time that the communication time is unnecessary, but the layout of the control board is more flexible. Is lost.

【0013】また、プログラムを書き換えるためにプロ
グラムダウンロードを行う場合は、第2制御板のフラッ
シュメモリを一旦全部消去(チップイレース)した後、
第1制御板から第2制御板へデータとアドレスとをシリ
アル送信し、送信したプログラムデータをフラッシュメ
モリに書き込む必要があったため、ダウンロードに長い
時間がかかるという問題があった。
When a program is downloaded to rewrite the program, the flash memory of the second control board is once completely erased (chip erase),
Since it was necessary to transmit data and address serially from the first control board to the second control board and write the transmitted program data to the flash memory, there was a problem that it took a long time to download.

【0014】本発明は、上記課題に鑑みてなされたもの
であり、制御板のレイアウトの自由度を持たせつつ、ダ
ウンロードやベリファイを効率良く行うことにより、プ
ログラム等の書き換え時間や、そのベリファイ時間を短
縮することのできるメモリ書き換え方法を提供すること
を目的としている。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and it is possible to efficiently download and verify a program or the like while maintaining the degree of freedom in the layout of a control board, thereby rewriting time of a program or the like and verifying the time. It is an object of the present invention to provide a memory rewriting method capable of shortening the time.

【0015】[0015]

【課題を解決するための手段】請求項1に記載の発明
は、双方向の通信回線で第1制御板と第2制御板とが互
いに接続され、前記第2制御板は書き換え可能メモリを
有し、前記第1制御板は前記第2制御板の書き換え可能
メモリの内容を書き換える書き換えデータを取り込むた
めのインターフェイスを有するメモリ書き換え方法にお
いて、前記インターフェイスを介して前記第1制御板に
取り込まれる書き換えデータと、前記第2制御板の書き
換え可能メモリの書き換え後のデータとのベリファイを
行うにあたって、ベリファイデータを少なくとも2つの
アドレス群に分割し、前記通信回線を介して前記第1制
御板から前記一方のアドレス群に属する各アドレス毎の
書き換えデータを第2制御板へ送信し、書き換え後の第
2制御板の書き換え可能メモリの内容と比較する処理
と、前記通信回線を介して前記第2制御板から前記他方
のアドレス群に属する各アドレス毎の前記書き換え可能
メモリの内容を前記第1制御板へ送信し、前記第1制御
板のインターフェイスから取り込まれる書き換えデータ
と比較する処理と、を並行処理するようにしたものであ
る。
According to a first aspect of the present invention, a first control board and a second control board are connected to each other by a bidirectional communication line, and the second control board has a rewritable memory. In the memory rewriting method, the first control board has an interface for taking in rewrite data for rewriting the contents of the rewritable memory of the second control board, wherein the rewrite data taken into the first control board via the interface is provided. And verifying the data after rewriting of the rewritable memory of the second control board, the verifying data is divided into at least two address groups, and the one of the first control board is transmitted from the first control board via the communication line. Rewriting data for each address belonging to the address group is transmitted to the second control board, and rewriting of the second control board after rewriting is performed. And comparing the contents of the rewritable memory for each address belonging to the other address group from the second control board to the first control board via the communication line. The processing for comparing with rewrite data taken in from the interface of the first control board is performed in parallel.

【0016】これによれば、インターフェイスを介して
第1制御板に取り込まれる書き換えデータと、第2制御
板の書き換え可能メモリの書き換え後のデータとのベリ
ファイを行うにあたって、ベリファイデータを少なくと
も2つのアドレス群に分割し、一方のアドレス群に属す
る各アドレス毎の書き換えデータを通信回線を介して第
1制御板から第2制御板へ送信して、書き換え後の第2
制御板の書き換え可能メモリの内容と比較する処理と、
他方のアドレス群に属する各アドレス毎の書き換え可能
メモリの内容を通信回線を介して第2制御板から第1制
御板へ送信して、第1制御板のインターフェイスから取
り込まれる書き換えデータと比較する処理とを並行処理
するようにした。このため、制御板を複数設けて相互に
通信回線で接続し、制御板のレイアウトに自由度を持た
せるように構成しても、ベリファイ時間を大幅に短縮す
ることができる。
According to this, when verifying the rewrite data taken into the first control board via the interface and the rewritten data of the rewritable memory of the second control board, the verify data is transferred to at least two addresses. And rewriting data for each address belonging to one of the address groups is transmitted from the first control board to the second control board via a communication line, and the rewritten second data is transmitted to the second control board.
A process of comparing with the contents of the rewritable memory of the control board;
A process of transmitting the contents of the rewritable memory for each address belonging to the other address group from the second control board to the first control board via a communication line, and comparing the rewritable data with rewrite data taken in from the interface of the first control board. And were processed in parallel. For this reason, even if a plurality of control boards are provided and connected to each other via a communication line so that the layout of the control boards has a degree of freedom, the verification time can be greatly reduced.

【0017】請求項2に記載の発明は、双方向の通信回
線で第1制御板と第2制御板とが互いに接続され、前記
第2制御板はフラッシュメモリを有し、前記第1制御板
は前記第2制御板のフラッシュメモリの内容を書き換え
る書き換えデータを取り込むためのインターフェイスを
有するメモリ書き換え方法において、前記インターフェ
イスを介して前記第1制御板に取り込まれる書き換えデ
ータを使って前記フラッシュメモリの内容を書き換える
にあたって、前記第2制御板におけるフラッシュメモリ
のメモリ消去を所定単位毎に分けて行うようにし、その
所定単位毎のメモリ消去中に前記第1制御板がインター
フェイスを介して取り込んだ書き換えデータを前記第1
制御板から前記第2制御板へ送信し、メモリ消去が終了
したフラッシュメモリの各単位毎にデータの書き換えを
行うようにしたものである。
According to a second aspect of the present invention, the first control board and the second control board are connected to each other by a two-way communication line, the second control board has a flash memory, and the first control board has a flash memory. Is a memory rewriting method having an interface for taking in rewriting data for rewriting the content of the flash memory of the second control board, wherein the content of the flash memory is written using the rewriting data taken into the first control board via the interface. In rewriting, the memory erasure of the flash memory in the second control plate is performed in units of a predetermined unit, and the rewrite data captured by the first control plate via the interface during the erasure of the memory in the predetermined unit is performed. The first
The data is transmitted from the control board to the second control board, and the data is rewritten for each unit of the flash memory in which the memory erasure is completed.

【0018】これによれば、インターフェイスを介して
第1制御板に取り込まれる書き換えデータを使ってフラ
ッシュメモリの内容を書き換えるにあたって、第2制御
板におけるフラッシュメモリのメモリ消去を所定単位毎
に分けて行うようにし、その所定単位毎のメモリ消去中
に第1制御板がインターフェイスを介して取り込んだ書
き換えデータを第1制御板から第2制御板へ送信し、メ
モリ消去が終了したフラッシュメモリの各単位毎にデー
タを書き換えるようにした。このため、制御板を複数設
けて相互に通信回線で接続し、制御板のレイアウトに自
由度を持たせるように構成しても、時間効率の良いプロ
グラムの書き換えを行うことができる。
According to this, when rewriting the contents of the flash memory using the rewriting data taken into the first control board via the interface, the memory erasure of the flash memory in the second control board is performed for each predetermined unit. The first control board transmits the rewrite data fetched via the interface from the first control board to the second control board during the memory erasing of the predetermined unit, and the memory is erased for each unit of the flash memory. To rewrite data. For this reason, even if a plurality of control boards are provided and connected to each other by a communication line, and the configuration of the control boards is configured to have a degree of freedom, it is possible to rewrite a program with high time efficiency.

【0019】[0019]

【発明の実施の形態】以下、本発明の一実施の形態を図
面に基づいて詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below in detail with reference to the drawings.

【0020】(実施の形態1)図1は、本実施の形態1
に係る情報処理装置10の概略構成を示すブロック図で
ある。図1に示した情報処理装置10は、第1制御板1
2と第2制御板32とがそれぞれ別に配置され、相互に
通信回線としてのシリアル回線60で接続されていると
共に、第1制御板12には装置外部からICカード50
を挿入して、プログラムデータ等を取り込むことが可能
なインターフェイスとしての不図示のコネクタが設けら
れている。第2制御板32は、ここではコネクタ等の取
り付けが困難な装置内部に設けられている。
(Embodiment 1) FIG. 1 shows Embodiment 1 of the present invention.
1 is a block diagram illustrating a schematic configuration of an information processing apparatus 10 according to the first embodiment. The information processing apparatus 10 shown in FIG.
The second control board 32 and the second control board 32 are separately arranged and connected to each other by a serial line 60 as a communication line.
, And a connector (not shown) as an interface capable of taking in program data and the like. The second control plate 32 is provided inside the device where it is difficult to attach a connector or the like here.

【0021】そして、上記した第1制御板12と第2制
御板32の構成は、共にCPU20,40に対して、R
AM14,34、フラッシュメモリ16,36、およ
び、UART(Universal Asynchronous Receiver and
Transmitter)18,38がそれぞれCPUバスで相互に
接続されている。さらに、第1制御板12においては、
CPU20とICカード50とが不図示のインターフェ
イスを介してCPUバスで接続されている。
The configuration of the first control plate 12 and the second control plate 32 described above both
AM 14, 34, flash memory 16, 36, and UART (Universal Asynchronous Receiver and
Transmitters 18 and 38 are mutually connected by a CPU bus. Further, in the first control plate 12,
The CPU 20 and the IC card 50 are connected via a CPU bus via an interface (not shown).

【0022】第1制御板12および第2制御板32のR
AM14,34は、それぞれCPU20,40の実行命
令に必要なスタックやその他のワーク用の書き換え可能
なメモリである。特に、第2制御板32のRAM34で
は、プログラムデータを書き換えるための書き換え実行
プログラムが一時的に書き込まれてそこで実行された
り、第2制御板32が受信した書き換えデータをフラッ
シュメモリ36に書き込むまで一時保持したりしてい
る。
The R of the first control plate 12 and the second control plate 32
The AMs 14 and 34 are rewritable memories for stacks and other works necessary for execution instructions of the CPUs 20 and 40, respectively. In particular, in the RAM 34 of the second control board 32, a rewriting execution program for rewriting the program data is temporarily written and executed there, or the rewriting data received by the second control board 32 is temporarily written until it is written into the flash memory 36. Or holding.

【0023】第1制御板12および第2制御板32のフ
ラッシュメモリ(FLASH MEMORY)16,36は、CPU
20,40の実行命令、および、これに必要なデータを
格納する書き換え可能な不揮発性メモリである。
The flash memories (FLASH MEMORY) 16 and 36 of the first control board 12 and the second control board 32 have a CPU
It is a rewritable nonvolatile memory that stores 20, 40 execution instructions and data necessary for the instructions.

【0024】第1制御板12および第2制御板32のU
ART18,38は、非同期のシリアル伝送用LSIを
用いたトランシーバ装置であって、その通信速度は、こ
こでは9600bpsであり、データ長8ビット、スト
ップビット1、パリティビットありとした条件では、1
キャラクタ=10ビットとなり、1キャラクタの所要時
間=約1.04mSとなる。
U of the first control plate 12 and the second control plate 32
Each of the ARTs 18 and 38 is a transceiver device using an asynchronous serial transmission LSI, and has a communication speed of 9600 bps here and a data length of 8 bits, 1 stop bit, and 1 parity bit.
Character = 10 bits, and required time per character = approximately 1.04 ms.

【0025】シリアル回線(通信回線)60は、第1制
御板12のUART18と第2制御板32のUART3
8とを相互に接続する双方向のシリアル通信回線であ
り、図中の上の線は第1制御板12から第2制御板32
へデータを送信する回線であり、下の線は第2制御板3
2から第1制御板12へデータを送信する回線である。
The serial line (communication line) 60 is connected to the UART 18 of the first control board 12 and the UART 3 of the second control board 32.
8 are mutually connected, and the upper line in the figure is the first control board 12 to the second control board 32.
Is a line for transmitting data to the second control board 3
2 is a line for transmitting data to the first control board 12.

【0026】また、ダウンロードの指示、その処理過程
・経過のモニタ、ベリファイの指示、その処理過程・結
果をモニタをするための操作パネルについては、第1制
御板12に接続される場合と、第2制御板32に接続さ
れる場合との両方が考えられる。本実施の形態1では、
第1制御板12に上記のような操作パネルが接続されて
いるものとして説明する(図1中では図示しない)。
An operation panel for downloading, monitoring the process and progress of the download, verifying the process, and monitoring the process and the result is connected to the first control board 12, Both the case where it is connected to the 2 control board 32 is considered. In the first embodiment,
Description will be given assuming that the above-described operation panel is connected to the first control plate 12 (not shown in FIG. 1).

【0027】また、情報処理装置10の構成ではない
が、第1制御板12に接続されるICカード50のダウ
ンロードプログラムの格納方式としては、以下の2つの
方式がある。
Although not the configuration of the information processing apparatus 10, the following two methods are available for storing the download program of the IC card 50 connected to the first control board 12.

【0028】第1制御板12と第2制御板32のフラ
ッシュメモリ16,36に格納すべきプログラムが再現
可能な容量を持ち合わせた1枚のICカードに格納され
ているもの(第1制御板用と第2制御板用のプログラム
の格納アドレスが予め分けられているもの)。
The programs to be stored in the flash memories 16 and 36 of the first control board 12 and the second control board 32 are stored in a single IC card having a reproducible capacity (for the first control board). And the storage address of the program for the second control board is divided in advance).

【0029】第1制御板用のプログラムが格納された
ICカードと、第2制御板用のプログラムが格納された
ICカードの2枚を用意し、どちらのプログラムが格納
されているかはICカードの固定アドレスに識別子を予
め格納しておくか、ダウンロード、ベリファイ操作でI
Cカードを挿入した操作者が指定する方法などがありう
る。
An IC card storing a program for the first control board and an IC card storing a program for the second control board are prepared, and which program is stored is determined by the IC card. The identifier is stored in advance at the fixed address, or the I / O
There may be a method specified by the operator who inserted the C card.

【0030】本実施の形態1では、ICカードに格納さ
れたダウンロードのソースデータは、非圧縮での例を示
しているが、圧縮されている場合についても同様に扱う
ことができる。
Although the first embodiment shows an example in which the download source data stored in the IC card is uncompressed, the case where the source data is compressed can be handled in the same manner.

【0031】また、ICカード50の第1制御板12の
CPU20から見たアドレス空間と、第2制御板32か
ら見たフラッシュメモリのアドレス空間との違いは、デ
ータを送信する側で換算しても良いし、受信側で換算し
ても良く、あるいは、フラッシュメモリの先頭アドレス
からの相対アドレスとして送受信側それぞれで取り扱う
方式であっても良い。
The difference between the address space of the first control board 12 of the IC card 50 as viewed from the CPU 20 and the address space of the flash memory as viewed from the second control board 32 is converted on the data transmitting side. Alternatively, the conversion may be performed on the receiving side, or a method may be used in which each of the transmitting and receiving sides handles the address as a relative address from the head address of the flash memory.

【0032】さらに、アドレスとデータの送信方式に
は、アドレスをデータとセットで毎回送信するやり方
と、予めアドレスを申し合わせた上で、予め決められた
順にデータのみを送信するやり方とがある。本実施の形
態1では、この後者の方式を用いて送信を行うもので、
予め決められたアドレスから順にアドレスの昇順にした
がってインクリメンタルにデータが送信される。
Further, the transmission method of the address and the data includes a method of transmitting the address with the data every time as a set, and a method of transmitting the data only in a predetermined order after the address is previously agreed. In the first embodiment, transmission is performed using the latter method.
Data is transmitted incrementally in ascending order of addresses from a predetermined address.

【0033】このように構成された情報処理装置10を
用いて、ICカード50から第2制御板のフラッシュメ
モリ36にダウンロードされたデータと、ダウンロード
後のフラッシュメモリ36内のデータとが一致するかを
照合し、正確にプログラムデータがダウンロードされて
いるか否かを確認するベリファイ処理動作について以下
説明する。
Using the information processing apparatus 10 configured as described above, whether the data downloaded from the IC card 50 to the flash memory 36 of the second control board matches the data in the flash memory 36 after the download. Will be described below to verify whether or not the program data is correctly downloaded.

【0034】図2〜図6は、本実施の形態1に係るベリ
ファイ処理に関する動作を説明するフローチャートであ
る。まず、情報処理装置10がベリファイモードに入る
と、図1のシリアル回線60を通して第1制御板12、
第2制御板32は、ベリファイモードであることを認識
することができる。このベリファイモードの選択につい
ては、不図示の操作パネルにて行われる。本実施の形態
1のように操作パネルが第1制御板12に接続されてい
る場合は、第1制御板12から第2制御板32に対して
ベリファイモードになったことが通知される。
FIGS. 2 to 6 are flowcharts for explaining the operation relating to the verify processing according to the first embodiment. First, when the information processing apparatus 10 enters the verify mode, the first control board 12 through the serial line 60 in FIG.
The second control board 32 can recognize that the mode is the verify mode. The selection of the verify mode is performed on an operation panel (not shown). When the operation panel is connected to the first control board 12 as in the first embodiment, the first control board 12 notifies the second control board 32 that the verify mode has been set.

【0035】次に、操作パネル上のベリファイキーを操
作すると、ベリファイ動作がスタートする。図2は、第
1制御板12のICカードデータ送信処理を説明するフ
ローチャートである。図2に示されるように、第1制御
板12では、ICカード50からプログラムデータをリ
ードし、第2制御板32においてベリファイを行うため
に、データを順に第2制御板32へ送信する処理が行わ
れる。
Next, when a verify key on the operation panel is operated, a verify operation starts. FIG. 2 is a flowchart illustrating an IC card data transmission process of the first control board 12. As shown in FIG. 2, the first control board 12 reads the program data from the IC card 50 and transmits the data to the second control board 32 in order for the second control board 32 to perform the verification. Done.

【0036】まず、ICカードアクセスのためのポイン
タ1を第2制御板32のフラッシュメモリ用のアドレス
の先頭に初期化する(ステップS1)。本実施の形態1
では、ベリファイアドレス範囲のアドレス昇順における
前半部分を第2制御板32でベリファイ処理し、後半部
分を第1制御板12でベリファイ処理するようにする。
この分割の単位は、任意であってCPUの処理能力等を
考慮して、双方におけるベリファイ時間が丁度同じにな
るように配分することが好ましく、その場合に処理時間
が最短となる。
First, the pointer 1 for accessing the IC card is initialized to the head of the flash memory address of the second control board 32 (step S1). Embodiment 1
In the first embodiment, the first half in the ascending order of the verify address range is subjected to the verifying process by the second control board 32, and the second half is verified by the first control board 12.
It is preferable that the unit of the division is arbitrary, and in consideration of the processing capability of the CPU, it is preferable to allocate the verify times to be exactly the same in both cases. In this case, the processing time is the shortest.

【0037】次いで、CPU20は、ポインタ1で示さ
れるアドレスのデータをリードし(ステップS2)、取
得したデータを第2制御板32に送信する(ステップS
3)。
Next, the CPU 20 reads the data at the address indicated by the pointer 1 (step S2), and transmits the obtained data to the second control board 32 (step S2).
3).

【0038】そして、次のデータをインデックスとする
ためにポインタをインクリメントする(ステップS
4)。次いで、ポインタ1と終了アドレスとを比較し
て、第2制御板32のフラッシュメモリ用の空間の半分
まで済んだか否かを判断し(ステップS5)、済んでい
なければステップS2に戻って上記データの送信処理が
繰り返され、決められたデータの送信が終了していれば
図2のフローが終了する。
Then, the pointer is incremented so that the next data is used as an index (step S).
4). Next, the pointer 1 is compared with the end address to determine whether or not half of the space for the flash memory of the second control board 32 has been completed (step S5). The data transmission process is repeated, and if the transmission of the determined data has been completed, the flow of FIG. 2 ends.

【0039】なお、図2のステップS3において、第1
制御板12から第2制御板32にリードデータを送信す
る場合については、当然ながらUART18の送信バッ
ファのレディや採用する通信プロトコル上での送信条件
の規定に合わせた待ち合わせ制御が行われており、以降
のフローチャートの説明の中でデータが送信される場合
についても、UART18,38において同様の制御が
行われているものとする。
In step S3 of FIG. 2, the first
When the read data is transmitted from the control board 12 to the second control board 32, the queuing control is performed according to the readyness of the transmission buffer of the UART 18 and the transmission condition on the communication protocol to be adopted. It is assumed that the same control is performed in the UARTs 18 and 38 also when data is transmitted in the following description of the flowchart.

【0040】次に、図3の第2制御板32側でのベリフ
ァイ処理について説明する。図3は、第2制御板のベリ
ファイ処理のフローチャートであり、図2の処理によっ
て第1制御板から受信したデータとフラッシュメモリと
の比較処理を第2制御板において行うものである。
Next, the verifying process on the second control plate 32 side in FIG. 3 will be described. FIG. 3 is a flowchart of the verifying process of the second control board. The second control board compares the data received from the first control board with the flash memory by the processing of FIG.

【0041】図3に示すように、フラッシュメモリアク
セスのためのリードポインタ4をフラッシュメモリの先
頭アドレスに初期化し(ステップS11)、第1制御板
12からの受信データ待ちをして(ステップS12)、
データの受信があるとポインタ4で示されるアドレスの
データをリードして、フラッシュメモリ36のデータ
(以下、FDATAという)としてRAM34に一時格
納する(ステップS13)。
As shown in FIG. 3, the read pointer 4 for accessing the flash memory is initialized to the head address of the flash memory (step S11), and data waiting from the first control board 12 is waited (step S12). ,
When the data is received, the data at the address indicated by the pointer 4 is read and temporarily stored in the RAM 34 as data in the flash memory 36 (hereinafter, referred to as FDATA) (step S13).

【0042】また、受信したデータは、ICカードの比
較データ(以下、CDATAという)としてRAM34
に一時格納される。CPU40は、ステップS14でF
DATAとCDATAとが一致していたら、次のアドレ
スのためにポインタをインクリメントする(ステップS
15)。そして、ステップS16でポインタ4と終了ア
ドレスとを比較して、第2制御板32のフラッシュメモ
リ36用の空間の半分まで済んだか否かを判断し(ステ
ップS16)、まだ済んでいない場合はステップS12
に戻って比較動作が繰り返される。また、ステップS1
6で決められたデータの比較が終了してい屡場合は、第
1制御板12に対してベリファイの成功終了を送信して
(ステップS17)、このフローチャートが終了する。
The received data is stored in the RAM 34 as comparison data (hereinafter referred to as CDATA) of the IC card.
Is stored temporarily. The CPU 40 determines F in step S14.
If DATA and CDATA match, the pointer is incremented for the next address (step S
15). Then, in step S16, the pointer 4 is compared with the end address to determine whether or not half of the space for the flash memory 36 of the second control board 32 has been completed (step S16). S12
And the comparison operation is repeated. Step S1
If the comparison of the data determined in step 6 has been completed, a successful completion of the verification is transmitted to the first control board 12 (step S17), and this flowchart ends.

【0043】一方、ステップS14において、比較した
データが不一致の場合には、第1制御板12に対してベ
リファイの失敗終了を送信し(ステップS18)、ポイ
ンタ4で示す不一致アドレスと、フラッシュメモリのデ
ータ(FDATA)と、ICカードの比較データ(CD
ATA)とを第1制御板12に送信する(ステップS1
9)。すなわち、上記のようなベリファイエラーが発生
した場合には、その時点で比較動作を終了する。
On the other hand, if the compared data do not match in step S14, a verification failure end is transmitted to the first control board 12 (step S18), and the mismatch address indicated by the pointer 4 and the flash memory Data (FDATA) and IC card comparison data (CD
ATA) to the first control board 12 (step S1).
9). That is, when the above-described verify error occurs, the comparison operation is terminated at that time.

【0044】なお、フローチャート上では説明していな
いが、第1制御板12がベリファイエラーを第2制御板
32から受信すると、未送信であるCDATAを送信し
ないようにする。
Although not described in the flowchart, when the first control board 12 receives a verify error from the second control board 32, it prevents the untransmitted CDATA from being transmitted.

【0045】次に、後半部分のベリファイ処理動作につ
いて説明する。図4は、第2制御板32のICカードデ
ータ送信処理のフローチャートである。図4では、第2
制御板32のフラッシュメモリ36からデータをリード
して、第1制御板12においてベリファイ処理を行うた
めに、データを順に第1制御板12へ送信するようにす
る。
Next, the verifying operation in the latter half will be described. FIG. 4 is a flowchart of the IC card data transmission process of the second control board 32. In FIG. 4, the second
Data is read from the flash memory 36 of the control board 32 and the data is sequentially transmitted to the first control board 12 so that the first control board 12 performs the verifying process.

【0046】まず、フラッシュメモリ36に対してアク
セスするためのポインタ3をフラッシュメモリ後半の先
頭に初期化する(ステップS21)。次に、ポインタ3
で示されるアドレスのデータをリードして(ステップS
22)、その取得したデータを第1制御板12へ送信す
る(ステップS23)。そして、次のデータをインデッ
クスするためにポインタ3をインクリメントする(ステ
ップS24)。
First, the pointer 3 for accessing the flash memory 36 is initialized to the head of the latter half of the flash memory (step S21). Next, pointer 3
Is read (step S).
22), and transmits the obtained data to the first control board 12 (step S23). Then, the pointer 3 is incremented to index the next data (step S24).

【0047】次いで、ポインタ3と終了アドレスとを比
較して、第2制御板32のフラッシュメモリ36用の空
間の最後まで済んでいるか否かを判断し、(ステップS
25)、まだ済んでいない場合はステップS22に戻っ
て第1制御板12に対してフラッシュメモリのデータを
送信し、決められたデータの送信が終了していればこの
フローチャートが終了する。
Next, by comparing the pointer 3 with the end address, it is determined whether or not the end of the space for the flash memory 36 of the second control board 32 has been completed (Step S).
25) If not completed, the flow returns to step S22 to transmit the data of the flash memory to the first control board 12, and if the transmission of the determined data has been completed, this flowchart ends.

【0048】次に、図5のフローチャートを使って第1
制御板12側における処理を説明する。図5は、第1制
御板12のベリファイ処理のフローチャートであり、図
4で第2制御板32から第1制御板12が受信したフラ
ッシュメモリのデータと、ICカードのデータとを比較
する処理である。
Next, using the flowchart of FIG.
Processing on the control plate 12 side will be described. FIG. 5 is a flowchart of the verifying process of the first control board 12, which is a process of comparing the data of the flash memory received by the first control board 12 from the second control board 32 with the data of the IC card in FIG. is there.

【0049】まず、ICカード50にアクセスするため
のリードポインタ2をICカード50の第2制御板のフ
ラッシュメモリ用のアドレスの後半の先頭アドレスに初
期化する(ステップS31)。第1制御板12のCPU
20は、第2制御板32から比較データが受信されるの
を待ち(3−2)、データの受信があるとポインタ2で
示されるICカード50データをリードしてCDATA
としてRAM14に一時格納する(ステップS33)。
また、受信されたデータは、FDATAとしてRAM1
4に一時格納される。
First, the read pointer 2 for accessing the IC card 50 is initialized to the latter half of the address for the flash memory of the second control board of the IC card 50 (step S31). CPU of first control board 12
20 waits for the comparison data to be received from the second control board 32 (3-2), and upon receiving the data, reads the IC card 50 data indicated by the pointer 2 to read the CDATA.
Is temporarily stored in the RAM 14 (step S33).
The received data is stored in RAM1 as FDATA.
4 is temporarily stored.

【0050】ステップS34において、FDATAとC
DATAとが一致している場合は、次のアドレスのため
にポインタ2をインクリメントする(ステップS3
5)。そして、ポインタ2と終了アドレスとを比較し
て、第2制御板32のフラッシュメモリ36用の空間の
最後まで済んでいるか否かを判断する(ステップS3
6)。まだ済んでいない場合は、ステップS32に戻っ
てFDATAとCDATAとの比較処理が繰り返される
が、決められたデータの比較が終了していれば、このフ
ローチャートが終了する。
In step S34, FDATA and C
If DATA matches, the pointer 2 is incremented for the next address (step S3).
5). Then, by comparing the pointer 2 with the end address, it is determined whether the end of the space for the flash memory 36 of the second control board 32 has been completed (step S3).
6). If not, the process returns to step S32 to repeat the comparison process between FDATA and CDATA. If the comparison of the determined data has been completed, this flowchart ends.

【0051】一方、ステップS34において比較データ
が不一致の場合は、ポインタ2の不一致アドレスと、フ
ラッシュメモリのデータ(FDATA)と、ICカード
の比較データ(CDATA)とを不図示の操作パネルに
表示するようにする(ステップS37)。すなわち、ベ
リファイエラーが発生した場合には、その時点で比較が
終了する。
On the other hand, if the comparison data does not match in step S34, the mismatch address of the pointer 2, the data in the flash memory (FDATA), and the comparison data in the IC card (CDATA) are displayed on an operation panel (not shown). (Step S37). That is, when a verify error occurs, the comparison ends at that point.

【0052】なお、図5のフローチャート上では説明し
ていないが、第1制御板12から第2制御板32に対し
てベリファイエラーを送信し、第2制御板32がベリフ
ァイエラーを受け取ると、第2制御板32の未送信のF
DATAについて送信しないようにする。
Although not described in the flowchart of FIG. 5, when a verify error is transmitted from the first control board 12 to the second control board 32 and the second control board 32 receives the verify error, 2 Untransmitted F of control board 32
Do not transmit about DATA.

【0053】次に、ベリファイの終了処理について図6
を用いて説明する。図6は、第1制御板のベリファイ終
了処理のフローチャートであるが、第2制御板のベリフ
ァイ処理の終了についても合わせて説明している。ま
ず、第2制御板32におけるベリファイ処理が終了する
のを待って(ステップS41)、第2制御板32のベリ
ファイ処理が終了すると、そのベリファイ処理が成功か
否かを調べる(ステップS42)。第2制御板32のベ
リファイ処理が成功した場合は、第1制御板12におけ
るベリファイ処理が終了するのを待って(ステップS4
3)、第1制御板12のベリファイ処理が終了すると、
そのベリファイ処理が成功したか否かを調べる(ステッ
プS44)。第1制御板12のベリファイ処理も成功し
た場合は、全てのベリファイ処理が成功終了した旨を操
作パネルに表示する(ステップS45)。
Next, the end processing of the verification will be described with reference to FIG.
This will be described with reference to FIG. FIG. 6 is a flowchart of the verify end processing of the first control board, but also explains the end of the verify processing of the second control board. First, the process waits for the end of the verification process in the second control board 32 (step S41), and when the verification process of the second control board 32 ends, checks whether the verification process is successful (step S42). If the verification process of the second control board 32 is successful, the process waits for the completion of the verification process of the first control board 12 (step S4).
3), when the verification process of the first control plate 12 is completed,
It is checked whether or not the verification process has succeeded (step S44). If the verification process of the first control board 12 is also successful, a message indicating that all the verification processes have been successfully completed is displayed on the operation panel (step S45).

【0054】また、ステップS42において、第2制御
板32のベリファイ処理が失敗した場合は、アドレス前
半部分で不一致ありということを意味しており、第1制
御板12のベリファイ処理が終了したことのみを待って
(ステップS46)、操作パネルに対してエラーアドレ
スとデータ(FDATAとCDATA)とを表示し(ス
テップS47)、ベリファイが失敗した旨を表示する
(ステップS47)。
If the verification processing of the second control board 32 fails in step S42, it means that there is a mismatch in the first half of the address, and only that the verification processing of the first control board 12 is completed. (Step S46), an error address and data (FDATA and CDATA) are displayed on the operation panel (step S47), and a message indicating that the verification has failed is displayed (step S47).

【0055】もし、第1制御板12のベリファイ処理で
エラーが発生していれば、既に図5のステップS37に
おいて、エラーアドレスとデータ(FDATAとCDA
TA)とが操作パネル上に表示されている。
If an error has occurred in the verifying process of the first control board 12, the error address and data (FDATA and CDA) have already been set in step S37 of FIG.
TA) is displayed on the operation panel.

【0056】また、第2制御板32のベリファイ処理が
成功であって(ステップS42でYES)、第1制御板
12のベリファイ処理が失敗した場合は(ステップS4
4でNO)、アドレス後半部分で不一致ありということ
を意味しており、操作パネルに対してベリファイが失敗
したことを表示する(ステップS49)。なお、エラー
アドレスとデータ(FDATAとCDATA)について
は、図5のステップS37において操作パネル上に既に
表示されている。
If the verification processing of the second control board 32 is successful (YES in step S42) and the verification processing of the first control board 12 fails (step S4).
No at step 4), meaning that there is a mismatch in the latter half of the address, and the fact that verification has failed is displayed on the operation panel (step S49). The error address and data (FDATA and CDATA) have already been displayed on the operation panel in step S37 in FIG.

【0057】このように、本実施の形態1では、前半後
半それぞれ1アドレスずつとなり、2アドレス分の表示
が可能となる。
As described above, in the first embodiment, one address is provided for each of the first half and the second half, and display for two addresses is possible.

【0058】次に、図7〜図9を用いて本実施の形態1
と比較例とのベリファイ処理時間の違いについて説明す
る。図7は、第2制御板のフラッシュメモリから全ての
プログラムを第1制御板に送信して第1制御板でベリフ
ァイ処理する場合の送信時間とベリファイ処理時間を示
す比較例の図であり、また、図8は、第1制御板のIC
カードから全てのプログラムを第2制御板に送信して第
2制御板でベリファイ処理する場合の送信時間とベリフ
ァイ処理時間を示す比較例の図である。図9は、ベリフ
ァイデータを2分割(前半・後半)して第1制御板側と
第2制御板側で同時並行的にベリファイ処理する場合の
送信時間とベリファイ処理時間を示す本実施の形態1の
図である。
Next, the first embodiment will be described with reference to FIGS.
The difference in the verify processing time between the present embodiment and the comparative example will be described. FIG. 7 is a diagram of a comparative example showing the transmission time and the verify processing time when all programs are transmitted from the flash memory of the second control board to the first control board and the first control board performs the verify processing; FIG. 8 shows the IC of the first control board.
FIG. 11 is a diagram of a comparative example showing a transmission time and a verification processing time when all programs are transmitted from a card to a second control board and the second control board performs a verification process. FIG. 9 shows the transmission time and the verify processing time when the verify data is divided into two parts (the first half and the latter half) and the first control board side and the second control board side perform the verify processing simultaneously and in parallel. FIG.

【0059】図7や図8に示した比較例では、第2制御
板→第1制御板のように、フラッシュメモリのプログラ
ム全てを第2制御板から第1制御板にシリアル送信した
り(操作パネルが第1制御板に付いている場合)、第1
制御板→第2制御板のように、ICカードのプログラム
全てを第1制御板から第2制御板にシリアル送信したり
する場合は(操作パネルが第2制御板に付いている場
合)、ベリファイデータとして比較するデータを一方か
ら他方の側へ全て送信して、その送信先でベリファイ処
理が行われるため、このベリファイ処理時間のほとんど
がシリアル送信時間で占められてしまう。このベリファ
イ処理時間は、このシリアル送信時間と比べると短い時
間で済むため、実際のベリファイ処理の占有率は小さい
が、送信されたプログラムデータを使って比較処理を行
わなければならないため、期間としては転送とベリファ
イ処理期間とが同じとなり、長い時間が必要であった
(図7および図8の右欄の矩形マスの長さが処理時間に
比例)。
In the comparative examples shown in FIGS. 7 and 8, the entire program of the flash memory is serially transmitted from the second control board to the first control board, such as the second control board → the first control board. If the panel is attached to the first control plate), the first
In the case where the entire program of the IC card is serially transmitted from the first control board to the second control board as in the case of the control board → the second control board (when the operation panel is attached to the second control board), the verification is performed. Since all the data to be compared are transmitted from one side to the other side, and the verifying process is performed at the destination, most of the verifying process time is occupied by the serial transmission time. The verification processing time is shorter than the serial transmission time, so the actual occupation ratio of the verification processing is small. However, the comparison processing must be performed using the transmitted program data. The transfer and verify processing periods are the same, and a long time is required (the length of the rectangular cell in the right column of FIGS. 7 and 8 is proportional to the processing time).

【0060】これに対し、図9に示した本実施の形態1
の場合は、ベリファイデータを前半と後半とに分けて、
双方向のシリアル通信回線を同時に使用し、第2制御板
→第1制御板と第1制御板→第2制御板にそれぞれ送信
して、第1制御板および第2制御板の両方で同時並行的
にベリファイ処理を行うようにしたため、ベリファイ処
理時間の大半を占めるシリアル送信時間が半減し、それ
に伴ってベリファイ処理時間を大幅に短縮することが可
能である(矩形マスの長さが比較例と比べると約半分に
なっている)。
On the other hand, the first embodiment shown in FIG.
In the case of, the verification data is divided into the first half and the second half,
Using a bidirectional serial communication line at the same time, transmitting to the second control board → the first control board and the first control board → the second control board, respectively, and simultaneously performing both the first control board and the second control board at the same time Since the verification processing is performed in a specific manner, the serial transmission time, which occupies most of the verification processing time, is halved, and accordingly, the verification processing time can be significantly reduced. It is about half in comparison).

【0061】以上述べたように、本実施の形態1によれ
ば、制御板を複数設けて相互に通信回線で接続し、制御
板のレイアウトに自由度を持たせることができると共
に、このような構成であってもベリファイ時間を大幅に
短縮することができる。
As described above, according to the first embodiment, a plurality of control boards can be provided and connected to each other via a communication line, so that the layout of the control boards can be made more flexible. Even with this configuration, the verification time can be significantly reduced.

【0062】(実施の形態2)次に、上記図1のように
構成された情報処理装置10を用いて、ICカード50
に格納されたプログラムデータを第1制御板12から第
2制御板32に送信してフラッシュメモリ36のプログ
ラムデータを書き換えるダウンロード処理について以下
説明する。
(Embodiment 2) Next, using the information processing apparatus 10 configured as shown in FIG.
A download process for transmitting the program data stored in the flash memory 36 from the first control board 12 to the second control board 32 to rewrite the program data in the flash memory 36 will be described below.

【0063】一般に、フラッシュメモリの消去方法に
は、チップ全体を一括消去するチップイレースと、チッ
プ全体をいくつかのセクタに分割し、このセクタ単位で
消去するセクタイレースとがある。そして、チップイレ
ース時間とセクタイレース時間との関係は、セクタイレ
ース時間×全セクタ数となる(ここでは、プリプログラ
ムについては除外している)。
In general, flash memory erasing methods include chip erasing in which the entire chip is erased at once, and sector erasing in which the entire chip is divided into several sectors and erased in units of sectors. The relationship between the chip erase time and the sector erase time is (sector erase time × the total number of sectors) (here, the preprogramming is excluded).

【0064】そこで、第2制御板32では、ダウンロー
ドモードになったことの通知を第1制御板12から受け
ると、ダウンロード処理に必要なプログラムをフラッシ
ュメモリ36からRAM34にコピーし、その後プログ
ラムカウンタをコピーしたRAM34上のプログラムに
切り換える(第2制御板32のダウンロードモードへの
移行処理の完了)。なお、この移行処理を行う前には、
その他の制御を完結させておく処理を入れる必要がある
(例えば、負荷制御等のOFF処理など)。これによ
り、第2制御板32の処理としては、ダウンロードのみ
でよいことになり、この処理に必要なプログラムをコピ
ーする際に、RAM34の容量を抑えることができる。
ダウンロード時には、フラッシュメモリ36の内容を消
去してしまうため、フラッシュメモリ36を使ったプロ
グラムの実行ができなくなる。また、RAM34の容量
を抑えることによって、後述するように、フラッシュメ
モリのセクタイレース中の該当セクタへの書き込みデー
タが先行送信された場合に、受信バッファとしてRAM
34を使用する際に多くの容量を割り当てることが可能
になる。
When the second control board 32 receives a notification from the first control board 12 that the download mode has been entered, the program necessary for the download process is copied from the flash memory 36 to the RAM 34, and then the program counter is reset. The program is switched to the copied program on the RAM 34 (the process of shifting the second control board 32 to the download mode is completed). Before performing this transition process,
It is necessary to include a process for completing other controls (for example, an OFF process such as a load control). As a result, the process of the second control board 32 only needs to be downloaded, and the capacity of the RAM 34 can be reduced when copying a program necessary for this process.
At the time of downloading, the contents of the flash memory 36 are erased, so that the program using the flash memory 36 cannot be executed. Also, by suppressing the capacity of the RAM 34, as described later, when write data to the corresponding sector during the sector erase of the flash memory is transmitted in advance, the RAM 34 is used as a reception buffer.
It is possible to allocate a large capacity when using the C.34.

【0065】なお、この方法を実施する場合は、少なく
とも第2制御板32の書き換え前のダウンロードプログ
ラム(RAM34上で実行されるプログラム)と第1制
御板12のダウンロードプログラムとの間で互換性が保
たれている必要がある。
When this method is performed, compatibility between at least the download program of the second control board 32 before rewriting (the program executed on the RAM 34) and the download program of the first control board 12 must be compatible. Need to be kept.

【0066】図10は、本実施の形態2に係る第1制御
板の書き換え処理に関する動作を説明するフローチャー
トであり、その後の処理を図10を用いて説明する。こ
の図10では、同時に図示しない第2制御板32におけ
る処理についても併記することにする。
FIG. 10 is a flow chart for explaining the operation relating to the rewriting processing of the first control board according to the second embodiment, and the subsequent processing will be described with reference to FIG. In FIG. 10, the processing in the second control plate 32 (not shown) is also described.

【0067】まずはじめに、セクタ番号を初期化する
(ステップS51)。次いで、第1制御板12から第2
制御板32へ消去セクタ番号として「セクタ番号」を送
信し(ステップS52)、第2制御板32では、これを
受信すると、該当セクタ消去コマンドをフラッシュメモ
リ36に書き込む。セクタ消去コマンド発行後は、その
終了をポーリングにて監視する。そして、消去終了が認
識されると第1制御板12に対してその旨を送信する。
First, the sector number is initialized (step S51). Then, from the first control plate 12 to the second
The "sector number" is transmitted to the control board 32 as an erase sector number (step S52), and upon receiving this, the second control board 32 writes the corresponding sector erase command to the flash memory 36. After issuing the sector erase command, the end is monitored by polling. When the end of the erasure is recognized, the fact is transmitted to the first control board 12.

【0068】次いで、ダウンロードデータをICカード
50からリードするためのポインタ5を該当セクタの先
頭アドレスに初期化する(ステップS53)。セクタ番
号と先頭アドレス、最終アドレスとの関係は、第1制御
板12のフラッシュメモリ16、もしくはICカード5
0にデータテーブルの形態などで格納される。
Next, the pointer 5 for reading the download data from the IC card 50 is initialized to the head address of the corresponding sector (step S53). The relationship between the sector number and the start address and end address is determined by the flash memory 16 of the first control board 12 or the IC card 5
0 is stored in the form of a data table.

【0069】ステップS54では、ポインタ5にて示さ
れるICカード50のアドレスのデータをリードし、第
2制御板36のRAM34が受信バッファフルか否かを
判断して、受信バッファフルでなければそのリードデー
タを第2制御板36に送信する(ステップS56)。
In step S54, the data of the address of the IC card 50 indicated by the pointer 5 is read, and it is determined whether or not the RAM 34 of the second control board 36 is full. The read data is transmitted to the second control board 36 (step S56).

【0070】次いで、ポインタ5をインクリメントし
(ステップS57)、そのインクリメントしたポインタ
5の現在のセクタ番号が最終アドレスか否かを見て(ス
テップS58)、最終アドレスでなければ上記動作が繰
り返される。
Next, the pointer 5 is incremented (step S57), and it is checked whether or not the current sector number of the incremented pointer 5 is the last address (step S58). If not, the above operation is repeated.

【0071】なお、第2制御板36の受信データを一時
格納する受信バッファ(RAM34)の容量には上限が
あるため、受信バッファがいっぱいになると送信は一時
的に中止される(ステップS55)。この送信が一時的
に中止されるタイミングについては、セクタ消去時間、
シリアル送信レート、セクタ容量などに応じて異なって
くる。
Since the capacity of the reception buffer (RAM 34) for temporarily storing the reception data of the second control board 36 has an upper limit, the transmission is temporarily stopped when the reception buffer becomes full (step S55). The timing at which this transmission is temporarily stopped includes the sector erase time,
It differs depending on the serial transmission rate, sector capacity, and the like.

【0072】1セクタ分のデータ転送が終了した場合
は、セクタ消去の終了と該当セクタの書き込みが終了す
るのを待つ(ステップS59)。第2制御板32では、
セクタ消去が終了すると受信済みのダウンロードデータ
を順次消去したセクタへの書き込む処理が行われる。こ
の書き込み動作によって受信バッファに空きが生じる
と、受信バッファレディを第1制御板12に送信する。
これによって、ステップS55が影響を受ける。該当セ
クタへの書き込みが終了するとその旨を第1制御板12
へ送信する。
If the data transfer for one sector has been completed, the process waits for the end of the sector erase and the end of the writing of the sector (step S59). In the second control plate 32,
When the sector erase is completed, a process of writing the received download data to the sequentially erased sector is performed. When a space is left in the reception buffer due to the writing operation, the reception buffer ready is transmitted to the first control board 12.
This affects step S55. When the writing to the corresponding sector is completed, the first control board 12
Send to

【0073】ステップS58では、セクタへの書き込み
が終了してYESとなると、最終セクタまで終了したの
か否かの判断がなされ(ステップS60)、終了してい
ればフローチャートが終了するが、そうでなければセク
タ番号をインクリメントした後(ステップS61)、上
記ステップS52へ戻り、最終セクタへの書き込みが終
了するまで繰り返し行われる。
In step S58, if the writing to the sector is completed and the answer is YES, it is determined whether or not the last sector has been completed (step S60). If completed, the flowchart ends, but if not, the flowchart ends. For example, after the sector number is incremented (step S61), the process returns to step S52, and is repeated until the writing to the last sector is completed.

【0074】次に、図11〜図13を用いて本実施の形
態2と比較例とのダウンロード処理時間の違いについて
説明する。図11は、フラッシュメモリのチップイレー
スを行いダウンロードデータをシリアル送信してプログ
ラムデータの書き換えを行う場合のフラッシュメモリア
クセス時間とシリアル送信時間とを示す比較例の図であ
る。図12は、フラッシュメモリをセクタイレースして
イレース期間中に当該セクタ内の全データが送りきれな
い場合のフラッシュメモリアクセス時間とシリアル送信
時間とを示す本実施の形態2の場合の図であり、図13
は、フラッシュメモリをセクタイレースしてイレース期
間中に当該セクタ内の全データが送りきれる場合のフラ
ッシュメモリアクセス時間とシリアル送信時間とを示す
本実施の形態2の場合の図である。
Next, the difference in the download processing time between the second embodiment and the comparative example will be described with reference to FIGS. FIG. 11 is a diagram of a comparative example showing a flash memory access time and a serial transmission time when rewriting program data by serially transmitting download data by performing chip erase of the flash memory. FIG. 12 is a diagram of the second embodiment showing the flash memory access time and the serial transmission time when all data in the sector cannot be sent during the erase period by erasing the sector of the flash memory. FIG.
FIG. 8 is a diagram of the second embodiment showing a flash memory access time and a serial transmission time when a flash memory is sector erased and all data in the sector can be sent during the erase period.

【0075】図11に示した比較例では、Eの期間中に
フラッシュメモリ36のチップイレースを行い、イレー
ス終了後にダウンロードデータをシリアル送信しながら
(図中のS)フラッシュメモリ36にデータを書き込ま
なくてはならないため(図中のW)、最も時間のかかる
シリアルデータ送信時間(S)とイレース期間(E)が
並行処理できないことから、ダウンロード時間が非常に
長くかかっていた。なお、フラッシュメモリへの書き込
み時間(W)とシリアルデータ送信時間(S)とは、同
じ時間で示してあるが、送信されてきたデータを書き込
むためであり、実際の書き込み時間(W)と比較する
と、1バイト当たりのシリアルデータの送信時間の方が
遥かに大である。
In the comparative example shown in FIG. 11, the chip erase of the flash memory 36 is performed during the period E, and the data is not written into the flash memory 36 while serially transmitting the download data after the erase is completed (S in the figure). (W in the figure), the serial data transmission time (S), which takes the longest time, and the erase period (E) cannot be processed in parallel, so that the download time is extremely long. Although the write time (W) to the flash memory and the serial data transmission time (S) are indicated by the same time, they are for writing the transmitted data, and are compared with the actual write time (W). Then, the transmission time of serial data per byte is much longer.

【0076】これに対して、実施の形態2に係るダウン
ロード時間をみると、図12に示すように、フラッシュ
メモリのセクタ容量が大であったり、シリアル通信レー
トが遅かったり、第2制御板の受信バッファが小の場合
は、イレース期間(E1,E2,E3)中に該当セクタ
内の全データがシリアル送信(S1,S2,S3)でき
なくなることが生じるが、図11の場合と比べると、ダ
ウンロード時間が大幅に短縮できていることが分かる。
これは、セクタイレースを採用し、時間のかかるシリア
ルデータ送信時間(S1,S2,S3)に対して、書き
込み時間(W1,W2,W3)とイレース時間(E)と
を並行処理するようにしたことによる。
On the other hand, looking at the download time according to the second embodiment, as shown in FIG. 12, the sector capacity of the flash memory is large, the serial communication rate is slow, When the reception buffer is small, all data in the corresponding sector cannot be serially transmitted (S1, S2, S3) during the erase period (E1, E2, E3). However, compared with the case of FIG. It can be seen that the download time has been significantly reduced.
This employs a sector erase, and the write time (W1, W2, W3) and the erase time (E) are processed in parallel with the time-consuming serial data transmission time (S1, S2, S3). It depends.

【0077】また、図13の場合は、図12とは逆に、
フラッシュメモリのセクタ容量が小であったり、シリア
ル通信レートが速かったり、第2制御板の受信バッファ
が大きい場合は、イレース期間(E1,E2,E3)中
に該当セクタ内の全データがシリアル送信(S1,S
2,S3)することが可能となり、図12の場合と比べ
ると、シリアル送信時間に書き込み時間(W1,W2,
W3)が影響されなくなる。このため、さらに効率の良
いダウンロードを行うことができることから、ダウンロ
ード時間を一層短縮することができる。
Also, in the case of FIG. 13, contrary to FIG.
If the sector capacity of the flash memory is small, the serial communication rate is high, or the reception buffer of the second control board is large, all data in the sector is serially transmitted during the erase period (E1, E2, E3). (S1, S
2, S3), and the serial transmission time and the writing time (W1, W2,
W3) is no longer affected. For this reason, more efficient download can be performed, and the download time can be further reduced.

【0078】この図13の場合は、第1制御板12にI
Cカード50がCPUバスを介して直結されている構成
でダウンロードされる場合と時間差が無くなる。これ
は、ダウンロード時間の内訳がフラッシュメモリの消去
(E)と書き込み時間(W)だけで占められることにな
るからである。
In the case of FIG. 13, the first control plate 12
There is no time difference from the case where the C card 50 is downloaded in a configuration directly connected via the CPU bus. This is because the breakdown of the download time is occupied only by the erase (E) and write time (W) of the flash memory.

【0079】以上述べたように、本実施の形態2によれ
ば、制御板を複数設けて相互に通信回線で接続し、制御
板のレイアウトに自由度を持たせることができると共
に、このような構成であっても時間効率の良いプログラ
ムの書き換え(ダウンロード等)を行うことができる。
As described above, according to the second embodiment, a plurality of control boards can be provided and connected to each other via a communication line, so that the layout of the control boards can be made more flexible. Even with the configuration, it is possible to rewrite (download, etc.) a program with a time efficiency.

【0080】[0080]

【発明の効果】以上説明したように、請求項1に記載の
発明によれば、制御板を複数設けて相互に通信回線で接
続し、制御板のレイアウトに自由度を持たせることがで
きると共に、上記のような構成であってもベリファイ時
間を大幅に短縮することができる。
As described above, according to the first aspect of the present invention, a plurality of control boards can be provided and connected to each other by a communication line, so that the layout of the control boards can be made more flexible. Even with the above configuration, the verification time can be greatly reduced.

【0081】また、請求項2に記載の発明によれば、制
御板を複数設けて相互に通信回線で接続し、制御板のレ
イアウトに自由度を持たせることができると共に、上記
のような構成であっても時間効率の良いプログラムの書
き換え(ダウンロード等)を行うことができる。
Further, according to the second aspect of the present invention, a plurality of control boards can be provided and connected to each other by a communication line, so that the layout of the control boards can be given a degree of freedom. Even in this case, it is possible to rewrite (download, etc.) the program with a time efficiency.

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

【図1】本実施の形態1に係る情報処理装置の概略構成
を示すブロック図である。
FIG. 1 is a block diagram illustrating a schematic configuration of an information processing apparatus according to a first embodiment.

【図2】第1制御板のICカードデータ送信処理を説明
するフローチャートである。
FIG. 2 is a flowchart illustrating an IC card data transmission process of a first control board.

【図3】第2制御板のベリファイ処理のフローチャート
である。
FIG. 3 is a flowchart of a verifying process of a second control board.

【図4】第2制御板のICカードデータ送信処理のフロ
ーチャートである。
FIG. 4 is a flowchart of an IC card data transmission process of a second control board.

【図5】第1制御板のベリファイ処理のフローチャート
である。
FIG. 5 is a flowchart of a verifying process of a first control board.

【図6】第1制御板のベリファイ終了処理のフローチャ
ートである。
FIG. 6 is a flowchart of a verify end process of a first control board.

【図7】第2制御板のフラッシュメモリから全てのプロ
グラムを第1制御板に送信して第1制御板でベリファイ
処理する場合の送信時間とベリファイ処理時間を示す比
較例の図である。
FIG. 7 is a diagram of a comparative example showing a transmission time and a verify processing time when all programs are transmitted from the flash memory of the second control board to the first control board and the first control board performs a verify process;

【図8】第1制御板のICカードから全てのプログラム
を第2制御板に送信して第2制御板でベリファイ処理す
る場合の送信時間とベリファイ処理時間を示す比較例の
図である。
FIG. 8 is a diagram of a comparative example showing a transmission time and a verification processing time when all programs are transmitted from the IC card of the first control panel to the second control panel and the second control panel performs a verify process.

【図9】ベリファイデータを2分割して第1制御板側と
第2制御板側で同時並行的にベリファイ処理する場合の
送信時間とベリファイ処理時間を示す本実施の形態1の
図である。
FIG. 9 is a diagram of the first embodiment showing a transmission time and a verify processing time when verify data is divided into two and verify processing is simultaneously and concurrently performed on a first control board side and a second control board side;

【図10】本実施の形態2に係る第1制御板の書き換え
処理に関する動作を説明するフローチャートである。
FIG. 10 is a flowchart illustrating an operation related to a rewriting process of a first control board according to the second embodiment.

【図11】フラッシュメモリのチップイレースを行いダ
ウンロードデータをシリアル送信してプログラムデータ
の書き換えを行う場合のフラッシュメモリアクセス時間
とシリアル送信時間とを示す比較例の図である。
FIG. 11 is a diagram of a comparative example showing a flash memory access time and a serial transmission time when rewriting program data by serially transmitting download data by performing chip erase of the flash memory.

【図12】フラッシュメモリをセクタイレースしてイレ
ース期間中に当該セクタ内の全データが送りきれない場
合のフラッシュメモリアクセス時間とシリアル送信時間
とを示す本実施の形態2の場合の図である。
FIG. 12 is a diagram illustrating a flash memory access time and a serial transmission time when a flash memory is sector erased and all data in the sector cannot be transmitted during an erase period according to the second embodiment.

【図13】フラッシュメモリをセクタイレースしてイレ
ース期間中に当該セクタ内の全データが送りきれる場合
のフラッシュメモリアクセス時間とシリアル送信時間と
を示す本実施の形態2の場合の図である。
FIG. 13 is a diagram illustrating a flash memory access time and a serial transmission time in a case where the flash memory is sector-erased and all data in the sector can be transmitted during the erase period according to the second embodiment.

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

10 情報処理装置 12 第1制御板 14,34 RAM 16,36 フラッシュメモリ 18,38 UART 20,40 CPU 32 第2制御板 60 シリアル回線 50 ICカード DESCRIPTION OF SYMBOLS 10 Information processing apparatus 12 1st control board 14,34 RAM 16,36 Flash memory 18,38 UART 20,40 CPU 32 2nd control board 60 Serial line 50 IC card

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 双方向の通信回線で第1制御板と第2制
御板とが互いに接続され、前記第2制御板は書き換え可
能メモリを有し、前記第1制御板は前記第2制御板の書
き換え可能メモリの内容を書き換える書き換えデータを
取り込むためのインターフェイスを有するメモリ書き換
え方法において、 前記インターフェイスを介して前記第1制御板に取り込
まれる書き換えデータと、前記第2制御板の書き換え可
能メモリの書き換え後のデータとのベリファイを行うに
あたって、ベリファイデータを少なくとも2つのアドレ
ス群に分割し、前記通信回線を介して前記第1制御板か
ら前記一方のアドレス群に属する各アドレス毎の書き換
えデータを第2制御板へ送信し、書き換え後の第2制御
板の書き換え可能メモリの内容と比較する処理と、前記
通信回線を介して前記第2制御板から前記他方のアドレ
ス群に属する各アドレス毎の前記書き換え可能メモリの
内容を前記第1制御板へ送信し、前記第1制御板のイン
ターフェイスから取り込まれる書き換えデータと比較す
る処理と、を並行処理するようにしたことを特徴とする
メモリ書き換え方法。
1. A first control board and a second control board are connected to each other by a bidirectional communication line, the second control board has a rewritable memory, and the first control board is the second control board. A memory rewriting method having an interface for taking in rewriting data for rewriting the contents of a rewritable memory, wherein the rewriting data taken into the first control board via the interface and the rewritable memory of the second control board are rewritten. In performing verification with the subsequent data, the verification data is divided into at least two address groups, and the rewrite data for each address belonging to the one address group is transmitted from the first control board to the second address group via the communication line. Transmitting to the control board and comparing with the contents of the rewritable memory of the second control board after rewriting; Rewriting data that is transmitted from the second control board to the first control board for each address belonging to the other address group from the second control board to the first control board via a communication line; A memory rewriting method, wherein a process of comparing with a process is performed in parallel.
【請求項2】 双方向の通信回線で第1制御板と第2制
御板とが互いに接続され、前記第2制御板はフラッシュ
メモリを有し、前記第1制御板は前記第2制御板のフラ
ッシュメモリの内容を書き換える書き換えデータを取り
込むためのインターフェイスを有するメモリ書き換え方
法において、 前記インターフェイスを介して前記第1制御板に取り込
まれる書き換えデータを使って前記フラッシュメモリの
内容を書き換えるにあたって、前記第2制御板における
フラッシュメモリのメモリ消去を所定単位毎に分けて行
うようにし、その所定単位毎のメモリ消去中に前記第1
制御板がインターフェイスを介して取り込んだ書き換え
データを前記第1制御板から前記第2制御板へ送信し、
メモリ消去が終了したフラッシュメモリの各単位毎にデ
ータの書き換えを行うようにしたことを特徴とするメモ
リ書き換え方法。
2. A first control board and a second control board are connected to each other by a bidirectional communication line, the second control board has a flash memory, and the first control board is a flash memory of the second control board. In a memory rewriting method having an interface for taking in rewriting data for rewriting the contents of a flash memory, when rewriting contents of the flash memory using rewriting data taken into the first control board through the interface, Erasing the memory of the flash memory in the control board is performed in units of a predetermined unit, and the first operation is performed during the erasing of the memory in the predetermined unit.
Transmitting rewriting data taken by the control board through the interface from the first control board to the second control board;
A memory rewriting method, wherein data is rewritten for each unit of a flash memory for which memory erasure has been completed.
JP11045344A 1999-02-23 1999-02-23 Memory reloading method Pending JP2000242488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11045344A JP2000242488A (en) 1999-02-23 1999-02-23 Memory reloading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11045344A JP2000242488A (en) 1999-02-23 1999-02-23 Memory reloading method

Publications (1)

Publication Number Publication Date
JP2000242488A true JP2000242488A (en) 2000-09-08

Family

ID=12716680

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11045344A Pending JP2000242488A (en) 1999-02-23 1999-02-23 Memory reloading method

Country Status (1)

Country Link
JP (1) JP2000242488A (en)

Similar Documents

Publication Publication Date Title
US9235546B2 (en) System and method for data read of a synchronous serial interface NAND
US20040093454A1 (en) USB endpoint controller flexible memory management
CN102646025B (en) Can to the storage card of the data additional temporal information obtained from network
KR100527610B1 (en) Storage devices, data processing systems, and how to record and read data
US7490194B2 (en) System and method for updating firmware in a non-volatile memory without using a processor
KR100987205B1 (en) External connection device, host device, and data communication system
US6954815B2 (en) Microcomputer with universal serial bus interface circuit and method of controlling the same
JP2002247252A (en) Image forming device
US8291270B2 (en) Request processing device, request processing system, and access testing method
CN115599424A (en) Method for remotely updating FPGA (field programmable Gate array) firmware by adopting CPU (Central processing Unit)
JP2000242488A (en) Memory reloading method
JP5010065B2 (en) Microcomputer
JP3620478B2 (en) Storage device, data processing system using the storage device, and data read method
JP4478298B2 (en) Data transfer system
JP2980015B2 (en) Magnetic disk drive
KR100298904B1 (en) Interface method for flash memory
JP2002208912A (en) Data communication equipment and firmware rewriting device for data sink equipment
JP4325786B2 (en) How to download the program
JP2000324195A (en) System and method for updating network interface
JP2002149626A (en) Microcomputer
CN117687664A (en) Online upgrade configuration method and device for DSP
JP4497940B2 (en) Data assurance controller
JPH09223203A (en) Non-contact ic card
JPH11338688A (en) Writing method for sram programmable device
CN116820530A (en) Data transmission system based on IAP technology