JP2002351683A - Program updating control method - Google Patents

Program updating control method

Info

Publication number
JP2002351683A
JP2002351683A JP2001154928A JP2001154928A JP2002351683A JP 2002351683 A JP2002351683 A JP 2002351683A JP 2001154928 A JP2001154928 A JP 2001154928A JP 2001154928 A JP2001154928 A JP 2001154928A JP 2002351683 A JP2002351683 A JP 2002351683A
Authority
JP
Japan
Prior art keywords
nonvolatile memory
code
data
updating
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001154928A
Other languages
Japanese (ja)
Inventor
Yoichi Iwasaki
洋一 岩崎
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2001154928A priority Critical patent/JP2002351683A/en
Publication of JP2002351683A publication Critical patent/JP2002351683A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To start updating a program again without problems even when a fault is generated at the time of updating the program. SOLUTION: In the case that a key is inputted (S301) and whether or not it is an updating request key is judged (3302), the reception processing of updating data is performed (S304) and whether or not they are data for updating for BOOT is judged (S305). In the case of judging that it is the updating instruction of a code for BOOT, whether or not a second nonvolatile memory is in an initial state is confirmed (S306). In the case that it is already written, the code updating processing of a first nonvolatile memory is performed (S308). In the case that it is not written yet, the code updating processing of writing an optimum code for BOOT to the second nonvolatile memory is performed (S307). Whether or not an updating processing is normally ended is judged (S309), and in the case that it is normally ended, the code updating processing of the first nonvolatile memory part is performed (S308).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、不揮発性メモリを
用いたシステムにおいて、不揮発性メモリ内のプログラ
ムの更新時に問題が発生しても、再起動可能なシステム
の提供を可能にするプログラム更新制御方法に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program update control system which can provide a restartable system even if a problem occurs when updating a program in a nonvolatile memory in a system using a nonvolatile memory. It is about the method.

【0002】[0002]

【従来の技術】従来、マイクロコンピュータ等を搭載す
る情報処理装置は、マスクROM等に、最低限のBOO
T用コード等を保持しており、その部分は書き換えは不
可能で、そのコードにより初期の起動を可能な構成とし
ている。しかし、この構成では、出荷後に、ユーザー先
にて構成が変更された場合に、電源ON時の状況によっ
ては、出荷時に用意していたBOOT用コードでは起動
できない場合がある。
2. Description of the Related Art Conventionally, an information processing apparatus equipped with a microcomputer or the like has a minimum BOO in a mask ROM or the like.
A code for T and the like is held, and the portion is not rewritable, so that the code can be used for initial startup. However, with this configuration, if the configuration is changed by the user after the shipment, the boot code may not be able to be activated with the BOOT code prepared at the time of shipment, depending on the power-on situation.

【0003】また、不揮発性メモリにプログラム(BO
OT用コード及びアプリケーション)を搭載したシステ
ムにおいては、この不揮発性メモリの内容を更新時に、
データ送信ミスや、予期せぬ電源OFF等の何らかのト
ラブルで、プログラムの更新中断が発生した場合に、シ
ステムとして復帰不能となり、基板交換等の問題が発生
する場合がある。
Further, a program (BO) is stored in a nonvolatile memory.
OT code and application), when updating the contents of this non-volatile memory,
If the update of the program is interrupted due to a data transmission error or unexpected trouble of turning off the power, the system cannot be restored, and a problem such as replacement of the board may occur.

【0004】[0004]

【発明が解決しようとする課題】本発明は、そのような
状況に鑑みてなされたもので、不揮発性メモリ内のプロ
グラムの更新時に、第1の不揮発性メモリにデータを書
き込む前に、1回だけ書き込み可能な第2の不揮発性メ
モリ(OTP領域)に、最適なBOOT用コードを書き
込むことにより、第1の不揮発性メモリの更新途中で、
何からの問題が発生した場合でも、この第2の不揮発性
メモリを使用して、問題なくプログラムの再更新が何度
でも可能となるシステムを提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of such a situation. When updating a program in a nonvolatile memory, the present invention is performed once before writing data to the first nonvolatile memory. By writing the optimal BOOT code into the second nonvolatile memory (OTP area) in which only the first nonvolatile memory can be written,
It is an object of the present invention to provide a system in which a program can be re-updated many times without any problem by using the second nonvolatile memory even if a problem occurs.

【0005】[0005]

【課題を解決するための手段】本発明は、再書き込み可
能な第1の不揮発性メモリと、1度だけ書き込み可能な
第2の不揮発性メモリ(OTP領域)を搭載したシステ
ムにおいて、前記第1の不揮発性メモリ内に搭載してい
るBOOT用コードを更新する場合に、前記第2の不揮
発性メモリに最適なBOOT用コードを書き込んだ後、
第1の不揮発性メモリの更新を行うようにしたプログラ
ムを搭載したことを特徴とするプログラム更新制御方法
である。
According to the present invention, there is provided a system in which a rewritable first nonvolatile memory and a once-writable second nonvolatile memory (OTP area) are mounted. When updating the BOOT code mounted in the nonvolatile memory of the above, after writing the optimal BOOT code in the second nonvolatile memory,
A program update control method including a program for updating a first nonvolatile memory.

