JP4409275B2 - Data rewrite device - Google Patents

Data rewrite device Download PDF

Info

Publication number
JP4409275B2
JP4409275B2 JP2003416790A JP2003416790A JP4409275B2 JP 4409275 B2 JP4409275 B2 JP 4409275B2 JP 2003416790 A JP2003416790 A JP 2003416790A JP 2003416790 A JP2003416790 A JP 2003416790A JP 4409275 B2 JP4409275 B2 JP 4409275B2
Authority
JP
Japan
Prior art keywords
rewriting
flag
power supply
memory
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003416790A
Other languages
Japanese (ja)
Other versions
JP2005174232A (en
Inventor
洋一郎 奥村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2003416790A priority Critical patent/JP4409275B2/en
Publication of JP2005174232A publication Critical patent/JP2005174232A/en
Application granted granted Critical
Publication of JP4409275B2 publication Critical patent/JP4409275B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Stored Programmes (AREA)

Description

本発明は、不揮発性メモリ等のデータを書き換えるデータ書き換え装置に関する。   The present invention relates to a data rewriting device for rewriting data in a nonvolatile memory or the like.

特許文献1では、ファームウェアを情報処理装置によって書き換えた後、全ての書き込んだデータを加算してチェックサムを計算し、このチェックサムが正しいか否かを判断して書き換えが正常に行われたかどうかをユーザに通知する情報処理装置に関する技術が記載されている。
特開2001−134445号公報
In Patent Document 1, after the firmware is rewritten by the information processing apparatus, all the written data is added to calculate the checksum, and it is determined whether or not the checksum is correct, and whether or not the rewriting has been performed normally. Describes a technology relating to an information processing apparatus that notifies a user of the above.
JP 2001-134445 A

ところで、書き換えが正常に行われない場合の原因としては、最後まで書き換え動作を行ったにも係わらず書き込みエラーが発生する場合と、書き換え途中で停電や内蔵電源の消耗により電源供給が遮断し、最後まで書き換え動作が実行されずに書き込みエラーが発生する場合がある By the way, as a cause when rewriting is not performed normally, there is a writing error despite rewriting operation to the end, and power supply is cut off due to power failure or internal power consumption during rewriting, A rewrite operation is not executed until the end, and a write error may occur .

本発明の目的とするところは、不揮発性メモリの書き換えの途中における停電や内蔵電源の消耗等によらず、ファームウェア及びこのファームウェアの書き換えを制御するためのプログラムの書き換えを確実に行なうことにある。 It is an object of the present invention is to regardless by the depletion or the like of a power failure or internal power in the course of rewriting the nonvolatile memory, surely rewriting program for controlling the rewriting firmware and the firmware .

上記目的を達成するために、本発明の第1の態様では、内蔵電源からの電源供給又は外部電源からの電源供給により不揮発性メモリの書き換え動作を実行するデータ書き換え装置であって、所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納するための第2メモリ領域と、所定のフラグを設定するフラグ設定用メモリを有する不揮発性メモリと、上記第2メモリ領域に格納されたプログラムに基づいて、上記第1メモリ領域の書き換えの場合は上記内蔵電源に基づく書き換え動作を許容し、上記第2メモリ領域のデータの書き換えのときは上記外部電源に基づく書き換えを許容するとともに上記内蔵電源に基づく書き換え動作を禁止する書き換え制御手段と、上記不揮発性メモリの第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、上記フラグ設定用メモリを読み出すフラグ読み出し手段と、上記不揮発性メモリの書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリの書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定するフラグ設定手段と、上記フラグ読み出し手段により読み出したフラグの値が上記不揮発性メモリの書き換え開始時に設定した値と同じ値のとき所定のメッセージを表示する表示手段とを備えたことを特徴とするデータ書き換え装置が提供される。 In order to achieve the above object, according to a first aspect of the present invention, there is provided a data rewriting device for executing a rewriting operation of a nonvolatile memory by power supply from a built-in power supply or power supply from an external power supply. a first memory area for storing a second memory area for storing a program for controlling the rewriting of the firmware, the nonvolatile memory having a memory flag setting for setting a predetermined flag, the second Based on the program stored in the memory area, when rewriting the first memory area, rewriting operation based on the built-in power supply is allowed, and when rewriting data in the second memory area, rewriting based on the external power supply. Rewrite control means for prohibiting rewrite operation based on the built-in power supply and the non-volatile Prior to rewriting the first memory area or the second memory area of memory, flag reading means for reading the flag setting memory, and the flag is set to a predetermined value at the start of rewriting of the nonvolatile memory, and the nonvolatile memory Flag setting means for setting the flag to a value different from that at the start of rewriting after rewriting of the nonvolatile memory, and the value of the flag read by the flag reading means is the same as the value set at the start of rewriting of the nonvolatile memory In this case, a data rewriting apparatus is provided, which includes display means for displaying a predetermined message.

本発明の第2の態様では、内蔵電源からの電源供給、または外部電源からの電源供給により不揮発性メモリの書き換え動作を実行するデータ書き換え装置であって、外部電源電圧を検出する電源電圧検出手段と、所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納する第2メモリ領域と、所定のフラグを設定するフラグ設定用メモリを有する不揮発性メモリと、上記第2メモリ領域に記憶されたプログラムに基づいて、上記第1メモリ領域のデータの書き換えの場合は上記外部電源電圧が第1の所定電圧では書き換えを許可し、上記第2メモリ領域のデータの書き換えの場合は上記外部電源電圧が上記第1の所定電圧では書き換えを禁止し、上記外部電源電圧が第2の所定電圧では書き換えを許可する書き換え制御手段と、上記不揮発性メモリの第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、上記フラグ設定用メモリを読み出すフラグ読み出し手段と、上記不揮発性メモリの書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリの書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定するフラグ設定手段と、上記フラグ読み出し手段により読み出したフラグの値が上記不揮発性メモリの書き換え開始時に設定した値と同じ値のとき所定のメッセージを表示する表示手段とを備えたことを特徴とするデータ書き換え装置が提供される。 According to a second aspect of the present invention, there is provided a data rewrite device for executing a rewrite operation of a nonvolatile memory by power supply from a built-in power supply or power supply from an external power supply, and a power supply voltage detection means for detecting an external power supply voltage When a first memory area for storing a predetermined firmware, and a second memory area for storing a program for controlling the rewriting of the firmware, the nonvolatile that have a memory flag set for setting a predetermined flag a memory, based on the program stored in the second memory area, in case of rewriting data in the first memory area permits the rewriting in the external power supply voltage is a first predetermined voltage, said second main When rewriting data in the memory area, rewriting is prohibited when the external power supply voltage is the first predetermined voltage, and the external power supply voltage is the second predetermined voltage. Rewrite control means for permitting rewriting under pressure, flag reading means for reading the flag setting memory prior to rewriting of the first memory area or the second memory area of the non-volatile memory, and rewriting of the non-volatile memory Flag setting means for setting the flag to a predetermined value at the start, and setting the flag to a value different from that at the start of the rewrite after completion of rewriting of the nonvolatile memory, and a flag value read by the flag reading means There is provided a data rewriting apparatus comprising display means for displaying a predetermined message when the value is the same as the value set at the start of rewriting of the nonvolatile memory.

本発明の第3の態様では、上記第2の態様において、上記第1の所定電圧は、外部電源が接続されていないことを示す電圧であることを特徴とするデータ書き換え装置が提供される。   According to a third aspect of the present invention, there is provided the data rewriting device according to the second aspect, wherein the first predetermined voltage is a voltage indicating that an external power source is not connected.

本発明の第4の態様では、上記第2の態様において、上記第2の所定電圧は、外部電源が接続されたことを示す電圧であることを特徴とするデータ書き換え装置が提供される。   According to a fourth aspect of the present invention, there is provided the data rewriting device according to the second aspect, wherein the second predetermined voltage is a voltage indicating that an external power source is connected.

本発明の第5の態様では、第1電圧レベル又は上記第1電圧レベルより高い第2電圧レベルを基準に電源電圧のレベルを判定する電源電圧判定手段と、所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納するための第2メモリ領域と、所定のフラグを設定するフラグ設定用メモリを有する不揮発性メモリと、上記第2メモリ領域に記憶されたプログラムに基づいて、上記第1メモリ領域のデータの書き換えのときは電源電圧が上記第1電圧レベルより低いときはデータの書き換えを禁止し、上記第2メモリ領域のデータの書き換えのときは電源電圧が上記第2電圧レベルより低いときは書き換えを禁止する書き換え制御手段と、上記不揮発性メモリの第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、上記フラグ設定用メモリを読み出すフラグ読み出し手段と、上記不揮発性メモリの書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリの書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定するフラグ設定手段と、上記フラグ読み出し手段により読み出したフラグの値が上記不揮発性メモリの書き換え開始時に設定した値と同じ値のとき所定のメッセージを表示する表示手段とを備えたことを特徴とするデータ書き換え装置が提供される。 In a fifth aspect of the present invention, a power supply voltage determination means for determining a power supply voltage level based on a first voltage level or a second voltage level higher than the first voltage level, and a first memory storing predetermined firmware An area, a second memory area for storing a program for controlling rewriting of the firmware, a non-volatile memory having a flag setting memory for setting a predetermined flag, and the second memory area. Based on the program, when rewriting data in the first memory area, data rewriting is prohibited when the power supply voltage is lower than the first voltage level, and when rewriting data in the second memory area, Rewrite control means for prohibiting rewrite when the voltage is lower than the second voltage level, and the first memory area or the upper side of the non-volatile memory Prior to rewriting the second memory area, flag reading means for reading the flag setting memory, the flag is set to a predetermined value at the start of rewriting of the nonvolatile memory, and the flag is set after rewriting of the nonvolatile memory is completed. Flag setting means for setting the value to a value different from that at the start of rewriting, and a predetermined message is displayed when the value of the flag read by the flag reading means is the same as the value set at the start of rewriting of the nonvolatile memory There is provided a data rewriting device comprising a display means.

本発明の第6の態様では、上記第1、2、5の態様において、上記不揮発性メモリの上記第1メモリ領域にはカメラ又はそのアクセサリを制御するファームウェア又はデータが格納されることを特徴とするデータ書き換え装置が提供される。   According to a sixth aspect of the present invention, in the first, second, and fifth aspects, the first memory area of the nonvolatile memory stores firmware or data for controlling the camera or its accessory. A data rewriting device is provided.

本発明によれば、不揮発性メモリの書き換えの途中における停電や内蔵電源の消耗等によらず、ファームウェア及びこのファームウェアの書き換えを制御するためのプログラムの書き換えを確実に行なうことができる。 According to the present invention can be carried out regardless by the power failure or the internal power source depletion or the like in the course of rewriting the nonvolatile memory, the rewriting of the program for controlling the rewriting firmware and the firmware reliably.

以下、図面を参照して、本発明の実施の形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

先ず、図1には本発明の第1及び第2の実施の形態に共通するデータ書き換え装置の基本構成、及びそれを採用したカメラシステムの構成例を示し説明する。   First, FIG. 1 shows a basic configuration of a data rewriting apparatus common to the first and second embodiments of the present invention and a configuration example of a camera system employing the same.

この図1に示されるように、このデータ書き換え装置を採用したカメラシステムは、レンズユニット12、ストロボユニット80、ボディユニット100等からなる。   As shown in FIG. 1, a camera system employing this data rewriting device includes a lens unit 12, a strobe unit 80, a body unit 100, and the like.

先ず、レンズユニット12の構成について説明する。   First, the configuration of the lens unit 12 will be described.

レンズユニット12には、当該レンズユニット12全体の制御を司るレンズ制御用マイクロコンピュータ(以下、Lucomと称する)5が配設されている。そして、このLucom5は、DCモータ等からなるレンズ駆動機構2やステッピングモータ等からなる絞り駆動機構4と電気的に接続されている。このレンズ駆動機構2は、撮影レンズ12aを駆動するための機構であり、絞り駆動機構4は、絞り3を駆動するための機構である。Lucom5は、通信コネクタ6を介してボディユニット100のボディ制御用マイクロコンピュータ(以下、Bucomと称する)50と通信自在に接続され、Bucom50の指令に従って各機構を駆動制御する。レンズユニット12は、ボディユニット100の前面に設けられた不図示のレンズマウントを介して着脱自在に構成されている。   The lens unit 12 is provided with a lens control microcomputer (hereinafter referred to as “Lucom”) 5 that controls the entire lens unit 12. The Lucom 5 is electrically connected to a lens driving mechanism 2 composed of a DC motor or the like and a diaphragm driving mechanism 4 composed of a stepping motor or the like. The lens driving mechanism 2 is a mechanism for driving the photographing lens 12 a, and the diaphragm driving mechanism 4 is a mechanism for driving the diaphragm 3. The Lucom 5 is communicatively connected to a body control microcomputer (hereinafter referred to as Bucom) 50 of the body unit 100 via the communication connector 6, and drives and controls each mechanism in accordance with commands from the Bucom 50. The lens unit 12 is configured to be detachable via a lens mount (not shown) provided on the front surface of the body unit 100.

次に、ボディユニット100の光学系の構成について説明する。   Next, the configuration of the optical system of the body unit 100 will be described.

ボディユニット100には、レンズユニット12の撮影レンズ12a、絞り3を介して入射された光の光路上にクイックリターンミラー13bが配設されており、当該クイックリターンミラー13bの後方には、当該クイックリターンミラー13bを透過した光を反射するためのサブミラー13dが配設されている。そして、このサブミラー13dの反射光の光路上には、その反射光を受けて自動測距する為のAFセンサユニット30aが配設されている。一方、上記クイックリターンミラー13bで反射された光の光路上には、ペンタプリズム13a、接眼レンズ13c、測光回路32が配設されている。クリックリターンミラー13bの後方には、その平面が光軸と垂直となるように、シャッタ14、防塵フィルタ21、CCDユニット27等が撮像ユニットとして配設されている。   The body unit 100 is provided with a quick return mirror 13b on the optical path of light incident through the photographing lens 12a and the diaphragm 3 of the lens unit 12, and behind the quick return mirror 13b, the quick return mirror 13b. A sub-mirror 13d for reflecting the light transmitted through the return mirror 13b is provided. An AF sensor unit 30a for receiving the reflected light and automatically measuring the distance is disposed on the optical path of the reflected light of the sub mirror 13d. On the other hand, a pentaprism 13a, an eyepiece lens 13c, and a photometric circuit 32 are disposed on the optical path of the light reflected by the quick return mirror 13b. Behind the click return mirror 13b, a shutter 14, a dustproof filter 21, a CCD unit 27, etc. are arranged as an imaging unit so that the plane is perpendicular to the optical axis.

次に、ボディユニット100の制御系の構成について説明する。   Next, the configuration of the control system of the body unit 100 will be described.

ボディユニット100には、全体の制御を司るBucom50が配設されている。このBucom50は、AFセンサユニット30aを駆動制御する為のAFセンサ駆動回路30b、クリックリターンミラー13bを駆動制御する為のミラー駆動機構18、シャッタ14をチャージする為のシャッタチャージ機構19、シャッタ14を駆動制御する為のシャッタ制御回路31、防塵フィルタ21を駆動制御する為の防塵フィルタ駆動回路48と接続されている。さらに、このBucom50は、後述するような各種情報を記憶する為のフラッシュメモリ等の不揮発性メモリ29、CCDユニット27の周辺の温度を測定する為の温度測定回路33、画像処理コントローラ40、ペンタプリズム13aからの光束に基づいて測光処理をする為の測光回路32、各部に好適となるように電池54等の電圧を変換する為の電源回路53a、内部電源としての電池54の電圧を検出する為の電圧検出回路53b、カメラの動作状態等をユーザに告知する為の動作表示用LCD57、カメラ操作SW52、USB通信コネクタ60、ストロボ通信コネクタ85、リセットIC61等と、制御バスを介して通信自在に接続されている。   The body unit 100 is provided with a Bucom 50 that performs overall control. The Bucom 50 includes an AF sensor driving circuit 30b for driving and controlling the AF sensor unit 30a, a mirror driving mechanism 18 for driving and controlling the click return mirror 13b, a shutter charging mechanism 19 for charging the shutter 14, and a shutter 14. A shutter control circuit 31 for drive control and a dust filter drive circuit 48 for drive control of the dust filter 21 are connected. Further, the Bucom 50 includes a non-volatile memory 29 such as a flash memory for storing various information as described later, a temperature measuring circuit 33 for measuring the temperature around the CCD unit 27, an image processing controller 40, a pentaprism. A photometric circuit 32 for performing photometric processing based on the luminous flux from 13a, a power supply circuit 53a for converting the voltage of the battery 54 and the like so as to be suitable for each part, and for detecting the voltage of the battery 54 as an internal power source The voltage detection circuit 53b, the operation display LCD 57 for notifying the user of the operation state of the camera, the camera operation SW 52, the USB communication connector 60, the strobe communication connector 85, the reset IC 61, and the like can be communicated via the control bus. It is connected.

カメラ操作SW52は、例えばレリーズSW(1stレリーズSW、2ndレリーズSW)やモード変更SW、パワーSW等といった各種操作釦を含むスイッチ群である。画像処理コントローラ40は、液晶モニタ36、SDRAM38aと通信自在に接続され、更には通信コネクタ35を介して各種のメモリカードや外付けのHDD等の外部記録媒体である記録メディア39とも接続されている。電源回路53aは、電池54や外部電源70と接続される。外部電源70は、AC/DCコンバータ機能を内蔵しており、付属するコネクタ71を介して家庭用電源等からの電力供給を可能とするものである。   The camera operation SW 52 is a switch group including various operation buttons such as a release SW (1st release SW, 2nd release SW), a mode change SW, a power SW, and the like. The image processing controller 40 is communicably connected to the liquid crystal monitor 36 and the SDRAM 38a, and is further connected to a recording medium 39 which is an external recording medium such as various memory cards and an external HDD via the communication connector 35. . The power supply circuit 53 a is connected to the battery 54 and the external power supply 70. The external power supply 70 has a built-in AC / DC converter function, and enables power supply from a household power supply or the like via an attached connector 71.

次に、ストロボユニット80の構成について説明する。   Next, the configuration of the strobe unit 80 will be described.

ストロボユニット80は、閃光電球81、DC/DCコンバータ82、ストロボ制御マイクロコンピュータ83、及びストロボ用電池84からなり、ストロボ通信コネクタ85を介してボディユニット100と通信可能となっている。   The strobe unit 80 includes a flash bulb 81, a DC / DC converter 82, a strobe control microcomputer 83, and a strobe battery 84, and can communicate with the body unit 100 via a strobe communication connector 85.

以下、上記構成による作用のうち特徴的なものを詳細に説明する。   Hereinafter, characteristic features of the above-described operation will be described in detail.

このデータ書き換え装置の不揮発性メモリ29は、第1の領域に所定のファームウェアを格納し、第2のメモリ領域に当該ファームウェアの書き換えを制御するためのプログラムを格納し、フラグ設定用領域に所定のフラグが設定される。   The nonvolatile memory 29 of this data rewriting device stores predetermined firmware in the first area, stores a program for controlling rewriting of the firmware in the second memory area, and stores predetermined firmware in the flag setting area. A flag is set.

そして、Bucom50が第1メモリ領域又は第2メモリ領域のデータを書き換える際には、以下の特徴的な動作がなされる。即ち、Bucom50は、第1メモリ領域の書き換えの場合は内蔵電源である電池54に基づく書き換え動作を許容し、第2メモリ領域のデータの書き換えのときは外部電源70に基づく書き換えを許容するとともに上記内蔵電源である電池54に基づく書き換え動作を禁止する。更に、Bucom50は、不揮発性メモリ29の書き換え開始時にフラグを所定の値に設定し、不揮発性メモリ29の書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定する。   When the Bucom 50 rewrites data in the first memory area or the second memory area, the following characteristic operation is performed. That is, the Bucom 50 allows a rewrite operation based on the battery 54 that is a built-in power supply when rewriting the first memory area, and allows a rewrite based on the external power supply 70 when rewriting data in the second memory area. Rewriting operation based on the battery 54 which is a built-in power supply is prohibited. Further, the Bucom 50 sets a flag to a predetermined value at the start of rewriting of the nonvolatile memory 29, and sets the flag to a value different from that at the start of rewriting after the rewriting of the nonvolatile memory 29 is completed.

そして、Bucom50は、不揮発性メモリ29の第1メモリ領域又は第2メモリ領域の書き換えに先立って、フラグ設定用領域の内容を読み出す、当該フラグの値が不揮発性メモリ29の書き換え開始時に設定した値と同じ値のときには動作表示用LCD57に所定のメッセージを表示する。従って、ファームウェアの書き換えの場合は内蔵電源である電池54により簡単に書き換えができるとともに、ブートプログラムの書き換え中に電源が消耗して書き換えを失敗して書き換えが不可能になるということがないので、ファームウェアの書き換えを制御するためのプログラムの書き換えを確実に行うことができると共に、正常に書き換えが終了したかどうかを簡単に確認できる。   The Bucom 50 reads the contents of the flag setting area before rewriting the first memory area or the second memory area of the non-volatile memory 29. The value of the flag is set when the rewriting of the non-volatile memory 29 is started. When the value is the same, a predetermined message is displayed on the operation display LCD 57. Therefore, in the case of firmware rewriting, it can be easily rewritten by the battery 54 that is a built-in power supply, and there is no case where the power is consumed during rewriting of the boot program and rewriting fails and rewriting becomes impossible. It is possible to reliably rewrite the program for controlling the rewriting of the firmware and to easily check whether the rewriting has been completed normally.

また、内蔵電源としての電池54からの電源供給又は外部電源70からの電源供給により不揮発性メモリ(不揮発性半導体メモリ)29の書き換え動作を実行する場合に、電源検出回路53bが外部電源電圧を検出する。不揮発性メモリ29は、所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納する第2メモリ領域とを有する。Bucom50は、第1のメモリ領域のデータの書き換えの場合は外部電源電圧が第1の所定電圧では書き換えを許可し、第2のメモリ領域のデータの書き換えの場合は外部電源電圧が上記第1の所定電圧では書き換えを禁止し、外部電源電圧が第2の所定電圧では書き換えを許可するよう制御する。さらに、Bucom50は、不揮発性メモリ29の第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、フラグ設定用メモリを読み出し、不揮発性メモリ29の書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリ29の書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定し、この読み出したフラグの値が不揮発性メモリ29の書き換え開始時に設定した値と同じ値のとき動作表示用LCD57に所定のメッセージを表示する。上記第1の所定電圧は、例えば外部電源が接続されていないことを示す電圧等であり、上記第2の所定電圧は、例えば外部電源が接続されたことを示す電圧等である。   Further, when the rewrite operation of the nonvolatile memory (nonvolatile semiconductor memory) 29 is executed by the power supply from the battery 54 as the built-in power supply or the power supply from the external power supply 70, the power supply detection circuit 53b detects the external power supply voltage. To do. The nonvolatile memory 29 has a first memory area for storing predetermined firmware and a second memory area for storing a program for controlling rewriting of the firmware. The Bucom 50 permits the rewriting when the external power supply voltage is the first predetermined voltage when rewriting the data in the first memory area, and the external power supply voltage is the above-described first power when rewriting the data in the second memory area. Rewriting is prohibited at a predetermined voltage, and rewriting is permitted at an external power supply voltage of the second predetermined voltage. Further, the Bucom 50 reads the flag setting memory prior to rewriting the first memory area or the second memory area of the nonvolatile memory 29, and sets the flag to a predetermined value at the start of rewriting of the nonvolatile memory 29. After the rewriting of the nonvolatile memory 29 is completed, the flag is set to a value different from that at the start of the rewriting, and when the value of the read flag is the same as the value set at the start of the rewriting of the nonvolatile memory 29, the operation display A predetermined message is displayed on the LCD 57. The first predetermined voltage is, for example, a voltage indicating that an external power source is not connected, and the second predetermined voltage is, for example, a voltage indicating that an external power source is connected.

また、このデータ書き換え装置では、電圧検出回路53bが、電源電圧を検出し、Bucom50が、第1電圧レベル又は当該第1電圧レベルより高い第2電圧レベルを基準に電源電圧のレベルを判定する。更に、Bucom50は、不揮発性メモリ50の第1メモリ領域のデータの書き換えのときには電源電圧が第1電圧レベルより低い場合にはデータの書き換えを禁止し、第2メモリ領域のデータの書き換えのときには電源電圧が第2電圧レベルより低い場合には書き換えを禁止する。この場合でも、Bucom50は、不揮発性メモリ29の書き換え開始時にフラグを所定の値に設定し、不揮発性メモリ29の書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定する。   In this data rewriting device, the voltage detection circuit 53b detects the power supply voltage, and the Bucom 50 determines the power supply voltage level based on the first voltage level or the second voltage level higher than the first voltage level. Further, the Bucom 50 prohibits rewriting of data when the power supply voltage is lower than the first voltage level when rewriting data in the first memory area of the nonvolatile memory 50, and supplies power when rewriting data in the second memory area. Rewriting is prohibited when the voltage is lower than the second voltage level. Even in this case, the Bucom 50 sets the flag to a predetermined value at the start of rewriting of the nonvolatile memory 29, and sets the flag to a value different from that at the start of rewriting after the rewriting of the nonvolatile memory 29 is completed.

そして、Bucom50は、不揮発性メモリ29の第1メモリ領域又は上記第2メモリ領域の書き換えに先立ってフラグ設定用領域のフラグの値を読み出し、当該フラグの値が不揮発性メモリ29の書き換え開始時に設定した値と同じ値のときは、書き換えが正常に終了していないものと判断し、動作表示用LCD57に所定のメッセージを表示する。従って、ファームウェアの書き換えもブートプログラムの書き換えもその性質に応じて電源容量を最大限活用しながら確実に行うことができると共に、正常に書き換えが終了したかどうかを簡単に確認することができる。尚、不揮発性メモリ29の第1メモリ領域にはカメラ又はそのアクセサリを制御するファームウェア又はデータが格納されてもよい。   The Bucom 50 reads the flag value in the flag setting area prior to rewriting the first memory area or the second memory area of the nonvolatile memory 29, and the flag value is set when the nonvolatile memory 29 starts to be rewritten. When the value is the same as the above value, it is determined that the rewriting has not ended normally, and a predetermined message is displayed on the operation display LCD 57. Accordingly, both firmware rewriting and boot program rewriting can be reliably performed while making maximum use of the power supply capacity according to the property, and it can be easily confirmed whether rewriting has been completed normally. Note that firmware or data for controlling the camera or its accessories may be stored in the first memory area of the nonvolatile memory 29.

また、所定のファームウェアが不揮発性メモリ29の書き換えの対象であるとき、上記動作表示用LCD57に表示されるメッセージは再度書き換え動作を促すものとすることができる。更に、所定のファームウェアの書き換えを制御するプログラムが書き換えの対象であるとき、上記動作表示用LCD57に表示されるメッセージは、書き換えができない旨又はサービスに書き換えを依頼する必要がある旨の表示としてもよい。   Further, when the predetermined firmware is a target for rewriting the nonvolatile memory 29, the message displayed on the operation display LCD 57 can prompt the rewriting operation again. Further, when a program for controlling rewriting of predetermined firmware is a rewriting target, the message displayed on the operation display LCD 57 may be an indication that rewriting is not possible or that the service needs to be rewritten. Good.

また、書き換え完了後にBucom50が読み出したフラグの値が不揮発性メモリ29の書き換え開始時に設定した値と同じ値のとき、書き換えの対象となるメモリ領域が上記第1メモリ領域の場合と上記第2メモリ領域の場合とで異なったメッセージを動作表示用LCD57に表示することもできる。   Further, when the value of the flag read by Bucom 50 after completion of rewriting is the same as the value set at the start of rewriting of the nonvolatile memory 29, the memory area to be rewritten is the first memory area and the second memory. A message different from that in the case of the area can be displayed on the operation display LCD 57.

以下、上記説明をふまえて、第1及び第2の実施の形態について詳述する。   Hereinafter, the first and second embodiments will be described in detail based on the above description.

(第1の実施の形態)
図2を参照して、第1の実施の形態に係るデータ書き換え装置の構成例を示し説明する。
(First embodiment)
Referring to FIG. 2, will be described illustrates a configuration example of a data rewriting apparatus according to the first embodiment.

この図2に示されるように、電池105のプラス(+)端子は、逆流防止の為のダイオードD101を介して電源回路101の第1入力ポートに接続されており、マイナス(−)端子は、電源回路101の第2入力ポートに接続されている。そして、図2では不図示の外部電源(図1の符号70に相当)からの電源供給を受けるACアダプタコネクタ106のプラス(+)端子は、逆流防止の為のダイオードD102を介して電源回路101の第1入力ポートに接続されており、マイナス(−)端子は、電源回路101の第2入力ポートに接続されている。ACアダプタコネクタ106のプラス(+)端子は、更に抵抗R101,R102を介して接地され、当該抵抗R101,R102の接続点は、マイクロコンピュータ(以下、マイコンと称する)102のA/Dポートに接続されている。   As shown in FIG. 2, the positive (+) terminal of the battery 105 is connected to the first input port of the power supply circuit 101 via a diode D101 for preventing backflow, and the negative (−) terminal is The power supply circuit 101 is connected to the second input port. The positive (+) terminal of the AC adapter connector 106 that receives power from an external power supply (not shown in FIG. 2) (corresponding to reference numeral 70 in FIG. 1) is connected to the power supply circuit 101 via a diode D102 for preventing backflow. The negative (−) terminal is connected to the second input port of the power supply circuit 101. The positive (+) terminal of the AC adapter connector 106 is further grounded via resistors R101 and R102, and the connection point of the resistors R101 and R102 is connected to an A / D port of a microcomputer 102 (hereinafter referred to as a microcomputer). Has been.

さらに、電源回路101の出力ポートは、マイコン102のVccポートに接続されている。電源回路101の出力ポートは、リセットIC104にも接続されており、当該リセットIC104の出力ポートはマイコン102のRESETポートに接続されている。このマイコン102は、USB通信ポートを有しており、当該USB通信ポートは不図示のUSB通信コネクタ(図1の符号60に相当)に接続されている。以上のほか、マイコン102はRAM102aを内容しており、更には不揮発性メモリとしてのフラッシュメモリ103、動作表示用LCD107と接続されている。   Further, the output port of the power supply circuit 101 is connected to the Vcc port of the microcomputer 102. The output port of the power supply circuit 101 is also connected to the reset IC 104, and the output port of the reset IC 104 is connected to the RESET port of the microcomputer 102. The microcomputer 102 has a USB communication port, and the USB communication port is connected to a USB communication connector (not shown) (corresponding to reference numeral 60 in FIG. 1). In addition to the above, the microcomputer 102 includes a RAM 102a, and is further connected to a flash memory 103 as a nonvolatile memory and an operation display LCD 107.

このような構成において、外部電源の電圧を抵抗R101,R102により分圧してマイコン102に好適な電圧としてA/Dポートに与える。即ち、図2の構成では、マイコン102は、外部電源の電圧を検出できることとなる。   In such a configuration, the voltage of the external power source is divided by the resistors R101 and R102 and applied to the A / D port as a voltage suitable for the microcomputer 102. That is, in the configuration of FIG. 2, the microcomputer 102 can detect the voltage of the external power supply.

このデータ書き換え装置がカメラシステムに適用される場合、図2の構成と図1の構成との関係は以下のようになる。抵抗R101,R102は図1の電圧検出回路53bに相当し、電源回路101は図1の電源回路53aに相当し、マイコン102は図1のBucom50に相当し、フラッシュメモリ103は図1の不揮発性メモリ29に相当し、電池105は図1の電池54に相当し、ACアダプタコネクタ106は図1のジャック37等に相当し、リセットIC104は図1のリセットIC61に相当する。   When this data rewriting device is applied to a camera system, the relationship between the configuration of FIG. 2 and the configuration of FIG. 1 is as follows. The resistors R101 and R102 correspond to the voltage detection circuit 53b in FIG. 1, the power supply circuit 101 corresponds to the power supply circuit 53a in FIG. 1, the microcomputer 102 corresponds to the Bucom 50 in FIG. 1, and the flash memory 103 in FIG. 1 corresponds to the memory 29, the battery 105 corresponds to the battery 54 in FIG. 1, the AC adapter connector 106 corresponds to the jack 37 and the like in FIG. 1, and the reset IC 104 corresponds to the reset IC 61 in FIG.

ここで、上記構成による作用を説明する前に、図3を参照して、フラッシュメモリ103のメモリアドレス空間について更に具体的に説明する。   Here, before describing the operation of the above configuration, the memory address space of the flash memory 103 will be described more specifically with reference to FIG.

この図3に示されるように、フラッシュメモリ103は、複数のメモリ領域に分けられている。即ち、本例では、3つのブロックA,B,Cに分けられている。   As shown in FIG. 3, the flash memory 103 is divided into a plurality of memory areas. That is, in this example, the block is divided into three blocks A, B, and C.

先ず、ブロックAは、ファーム書き換え検出や電池装填時にマイコン102内部の不図示のRAMに読み込んで実行するためのブートプログラム等が格納されている。このブロックAには、ファームアップ正常フラグの領域が割り当てられている。ブロックBは、例えばデータ書き込み装置がカメラに適用される場合には、当該カメラの基本動作を行うために必要なプログラム(ファームウェア)等が格納されている。このブロックBにも、ファームアップ正常フラグの領域が割り当てられている。ブロックCは、例えばデータ書き込み装置がカメラに適用される場合には、当該カメラの基本動作を行うために必要なデータや、カメラ固有のデータ、工場出荷時のデータが格納される。このブロックCにも、ファームアップ正常フラグの領域が割り当てられている。   First, the block A stores a boot program and the like for reading into a RAM (not shown) inside the microcomputer 102 and executing it when firmware rewriting is detected or when a battery is loaded. In this block A, a firmware up normal flag area is allocated. For example, when the data writing apparatus is applied to a camera, the block B stores a program (firmware) necessary for performing a basic operation of the camera. This block B is also assigned a firmware up normal flag area. For example, when the data writing device is applied to a camera, the block C stores data necessary for performing a basic operation of the camera, data unique to the camera, and factory default data. This block C is also assigned a firmware up normal flag area.

尚、上記ファームアップ正常フラグの領域には、ファームアップ開始前に“0”が書き込まれ、ファームアップの正常終了時に“1”が書き込まれる。この書き込みのタイミング等の詳細については、後に詳述する。   It should be noted that “0” is written before the start of the firmware upgrade and “1” is written when the firmware upgrade is completed normally in the firmware upgrade normal flag area. Details of the write timing and the like will be described later.

以下、図4乃至図8のフローチャートを参照して、上記構成による作用、即ち各種プログラムに基づくシーケンシャルな制御動作について詳細に説明する。   Hereinafter, the operation of the above configuration, that is, the sequential control operation based on various programs will be described in detail with reference to the flowcharts of FIGS.

先ず、図4に示されるように、データ書き込み装置に電池105が装填されると、リセットIC104が作動し、マイコン102をパワーオンリセットし、フラッシュメモリ103のブロックAに格納されているプログラムをマイコン102のRAM102aの領域aに読み込み(ステップS1)、プログラムAを実行する(ステップS2)。   First, as shown in FIG. 4, when the battery 105 is loaded into the data writing device, the reset IC 104 operates to reset the microcomputer 102 to power-on, and the program stored in the block A of the flash memory 103 is loaded into the microcomputer. The data is read into the area a of the RAM 102a 102 (step S1), and the program A is executed (step S2).

以下、図5のフローチャートを参照して、プログラムAに基づく処理を説明する。   Hereinafter, processing based on the program A will be described with reference to the flowchart of FIG.

マイコン102は、先ずフラッシュメモリ103のブロックAのファームアップ正常フラグの状態を判断する(ステップS3)。このステップS3にて、ファームアップ正常フラグが“0”であれば、マイコン102は、サービス対応メッセージ警告表示を動作表示用LCD107にて行う(ステップS4)。このように警告表示を行うのは、ファームアップ正常フラグには、ファームアップ開始前には“0”が書き込まれ、ファームアップの正常終了時には“1”が書き込まれるようになっているので、このタイミングで当該フラグが“0”であるという事は、前回のプログラムの書き換え等が正常に終了していないことを意味し、その旨をユーザに示唆する必要があるからである。このような警告表示の後にデータ書き換え装置の動作をロックする(ステップS5)。例えば、データ書き換え装置がカメラシステムに適用される場合、通常のカメラ動作への移行が禁止される。   The microcomputer 102 first determines the state of the firmware up normal flag of the block A of the flash memory 103 (step S3). If the firmware up normal flag is “0” in step S3, the microcomputer 102 performs a service corresponding message warning display on the operation display LCD 107 (step S4). The warning is displayed in this way because the firmware up normal flag is written with “0” before the start of the firmware upgrade and “1” when the firmware upgrade ends normally. The fact that the flag is “0” at the timing means that the previous program rewriting or the like has not ended normally, and it is necessary to indicate to the user accordingly. After such a warning display, the operation of the data rewriting device is locked (step S5). For example, when the data rewriting device is applied to a camera system, the shift to normal camera operation is prohibited.

一方、上記ステップS3にて、ファームアップ正常フラグが“1”であれば、ブロックAのプログラムに異常はないので、マイコン102は、フラッシュメモリ103のブロックBのプログラム(ファームウェア)をRAM102a上の領域bに読み込み(ステップS6)、これに続いてフラッシュメモリ103のブロックCのデータをRAM102a上の領域cに読み込む(ステップS7)。そして、マイコン102は、USB通信ポートを介してUSB接続がなされているか否かを検出し判断する(ステップS8)。この検出の手法としては公知の種々の手法を採用し得るので、詳細な説明は省略する。   On the other hand, if the firmware up normal flag is “1” in step S3, there is no abnormality in the program of the block A, so the microcomputer 102 stores the program (firmware) of the block B of the flash memory 103 in the area on the RAM 102a. Then, the data in block C of the flash memory 103 is read into the area c on the RAM 102a (step S7). Then, the microcomputer 102 detects and determines whether or not the USB connection is made through the USB communication port (step S8). Since various known methods can be adopted as this detection method, detailed description is omitted.

この例では、ブロックBのプログラム(ファームウェア)の書き換えを所望とする場合には、図2では不図示のボタンA(例えば、図1のカメラ操作SW52に含まれる)を所定時間(この例では5秒)以内に所定回数(この例では5回)押下するような仕様になっている。そこで、マイコン102は、USB接続されていると判断した場合は、ボタンAが5秒以内に5回押下されたか否かを判断する(ステップS9,S10)。押下された場合には、ファームアップに係るステップS11以降の処理に進む。一方、5秒以内に5回押下されていない場合であって、5秒経過した場合(ステップS10)、及びステップS8にてUSB接続されていないと判断した場合は、ステップS3に戻る。   In this example, when it is desired to rewrite the program (firmware) of the block B, a button A (not shown in FIG. 2) (for example, included in the camera operation SW 52 in FIG. 1) is set for a predetermined time (in this example, 5). (Seconds) within a predetermined number of times (in this example, 5 times). Therefore, when determining that the USB connection is established, the microcomputer 102 determines whether or not the button A is pressed five times within 5 seconds (steps S9 and S10). If the button has been pressed, the process proceeds to the processing after step S11 related to the firmware upgrade. On the other hand, if it is not pressed five times within 5 seconds and 5 seconds have passed (step S10), and if it is determined that the USB connection is not established in step S8, the process returns to step S3.

ステップS11では、マイコン102は、USB通信により外部機器、例えばパーソナルコンピュータ等からのデータを受信し(ステップS11)、当該データに基づいてファームアップ要求がなされているか否かを判断する(ステップS12)。   In step S11, the microcomputer 102 receives data from an external device such as a personal computer by USB communication (step S11), and determines whether a firmware upgrade request is made based on the data (step S12). .

このステップS12において、ファームアップの要求でないと判断した場合には、図6の処理に進む。そして、フラッシュメモリ103のブロックBのファームアップ正常フラグの状態を判断する(ステップS30)。ここで、当該フラグが“0”である場合には、前回のファームアップが正常に終了していないものと判断し、ブロックBのプログラム(ファームウェア)の再度のファームアップを要求すべく動作表示用LCD107に警告表示を行い(ステップS31)、動作をロックする(ステップS32)。   If it is determined in step S12 that the request is not a firmware upgrade, the process proceeds to the process of FIG. Then, the state of the firmware up normal flag of the block B of the flash memory 103 is determined (step S30). If the flag is “0”, it is determined that the previous firmware update has not been completed normally, and the operation display is performed to request the firmware update of the block B program (firmware) again. A warning is displayed on the LCD 107 (step S31), and the operation is locked (step S32).

ステップS30において、ブロックBのファームアップ正常フラグが“1”である場合には、フラッシュメモリ103のブロックCのファームアップ正常フラグの状態を判断する(ステップS33)。ここで、当該フラグが“0”である場合には、前回のファームアップが正常に終了していないものと判断し、ブロックCの再度のファームアップを要求すべく動作表示用LCD107に警告表示を行い(ステップS34)、動作をロックする(ステップS35)。ステップS33において、ブロックCのファームアップ正常フラグが“1”である場合には、プログラムBを実行する(ステップS36)。   If the firmware up normal flag of block B is “1” in step S30, the status of the firmware up normal flag of block C in the flash memory 103 is determined (step S33). If the flag is “0”, it is determined that the previous firmware update has not been completed normally, and a warning is displayed on the operation display LCD 107 to request the firmware update of the block C again. Perform (step S34) and lock the operation (step S35). In step S33, if the firmware update normal flag of block C is “1”, program B is executed (step S36).

このプログラムBに基づく処理については、図9を参照しつつ後述する。   The processing based on this program B will be described later with reference to FIG.

図5の説明に戻り、ステップS12において、ファームアップの要求であると判断した場合には、マイコン102は、ブロックAのプログラム(ブートプログラム)の書き換えか否かを判断する(ステップS13)。ここで、ブロックAのプログラム(ブートプログラム)の書き換えでないと判断した場合には、図7の処理に移行する。   Returning to the description of FIG. 5, if it is determined in step S12 that the request is for a firmware upgrade, the microcomputer 102 determines whether or not the program (boot program) in the block A is to be rewritten (step S13). If it is determined that the program of the block A (boot program) is not rewritten, the process proceeds to FIG.

この図7では、先ず、フラッシュメモリ103のブロックBのプログラム(ファームウェア)の書き換えか否かを判断し(ステップS40)、当該ブロックBのプログラム(ファームウェア)の書き換えである場合には、USB通信を行い、ブロックBのプログラム(ファームウェア)等の書き換え用のデータを受信し(ステップS43)、ブロックBのファームアップ正常フラグを“0”とし(ステップS44)、ブロックBの内容を上記USB通信で得たデータに書き換えた後(ステップS45)、ブロックBのファームアップ正常フラグを“1”とし(ステップS46)、動作表示用LCD107に書き換え完了表示を行い(ステップS47)、図6の処理に移行する。この図6の処理の詳細については、前述した通りであるが、フラッシュメモリ103のブロックBのファームアップ正常フラグが“0”である場合、上記したファームアップ(ステップS45)が正常に終了していないので、ブロックBのプログラム(ファームウェア)の再度のファームアップを要求すべく動作表示用LCD107に警告表示を行い、動作をロックする(ステップS30乃至S32)。   In FIG. 7, first, it is determined whether or not the program (firmware) of the block B in the flash memory 103 is to be rewritten (step S40). If the program (firmware) of the block B is to be rewritten, USB communication is performed. The data for rewriting such as the program (firmware) of the block B is received (step S43), the firmware up normal flag of the block B is set to “0” (step S44), and the contents of the block B are obtained by the USB communication. After the data is rewritten (step S45), the firmware up normal flag of block B is set to “1” (step S46), the rewriting completion display is displayed on the operation display LCD 107 (step S47), and the process proceeds to FIG. . The details of the processing in FIG. 6 are as described above. However, when the firmware up normal flag of the block B of the flash memory 103 is “0”, the above firmware up (step S45) has been completed normally. Therefore, a warning is displayed on the operation display LCD 107 to request the firmware update of the block B program (firmware) again, and the operation is locked (steps S30 to S32).

一方、上記ステップS40で、ブロックBのプログラム(ファームウェア)の書き換えでないと判断した場合には(ステップS40)、フラッシュメモリ103のブロックCのプログラムの書き換えか否かを判断する(ステップS41)。当該ブロックCの書き換えである場合には、USB通信を行い、ブロックCの書き換え用のデータをを受信し(ステップS48)、ブロックCのファームアップ正常フラグを“0”とし(ステップS49)、ブロックCの内容を上記USB通信で得たデータに書き換えた後(ステップS50)、ブロックCのファームアップ正常フラグを“1”とし(ステップS51)、動作表示用LCD107に書き換え完了表示を行い(ステップS52)、図6の処理に移行する。   On the other hand, if it is determined in step S40 that the program (firmware) in the block B is not rewritten (step S40), it is determined whether or not the program in the block C in the flash memory 103 is rewritten (step S41). If the block C is to be rewritten, USB communication is performed, data for rewriting the block C is received (step S48), the firmware update normal flag of the block C is set to “0” (step S49), and the block C After rewriting the contents of C to the data obtained by the USB communication (step S50), the firmware update normal flag of block C is set to “1” (step S51), and the rewriting completion display is performed on the operation display LCD 107 (step S52). ), The process proceeds to FIG.

