JP2007316687A - Electronic equipment, program rewriting method, and program - Google Patents

Electronic equipment, program rewriting method, and program Download PDF

Info

Publication number
JP2007316687A
JP2007316687A JP2006142265A JP2006142265A JP2007316687A JP 2007316687 A JP2007316687 A JP 2007316687A JP 2006142265 A JP2006142265 A JP 2006142265A JP 2006142265 A JP2006142265 A JP 2006142265A JP 2007316687 A JP2007316687 A JP 2007316687A
Authority
JP
Japan
Prior art keywords
rewrite
control program
nonvolatile memory
program
state storage
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
JP2006142265A
Other languages
Japanese (ja)
Inventor
Hajime Wada
肇 和田
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.)
D&M Holdings Inc
Original Assignee
D&M Holdings Inc
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 D&M Holdings Inc filed Critical D&M Holdings Inc
Priority to JP2006142265A priority Critical patent/JP2007316687A/en
Publication of JP2007316687A publication Critical patent/JP2007316687A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide electronic equipment, a program rewriting method and a program, capable of rewriting easily and surely a control program stored in a nonvolatile memory. <P>SOLUTION: The electronic equipment is provided with the rewritable nonvolatile memory 34 for storing the control program, a rewriting state storage part 38 for storing information indicating a rewriting state, of the nonvolatile memory 34, to the control program to be stored in the nonvolatile memory 34, and a CPU 30 for conducting control to rewrite the control program, when the information stored in the rewriting state storage part 38 indicates that the rewriting for the control program is not finished in the nonvolatile memory 34, referring to the rewriting state storage part 38 at startup. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、不揮発性メモリに記憶された、電子機器の制御プログラムを書き換える技術に関する。   The present invention relates to a technique for rewriting an electronic device control program stored in a nonvolatile memory.

コンピュータ制御される電子機器では書き換え可能な不揮発性メモリ(フラッシュメモリ等)に制御プログラムが格納され、必要に応じて該制御プログラムの書き換え(更新、アップデート)を行えるものが近年増えている。   In electronic devices controlled by a computer, a control program is stored in a rewritable nonvolatile memory (flash memory or the like), and those that can rewrite (update, update) the control program as necessary have been increasing in recent years.

しかし、書き換え途中でエラーが発生した場合には、通常、機器は動作不能となる。書き換えを確実なものとするため、このようなプログラム更新は、比較的特殊な分野の装置、例えばPC(Personal Computer)用ディスクドライブ、車載用電子制御装置などについて専門的な技術者が行っている(特許文献1、2参照)。   However, if an error occurs during rewriting, the device is normally disabled. In order to ensure rewriting, such a program update is performed by a special engineer for a device in a relatively special field such as a disk drive for a PC (Personal Computer), an in-vehicle electronic control device, etc. (See Patent Documents 1 and 2).

特開2004−185606号公報JP 2004-185606 A 特開2001−135089号公報JP 2001-135089 A

このような分野で利用される電子機器についてプログラムの更新を行うのは、通常作業手順に精通した技術者であり、十分な注意を払って更新を行うため、トラブルも少ない。しかし、一般的な使用者が民生機器について更新作業を行う場合には、たとえ取扱説明書等に注意事項が記載されていたとしても完全に遵守されない場合もあり、また、更新作業に失敗する場合もある。通常、書き換え処理では、不揮発性メモリの古いプログラムを消去後、新しいプログラムが書き込まれる。このため、書き換え処理の途中で書き込みエラーや伝送エラーが発生した場合、再度電子機器を起動しようとしても正常に動作する制御プログラムが無いため起動自体不可能となり、専門知識を有しない者にはその復旧処理は難しい。   Updating an electronic device used in such a field is an engineer who is familiar with the normal work procedure and performs the update with sufficient care, so there are few troubles. However, when a general user performs a renewal operation for consumer devices, even if the precautions are described in the instruction manual, it may not be completely observed, and the renewal operation fails. There is also. Usually, in the rewriting process, after erasing an old program in the nonvolatile memory, a new program is written. For this reason, if a write error or transmission error occurs during the rewrite process, it will not be possible to start up the electronic device again because there is no control program that operates normally. Recovery process is difficult.

上記事情を鑑み、本発明は、不揮発性メモリに格納された制御プログラムを容易、確実に書き換え可能な電子機器、プログラム書き換え方法及びプログラムを提供することを目的とする。   In view of the above circumstances, an object of the present invention is to provide an electronic device, a program rewriting method, and a program that can easily and reliably rewrite a control program stored in a nonvolatile memory.

