Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5658200B2 - Communication device and activation program code selection method - Google Patents
[go: Go Back, main page]

JP5658200B2 - Communication device and activation program code selection method - Google Patents

Communication device and activation program code selection method Download PDF

Info

Publication number
JP5658200B2
JP5658200B2 JP2012137661A JP2012137661A JP5658200B2 JP 5658200 B2 JP5658200 B2 JP 5658200B2 JP 2012137661 A JP2012137661 A JP 2012137661A JP 2012137661 A JP2012137661 A JP 2012137661A JP 5658200 B2 JP5658200 B2 JP 5658200B2
Authority
JP
Japan
Prior art keywords
program code
memory
memory area
stored
control unit
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.)
Active
Application number
JP2012137661A
Other languages
Japanese (ja)
Other versions
JP2014003472A (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.)
NEC Platforms Ltd
Original Assignee
NEC Platforms Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Platforms Ltd filed Critical NEC Platforms Ltd
Priority to JP2012137661A priority Critical patent/JP5658200B2/en
Publication of JP2014003472A publication Critical patent/JP2014003472A/en
Application granted granted Critical
Publication of JP5658200B2 publication Critical patent/JP5658200B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Description

本発明は、複数の起動プログラムコードを有する通信装置および起動プログラムコード選択方法に関する。   The present invention relates to a communication apparatus having a plurality of activation program codes and an activation program code selection method.

近年、通信機能を有する通信装置においては、通信装置を動作させるためのプログラムコードのバージョンアップを行うために、プログラムコードを外部のサーバなどからダウンロードできるようにしているものが多くなってきている。ここで、通信装置とは、携帯電話機やPHS(Personal Handyphone System:ピーエッチエス)端末あるいはスマートフォンなどの移動体通信端末を指すものとする。或いは、通信装置は、通信機能を有するタブレット型端末や、通信機能を有するパーソナルコンピュータなど、であってもよい。   In recent years, many communication devices having a communication function have made it possible to download a program code from an external server or the like in order to upgrade a program code for operating the communication device. Here, the communication device refers to a mobile communication terminal such as a mobile phone, a PHS (Personal Handyphone System) terminal, or a smartphone. Alternatively, the communication device may be a tablet terminal having a communication function, a personal computer having a communication function, or the like.

そして、プログラムコードのバージョンアップを確実に行わせるため、通信装置の内部に、プログラムコードを格納するメモリを2面備えているものも多くなってきている(例えば、特許文献1参照。)。   In order to ensure that the program code is upgraded, there are many communication devices that are provided with two memories for storing the program code (see, for example, Patent Document 1).

上述した特許文献1「ソフトウェア更新方法および移動端末装置」には以下の記載がなされている。   The following description is made in Patent Document 1 “Software update method and mobile terminal device” described above.

すなわち、移動端末装置に、本体プログラムコード#1、#2を保持するメモリ領域を2面設ける。本体プログラムコードのバージョンアップ等のためのプログラムコード更新時には、1面の本体プログラムコードを更新対象としてプログラムコード更新処理を実行する。この更新が失敗した時には、他面の本体プログラムコードを用いて移動端末装置の動作を行わせることができる。また、他面の本体プログラムコードを更新対象として、プログラムコード更新を再度実行することができる。このことにより、本体プログラムコードを移動端末装置の外部に退避することなく、プログラムコードの更新処理を行うことができる、としている。また、プログラムコード更新処理の失敗時にも、他面の本体プログラムコードを用いて移動端末装置の動作を行わせることができるため、移動端末装置の使用が長時間制限されるようなことにはならない、としている。   That is, two memory areas for holding the main body program codes # 1 and # 2 are provided in the mobile terminal device. When updating the program code for upgrading the main body program code or the like, the program code updating process is executed with the main body program code as one update target. When this update fails, the mobile terminal device can be operated using the main body program code on the other side. Also, the program code update can be executed again with the main body program code on the other side as the update target. Thus, the program code update process can be performed without saving the main body program code outside the mobile terminal device. Even when the program code update process fails, the operation of the mobile terminal device can be performed using the main body program code on the other side, so that the use of the mobile terminal device is not restricted for a long time. , And.

特開2007−189332号公報(第7〜11頁、図1〜10)JP 2007-189332 A (pages 7 to 11, FIGS. 1 to 10)

上述した特許文献1に記載の手法においては、プログラムコードの更新が失敗した時には、更新を行わない他面の本体プログラムコードを用いて移動端末装置の動作を行わせることが出来るようになっている。しかし、プログラムコードの更新が失敗した場合であって、かつ、更新の失敗を検出できなかった場合には、以下のように動作してしまう、という課題を有している。すなわち、更新が失敗したにも拘わらず失敗を検出できていないため、プログラムコードは正常に更新されたものと見なし、このプログラムコードを使用して、移動端末装置を起動させようと動作してしまう、という課題を有している。つまり、正常でないプログラムコードを使用して移動端末装置を起動させようと動作し、正常に起動できず、結果的には起動の繰り返しに陥ってしまう、という課題を有している。   In the method described in Patent Document 1 described above, when the update of the program code fails, the operation of the mobile terminal device can be performed using the main body program code of the other side that is not updated. . However, there is a problem that when the update of the program code fails and the update failure cannot be detected, the operation is as follows. That is, since the failure has not been detected even though the update has failed, the program code is considered to have been updated normally, and the program code is used to start the mobile terminal device. , Has the problem of. In other words, there is a problem that the mobile terminal device operates to start up using an abnormal program code and cannot be started up normally, resulting in repeated start-up.

なお、プログラムコードの更新が失敗した場合で、かつ、更新の失敗を検出できない場合とは、以下のような状況において起こり得るものである。すなわち、通常、更新したプログラムコードの正当性は、データの信頼性を検査するために算出した値であるところのチェックサムや、CRC(Cyclic Redundancy Check:巡回冗長検査)などの誤り検出データを用いて確認するようにしている。ところが、更新したプログラムコードに不正なコードが紛れ込んでいる場合であっても、誤り検出データは、正常なプログラムコードにおいて算出されたデータと同じである、といった場合も起こり得るものである。このような場合には、不正プログラムコードが紛れ込んでいることを検出することは出来ない。そして、不正プログラムコードが紛れ込んでいるプログラムコードを、正常なプログラムコードであると見なし、その結果、起動の失敗を繰り返すこととなってしまう。   The case where the update of the program code has failed and the case where the update failure cannot be detected can occur in the following situation. That is, normally, the validity of the updated program code uses error detection data such as a checksum that is a value calculated to check the reliability of data and CRC (Cyclic Redundancy Check). To check. However, even if an incorrect code is included in the updated program code, the error detection data may be the same as the data calculated in the normal program code. In such a case, it cannot be detected that the malicious program code is mixed in. Then, the program code in which the illegal program code is mixed is regarded as a normal program code, and as a result, the activation failure is repeated.

本発明は上述した課題を解決するためになされたものである。従って、本発明の目的は、正常でないプログラムコードを使用して装置を起動させようとした場合であっても、そのプログラムコードが正常でないことを検出でき、元の正常なプログラムコードによって起動させることを可能とする、通信装置および起動プログラムコード選択方法、を提供することにある。   The present invention has been made to solve the above-described problems. Accordingly, an object of the present invention is to detect that the program code is not normal even when trying to start the apparatus using an abnormal program code, and to start the apparatus with the original normal program code. The present invention provides a communication device and a method for selecting a startup program code.

本発明の通信装置は、プログラムコードを格納する複数のメモリ領域を有する第1の不揮発性メモリを備えている。また、前記複数のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する複数のカウンタを有する第2の不揮発性メモリを備えている。さらに、前記複数のメモリ領域の何れかのプログラムコードを展開する動作用メモリと、制御部を備えている。前記制御部は、前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択する。次に、前記運用の為のプログラムコードを前記動作用メモリに展開して動作させることにより装置の起動を行う。ここで、前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードを格納していたメモリ領域に対応する前記複数の何れかのカウンタに格納する。そして、前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する。またさらに、外部から受信するデータを前記制御部に送出すると共に、前記制御部から出力されるデータを外部へ送信する通信部を備えている。   The communication device of the present invention includes a first nonvolatile memory having a plurality of memory areas for storing program codes. In addition, a second nonvolatile memory having a plurality of counters for storing the number of activation failures in the program codes of the plurality of memory areas corresponding to each of the memory areas is provided. Furthermore, an operation memory for expanding any one of the plurality of memory areas and a control unit are provided. The control unit selects any program code in the plurality of memory areas as a program code for operation. Next, the program code for the operation is expanded in the operation memory and operated to start up the apparatus. Here, when the activation with the program code for the operation fails, the number of failures is stored in any one of the plurality of counters corresponding to the memory area in which the program code for the operation is stored. When the number of failures stored in any of the counters exceeds a threshold value, the program code for operating the program code in any memory area other than the memory area storing the program code for the operation Select as code. Furthermore, a communication unit is provided that transmits data received from the outside to the control unit and transmits data output from the control unit to the outside.

本発明の起動プログラムコード選択方法は、複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択し、前記運用の為のプログラムコードを動作用メモリに展開して動作させることにより装置の起動を行う。そして、前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードを格納していたメモリ領域に対応する複数の何れかのカウンタに格納する。ここで、前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する、ようになっている。   According to the activation program code selection method of the present invention, a program code in any one of a plurality of memory areas is selected as a program code for operation, and the program code for operation is expanded and operated in an operation memory. Start the device. If the activation with the program code for the operation fails, the number of failures is stored in any one of a plurality of counters corresponding to the memory area in which the program code for the operation is stored. Here, when the number of failures stored in any one of the counters exceeds a threshold, the program code in any memory area other than the memory area storing the program code for the operation is used for the operation. Select as program code.

本発明によれば、正常でないプログラムコードを使用して装置を起動させようとした場合であっても、そのプログラムコードが正常でないことを検出でき、元の正常なプログラムコードによって起動させることが可能となる。   According to the present invention, even when an attempt is made to start the apparatus using an abnormal program code, it is possible to detect that the program code is not normal and to start the apparatus using the original normal program code. It becomes.

本発明の通信装置の第1の実施形態を示すブロック図である。It is a block diagram which shows 1st Embodiment of the communication apparatus of this invention. 第1の実施形態の動作について説明するフローチャートである。It is a flowchart explaining the operation | movement of 1st Embodiment. 本発明の通信装置の第2の実施形態を示すブロック図である。It is a block diagram which shows 2nd Embodiment of the communication apparatus of this invention. 第2の実施形態の動作について説明する第1のフローチャートである。It is a 1st flowchart explaining the operation | movement of 2nd Embodiment. 第2の実施形態の動作について説明する第2のフローチャートである。It is a 2nd flowchart explaining operation | movement of 2nd Embodiment. 本発明の通信装置の第3の実施形態を示すブロック図である。It is a block diagram which shows 3rd Embodiment of the communication apparatus of this invention. 第3の実施形態の動作について説明するフローチャートである。It is a flowchart explaining the operation | movement of 3rd Embodiment. 本発明の通信装置の第4の実施形態を示すブロック図である。It is a block diagram which shows 4th Embodiment of the communication apparatus of this invention. 第4の実施形態の動作について説明するフローチャートである。It is a flowchart explaining the operation | movement of 4th Embodiment.

次に、本発明の実施形態について図面を参照して説明する。
[第1の実施形態]
図1は、本発明の通信装置の第1の実施形態を示すブロック図である。
Next, embodiments of the present invention will be described with reference to the drawings.
[First embodiment]
FIG. 1 is a block diagram showing a first embodiment of a communication apparatus according to the present invention.

なお、本実施形態における通信装置とは、携帯電話機やPHS端末、或いは、スマートフォンなどの移動体通信端末を指すものとする。或いは、通信装置は、通信機能を有するタブレット型端末や、通信機能を有するパーソナルコンピュータなど、であってもよい。   In addition, the communication apparatus in this embodiment shall point out mobile communication terminals, such as a mobile telephone, a PHS terminal, or a smart phone. Alternatively, the communication device may be a tablet terminal having a communication function, a personal computer having a communication function, or the like.