この図6の処理の詳細については、前述したとおりであるが、フラッシュメモリ103のブロックCのファームアップ正常フラグが“0”である場合には、上記したファームアップ(ステップS50)が正常に終了していないので、ブロックCのデータの再度のファームアップを要求すべく動作表示用LCD107に警告表示を行い、動作をロックする(ステップS33乃至S35)。   The details of the processing of FIG. 6 are as described above. However, when the firmware up normal flag of the block C of the flash memory 103 is “0”, the above firmware up (step S50) is normally completed. Therefore, a warning is displayed on the operation display LCD 107 to request the firmware update of the data in the block C again, and the operation is locked (steps S33 to S35).

再び図5の説明に戻る。ステップS13にて、マイコン102がブロックAのプログラムの書き換えであると判断した場合には、電源電圧を検出する(ステップS14)。図2で前述したように、外部電源(図1の符号70)の電圧は抵抗R101,R102により分圧され、マイコン102に好適な電圧とされた後にA/Dポートに与えられるので、マイコン102は当該電圧を検出することになる。続いて、マイコン102は、検出した電源電圧が所定電圧以上であるか否かを判断し(ステップS15)、所定電圧以上でない場合にはフラッシュメモリ103のブロックAのプログラム(ブートプログラム)の書き換えを正常に終了できない可能性があるので、動作表示用LCD107に所定の警告表示を行い(ステップS16)、動作をロックする(ステップS17)。   Returning to the description of FIG. In step S13, when the microcomputer 102 determines that the program of the block A is rewritten, the power supply voltage is detected (step S14). As described above with reference to FIG. 2, the voltage of the external power supply (reference numeral 70 in FIG. 1) is divided by the resistors R101 and R102 and is applied to the A / D port after being set to a voltage suitable for the microcomputer 102. Will detect the voltage. Subsequently, the microcomputer 102 determines whether or not the detected power supply voltage is equal to or higher than a predetermined voltage (step S15). If not, the microcomputer 102 rewrites the program (boot program) of the block A in the flash memory 103. Since there is a possibility that the operation cannot be completed normally, a predetermined warning is displayed on the operation display LCD 107 (step S16), and the operation is locked (step S17).