上記目的を達成するため、本発明の第1の態様における電子機器は、制御プログラムを記憶する、書き換え可能な不揮発性メモリと、前記不揮発性メモリに記憶されるべき制御プログラムへの、前記不揮発性メモリの書き換え状態を示す情報を記憶する書き換え状態記憶部と、起動時に前記書き換え状態記憶部を参照し、該書き換え状態記憶部に記憶された情報が、前記不揮発性メモリにおける制御プログラムの書き換えが終了していないことを示すとき、制御プログラムの書き換えを行うよう制御する制御部と、を備える。   In order to achieve the above object, an electronic device according to a first aspect of the present invention includes a rewritable nonvolatile memory that stores a control program, and the nonvolatile memory that stores the control program to be stored in the nonvolatile memory. The rewrite state storage unit that stores information indicating the rewrite state of the memory, and the rewrite state storage unit is referred to at the time of startup, and the information stored in the rewrite state storage unit has been rewritten to the control program in the nonvolatile memory A control unit that performs control so as to rewrite the control program when indicating that the control program is not performed.

上記構成において、前記制御部は、制御プログラム書き換えが正常に終了したとき、前記書き換え状態記憶部の情報を前記不揮発性メモリにおける制御プログラムの書き換えが終了していることを示す情報に書き換えるよう制御する。   In the above configuration, the control unit controls to rewrite the information in the rewrite state storage unit to information indicating that the rewrite of the control program in the nonvolatile memory is completed when the control program rewrite is normally completed. .

上記構成において、前記制御部は、起動時に前記書き換え状態記憶部を参照し、該書き換え状態記憶部に記憶された情報が、前記制御プログラムの書き換えが終了していることを示すとき、該制御プログラムに基づく制御を行う。   In the above configuration, the control unit refers to the rewrite state storage unit at startup, and when the information stored in the rewrite state storage unit indicates that the rewrite of the control program has been completed, the control program Control based on

上記構成において、例えば、前記書き換え状態記憶部は電池駆動されてもよい。
また、前記書き換え状態記憶部は前記不揮発性メモリの一部に設けられていてもよい。
In the above configuration, for example, the rewrite state storage unit may be battery driven.
Further, the rewrite state storage unit may be provided in a part of the nonvolatile memory.

上記目的を達成するため、本発明の第2の態様におけるプログラム書き換え方法は、制御プログラムが記憶された書き換え可能な不揮発性メモリに更新して記憶されるべき制御プログラムへの、前記不揮発性メモリの書き換え状態を示す情報を記憶する書き換え状態記憶ステップと、起動時に書き換え状態記憶ステップで記憶された情報が、前記不揮発性メモリにおける制御プログラムの書き換えが終了していないことを示すとき、制御プログラムの書き換えを行うよう制御する制御ステップと、を備える。   In order to achieve the above object, a program rewriting method according to a second aspect of the present invention provides a control program to be updated and stored in a rewritable nonvolatile memory in which a control program is stored. A rewrite state storage step for storing information indicating a rewrite state, and when the information stored in the rewrite state storage step at the start indicates that the rewrite of the control program in the nonvolatile memory has not been completed, And a control step for performing control.

上記目的を達成するため、本発明の第3の態様におけるプログラムは、制御プログラムが記憶された書き換え可能な不揮発性メモリに更新して記憶されるべき制御プログラムへの、前記不揮発性メモリの書き換え状態を示す情報を記憶する書き換え状態記憶手順と、起動時に書き換え状態記憶手順で記憶された情報が、前記不揮発性メモリにおける制御プログラムの書き換えが終了していないことを示すとき、制御プログラムの書き換えを行うよう制御する制御手順と、をコンピュータに実行させる。   In order to achieve the above object, the program according to the third aspect of the present invention is a rewrite state of the non-volatile memory into a control program to be updated and stored in the rewritable non-volatile memory storing the control program. When the information stored in the rewrite state storage procedure for storing the information indicating the rewrite state and the information stored in the rewrite state storage procedure at the start indicate that the rewrite of the control program in the nonvolatile memory has not been completed, the control program is rewritten. And a control procedure for controlling the computer to be executed.

すなわち、上記プログラムを再生装置、コンピュータ装置等の電子機器に読み込ませるとともに、一連の処理を実行させることで、本発明を容易に実現することができる。
さらには、上記プログラムを符号化し、搬送波に重畳されたプログラムコード信号として送信するとともに、この搬送波に重畳されたプログラムコード信号を受信し、元のプログラムに復号化してコンピュータ装置等に実行させることにより、本発明における技術を容易に実施することができる。また、このようなコンピュータ装置等にダウンロードされ、復号されたプログラムを、CD−R(Compact Disc Rewritable)等に記録させて再生装置等の電子機器にインストールすることも可能である。
That is, the present invention can be easily realized by causing the electronic device such as a playback device or a computer device to read the program and executing a series of processes.
Furthermore, the program is encoded and transmitted as a program code signal superimposed on a carrier wave, and the program code signal superimposed on the carrier wave is received, decoded into the original program, and executed by a computer device or the like. The technique in the present invention can be easily implemented. It is also possible to record a program downloaded and decrypted in such a computer device or the like on a CD-R (Compact Disc Rewritable) or the like and install it in an electronic device such as a playback device.