【0006】本発明は、更に、前記プログラム更新制御
方法において、前記第2の不揮発性メモリに、最適のB
OOT用コードを書き込む場合に、その時のシステム構
成を自動判別して、最適なBOOT用コードを選択的に
書き込むようにしたものである。本発明は、更に、前記
プログラム更新制御方法において、起動時に選択するB
OOT用コードを、外部からの信号により、前記第1の
不揮発性メモリ、又は前記第2の不揮発性メモリに、切
り替えて書き込むことを可能としたものである。
According to the present invention, in the above-mentioned program update control method, an optimum B is stored in the second nonvolatile memory.
When writing the OOT code, the system configuration at that time is automatically determined, and the optimum BOOT code is selectively written. The present invention further provides the program update control method, wherein
The OOT code can be switched and written into the first nonvolatile memory or the second nonvolatile memory by an external signal.

【0007】本発明は、更に、前記プログラム更新制御
方法において、前記第2の不揮発性メモリにBOOT用
コードを書き込み時に、途中で問題が発生した場合に、
前記第1の不揮発性メモリの更新処理を行わないように
したものである。本発明は、更に、前記プログラム更新
制御方法において、プログラムの更新時に、前記第1の
不揮発性メモリ用更新データと前記第2の不揮発性メモ
リ用更新データを合せて受信し、その更新データのデー
タ構造から自動判別して各々のメモリに書き込むように
したものである。
According to the present invention, in the above-mentioned program update control method, when a problem occurs in the middle of writing a BOOT code in the second nonvolatile memory,
The first non-volatile memory is not updated. The present invention further provides the program update control method, wherein when the program is updated, the first update data for the nonvolatile memory and the update data for the second nonvolatile memory are received together, and the data of the update data is received. The data is automatically discriminated from the structure and written into each memory.

【0008】更に、本発明は、前記プログラム更新制御
方法において、プログラムの更新時に、BOOT用コー
ド更新データとアプリケーション用更新データを合せて
受信し、その更新データのデータ構造から自動判別し
て、BOOT用コードは、前記第1及び第2の不揮発性
メモリを更新し、アプリケーション用データは、前記第
1の不揮発性メモリのみを更新するようにしたものであ
る。本発明は、更に、前記プログラム更新制御方法にお
いて、前記第1の不揮発性メモリの更新時に、第2の不
揮発性メモリが既に更新されている場合には、前記第2
の不揮発性メモリの更新を行わないようにしたものであ
る。
Further, according to the present invention, in the above-mentioned program update control method, when a program is updated, the BOOT code update data and the application update data are received together, and the BOOT code update data is automatically determined from the data structure of the update data. The application code updates the first and second nonvolatile memories, and the application data updates only the first nonvolatile memory. The present invention further provides the program update control method, wherein the second nonvolatile memory is already updated when the first nonvolatile memory is updated.
The non-volatile memory is not updated.

【0009】[0009]

【発明の実施の形態】本発明によるプログラム更新制御
方法の実施形態を、図面に基づいて、以下に説明する。
なお、以下の実施の形態は、本発明の一実施例であっ
て、本発明の技術的範囲を限定するものではない。図1
は、本発明によるプログラム更新制御方法を実施する装
置の一実施例における構成を示すブロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a program update control method according to the present invention will be described below with reference to the drawings.
The following embodiment is an example of the present invention and does not limit the technical scope of the present invention. FIG.
FIG. 1 is a block diagram showing a configuration in an embodiment of an apparatus for implementing a program update control method according to the present invention.

【0010】図において、1は、CPU、2は、メモリ
コントローラ、3は、第1の不揮発性メモリ、4は、第
2の不揮発性メモリ(OTPメモリ:一回のみ書き込み
が可能なメモリ)、5は、標準及び拡張用DRAM、7
は、キー入力部、8は、パラレルI/F、9は、オプシ
ョンで装着可能な表示用LCD部で、6は、キー入力部
7、パラレルI/F8、LCD部9を管理するI/O部
である。そして、10は、起動時のメモリを選択するス
イッチであり、このスイッチ10が、A側にある場合に
は、第1の不揮発性メモリ3から、B側にある場合に
は、第2の不揮発性メモリ4から起動するようになって
いる。
In the figure, 1 is a CPU, 2 is a memory controller, 3 is a first nonvolatile memory, 4 is a second nonvolatile memory (OTP memory: a memory which can be written only once), 5 is a standard and extension DRAM, 7
Denotes a key input unit, 8 denotes a parallel I / F, 9 denotes an optional display LCD unit, and 6 denotes an I / O for managing the key input unit 7, the parallel I / F 8 and the LCD unit 9. Department. Reference numeral 10 denotes a switch for selecting a memory at the time of startup. When the switch 10 is on the A side, the switch is switched from the first nonvolatile memory 3 to the second nonvolatile memory when the switch 10 is on the B side. The memory is started from the memory 4.

【0011】図2は、第1及び第2の不揮発性メモリ内
のメモリ構成を示す図である。第1の不揮発性メモリ3
内のアドレス(0x00000〜0x0FFF)は、B
OOT用コード部21で、BOOT用コードが格納さ
れ、そして、アドレス(0x1000〜0x1FFF)
は、コード更新部22で、コード更新用プログラムが格
納され、アドレス(0x2000〜0xFFFF)は、
アプリケーション部23で、アプリケーション用コード
が格納されている。
FIG. 2 is a diagram showing a memory configuration in the first and second nonvolatile memories. First nonvolatile memory 3
Address (0x00000-0x0FFF) in B
In the OOT code section 21, the BOOT code is stored, and the address (0x1000 to 0x1FFF) is stored.
Is a code updating unit 22 in which a code updating program is stored, and the address (0x2000 to 0xFFFF) is
The application unit 23 stores application codes.