図1に示す通信装置100は、通信部10、不揮発性メモリ20、不揮発性メモリ30、動作用メモリ40、制御部50を備えている。   A communication apparatus 100 illustrated in FIG. 1 includes a communication unit 10, a nonvolatile memory 20, a nonvolatile memory 30, an operation memory 40, and a control unit 50.

通信部10は、通信装置100の外部との通信を行う部分であり、制御部50から出力される音声やテキスト或いは映像などのデータを外部へ送信し、外部から受信するデータを制御部50に送出する。通信部10は、無線によって外部との通信を行うものであってもよいし、有線によって外部との通信を行うものであってもよい。   The communication unit 10 is a part that communicates with the outside of the communication device 100, transmits data such as voice, text, or video output from the control unit 50 to the outside, and receives data received from the outside to the control unit 50. Send it out. The communication unit 10 may perform communication with the outside wirelessly or may perform communication with the outside by wire.

不揮発性メモリ20は、通信装置100を動作させるためのプログラムコードを格納するメモリである。そして、不揮発性メモリ20は2つのメモリ領域、すなわち、#1メモリ領域21と#2メモリ領域22、を有している。#1メモリ領域21には通信装置100を動作させるための第1のプログラムコード、すなわち、#1プログラムコード、が格納される。また、#2メモリ領域22には通信装置100を動作させるための第2のプログラムコード、すなわち、#2プログラムコード、が格納される。なお、不揮発性メモリ20は、図示しないブートローダ(boot loader)も格納しているものとする。ブートローダは、周知のように、通信装置100の電源投入後に、#1メモリ領域21或いは#2メモリ領域22の何れかのプログラムコードを動作用メモリ40に読み込むためのプログラムである。   The nonvolatile memory 20 is a memory that stores program codes for operating the communication device 100. The nonvolatile memory 20 has two memory areas, that is, a # 1 memory area 21 and a # 2 memory area 22. In the # 1 memory area 21, a first program code for operating the communication apparatus 100, that is, a # 1 program code is stored. The # 2 memory area 22 stores a second program code for operating the communication apparatus 100, that is, a # 2 program code. It is assumed that the nonvolatile memory 20 also stores a boot loader (not shown). As is well known, the boot loader is a program for reading the program code of either the # 1 memory area 21 or the # 2 memory area 22 into the operation memory 40 after the communication apparatus 100 is powered on.

不揮発性メモリ20は、メモリの内容を書き換え可能で、かつ、電源を切ってもメモリ内のデータが消えない半導体メモリであるところのフラッシュメモリ(flash memory)で構成されるとよい。   The nonvolatile memory 20 may be constituted by a flash memory that is a semiconductor memory that can rewrite the contents of the memory and that does not lose the data in the memory even when the power is turned off.

本実施形態においては、#1プログラムコードを格納する#1メモリ領域21を、運用面とし、#2プログラムコードを格納する#2メモリ領域22を、退避面とするものとする。なお、運用面のプログラムコードは、通信装置100を起動させる際、優先的に動作用メモリ40に展開されるようにしている。そして、運用面のプログラムコードでの起動が失敗した場合には、退避面のプログラムコードで通信装置100を起動させるようになっている。つまり、通信装置100の電源投入後には、優先的に運用面のプログラムコードで通信装置100の起動を行い、運用面のプログラムコードでの起動が失敗した場合には、退避面のプログラムコードで通信装置100の起動を行わせるようにしている。   In the present embodiment, it is assumed that the # 1 memory area 21 storing the # 1 program code is an operation side, and the # 2 memory area 22 storing the # 2 program code is a saving side. The operational program code is preferentially expanded in the operation memory 40 when the communication apparatus 100 is activated. When the activation with the operation-side program code fails, the communication apparatus 100 is activated with the saving-side program code. That is, after the communication device 100 is turned on, the communication device 100 is preferentially activated with the operational program code, and if the activation with the operational program code fails, the communication is performed with the evacuation program code. The apparatus 100 is activated.

不揮発性メモリ30は、回数をカウントして記憶する2つのカウンタ、すなわち、#1カウンタ31と#2カウンタ32、を格納するメモリである。#1カウンタ31は、#1メモリ領域21の#1プログラムコードで通信装置100の起動を行い、その起動が失敗した場合の失敗回数を記憶する。また、#2カウンタ32は、#2メモリ領域22の#2プログラムコードで通信装置100の起動を行い、その起動が失敗した場合の失敗回数を記憶する。   The nonvolatile memory 30 is a memory that stores two counters that count and store the number of times, that is, a # 1 counter 31 and a # 2 counter 32. The # 1 counter 31 activates the communication apparatus 100 with the # 1 program code in the # 1 memory area 21 and stores the number of failures when the activation fails. Further, the # 2 counter 32 activates the communication device 100 with the # 2 program code in the # 2 memory area 22 and stores the number of failures when the activation fails.

動作用メモリ40は、通信装置100を動作させるプログラムコードを記憶するメモリである。そして、動作用メモリ40に記憶されるプログラムコードを実行することにより、通信装置100の動作が行われるようになっている。なお、動作用メモリ40に記憶されるプログラムコードは、#1メモリ領域21の#1プログラムコードか、或いは、#2メモリ領域22の#2プログラムコードの何れか一方のプログラムコードである。なお、動作用メモリ40は、メモリの内容を書き換え可能であるが、電源を切った場合にはメモリ内のデータが失われるRAM(random access memory:ラム)で構成される。   The operation memory 40 is a memory that stores a program code for operating the communication apparatus 100. Then, by executing the program code stored in the operation memory 40, the operation of the communication device 100 is performed. Note that the program code stored in the operation memory 40 is either the # 1 program code in the # 1 memory area 21 or the # 2 program code in the # 2 memory area 22. The operation memory 40 is composed of a RAM (random access memory) that can rewrite the contents of the memory, but loses the data in the memory when the power is turned off.

制御部50は、通信装置100全体の動作制御を行い、CPU(central processing unit:中央処理装置)を備えている。特に、制御部50は、通信装置100の電源投入時に、不揮発性メモリ20内の運用面に格納されている#1プログラムコードを動作用メモリ40に展開し記憶させる。そして、動作用メモリ40に記憶されたプログラムコードを動作させることにより、通信装置100の起動を行う。通信装置100の起動が成功した場合には、そのまま、通信装置100の動作を継続させる。通信装置100の起動が失敗した場合には、その失敗回数を不揮発性メモリ30の#1カウンタ31に記憶させる。次に、再度、運用面に格納されている#1プログラムコードを動作用メモリ40に展開し記憶させ、通信装置100の起動を行う。ここでも通信装置100の起動が失敗した場合には、その失敗回数を不揮発性メモリ30の#1カウンタ31に記憶させる。そして、#1カウンタ31に記憶された失敗回数が、予め定めておいた閾値を超えた場合には、不揮発性メモリ20内の退避面に格納されている#2プログラムコードを動作用メモリ40に展開し記憶させるよう動作する。   The control unit 50 controls the operation of the entire communication apparatus 100 and includes a CPU (central processing unit). In particular, when the communication device 100 is powered on, the control unit 50 develops and stores the # 1 program code stored on the operation side in the nonvolatile memory 20 in the operation memory 40. Then, the communication device 100 is activated by operating the program code stored in the operation memory 40. If the communication device 100 is successfully activated, the operation of the communication device 100 is continued as it is. When activation of the communication device 100 fails, the number of failures is stored in the # 1 counter 31 of the nonvolatile memory 30. Next, the # 1 program code stored in the operation side is expanded and stored in the operation memory 40 again, and the communication apparatus 100 is activated. Again, if the activation of the communication device 100 fails, the number of failures is stored in the # 1 counter 31 of the nonvolatile memory 30. When the number of failures stored in the # 1 counter 31 exceeds a predetermined threshold, the # 2 program code stored on the save surface in the nonvolatile memory 20 is stored in the operation memory 40. Operates to expand and store.

次に、図2を参照して、本実施形態の動作について説明する。   Next, the operation of the present embodiment will be described with reference to FIG.

図2は、第1の実施形態の動作について説明するフローチャートである。   FIG. 2 is a flowchart for explaining the operation of the first embodiment.

なお、本実施形態においては、上述したように、#1プログラムコードを格納する#1メモリ領域21を、運用面とし、#2プログラムコードを格納する#2メモリ領域22を、退避面とするものとする。そして、#1メモリ領域21には、通信装置100の外部のサーバなどからダウンロードしたプログラムコードが、#1プログラムコードとして格納されているものとする。また、#2メモリ領域22には、#1プログラムコードでの通信装置100の起動が失敗した場合に、通信装置100を確実に起動させ得る緊急用のプログラムコードが、#2プログラムコードとして格納されているものとする。さらに、#1プログラムコードでの起動の失敗回数を記憶する#1カウンタ31、及び、#2プログラムコードでの起動の失敗回数を記憶する#2カウンタ32、の内容は、共に「0」であるものとする。   In the present embodiment, as described above, the # 1 memory area 21 storing the # 1 program code is used as an operation side, and the # 2 memory area 22 storing the # 2 program code is used as a save side. And In the # 1 memory area 21, it is assumed that a program code downloaded from a server external to the communication apparatus 100 is stored as a # 1 program code. Also, in the # 2 memory area 22, an emergency program code that can surely start the communication device 100 when the communication device 100 fails to start with the # 1 program code is stored as the # 2 program code. It shall be. Further, the contents of the # 1 counter 31 for storing the number of activation failures with the # 1 program code and the # 2 counter 32 for storing the number of activation failures with the # 2 program code are both “0”. Shall.

図2において、図1に示した通信装置100の電源が投入されると(図2のステップS1)、通信装置100の制御部50は以下のように動作する。   2, when the communication apparatus 100 shown in FIG. 1 is turned on (step S1 in FIG. 2), the control unit 50 of the communication apparatus 100 operates as follows.

すなわち、制御部50は、不揮発性メモリ30に記憶されている起動の失敗回数について、運用面からチェックを行う。つまり、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値(例えば、「2」であるとする)を超えているか否かの判定を行う(ステップS2)。   That is, the control unit 50 checks the number of startup failures stored in the nonvolatile memory 30 from the operational aspect. That is, it is determined whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold (for example, “2”) (step S2).

起動の失敗回数が閾値を超えてはいない場合(ステップS2でNo)、#1カウンタ31の内容を「1」だけインクリメントする(ステップS3)。そして、運用面の#1プログラムコードを、動作用メモリ40に展開し記憶させる(ステップS4)。次に、#1プログラムコードの動作用メモリ40への展開が成功したか否かの判定を行う(ステップS5)。展開が成功したか否かの判定は、不揮発性メモリ20のブートローダが正常に終了した場合に成功したものとし、ブートローダが正常に終了しなかった場合には不成功と判定するものとする。   When the number of activation failures does not exceed the threshold (No in step S2), the content of the # 1 counter 31 is incremented by “1” (step S3). Then, the operational # 1 program code is expanded and stored in the operation memory 40 (step S4). Next, it is determined whether or not the # 1 program code has been successfully developed into the operation memory 40 (step S5). The determination of whether or not the expansion has succeeded is determined to be successful when the boot loader of the nonvolatile memory 20 ends normally, and is determined to be unsuccessful when the boot loader does not end normally.

展開が不成功であった場合(ステップS5でNo)、ステップS2に戻り、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the deployment is unsuccessful (No in step S5), the process returns to step S2, and it is determined whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold. It works to do it again.

展開が成功した場合(ステップS5でYes)、動作用メモリ40に展開したプログラムコードで、通信装置100の起動処理を行う(ステップS6)。そして、通信装置100の起動が成功したか否かの判定を行う(ステップS7)。起動が成功したか否かの判定は、通信装置100が、起動後に最初に行うべき動作を開始した場合に起動が成功したものと判定するようにすればよい。起動後に最初に行うべき動作とは、例えば、通信装置100がメニュー画面を表示する、といった動作のことである。   When the expansion is successful (Yes in step S5), the communication device 100 is activated with the program code expanded in the operation memory 40 (step S6). Then, it is determined whether or not the communication device 100 has been successfully activated (step S7). The determination as to whether or not the activation has succeeded may be made such that the communication device 100 determines that the activation has been successful when the operation to be performed first after the activation is started. The operation to be performed first after activation is, for example, an operation in which the communication device 100 displays a menu screen.