尚、図5のステップS15においては電源電圧が所定電圧以上であるかどうかを検出しているが、通常は外部電源が接続されており電源が供給されていることを確認できれば電圧は保証されるので、上記ステップS15においては外部電源からの電源供給があるかどうかを判定してもよい。また、外部電源の電圧は必ずしも内蔵電源の電圧よりも高い必要はなく、ファームウェアの書き換えを保証する所定の電圧(例えば7.5V)以上であればよい。   In step S15 in FIG. 5, it is detected whether or not the power supply voltage is equal to or higher than a predetermined voltage, but normally the voltage is guaranteed if it can be confirmed that the external power supply is connected and the power supply is supplied. Therefore, in step S15, it may be determined whether there is a power supply from an external power source. Further, the voltage of the external power supply does not necessarily have to be higher than the voltage of the built-in power supply, and may be a predetermined voltage (for example, 7.5 V) or more that guarantees rewriting of firmware.

一方、マイコン102は、上記ステップS15で電源電圧が上記所定電圧以上であると判断した場合には、USB通信を行い、ブロックAの書き換え用のデータを受信し(ステップS18)、ブロックAのファームアップ正常フラグを“0”とし(ステップS19)、ブロックAの内容を上記USB通信で得たデータに書き換え(ステップS20)、ブロックAのファームアップ正常フラグを“1”とし(ステップS21)、動作表示用LCD107に書き換え完了表示を行い(ステップS22)、図8の処理に移行する。   On the other hand, if the microcomputer 102 determines in step S15 that the power supply voltage is equal to or higher than the predetermined voltage, the microcomputer 102 performs USB communication, receives the data for rewriting block A (step S18), and performs the firmware for block A. The up normal flag is set to “0” (step S19), the contents of block A are rewritten with the data obtained by the USB communication (step S20), and the firmware up normal flag of block A is set to “1” (step S21). Rewriting completion display is performed on the display LCD 107 (step S22), and the process proceeds to the process of FIG.