【0012】このBOOT用コード部21には、電源O
N時の必要な各部の初期化ルーチン及びデバイスドライ
バ、OSの起動部分、コード更新部22には、コード更
新用のプログラムが搭載されており、その中の一機能と
して、第1の不揮発性メモリ更新時に、最適なBOOT
用コードのみを第2の不揮発性メモリに書き込むコード
が含まれている。また、アプリケーション部23内のア
プリケーション用コードには、実際にOS上で動作する
実コードが含まれている。また、コード部24は、第2
の不揮発性メモリ4内のデータを示しており、出荷時に
は、初期状態(ALL“1”)になっている。
The BOOT code section 21 has a power supply O.
A code updating program is installed in the initialization routine and device driver of each part required at the time of N, the boot part of the OS, and the code updating part 22. One of the functions is a first nonvolatile memory. When updating, the optimal BOOT
A code for writing only the application code to the second nonvolatile memory is included. Further, the application code in the application unit 23 includes actual code that actually runs on the OS. In addition, the code section 24
In the nonvolatile memory 4 at the time of shipment, which is in an initial state (ALL “1”).

【0013】図3は、本発明のプログラム更新制御方法
におけるプログラム更新の処理手順を示すフローチャー
ト図である。コードデータ更新指示入力であるキー入力
を待つ(ステップS301)。何らかのキー入力がある
と、それが更新要求キーか否かが判定される(ステップ
S302)。ステップS302において、更新要求以外
のコードと判定された場合には、そのキーに対応するデ
ータ処理を行う(ステップS303)。
FIG. 3 is a flowchart showing the procedure of a program update process in the program update control method of the present invention. The process waits for a key input as a code data update instruction input (step S301). If there is any key input, it is determined whether or not it is an update request key (step S302). If it is determined in step S302 that the code is other than an update request, data processing corresponding to the key is performed (step S303).

【0014】一方、ステップS302において、更新要
求と判断された場合には、更新データの受信処理を行う
(ステップS304)。このデータは、パラレルI/F
8から受信し、受信したデータは、DRAM5に蓄えら
れる。そして、ステップS304で受信したデータが、
BOOT用の更新用データか否かが判定される(ステッ
プS305)。ステップS305において、BOOT用
の更新用データでなかった場合には、第1の不揮発性メ
モリの指示されたコード部の更新処理(以下、「コード
更新処理A」と称する。)を行う(ステップS30
8)。
On the other hand, if it is determined in step S302 that the request is an update request, a process of receiving update data is performed (step S304). This data is parallel I / F
8, and the received data is stored in the DRAM 5. Then, the data received in step S304 is
It is determined whether or not the data is BOOT update data (step S305). If it is determined in step S305 that the data is not BOOT update data, an update process (hereinafter, referred to as “code update process A”) of the specified code portion of the first nonvolatile memory is performed (step S30).
8).

【0015】また、ステップS305にて、受信データ
がBOOT用コードの更新指示と判断された場合には、
第1の不揮発性メモリ内のBOOT用コードを更新する
前に、第2の不揮発性メモリが初期状態か否かを確認す
る(ステップS306)。この場合の判断方法として
は、初期状態の不揮発性メモリの値は、すべてのビット
が“1”なので、先頭番地のデータを読み出して、FF
か否かで判断している。
If it is determined in step S305 that the received data is an instruction to update the BOOT code,
Before updating the BOOT code in the first nonvolatile memory, it is confirmed whether or not the second nonvolatile memory is in the initial state (step S306). As a determination method in this case, since all bits of the value of the nonvolatile memory in the initial state are “1”, the data of the head address is read and the FF is read.
Or not.

【0016】また、別の方法として、第2の不揮発性メ
モリに書き込み後、第2の不揮発性メモリ内の特定のア
ドレスに特定のコードを書き込んでおき、そのデータで
比較する方法も可能である。そして、ステップS306
において、既に書き込み済みと判断した場合には、コー
ド更新処理Aを行う(ステップS308)。また、ステ
ップS306において、未書き込みと判断された場合に
は、第2の不揮発性メモリに、最適なBOOT用コード
を書き込むコード更新処理(以下、「コード更新処理
B」と称する。)を行う(ステップS307)。
As another method, it is also possible to write a specific code at a specific address in the second nonvolatile memory after writing to the second nonvolatile memory, and to compare with the data. . Then, step S306
In step S308, if it is determined that the data has already been written, code update processing A is performed (step S308). If it is determined in step S306 that data has not been written, a code update process (hereinafter, referred to as “code update process B”) for writing an optimal BOOT code into the second nonvolatile memory is performed (hereinafter, referred to as “code update process B”). Step S307).

【0017】次に、該ステップS307の更新処理が正
常終了か否かを判断して(ステップS309)、正常に
終了した場合には、第1の不揮発性メモリのコード更新
処理Aを行う(ステップS308)。また、ステップS
309にて、エラーと判断された場合には、エラー表示
を行い(ステップS310)、コード更新処理Bを中断
する。
Next, it is determined whether or not the update processing in step S307 is completed normally (step S309). If the update processing is completed normally, code update processing A of the first nonvolatile memory is performed (step S309). S308). Step S
If it is determined in 309 that an error has occurred, an error message is displayed (step S310), and the code update processing B is interrupted.