本発明によれば、不揮発性メモリに格納された制御プログラムを容易、確実に書き換え可能な電子機器、プログラム書き換え方法及びプログラムが提供される。   ADVANTAGE OF THE INVENTION According to this invention, the electronic device which can rewrite the control program stored in the non-volatile memory easily and reliably, the program rewriting method, and a program are provided.

以下、本発明の実施の形態について図面を参照して詳細に説明する。以下に示す実施の形態では、本発明を、民生用再生装置、特に、コンパクトディスクプレーヤに適用した例について説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the following embodiment, an example in which the present invention is applied to a consumer playback device, particularly a compact disc player will be described.

図1に、本発明の実施の形態にかかる再生装置10の構成を示す。図1に示すように、再生装置10は、メカユニット12と、操作部14と、システム制御部16と、を備える。   FIG. 1 shows the configuration of a playback apparatus 10 according to an embodiment of the present invention. As shown in FIG. 1, the playback device 10 includes a mechanical unit 12, an operation unit 14, and a system control unit 16.

メカユニット12は、ディスク駆動部18と、駆動制御部20と、D/A(Digital to Analog)変換部22と、を備える。
ディスク駆動部18は、一般的なディスクローディング機構から構成され、コンパクトディスクが装填される。ディスク駆動部18は、複数のコンパクトディスクを装填可能なものであってもよい。
The mechanical unit 12 includes a disk drive unit 18, a drive control unit 20, and a D / A (Digital to Analog) conversion unit 22.
The disk drive unit 18 includes a general disk loading mechanism and is loaded with a compact disk. The disk drive unit 18 may be capable of loading a plurality of compact disks.

駆動制御部20は、一般的なディスク駆動制御用の回路を有し、コンパクトディスクの指定されたトラックのシーク及び読み出されたデジタル信号のデコード等を行う。   The drive control unit 20 includes a general disk drive control circuit, and performs seeking of a designated track of the compact disk, decoding of a read digital signal, and the like.

D/A変換部22は、コンパクトディスクから読み出され、駆動制御部20でデコードされたデジタル信号をアナログ信号に変換し、スピーカ等の外部機器に接続される出力端子24に出力する。勿論、スピーカ等を内蔵している場合には、これらを介して放音してもよい。
なお、デジタル出力対応の出力インタフェースを用いる場合には、D/A変換部22によりアナログ信号に変換せず、所定のデジタルインタフェースフォーマットに変換して出力するようにすればよい。
The D / A conversion unit 22 converts the digital signal read from the compact disc and decoded by the drive control unit 20 into an analog signal, and outputs the analog signal to an output terminal 24 connected to an external device such as a speaker. Of course, when a speaker or the like is built in, sound may be emitted through these.
When an output interface compatible with digital output is used, the D / A converter 22 does not convert it into an analog signal, but converts it into a predetermined digital interface format and outputs it.

操作部14は、表示部26と、操作入力部28と、を備える。   The operation unit 14 includes a display unit 26 and an operation input unit 28.

表示部26は、液晶表示装置等から構成され、再生装置10の動作状態、機能等に関する情報を表示する。   The display unit 26 is composed of a liquid crystal display device or the like, and displays information related to the operation state, function, etc. of the playback device 10.

操作入力部28は、電源入力ボタン、再生ボタン、停止ボタン等を備え、操作者からの動作指示入力を受け付ける。操作入力部28は、リモートコントローラやタッチパネル等の入力手段を備えても良い。   The operation input unit 28 includes a power input button, a playback button, a stop button, and the like, and accepts an operation instruction input from an operator. The operation input unit 28 may include input means such as a remote controller and a touch panel.

システム制御部16は、CPU(Central Processing Unit)30と、通信部32と、不揮発性メモリ34と、書き換え制御部36と、書き換え状態記憶部38と、を備える。   The system control unit 16 includes a CPU (Central Processing Unit) 30, a communication unit 32, a nonvolatile memory 34, a rewrite control unit 36, and a rewrite state storage unit 38.

CPU30は、後述する不揮発性メモリ34に記憶された再生制御プログラムに基づいて、操作入力部28からの入力に応じて再生動作を制御する。また、CPU30は、表示部26に動作状態を表示させる。   The CPU 30 controls the reproduction operation according to the input from the operation input unit 28 based on a reproduction control program stored in the nonvolatile memory 34 described later. In addition, the CPU 30 displays an operation state on the display unit 26.