この図8の処理に移行すると、フラッシュメモリ103のブロックAのファームアップ正常フラグが“0”であるか否かを判断し(ステップS53)、当該フラグが“0”である場合には、上記したファームアップ(ステップS20)が正常に終了していないので、業者によるメンテナンスの必要性を示唆する警告表示を行い(ステップS54)、動作をロックする(ステップS55)。一方、当該フラグが“1”である場合には、プログラムBを実行することになる(ステップS56)。   When the process proceeds to the processing of FIG. 8, it is determined whether or not the firmware up normal flag of the block A of the flash memory 103 is “0” (step S53), and when the flag is “0”, Since the firmware upgrade (step S20) that has been completed is not completed normally, a warning indicating the necessity of maintenance by the supplier is displayed (step S54), and the operation is locked (step S55). On the other hand, when the flag is “1”, the program B is executed (step S56).

次に図9のフローチャートを参照して、プログラムBに基づく処理について説明する。   Next, processing based on the program B will be described with reference to the flowchart of FIG.

ここでは、データ書き換え装置をカメラシステムに適用した例を説明する。   Here, an example in which the data rewriting device is applied to a camera system will be described.

マイコン102は、プログラムBを実行すると、先ず各種変数を初期化し(ステップS60)、図2では不図示のパワースイッチ(図1のカメラ操作SW52に含まれる)の状態を検出し(ステップS61)、当該パワースイッチがオンされると、ボディユニット(図1の符号100)のダイヤル(図1のカメラ操作SW52に含まれる)が操作されたか否かを判断する(ステップS62)。ここで、ダイヤルが操作された場合には、マイコン102は、当該ダイヤル操作に基づく各処理を行った後(ステップS63)、ステップS64に進む。一方、ダイヤル操作がされていない場合には、ステップS64に進む。続いて、マイコン102は、ボディユニット(図1の符号100)のレリーズボタン(図1のカメラ操作SW52に含まれる)が操作されたか否かを判断する(ステップS64)。   When executing the program B, the microcomputer 102 first initializes various variables (step S60), detects the state of a power switch (not shown in FIG. 2) (included in the camera operation SW 52 in FIG. 1) (step S61), When the power switch is turned on, it is determined whether or not the dial (included in the camera operation SW 52 in FIG. 1) of the body unit (reference numeral 100 in FIG. 1) has been operated (step S62). Here, when the dial is operated, the microcomputer 102 performs each process based on the dial operation (step S63), and then proceeds to step S64. On the other hand, if the dial operation has not been performed, the process proceeds to step S64. Subsequently, the microcomputer 102 determines whether or not the release button (included in the camera operation SW 52 in FIG. 1) of the body unit (reference numeral 100 in FIG. 1) has been operated (step S64).