【0018】図4は、図3のステップS307における
第2の不揮発性メモリ(OTP)に最適なBOOT用コ
ードを書き込む処理(コード更新処理B)の詳細な手順
を示すフローチャート図である。先ず、第2の不揮発性
メモリ(OTP)を書き込み可能モードにする(ステッ
プS401)。次いで、最低限必要な基本共通部分(C
PU初期化等の基本ドライバ、OS起動部、及びコード
更新部)を書き込む(ステップS402)。基本共通部
分に関しては、如何なるシステムにおいても必要なもの
で、最初に書き込む。
FIG. 4 is a flowchart showing a detailed procedure of a process (code update process B) of writing an optimum BOOT code into the second nonvolatile memory (OTP) in step S307 of FIG. First, the second nonvolatile memory (OTP) is set in a writable mode (step S401). Next, the minimum required basic common part (C
Write a basic driver for PU initialization and the like, an OS activation unit, and a code update unit (step S402). The basic common part is necessary in any system, and is written first.

【0019】この書き込み時にエラーが発生したか否か
を判断し(ステップS403)、書き込みエラーが発生
したと判断した場合には、処理を中断する。また、正常
に書き込みができた場合には、図1に示すオプションで
あるLCD部9が装着されているか否かを確認し(ステ
ップS404)、未装着の場合には、ステップS407
に進み、装着されている場合には、次のステップS40
5でLCD用のドライバ部を書き込む。このLCD用の
ドライバ書き込み時に、エラーが発生したか否かを判断
し(ステップS406)、書き込みエラーが発生したと
判断した場合には、処理を中断する。
It is determined whether an error has occurred during the writing (step S403). If it is determined that a writing error has occurred, the process is interrupted. In addition, when the writing is normally performed, it is confirmed whether or not the optional LCD unit 9 shown in FIG. 1 is mounted (step S404), and if not, the step S407 is performed.
To the next step S40
At 5, the LCD driver section is written. At the time of writing the LCD driver, it is determined whether or not an error has occurred (step S406). If it is determined that a writing error has occurred, the process is interrupted.

【0020】一方、正常に書き込みができた場合には、
同様に図1に示すオプションである拡張DRAM部5が
装着されているかどうかを確認し(ステップS40
7)、未装着の場合には、ステップS410に進み、装
着されている場合には、次のステップS408におい
て、拡張用DRAMのドライバ部を書き込む。この拡張
用DRAMのドライバ書き込み時に、エラーが発生した
か否かを判断し(ステップS409)、エラーが発生し
た場合には、処理を中断する。
On the other hand, if the writing was successful,
Similarly, it is checked whether the optional extended DRAM unit 5 shown in FIG. 1 is mounted (step S40).
7) If it is not mounted, the process proceeds to step S410. If it is mounted, in the next step S408, the driver of the extension DRAM is written. At the time of writing to the driver for the extension DRAM, it is determined whether or not an error has occurred (step S409). If an error has occurred, the process is interrupted.

【0021】正常に書き込みができた場合には、第2の
不揮発性メモリ(OTP)にデータを書き込んだことを
認識できるように、第2の不揮発性メモリ内の特定の固
定アドレスに決められた書き込み済みコードを書き込み
(ステップS410)、処理を終了する。この図4のフ
ローにおいては、第2の不揮発性メモリに最適なBOO
T用コードを書き込んでいるが、同じ処理方式で、複数
の専用ドライバを選択し、最適なBOOT用コードを書
き込むことも可能である。
When the data can be written normally, a specific fixed address in the second nonvolatile memory (OTP) is determined so that it can be recognized that the data has been written to the second nonvolatile memory (OTP). The written code is written (step S410), and the process ends. In the flow of FIG. 4, the optimal BOO for the second nonvolatile memory
Although the T code is written, it is also possible to select a plurality of dedicated drivers and write the optimal BOOT code by the same processing method.

【0022】図5は、図3のステップS304にて受信
する更新用データの構成の一例を示す図である。この更
新用データ501は、BOOT更新用データ部502
と、アプリケーション更新用データ部503とからな
り、BOOT更新用データ部502は、第1及び第2の
不揮発性メモリで共通仕様になっており、データに関す
る情報を表すHeader情報504、基本OS部50
5、拡張機能であるLCD用ドライバ506、拡張メモ
リ用ドライバ507、Utility部508で構成さ
れている。
FIG. 5 is a diagram showing an example of the configuration of the update data received in step S304 of FIG. The update data 501 is stored in the BOOT update data section 502.
And an application update data section 503. The BOOT update data section 502 has a common specification in the first and second non-volatile memories, and has Header information 504 indicating information about data, and a basic OS section 50.
5, an LCD driver 506 as an extended function, an extended memory driver 507, and a utility unit 508.

【0023】図3のステップS305では、このHea
der情報504を判断して、次のステップを決定する
ようにしている。また、アプリケーション更新用データ
部503は、データに関する情報を表すHeader情
報509、及びアプリケーション更新用データ510で
構成されている。
In step S305 of FIG.
The next step is determined by determining the der information 504. The application update data unit 503 includes Header information 509 indicating information about data and application update data 510.