通信部32は、RS(Recommended Standard)232、RS422、RS485等のシリアル通信インタフェースから構成され、外部PC等に接続可能に構成されている。通信部32を介して、PC等からの再生装置10の遠隔制御、及び、更新プログラムの受信が行われる。   The communication unit 32 includes serial communication interfaces such as RS (Recommended Standard) 232, RS422, and RS485, and is configured to be connectable to an external PC or the like. Via the communication unit 32, remote control of the playback apparatus 10 and reception of an update program from a PC or the like is performed.

例えば、通信部32に接続されるPCには、例えば再生装置10のメーカ等のウェブサイトからダウンロードした更新されるべき再生装置10の制御プログラムが保存される。なお、制御プログラムだけでなく、書き換え制御部36と同等に機能するアップデータプログラムがダウンロード・保存されていてもよい。   For example, the PC connected to the communication unit 32 stores a control program for the playback device 10 to be updated downloaded from a website of the playback device 10 manufacturer, for example. Not only the control program but also an updater program that functions in the same manner as the rewrite control unit 36 may be downloaded and stored.

不揮発性メモリ34は、書き換え可能な不揮発性メモリ34、例えば、フラッシュメモリ等の半導体メモリ、EPROM(Erasable Programable Read Only Memory)、EEPROM(Electrically Erasable ROM)、FeRAM(Ferroelectric Random Access Memory)等から構成される。
不揮発性メモリ34は複数の使用エリアを有し、該エリアのいずれかに再生制御プログラム及び書き換え制御プログラムがそれぞれ記憶される。
The nonvolatile memory 34 includes a rewritable nonvolatile memory 34, for example, a semiconductor memory such as a flash memory, an EPROM (Erasable Programmable Read Only Memory), an EEPROM (Electrically Erasable ROM), an FeRAM (Ferroelectric Random Access Memory), and the like. The
The nonvolatile memory 34 has a plurality of use areas, and a reproduction control program and a rewrite control program are stored in each of the areas.

書き換え制御部36は、CPU30の制御の下、不揮発性メモリ34に記憶された書き換え制御プログラムに基づいて、不揮発性メモリ34に記憶された再生制御プログラムを書き換える処理を行う。プログラムの書き換え処理には、不揮発性メモリ34に書き込まれた再生制御プログラムのエラーチェック等の検証処理が含まれる。   The rewrite control unit 36 performs a process of rewriting the reproduction control program stored in the nonvolatile memory 34 based on the rewrite control program stored in the nonvolatile memory 34 under the control of the CPU 30. The program rewriting process includes a verification process such as an error check of the reproduction control program written in the nonvolatile memory 34.

書き換え状態記憶部38は、不揮発性メモリ34の再生制御プログラムが書き換え状態にあるか否かを示す情報を記憶する。CPU30は、書き換え制御部36による再生制御プログラムの書き換えを開始するときに書き換え状態にあること、換言すれば、書き換えが継続中であり終了していないことを示す情報を書き換え状態記憶部38に記憶する。   The rewrite state storage unit 38 stores information indicating whether or not the reproduction control program in the nonvolatile memory 34 is in a rewritten state. The CPU 30 stores in the rewrite state storage unit 38 information indicating that the rewrite control unit 36 is in the rewrite state when the rewrite control unit 36 starts rewriting, in other words, information indicating that rewrite is continuing and has not ended. To do.

また、CPU30は、プログラムの書き換えが正常に終了したことを確認したとき、書き換え状態記憶部38に書き換え状態にないこと、換言すれば、書き換えが正常に終了したことを示す情報に書き換え状態記憶部38を書き換える。   When the CPU 30 confirms that the rewriting of the program has been normally completed, the rewrite state storage unit is updated with information indicating that the rewriting state storage unit 38 is not in the rewriting state, in other words, the rewriting has been completed normally. Rewrite 38.

書き換え状態記憶部38は、電池等により独立に駆動され、再生装置10の電源がオフの場合にも記憶情報は保持される。従って、再生制御プログラムの書き換えが正常に完了せずに、強制終了等した場合であっても、書き換え状態記憶部38に記憶された書き換え状態を示す情報は保持される。   The rewrite state storage unit 38 is independently driven by a battery or the like, and the stored information is retained even when the playback apparatus 10 is powered off. Accordingly, even when the rewriting of the reproduction control program is not normally completed and is forcibly terminated, the information indicating the rewriting state stored in the rewriting state storage unit 38 is retained.