このステップS64で、当該レリーズボタンが操作されていなければ、上記ステップS61に戻り、上記動作を繰り返す。一方、レリーズボタンが半押し(1stレリーズのオン)されたか否かを判断し(ステップS65)、当該レリーズボタンが半押しされていなければ、上記ステップS61に戻り、上記動作を繰り返すことになる。   If it is determined in step S64 that the release button has not been operated, the process returns to step S61 to repeat the above operation. On the other hand, it is determined whether or not the release button is half-pressed (1st release is on) (step S65). If the release button is not half-pressed, the process returns to step S61 and the above operation is repeated.

レリーズボタンが半押し(1stレリーズのオン)されている場合には、露出演算を行い(ステップS66)合焦動作を行い(ステップS67)、合焦した場合には(ステップS68)、レリーズボタンが全押し(2ndレリーズのオン)されたか否かを判断し(ステップS69)、当該レリーズボタンが全押しされていなければ、上記ステップS65に戻り上記動作を繰り返す。一方、レリーズボタンが全押し(2ndレリーズのオン)された場合には(ステップS69)、露出動作を行い(ステップS70)、記録メディア(図1の符号39)に画像を記録し(ステップS71)、上記ステップS61に戻ることになる。   When the release button is half-pressed (1st release is on), exposure calculation is performed (step S66) and a focusing operation is performed (step S67). When the release button is in focus (step S68), the release button is It is determined whether or not the release button is fully pressed (2nd release is turned on) (step S69). If the release button is not fully pressed, the process returns to step S65 and the above operation is repeated. On the other hand, when the release button is fully pressed (2nd release is turned on) (step S69), an exposure operation is performed (step S70), and an image is recorded on the recording medium (reference numeral 39 in FIG. 1) (step S71). Then, the process returns to step S61.