【0024】図6は、図3のステップS308における
第1の不揮発性メモリに最適なBOOT用コードを書き
込む処理(コード更新処理A)の詳細な手順を示すフロ
ーチャート図である。先ず、第1の不揮発性メモリを書
き込み可能モードにする(ステップS601)。次に更
新するのがアプリ部のみかどうかを判断し(ステップS
602)、アプリ部のみであれば、S612に進み、ま
た、BOOT用コードの更新であれば、最低限必要な基
本共通部分(CPU初期化等の基本ドライバ、OS起動
部、及びコード更新部)を書き込む(ステップS60
3)。この書き込み時にエラーが発生したか否かを判断
し(ステップS604)、書き込みエラーが発生したと
判断した場合には、第1メモリの書き込みモードを解除
して(ステップS615)、処理を中断する。
FIG. 6 is a flowchart showing a detailed procedure of the process (code update process A) of writing the optimal BOOT code into the first nonvolatile memory in step S308 of FIG. First, the first nonvolatile memory is set to a writable mode (step S601). Next, it is determined whether only the application section is updated (step S
602) If only the application unit, proceed to S612. If the BOOT code is to be updated, the minimum required basic common parts (basic driver such as CPU initialization, OS startup unit, and code update unit) Is written (step S60).
3). It is determined whether or not an error has occurred during this writing (step S604). If it is determined that a writing error has occurred, the writing mode of the first memory is canceled (step S615), and the process is interrupted.

【0025】また、正常に書き込みができた場合には、
LCD部9が装着されているか否かを確認し(ステップ
S605)、未装着の場合には、ステップS608に進
み、装着されている場合には、次のステップS606で
LCD用のドライバ部を書き込む。このLCD用のドラ
イバ書き込み時に、エラーが発生したか否かを判断し
(ステップS607)、書き込みエラーが発生したと判
断した場合には、第1メモリの書き込みモードを解除し
て(ステップS615)、処理を中断する。
When writing is normally performed,
It is confirmed whether or not the LCD unit 9 is mounted (step S605). If the LCD unit 9 is not mounted, the process proceeds to step S608. If the LCD unit 9 is mounted, the LCD driver unit is written in the next step S606. . At the time of writing the LCD driver, it is determined whether or not an error has occurred (step S607). If it is determined that a writing error has occurred, the writing mode of the first memory is released (step S615). Stop processing.

【0026】一方、正常に書き込みができた場合には、
拡張DRAM部5が装着されているかどうかを確認し
(ステップS608)、未装着の場合には、ステップS
611に進み、装着されている場合には、次のステップ
S609において、拡張用DRAMのドライバ部の書き
込みを行う。
On the other hand, when the writing is normally completed,
It is confirmed whether or not the extended DRAM unit 5 is mounted (step S608).
Proceeding to 611, if it is mounted, in the next step S609, writing to the driver section of the extension DRAM is performed.

【0027】この拡張用DRAMのドライバ書き込み時
に、エラーが発生したか否かを判断し(ステップS61
0)、エラーが発生した場合には、第1メモリの書き込
みモードを解除して(ステップS615)、処理を中断
する。正常に書き込みができた場合には、アプリ部の更
新があるか否かを判断し(ステップS611)、ない場
合には、ステップS614に進み、ある場合には、アプ
リケーション部分の書き込みを行う(ステップS61
2)。更に、この書き込み処理において、エラーが発生
したか否かを判断し(ステップS613)、エラーが発
生した場合には、第1メモリの書き込みモードを解除し
て(ステップS615)、処理を中断する。エラーがな
いと判断された場合には、第1メモリの書き込みモード
を解除して(ステップS614)、正常終了処理を行
う。図6内の正常及びエラー発生時の両方の場合とも、
最後は、第1のメモリの書き込みコードの解除を行う。
It is determined whether or not an error has occurred at the time of writing the driver of the extension DRAM (step S61).
0) When an error occurs, the write mode of the first memory is released (step S615), and the process is interrupted. If the writing has been normally completed, it is determined whether or not the application section has been updated (step S611). If not, the process proceeds to step S614. If there is, the application portion is written (step S611). S61
2). Further, in this writing process, it is determined whether or not an error has occurred (step S613). If an error has occurred, the writing mode of the first memory is released (step S615), and the process is interrupted. If it is determined that there is no error, the write mode of the first memory is released (step S614), and normal termination processing is performed. In both normal and error cases in FIG. 6,
Finally, the write code of the first memory is released.

【0028】図7は、第1及び第2の不揮発性メモリ専
用のBOOT用更新データを合体したデータ構成の一例
を示す図である。この更新用データ701は、第2の不
揮発性メモリ部専用BOOT更新用データ部702、第
1の不揮発性メモリ部専用BOOT更新用データ部70
3、及びアプリケーション更新用データ部704からな
る。第2の不揮発性メモリ部専用データ部702は、デ
ータに関する情報を表すHeader部705、基本O
S部706、拡張機能であるLCD用ドライバ707、
拡張メモリ用ドライバ708、Utility部709
で構成されている。
FIG. 7 is a diagram showing an example of a data structure obtained by combining the BOOT update data dedicated to the first and second nonvolatile memories. The update data 701 includes a BOOT update data section 702 dedicated to the second nonvolatile memory section and a BOOT update data section 70 dedicated to the first nonvolatile memory section.
3 and an application update data section 704. The second non-volatile memory section dedicated data section 702 includes a Header section 705 indicating information about data,
S unit 706, LCD driver 707 as an extended function,
Extended memory driver 708, Utility unit 709
It is composed of