CPU30は、再生装置10の起動時に書き換え状態記憶部38を参照し、前回終了時に書き換え処理が正常に終了したか否かを判別する。書き換え中であることを示す情報が書き換え状態記憶部38に記憶されていた場合を除き、CPU30は、不揮発性メモリ34の再生制御プログラムに従って通常通りに再生動作を制御する。   The CPU 30 refers to the rewrite state storage unit 38 when the playback device 10 is activated, and determines whether or not the rewrite process has been normally completed when the previous end. Except for the case where information indicating that rewriting is being performed is stored in the rewrite state storage unit 38, the CPU 30 controls the reproduction operation as usual according to the reproduction control program in the nonvolatile memory 34.

一方、書き換え中であることを示す情報が書き換え状態記憶部38に記憶されていた場合、CPU30は、前回終了時に書き換えが終了していないと判別する。このとき、CPU30は、不揮発性メモリ34の書き換え制御プログラムに従って書き換え処理を最初からやり直すよう書き換え制御部36を制御する。書き換え制御部36は、不揮発性メモリ34の所定エリアに記憶されている再生制御プログラムを消去し、その後、新たな再生制御プログラムを当該エリアに書き込む。   On the other hand, when information indicating that rewriting is being performed is stored in the rewriting state storage unit 38, the CPU 30 determines that rewriting has not been completed at the end of the previous time. At this time, the CPU 30 controls the rewrite control unit 36 so that the rewrite process is restarted from the beginning according to the rewrite control program of the nonvolatile memory 34. The rewrite control unit 36 erases the reproduction control program stored in the predetermined area of the nonvolatile memory 34, and then writes a new reproduction control program in the area.

以下、本実施の形態に係る再生装置10の動作について説明する。図2に、本実施の形態に係る再生装置10の動作を説明するフローチャートを示す。なお、図に示すフローチャートは一例であり、同様の結果が実現される構成であればいかなるものであってもよい。   Hereinafter, the operation of the playback apparatus 10 according to the present embodiment will be described. FIG. 2 shows a flowchart for explaining the operation of the playback apparatus 10 according to the present embodiment. The flowchart shown in the figure is an example, and any flowchart may be used as long as the same result is realized.

操作入力部28が電源をONとする入力を受け付けたとき、CPU30は、必要な部分の初期化を行う(ステップS101)。初期化終了後、CPU30は、書き換え状態記憶部38を参照し、再生装置10が前回終了時に書き換え状態にあったか否かを判別する(ステップS102)。   When the operation input unit 28 receives an input for turning on the power, the CPU 30 initializes a necessary portion (step S101). After completion of initialization, the CPU 30 refers to the rewrite state storage unit 38 and determines whether or not the playback device 10 was in a rewrite state at the end of the previous time (step S102).

書き換え状態記憶部38に記憶された情報が書き換え状態になかったこと、すなわち、書き換え処理が正常に終了していること(或いは書き換え処理が行われていないこと)を示す場合(ステップS102:NO)、CPU30は、動作制御プログラムが正常に不揮発性メモリ34に記憶されていると判別し、再生動作を行うために必要な初期化処理を行い、通常の動作を行う(ステップS103、S104)。その後、CPU30は、PC等からプログラムの書き換え要求を受け付けない限り、通常の動作を行う。   When the information stored in the rewrite state storage unit 38 is not in the rewrite state, that is, indicates that the rewrite process has been completed normally (or the rewrite process has not been performed) (NO in step S102). The CPU 30 determines that the operation control program is normally stored in the nonvolatile memory 34, performs initialization processing necessary for performing the reproduction operation, and performs normal operations (steps S103 and S104). Thereafter, the CPU 30 performs a normal operation unless receiving a program rewrite request from a PC or the like.

書き換え状態記憶部38に記憶された情報が書き換え状態にあることを示す場合(ステップS102:YES)、CPU30は、後述するS108以降のプログラム書き換え処理を行う。例えば、前回起動(電源ON)時に、後述する書き換え処理が正常に終了せずに、強制的に或いは操作者の操作により終了(電源OFF)した場合には、書き換え状態記憶部38には書き換え状態にあることを示す情報が記憶されるため、後述するプログラム書き換え処理が再度行われる。   When the information stored in the rewrite state storage unit 38 indicates that the information is in the rewrite state (step S102: YES), the CPU 30 performs a program rewrite process after S108 described later. For example, when the rewriting process described later is not normally terminated at the time of the previous activation (power ON), but is terminated forcibly or by the operator's operation (power OFF), the rewriting state storage unit 38 stores the rewriting state. Therefore, the program rewriting process described later is performed again.

PC等から通信部32を介してプログラム書き換え要求を受け付けたとき(ステップS105:YES)、CPU30は、再生中である場合には再生を中止し、また、ディスク駆動部18に装填されているコンパクトディスクがある場合には、これを排出する(ステップS106)。プログラム書き換え処理への移行により、再生の突然の中断、ディスクの取り出し不可といった不都合を回避するためである。   When a program rewrite request is received from the PC or the like via the communication unit 32 (step S105: YES), the CPU 30 stops the reproduction if it is being reproduced, and the compact loaded in the disk drive unit 18 If there is a disc, it is ejected (step S106). This is to avoid inconveniences such as sudden interruption of reproduction and inability to take out the disc by shifting to the program rewriting process.