以上説明したように、本発明の第1の実施の形態によれば、ファームウェアの書き換えの場合は内蔵電源である電池54により簡単に書き換えができると共に、ブートプログラムの書き換え中に電源が消耗して書き換えを失敗して書き換えが不可能になるということがないので、ファームウェアの書き換えを制御するためのプログラムの書き換えを確実に行うことができると共に、正常に書き換えが終了したかどうかを簡単に確認できる。   As described above, according to the first embodiment of the present invention, when the firmware is rewritten, the battery 54 as the built-in power supply can be easily rewritten, and the power is consumed during the rewriting of the boot program. Since rewriting does not fail and rewriting is not impossible, it is possible to reliably rewrite the program for controlling firmware rewriting and easily check whether rewriting has been completed normally. .

(第2の実施の形態)
図10を参照して、第2の実施の形態に係るデータ書き換え装置の構成例を示し説明する。
(Second Embodiment)
With reference to FIG. 10 , a configuration example of the data rewriting apparatus according to the second embodiment will be described and described.

この図10に示されるように、電池105のプラス(+)端子は、逆流防止の為のダイオードD101を介して電源回路101の第1入力ポートに接続され、マイナス(−)端子は、電源回路101の第2入力ポートに接続されている。図2では不図示の外部電源(図1の符号70に相当)からの電源供給を受けるACアダプタコネクタ106のプラス(+)端子は、逆流防止の為のダイオードD102を介して電源回路101の第1入力ポートに接続されており、マイナス(−)端子は、電源回路101の第2入力ポートに接続されている。電池105のプラス(+)端子は、抵抗R101,R102を介して接地され、当該抵抗R101,R102の接続点は、マイクロコンピュータ(以下、マイコンと称する)102のA/Dポートに接続されている。電源回路101の出力ポートは、マイコン102のVccポートに接続されている。そして、電源回路101の出力ポートは、リセットIC104にも接続されており、当該リセットIC104の出力ポートはマイコン102のRESETポートに接続されている。このマイコン102は、USB通信ポートを有しており、当該USB通信ポートは不図示のUSB通信コネクタ(図1の符号60に相当する)に接続される。以上のほか、マイコン102は、不揮発性メモリとしてのフラッシュメモリ103、動作表示用LCD107に接続されている。   As shown in FIG. 10, the positive (+) terminal of the battery 105 is connected to the first input port of the power supply circuit 101 via a diode D101 for preventing backflow, and the negative (−) terminal is connected to the power supply circuit. 101 is connected to the second input port. In FIG. 2, the positive (+) terminal of the AC adapter connector 106 that receives power supply from an external power supply (not shown) (corresponding to reference numeral 70 in FIG. 1) is connected to the first power supply circuit 101 via a diode D102 for preventing backflow. The minus (−) terminal is connected to the second input port of the power supply circuit 101. A positive (+) terminal of the battery 105 is grounded via resistors R101 and R102, and a connection point of the resistors R101 and R102 is connected to an A / D port of a microcomputer (hereinafter referred to as a microcomputer) 102. . The output port of the power supply circuit 101 is connected to the Vcc port of the microcomputer 102. The output port of the power supply circuit 101 is also connected to the reset IC 104, and the output port of the reset IC 104 is connected to the RESET port of the microcomputer 102. The microcomputer 102 has a USB communication port, and the USB communication port is connected to a USB communication connector (not shown) (corresponding to reference numeral 60 in FIG. 1). In addition to the above, the microcomputer 102 is connected to a flash memory 103 as a nonvolatile memory and an operation display LCD 107.