【0029】そして、第1の不揮発性メモリ部専用デー
タ部703は、データに関する情報を表すHeader
部710と、基本OS及び拡張機能部が一体となったデ
ータ711で構成されている。また、アプリケーション
更新用データ部704は、データに関する情報を表すH
eader部712、及び更新用データ部713で構成
されており、図8は、図7に示すデータを用いた第1の
不揮発性メモリの更新処理(コード更新処理A)の手順
を示すフローチャート図である。
The first non-volatile memory unit-dedicated data unit 703 includes a header representing information about data.
A unit 710 and data 711 in which a basic OS and an extended function unit are integrated. In addition, the application update data unit 704 includes H indicating information about data.
FIG. 8 is a flowchart showing a procedure of a first non-volatile memory update process (code update process A) using the data shown in FIG. 7, which is composed of an header section 712 and an update data section 713. is there.

【0030】先ず、第1の不揮発性メモリを書き込み可
能モードにし(ステップS801)、BOOT関連のコ
ードを全部書き込む(ステップS802)。この書き込
み時に、エラーが発生したか否かを判断し(ステップS
803)、書き込みエラーが発生したと判断した場合に
は、第1メモリの書き込みモードを解除して(ステップ
S807)、処理を中断する。
First, the first nonvolatile memory is set to a writable mode (step S801), and all the BOOT-related codes are written (step S802). At the time of this writing, it is determined whether or not an error has occurred (step S
803) If it is determined that a write error has occurred, the write mode of the first memory is released (step S807), and the process is interrupted.

【0031】また、エラーがない場合には、アプリケー
ション部の書き込みを行い(ステップS804)、この
とき、書き込みエラーが発生したか否かを判断し(ステ
ップS805)、エラーが発生したと判断した場合に
は、第1メモリの書き込みモードを解除して(ステップ
S807)、処理を中断する。一方、エラーがない場合
は、第1メモリの書き込みモードを解除して(ステップ
S806)、正常終了処理となる。正常、エラーの両方
の場合とも、メモリの書き込みモードは、解除を行う。
上記したように、図5及び図7に示すいずれのデータ
も、1回の転送で全部の更新データを受信して、自動判
別することにより、効率よくプログラムの更新を行うこ
とが可能な構成となっている。
If there is no error, the application section is written (step S804). At this time, it is determined whether or not a write error has occurred (step S805). Then, the write mode of the first memory is released (step S807), and the process is interrupted. On the other hand, when there is no error, the write mode of the first memory is released (step S806), and the normal end processing is performed. In both normal and error cases, the memory write mode is released.
As described above, for all of the data shown in FIGS. 5 and 7, by receiving all update data in one transfer and automatically determining the data, a configuration is possible in which the program can be updated efficiently. Has become.

【0032】図9は、本発明のプログラム更新制御方法
における電源ON時の処理手順を示すフローチャート図
である。電源ON後、最初に、図1のメモリコントロー
ラ2に入力されているスイッチ10の情報を見て(ステ
ップS901)、A側にあった場合には、第1の不揮発
性メモリにおけるアドレス0x000からプログラムを
起動する(ステップS902)。次いで、BOOTコー
ド及びOSを起動して(ステップS903)、更に、ア
プリケーションを起動する(ステップS904)。その
後の処理は、図3と同じ処理動作となる。
FIG. 9 is a flowchart showing a processing procedure when the power is turned on in the program update control method of the present invention. After the power is turned on, first, the information of the switch 10 inputted to the memory controller 2 in FIG. 1 is looked at (step S901), and if it is on the A side, the program is started from the address 0x000 in the first nonvolatile memory. Is started (step S902). Next, the BOOT code and the OS are activated (step S903), and the application is further activated (step S904). Subsequent processing is the same processing operation as in FIG.

【0033】一方、ステップS901にて、スイッチが
B側であった場合には、第2の不揮発性メモリにおける
アドレス0x10000からプログラムを起動し(ステ
ップS905)、次いで、BOOTコード及びコード更
新部を起動する(ステップS906)。その後の処理
は、図3と同じ処理動作となるが、更新処理に関係ない
ステップS303は、無処理になる。以上のように、何
らかの原因で、第1の不揮発性メモリに不具合が発生し
た場合でも確実に起動を行うことが可能となる。
On the other hand, if the switch is on the B side in step S901, the program is started from the address 0x10000 in the second nonvolatile memory (step S905), and then the BOOT code and code update unit are started. (Step S906). Subsequent processing is the same processing operation as in FIG. As described above, even if a failure occurs in the first nonvolatile memory for some reason, it is possible to reliably start up the first nonvolatile memory.

【0034】[0034]

【発明の効果】本発明によれば、第2の不揮発性メモリ
のOTP領域にBOOT用コードを書き込みことによ
り、第1の不揮発性メモリ更新時に問題が発生した場合
でも、第2の不揮発性メモリのOTP領域より確実に再
起動が可能となる。更に、本発明によれば、最適なBO
OT用コードを自動判別で書き込むことにより、再起動
の信頼性も向上し、また、メモリサイズも削減できる。
According to the present invention, by writing the BOOT code in the OTP area of the second nonvolatile memory, even if a problem occurs at the time of updating the first nonvolatile memory, the second nonvolatile memory can be used. Restart can be performed more reliably than the OTP area. Furthermore, according to the present invention, the optimal BO
By automatically writing the OT code, the reliability of the restart can be improved and the memory size can be reduced.