起動が成功しなかった場合(ステップS7でNo)、ステップS2に戻り、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the activation is not successful (No in step S7), the process returns to step S2, and it is determined again whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold value. Operates to do.

起動が成功した場合(ステップS7でYes)、#1カウンタ31の内容を「0」に戻し(ステップS8)、通信装置100の動作をそのまま継続させることにより、通信装置100に通信機能を提供させるよう動作させる(ステップS9)。   If the activation is successful (Yes in step S7), the content of the # 1 counter 31 is returned to "0" (step S8), and the communication device 100 is provided with a communication function by continuing the operation of the communication device 100 as it is. (Step S9).

なお、本実施形態においては、上述したように、展開が不成功であった場合(ステップS5でNo)や起動が成功しなかった場合(ステップS7でNo)には、ステップS2に戻るようにしている。これは、#1プログラムコードが何らかの理由により不正なプログラムコードになっていることを示しており、通信装置100を正常に起動させることができない場合を示すものである。そして、ステップS2以降の動作を繰り返すことにより、#1カウンタ31の値は、いつか閾値を超えるようになる。#1カウンタ31の値が閾値を超えた場合には、制御部50は、運用面の#1プログラムコードによる通信装置100の正常な起動に失敗したものと見なすよう動作する。そして、制御部50は、後述するように、退避面の#2プログラムコードによる通信装置100の起動に切り替えるよう動作するようになる。   In the present embodiment, as described above, if the deployment is unsuccessful (No in step S5) or the activation is not successful (No in step S7), the process returns to step S2. ing. This indicates that the # 1 program code is an illegal program code for some reason, and indicates that the communication apparatus 100 cannot be started normally. Then, by repeating the operations after step S2, the value of the # 1 counter 31 sometime exceeds the threshold value. When the value of the # 1 counter 31 exceeds the threshold value, the control unit 50 operates so as to consider that the normal activation of the communication apparatus 100 by the operational # 1 program code has failed. Then, as described later, the control unit 50 operates to switch to the activation of the communication device 100 by the # 2 program code on the save surface.

図2に戻り、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えている場合(ステップS2でYes)、退避面での起動の失敗回数を示す#2カウンタ32のチェックを行う。すなわち、#2カウンタに記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS12)。   Returning to FIG. 2, when the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold (Yes in step S2), # 2 indicates the number of activation failures on the save surface. The counter 32 is checked. That is, it is determined whether or not the number of activation failures stored in the # 2 counter exceeds a predetermined threshold (step S12).

起動の失敗回数が閾値を超えている場合(ステップS12でYes)、制御部50は動作を終了し、通信装置100の起動を行わない。この場合は、運用面と退避面のプログラムコードが共に不正なプログラムコードであったことを示している。   If the number of activation failures exceeds the threshold (Yes in step S12), the control unit 50 ends the operation and does not activate the communication device 100. In this case, it is indicated that both the operation side and the save side program codes are illegal program codes.

起動の失敗回数が閾値を超えてはいない場合(ステップS12でNo)、#2カウンタ32の内容を「1」だけインクリメントする(ステップS13)。そして、退避面の#2プログラムコードを、動作用メモリ40に展開し記憶させる(ステップS14)。次に、#2プログラムコードの動作用メモリ40への展開が成功したか否かの判定を行う(ステップS15)。   If the number of activation failures does not exceed the threshold (No in step S12), the contents of the # 2 counter 32 are incremented by “1” (step S13). Then, the # 2 program code on the saving surface is developed and stored in the operation memory 40 (step S14). Next, it is determined whether or not the # 2 program code has been successfully developed into the operation memory 40 (step S15).

展開が不成功であった場合(ステップS15でNo)、ステップS12に戻り、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the deployment is unsuccessful (No in step S15), the process returns to step S12 to determine whether or not the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold value. It works to do it again.

展開が成功した場合(ステップS15でYes)、動作用メモリ40に展開したプログラムコードで、通信装置100の起動処理を行う(ステップS16)。そして、通信装置100の起動が成功したか否かの判定を行う(ステップS17)。   If the expansion is successful (Yes in step S15), the communication device 100 is activated with the program code expanded in the operation memory 40 (step S16). Then, it is determined whether or not the communication device 100 has been successfully activated (step S17).

起動が成功しなかった場合(ステップS17でNo)、ステップS12に戻り、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the activation is not successful (No in step S17), the process returns to step S12, and it is determined again whether or not the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold value. Works to do.

起動が成功した場合(ステップS17でYes)、#2カウンタ32の内容を「0」に戻し(ステップS18)、通信装置100の動作をそのまま継続させることにより、通信装置100に通信機能を提供させるよう動作させる(ステップS19)。   If the activation is successful (Yes in step S17), the content of the # 2 counter 32 is returned to “0” (step S18), and the communication device 100 is provided with a communication function by continuing the operation of the communication device 100 as it is. (Step S19).

以上説明したように、第1の実施形態においては、制御部50は、運用面の#1プログラムコードで通信装置100が起動するか否かの監視を行っている。そして、#1プログラムコードでの通信装置100の起動が失敗した場合は、退避面の#2プログラムコードで通信装置100を起動させるよう切り替えるようになっている。従って、退避面に緊急用のプログラムコードを格納しておくことで、通信装置100を確実に起動させることが出来る。   As described above, in the first embodiment, the control unit 50 monitors whether or not the communication device 100 is activated with an operational # 1 program code. When the communication device 100 fails to start with the # 1 program code, the communication device 100 is switched to start with the # 2 program code on the save surface. Therefore, storing the emergency program code on the evacuation surface makes it possible to reliably start the communication device 100.

以上、本発明の第1の実施形態の動作について説明した。   The operation of the first embodiment of the present invention has been described above.