次いで、CPU30は、書き換え状態記憶部38に、書き換え状態にあること、すなわち書き換え処理が正常に終了していないことを示す情報を記憶する(ステップS107)。これにより、書き換え状態記憶部38では、書き換え状態にない旨の情報が、書き換え状態にある旨の情報に書き換えられる。また、CPU30は、表示部26を書き換え状態にある旨を表示するよう制御する(ステップS108)。   Next, the CPU 30 stores, in the rewrite state storage unit 38, information indicating that it is in the rewrite state, that is, that the rewrite process has not ended normally (step S107). As a result, in the rewrite state storage unit 38, information indicating that the rewrite state is not present is rewritten to information indicating that the rewrite state is present. Further, the CPU 30 controls the display unit 26 to display that it is in a rewritten state (step S108).

次いで、CPU30は、書き換え制御部36を制御し、不揮発性メモリ34に格納されている再生制御プログラムを消去する(ステップS109)。その後、CPU30は、PC等より通信部32を介して再生制御プログラムのデータを受信し、不揮発性メモリ34の所定のエリアに順次書き込む(ステップS110、S111、S112)。   Next, the CPU 30 controls the rewrite control unit 36 and erases the reproduction control program stored in the nonvolatile memory 34 (step S109). Thereafter, the CPU 30 receives the reproduction control program data from the PC or the like via the communication unit 32, and sequentially writes the data in a predetermined area of the nonvolatile memory 34 (steps S110, S111, S112).

書き込み終了後、書き換え制御部36は、格納したプログラムデータのチェックサム等を利用して、再生制御プログラムが正常に書き込まれたか否かをチェックする(ステップS113)。CPU30は、全てのプログラムデータが正常に書き込まれている場合(ステップS114:YES)、書き換え状態記憶部38に記憶されている情報について、書き換え状態にないことを示す情報に書き換える(ステップS115)。その後、CPU30は、更新された再生制御部ログラムに基づいた通常の再生動作を行う(ステップS104)。   After completion of the writing, the rewrite control unit 36 checks whether or not the reproduction control program has been normally written using a checksum of the stored program data (step S113). When all the program data is normally written (step S114: YES), the CPU 30 rewrites the information stored in the rewrite state storage unit 38 to information indicating that the rewrite state is not present (step S115). Thereafter, the CPU 30 performs a normal reproduction operation based on the updated reproduction control unit program (step S104).

プログラムデータが正常に書き込まれていない場合(ステップS114:NO)、CPU30は、書き換え状態記憶部38の情報を更新することなく、エラーが発生し、再度の書き換え操作が必要なことを示す表示を行うよう表示部26を制御する(ステップS116)。その後、ステップS108の処理に戻って再度プログラムの更新処理を行う。   When the program data is not normally written (step S114: NO), the CPU 30 displays a display indicating that an error has occurred and the rewriting operation is necessary again without updating the information in the rewriting state storage unit 38. The display unit 26 is controlled to perform (step S116). Thereafter, the process returns to the process of step S108 and the program update process is performed again.

上記処理によれば、例えば、前回起動時に書き換え処理を行ったがエラーが発生して強制終了した場合、次回の起動時には書き換え処理があらためて開始される。書き換え処理が正常に終了したことが検証されて初めて、書き換え状態記憶部38には、書き換えが正常に終了していることが記憶される。   According to the above process, for example, when the rewriting process is performed at the previous activation but an error occurs and the process is forcibly terminated, the rewriting process is started again at the next activation. Only when it is verified that the rewriting process has been normally completed, the rewriting state storage unit 38 stores that the rewriting has been normally completed.

これにより、再起動時に、既に消去された或いは正常に書き込まれていない再生制御プログラムに従った処理が試行され、再生装置10が動作不能となることは確実に回避される。従って、操作者は、専用のROMライタ等、ひいては、専門知識を有することなく、容易かつ確実に制御プログラムの更新作業を行うことができる。   Thereby, at the time of restart, it is surely avoided that the processing according to the playback control program that has already been erased or has not been written normally is tried and the playback device 10 becomes inoperable. Therefore, the operator can easily and surely update the control program without having a dedicated ROM writer or the like and thus having specialized knowledge.