尚、このデータ書き換え装置をカメラシステムに適用する場合、図10の上記構成と図1の構成との関係は以下のようになる。即ち、抵抗R101,R102は図1の電圧検出回路53bに相当し、電源回路101は図1の電源回路53aに相当し、マイコン102は図1のBucom50に相当し、フラッシュメモリ103は図1の不揮発性メモリ29に相当し、電池105は図1の電池54に相当し、ACアダプタコネクタ106は図1のジャック37に相当し、リセットIC104は図1のリセットIC61に相当し、動作表示用LCD107は図1の動作表示用LCD57する。   When this data rewriting device is applied to a camera system, the relationship between the above configuration in FIG. 10 and the configuration in FIG. 1 is as follows. That is, the resistors R101 and R102 correspond to the voltage detection circuit 53b in FIG. 1, the power supply circuit 101 corresponds to the power supply circuit 53a in FIG. 1, the microcomputer 102 corresponds to the Bucom 50 in FIG. 1, and the flash memory 103 in FIG. 1 corresponds to the nonvolatile memory 29, the battery 105 corresponds to the battery 54 of FIG. 1, the AC adapter connector 106 corresponds to the jack 37 of FIG. 1, the reset IC 104 corresponds to the reset IC 61 of FIG. Is the operation display LCD 57 of FIG.

この図10の構成は、電池105の電圧或いは外部電源の電圧を抵抗R101,R102により分圧してマイコン102に好適な電圧としてA/Dポートに与える点で図2と構成上相違する。即ち、図10の構成では、マイコン102は、電池105の電圧或いは外部電源の電圧を検出できる。また、外部電源の電圧は7.5Vであり、電池105として採用し得るリチウム電池は図11の降電特性を示しているものとする。フラッシュメモリ103のメモリアドレス空間については第1の実施の形態に関する図3と同様であるので、ここでは重複した説明を省略する。   The configuration of FIG. 10 differs in configuration from FIG. 2 in that the voltage of the battery 105 or the voltage of the external power supply is divided by resistors R101 and R102 and applied to the A / D port as a suitable voltage for the microcomputer 102. That is, in the configuration of FIG. 10, the microcomputer 102 can detect the voltage of the battery 105 or the voltage of the external power supply. The voltage of the external power supply is 7.5 V, and a lithium battery that can be used as the battery 105 has the power-falling characteristics shown in FIG. Since the memory address space of the flash memory 103 is the same as that in FIG. 3 relating to the first embodiment, a duplicate description is omitted here.

以下、図12のフローチャートを参照して、上記構成による作用、即ち各種プログラムに基づくシーケンシャルな制御動作について詳細に説明する。   Hereinafter, with reference to the flowchart of FIG. 12, the operation by the above configuration, that is, the sequential control operation based on various programs will be described in detail.

尚、制御動作は、基本的部分は第1の実施の形態(図4乃至図9)と同様であるが、図5の上記ステップS15では電源電圧が所定電圧以上であるか否かを確認していたところが、この第2の実施の形態では電源電圧が9V以上であるか否かを確認している。   The basic operation of the control operation is the same as that of the first embodiment (FIGS. 4 to 9). In step S15 of FIG. 5, it is confirmed whether the power supply voltage is equal to or higher than a predetermined voltage. However, in the second embodiment, it is confirmed whether or not the power supply voltage is 9 V or higher.

以下では、図12を参照して、更に異なる部分を中心に説明する。   Below, with reference to FIG. 12, it demonstrates centering on a further different part.

この第2の実施の形態に係るデータ書き換え装置では、マイコン102は、ブロックB又はCのファームアップの前に電池105の電源電圧を検出する(ステップS120)。そして、電池105の電源電圧が7.5V以上でない場合には、マイコン102は、ファームアップを正常に終了できない可能性があるものと判断し、警告表示を動作表示用LCD107にて行い、動作をロックする(ステップS123)。これにより、例えばデータ書き換え装置がカメラシステムに適用される場合においては、通常のカメラ動作への移行が禁止される。   In the data rewriting apparatus according to the second embodiment, the microcomputer 102 detects the power supply voltage of the battery 105 before the firmware upgrade of the block B or C (step S120). If the power supply voltage of the battery 105 is not 7.5 V or higher, the microcomputer 102 determines that there is a possibility that the firmware update may not be completed normally, performs a warning display on the operation display LCD 107, and performs the operation. Lock (step S123). Thereby, for example, when the data rewriting device is applied to the camera system, the shift to the normal camera operation is prohibited.

以上説明したように、本発明の第2の実施の形態に係るデータ書き換え装置によれば、ファームウェアの書き換えもブートプログラムの書き換えもその性質に応じて電源容量を最大限活用しながら確実に行うことができると共に、正常に書き換えが終了したかどうかを簡単に確認することができる。   As described above, according to the data rewriting apparatus of the second embodiment of the present invention, firmware rewriting and boot program rewriting can be reliably performed while making maximum use of the power supply capacity in accordance with the properties. It is possible to easily check whether rewriting has been completed normally.

以上説明したように、本発明の実施の形態よれば、不揮発性メモリの書き換えの途中で停電や内蔵電源の消耗等により電源供給が遮断する等の原因で、最後まで書き換え動作が実行されずに書き込みエラーが発生したことを検出することができる。   As described above, according to the embodiment of the present invention, the rewrite operation is not executed until the end due to the power supply being cut off due to a power failure or exhaustion of the built-in power supply during the rewrite of the nonvolatile memory. It can be detected that a write error has occurred.

以上、本発明の第1及び第2の実施の形態について説明したが、本発明は、これに限定されることなく、その趣旨を逸脱しない範囲で種々の改良、変更が可能であることは勿論である。例えば、上記実施の形態では、データ書き換え装置をカメラシステムに適用する場合を適宜説明したが、これに限定されず、種々の技術に適用可能である。   The first and second embodiments of the present invention have been described above. However, the present invention is not limited to this, and various modifications and changes can be made without departing from the spirit of the present invention. It is. For example, in the above-described embodiment, the case where the data rewriting device is applied to the camera system has been described as appropriate. However, the present invention is not limited to this and can be applied to various technologies.

本発明の第1及び第2の実施の形態に共通するデータ書き換え装置の基本構成、及びそれを採用したカメラシステムの構成例を示す図。FIG. 2 is a diagram illustrating a basic configuration of a data rewriting apparatus common to the first and second embodiments of the present invention and a configuration example of a camera system employing the same. 第1の実施の形態に係るデータ書き換え装置の構成例を示す図。The figure which shows the structural example of the data rewriting apparatus which concerns on 1st Embodiment. フラッシュメモリ103のメモリアドレス空間を説明する図。FIG. 3 is a diagram for explaining a memory address space of a flash memory 103. 電池装填時の動作を説明するフローチャート。The flowchart explaining the operation | movement at the time of battery loading. 第1の実施の形態に係るデータ書き換え装置によるプログラムAに基づく処理を説明するためのフローチャート。The flowchart for demonstrating the process based on the program A by the data rewriting apparatus which concerns on 1st Embodiment. 第1の実施の形態に係るデータ書き換え装置によるプログラムAに基づく処理を説明するためのフローチャート。The flowchart for demonstrating the process based on the program A by the data rewriting apparatus which concerns on 1st Embodiment. 第1の実施の形態に係るデータ書き換え装置によるプログラムAに基づく処理を説明するためのフローチャート。The flowchart for demonstrating the process based on the program A by the data rewriting apparatus which concerns on 1st Embodiment. 第1の実施の形態に係るデータ書き換え装置によるプログラムAに基づく処理を説明するためのフローチャート。The flowchart for demonstrating the process based on the program A by the data rewriting apparatus which concerns on 1st Embodiment. 第1の実施の形態に係るデータ書き換え装置によるプログラムBに基づく処理を説明するためのフローチャート。The flowchart for demonstrating the process based on the program B by the data rewriting apparatus which concerns on 1st Embodiment. 第1の実施の形態に係るデータ書き換え装置の構成例を示す図。The figure which shows the structural example of the data rewriting apparatus which concerns on 1st Embodiment. リチウム電池の降圧特性を示す図。The figure which shows the pressure | voltage fall characteristic of a lithium battery. 第1の実施の形態に係るデータ書き換え装置によるプログラムAに基づく処理を説明するためのフローチャート。The flowchart for demonstrating the process based on the program A by the data rewriting apparatus which concerns on 1st Embodiment.

符号の説明Explanation of symbols

29…不揮発性メモリ、50…Bucom、53a…電源回路、53b…電圧検出回路、54…電池、57…動作表示用LCD、52…カメラ操作SW、60…USB通信コネクタ、61…リセットIC、70…外部電源、101・・・電源回路、102・・・マイコン、103・・・フラッシュメモリ、104・・・リセットIC、105・・・電池、106・・・ACアダプタコネクタ、107・・・動作表示用LCD。   DESCRIPTION OF SYMBOLS 29 ... Nonvolatile memory, 50 ... Bucom, 53a ... Power supply circuit, 53b ... Voltage detection circuit, 54 ... Battery, 57 ... LCD for operation display, 52 ... Camera operation SW, 60 ... USB communication connector, 61 ... Reset IC, 70 ... External power supply, 101 ... Power supply circuit, 102 ... Microcomputer, 103 ... Flash memory, 104 ... Reset IC, 105 ... Battery, 106 ... AC adapter connector, 107 ... Operation LCD for display.

Claims (6)