尚、上述した実施形態においては、通信装置100の不揮発性メモリ20は、2つのメモリ領域(#1メモリ領域21、#2メモリ領域22)を有する、として説明したが、これを以下のように変更してもよい。   In the above-described embodiment, the non-volatile memory 20 of the communication device 100 has been described as having two memory areas (# 1 memory area 21 and # 2 memory area 22). It may be changed.

すなわち、不揮発性メモリ20は複数のメモリ領域、すなわち、#1メモリ領域、#2メモリ領域、・・・、#nメモリ領域、を有するものとする。そして、複数のメモリ領域の各々には、通信装置100を動作させるためのプログラムコード、すなわち、#1プログラムコード、#2プログラムコード、・・・、#nプログラムコード、が格納される。ここで、#1プログラムコードを格納する#1メモリ領域を、運用面とする。そして、#2プログラムコードを格納する#2メモリ領域を第1優先の退避面、#3プログラムコードを格納する#3メモリ領域を第2優先の退避面、とする(以下同様)。   That is, the nonvolatile memory 20 has a plurality of memory areas, that is, a # 1 memory area, a # 2 memory area,. In each of the plurality of memory areas, program codes for operating the communication device 100, that is, # 1 program code, # 2 program code,..., #N program code are stored. Here, the # 1 memory area for storing the # 1 program code is defined as an operational aspect. The # 2 memory area for storing the # 2 program code is defined as the first priority saving plane, and the # 3 memory area for storing the # 3 program code is defined as the second priority saving plane (the same applies hereinafter).

この変更に伴い、不揮発性メモリ30は、複数のカウンタ、すなわち、#1カウンタ、#2カウンタ、・・・、#nカウンタ、を格納するように変更する。ここで、複数のカウンタ(#1カウンタ、#2カウンタ、・・・、#nカウンタ)の各々は、複数のメモリ領域(#1メモリ領域、#2メモリ領域、・・・、#nメモリ領域)の各々に対応しているものとする。   Along with this change, the nonvolatile memory 30 is changed to store a plurality of counters, that is, a # 1 counter, a # 2 counter,. Here, each of the plurality of counters (# 1 counter, # 2 counter,..., #N counter) includes a plurality of memory areas (# 1 memory area, # 2 memory area,..., #N memory area). ).

そして、通信装置100の制御部50は、通信装置100を起動する際、以下のように動作する。   And the control part 50 of the communication apparatus 100 operate | moves as follows, when starting the communication apparatus 100. FIG.

すなわち、制御部50は、運用面の#1プログラムコードで通信装置100が起動するか否かの監視を行っている。そして、#1プログラムコードでの通信装置100の起動が失敗した場合は、第1優先の退避面の#2プログラムコードで通信装置100を起動させるよう切り替える。この時さらに、制御部50は、第1優先の退避面の#2プログラムコードで通信装置100が起動するか否かの監視を行う。そして、#2プログラムコードでの通信装置100の起動が失敗した場合は、第2優先の退避面の#3プログラムコードで通信装置100を起動させるよう切り替える。以下同様に動作するようにする。   That is, the control unit 50 monitors whether or not the communication device 100 is activated with the operational # 1 program code. Then, when the activation of the communication device 100 with the # 1 program code fails, the communication device 100 is switched to be activated with the # 2 program code of the first priority saving surface. At this time, the control unit 50 further monitors whether or not the communication device 100 is activated with the # 2 program code of the first priority saving surface. Then, when the activation of the communication device 100 with the # 2 program code fails, the communication device 100 is switched to be activated with the # 3 program code of the second priority saving surface. Thereafter, the same operation is performed.

ここで、第1優先の退避面に、第1の緊急用のプログラムコードを格納し、第2優先の退避面に、第2の緊急用のプログラムコードを格納(以下同様)しておく。このようにすれば、複数の緊急用のプログラムコードで通信装置100の起動を行うことが出来るため、通信装置100を、より一層確実に起動させることが出来る。   Here, the first emergency program code is stored in the first priority saving plane, and the second emergency program code is stored in the second priority saving plane (the same applies hereinafter). In this way, since the communication device 100 can be activated with a plurality of emergency program codes, the communication device 100 can be activated more reliably.

以上説明したように、本実施形態の通信装置100は、プログラムコードを格納する複数のメモリ領域(#1メモリ領域21、#2メモリ領域22、・・・)を有する第1の不揮発性メモリ(不揮発性メモリ20)を備えている。また、前記複数のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する複数のカウンタ(#1カウンタ31、#2カウンタ32、・・・)を有する第2の不揮発性メモリ(不揮発性メモリ30)を備えている。さらに、前記複数のメモリ領域の何れかのプログラムコードを展開する動作用メモリ(動作用メモリ40)と、制御部(制御部50)を備えている。そして、制御部は、前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択し、前記運用の為のプログラムコードを前記動作用メモリに展開して動作させることにより装置の起動を行う。ここで、前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードに対応する前記複数の何れかのカウンタに格納する。そして、前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外のメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する。またさらに、外部から受信するデータを前記制御部に送出すると共に、前記制御部から出力されるデータを外部へ送信する通信部を備えている。   As described above, the communication apparatus 100 according to the present embodiment includes the first nonvolatile memory (# 1 memory area 21, # 2 memory area 22,...) Having a plurality of memory areas for storing program codes. Non-volatile memory 20) is provided. A second counter having a plurality of counters (# 1 counter 31, # 2 counter 32,...) That store the number of activation failures in the program codes of the plurality of memory areas corresponding to each of the memory areas; Non-volatile memory (non-volatile memory 30). Furthermore, an operation memory (operation memory 40) for expanding a program code in any of the plurality of memory areas and a control unit (control unit 50) are provided. The control unit selects one of the program codes in the plurality of memory areas as a program code for operation, expands the program code for operation in the operation memory, and operates the device code. Start up. Here, when the activation with the program code for the operation fails, the number of failures is stored in any one of the plurality of counters corresponding to the program code for the operation. Then, when the number of failures stored in any one of the counters exceeds a threshold, a program code in a memory area other than the memory area that stores the program code for the operation is selected as a program code for the operation To do. Furthermore, a communication unit is provided that transmits data received from the outside to the control unit and transmits data output from the control unit to the outside.

従って、本実施形態によれば、正常でないプログラムコードを使用して装置を起動させようとした場合であっても、そのプログラムコードが正常でないことを検出でき、元の正常なプログラムコードによって起動させることが可能となる。
[第2の実施形態]
次に、図1に示した第1の実施形態の変形例としての本発明による第2の実施形態について説明する。
Therefore, according to the present embodiment, even when an attempt is made to start the apparatus using an abnormal program code, it can be detected that the program code is not normal, and the original normal program code is used for starting. It becomes possible.
[Second Embodiment]
Next, a second embodiment according to the present invention will be described as a modification of the first embodiment shown in FIG.

第2の実施形態における通信装置は、第1の実施形態においては#1メモリ領域21に固定的であった運用面を、#1メモリ領域21或いは#2メモリ領域22の何れか一方に選択できるようにした点でのみ、第1の実施形態と異なるものである。   The communication apparatus according to the second embodiment can select the operation aspect that is fixed in the # 1 memory area 21 as the # 1 memory area 21 or the # 2 memory area 22 in the first embodiment. This is different from the first embodiment only in the way described above.

図3は、本発明の通信装置の第2の実施形態を示すブロック図である。図3は、図1に示した通信装置100の不揮発性メモリ30に、運用面情報記憶部33を追加した点で第1の実施形態と異なっている。従って、図3において、図1の構成要素に対応するものは同一の参照数字または符号を付し、その説明を極力省略するものとする。   FIG. 3 is a block diagram showing a second embodiment of the communication apparatus of the present invention. FIG. 3 is different from the first embodiment in that an operational information storage unit 33 is added to the nonvolatile memory 30 of the communication device 100 shown in FIG. Therefore, in FIG. 3, the same reference numerals or symbols are assigned to the components corresponding to those in FIG. 1, and the description thereof is omitted as much as possible.

図3に示す通信装置100−2は、図1と同様に、通信部10、不揮発性メモリ20、不揮発性メモリ30−2、動作用メモリ40、制御部50−2を備えている。   The communication device 100-2 illustrated in FIG. 3 includes the communication unit 10, the nonvolatile memory 20, the nonvolatile memory 30-2, the operation memory 40, and the control unit 50-2, as in FIG.

通信部10、不揮発性メモリ20、動作用メモリ40は、第1の実施形態と同様であるため、その説明を省略する。   Since the communication unit 10, the non-volatile memory 20, and the operation memory 40 are the same as those in the first embodiment, description thereof is omitted.

不揮発性メモリ30−2は、#1カウンタ31と#2カウンタ32に加え、運用面情報記憶部33を格納している。   In addition to the # 1 counter 31 and the # 2 counter 32, the nonvolatile memory 30-2 stores an operation surface information storage unit 33.

#1カウンタ31と#2カウンタ32は、第1の実施形態と同様であるため、その説明を省略する。   Since the # 1 counter 31 and the # 2 counter 32 are the same as those in the first embodiment, the description thereof is omitted.

運用面情報記憶部33は、不揮発性メモリ20の#1メモリ領域21と#2メモリ領域22の何れを運用面とするか、を定める情報を記憶する。例えば、#1メモリ領域21を運用面とする場合には、運用面情報記憶部33には#1メモリ領域21が記憶される。また、#2メモリ領域22を運用面とする場合には、運用面情報記憶部33には#2メモリ領域22が記憶される。運用面情報記憶部33に記憶されないメモリ領域は退避面であるものとして扱われるようにしている。   The operational surface information storage unit 33 stores information that determines which of the # 1 memory area 21 and the # 2 memory area 22 of the nonvolatile memory 20 is the operational surface. For example, when the # 1 memory area 21 is used as an operation surface, the operation surface information storage unit 33 stores the # 1 memory area 21. In addition, when the # 2 memory area 22 is used as an operation surface, the operation surface information storage unit 33 stores the # 2 memory area 22. A memory area that is not stored in the operation surface information storage unit 33 is treated as a retreat surface.

制御部50−2は、通信装置100−2全体の動作制御を行い、CPUを備えている。特に、制御部50−2は、第1の実施形態の制御部50の動作に加え、通信装置100−2の電源投入時に、運用面情報記憶部33を参照して、運用面が#1メモリ領域21或いは#2メモリ領域22の何れであるかを判定する。そして、運用面に格納されているプログラムコードを動作用メモリ40に展開し記憶させるよう動作する。   The control unit 50-2 controls the operation of the entire communication device 100-2 and includes a CPU. In particular, the control unit 50-2 refers to the operation surface information storage unit 33 when the communication device 100-2 is turned on in addition to the operation of the control unit 50 of the first embodiment, and the operation surface is # 1 memory. Whether the area 21 or the # 2 memory area 22 is determined. Then, the program code stored on the operation side operates to be expanded and stored in the operation memory 40.

次に、図4、図5を参照して、第2の実施形態の動作について説明する。   Next, the operation of the second embodiment will be described with reference to FIGS.

図4は、第2の実施形態の動作について説明する第1のフローチャートである。   FIG. 4 is a first flowchart for explaining the operation of the second embodiment.

なお、図4は、第2の実施形態の通信装置100−2が、外部のサーバからバージョンアップのためのプログラムコードをダウンロードし、#1メモリ領域21或いは#2メモリ領域22の何れかに格納する際の動作を示すものである。ここで、不揮発性メモリ30−2の運用面情報記憶部33には、#1メモリ領域21と#2メモリ領域22の何れを運用面とするかを定める情報が記憶されているものとする。   In FIG. 4, the communication apparatus 100-2 according to the second embodiment downloads a program code for upgrading from an external server and stores it in either the # 1 memory area 21 or the # 2 memory area 22. It shows the operation when doing. Here, it is assumed that information for determining which of the # 1 memory area 21 and the # 2 memory area 22 is to be used as the operation surface is stored in the operation surface information storage unit 33 of the nonvolatile memory 30-2.

図4において、通信装置100−2は動作中であり、外部のサーバからバージョンアップのためのプログラムコードのダウンロードを開始したものとする。通信装置100−2の制御部50−2は、先ず、運用面情報記憶部33を参照し、運用面が#1メモリ領域21になっているか否かの判定を行う(図4のステップS21)。   In FIG. 4, it is assumed that the communication apparatus 100-2 is in operation and has started downloading program code for upgrading from an external server. First, the control unit 50-2 of the communication device 100-2 refers to the operation surface information storage unit 33 and determines whether or not the operation surface is the # 1 memory area 21 (step S21 in FIG. 4). .

運用面が#1メモリ領域21になっている場合(ステップS21でYes)、制御部50−2は、外部のサーバからバージョンアップ用プログラムコードをダウンロードし、運用面ではない退避面(#2メモリ領域22)へ格納する(ステップS22)。そして、運用面を#2メモリ領域22へ変更する(ステップS23)。すなわち、制御部50−2は、運用面情報記憶部33に#2メモリ領域22を記憶する。そして、ダウンロード処理を終了する。   If the operation side is the # 1 memory area 21 (Yes in step S21), the control unit 50-2 downloads the program code for upgrading from an external server and saves the non-operation side (# 2 memory) It is stored in area 22) (step S22). Then, the operation side is changed to the # 2 memory area 22 (step S23). That is, the control unit 50-2 stores the # 2 memory area 22 in the operation surface information storage unit 33. Then, the download process ends.

一方、運用面が#1メモリ領域21になっていない場合(ステップS21でNo)、運用面は#2メモリ領域22である。そこで、制御部50−2は、外部のサーバからバージョンアップ用プログラムコードをダウンロードし、運用面ではない退避面(#1メモリ領域21)へ格納する(ステップS25)。そして、運用面を#1メモリ領域21へ変更する(ステップS26)。すなわち、制御部50−2は、運用面情報記憶部33に#1メモリ領域21を記憶する。そして、ダウンロード処理を終了する。   On the other hand, when the operation side is not the # 1 memory area 21 (No in step S21), the operation side is the # 2 memory area 22. Therefore, the control unit 50-2 downloads the program code for upgrading from an external server and stores it in the save surface (# 1 memory area 21) that is not the operation surface (step S25). Then, the operation side is changed to the # 1 memory area 21 (step S26). That is, the control unit 50-2 stores the # 1 memory area 21 in the operation side information storage unit 33. Then, the download process ends.

次に、図5を参照して、通信装置100−2の起動時の処理について説明する。   Next, with reference to FIG. 5, the process at the time of starting of the communication apparatus 100-2 will be described.

図5は、第2の実施形態の動作について説明する第2のフローチャートである。   FIG. 5 is a second flowchart for explaining the operation of the second embodiment.

図5において、図3に示した通信装置100−2の電源が投入されると(図5のステップS31)、通信装置100−2の制御部50−2は以下のように動作する。   In FIG. 5, when the communication device 100-2 shown in FIG. 3 is powered on (step S31 in FIG. 5), the control unit 50-2 of the communication device 100-2 operates as follows.

すなわち、制御部50−2は、運用面情報記憶部33を参照し、運用面が#1メモリ領域21になっているか否かの判定を行う(図5のステップS31−1)。   That is, the control unit 50-2 refers to the operation surface information storage unit 33 and determines whether or not the operation surface is the # 1 memory area 21 (step S31-1 in FIG. 5).

運用面が#1メモリ領域21になっている場合(ステップS31−1でYes)、制御部50−2は、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS32)。   When the operation side is the # 1 memory area 21 (Yes in step S31-1), the control unit 50-2 determines that the number of activation failures stored in the # 1 counter 31 is a predetermined threshold value. It is determined whether or not it exceeds (step S32).

起動の失敗回数が閾値を超えてはいない場合(ステップS32でNo)、制御部50−2は、第1の実施形態と同様に動作する。すなわち、制御部50−2は、#1カウンタ31の内容を「1」だけインクリメントする(ステップS33)。そして、運用面の#1プログラムコードを、動作用メモリ40に展開し記憶させる(ステップS34)。次に、#1プログラムコードの動作用メモリ40への展開が成功したか否かの判定を行う(ステップS35)。   When the number of activation failures does not exceed the threshold (No in step S32), the control unit 50-2 operates in the same manner as in the first embodiment. That is, the control unit 50-2 increments the content of the # 1 counter 31 by “1” (step S33). Then, the operational # 1 program code is expanded and stored in the operation memory 40 (step S34). Next, it is determined whether or not the # 1 program code has been successfully developed into the operation memory 40 (step S35).

展開が不成功であった場合(ステップS35でNo)、ステップS32に戻り、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the deployment is unsuccessful (No in step S35), the process returns to step S32 to determine whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold value. It works to do it again.

展開が成功した場合(ステップS35でYes)、動作用メモリ40に展開したプログラムコードで、通信装置100−2の起動処理を行う(ステップS36)。そして、通信装置100−2の起動が成功したか否かの判定を行う(ステップS37)。   If the expansion is successful (Yes in step S35), the communication device 100-2 is activated with the program code expanded in the operation memory 40 (step S36). Then, it is determined whether or not the communication device 100-2 has been successfully activated (step S37).

起動が成功しなかった場合(ステップS37でNo)、ステップS32に戻り、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the activation is not successful (No in step S37), the process returns to step S32, and it is determined again whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold value. Works to do.

起動が成功した場合(ステップS37でYes)、#1カウンタ31の内容を「0」に戻し(ステップS38)、通信装置100−2の動作をそのまま継続させることにより、通信装置100−2に通信機能を提供させるよう動作させる(ステップS39)。   When the activation is successful (Yes in step S37), the content of the # 1 counter 31 is returned to “0” (step S38), and the operation of the communication device 100-2 is continued as it is to communicate with the communication device 100-2. The operation is performed to provide the function (step S39).

#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えている場合(ステップS32でYes)、制御部50−2は、運用面を#2メモリ領域へ変更する(ステップS40)。すなわち、制御部50−2は、運用面情報記憶部33に#2メモリ領域22を記憶させる。そして、後述するステップS53へ進む。   When the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold (Yes in step S32), the control unit 50-2 changes the operation side to the # 2 memory area. (Step S40). That is, the control unit 50-2 stores the # 2 memory area 22 in the operation surface information storage unit 33. And it progresses to step S53 mentioned later.

運用面が#1メモリ領域21になっていない場合(ステップS31−1でNo)、運用面は#2メモリ領域22であるため、制御部50−2は、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS52)。   If the operation side is not the # 1 memory area 21 (No in step S31-1), the operation side is the # 2 memory area 22, and therefore the control unit 50-2 is stored in the # 2 counter 32. It is determined whether or not the number of activation failures exceeds a predetermined threshold value (step S52).

起動の失敗回数が閾値を超えてはいない場合(ステップS52でNo)、制御部50−2は、第1の実施形態と同様に動作する。すなわち、制御部50−2は、#2カウンタ32の内容を「1」だけインクリメントする(ステップS53)。そして、運用面の#2プログラムコードを、動作用メモリ40に展開し記憶させる(ステップS54)。次に、#2プログラムコードの動作用メモリ40への展開が成功したか否かの判定を行う(ステップS55)。   If the number of activation failures does not exceed the threshold (No in step S52), the control unit 50-2 operates in the same manner as in the first embodiment. That is, the control unit 50-2 increments the content of the # 2 counter 32 by “1” (step S53). Then, the operational # 2 program code is expanded and stored in the operation memory 40 (step S54). Next, it is determined whether or not the # 2 program code has been successfully developed into the operation memory 40 (step S55).

展開が不成功であった場合(ステップS55でNo)、ステップS52に戻り、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the deployment is unsuccessful (No in step S55), the process returns to step S52 to determine whether or not the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold. It works to do it again.

展開が成功した場合(ステップS55でYes)、動作用メモリ40に展開したプログラムコードで、通信装置100−2の起動処理を行う(ステップS56)。そして、通信装置100−2の起動が成功したか否かの判定を行う(ステップS57)。   If the expansion is successful (Yes in step S55), the communication device 100-2 is activated with the program code expanded in the operation memory 40 (step S56). Then, it is determined whether or not the communication device 100-2 has been successfully activated (step S57).

起動が成功しなかった場合(ステップS57でNo)、ステップS52に戻り、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を再度行うよう動作する。   If the activation is not successful (No in step S57), the process returns to step S52, and it is determined again whether or not the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold value. Operates to do.

起動が成功した場合(ステップS57でYes)、#2カウンタ32の内容を「0」に戻し(ステップS58)、通信装置100−2の動作をそのまま継続させることにより、通信装置100−2に通信機能を提供させるよう動作させる(ステップS59)。   If the activation is successful (Yes in step S57), the contents of the # 2 counter 32 are returned to “0” (step S58), and the communication device 100-2 is continued to operate to communicate with the communication device 100-2. The operation is performed to provide the function (step S59).

#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えている場合(ステップS52でYes)、制御部50−2は、運用面を#1メモリ領域へ変更する(ステップS60)。すなわち、制御部50−2は、運用面情報記憶部33に#1メモリ領域21を記憶させる。そして、ステップS33へ進む。   When the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold (Yes in step S52), the control unit 50-2 changes the operation side to the # 1 memory area. (Step S60). That is, the control unit 50-2 stores the # 1 memory area 21 in the operation surface information storage unit 33. Then, the process proceeds to step S33.

以上説明したように、第2の実施形態においては、制御部50−2は、運用面のプログラムコードで通信装置100−2が起動するか否かの監視を行っている。そして、運用面のプログラムコードでの通信装置100−2の起動が失敗した場合は、運用面を、それまでの退避面へ切り替えるようになっている。従って、退避面に、バージョンアップ前まで正常に動作していたプログラムコードを格納しておくことで、通信装置100−2を確実に起動させることが出来る。   As described above, in the second embodiment, the control unit 50-2 monitors whether or not the communication device 100-2 is activated with the operational program code. When the activation of the communication device 100-2 with the operational program code fails, the operational surface is switched to the previous evacuation surface. Therefore, by storing the program code that has been operating normally before the version upgrade on the save surface, the communication device 100-2 can be reliably started.

以上、本発明の第2の実施形態の動作について説明した。   The operation of the second embodiment of the present invention has been described above.

前述したように、本発明の第2の実施形態は、図1に示した第1の実施形態の通信装置100の不揮発性メモリ30に、運用面情報記憶部33を追加した点だけが異なるものである。従って、以下において第2の実施形態に特有の箇所に関してのみ説明するものとする。   As described above, the second embodiment of the present invention is different only in that an operational information storage unit 33 is added to the nonvolatile memory 30 of the communication device 100 of the first embodiment shown in FIG. It is. Therefore, only the parts peculiar to the second embodiment will be described below.

以上説明したように、本実施形態の通信装置100−2は、外部との通信を行う通信部(通信部10)を備えている。また、プログラムコードを格納する第1および第2のメモリ領域(#1メモリ領域21、#2メモリ領域22)を有する第1の不揮発性メモリ(不揮発性メモリ20)を備えている。さらに、前記第1および第2のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する第1および第2のカウンタ(#1カウンタ31、#2カウンタ32)を有する第2の不揮発性メモリ(不揮発性メモリ30−2)を備えている。またさらに、前記第1或いは第2のメモリ領域の何れか一方のプログラムコードを展開する動作用メモリ(動作用メモリ40)と、制御部(制御部50−2)を備えている。さらにまた、第2の不揮発性メモリは、さらに、第1或いは第2のメモリ領域の何れのプログラムコードを、運用の為のプログラムコードとするかを定める運用面情報記憶部を有している。   As described above, the communication device 100-2 of the present embodiment includes the communication unit (communication unit 10) that performs communication with the outside. Further, a first nonvolatile memory (nonvolatile memory 20) having first and second memory areas (# 1 memory area 21 and # 2 memory area 22) for storing program codes is provided. Further, first and second counters (# 1 counter 31 and # 2 counter 32) for storing the number of activation failures in the program codes of the first and second memory areas corresponding to the respective memory areas. A second non-volatile memory (non-volatile memory 30-2). Furthermore, an operation memory (operation memory 40) that expands the program code of either the first or second memory area and a control unit (control unit 50-2) are provided. Furthermore, the second non-volatile memory further includes an operation surface information storage unit that determines which program code in the first or second memory area is the program code for operation.

そして、前記制御部は、前記運用面情報記憶部に記憶されているメモリ領域から運用の為のプログラムコードを前記動作用メモリに展開して動作させることにより装置の起動を行う。ここで、前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードに対応する前記第1或いは第2の何れか一方のカウンタに格納する。そして、前記何れか一方のカウンタに格納された失敗回数が閾値を超えた場合に他方のメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する、よう動作する。   Then, the control unit activates the apparatus by expanding and operating the program code for operation from the memory area stored in the operation surface information storage unit in the operation memory. Here, if the activation with the program code for the operation fails, the number of failures is stored in either the first or the second counter corresponding to the program code for the operation. Then, when the number of failures stored in one of the counters exceeds a threshold value, the program code in the other memory area is selected as a program code for operation.

このことにより、運用の為のプログラムコードを、第1或いは第2のメモリ領域の何れかから選択して動作用メモリに展開することが可能となり、かつ、運用の為のプログラムコードを有するメモリ領域を変えることが可能となる。そして、バージョンアップの直前まで正常に動作していたプログラムコードを有するメモリ領域を退避面とし、運用面のメモリ領域に、バージョンアップした新たなプログラムコードを格納させることができる。つまり、運用面のメモリ領域にバージョンアップした新たなプログラムコードを格納した場合であっても、退避面のメモリ領域には、バージョンアップの直前まで正常に動作していたプログラムコードを格納することができる。   As a result, the program code for operation can be selected from either the first or second memory area and expanded in the operation memory, and the memory area having the program code for operation Can be changed. Then, the memory area having the program code that has been operating normally until immediately before the upgrade can be used as a save plane, and the new upgraded program code can be stored in the memory area on the operation side. In other words, even if a new upgraded program code is stored in the memory area on the operational side, the program code that was operating normally until immediately before the upgrade can be stored in the memory area on the save side. it can.

従って、本実施形態によれば、バージョンアップした新たなプログラムコードが正常に動作しない場合であっても、バージョンアップの直前まで正常に動作していたプログラムコードで通信装置を起動させることが可能となる。
[第3の実施形態]
次に、図1に示した第1の実施形態の変形例としての本発明による第3の実施形態について説明する。
Therefore, according to the present embodiment, even when a new upgraded program code does not operate normally, the communication device can be started with the program code that has been operating normally until immediately before the upgrade. Become.
[Third embodiment]
Next, a third embodiment according to the present invention will be described as a modification of the first embodiment shown in FIG.

図6は、本発明の通信装置の第3の実施形態を示すブロック図である。図6は、図1に示した通信装置100の制御部50に、タイマ60を追加した点でのみ、第1の実施形態と異なるものである。従って、図6において、図1の構成要素に対応するものは同一の参照数字または符号を付し、その説明を極力省略するものとする。   FIG. 6 is a block diagram showing a third embodiment of the communication apparatus of the present invention. FIG. 6 is different from the first embodiment only in that a timer 60 is added to the control unit 50 of the communication apparatus 100 shown in FIG. Therefore, in FIG. 6, the same reference numerals or symbols are assigned to the components corresponding to those in FIG. 1, and the description thereof is omitted as much as possible.

図6に示す通信装置100−3は、通信部10、不揮発性メモリ20、不揮発性メモリ30、動作用メモリ40、制御部50−3、タイマ60を備えている。   A communication device 100-3 illustrated in FIG. 6 includes a communication unit 10, a nonvolatile memory 20, a nonvolatile memory 30, an operation memory 40, a control unit 50-3, and a timer 60.

通信部10、不揮発性メモリ20、不揮発性メモリ30、動作用メモリ40は、第1の実施形態と同様であるため、その説明を省略する。   Since the communication unit 10, the non-volatile memory 20, the non-volatile memory 30, and the operation memory 40 are the same as those in the first embodiment, description thereof is omitted.

タイマ60は、計測スタート時からの経過時間を計測する。   The timer 60 measures the elapsed time from the start of measurement.

制御部50−3は、通信装置100−3全体の動作制御を行い、CPUを備えている。特に、制御部50−3は、第1の実施形態の制御部50の動作に加え、通信装置100−3の電源投入時からの経過時間をタイマ60で計測する。そして、計測した経過時間が、予め指定しておいた指定値を超えたかを判定する。指定値を超えた場合、動作用メモリ40に展開するプログラムコードを運用面から退避面に切り替えるよう動作する。   The control unit 50-3 controls the operation of the entire communication device 100-3 and includes a CPU. In particular, in addition to the operation of the control unit 50 of the first embodiment, the control unit 50-3 measures an elapsed time from when the communication device 100-3 is turned on using the timer 60. Then, it is determined whether the measured elapsed time exceeds a designated value designated in advance. When the specified value is exceeded, the program code developed in the operation memory 40 operates to switch from the operation side to the save side.

次に、第3の実施形態の動作について説明する。   Next, the operation of the third embodiment will be described.

図7は、第3の実施形態の動作について説明するフローチャートである。   FIG. 7 is a flowchart for explaining the operation of the third embodiment.

上述したように、第3の実施形態においては、制御部50−3は、通信装置100−3の電源投入時からの経過時間をタイマ60で計測する。そして、計測した経過時間が、予め指定しておいた指定値を超えたかを判定する。指定値を超えた場合、動作用メモリ40に展開するプログラムコードを運用面から退避面に切り替えるよう動作する点でのみ、第1の実施形態と異なっている。従って、図7において、第1の実施形態の動作の図2の構成要素に対応するものは同一の参照数字または符号を付し、その説明を極力省略するものとする。   As described above, in the third embodiment, the control unit 50-3 uses the timer 60 to measure the elapsed time from when the communication device 100-3 is powered on. Then, it is determined whether the measured elapsed time exceeds a designated value designated in advance. When the specified value is exceeded, it is different from the first embodiment only in that it operates so as to switch the program code developed in the operation memory 40 from the operation side to the saving side. Therefore, in FIG. 7, the same reference numerals or symbols are assigned to the components corresponding to the components in FIG. 2 of the operation of the first embodiment, and the description thereof is omitted as much as possible.

図7において、通信装置100−3の電源が投入されると(図7のステップS1)、通信装置100−3の制御部50−3は以下のように動作する。   In FIG. 7, when the power of the communication device 100-3 is turned on (step S1 in FIG. 7), the control unit 50-3 of the communication device 100-3 operates as follows.

すなわち、制御部50−3は、タイマ60による計測をスタートさせる(ステップS1−2)。そして、タイマ60の値が、予め指定しておいた指定値(例えば、「60秒」であるとする)を超えたかの判定を行う(ステップS1−3)。   That is, the control unit 50-3 starts measurement by the timer 60 (step S1-2). Then, it is determined whether or not the value of the timer 60 has exceeded a specified value specified in advance (for example, “60 seconds”) (step S1-3).

タイマ60の値が、予め指定しておいた指定値を超えていない場合(ステップS1−3でNo)、制御部50−3は、第1の実施形態で説明したと同様に、不揮発性メモリ30に記憶されている起動の失敗回数について、運用面からチェックを行う。つまり、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS2)。そして、その後は、第1の実施形態と同様の動作を行う。従って、図7のステップS3からステップS9までの動作については、以下のように説明を簡略化する。   When the value of the timer 60 does not exceed the specified value specified in advance (No in step S1-3), the control unit 50-3, as described in the first embodiment, The number of activation failures stored in 30 is checked from the operational aspect. That is, it is determined whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold (step S2). Thereafter, the same operation as in the first embodiment is performed. Therefore, the operation from step S3 to step S9 in FIG. 7 is simplified as follows.

すなわち、図7のステップS3からステップS7まで動作し、動作用メモリ40への#1プログラムコードの展開が成功し(ステップS5でYes)、かつ、動作用メモリ40のプログラムコードでの起動が成功した場合(ステップS7でYes)、以下のように動作する。つまり、第1の実施形態と同様に、制御部50−3は、通信装置100−3の動作をそのまま継続させることにより、通信装置100−3に通信機能を提供させるよう動作させる(ステップS9)。   That is, the operation from step S3 to step S7 in FIG. 7 is performed, the # 1 program code is successfully expanded to the operation memory 40 (Yes in step S5), and the activation of the operation memory 40 with the program code is successful. If so (Yes in step S7), the operation is as follows. That is, as in the first embodiment, the control unit 50-3 causes the communication device 100-3 to provide a communication function by continuing the operation of the communication device 100-3 as it is (step S9). .

一方、ステップS3からステップS7までの動作中に、動作用メモリ40への#1プログラムコードの展開が不成功であった場合(ステップS5でNo)、或いは、動作用メモリ40のプログラムコードでの起動が不成功であった場合(ステップS7でNo)、ステップS1−3に戻る。そして、タイマ60の値が、予め指定しておいた指定値を超えたかの判定を再度行うよう動作する。   On the other hand, if the development of the # 1 program code to the operation memory 40 is unsuccessful during the operation from step S3 to step S7 (No in step S5), or the program code in the operation memory 40 If the activation is unsuccessful (No in step S7), the process returns to step S1-3. Then, the timer 60 operates to determine again whether or not the value of the timer 60 has exceeded a specified value specified in advance.

タイマ60の値が、予め指定しておいた指定値を超えている場合(ステップS1−3でYes)、制御部50−3は、第1の実施形態で説明したと同様に、不揮発性メモリ30に記憶されている起動の失敗回数について、退避面でのチェックを行う。つまり、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS12)。そして、その後は、第1の実施形態と同様の動作を行う。従って、図7のステップS13からステップS19までの動作については説明を省略するものとする。   When the value of the timer 60 exceeds the specified value specified in advance (Yes in step S1-3), the control unit 50-3, as described in the first embodiment, The number of activation failures stored in 30 is checked on the save side. That is, it is determined whether or not the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold (step S12). Thereafter, the same operation as in the first embodiment is performed. Accordingly, the description of the operations from step S13 to step S19 in FIG. 7 will be omitted.

なお、図7においては、不揮発性メモリ30の#1カウンタ31及び#2カウンタ32に記憶されている起動の失敗回数をチェックしながら、動作するものとして説明した。しかし、起動の失敗回数のチェックは行わないようにしてもよい。このようにすれば、通信装置100−3の電源投入時からの経過時間が、予め指定しておいた指定値を超えた場合にだけ、動作用メモリ40に展開するプログラムコードを、運用面から退避面に切り替えるようになる。   In FIG. 7, the operation is described while checking the number of activation failures stored in the # 1 counter 31 and the # 2 counter 32 of the nonvolatile memory 30. However, the number of activation failures may not be checked. In this way, the program code to be expanded in the operation memory 40 only when the elapsed time since the power-on of the communication device 100-3 exceeds a specified value specified in advance is obtained from the operation side. Switch to the retreat surface.

上述したように、本実施形態においては、タイマ60の値が、予め指定しておいた指定値を超えた場合、運用面から退避面に切り替え、退避面のプログラムコードでの起動を行わせるよう動作する。   As described above, in the present embodiment, when the value of the timer 60 exceeds the specified value specified in advance, the operation surface is switched to the retreat surface and the revocation surface is activated with the program code. Operate.

従って、本実施形態によれば、タイマ60の値が、予め指定しておいた指定値を超えた場合、運用面から退避面に切り替え、退避面のプログラムコードでの起動を行わせるようになる。   Therefore, according to the present embodiment, when the value of the timer 60 exceeds a specified value specified in advance, the operation surface is switched to the save surface and the save surface is activated by the program code. .

以上、本発明の第3の実施形態の動作について説明した。   The operation of the third embodiment of the present invention has been described above.

前述したように、本発明の第3の実施形態の通信装置100−3の制御部50−3は、通信装置100−3の電源投入時からの経過時間をタイマ60で計測する。そして、計測した経過時間が、予め指定しておいた指定値を超えたかを判定する。指定値を超えた場合、動作用メモリ40に展開するプログラムコードを運用面から退避面に切り替えるよう動作する点でのみ、第1の実施形態と異なっている。従って、以下において第3の実施形態に特有の箇所に関してのみ説明するものとする。   As described above, the control unit 50-3 of the communication device 100-3 according to the third embodiment of the present invention measures the elapsed time from when the communication device 100-3 is turned on by the timer 60. Then, it is determined whether the measured elapsed time exceeds a designated value designated in advance. When the specified value is exceeded, it is different from the first embodiment only in that it operates so as to switch the program code developed in the operation memory 40 from the operation side to the saving side. Therefore, only the parts specific to the third embodiment will be described below.

以上説明したように、本実施形態の通信装置100−3は、外部との通信を行う通信部(通信部10)を備えている。また、プログラムコードを格納する第1および第2のメモリ領域(#1メモリ領域21、#2メモリ領域22)を有する第1の不揮発性メモリ(不揮発性メモリ20)を備えている。さらに、前記第1および第2のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する第1および第2のカウンタ(#1カウンタ31、#2カウンタ32)を有する第2の不揮発性メモリ(不揮発性メモリ30−2)を備えている。またさらに、前記第1或いは第2のメモリ領域の何れか一方のプログラムコードを展開する動作用メモリ(動作用メモリ40)と、制御部(制御部50−3)と、タイマ(タイマ60)を備えている。   As described above, the communication device 100-3 according to the present embodiment includes the communication unit (communication unit 10) that performs communication with the outside. Further, a first nonvolatile memory (nonvolatile memory 20) having first and second memory areas (# 1 memory area 21 and # 2 memory area 22) for storing program codes is provided. Further, first and second counters (# 1 counter 31 and # 2 counter 32) for storing the number of activation failures in the program codes of the first and second memory areas corresponding to the respective memory areas. A second non-volatile memory (non-volatile memory 30-2). Furthermore, an operation memory (operation memory 40) for expanding the program code of either the first or second memory area, a control unit (control unit 50-3), and a timer (timer 60) are provided. I have.

そして、前記制御部は、前記第1或いは第2のメモリ領域の何れか一方のプログラムコードを運用の為のプログラムコードとして選択すると共に、前記通信装置の電源投入時からの経過時間を前記タイマで計測する。次に、前記経過時間が予め指定しておいた指定値を超えたかを判定し、指定値を超えた場合に他方のメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する。   The control unit selects one of the program codes in the first or second memory area as a program code for operation, and uses the timer to set an elapsed time from when the communication device is turned on. measure. Next, it is determined whether or not the elapsed time exceeds a specified value specified in advance, and when the specified value is exceeded, the program code in the other memory area is selected as a program code for operation.

従って、本実施形態によれば、一方のメモリ領域のプログラムコードでの起動が、指定値で示される一定時間の間不可能となった場合、他方のメモリ領域のプログラムコードで装置を起動させることが可能となる。
[第4の実施形態]
次に、図1に示した第1の実施形態の変形例としての本発明による第4の実施形態について説明する。
Therefore, according to this embodiment, when the activation of the program code in one memory area becomes impossible for a certain time indicated by the specified value, the apparatus is activated by the program code in the other memory area. Is possible.
[Fourth Embodiment]
Next, a description will be given of a fourth embodiment according to the present invention as a modification of the first embodiment shown in FIG.

図8は、本発明の通信装置の第4の実施形態を示すブロック図である。図8は、図1に示した通信装置100の制御部50に、RTC(Real-Time Clock:リアルタイムクロック)70を追加している。また、不揮発性メモリ30には、バージョンアップ時刻記憶部34を追加している。そして、第4の実施形態は、前記した点でのみ、第1の実施形態と異なるものである。従って、図8において、図1の構成要素に対応するものは同一の参照数字または符号を付し、その説明を極力省略するものとする。   FIG. 8 is a block diagram showing a fourth embodiment of the communication apparatus of the present invention. In FIG. 8, an RTC (Real-Time Clock) 70 is added to the control unit 50 of the communication apparatus 100 shown in FIG. In addition, an upgrade time storage unit 34 is added to the nonvolatile memory 30. The fourth embodiment is different from the first embodiment only in the points described above. Therefore, in FIG. 8, the same reference numerals or symbols are assigned to the components corresponding to those in FIG. 1, and the description thereof is omitted as much as possible.

図8に示す通信装置100−4は、通信部10、不揮発性メモリ20、不揮発性メモリ30−4、動作用メモリ40、制御部50−4、RTC70を備えている。   A communication device 100-4 illustrated in FIG. 8 includes a communication unit 10, a nonvolatile memory 20, a nonvolatile memory 30-4, an operation memory 40, a control unit 50-4, and an RTC 70.

通信部10、不揮発性メモリ20、動作用メモリ40は、第1の実施形態と同様であるため、その説明を省略する。   Since the communication unit 10, the non-volatile memory 20, and the operation memory 40 are the same as those in the first embodiment, description thereof is omitted.

不揮発性メモリ30−4は、#1カウンタ31と#2カウンタ32に加え、バージョンアップ時刻記憶部34を格納している。   The nonvolatile memory 30-4 stores a version upgrade time storage unit 34 in addition to the # 1 counter 31 and the # 2 counter 32.

#1カウンタ31と#2カウンタ32は、第1の実施形態と同様であるため、その説明を省略する。   Since the # 1 counter 31 and the # 2 counter 32 are the same as those in the first embodiment, the description thereof is omitted.

バージョンアップ時刻記憶部34は、#1メモリ領域21或いは#2メモリ領域22のプログラムコードを、外部のサーバなどからダウンロードしたプログラムコードでバージョンアップした時刻、を記憶する。   The upgrade time storage unit 34 stores the time when the program code in the # 1 memory area 21 or the # 2 memory area 22 is upgraded with the program code downloaded from an external server or the like.

RTC70は、通信装置100−4の時計であり、通信装置100−4の電源が切られていても現在時刻を刻み続けるようになっている。   The RTC 70 is a clock of the communication device 100-4, and keeps the current time even when the power of the communication device 100-4 is turned off.

制御部50−4は、通信装置100−4全体の動作制御を行い、CPUを備えている。特に、制御部50−4は、第1の実施形態の制御部50の動作に加え、通信装置100−4のプログラムコードをバージョンアップした際の時刻を、バージョンアップ時刻記憶部34に記憶させる。そして、通信装置100−4の起動を、運用面のプログラムコードで行う。ここで、運用面のプログラムコードでの通信装置100−4の起動が不成功であった場合、RTC70の現在時刻を参照する。RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過している場合、制御部50−4は、退避面のプログラムコードによる通信装置100−4の起動に切り替えるよう動作する。   The control unit 50-4 controls the operation of the entire communication device 100-4 and includes a CPU. In particular, the control unit 50-4 stores the time when the program code of the communication device 100-4 is upgraded in the upgrade time storage unit 34 in addition to the operation of the control unit 50 of the first embodiment. Then, the communication device 100-4 is activated with an operational program code. Here, when the activation of the communication device 100-4 with the operational program code is unsuccessful, the current time of the RTC 70 is referred to. When the current time of the RTC 70 has elapsed in advance from the time stored in the upgrade time storage unit 34, the control unit 50-4 determines the communication device 100-4 based on the program code on the save surface. Operates to switch to startup.

次に、第4の実施形態の動作について説明する。   Next, the operation of the fourth embodiment will be described.

なお、通信装置100−4の不揮発性メモリ20の運用面(#1メモリ領域21であるものとする)には、外部のサーバから、バージョンアップのためのプログラムコードがダウンロードされているものとする。そして、不揮発性メモリ30のバージョンアップ時刻記憶部34には、バージョンアップのためのプログラムコードをダウンロードした時刻が記憶されているものとする。   It is assumed that the program code for upgrading is downloaded from an external server to the operation side of the nonvolatile memory 20 of the communication device 100-4 (assuming that it is the # 1 memory area 21). . The upgrade time storage unit 34 of the nonvolatile memory 30 stores the time when the program code for upgrading is downloaded.

図9は、第4の実施形態の動作について説明するフローチャートである。   FIG. 9 is a flowchart for explaining the operation of the fourth embodiment.

上述したように、第4の実施形態においては、制御部50−4は、通信装置100−4の起動を、運用面のプログラムコードで行う。ここで、運用面のプログラムコードでの通信装置100−4の起動が不成功であった場合、RTC70の現在時刻を参照する。RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過している場合、制御部50−4は、退避面のプログラムコードによる通信装置100−4の起動に切り替えるよう動作する点でのみ、第1の実施形態と異なっている。従って、図9において、第1の実施形態の動作の図2の構成要素に対応するものは同一の参照数字または符号を付し、その説明を極力省略するものとする。   As described above, in the fourth embodiment, the control unit 50-4 activates the communication device 100-4 with an operational program code. Here, when the activation of the communication device 100-4 with the operational program code is unsuccessful, the current time of the RTC 70 is referred to. When the current time of the RTC 70 has elapsed in advance from the time stored in the upgrade time storage unit 34, the control unit 50-4 determines the communication device 100-4 based on the program code on the save surface. It differs from the first embodiment only in that it operates to switch to activation. Therefore, in FIG. 9, the same reference numerals or symbols are assigned to the components corresponding to the components in FIG. 2 of the operation of the first embodiment, and the description thereof is omitted as much as possible.

図9において、通信装置100−4の電源が投入されると(図9のステップS1)、通信装置100−4の制御部50−4は以下のように動作する。   In FIG. 9, when the communication device 100-4 is powered on (step S1 in FIG. 9), the control unit 50-4 of the communication device 100-4 operates as follows.

すなわち、制御部50−4は、RTC70の現在時刻を参照する。RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間(例えば、「24時間」であるとする)が経過しているかの判定を行う(ステップS1−5)。   That is, the control unit 50-4 refers to the current time of the RTC 70. It is determined whether the current time of the RTC 70 has elapsed in advance from the time stored in the upgrade time storage unit 34 (for example, “24 hours”) (step S1-5). ).

予め指定した時間が経過していない場合(ステップS1−5でNo)、制御部50−4は、第1の実施形態で説明したと同様に、不揮発性メモリ30に記憶されている起動の失敗回数について、運用面からチェックを行う。つまり、#1カウンタ31に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS2)。そして、その後は、第1の実施形態と同様の動作を行う。従って、図9のステップS3からステップS9までの動作については、以下のように説明を簡略化する。   When the pre-designated time has not elapsed (No in step S1-5), the control unit 50-4 fails in the activation stored in the nonvolatile memory 30 as described in the first embodiment. Check the number of operations from the operational aspect. That is, it is determined whether or not the number of activation failures stored in the # 1 counter 31 exceeds a predetermined threshold (step S2). Thereafter, the same operation as in the first embodiment is performed. Accordingly, the operation from step S3 to step S9 in FIG. 9 is simplified as follows.

すなわち、図9のステップS3からステップS7まで動作し、動作用メモリ40への#1プログラムコードの展開が成功し(ステップS5でYes)、かつ、動作用メモリ40のプログラムコードでの起動が成功した場合(ステップS7でYes)、以下のように動作する。つまり、第1の実施形態と同様に、制御部50−4は、通信装置100−4の動作をそのまま継続させることにより、通信装置100−4に通信機能を提供させるよう動作させる(ステップS9)。   That is, the operation from step S3 to step S7 of FIG. 9 is performed, the # 1 program code is successfully expanded to the operation memory 40 (Yes in step S5), and the activation of the operation memory 40 with the program code is successful If so (Yes in step S7), the operation is as follows. That is, as in the first embodiment, the control unit 50-4 causes the communication device 100-4 to provide a communication function by continuing the operation of the communication device 100-4 as it is (step S9). .

一方、ステップS3からステップS7までの動作中に、動作用メモリ40への#1プログラムコードの展開が不成功であった場合(ステップS5でNo)、或いは、動作用メモリ40のプログラムコードでの起動が不成功であった場合(ステップS7でNo)、ステップS1−5に戻る。そして、RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過しているかの判定を再度行うよう動作する。RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過している場合(ステップS1−5でYes)、制御部50−4は、第1の実施形態で説明したと同様の動作を行う。すなわち、制御部50−4は、不揮発性メモリ30に記憶されている起動の失敗回数について、退避面でのチェックを行う。つまり、#2カウンタ32に記憶されている起動の失敗回数が、予め定めておいた閾値を超えているか否かの判定を行う(ステップS12)。そして、その後は、第1の実施形態と同様の動作を行う。従って、図9のステップS13からステップS19までの動作については説明を省略するものとする。   On the other hand, if the development of the # 1 program code to the operation memory 40 is unsuccessful during the operation from step S3 to step S7 (No in step S5), or the program code in the operation memory 40 If the activation is unsuccessful (No in step S7), the process returns to step S1-5. Then, the current time of the RTC 70 operates to determine again whether or not a predetermined time has elapsed from the time stored in the upgrade time storage unit 34. When the current time of the RTC 70 has elapsed in advance from the time stored in the upgrade time storage unit 34 (Yes in step S1-5), the control unit 50-4 performs the first implementation. The same operation as described in the embodiment is performed. That is, the control unit 50-4 performs a check on the save surface with respect to the number of activation failures stored in the nonvolatile memory 30. That is, it is determined whether or not the number of activation failures stored in the # 2 counter 32 exceeds a predetermined threshold (step S12). Thereafter, the same operation as in the first embodiment is performed. Accordingly, the description of the operations from step S13 to step S19 in FIG. 9 will be omitted.

なお、図9においては、不揮発性メモリ30の#1カウンタ31及び#2カウンタ32に記憶されている起動の失敗回数をチェックしながら、動作するものとして説明した。しかし、起動の失敗回数のチェックは行わないようにしてもよい。このようにすれば、通信装置100−4の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過している場合にだけ、動作用メモリ40に展開するプログラムコードを、運用面から退避面に切り替えるようになる。   In FIG. 9, the operation is described while checking the number of activation failures stored in the # 1 counter 31 and the # 2 counter 32 of the nonvolatile memory 30. However, the number of activation failures may not be checked. In this way, the current time of the communication device 100-4 is expanded in the operation memory 40 only when a predesignated time has elapsed from the time stored in the upgrade time storage unit 34. The program code is switched from the operation side to the saving side.

上述したように、本実施形態においては、RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過している場合、運用面から退避面に切り替え、退避面のプログラムコードでの起動を行わせるよう動作する。   As described above, in the present embodiment, when the current time of the RTC 70 has elapsed in advance from the time stored in the upgrade time storage unit 34, the operation surface is switched to the retraction surface, Operates to start with the program code on the save side.

従って、本実施形態によれば、RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過している場合、運用面から退避面に切り替え、退避面のプログラムコードでの起動を行わせるようになる。   Therefore, according to the present embodiment, when the current time of the RTC 70 has elapsed in advance from the time stored in the upgrade time storage unit 34, the operation surface is switched to the retraction surface, and the retraction surface It will be started with the program code.

以上、本発明の第4の実施形態の動作について説明した。   The operation of the fourth embodiment of the present invention has been described above.

前述したように、本発明の第4の実施形態の通信装置100−4の制御部50−4は、RTC70の現在時刻が、バージョンアップ時刻記憶部34に記憶されている時刻から、予め指定した時間が経過しているかの判定を行う。予め指定した時間が経過している場合、制御部50−4は、動作用メモリ40に展開するプログラムコードを運用面から退避面に切り替え、退避面のプログラムコードでの起動を行わせるよう動作する点でのみ、第1の実施形態と異なっている。従って、以下において第4の実施形態に特有の箇所に関してのみ説明するものとする。   As described above, the control unit 50-4 of the communication device 100-4 according to the fourth embodiment of the present invention designates the current time of the RTC 70 in advance from the time stored in the upgrade time storage unit 34. Determine if the time has passed. When the predesignated time has elapsed, the control unit 50-4 operates to switch the program code developed in the operation memory 40 from the operation surface to the retreat surface and to start the program code on the retreat surface. Only in the point, it differs from 1st Embodiment. Therefore, only the parts peculiar to the fourth embodiment will be described below.

以上説明したように、本実施形態の通信装置100−4は、外部との通信を行う通信部(通信部10)を備えている。また、プログラムコードを格納する第1および第2のメモリ領域(#1メモリ領域21、#2メモリ領域22)を有する第1の不揮発性メモリ(不揮発性メモリ20)を備えている。さらに、前記第1および第2のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する第1および第2のカウンタ(#1カウンタ31、#2カウンタ32)を有する第2の不揮発性メモリ(不揮発性メモリ30−2)を備えている。またさらに、前記第1或いは第2のメモリ領域の何れか一方のプログラムコードを展開する動作用メモリ(動作用メモリ40)と、制御部(制御部50−4)と、リアルタイムクロック(RTC70)を備えている。   As described above, the communication device 100-4 of the present embodiment includes the communication unit (communication unit 10) that performs communication with the outside. Further, a first nonvolatile memory (nonvolatile memory 20) having first and second memory areas (# 1 memory area 21 and # 2 memory area 22) for storing program codes is provided. Further, first and second counters (# 1 counter 31 and # 2 counter 32) for storing the number of activation failures in the program codes of the first and second memory areas corresponding to the respective memory areas. A second non-volatile memory (non-volatile memory 30-2). Still further, an operation memory (operation memory 40) for expanding the program code of either the first or second memory area, a control unit (control unit 50-4), and a real-time clock (RTC 70) are provided. I have.

そして、前記制御部は、前記第1或いは第2のメモリ領域の何れか一方のプログラムコードを運用の為のプログラムコードとして選択すると共に、前記リアルタイムクロックの現在時刻を参照する。そして、前記リアルタイムクロックの現在時刻が、バージョンアップ時刻から予め指定した時間が経過しているかを判定する。指定した時間が経過している場合、他方のメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する。   Then, the control unit selects one of the program codes in the first or second memory area as a program code for operation, and refers to the current time of the real-time clock. Then, it is determined whether or not the current time of the real time clock has elapsed in advance from the upgrade time. If the specified time has elapsed, the program code in the other memory area is selected as the program code for operation.

従って、本実施形態によれば、一方のメモリ領域のプログラムコードでの起動が、バージョンアップ時刻から予め指定した時間不可能となった場合、他方のメモリ領域のプログラムコードで装置を起動させることが可能となる。   Therefore, according to the present embodiment, when the activation with the program code in one memory area becomes impossible for a predetermined time from the upgrade time, the apparatus can be activated with the program code in the other memory area. It becomes possible.

10 通信部
20 不揮発性メモリ
21 #1メモリ領域
22 #2メモリ領域
30 不揮発性メモリ
31 #1カウンタ
32 #2カウンタ
33 運用面情報記憶部
34 バージョンアップ時刻記憶部
40 動作用メモリ
50 制御部
60 タイマ
70 RTC
100 通信装置
DESCRIPTION OF SYMBOLS 10 Communication part 20 Non-volatile memory 21 # 1 memory area 22 # 2 memory area 30 Non-volatile memory 31 # 1 counter 32 # 2 counter 33 Operation side information storage part 34 Version upgrade time storage part 40 Operation memory 50 Control part 60 Timer 70 RTC
100 Communication device

Claims (4)

プログラムコードを格納する複数のメモリ領域を有する第1の不揮発性メモリと、
前記複数のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する複数のカウンタを有する第2の不揮発性メモリと、
前記複数のメモリ領域の何れかのプログラムコードを展開する動作用メモリと、
前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択し、前記運用の為のプログラムコードを前記動作用メモリに展開して動作させることにより装置の起動を行い、前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードを格納していたメモリ領域に対応する前記複数の何れかのカウンタに格納し、前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する制御部と、
外部から受信するデータを前記制御部に送出すると共に、前記制御部から出力されるデータを外部へ送信する通信部と、
タイマと
を備え、
前記制御部は、前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択すると共に、前記通信装置の電源投入時からの経過時間を前記タイマで計測し、前記経過時間が予め指定しておいた指定値を超えたかを判定し、指定値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する、
ことを特徴とする通信装置。
A first non-volatile memory having a plurality of memory areas for storing program codes;
A second non-volatile memory having a plurality of counters for storing the number of activation failures in the program codes of the plurality of memory areas corresponding to each of the memory areas;
An operation memory for developing a program code in any of the plurality of memory areas;
The program code in one of the plurality of memory areas is selected as a program code for operation, the program code for operation is expanded and operated in the operation memory, and the apparatus is started up. When the activation with the program code for the operation fails, the number of failures is stored in any one of the plurality of counters corresponding to the memory area in which the program code for the operation is stored. A control unit that selects a program code in any memory area other than the memory area storing the program code for the operation as the program code for the operation when the number of failures stored in the memory exceeds a threshold; ,
A communication unit for sending data received from the outside to the control unit, and transmitting data output from the control unit to the outside,
With timer
With
The control unit selects any one of the plurality of memory areas as a program code for operation, and measures an elapsed time from power-on of the communication device with the timer, and the elapsed time It is determined whether or not the specified value specified in advance is exceeded, and if the specified value is exceeded, the program code in any memory area other than the memory area that stores the program code for the operation is operated. Select as program code,
A communication device.
プログラムコードを格納する複数のメモリ領域を有する第1の不揮発性メモリと、
前記複数のメモリ領域のプログラムコードでの起動の失敗回数を前記メモリ領域のそれぞれに対応して格納する複数のカウンタを有する第2の不揮発性メモリと、
前記複数のメモリ領域の何れかのプログラムコードを展開する動作用メモリと、
前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択し、前記運用の為のプログラムコードを前記動作用メモリに展開して動作させることにより装置の起動を行い、前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードを格納していたメモリ領域に対応する前記複数の何れかのカウンタに格納し、前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する制御部と、
外部から受信するデータを前記制御部に送出すると共に、前記制御部から出力されるデータを外部へ送信する通信部と、
リアルタイムクロック
を備え、
前記制御部は、前記複数のメモリ領域の何れか一方のプログラムコードを運用の為のプログラムコードとして選択すると共に、前記リアルタイムクロックの現在時刻を参照し、前記リアルタイムクロックの現在時刻が、前記運用の為のプログラムコードをバージョンアップした時刻から予め指定した時間が経過しているかを判定し、指定した時間が経過している場合、前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する、
ことを特徴とする通信装置。
A first non-volatile memory having a plurality of memory areas for storing program codes;
A second non-volatile memory having a plurality of counters for storing the number of activation failures in the program codes of the plurality of memory areas corresponding to each of the memory areas;
An operation memory for developing a program code in any of the plurality of memory areas;
The program code in one of the plurality of memory areas is selected as a program code for operation, the program code for operation is expanded and operated in the operation memory, and the apparatus is started up. When the activation with the program code for the operation fails, the number of failures is stored in any one of the plurality of counters corresponding to the memory area in which the program code for the operation is stored. A control unit that selects a program code in any memory area other than the memory area storing the program code for the operation as the program code for the operation when the number of failures stored in the memory exceeds a threshold; ,
A communication unit for sending data received from the outside to the control unit, and transmitting data output from the control unit to the outside,
Real time clock and
With
The control unit selects a program code of any one of the plurality of memory areas as a program code for operation, refers to the current time of the real-time clock, and the current time of the real-time clock It is determined whether a predetermined time has elapsed from the time when the program code for upgrading has been upgraded, and if the specified time has elapsed, any one other than the memory area storing the program code for the operation Select the program code of the memory area as the program code for operation,
Communication device you wherein a.
複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択し、
前記運用の為のプログラムコードを動作用メモリに展開して動作させることにより装置の起動を行い、
前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードを格納していたメモリ領域に対応する複数の何れかのカウンタに格納し、
前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択し、
前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択すると共に、前記装置の電源投入時からの経過時間を計測し、
前記経過時間が予め指定しておいた指定値を超えたかを判定し、
指定値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する、
ことを特徴とする起動プログラムコード選択方法。
Select one of the program codes in multiple memory areas as the program code for operation,
The apparatus is activated by expanding and operating the program code for the operation in the operation memory,
When activation with the program code for the operation fails, the number of failures is stored in any one of a plurality of counters corresponding to the memory area in which the program code for the operation was stored,
When the number of failures stored in any one of the counters exceeds a threshold, the program code in any memory area other than the memory area that stores the program code for the operation is used as the program code for the operation. selected,
Selecting any one of the plurality of memory areas as a program code for operation, and measuring an elapsed time from power-on of the device;
It is determined whether the elapsed time exceeds a specified value specified in advance,
When a specified value is exceeded, select a program code in any memory area other than the memory area that stores the program code for the operation as a program code for the operation.
A method for selecting a startup program code.
複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択し、
前記運用の為のプログラムコードを動作用メモリに展開して動作させることにより装置の起動を行い、
前記運用の為のプログラムコードでの起動が失敗した場合その失敗回数を、前記運用の為のプログラムコードを格納していたメモリ領域に対応する複数の何れかのカウンタに格納し、
前記何れかのカウンタに格納された失敗回数が閾値を超えた場合に前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択し、
前記複数のメモリ領域の何れかのプログラムコードを運用の為のプログラムコードとして選択すると共に、前記装置の現在時刻を参照し、
前記現在時刻が、前記運用の為のプログラムコードをバージョンアップした時刻から予め指定した時間が経過しているかを判定し、
指定した時間が経過している場合、前記運用のためのプログラムコードを格納していたメモリ領域以外の何れかのメモリ領域のプログラムコードを運用の為のプログラムコードとして選択する、
ことを特徴とする起動プログラムコード選択方法。
Select one of the program codes in multiple memory areas as the program code for operation,
The apparatus is activated by expanding and operating the program code for the operation in the operation memory,
When activation with the program code for the operation fails, the number of failures is stored in any one of a plurality of counters corresponding to the memory area in which the program code for the operation was stored,
When the number of failures stored in any one of the counters exceeds a threshold, the program code in any memory area other than the memory area that stores the program code for the operation is used as the program code for the operation. Selected,
Selecting one of the plurality of memory areas as a program code for operation, and referring to the current time of the device;
The current time is determined whether a predetermined time has elapsed from the time when the program code for the operation is upgraded,
If the specified time has elapsed, select a program code in one of the memory areas other than the memory area that stores the program code for the operation as a program code for the operation.
Start program code selection how to characterized in that.
JP2012137661A 2012-06-19 2012-06-19 Communication device and activation program code selection method Active JP5658200B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012137661A JP5658200B2 (en) 2012-06-19 2012-06-19 Communication device and activation program code selection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012137661A JP5658200B2 (en) 2012-06-19 2012-06-19 Communication device and activation program code selection method

Publications (2)

Publication Number Publication Date
JP2014003472A JP2014003472A (en) 2014-01-09
JP5658200B2 true JP5658200B2 (en) 2015-01-21

Family

ID=50036255

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012137661A Active JP5658200B2 (en) 2012-06-19 2012-06-19 Communication device and activation program code selection method

Country Status (1)

Country Link
JP (1) JP5658200B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017183387A1 (en) 2016-04-18 2017-10-26 オリンパス株式会社 Battery-driven medical device
WO2020032122A1 (en) * 2018-08-10 2020-02-13 株式会社デンソー Electronic control device, vehicular electronic control system, rewriting execution control method, rewriting execution control program, and data structure of specification data
JPWO2023182334A1 (en) * 2022-03-25 2023-09-28

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222366A (en) * 2004-02-06 2005-08-18 Nippon Telegr & Teleph Corp <Ntt> Automatic return method / program / program recording medium, processing device

Also Published As

Publication number Publication date
JP2014003472A (en) 2014-01-09

Similar Documents

Publication Publication Date Title
JP6585072B2 (en) Safe reading of data into non-volatile memory or secure elements
JP2002333990A (en) Program updating device and program updating method
CN101610499A (en) Upgrade method and system for wireless data card
CN104636171A (en) Upgrading method and device and mobile device
US11106450B2 (en) Information extraction apparatus, and automatic firmware update system and method for embedded system
KR20130142073A (en) Method and terminal for using mobile memory card to boot up mobile phone operating system
JP5658200B2 (en) Communication device and activation program code selection method
WO2018024198A1 (en) Application upgrade method and system for set-top box, and set-top box
JP2001331327A (en) Electronics
JP5167936B2 (en) Information processing device
CN110908722B (en) Method and device applied to starting of operating system, electronic equipment and storage medium
CN119597538A (en) System updating method, device, electronic device and storage medium
JP2012212415A (en) Wireless base station device
JP2010079382A (en) Software update method
CN115951920A (en) Mobile equipment upgrading method and device, storage unit and mobile equipment
CN111078303A (en) Method and device for optimizing UEFI (unified extensible firmware interface) boot startup
WO2020043361A1 (en) Installing application program code on a vehicle control system
JP2007122151A (en) Boot controller and boot control method
CN110069272A (en) The method and electronic equipment of logical file upgrading
CN115373715A (en) Method, device and equipment for rescuing abnormal brick during equipment brushing and readable storage medium
KR101386464B1 (en) Application program download apparatus and method for touch panel in mobile terminal
JP5002900B2 (en) Control device, its program, and program download method
JP2018197993A (en) TERMINAL DEVICE, SERVER DEVICE, TERMINAL DEVICE CONTROL PROGRAM, SERVER DEVICE CONTROL METHOD, AND SYSTEM
KR100588199B1 (en) How to recover program download failure in mobile device and mobile device
JP2005128613A (en) Image forming device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140409

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140605

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20140725

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: 20141104

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141127

R150 Certificate of patent or registration of utility model

Ref document number: 5658200

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150