上記実施の形態では、書き換え状態を示す情報を記憶する、バッテリーバックアップされる書き換え状態記憶部38を設ける構成とした。しかし、書き換え状態を記憶する方法はこれに限られない。例えば、不揮発性メモリ34の再生制御プログラムを記憶するエリアの最終アドレスに、当該プログラムの消去後にセットされる値以外の値を書き込むようにしてもよい。この場合、CPU30は、起動時に当該値を書き換え状態を示す情報として参照し、書き換え動作又は通常の再生動作を行う。   In the above embodiment, the rewrite state storage unit 38 that stores information indicating the rewrite state and is backed up by the battery is provided. However, the method for storing the rewrite state is not limited to this. For example, a value other than the value set after erasing the program may be written to the last address of the area storing the reproduction control program in the nonvolatile memory 34. In this case, the CPU 30 refers to the value as information indicating the rewrite state at the time of activation, and performs a rewrite operation or a normal reproduction operation.

上記実施の形態では、本発明を再生装置10、特にコンパクトディスクプレーヤに適用した例について説明した。しかし、これに限らず、本発明は、書き換え可能な不揮発性メモリ34に制御プログラムが記憶されたいかなる電子機器にも適用可能である。
さらに、本発明に係る処理を所定の言語で記載したプログラムコード信号を搬送波あるいは記録媒体を介して頒布し、これを複合化して電子機器にインストールするようにしてもよい。
In the above embodiment, the example in which the present invention is applied to the reproducing apparatus 10, particularly the compact disc player has been described. However, the present invention is not limited to this, and the present invention can be applied to any electronic device in which a control program is stored in the rewritable nonvolatile memory 34.
Furthermore, a program code signal in which processing according to the present invention is described in a predetermined language may be distributed via a carrier wave or a recording medium, and this may be combined and installed in an electronic device.

本発明の実施の形態にかかる再生装置10の構成を示すブロック図である。It is a block diagram which shows the structure of the reproducing | regenerating apparatus 10 concerning embodiment of this invention. 本発明の実施の形態にかかる再生装置10の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the reproducing | regenerating apparatus 10 concerning embodiment of this invention.

符号の説明Explanation of symbols

10:再生装置、12:メカユニット、14:操作部、16:システム制御部、30:CPU、32:通信部、34:不揮発性メモリ、36:書き換え制御部、38:書き換え状態記憶部
10: playback device, 12: mechanical unit, 14: operation unit, 16: system control unit, 30: CPU, 32: communication unit, 34: nonvolatile memory, 36: rewrite control unit, 38: rewrite state storage unit

Claims (7)

制御プログラムを記憶する、書き換え可能な不揮発性メモリと、
前記不揮発性メモリに記憶されるべき制御プログラムへの、前記不揮発性メモリの書き換え状態を示す情報を記憶する書き換え状態記憶部と、
起動時に前記書き換え状態記憶部を参照し、該書き換え状態記憶部に記憶された情報が、前記不揮発性メモリにおける制御プログラムの書き換えが終了していないことを示すとき、制御プログラムの書き換えを行うよう制御する制御部と、
を備える、ことを特徴とする電子機器。
A rewritable nonvolatile memory for storing the control program;
A rewrite state storage unit for storing information indicating a rewrite state of the nonvolatile memory to a control program to be stored in the nonvolatile memory;
Control is performed to rewrite the control program when the rewrite state storage unit is referred to at the time of start-up and the information stored in the rewrite state storage unit indicates that the rewrite of the control program in the nonvolatile memory has not been completed. A control unit,
An electronic device characterized by comprising:
前記制御部は、制御プログラム書き換えが正常に終了したとき、前記書き換え状態記憶部の情報を前記不揮発性メモリにおける制御プログラムの書き換えが終了していることを示す情報に書き換えるよう制御する、ことを特徴とする請求項1に記載の電子機器。   The control unit controls to rewrite information in the rewrite state storage unit to information indicating that rewriting of the control program in the nonvolatile memory is completed when the control program rewriting is normally completed. The electronic device according to claim 1. 前記制御部は、起動時に前記書き換え状態記憶部を参照し、該書き換え状態記憶部に記憶された情報が、前記制御プログラムの書き換えが終了していることを示すとき、該制御プログラムに基づく制御を行う、ことを特徴とする請求項1又は2に記載の電子機器。   The control unit refers to the rewrite state storage unit at the time of startup, and when the information stored in the rewrite state storage unit indicates that the rewrite of the control program has been completed, the control unit performs control based on the control program. The electronic device according to claim 1, wherein the electronic device is performed. 前記書き換え状態記憶部は電池駆動される、ことを特徴とする請求項1乃至3のいずれか1項に記載の電子機器。   The electronic device according to claim 1, wherein the rewrite state storage unit is battery-driven. 前記書き換え状態記憶部は前記不揮発性メモリの一部に設けられている、ことを特徴とする請求項1乃至3のいずれか1項に記載の電子機器。   The electronic device according to claim 1, wherein the rewrite state storage unit is provided in a part of the nonvolatile memory. 制御プログラムが記憶された書き換え可能な不揮発性メモリに更新して記憶されるべき制御プログラムへの、前記不揮発性メモリの書き換え状態を示す情報を記憶する書き換え状態記憶ステップと、
起動時に書き換え状態記憶ステップで記憶された情報が、前記不揮発性メモリにおける制御プログラムの書き換えが終了していないことを示すとき、制御プログラムの書き換えを行うよう制御する制御ステップと、
を備える、ことを特徴とするプログラム書き換え方法。
A rewrite state storage step for storing information indicating a rewrite state of the nonvolatile memory to a control program to be updated and stored in the rewritable nonvolatile memory in which the control program is stored;
A control step for controlling to rewrite the control program when the information stored in the rewrite state storage step at the start indicates that the rewrite of the control program in the nonvolatile memory is not completed;
A program rewriting method characterized by comprising:
制御プログラムが記憶された書き換え可能な不揮発性メモリに更新して記憶されるべき制御プログラムへの、前記不揮発性メモリの書き換え状態を示す情報を記憶する書き換え状態記憶手順と、
起動時に書き換え状態記憶手順で記憶された情報が、前記不揮発性メモリにおける制御プログラムの書き換えが終了していないことを示すとき、制御プログラムの書き換えを行うよう制御する制御手順と、
をコンピュータに実行させる、ことを特徴とするプログラム。
A rewrite state storage procedure for storing information indicating a rewrite state of the non-volatile memory into a control program to be updated and stored in the rewritable non-volatile memory in which the control program is stored;
A control procedure for controlling to rewrite the control program when the information stored in the rewrite status storage procedure at the start indicates that the rewrite of the control program in the nonvolatile memory is not completed;
A program characterized by causing a computer to execute.
JP2006142265A 2006-05-23 2006-05-23 Electronic equipment, program rewriting method, and program Pending JP2007316687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006142265A JP2007316687A (en) 2006-05-23 2006-05-23 Electronic equipment, program rewriting method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006142265A JP2007316687A (en) 2006-05-23 2006-05-23 Electronic equipment, program rewriting method, and program