【0035】更に、本発明によれば、第1の不揮発性メ
モリ更新時に問題が発生した場合に確実に第2の不揮発
性メモリからの起動が可能となり、システムとして使用
不能になるリスクを回避できる。更に、本発明によれ
ば、両方のメモリ用データを1回で送受信できるので、
更新手順も簡単になり、ミスの発生を防ぐことが可能と
なる。更に、本発明によれば、既に更新済のときは、更
新を行わないようにし、無駄な処理を削減することがで
きる。
Further, according to the present invention, when a problem occurs at the time of updating the first non-volatile memory, it is possible to reliably start up from the second non-volatile memory and avoid the risk of becoming unusable as a system. . Further, according to the present invention, both memory data can be transmitted and received at one time,
The updating procedure is also simplified, and it is possible to prevent occurrence of a mistake. Further, according to the present invention, when updating has already been performed, updating is not performed, and unnecessary processing can be reduced.

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

【図1】本発明によるプログラム更新制御方法を実施す
る装置の一実施例における構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing a configuration of an embodiment of an apparatus for implementing a program update control method according to the present invention.

【図2】第1及び第2の不揮発性メモリ内のメモリ構成
の一例を示す図である。
FIG. 2 is a diagram illustrating an example of a memory configuration in first and second nonvolatile memories.

【図3】本発明のプログラム更新制御方法におけるプロ
グラム更新の処理手順を示すフローチャート図である。
FIG. 3 is a flowchart illustrating a procedure of a program update in the program update control method of the present invention.

【図4】図3のステップS307における第2の不揮発
性メモリ(OTP)に最適なBOOT用コードを書き込
む処理(コード更新処理B)の詳細な手順を示すフロー
チャート図である。
FIG. 4 is a flowchart showing a detailed procedure of a process (code update process B) of writing an optimal BOOT code into a second nonvolatile memory (OTP) in step S307 of FIG. 3;

【図5】図3のステップS304にて受信する更新用デ
ータの構成の一例を示す図である。
FIG. 5 is a diagram illustrating an example of a configuration of update data received in step S304 of FIG. 3;

【図6】図3のステップS308における第1の不揮発
性メモリに最適なBOOT用コードを書き込む処理(コ
ード更新処理A)の詳細な手順を示すフローチャート図
である。
FIG. 6 is a flowchart illustrating a detailed procedure of a process (code update process A) of writing an optimal BOOT code into the first nonvolatile memory in step S308 of FIG. 3;

【図7】第1及び第2の不揮発性メモリ専用のBOOT
用更新データを合体したデータ構成の一例を示す図であ
る。
FIG. 7: BOOT dedicated to first and second nonvolatile memories
FIG. 4 is a diagram showing an example of a data configuration in which update data for use is combined.

【図8】図7に示すデータを用いた第1の不揮発性メモ
リの更新処理(コード更新処理A)の手順を示すフロー
チャート図である。
8 is a flowchart illustrating a procedure of a first non-volatile memory update process (code update process A) using the data illustrated in FIG. 7;

【図9】本発明のプログラム更新制御方法における電源
ON時の処理手順を示すフローチャート図である。
FIG. 9 is a flowchart showing a processing procedure when the power is turned on in the program update control method of the present invention.

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

