JPH06314190A - Electronic device - Google Patents
Electronic deviceInfo
- Publication number
- JPH06314190A JPH06314190A JP4275199A JP27519992A JPH06314190A JP H06314190 A JPH06314190 A JP H06314190A JP 4275199 A JP4275199 A JP 4275199A JP 27519992 A JP27519992 A JP 27519992A JP H06314190 A JPH06314190 A JP H06314190A
- Authority
- JP
- Japan
- Prior art keywords
- correction
- electronic device
- data
- stored
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
(57)【要約】
【目的】 量産した電子装置に内蔵されたファームウェ
アを外部から修正情報を入力して修正可能にし、かつR
OMを交換して修正が不要になった電子装置に対して
は、修正情報を入力しても修正が行われないようにす
る。
【構成】 EEPROM13に記憶されているROM3
の修正情報は修正アドレスレジスタ8と修正データレジ
スタ7に記憶される。コンパレータ9はアドレスバス中
の実行アドレスと修正アドレスを比較し、一致した時に
切換スッチ10を修正データレジスタ7側に切換える。
この結果、ROM3の修正部分に代わってRAM4に記
憶された修正内容が実行される。EEPROM13から
入力される修正情報に修正の必要な電子装置のバージョ
ンコードを含ませておき、電子装置1においてROM3
に記憶されているバージョンコードと一致した時のみ、
この処理を実行する。
(57) [Summary] [Purpose] It is possible to modify the firmware built into mass-produced electronic devices by inputting modification information from the outside, and R
Even if the correction information is input, the correction is not performed on the electronic device for which the correction is unnecessary by exchanging the OM. [Structure] ROM 3 stored in EEPROM 13
The correction information of is stored in the correction address register 8 and the correction data register 7. The comparator 9 compares the execution address in the address bus with the modified address, and when they match, switches the switching switch 10 to the modified data register 7 side.
As a result, the correction content stored in the RAM 4 is executed instead of the correction portion of the ROM 3. The correction information input from the EEPROM 13 includes the version code of the electronic device that needs to be corrected, and the electronic device 1 uses the ROM 3
Only when it matches the version code stored in
This process is executed.
Description
【0001】[0001]
【産業上の利用分野】本発明は、専用のマイクロコント
ローラ等の電子装置、特にセントラルプロセッシングユ
ニット(以下、CPUという)と、プログラムやデータ
を固定的に格納したリードオンリメモリ(以下、ROM
という)と、ランダムアクセスメモリ(以下、RAMと
いう)等を1チップに集積した電子装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic device such as a dedicated microcontroller, particularly a central processing unit (hereinafter referred to as CPU), and a read only memory (hereinafter referred to as ROM) in which programs and data are fixedly stored.
And a random access memory (hereinafter referred to as RAM) and the like on one chip.
【0002】[0002]
【従来の技術】従来、カメラ一体型ビデオテープレコー
ダ(以下、カムコーダという)等の電子機器にはその全
体または一部を制御する制御手段としてワンチップ化さ
れたカスタムLSIの電子装置、いわゆるマイクロコン
トローラが搭載されている。このようなマイクロコント
ローラは一般に、CPUと、ROMやRAM等のメモリ
と、入出力ポート等の周辺回路等から構成される専用マ
イクロコンピュータである。2. Description of the Related Art Conventionally, an electronic device such as a camera integrated video tape recorder (hereinafter referred to as a camcorder) is a single-chip electronic device, a so-called microcontroller, which is a single chip as a control means for controlling the whole or a part of the electronic device. Is installed. Such a microcontroller is generally a dedicated microcomputer including a CPU, memories such as ROM and RAM, and peripheral circuits such as input / output ports.
【0003】ここで、CPUはアドレスコントローラと
してメモリ等へのアクセスを制御し、あるいはプロセッ
サとしてプログラムを実行する。また、ROMにはプロ
グラムやデータ等、搭載される電子機器を制御するため
の情報がファームウェアの形で固定的に格納され、RA
MはCPUにプログラム実行時にワーキングエリア等を
提供し、周辺回路は外部との通信に用いられる。Here, the CPU controls access to a memory or the like as an address controller, or executes a program as a processor. In addition, the ROM stores information such as programs and data for controlling the mounted electronic devices in a fixed form in the form of firmware.
M provides the CPU with a working area and the like when executing a program, and the peripheral circuits are used for communication with the outside.
【0004】[0004]
【発明が解決しようとする課題】近年における電子機器
の高性能化や差別化のため、マイクロコントローラのR
OMに格納されるファームウェアの容量は年々増加して
いる。ファームウェアの品質については、プログラムの
構造や種々の検査により、マイクロコントローラの量産
後にバグが発生しないように最大限の努力が払われてい
る。万一、量産バグが発見された場合、従来、外付け回
路の追加等による修正や、バグを訂正したマイクロコン
トローラを再度量産して交換する等の費用と時間と人材
とを必要とする対策を採っていた。しかしながら、カム
コーダのような部品の実装密度の高い電子機器の場合、
外付け回路の追加による修正は殆ど不可能になってきて
いる。In order to improve the performance and differentiation of electronic equipment in recent years, R of the microcontroller has been improved.
The capacity of the firmware stored in the OM is increasing year by year. With regard to the quality of the firmware, due to the structure of the program and various tests, maximum efforts are made to prevent bugs from occurring after mass production of the microcontroller. If a mass production bug is found, it is necessary to take measures that require the cost, time, and human resources, such as correction by adding an external circuit, mass production of a bug-corrected microcontroller again, and replacement. I was collecting. However, in the case of electronic devices with high packing density of components such as camcorders,
Modification by adding external circuits has become almost impossible.
【0005】本発明はこのような問題点を解決するため
になされたもので、マイクロコントローラ等の電子装置
を複数用いたシステムにおいて、電子装置のアーキテク
チャをあらかじめ量産バグに対応できるものとすること
により、万一、量産バグが発見された場合でも、外部か
ら修正情報を一度与えるだけでバグの回避が可能となる
ようにし、かつ電子装置のROMを書換えて修正情報が
不要になった場合には、修正情報が与えられてもそれを
用いた処理を実行しないようにした電子装置を提供する
ことを目的とする。The present invention has been made in order to solve such a problem, and in a system using a plurality of electronic devices such as a microcontroller, the architecture of the electronic device can cope with mass production bugs in advance. Even if a bug in mass production is discovered, it is possible to avoid the bug by giving correction information only once from outside, and if the correction information is no longer needed by rewriting the ROM of the electronic device. An object of the present invention is to provide an electronic device in which, even if correction information is given, processing using the correction information is not executed.
【0006】[0006]
【課題を解決するための手段】前記問題点を解決するた
めに、本発明は、情報を固定的に記憶する固定記憶手段
と、この固定記憶手段に記憶された情報に基づいて処理
を行う処理手段と、外部に対して情報を入出力する入出
力手段とを一体に集積した電子装置において、固定記憶
手段に記憶された情報の修正アドレスを記憶する修正ア
ドレス記憶手段と、固定記憶手段に記憶された情報の修
正内容を記憶する修正内容記憶手段とを備え、外部記憶
手段から入力された電子装置のバージョンコードと固定
記憶手段に記憶されている電子装置のバージョンコード
とを比較して一致している場合のみ、修正内容記憶手段
に記憶された修正内容を実行するように構成した。In order to solve the above problems, the present invention provides a fixed storage means for fixedly storing information, and a processing for performing processing based on the information stored in the fixed storage means. Means and an input / output means for inputting / outputting information to / from the outside, in an electronic device integrated, a correction address storage means for storing a correction address of information stored in the fixed storage means and a fixed storage means Correction content storage means for storing the correction content of the stored information, and compares the version code of the electronic device input from the external storage means with the version code of the electronic device stored in the fixed storage means to match them. The modification content stored in the modification content storage means is executed only when the correction content is stored.
【0007】バージョンコードを記憶するために、外部
記憶手段内にはバージョンコード自身を記憶する領域を
設ける。バージョンコードをエラーチェックデータに加
算し、その加算したデータを記憶する領域を設けるよう
に構成してもよい。このようにすれば、外部記憶手段の
記憶容量を節約することができる。さらに、この場合、
エラーチェックデータにバージョンコードの補数を加算
したデータを併せて記憶するように構成すれば、バージ
ョンコードのエラーによる誤動作を防止する機能が向上
する。In order to store the version code, an area for storing the version code itself is provided in the external storage means. The version code may be added to the error check data, and an area for storing the added data may be provided. By doing so, the storage capacity of the external storage means can be saved. Furthermore, in this case,
If the data in which the complement of the version code is added to the error check data is also stored, the function of preventing malfunction due to an error in the version code is improved.
【0008】[0008]
【作用】本発明によれば、外部記憶手段から入力された
バージョンコードと電子装置の固定記憶手段に記憶され
ているバージョンコードが一致している場合のみ、修正
内容記憶手段に記憶された修正内容が実行される。した
がって、固定記憶手段の内容を新しくして修正が不要な
電子装置に交換した時に、固定記憶手段内のバージョン
コードを更新しておけば、外部記憶手段からこの電子装
置に修正内容が入力されても、バージョンコードが一致
しないので、修正内容は実行されない。電子装置を交換
した時に、修正情報が記憶されていない外部記憶手段に
交換することで、修正を行わないようにすることも可能
であるが、電子装置を交換する手間がかかる。これに対
して、本発明ではバージョンコードを更新するだけでよ
い。According to the present invention, only when the version code input from the external storage means and the version code stored in the fixed storage means of the electronic device match, the correction content stored in the correction content storage means. Is executed. Therefore, if the version code in the fixed storage means is updated when the content of the fixed storage means is replaced with an electronic device that does not require modification, the correction content is input to this electronic device from the external storage means. However, since the version codes do not match, the correction contents are not executed. When the electronic device is replaced, it is possible to prevent the correction by replacing it with an external storage unit that does not store the correction information, but it takes time and effort to replace the electronic device. In contrast, the present invention only needs to update the version code.
【0009】[0009]
【実施例】以下、本発明の実施例について図面を参照し
ながら詳細に説明する。図1は本発明を適用する電子装
置の構成を示すブロック図である。まず、この電子装置
の構成を説明する。この電子装置1はCPU2、ROM
3、RAM4、データバス5、アドレスバス6、修正デ
ータレジスタ7、修正アドレスレジスタ8、コンパレー
タ9、スイッチ10及び通信回路11,16を備えてい
る。通信回路11は通信回線12によりEEPROM1
3に接続され、通信回路16は通信回線17によりコマ
ンダ18に接続されている。Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an electronic device to which the present invention is applied. First, the configuration of this electronic device will be described. The electronic device 1 includes a CPU 2 and a ROM
3, a RAM 4, a data bus 5, an address bus 6, a modified data register 7, a modified address register 8, a comparator 9, a switch 10, and communication circuits 11 and 16. The communication circuit 11 is connected to the EEPROM 1 via the communication line 12.
3, the communication circuit 16 is connected to the commander 18 by a communication line 17.
【0010】EEPROM13はROM3における修正
アドレス、すなわち修正部分のアドレス又はスタートア
ドレスと、修正内容、すなわち修正部分にパッチしたい
内容やパッチ後に復帰するROM3上のアドレス等を格
納している外部記憶手段である。以下、修正アドレスと
修正内容をまとめて修正情報という。EEPROM13
に格納された修正アドレスは、通信回線12、通信回路
11及び8ビットのデータバス5を介して16ビットの
修正アドレスレジスタ8に書き込まれる。同様にして、
EEPROM13に格納された1ワードの修正データを
修正データレジスタ7に書き込まれる。さらに、EEP
ROM13に格納された修正内容はRAM4に書き込ま
れる。この書込みはROM3に格納されているIPL
(Initial Patch Loader)により
実行される。The EEPROM 13 is an external storage means for storing the correction address in the ROM 3, that is, the address or start address of the correction portion, the correction content, that is, the content to be patched to the correction portion, the address on the ROM 3 to be restored after the patch, and the like. . Hereinafter, the correction address and the correction content are collectively referred to as correction information. EEPROM 13
The modified address stored in is stored in the 16-bit modified address register 8 via the communication line 12, the communication circuit 11, and the 8-bit data bus 5. Similarly,
The one-word correction data stored in the EEPROM 13 is written in the correction data register 7. Furthermore, EEP
The correction content stored in the ROM 13 is written in the RAM 4. This writing is the IPL stored in ROM3
(Initial Patch Loader).
【0011】16ビットのコンパレータ9はアドレスバ
ス6の実行アドレスをモニタし、修正アドレスに一致す
ると一致信号Eを出力する。このコンパレータ9はハー
ドウェアで構成してもソフトウェアで構成してもよい。
スイッチ10はデータバス5にROM3からのデータを
出力するか又は修正データレジスタ7からの修正データ
を出力するかを選択するもので、コンパレータ9が一致
信号Eを出力した時のみ、修正データレジスタ7からの
修正データを選択する。The 16-bit comparator 9 monitors the execution address of the address bus 6 and outputs a coincidence signal E when it coincides with the corrected address. The comparator 9 may be configured by hardware or software.
The switch 10 selects whether to output the data from the ROM 3 or the correction data from the correction data register 7 to the data bus 5, and only when the comparator 9 outputs the coincidence signal E, the correction data register 7 is selected. Select the correction data from.
【0012】コマンダ18は修正情報の書込みや書換え
を行うための操作手段であり、各種操作キーやディスプ
レイが設けられている。コマンダ18により修正情報の
書込み又は書換えのコマンドを入力すると、通信回線1
7、通信回路16及び8ビットのデータバス5を介して
CPU2に入力される。CPU2はこのコマンドを受信
すると、EEPROM13に格納されている修正アドレ
スを修正アドレスレジスタ8に書込むこと及び修正デー
タを修正データレジスタ7に書込むことを禁止する。こ
の処理を行う理由は以下の通りである。The commander 18 is an operating means for writing and rewriting correction information, and is provided with various operation keys and a display. When a command for writing or rewriting correction information is input from the commander 18, the communication line 1
7, is input to the CPU 2 via the communication circuit 16 and the 8-bit data bus 5. Upon receiving this command, the CPU 2 prohibits writing the correction address stored in the EEPROM 13 into the correction address register 8 and writing the correction data into the correction data register 7. The reason for performing this processing is as follows.
【0013】すなわち、EEPROM13に格納されて
いる修正情報に誤りがあった場合、パッチ処理に入った
後にプログラムが暴走し、アドレス制御がROM3に復
帰しなくなる可能性がある。この場合、EEPROM1
3に記憶されている修正情報を書換えれば、正しい処理
を行うようにすることは可能であるが、修正情報の書込
みや書換えをROM3に格納されているIPLを用いて
行っているので、前述したようにプログラムが暴走した
場合には、このIPLに制御が移らなくなってしまうた
め、修正情報の書換えができなくなってしまう。これに
対して、前記処理を行えば、パッチ処理に入らなくなる
ため、IPLによる制御が可能になる。That is, if the correction information stored in the EEPROM 13 has an error, there is a possibility that the program will run out after the patch processing and the address control will not return to the ROM 3. In this case, EEPROM1
Although it is possible to perform correct processing by rewriting the correction information stored in No. 3, the correction information is written and rewritten using the IPL stored in the ROM 3, so When the program goes out of control as described above, the control cannot be transferred to this IPL, and the correction information cannot be rewritten. On the other hand, if the above process is performed, the patch process cannot be performed, and thus control by the IPL becomes possible.
【0014】図2は本発明を適用する電子装置の動作を
示すフローチャートである。以下、図1及び図2を参照
しながら、この電子装置の動作を説明する。まず、電源
投入後の初期化時、ROM3に格納されたIPLにより
コマンダ18、通信回線17及び通信回路16間の状態
が安定になるのを待つ(図2のS1)。この処理はタイ
マにより時間を測定するようにしてもよいし、コマンダ
18と通信回路16との間で信号の送受を行って安定状
態を検知するようにしてもよい。FIG. 2 is a flowchart showing the operation of the electronic device to which the present invention is applied. The operation of the electronic device will be described below with reference to FIGS. 1 and 2. First, at the time of initialization after the power is turned on, it waits until the state between the commander 18, the communication line 17 and the communication circuit 16 becomes stable by the IPL stored in the ROM 3 (S1 in FIG. 2). In this process, the time may be measured by a timer, or a signal may be transmitted and received between the commander 18 and the communication circuit 16 to detect the stable state.
【0015】次に、通信回線17が所定の状態かどうか
を判断する(S2)。ここで、通信手段が所定の状態と
は、例えばコマンダ18から修正情報の書込み又は書換
えのコマンドが入力されていない状態、電子装置1にコ
マンダ18が接続されていない状態等がある。通信手段
が所定の状態でない時は、IPLによる処理を終了する
(S6)。そして、例えばコマンダ18から修正情報の
書込み又は書換えのコマンドが入力されていれば、RO
M3内のパッチデータ変更用プログラムに処理が移る。
また、電子装置1にコマンダ18が接続されていない時
は、電子装置1を内蔵している電子機器の制御対象(カ
ムコーダのサーボ系等)を制御するプログラム等に制御
が移る。Next, it is determined whether the communication line 17 is in a predetermined state (S2). Here, the predetermined state of the communication means includes, for example, a state in which a command for writing or rewriting correction information is not input from the commander 18, a state in which the commander 18 is not connected to the electronic device 1, and the like. If the communication means is not in the predetermined state, the IPL processing is terminated (S6). Then, for example, if a command for writing or rewriting correction information is input from the commander 18, RO
The processing shifts to the patch data changing program in M3.
Further, when the commander 18 is not connected to the electronic device 1, control is transferred to a program or the like for controlling a control target (a servo system of a camcorder, etc.) of an electronic device that incorporates the electronic device 1.
【0016】通信手段が所定の状態である時は、IPL
によりEEPROM13に格納された修正情報のうち修
正アドレスを修正アドレスレジスタ8にラッチし(S
3)、修正データを修正データレジスタ7にラッチする
(S4)。さらに、修正内容をRAM4に読込む(S
5)。これでIPLによる処理が終了する。次に、コン
パレータ9はアドレスバス6に出される実行アドレスを
修正アドレスレジスタ8に記憶された修正アドレスと比
較する(S7)。そして、実行アドレスと修正アドレス
が不一致の場合、スイッチ10はROM3側に切換えら
れ(S14)、CPU2のROM3へのアクセス結果と
してROM3中に格納されているデータがデータバス5
に出力される(S15)。When the communication means is in a predetermined state, the IPL
The correction address of the correction information stored in the EEPROM 13 is latched in the correction address register 8 (S
3) The corrected data is latched in the corrected data register 7 (S4). Further, the correction content is read into the RAM 4 (S
5). This completes the processing by the IPL. Next, the comparator 9 compares the execution address output to the address bus 6 with the correction address stored in the correction address register 8 (S7). When the execution address and the correction address do not match, the switch 10 is switched to the ROM 3 side (S14), and the data stored in the ROM 3 is the data stored in the ROM 3 as a result of the CPU 2 accessing the ROM 3.
Is output to (S15).
【0017】一方、実行アドレスと修正アドレスが一致
した場合、スイッチ10は修正データレジスタ7側に切
換えられるので(S8)、修正データレジスタ7にラッ
チされた修正データがデータバス5に出力される(S
9)。ここで、修正データはROM3上のテーブルを参
照する1バイトのテーブルコール命令である。このテー
ブルを参照してROM3上の所定のアドレスに格納され
ている修正プログラム起動処理プログラムを実行し、R
AM4上の修正プログラムのアドレスの算出等を行う
(S10)。そして、RAM4上の修正プログラムを実
行する(S11)。テーブルコールからの復帰をジャン
プ命令で行うので、修正内容の後尾にはスタック等に待
避したリターンアドレス等を廃棄する命令が置かれてお
り、これを実行する(S12)。最後に修正プログラム
に書かれたジャンプ命令を実行してROM3の修正部分
をスキップしたアドレスに戻る(S13)。この修正部
分への再度のアクセスに備えるため、コンパレータ9に
よるアドレス比較は継続して行われる(S7)。On the other hand, when the execution address and the modified address match, the switch 10 is switched to the modified data register 7 side (S8), and the modified data latched in the modified data register 7 is output to the data bus 5 ( S
9). Here, the correction data is a 1-byte table call instruction that refers to the table on the ROM 3. By referring to this table, the correction program start processing program stored in a predetermined address on the ROM 3 is executed, and R
The address of the correction program on AM4 is calculated (S10). Then, the correction program on the RAM 4 is executed (S11). Since the return from the table call is performed by the jump instruction, an instruction for discarding the return address saved in the stack or the like is placed at the end of the correction content and is executed (S12). Finally, the jump instruction written in the correction program is executed to return to the address where the correction portion of the ROM 3 is skipped (S13). The address comparison by the comparator 9 is continuously performed in preparation for access to the modified portion again (S7).
【0018】なお、ROM3に複数箇所の修正部分があ
る場合には、上述のフローチャート中、ステップS11
に引き続いて修正アドレスレジスタ8と修正データレジ
スタ7をそれぞれ次の修正アドレスと次の修正データに
更新すればよい。また、コンパレータ9、修正アドレス
レジスタ8及び修正データレジスタ7を複数備えること
により、複数の修正箇所に対応するようにしてもよい。If the ROM 3 has a plurality of modified portions, step S11 in the above-mentioned flow chart.
Then, the correction address register 8 and the correction data register 7 may be updated to the next correction address and the next correction data, respectively. Further, a plurality of comparators 9, correction address registers 8 and correction data registers 7 may be provided so as to correspond to a plurality of correction points.
【0019】また、図1において外部のスイッチ等を操
作することにより修正アドレスレジスタ8に無効アドレ
スをラッチするように構成してもよい。また、コンパレ
ータ9や修正データレジスタ7の出力をオン・オフ制御
するゲート回路やスイッチング回路を設け、外部からオ
ン・オフ制御が行えるように構成してもよい。このよう
に構成すれば、図2のS1,S2 及びS6の処理が不要
になる。Further, in FIG. 1, an invalid address may be latched in the correction address register 8 by operating an external switch or the like. Further, a gate circuit or a switching circuit for controlling the on / off control of the outputs of the comparator 9 and the correction data register 7 may be provided so that the on / off control can be performed from the outside. With this configuration, the processes of S1, S2 and S6 of FIG. 2 are unnecessary.
【0020】さらに、図1においてEEPROM13を
電子装置1の内部に設け通信回線12にEEPROM書
込器を接続して、修正情報をEEPROM13に書込む
ことにより、修正情報が電子装置1の内部に書換え可能
な状態で常駐するようにしてもよい。また、図1におい
てステップS1の前にEEPROM13に格納されてい
る修正情報をRAM4に書込み、ステップS2で通信手
段が所定の状態である時に、RAM4に書込んだ修正ア
ドレスを修正アドレスレジスタ8にラッチし、修正デー
タを修正データレジスタ7にラッチするように構成して
もよい。Further, in FIG. 1, an EEPROM 13 is provided inside the electronic device 1 and an EEPROM writer is connected to the communication line 12 to write the correction information into the EEPROM 13 so that the correction information is rewritten inside the electronic device 1. You may make it resident in a possible state. Further, in FIG. 1, the correction information stored in the EEPROM 13 is written in the RAM 4 before step S1, and the correction address written in the RAM 4 is latched in the correction address register 8 when the communication means is in a predetermined state in step S2. However, the correction data may be latched in the correction data register 7.
【0021】図3は本発明の実施例による電子装置の動
作を説明するためのブロック図である。ここで、図1と
対応する部分には対応する番号を付して、その説明を省
略する。電子装置Aは図1に示した電子装置1に電子装
置B,C等と通信するための通信回路15を付加したも
のである。また、パッチ制御用レジスタ14Aは、図1
の修正アドレスレジスタ8と修正データレジスタ7をま
とめたものである。図1のコンパレータ9やスイッチ1
0は省略した。FIG. 3 is a block diagram for explaining the operation of the electronic device according to the embodiment of the present invention. Here, the parts corresponding to those in FIG. 1 are designated by the corresponding numbers, and the description thereof will be omitted. The electronic device A is obtained by adding a communication circuit 15 for communicating with the electronic devices B and C to the electronic device 1 shown in FIG. In addition, the patch control register 14A is shown in FIG.
The modified address register 8 and the modified data register 7 of FIG. Comparator 9 and switch 1 in FIG.
0 is omitted.
【0022】電子装置Bは図1に示した電子装置1から
通信回路11と16を削除し、電子装置Aと通信するた
めの通信回路21Bを付加したものである。また、パッ
チ制御用レジスタ14Bも、図1の修正アドレスレジス
タ8と修正データレジスタ7をまとめたものである。電
子装置C等も電子装置Bと同じ構成である。The electronic device B is obtained by removing the communication circuits 11 and 16 from the electronic device 1 shown in FIG. 1 and adding a communication circuit 21B for communicating with the electronic device A. The patch control register 14B is also a combination of the correction address register 8 and the correction data register 7 of FIG. The electronic device C and the like have the same configuration as the electronic device B.
【0023】電子装置Aと電子装置B,C等通信回線2
2B,22C等により接続され、双方向通信を行うよう
に構成されている。また、各電子装置は、それぞれのR
OMにそれぞれの電子装置コードとバージョンコードを
記憶している。図4は図3のEEPROM13及びRO
M3A,3Bに格納されているデータの説明図である。
図3(a)はEEPROM13に格納されているデータ
で、パッチ処理の対象となる電子装置ごとに1つのデー
タブロックを形成している。各データブロックは、その
データブロックのデータ数、パッチ処理の対象となる電
子装置のコード、電子装置のバージョンコード、パッチ
データ及びエラーチェックデータから構成されている。
ここで、バージョンコードとは、電子装置のROM上の
プログラムを新しくするごとに更新するコードである。
図3(a)では、EEPROM13には第1バージョン
のコード(01)が格納されている。また、エラーチェ
ックデータとしては、例えばデータブロック中の総デー
タ数からパッチデータまでの総和の下位1バイトと上位
1バイトをデータブロックの末尾に配置する。Communication line 2 for electronic devices A and electronic devices B, C, etc.
They are connected by 2B, 22C, etc., and are configured to perform bidirectional communication. Also, each electronic device has its own R
The OM stores each electronic device code and version code. FIG. 4 shows the EEPROM 13 and RO of FIG.
It is explanatory drawing of the data stored in M3A, 3B.
FIG. 3A shows the data stored in the EEPROM 13, and one data block is formed for each electronic device to be patched. Each data block is composed of the number of data of the data block, the code of the electronic device to be patched, the version code of the electronic device, the patch data and the error check data.
Here, the version code is a code that is updated each time the program on the ROM of the electronic device is updated.
In FIG. 3A, the EEPROM 13 stores the code (01) of the first version. Further, as the error check data, for example, the lower 1 byte and the upper 1 byte of the sum total from the total number of data in the data block to the patch data are arranged at the end of the data block.
【0024】図3(b),(c)は、それぞれROM3
A,3Bに格納されている電子装置コードであって、R
OM3Aには電子装置コード0Aとバージョンコード0
1が格納され、ROM3Bには電子装置コード0Bとバ
ージョンコード02が格納されていることを示してい
る。電子装置Bは1度ROM3Bの内容を新しくした第
2バージョンである。3B and 3C respectively show the ROM 3
R is the electronic device code stored in A and 3B.
OM3A has electronic device code 0A and version code 0
1 indicates that the electronic device code 0B and the version code 02 are stored in the ROM 3B. The electronic device B is the second version in which the contents of the ROM 3B are once updated.
【0025】図5は図4の電子装置AのIPLのフロー
チャートであり、図6は図4の電子装置BのIPLのフ
ローチャートである。以下、図3〜図6を参照しなが
ら、図3に示されているシステムのIPLの動作を説明
する。まず、電子装置Aは通信回線12及び通信回路1
1を介してEEPROM13からデータブロックの総デ
ータ数を読込む(S21)。次に、読込んだ総データ数
を基に、対象電子装置コードからエラーチェックデータ
までの1データブロックのデータを読込む(S22)。
これらのデータはRAM4のバッファエリアに格納され
る。FIG. 5 is a flowchart of the IPL of the electronic device A of FIG. 4, and FIG. 6 is a flowchart of the IPL of the electronic device B of FIG. The operation of the IPL of the system shown in FIG. 3 will be described below with reference to FIGS. First, the electronic device A includes the communication line 12 and the communication circuit 1.
The total data number of the data block is read from the EEPROM 13 via 1 (S21). Next, the data of one data block from the target electronic device code to the error check data is read based on the total number of read data (S22).
These data are stored in the buffer area of the RAM 4.
【0026】次に、S22で読込んだ対象電子装置コー
ドが自装置すなわちROM3Aに格納してある電子装置
Aのコードなのかどうかを判断し(S23)、自装置の
コードあれば次のデータブロックの総データ数を読込む
(S21)。一方、自装置のコードでない、すなわち電
子装置B,C等のコードであれば、RAM4Aのバッフ
ァエリアに格納した1データブロックのデータを通信回
路15及び通信回線22を介して電子装置B,C等の通
信回路21B,21C等に送信する(S24)。Next, it is judged whether or not the target electronic device code read in S22 is the code of the own device, that is, the electronic device A stored in the ROM 3A (S23). If the code of the own device is present, the next data block is detected. The total data number of is read (S21). On the other hand, if it is not the code of the own device, that is, the code of the electronic devices B, C, etc., the data of one data block stored in the buffer area of the RAM 4A is transferred to the electronic devices B, C, etc. via the communication circuit 15 and the communication line 22. To the communication circuits 21B, 21C and so on (S24).
【0027】次に、EEPROM13から全データブロ
ックのデータを読込んだかどうかを判断する(S2
5)。この処理は、例えば最後のデータブロックの末尾
に特定のコードを挿入しておき、それを検出することで
行う。全データブロックのデータを読込んでなければ、
次のデータブロックの総データ数を読込む(S21)。
また、全データブロックのデータを読込んでいれば、パ
ッチ修正が許可されているかどうかを判断する(S2
6)。この判断は図2おけるステップS2に相当する。
パッチ修正が許可されていなければ、電子装置B,C等
にパッチ修正の禁止を通知し(S30)、処理を終了す
る。一方、パッチ修正が許可されていれば、電子装置
B,C等にパッチ修正の許可を通知(S27)した後、
RAM4Aのバッファエリアに格納したバージョンコー
ドとROM3Aに格納されているバージョンコードとを
比較し、一致しているかどうかを判断する(S28)。Next, it is judged whether the data of all the data blocks have been read from the EEPROM 13 (S2).
5). This process is performed, for example, by inserting a specific code at the end of the last data block and detecting it. If you do not read the data of all data blocks,
The total number of data in the next data block is read (S21).
If all the data blocks have been read, it is determined whether patch modification is permitted (S2).
6). This determination corresponds to step S2 in FIG.
If the patch correction is not permitted, the electronic device B, C or the like is notified that the patch correction is prohibited (S30), and the process is ended. On the other hand, if the patch correction is permitted, after notifying the electronic devices B and C that the patch correction is permitted (S27),
The version code stored in the buffer area of the RAM 4A is compared with the version code stored in the ROM 3A to determine whether they match (S28).
【0028】そして、一致していればRAM4Aのバッ
ファエリアに読込んだ自装置のパッチデータをRAM4
Aのパッチデータ記憶エリアに移すと共に、修正アドレ
スと修正データをパッチ制御用レジスタ14Aにラッチ
して処理を終了する(S29)。また、一致していない
時は、処理を終了する。ここでは、いずれも01で一致
しているので、S29の処理を行う。If they match, the patch data of its own device read in the buffer area of RAM4A is stored in RAM4.
At the same time as moving to the patch data storage area A, the correction address and the correction data are latched in the patch control register 14A and the processing is ended (S29). If they do not match, the process ends. Here, since all match with 01, the process of S29 is performed.
【0029】次に、電子装置Aからデータを受信した電
子装置の動作を電子装置Bを例にして説明する。まず、
電子装置Aから通信回線22及び通信回路21Bを介し
て受信したデータをRAM4Bのバッファエリアに読込
む(S31)。次に、バッファエリアに読込んだデータ
数とデータブロックの先頭にある総データ数が等しいか
どうかを判断し(S32)、等しければ次にエラーチェ
ックコードを見てエラーがあるかどうかを判断し(S3
3)、エラーがなければ電子装置Aからパッチ修正の許
可が通知されているかどうかを判断し、許可されていれ
ば次にRAM4Bのバッファエリアに格納したバージョ
ンコードとROM3Bに格納されているバージョンコー
ドが一致しているかどうかを判断する。そして、一致し
ていれば、RAM4Bのバッファエリアに読込んだ自装
置のパッチデータをRAM4Bのパッチデータ記憶エリ
アに移すと共に、修正アドレスと修正データをパッチ制
御用レジスタ14Bにラッチして処理を終了する(S3
6)。これに対して、受信したデータ数が総データ数と
不一致であったり、エラーがあったり、パッチ修正が禁
止されていたり、バージョンコードが不一致である場合
には処理を終了する。Next, the operation of the electronic device that receives data from the electronic device A will be described by taking the electronic device B as an example. First,
The data received from the electronic device A via the communication line 22 and the communication circuit 21B is read into the buffer area of the RAM 4B (S31). Next, it is determined whether or not the number of data read in the buffer area is equal to the total number of data at the beginning of the data block (S32). If they are equal, the error check code is then checked to determine whether or not there is an error. (S3
3) If there is no error, it is determined whether or not the patch correction permission is notified from the electronic device A. If it is permitted, the version code stored in the buffer area of the RAM 4B and the version code stored in the ROM 3B are determined next. To determine if they match. If they match, the patch data of the device itself read in the buffer area of the RAM 4B is moved to the patch data storage area of the RAM 4B, the correction address and the correction data are latched in the patch control register 14B, and the processing is completed. Yes (S3
6). On the other hand, if the number of received data does not match the total number of data, there is an error, patch modification is prohibited, or the version codes do not match, the process ends.
【0030】ここでは、受信したバージョンコードは0
1であり、ROM4Bに格納されているバージョンコー
ドは02であって、一致しないからS36の処理が行わ
れない。これは、ROM4Bにはバグを取り除いた新し
いプログラムが格納されているので、パッチ処理が不要
であることを意味する。図7は図3のEEPROM13
に格納されているデータの他の例の説明図である。Here, the received version code is 0
1, the version code stored in the ROM 4B is 02, and the version code does not match, the process of S36 is not performed. This means that the ROM 4B stores a new program from which bugs have been removed, and thus patch processing is unnecessary. FIG. 7 shows the EEPROM 13 of FIG.
FIG. 6 is an explanatory diagram of another example of data stored in the.
【0031】この例では、データブロック中に1バイト
のバージョンコードを割り付けるのではなく、データブ
ロック末尾の2バイトにエラーチェックコードとバージ
ョンコードを加算したデータを割り付けている。より詳
細には、エラーチェックデータとして、例えば総データ
数からパッチデータまでを総和を計算し、その下位1バ
イトには単純にバージョンコード(01)を加算し、上
位1バイトにはバージョンコードの補数(FE)を加算
している。このようにすれば、EEPROMの容量を節
約することができる。In this example, the 1-byte version code is not allocated in the data block, but the data obtained by adding the error check code and the version code to the 2 bytes at the end of the data block is allocated. More specifically, as error check data, for example, the total sum of the total number of data to patch data is calculated, the version code (01) is simply added to the lower 1 byte, and the complement of the version code is added to the upper 1 byte. (FE) is added. In this way, the capacity of the EEPROM can be saved.
【0032】エラーチェック及びバージョンコードの一
致を判断する方法は以下のようになる。まず、受信した
データからから計算した「総データ数」+「対象電子装
置コード」+「パッチデータ」の下位1バイトと「エラ
ーチェックデータ+(01)」−「01」とを比較し、
さらに前記計算値の上位1バイトと「エラーチェックデ
ータ+(FE)」−FEとを比較する。そして、それら
が共に一致している場合のみ、データにエラーがなかっ
たものとしてバージョンコードを01とする。これによ
り、バージョンコード01のみを用いた場合と比較する
と誤ってパッチ修正を行ってしまう可能性を低減するこ
とができる。The method of error checking and determining the version code match is as follows. First, the lower 1 byte of “total data number” + “target electronic device code” + “patch data” calculated from the received data is compared with “error check data + (01)” − “01”,
Further, the upper 1 byte of the calculated value is compared with "error check data + (FE)"-FE. Then, only when they match each other, the version code is set to 01 assuming that there is no error in the data. As a result, it is possible to reduce the possibility that the patch will be erroneously corrected as compared with the case where only the version code 01 is used.
【0033】なお、本発明は前記実施例に限定されるも
のではなく、本発明の趣旨に基づき種々の変形が可能で
あり、それらを本発明の範囲から排除するものではな
い。例えば、図6においてバージョンコードの一致を判
断する処理は、S31からS34の間のいずれか位置に
配置してもよい。ただし、バージョンコードをエラーチ
ェックデータと加算した場合には、S33の処理内で行
うことになる。また、電子装置Aにおいて自装置のデー
タのエラーチェックを行ってもよい。The present invention is not limited to the above-mentioned embodiments, but various modifications can be made within the scope of the present invention, and they are not excluded from the scope of the present invention. For example, in FIG. 6, the process of determining whether the version codes match may be arranged at any position between S31 and S34. However, when the version code is added to the error check data, it is performed within the process of S33. Further, the electronic device A may check the data of its own device for an error.
【0034】[0034]
【発明の効果】以上、詳細に説明したように、本発明に
よれば、電子装置の固定記憶手段にバグが発見された場
合、外部記憶手段から修正情報を入力すだけでバクの回
避が可能となる。また、固定記憶手段の内容を新しくし
て修正が不要な電子装置に交換した時に、固定記憶手段
内のバージョンコードを更新しておけば、修正が不要な
電子装置に対して誤って修正内容を実行することを防止
することができる。この場合、外部記憶手段の交換が不
要であるため、電子装置の故障時等で、修理部門で交換
を行なう場合の工数削減のとミスの削減が期待できる。As described above in detail, according to the present invention, when a bug is found in the fixed storage means of the electronic device, it is possible to avoid the bug simply by inputting the correction information from the external storage means. Becomes Also, when the contents of the fixed storage means are replaced with new electronic devices that do not require modification, if the version code in the fixed storage means is updated, the correction contents will be erroneously applied to electronic devices that do not require modification. It can be prevented from executing. In this case, since it is not necessary to replace the external storage means, it is possible to expect reduction in man-hours and mistakes when the repair department replaces the electronic device when the electronic device fails.
【図1】本発明を適用する電子装置の構成を示すブロッ
ク図である。FIG. 1 is a block diagram showing a configuration of an electronic device to which the present invention is applied.
【図2】本発明を適用する電子装置の動作を示すフロー
チャートである。FIG. 2 is a flowchart showing an operation of an electronic device to which the present invention is applied.
【図3】本発明の実施例による電子装置の動作を説明す
るためのブロック図である。FIG. 3 is a block diagram illustrating an operation of an electronic device according to an exemplary embodiment of the present invention.
【図4】図3のEEPROM13及びROM3A,3B
に格納されているデータの説明図である。FIG. 4 is an EEPROM 13 and ROMs 3A and 3B shown in FIG.
3 is an explanatory diagram of data stored in FIG.
【図5】図4の電子装置AのIPLのフローチャートで
ある。5 is a flowchart of an IPL of the electronic device A of FIG.
【図6】図4の電子装置BのIPLのフローチャートで
ある。6 is a flowchart of an IPL of the electronic device B of FIG.
【図7】図3のEEPROM13に格納されているデー
タの他の例の説明図である。7 is an explanatory diagram of another example of data stored in the EEPROM 13 of FIG.
1…電子装置、2…CPU、3…ROM、4…RAM、
7…修正データ記憶手段、8…修正アドレス記憶手段、
9…コンパレータ1 ... Electronic device, 2 ... CPU, 3 ... ROM, 4 ... RAM,
7 ... correction data storage means, 8 ... correction address storage means,
9 ... Comparator
Claims (4)
と、この固定記憶手段に記憶された情報に基づいて処理
を行う処理手段と、外部に対して情報を入出力する入出
力手段とを一体に集積した電子装置において、 前記固定記憶手段に記憶された情報の修正アドレスを記
憶する修正アドレス記憶手段と、 前記固定記憶手段に記憶された情報の修正内容を記憶す
る修正内容記憶手段とを備え、 外部記憶手段から入力された電子装置のバージョンコー
ドと前記固定記憶手段に記憶されている電子装置のバー
ジョンコードとを比較して一致している場合のみ、前記
修正内容記憶手段に記憶された修正内容を実行すること
を特徴とする電子装置。1. Fixed storage means for fixedly storing information, processing means for performing processing based on the information stored in the fixed storage means, and input / output means for inputting / outputting information to / from the outside. In an integrated electronic device, a correction address storage unit that stores a correction address of the information stored in the fixed storage unit, and a correction content storage unit that stores the correction content of the information stored in the fixed storage unit Provided, the version code of the electronic device input from the external storage means and the version code of the electronic device stored in the fixed storage means are compared and stored in the correction content storage means only when they match. An electronic device characterized by executing a modification.
する領域を設けたことを特徴とする請求項1記載の電子
装置。2. The electronic device according to claim 1, wherein an area for storing a version code is provided in the external storage means.
バージョンコードを加算したデータを記憶する領域を設
けたことを特徴とする請求項1記載の電子装置。3. The electronic device according to claim 1, wherein the external storage means is provided with a region for storing data obtained by adding a version code to the error check data.
ドを加算したデータとエラーチェックデータに前記バー
ジョンコードの補数を加算したデータを記憶することを
特徴とする請求項3記載の電子装置。4. The electronic device according to claim 3, wherein the data obtained by adding the version code to the error check data and the data obtained by adding the complement of the version code to the error check data are stored.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP27519992A JP3358214B2 (en) | 1992-09-18 | 1992-09-18 | Electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP27519992A JP3358214B2 (en) | 1992-09-18 | 1992-09-18 | Electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06314190A true JPH06314190A (en) | 1994-11-08 |
| JP3358214B2 JP3358214B2 (en) | 2002-12-16 |
Family
ID=17552071
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP27519992A Expired - Fee Related JP3358214B2 (en) | 1992-09-18 | 1992-09-18 | Electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3358214B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO1998024021A1 (en) * | 1996-11-29 | 1998-06-04 | Hitachi, Ltd. | Microcomputer control system |
| KR100401559B1 (en) * | 1999-10-28 | 2003-10-17 | 엘지전자 주식회사 | Flash ROM Fusing Method Of Processor Board |
| JP2008103076A (en) * | 2007-12-03 | 2008-05-01 | Fujitsu Ltd | Semiconductor nonvolatile memory with partial data rewrite function |
| JP2013171590A (en) * | 2012-02-22 | 2013-09-02 | Schaeffler Technologies Ag & Co Kg | Method for testing interchangeability of software |
-
1992
- 1992-09-18 JP JP27519992A patent/JP3358214B2/en not_active Expired - Fee Related
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO1998024021A1 (en) * | 1996-11-29 | 1998-06-04 | Hitachi, Ltd. | Microcomputer control system |
| US6496978B1 (en) * | 1996-11-29 | 2002-12-17 | Hitachi, Ltd. | Microcomputer control system in which programs can be modified from outside of the system and newer versions of the modified programs are determined and executed |
| US7174537B2 (en) | 1996-11-29 | 2007-02-06 | Hitachi, Ltd. | Microcomputer control system in which programs can be modified and newer versions of the modified programs being detected and executed |
| KR100401559B1 (en) * | 1999-10-28 | 2003-10-17 | 엘지전자 주식회사 | Flash ROM Fusing Method Of Processor Board |
| JP2008103076A (en) * | 2007-12-03 | 2008-05-01 | Fujitsu Ltd | Semiconductor nonvolatile memory with partial data rewrite function |
| JP2013171590A (en) * | 2012-02-22 | 2013-09-02 | Schaeffler Technologies Ag & Co Kg | Method for testing interchangeability of software |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3358214B2 (en) | 2002-12-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100324834B1 (en) | Electronics | |
| JP4668416B2 (en) | Protecting boot block code when enabling write access to the boot block | |
| JP4868216B2 (en) | Firmware update circuit and firmware update method | |
| US6237120B1 (en) | Program patching of a ROM | |
| US6546517B1 (en) | Semiconductor memory | |
| JPH03141447A (en) | Method and apparatus for updating farm ware residing in electrically reloadable programmable read-only memory | |
| JPH05204630A (en) | Electronic device and its fixed information correcting method thereof | |
| US20080016415A1 (en) | Evaluation system and method | |
| JP3563768B2 (en) | ROM program change device | |
| JPH09198884A (en) | Flash memory management method | |
| US20030084232A1 (en) | Device and method capable of changing codes of micro-controller | |
| JP3358214B2 (en) | Electronic equipment | |
| KR100310486B1 (en) | Microcumputer | |
| US7596036B2 (en) | Memory control circuit, microcomputer, and data rewriting method | |
| US20050207232A1 (en) | Access method for a NAND flash memory chip, and corresponding NAND flash memory chip | |
| US6182207B1 (en) | Microcontroller with register system for the indirect accessing of internal memory via auxiliary register | |
| JP2000293376A (en) | Circuit and method for switching boot program | |
| JP2001256044A (en) | Data processing device | |
| EP1403768A2 (en) | Processor system, processor and arithmetic processing method | |
| JPH06318262A (en) | System using plural electronic device | |
| JP2004021421A (en) | Memory device control method, program therefor, and recording medium | |
| WO2006101123A1 (en) | Nonvolatile storage device and method for loading control information for nonvolatile storage device | |
| JP2008140124A (en) | Data processing device | |
| JPH03211619A (en) | Data processor | |
| JPH1139897A (en) | Stored data inspection of digital memory means |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20020910 |
|
| LAPS | Cancellation because of no payment of annual fees |