Publications (1)

Publication Number Publication Date
JP2007316687A true JP2007316687A (en) 2007-12-06

Family

ID=38850522

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006142265A Pending JP2007316687A (en) 2006-05-23 2006-05-23 Electronic equipment, program rewriting method, and program

Country Status (1)

Country Link
JP (1) JP2007316687A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011118636A (en) * 2009-12-02 2011-06-16 Renesas Electronics Corp Semiconductor device, and microcomputer control method
JP2019216471A (en) * 2019-09-06 2019-12-19 京セラドキュメントソリューションズ株式会社 Software update system, electronic device and management server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011118636A (en) * 2009-12-02 2011-06-16 Renesas Electronics Corp Semiconductor device, and microcomputer control method
JP2019216471A (en) * 2019-09-06 2019-12-19 京セラドキュメントソリューションズ株式会社 Software update system, electronic device and management server

Similar Documents

Publication Publication Date Title
US7376943B2 (en) Safe method for upgrading firmware of optical disk product
JP4768237B2 (en) Portable electronic device and method for controlling portable electronic device
US7669046B2 (en) Data processing apparatus and firmware update method
JP2007094766A (en) Controller, upgrade method and program
JP2003167681A (en) Disk storage device and data erasing method applied to this device
EP1741030B1 (en) Restoring the firmware and all programmable content of an optical drive
JP2007316687A (en) Electronic equipment, program rewriting method, and program
JP2007323488A (en) Data storage device and data access method
JP3708914B2 (en) Method and apparatus for rewriting a program executed in a disk storage device
JP2006072982A (en) Data processing apparatus and firmware update method
KR20040095723A (en) Information processing apparatus
JP2021089643A (en) Electronic control apparatus and electronic control method
KR100806104B1 (en) Upgrade method for software in digital electric home appliance
JP2007041798A (en) Information processor and memory rewriting method for information processor
JPH1145496A (en) Recording and reproducing device
JP5679383B2 (en) Electronic device, power operation log recording method and program
JPH08161160A (en) Method for updating firmware of optical disk reproducing device
JP2011145810A (en) Method for rewriting program data and equipment control system
US7565578B2 (en) Optical disc apparatus, and method for self-diagnosis control of optical disc apparatus
JPH1091539A (en) Data storage
JP2008112315A (en) Electronic apparatus and method for rewriting program
JP2005242930A (en) Information processor, program updating method, program updating program, and computer-readable storage medium recording program updating program
JP4276722B2 (en) In-vehicle electronic device connection confirmation system and control method thereof
JP4807274B2 (en) Control device having main control unit and sub-control unit
JP2009205569A (en) Electronic apparatus, and program rewriting method