1…CPU、2…メモリコントローラ、3…第1の不揮
発性メモリ、4…第2の不揮発性メモリ(OTP)、5
…標準及び拡張用DRAM、6…I/O部、7…キー入
力部、8…パラレルI/F、9…表示用LCD部、10
…起動時のメモリを選択するスイッチ。
DESCRIPTION OF SYMBOLS 1 ... CPU, 2 ... memory controller, 3 ... 1st non-volatile memory, 4 ... 2nd non-volatile memory (OTP), 5
... DRAM for standard and expansion, 6 ... I / O section, 7 ... Key input section, 8 ... Parallel I / F, 9 ... LCD section for display, 10
… Switch to select memory at startup.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 再書き込み可能な第1の不揮発性メモリ
と、1度だけ書き込み可能な第2の不揮発性メモリ(O
TP領域)を搭載したシステムにおいて、前記第1の不
揮発性メモリ内に搭載しているBOOT用コードを更新
する場合に、前記第2の不揮発性メモリに最適なBOO
T用コードを書き込んだ後、第1の不揮発性メモリの更
新を行うようにしたプログラムを搭載したことを特徴と
するプログラム更新制御方法。
1. A rewritable first non-volatile memory and a once-writable second non-volatile memory (O
In a system equipped with a TP area, when updating the BOOT code installed in the first nonvolatile memory, an optimal BOOT for the second nonvolatile memory is used.
A program update control method, comprising a program for updating a first nonvolatile memory after writing a code for T.
【請求項2】 前記第2の不揮発性メモリに最適なBO
OT用コードを書き込む場合に、その時のシステム構成
を自動判別して、最適なBOOT用コードを選択的に書
き込むことを特徴とする請求項1に記載のプログラム更
新制御方法。
2. An optimal BO for the second nonvolatile memory.
2. The program update control method according to claim 1, wherein when writing the OT code, the system configuration at that time is automatically determined, and the optimum BOOT code is selectively written.
【請求項3】 起動時に選択するBOOT用コードを、
前記第1の不揮発性メモリ、又は前記第2の不揮発性メ
モリに、外部からの信号で切り替えて書き込み可能とし
たことを特徴とする請求項1に記載のプログラム更新制
御方法。
3. The BOOT code selected at the time of startup is
2. The program update control method according to claim 1, wherein the first nonvolatile memory or the second nonvolatile memory is switchable and writable by an external signal.
【請求項4】 前記第2の不揮発性メモリに最適なBO
OT用コードを書き込み時に、途中で問題が発生した場
合に、前記第1の不揮発性メモリの更新処理を行わない
ようにしたことを特徴とする請求項1に記載のプログラ
ム更新制御方法。
4. An optimal BO for the second nonvolatile memory
2. The program update control method according to claim 1, wherein if a problem occurs in the middle of writing the OT code, the update processing of the first nonvolatile memory is not performed.
【請求項5】 プログラムの更新時に、前記第1の不揮
発性メモリ用更新データと前記第2の不揮発性メモリ用
更新データを合せて受信し、該更新データのデータ構造
から自動判別して、各々のメモリに書き込むことを特徴
とする請求項1に記載のプログラム更新制御方法。
5. When updating a program, the update data for the first non-volatile memory and the update data for the second non-volatile memory are received together, and automatically determined from the data structure of the update data. 2. The program update control method according to claim 1, wherein the data is written into a memory of the program.
【請求項6】 プログラムの更新時に、BOOT用コー
ド更新データとアプリケーション用更新データを合せて
受信し、該更新データのデータ構造から自動判別して、
前記BOOT用コード更新データは、前記第1及び第2
の不揮発性メモリを更新し、前記アプリケーション用更
新データは、前記第1の不揮発性メモリのみを更新する
ようにしたことを特徴とする請求項1に記載のプログラ
ム更新制御方法。
6. When a program is updated, the BOOT code update data and the application update data are received together, and automatically determined from the data structure of the update data.
The BOOT code update data includes the first and second codes.
2. The program update control method according to claim 1, wherein the non-volatile memory is updated, and the application update data updates only the first non-volatile memory.
【請求項7】 前記第1の不揮発性メモリの更新時に、
前記第2の不揮発性メモリが既に更新されている場合に
は、前記第2の不揮発性メモリの更新を行わないように
したことを特徴とする請求項1に記載のプログラム更新
制御方法。
7. When updating the first nonvolatile memory,
2. The program update control method according to claim 1, wherein the updating of the second nonvolatile memory is not performed when the second nonvolatile memory has already been updated.
JP2001154928A 2001-05-24 2001-05-24 Program updating control method Pending JP2002351683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001154928A JP2002351683A (en) 2001-05-24 2001-05-24 Program updating control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001154928A JP2002351683A (en) 2001-05-24 2001-05-24 Program updating control method

Publications (1)

Publication Number Publication Date
JP2002351683A true JP2002351683A (en) 2002-12-06

Family

ID=18999190

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001154928A Pending JP2002351683A (en) 2001-05-24 2001-05-24 Program updating control method

Country Status (1)

Country Link
JP (1) JP2002351683A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008117385A (en) * 2006-11-07 2008-05-22 Samsung Electronics Co Ltd Apparatus and method for managing security data
JP2012018524A (en) * 2010-07-07 2012-01-26 Canon Inc Information processor and method for controlling the same
JP2014089497A (en) * 2012-10-29 2014-05-15 Mitsubishi Electric Corp Information processing device
DE112017003641T5 (en) 2016-07-19 2019-04-11 Denso Corporation Data overwrite device and data overwrite program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008117385A (en) * 2006-11-07 2008-05-22 Samsung Electronics Co Ltd Apparatus and method for managing security data
JP2012018524A (en) * 2010-07-07 2012-01-26 Canon Inc Information processor and method for controlling the same
JP2014089497A (en) * 2012-10-29 2014-05-15 Mitsubishi Electric Corp Information processing device
DE112017003641T5 (en) 2016-07-19 2019-04-11 Denso Corporation Data overwrite device and data overwrite program

Similar Documents

Publication Publication Date Title
JP4810172B2 (en) Control device, version upgrade method, and program
JPH03141447A (en) Method and apparatus for updating farm ware residing in electrically reloadable programmable read-only memory
JP3310990B2 (en) Electronics
JP6070360B2 (en) Information processing apparatus and processing method thereof
JP2006178403A (en) Display unit
JP2002351683A (en) Program updating control method
US20050246513A1 (en) Electronic control device and data adjustment method
WO2022199622A1 (en) Method for running startup program of electronic device, and electronic device
JP2001356885A (en) Control method and electronic equipment
JPH10333898A (en) Microcomputer
JPH0869376A (en) Reload control circuit for bios
JP2001344156A (en) Device with flash memory and data rewriting method
JP2005128613A (en) Image forming device
JPH1011277A (en) Computer device with electrically rewritable nonvolatile memory and nonvolatile semiconductor memory
JP2002343092A (en) Setting method of register and semiconductor
JP2000235483A (en) Information processor
JP2002157141A (en) Information processor, information processing method and storage medium
JP2001195246A (en) Information processor and device and system and method for writing basic data
JP2019160204A (en) Control unit, image forming apparatus, and circuit arrangement
JPH1050086A (en) Microcomputer having eeprom and its rewriting method
JP2009238071A (en) Built-in system
US20060253743A1 (en) Microcomputer and debugging method
JPH10289077A (en) Printer
JP2001134543A (en) Electronic equipment
JP2022024904A (en) Firmware updating system and firmware updating method

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060908