内蔵電源からの電源供給又は外部電源からの電源供給により不揮発性メモリの書き換え動作を実行するデータ書き換え装置であって、
所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納するための第2メモリ領域と、所定のフラグを設定するフラグ設定用メモリを有する不揮発性メモリと、
上記第2メモリ領域に格納されたプログラムに基づいて、上記第1メモリ領域の書き換えの場合は上記内蔵電源に基づく書き換え動作を許容し、上記第2メモリ領域のデータの書き換えのときは上記外部電源に基づく書き換えを許容するとともに上記内蔵電源に基づく書き換え動作を禁止する書き換え制御手段と、
上記不揮発性メモリの第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、上記フラグ設定用メモリを読み出すフラグ読み出し手段と、
上記不揮発性メモリの書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリの書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定するフラグ設定手段と、
上記フラグ読み出し手段により読み出したフラグの値が上記不揮発性メモリの書き換え開始時に設定した値と同じ値のとき所定のメッセージを表示する表示手段と、
を備えたことを特徴とするデータ書き換え装置。
A data rewrite device that executes a rewrite operation of a nonvolatile memory by power supply from a built-in power supply or power supply from an external power supply,
A non-volatile memory having a first memory area for storing predetermined firmware, a second memory area for storing a program for controlling rewriting of the firmware, and a flag setting memory for setting a predetermined flag;
Based on a program stored in the second memory area, a rewrite operation based on the built-in power supply is allowed in the case of rewriting the first memory area, and the external power supply is rewritten in the case of rewriting data in the second memory area. Rewriting control means for allowing rewriting based on the above and prohibiting rewriting operation based on the built-in power supply,
Prior to rewriting the first memory area or the second memory area of the non-volatile memory, flag reading means for reading the flag setting memory;
Flag setting means for setting the flag to a predetermined value at the start of rewriting of the nonvolatile memory, and setting the flag to a value different from that at the start of rewriting after completion of rewriting of the nonvolatile memory;
Display means for displaying a predetermined message when the value of the flag read by the flag reading means is the same as the value set at the start of rewriting of the nonvolatile memory;
A data rewriting device comprising:
内蔵電源からの電源供給、または外部電源からの電源供給により不揮発性メモリの書き換え動作を実行するデータ書き換え装置であって、
外部電源電圧を検出する電源電圧検出手段と、
所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納する第2メモリ領域と、所定のフラグを設定するフラグ設定用メモリを有する不揮発性メモリと、
上記第2メモリ領域に記憶されたプログラムに基づいて、上記第1メモリ領域のデータの書き換えの場合は上記外部電源電圧が第1の所定電圧では書き換えを許可し、上記第2メモリ領域のデータの書き換えの場合は上記外部電源電圧が上記第1の所定電圧では書き換えを禁止し、上記外部電源電圧が第2の所定電圧では書き換えを許可する書き換え制御手段と、
上記不揮発性メモリの第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、上記フラグ設定用メモリを読み出すフラグ読み出し手段と、
上記不揮発性メモリの書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリの書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定するフラグ設定手段と、
上記フラグ読み出し手段により読み出したフラグの値が上記不揮発性メモリの書き換え開始時に設定した値と同じ値のとき所定のメッセージを表示する表示手段と、
を備えたことを特徴とするデータ書き換え装置。
A data rewrite device that executes a rewrite operation of a nonvolatile memory by power supply from a built-in power supply or power supply from an external power supply,
Power supply voltage detection means for detecting an external power supply voltage;
A first memory area for storing a predetermined firmware, and a second memory area for storing a program for controlling the rewriting of the firmware, the nonvolatile memory that have a memory flag set for setting a predetermined flag ,
Based on the program stored in the second memory area, in case of rewriting data in the first memory area permits the rewriting in the external power supply voltage is a first predetermined voltage, the second memory region In the case of data rewriting, rewriting control means for prohibiting rewriting when the external power supply voltage is the first predetermined voltage and rewriting when the external power supply voltage is the second predetermined voltage;
Prior to rewriting the first memory area or the second memory area of the non-volatile memory, flag reading means for reading the flag setting memory;
Flag setting means for setting the flag to a predetermined value at the start of rewriting of the nonvolatile memory, and setting the flag to a value different from that at the start of rewriting after completion of rewriting of the nonvolatile memory;
Display means for displaying a predetermined message when the value of the flag read by the flag reading means is the same as the value set at the start of rewriting of the nonvolatile memory;
A data rewriting device comprising:
上記第1の所定電圧は、外部電源が接続されていないことを示す電圧であることを特徴とする請求項2に記載のデータ書き換え装置。   3. The data rewriting apparatus according to claim 2, wherein the first predetermined voltage is a voltage indicating that an external power source is not connected. 上記第2の所定電圧は、外部電源が接続されたことを示す電圧であることを特徴とする請求項2に記載のデータ書き換え装置。   3. The data rewriting apparatus according to claim 2, wherein the second predetermined voltage is a voltage indicating that an external power source is connected. 第1電圧レベル又は上記第1電圧レベルより高い第2電圧レベルを基準に電源電圧のレベルを判定する電源電圧判定手段と、
所定のファームウェアを格納する第1メモリ領域と、上記ファームウェアの書き換えを制御するためのプログラムを格納するための第2メモリ領域と、所定のフラグを設定するフラグ設定用メモリを有する不揮発性メモリと、
上記第2メモリ領域に記憶されたプログラムに基づいて、上記第1メモリ領域のデータの書き換えのときは電源電圧が上記第1電圧レベルより低いときはデータの書き換えを禁止し、上記第2メモリ領域のデータの書き換えのときは電源電圧が上記第2電圧レベルより低いときは書き換えを禁止する書き換え制御手段と、
上記不揮発性メモリの第1メモリ領域又は上記第2メモリ領域の書き換えに先立って、上記フラグ設定用メモリを読み出すフラグ読み出し手段と、
上記不揮発性メモリの書き換え開始時に上記フラグを所定の値に設定し、上記不揮発性メモリの書き換え完了後に上記フラグを上記書き換え開始時とは異なる値に設定するフラグ設定手段と、
上記フラグ読み出し手段により読み出したフラグの値が上記不揮発性メモリの書き換え開始時に設定した値と同じ値のとき所定のメッセージを表示する表示手段と、
を備えたことを特徴とするデータ書き換え装置。
Power supply voltage determination means for determining a power supply voltage level based on a first voltage level or a second voltage level higher than the first voltage level;
A non-volatile memory having a first memory area for storing predetermined firmware, a second memory area for storing a program for controlling rewriting of the firmware, and a flag setting memory for setting a predetermined flag;
Based on a program stored in the second memory area, when rewriting data in the first memory area, data rewrite is prohibited when the power supply voltage is lower than the first voltage level, and the second memory area Rewriting control means for prohibiting rewriting when the power supply voltage is lower than the second voltage level when rewriting the data;
Prior to rewriting the first memory area or the second memory area of the non-volatile memory, flag reading means for reading the flag setting memory;
Flag setting means for setting the flag to a predetermined value at the start of rewriting of the nonvolatile memory, and setting the flag to a value different from that at the start of rewriting after completion of rewriting of the nonvolatile memory;
Display means for displaying a predetermined message when the value of the flag read by the flag reading means is the same as the value set at the start of rewriting of the nonvolatile memory;
A data rewriting device comprising:
上記不揮発性メモリの上記第1メモリ領域にはカメラ又はそのアクセサリを制御するファームウェア又はデータが格納されることを特徴とする請求項1、2、5のいずれかに記載のデータ書き換え装置。   6. The data rewriting apparatus according to claim 1, wherein firmware or data for controlling the camera or its accessory is stored in the first memory area of the nonvolatile memory.
JP2003416790A 2003-12-15 2003-12-15 Data rewrite device Expired - Fee Related JP4409275B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003416790A JP4409275B2 (en) 2003-12-15 2003-12-15 Data rewrite device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003416790A JP4409275B2 (en) 2003-12-15 2003-12-15 Data rewrite device

Publications (2)

Publication Number Publication Date
JP2005174232A JP2005174232A (en) 2005-06-30
JP4409275B2 true JP4409275B2 (en) 2010-02-03

Family

ID=34735892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003416790A Expired - Fee Related JP4409275B2 (en) 2003-12-15 2003-12-15 Data rewrite device

Country Status (1)

Country Link
JP (1) JP4409275B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013065261A (en) * 2011-09-20 2013-04-11 Denso Corp Memory management device
US8972966B2 (en) * 2012-01-05 2015-03-03 Lenovo (Singapore) Pte. Ltd. Updating firmware in a hybrid computing environment
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder
CN109614265B (en) * 2018-11-05 2024-03-29 北京原子机器人科技有限公司 Double-backup system of intelligent inertial navigation sensing system and configuration starting method thereof

Also Published As

Publication number Publication date
JP2005174232A (en) 2005-06-30

Similar Documents

Publication Publication Date Title
JP4125328B2 (en) Electronic device, control method of peripheral device by electronic device, program, and storage medium
JP2003098583A (en) Camera using rewritable memory
JP4282460B2 (en) Data rewrite device
JP4409275B2 (en) Data rewrite device
US5089833A (en) Camera
JP5127511B2 (en) Optical device
JP2821560B2 (en) Camera data storage
US5481326A (en) Camera data communication device
US7119844B2 (en) Digital camera
USRE39674E1 (en) Peripheral and camera system using the same, for rewriting programs stored in a camera
JPH08227359A (en) Electronic system device incorporating one-chip microcomputer in it
JP4785778B2 (en) Imaging device, control method thereof, and program
JP4444530B2 (en) camera
JP2000010867A (en) Camera equipped with rewritable nonvolatile memory
JP2008294823A (en) Imaging apparatus, control method, and program
JP2749286B2 (en) Auto focus camera
JP2003234929A (en) External device for camera
JP3477415B2 (en) Camera system
JP2014157200A (en) Flash device
JP2002244931A (en) Equipment control device and equipment control method
JP2007195049A (en) Image sensing device and method and program for controlling the device
JPH11223860A (en) Control circuit for camera
JPH07191364A (en) Camera using reloadable memory
JPH07294981A (en) Camera provided with function for correcting its shake
JP2000013735A (en) Camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060807

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090901

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090928

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091020

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091111

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

Free format text: PAYMENT UNTIL: 20121120

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131120

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees