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
JP4846305B2 - Flash memory write control method and program - Google Patents
[go: Go Back, main page]

JP4846305B2 - Flash memory write control method and program - Google Patents

Flash memory write control method and program Download PDF

Info

Publication number
JP4846305B2
JP4846305B2 JP2005258090A JP2005258090A JP4846305B2 JP 4846305 B2 JP4846305 B2 JP 4846305B2 JP 2005258090 A JP2005258090 A JP 2005258090A JP 2005258090 A JP2005258090 A JP 2005258090A JP 4846305 B2 JP4846305 B2 JP 4846305B2
Authority
JP
Japan
Prior art keywords
setting information
write
grace
flash memory
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2005258090A
Other languages
Japanese (ja)
Other versions
JP2007072696A (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.)
Fujikura Ltd
Oki Electric Industry Co Ltd
Original Assignee
Fujikura Ltd
Oki Electric Industry Co 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 Fujikura Ltd, Oki Electric Industry Co Ltd filed Critical Fujikura Ltd
Priority to JP2005258090A priority Critical patent/JP4846305B2/en
Publication of JP2007072696A publication Critical patent/JP2007072696A/en
Application granted granted Critical
Publication of JP4846305B2 publication Critical patent/JP4846305B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

この発明は、フラッシュメモリの書込み制御方法及びプログラムに関するものである。   The present invention relates to a flash memory write control method and program.

従来から、通信手段を備える端末装置が、当該端末装置間の通信についての設定を行う中継装置に接続され、さらに、中継装置は管理装置に接続されて、管理装置において中継装置を管理する遠隔管理システムが提案されている(例えば、特許文献1参照)。このような遠隔管理システムでは、端末装置間の通信速度や、暗号化情報などの設定情報が、管理装置から中継装置に送られる。中継装置では、受信した設定情報に基づいて端末装置間の通信についての設定を行う。このとき、中継装置が管理装置から設定情報を受信した後に、中継装置で電源が切断された場合であっても、中継装置の起動後には、中継装置の電源が切断される前に受信した最新の設定情報に基づいて、中継装置の設定が行われるようにするのが良い。このため、上述した従来の中継装置では、設定情報を受信すると、当該受信に応答して、中継装置が備えるフラッシュメモリに設定情報が書き込まれる。   Conventionally, a terminal device including a communication unit is connected to a relay device that performs settings for communication between the terminal devices, and the relay device is connected to a management device so that the management device manages the relay device. A system has been proposed (see, for example, Patent Document 1). In such a remote management system, communication information between terminal devices and setting information such as encryption information are sent from the management device to the relay device. The relay device performs settings for communication between terminal devices based on the received setting information. At this time, even if the relay device is turned off after receiving the setting information from the management device, after the relay device is started, the latest information received before the relay device is turned off It is preferable that the relay device is set based on the setting information. For this reason, in the conventional relay device described above, when the setting information is received, the setting information is written in the flash memory included in the relay device in response to the reception.

図7を参照して、上述した従来の中継装置でのフラッシュメモリへの書き込みについて説明する。図7(A)は、中継装置が受信する設定情報を示していて、図7(B)は、従来の中継装置でのフラッシュメモリの消去動作を示していて、図7(C)は、フラッシュメモリへの書込み動作を示している。ここでは、中継装置が、設定情報a、b、c、d、e及びfを1.3秒おきに受信する例を示していて、フラッシュメモリの消去にかかる時間を1秒としている。また、フラッシュメモリへの書込みにかかる時間は数100μ秒程度である。   With reference to FIG. 7, the writing to the flash memory in the above-described conventional relay device will be described. 7A shows the setting information received by the relay device, FIG. 7B shows the erase operation of the flash memory in the conventional relay device, and FIG. 7C shows the flash memory. A write operation to the memory is shown. Here, an example is shown in which the relay device receives the setting information a, b, c, d, e, and f every 1.3 seconds, and the time taken to erase the flash memory is 1 second. The time required for writing to the flash memory is about several hundreds of microseconds.

中継装置は、設定情報aの受信に応答して、設定情報aをRAMに書込むとともに、フラッシュメモリの消去を行い、フラッシュメモリの消去後に、フラッシュメモリに設定情報aを書込む。続いて、設定情報bを受信すると、中継装置は、設定情報bの受信に応答して、設定情報bをRAMに書込むとともに、フラッシュメモリの消去を行い、フラッシュメモリの消去後に、フラッシュメモリにRAMに書き込まれている設定情報aと設定情報bを書込む。このように、上述した従来の中継装置では、設定情報を受信する都度、フラッシュメモリに書き込む直前までにRAMに書き込まれている全ての設定情報が、フラッシュメモリに書き込まれる。
特開2004−30625号公報
In response to receiving the setting information a, the relay device writes the setting information a into the RAM, erases the flash memory, and writes the setting information a into the flash memory after erasing the flash memory. Subsequently, when receiving the setting information b, the relay apparatus writes the setting information b into the RAM and erases the flash memory in response to the reception of the setting information b, and after erasing the flash memory, The setting information a and the setting information b written in the RAM are written. In this way, in the above-described conventional relay device, every time setting information is received, all the setting information written in the RAM immediately before the writing into the flash memory is written into the flash memory.
JP 2004-30625 A

上述した従来の遠隔管理システムの中継装置は、設定情報を受信すると、設定情報を正常に受信した旨の確認信号を管理装置に送信する。管理装置では、設定情報を送信した後、一定時間の間に中継装置から確認信号を受信しない場合は、中継装置において設定情報が受信されなかったと判定し、再度、設定情報を中継装置に送信する。このため、例えば、管理装置と中継装置の間のネットワーク障害などのために、管理装置が中継装置からの確認信号を受信できない場合は、一定時間毎に連続的に設定情報の送信を行うことになる。   When the relay device of the conventional remote management system described above receives the setting information, the relay device transmits a confirmation signal indicating that the setting information has been normally received to the management device. If the management apparatus does not receive a confirmation signal from the relay apparatus for a certain time after transmitting the setting information, the management apparatus determines that the setting information has not been received by the relay apparatus and transmits the setting information to the relay apparatus again. . For this reason, for example, when the management device cannot receive a confirmation signal from the relay device due to a network failure between the management device and the relay device, the setting information is continuously transmitted at regular intervals. Become.

しかしながら、一般にフラッシュメモリはデータの書き込み回数に上限があり、その上限は100,000回程度である。このため、中継装置が連続的に設定情報を受信すると、データの書き込み回数が、すぐに、上限に達してフラッシュメモリが壊れる恐れがある。   However, in general, a flash memory has an upper limit on the number of data writes, and the upper limit is about 100,000 times. For this reason, if the relay device continuously receives the setting information, the number of data write operations may soon reach the upper limit and the flash memory may be damaged.

この発明は、上述の問題点に鑑みてなされたものであり、この発明の目的は、フラッシュメモリの書き込み回数を減少させる、フラッシュメモリの書込み制御方法及びプログラムを提供することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a flash memory write control method and program that reduce the number of times the flash memory is written.

上述した目的を達成するために、この発明のフラッシュメモリの書込み制御方法は、複数の端末装置に接続され、及び、端末装置間の通信についての設定情報を管理装置から取得する中継装置で、中継装置が備えるフラッシュメモリに設定情報を書き込むにあたり実施され、以下の過程を備えている。   In order to achieve the above-described object, a flash memory write control method according to the present invention is a relay device that is connected to a plurality of terminal devices and acquires setting information about communication between terminal devices from a management device. This process is performed when setting information is written in a flash memory included in the apparatus, and includes the following steps.

先ず、管理装置から受信した情報が設定情報であるか否かの判定を行い、判定の結果、受信した情報が設定情報であるときは、当該情報を、中継装置が備えるRAMに保存する。次に、受信した情報が設定情報である旨の判定に応答して、中継装置が備える書込み猶予タイマをリセットした後、スタートさせる。次に、書込み猶予タイマで計時される待機時間が、中継装置が備えるROMに予め記憶された書込み猶予時間に達したか否かの判定を繰り返し行う。待機時間が書込み猶予時間に達したときは、RAMに保存された設定情報をフラッシュメモリに書き込む。   First, it is determined whether or not the information received from the management apparatus is setting information. If the received information is setting information as a result of the determination, the information is stored in a RAM included in the relay apparatus. Next, in response to the determination that the received information is the setting information, the write grace timer included in the relay apparatus is reset and then started. Next, it is repeatedly determined whether the waiting time counted by the write grace timer has reached the write grace time stored in advance in the ROM included in the relay device. When the standby time reaches the write grace time, the setting information stored in the RAM is written into the flash memory.

上述したフラッシュメモリの書込み制御方法の実施にあたり、好ましくは、待機時間が書込み猶予時間に達するまでに、新たに設定情報である情報を受信したときは、書込み猶予タイマをリセットした後、スタートさせるのが良い。   In implementing the flash memory write control method described above, it is preferable to start after resetting the write grace timer when new information is received before the standby time reaches the write grace time. Is good.

また、上述した各方法を実施するためのプログラムは、複数の端末装置に接続され、及び、端末装置間の通信についての設定情報を管理装置から取得する、フラッシュメモリを備える中継装置が具備するコンピュータで実行され、以下の機能をコンピュータに実現させる。   A program for executing each of the above-described methods is a computer that is connected to a plurality of terminal devices and that includes a relay device including a flash memory that acquires setting information regarding communication between the terminal devices from the management device. The following functions are implemented on the computer.

第1の機能として、管理装置から受信した情報が設定情報であるか否かの判定を行い、判定の結果、受信した情報が設定情報であるときは、当該情報を、中継装置が備えるRAMに保存する。第2の機能として、受信した情報が設定情報である旨の判定に応答して、中継装置が備える書込み猶予タイマをリセットした後、スタートさせる。第3の機能として、書込み猶予タイマで計時される待機時間が、中継装置が備えるROMに予め記憶された書込み猶予時間に達したか否かの判定を繰り返し行う。第4の機能として、待機時間が書込み猶予時間に達したときは、RAMに保存された設定情報をフラッシュメモリに書き込む。   As a first function, it is determined whether or not the information received from the management apparatus is setting information. If the received information is setting information as a result of the determination, the information is stored in a RAM included in the relay apparatus. save. As a second function, in response to the determination that the received information is the setting information, the write grace timer included in the relay apparatus is reset and then started. As a third function, it is repeatedly determined whether or not the standby time counted by the write grace timer has reached the write grace time stored in advance in the ROM included in the relay apparatus. As a fourth function, when the standby time reaches the write grace time, the setting information stored in the RAM is written to the flash memory.

また、この発明のフラッシュメモリの書込み制御を行うプログラムの好適実施形態によれば、待機時間が書込み猶予時間に達するまでに、新たに設定情報である情報を受信したときは、書込み猶予タイマをリセットした後、スタートさせる機能をコンピュータに実現させるのが良い。   Further, according to a preferred embodiment of the program for performing write control of the flash memory according to the present invention, when new information is received before the standby time reaches the write grace time, the write grace timer is reset. After that, it is better to make the computer start the function.

この発明のフラッシュメモリの書込み制御方法によれば、フラッシュメモリへの書き込みを開始する前に書込み猶予時間を設けているので、連続的に設定情報を受信した場合であっても、書込み猶予時間内に受信した設定情報を一旦RAMに格納しておいて、書込み猶予時間経過後に、それまでにRAMに格納されている全ての設定情報を一括してフラッシュメモリに書き込めるので、フラッシュメモリへの書込み回数を減らすことができる。   According to the flash memory write control method of the present invention, since the write grace time is provided before the writing to the flash memory is started, even if the setting information is continuously received, the write grace time is not exceeded. Once the setting information received in the RAM is temporarily stored in the RAM and all the setting information stored in the RAM can be written to the flash memory at the same time after the write grace time has elapsed, the number of writes to the flash memory Can be reduced.

また、書込み猶予時間中に新たに設定情報を受信したときに、書込み猶予タイマをリセットした後に、スタートする構成にすると、実質的に書込み猶予時間が延長されることになるので、その延長された書込み猶予時間内に受信した設定情報のフラッシュメモリへの書き込みを、延長された書込み猶予時間経過後に一括して行うので、フラッシュメモリへの書込み回数をさらに減らすことができる。   In addition, when a new setting information is received during the write grace period, the write grace period will be substantially extended if the configuration is started after resetting the write grace timer. Since the setting information received within the write grace time is collectively written after the extended write grace time has elapsed, the number of times of writing to the flash memory can be further reduced.

さらに、上述した各方法を実施するためのプログラムによれば、情報記録媒体(パッケージソフトウエアなど)や通信ネットワーク上からのダウンロード/インストールを通じて、上述した方法の発明の実施を可能とする。   Furthermore, according to the program for implementing each of the above-described methods, the invention of the above-described method can be implemented through download / installation from an information recording medium (such as package software) or a communication network.

以下、図を参照して、この発明の実施の形態について説明するが、各構成要素及び配置関係についてはこの発明が理解できる程度に概略的に示したものに過ぎない。また、以下、この発明の好適な構成例につき説明するが、数値的条件などは、単なる好適例にすぎない。従って、この発明は以下の実施の形態に限定されない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, each component and the arrangement relationship are merely schematically shown to the extent that the present invention can be understood. In the following, a preferred configuration example of the present invention will be described. However, numerical conditions and the like are merely preferred examples. Therefore, the present invention is not limited to the following embodiment.

(遠隔管理システムの構成)
図1は、この発明のフラッシュメモリの書込み制御が行われる、遠隔管理システムを説明するための概念図である。中継装置100は、複数の、電子装置である端末装置10に接続されていて、端末装置10間の通信を中継する。また、中継装置100は、公衆回線網(又は、インタネット等)20を介して管理装置30に接続されていて、管理装置30から取得する端末装置10間の通信速度や、暗号化情報などの設定情報に基づいて、端末装置10間の通信についての設定を行う。
(Configuration of remote management system)
FIG. 1 is a conceptual diagram for explaining a remote management system in which write control of a flash memory according to the present invention is performed. The relay device 100 is connected to a plurality of terminal devices 10 that are electronic devices, and relays communication between the terminal devices 10. In addition, the relay device 100 is connected to the management device 30 via the public network (or the Internet) 20 and sets the communication speed between the terminal devices 10 acquired from the management device 30, encryption information, and the like. Based on the information, settings for communication between the terminal devices 10 are performed.

図2を参照して、中継装置の構成について説明する。図2は、中継装置の構成を説明するための概略図である。中継装置100として、例えば、ルータとしての機能を有するコンピュータを用いることができる。中継装置100は、中央処理装置(CPU:Central Processing Unit)110、ランダムアクセスが可能なメモリ(RAM:Random Access Memory)106、ROM(Read Only Memory)104、フラッシュメモリ108、入出力インタフェース102及びクロック信号発生器107を備えている。図1に示した端末装置10は、中継装置100の入出力インタフェース102に接続されている。また、入出力インタフェース102は公衆回線網20に接続されていて、図1に示した管理装置30と通信可能になっている。   The configuration of the relay device will be described with reference to FIG. FIG. 2 is a schematic diagram for explaining the configuration of the relay apparatus. As the relay device 100, for example, a computer having a function as a router can be used. The relay device 100 includes a central processing unit (CPU) 110, a random access memory (RAM) 106, a ROM (Read Only Memory) 104, a flash memory 108, an input / output interface 102, and a clock. A signal generator 107 is provided. The terminal device 10 illustrated in FIG. 1 is connected to the input / output interface 102 of the relay device 100. The input / output interface 102 is connected to the public network 20 and can communicate with the management apparatus 30 shown in FIG.

CPU110が備える制御手段112は、ROM104に読み出し自在に保存されているプログラムを読み出し、当該プログラムを実行することにより、送受信手段122、設定情報受信手段124、書込み猶予手段126及びフラッシュメモリ書込み手段128等の各機能手段を実現する。   The control means 112 included in the CPU 110 reads a program stored in the ROM 104 so as to be readable, and executes the program, thereby transmitting / receiving means 122, setting information receiving means 124, write grace means 126, flash memory writing means 128, and the like. Each functional means is realized.

送受信手段122は、1つの端末装置10から受信したデータ信号を他の端末装置10に送信する、ルータとしての機能を備えている。   The transmission / reception means 122 has a function as a router that transmits a data signal received from one terminal apparatus 10 to another terminal apparatus 10.

設定情報受信手段124は、管理装置30から入出力インタフェース102を経て受信した情報に付されている識別子(ID)の識別を行い、その情報が設定情報である旨を示す識別子を有している場合は、設定情報としてRAM106に読み出し自在に保存する。また、設定情報受信手段124は、設定情報の受信に応答して、設定情報を受信した旨の確認信号を、入出力インタフェース102を経て管理装置30に送信する機能を備えるのが良い。   The setting information receiving unit 124 identifies an identifier (ID) attached to information received from the management apparatus 30 via the input / output interface 102, and has an identifier indicating that the information is setting information. In this case, it is stored as setting information in the RAM 106 so that it can be read out. In addition, the setting information receiving unit 124 preferably has a function of transmitting a confirmation signal indicating that the setting information has been received to the management apparatus 30 via the input / output interface 102 in response to the reception of the setting information.

書込み猶予手段126は、設定情報受信手段124での設定情報の受信に応答して、予め設定された書込み猶予時間だけ待機した後に、書込み開始信号を生成する。書込み猶予時間は、書込み猶予手段126が備える書込み猶予タイマ127を用いて計時される。なお、書込み猶予タイマ127は、クロック信号発生器107で生成され、CPU110等の動作のタイミングを制御するいわゆるクロック信号を用いて、クロック信号の個数を計数することによって実現できる。計数されたクロック信号の個数とクロック信号の周期の積によって定まる待機時間が、書込み猶予時間に達すると、書込み猶予手段126は、書込み開始信号を生成して、当該書込み開始信号を発信する。ここで、クロック信号の個数は、RAM106に読出し及び書換え自在に書き込まれる。   The write grace unit 126 generates a write start signal after waiting for a preset write grace time in response to the reception of the setting information by the setting information receiving unit 124. The write grace time is measured using a write grace timer 127 provided in the write grace means 126. The write grace timer 127 can be realized by counting the number of clock signals using a so-called clock signal generated by the clock signal generator 107 and controlling the operation timing of the CPU 110 or the like. When the standby time determined by the product of the counted number of clock signals and the period of the clock signal reaches the write grace time, the write grace means 126 generates a write start signal and transmits the write start signal. Here, the number of clock signals is written in the RAM 106 so that it can be read and rewritten.

一般の公衆回線網20を用いて、中継装置100と管理装置30が接続されている場合は、管理装置30は、設定情報の送信から1秒以内に、中継装置100からの確認信号を受信しないときに、設定情報を再送する構成とするのが通例である。管理装置30からの再送間隔が1秒程度の場合は、この再送間隔に基づいて、書込み猶予時間を2秒とするのが良い。この書込み猶予時間は、ROM104に読み出し自在に保存しておいて、書き込み猶予手段126がROM104から読み出す構成としても良いし、書込み猶予時間を、書込み猶予手段126を実現するためのプログラムに予め組み込んでおいても良い。   When the relay device 100 and the management device 30 are connected using the general public line network 20, the management device 30 does not receive the confirmation signal from the relay device 100 within one second from the transmission of the setting information. Sometimes, the configuration information is usually retransmitted. When the retransmission interval from the management apparatus 30 is about 1 second, it is preferable to set the write grace time to 2 seconds based on this retransmission interval. The write grace time may be stored in the ROM 104 so as to be readable, and the write grace means 126 may be read from the ROM 104, or the write grace time may be incorporated in a program for realizing the write grace means 126 in advance. You can leave it.

フラッシュメモリ書込み手段128は、書込み猶予手段126で生成された書込み開始信号に応答して、RAM106に保存されている設定情報のフラッシュメモリ108への書込みを行う。なお、フラッシュメモリ108への書込みの際には、先ず、フラッシュメモリ108に記録されているデータを全て消去する。その後、フラッシュメモリ書込み手段128は、フラッシュメモリ108に記録されていたデータの消去を確認した後、RAM106に保存されている設定情報を書込む。ここで、この書込み時に、RAM106に複数の設定情報が保存されている場合には、全ての設定情報が、一括して書き込まれる。   The flash memory writing unit 128 writes the setting information stored in the RAM 106 to the flash memory 108 in response to the write start signal generated by the write grace unit 126. When writing to the flash memory 108, first, all data recorded in the flash memory 108 is erased. Thereafter, the flash memory writing unit 128 writes the setting information stored in the RAM 106 after confirming that the data recorded in the flash memory 108 is erased. Here, when a plurality of setting information is stored in the RAM 106 at the time of writing, all the setting information is written in a lump.

(第1実施形態の動作)
図3及び図4を参照して、第1実施形態のフラッシュメモリへの設定情報の書込み処理について説明する。図3は、第1実施形態の処理フローを示す図である。
(Operation of the first embodiment)
With reference to FIGS. 3 and 4, the setting information write processing to the flash memory according to the first embodiment will be described. FIG. 3 is a diagram illustrating a processing flow of the first embodiment.

ステップ(以下、ステップをSで表す。)10で、設定情報受信手段124は、入出力インタフェース102を経て、管理装置30から受信した情報が設定情報であるか否かの判定を行う。この判定は、設定情報受信手段124が、ROM104に設定情報を示すIDとして書き込まれている設定情報IDを読み出してきて、受信した情報に付されている識別子(ID)と設定情報IDとの照合を行うなどしてなされる。設定情報受信手段124は、受信した情報が設定情報であると判定したときは、S12で、当該設定情報をRAM106に読み出し自在に保存するとともに、設定情報を受信した旨の確認信号を生成し、入出力インタフェース102を経て管理装置30に送信する。   In step (hereinafter, step is represented by S) 10, the setting information receiving unit 124 determines whether the information received from the management apparatus 30 via the input / output interface 102 is the setting information. In this determination, the setting information receiving unit 124 reads the setting information ID written as the ID indicating the setting information in the ROM 104, and compares the identifier (ID) attached to the received information with the setting information ID. It is done by doing. When the setting information receiving unit 124 determines that the received information is setting information, in S12, the setting information receiving unit 124 stores the setting information in a readable manner in the RAM 106 and generates a confirmation signal indicating that the setting information has been received. The data is transmitted to the management apparatus 30 via the input / output interface 102.

S20で、書込み猶予手段126は、設定情報のRAM106への書き込みに応答して、書込み猶予タイマ127をリセットする。この過程では、書込み猶予タイマ127は、先ず、RAM106に、そこに書き込まれているクロック信号の個数を0にする指令を与える。   In S <b> 20, the write grace unit 126 resets the write grace timer 127 in response to the writing of the setting information to the RAM 106. In this process, the write grace timer 127 first gives a command to the RAM 106 to set the number of clock signals written therein to zero.

S22で、書込み猶予手段126は、RAM106に書き込まれているクロック信号の個数が0であることを示す確認信号を受け取った後、書込み猶予タイマ127でのクロック信号の計数を開始する。   In S 22, the write grace unit 126 starts counting the clock signal in the write grace timer 127 after receiving a confirmation signal indicating that the number of clock signals written in the RAM 106 is zero.

S25で、設定情報受信手段124は、管理装置30から設定情報を受信したか否かの判定を行う。この過程では、先ず、入出力インタフェース102を経て、管理装置30から受信した情報を受信したか否かの判定を行い、情報を受信している場合は、その受信した情報が設定情報であるか否かの判定を行う。受信した情報が設定情報であるか否かの判定は、設定情報受信手段124が、ROM104に設定情報を示すIDとして書き込まれている設定情報IDを読み出してきて、受信した情報に付されている識別子(ID)と設定情報IDとの照合を行うなどしてなされる。設定情報受信手段124は、受信した情報が設定情報であると判定したときは、S27で、当該設定情報をRAM106に読み出し自在に保存するとともに、設定情報を受信した旨の確認信号を生成し、入出力インタフェース102を経て管理装置30に送信する。   In S <b> 25, the setting information receiving unit 124 determines whether setting information has been received from the management apparatus 30. In this process, first, it is determined whether or not the information received from the management apparatus 30 is received via the input / output interface 102. If the information is received, is the received information the setting information? Determine whether or not. Whether the received information is the setting information is determined by the setting information receiving unit 124 reading out the setting information ID written as the ID indicating the setting information in the ROM 104 and attached to the received information. For example, the identifier (ID) is compared with the setting information ID. When the setting information receiving unit 124 determines that the received information is the setting information, in S27, the setting information receiving unit 124 stores the setting information in a readable manner in the RAM 106, and generates a confirmation signal indicating that the setting information has been received. The data is transmitted to the management apparatus 30 via the input / output interface 102.

S30で、書込み猶予手段126は、書込み猶予時間が経過したか否か、すなわち、書込み猶予タイマ127で計時される待機時間が、予め設定された書込み猶予時間に達したか否かを判定する。この判定は、待機時間を計時する際に数えたクロック信号の数と、RAM106から読みだしてきた書き込み猶予時間に対応するクロック信号の個数とを比較して行う。書込み猶予手段126は、待機時間が書込み猶予時間に達するまで、S30の判定過程を繰り返し行う。すなわち、待機時間が書込み猶予時間に達すると(Yの場合)、書込み猶予手段126は、フラッシュメモリへの書き込み開始を許可する書込み開始信号を生成した後、当該書込み開始信号をフラッシュメモリ書込み手段128に対して発信する。一方、待機時間が書込み猶予時間に達していないとき(Nの場合)は、設定情報を受信したか否かが判定され(S25)、受信されていない場合はS30に戻る。   In S30, the write grace unit 126 determines whether or not the write grace time has elapsed, that is, whether or not the standby time counted by the write grace timer 127 has reached a preset write grace time. This determination is made by comparing the number of clock signals counted when measuring the waiting time with the number of clock signals corresponding to the write grace time read from the RAM 106. The write grace unit 126 repeats the determination process of S30 until the standby time reaches the write grace time. That is, when the standby time reaches the write grace time (in the case of Y), the write grace unit 126 generates a write start signal that permits the start of writing to the flash memory, and then sends the write start signal to the flash memory writing unit 128. Send to. On the other hand, when the waiting time has not reached the write grace time (in the case of N), it is determined whether or not the setting information has been received (S25), and if it has not been received, the process returns to S30.

S40で、フラッシュメモリ書込み手段128は、書込み開始信号の受信に応答して、フラッシュメモリ108の消去を開始する。この過程では、フラッシュメモリ書き込み手段128は、消去指令をフラッシュメモリ108に与えて、これに記録されている全てのデータの消去を開始する。なお、フラッシュメモリ108の消去には数秒程度かかる。そのため、フラッシュメモリ108の消去中に、設定情報受信手段124が、管理装置30から設定情報を受信する場合がある。   In S40, the flash memory writing unit 128 starts erasing the flash memory 108 in response to receiving the write start signal. In this process, the flash memory writing means 128 gives an erase command to the flash memory 108 and starts erasing all data recorded in the flash memory 108. Note that it takes about several seconds to erase the flash memory 108. For this reason, the setting information receiving unit 124 may receive setting information from the management apparatus 30 while the flash memory 108 is being erased.

そこで、S45で、設定情報受信手段124は、管理装置30から設定情報を受信したか否かの判定を行う。この過程では、先ず、入出力インタフェース102を経て、管理装置30から受信した情報を受信したか否かの判定を行い、情報を受信している場合は、その受信した情報が設定情報であるか否かの判定を行う。受信した情報が設定情報であるか否かの判定は、設定情報受信手段124が、ROM104に設定情報を示すIDとして書き込まれている設定情報IDを読み出してきて、受信した情報に付されている識別子(ID)と設定情報IDとの照合を行うなどしてなされる。設定情報受信手段124は、受信した情報が設定情報であると判定したときは、S47で、当該設定情報をRAM106に読み出し自在に保存するとともに、設定情報を受信した旨の確認信号を生成し、入出力インタフェース102を経て管理装置30に送信する。   Therefore, in S45, the setting information receiving unit 124 determines whether the setting information is received from the management apparatus 30. In this process, first, it is determined whether or not the information received from the management apparatus 30 is received via the input / output interface 102. If the information is received, is the received information the setting information? Determine whether or not. Whether the received information is the setting information is determined by the setting information receiving unit 124 reading out the setting information ID written as the ID indicating the setting information in the ROM 104 and attached to the received information. For example, the identifier (ID) is compared with the setting information ID. When the setting information receiving unit 124 determines that the received information is the setting information, in S47, the setting information receiving unit 124 stores the setting information in a readable manner in the RAM 106 and generates a confirmation signal indicating that the setting information has been received. The data is transmitted to the management apparatus 30 via the input / output interface 102.

S50で、フラッシュメモリ書込み手段128は、フラッシュメモリ108のデータの消去が完了しているか否かを判定する。消去が完了していない場合は、S45に戻る。消去されている場合は、フラッシュメモリ書込み手段128は、フラッシュメモリ108に記録されているデータが全て消去されていることを示す確認信号を受け取った後、RAM106からこれに保存されている設定情報を読み出してきて、フラッシュメモリ108に書き込む(S60)。この場合、RAM106に複数の設定情報が保存されている場合は、フラッシュメモリ108への書き込みの直前に、RAM106に保存されている全ての設定情報が、一括して書き込まれる。   In S50, the flash memory writing unit 128 determines whether or not the erasure of data in the flash memory 108 is completed. If the erasure has not been completed, the process returns to S45. If it has been erased, the flash memory writing means 128 receives the confirmation signal indicating that all of the data recorded in the flash memory 108 has been erased, and then receives the setting information stored in it from the RAM 106. The data is read and written into the flash memory 108 (S60). In this case, when a plurality of setting information is stored in the RAM 106, all the setting information stored in the RAM 106 is written at once immediately before writing to the flash memory 108.

図4は、第1実施形態における中継装置の動作を説明するためのタイムチャートである。   FIG. 4 is a time chart for explaining the operation of the relay device in the first embodiment.

図4(A)は、中継装置が受信する設定情報を示している。ここでは、1.3秒毎に設定情報a、b、c、d、e及びfが受信された状況を示している。   FIG. 4A shows setting information received by the relay device. Here, a situation is shown in which setting information a, b, c, d, e, and f are received every 1.3 seconds.

図4(B)は、中継装置100でのフラッシュメモリ108の消去動作を示していて、図4(C)は、フラッシュメモリ108への書込み動作を示している。なお、フラッシュメモリの消去にかかる時間を1秒とし、書込み猶予時間を2秒としている。また、フラッシュメモリのデータの書き込みにかかる時間は、数百μ秒程度である。中継装置100は、設定情報aを受信してRAM106に書き込んでから(S12)、書込み猶予時間である2秒間が経過するまで、フラッシュメモリへの書込みを行わずに待機する。すなわち、中継装置100は、待機時間が書込み猶予時間に達したか否かの判定を繰り返し行う(S25〜S30)。中継装置100は、書込み猶予時間の経過後、フラッシュメモリ108の消去を開始する(S40)。中継装置100が待機している間、又はフラッシュメモリの消去が行われている間に、設定情報b及び設定情報cを受信すると、設定情報受信手段124により、設定情報b及び設定情報cがRAM106に書き込まれる(S27、S47)。フラッシュメモリ書込み手段128は、フラッシュメモリ108の消去後に、RAM106に書き込まれている全ての設定情報、ここでは、設定情報a、設定情報b及び設定情報cを一括してフラッシュメモリ108へ書き込む(S60)。   4B shows an erase operation of the flash memory 108 in the relay device 100, and FIG. 4C shows a write operation to the flash memory 108. The time required for erasing the flash memory is 1 second, and the write grace time is 2 seconds. The time required for writing data in the flash memory is about several hundreds of microseconds. The relay apparatus 100 receives the setting information a and writes it in the RAM 106 (S12), and waits for 2 seconds, which is a write grace period, without writing to the flash memory. That is, the relay device 100 repeatedly determines whether or not the standby time has reached the write grace time (S25 to S30). The relay device 100 starts erasing the flash memory 108 after the write grace time has elapsed (S40). When the setting information b and the setting information c are received while the relay device 100 is on standby or while the flash memory is being erased, the setting information receiving unit 124 stores the setting information b and the setting information c in the RAM 106. (S27, S47). The flash memory writing unit 128 collectively writes all the setting information written in the RAM 106 after erasing the flash memory 108, here, the setting information a, the setting information b, and the setting information c (S60). ).

設定情報a、設定情報b及び設定情報cの書込みを行った後、図3に示す処理が再び行われる。先ず、設定情報の受信の有無が判定され(S10)、設定情報dを受信している場合は、設定情報dがRAM106に書き込まれる(S12)。その後、中継装置100は、書込み猶予時間である2秒間が経過するまで、フラッシュメモリへの書込みを行わずに待機する(S25〜S30)。中継装置100は、書込み猶予時間の経過後、フラッシュメモリ108の消去を開始する(S40)。中継装置100が待機している間、又はフラッシュメモリ108の消去が行われている間に、設定情報e及び設定情報fを受信すると、設定情報受信手段124により、設定情報e及び設定情報fがRAM106に書き込まれる(S27、S47)。中継装置100は、フラッシュメモリ108の消去後に、RAM106に書き込まれている全ての設定情報、ここでは、設定情報a、b、c、d、e及びfの書込みを一括してフラッシュメモリ108へ書き込む(S60)。   After writing the setting information a, the setting information b, and the setting information c, the process shown in FIG. 3 is performed again. First, it is determined whether or not setting information has been received (S10). If setting information d is received, the setting information d is written to the RAM 106 (S12). Thereafter, the relay device 100 waits without writing to the flash memory until two seconds, which is a write grace time, have elapsed (S25 to S30). The relay device 100 starts erasing the flash memory 108 after the write grace time has elapsed (S40). When the setting information e and the setting information f are received while the relay device 100 is on standby or while the flash memory 108 is being erased, the setting information receiving unit 124 sets the setting information e and the setting information f. It is written in the RAM 106 (S27, S47). After erasing the flash memory 108, the relay device 100 writes all the setting information written in the RAM 106, here, the setting information a, b, c, d, e, and f to the flash memory 108 at once. (S60).

なお、ここでは、設定情報a、b、c、d、e及びfが全て異なる情報であることを仮定しているが、例えば、管理装置30が設定情報を再送した場合は、2以上の設定情報が同一の情報になる。この場合、設定情報受信手段124は、RAM106に書き込む際に、新しく受信した設定情報を同一の既に保存されている設定情報が記録されているメモリアドレスに上書きする構成にしても良い。また、設定情報受信手段124を、RAM106の記憶容量に応じて、古い設定情報を消去して新しい設定情報を書き込む記憶容量を確保する構成にしても良い。これらの構成は、中継装置に用いられる任意好適な従来周知の構成を用いることができる。   Here, it is assumed that the setting information a, b, c, d, e, and f are all different information. For example, when the management apparatus 30 retransmits the setting information, two or more settings are set. The information becomes the same information. In this case, the setting information receiving means 124 may be configured to overwrite the newly received setting information over the memory address in which the same already stored setting information is recorded when writing to the RAM 106. Further, the setting information receiving unit 124 may be configured to secure a storage capacity for deleting old setting information and writing new setting information in accordance with the storage capacity of the RAM 106. As these configurations, any suitable conventional well-known configuration used in the relay device can be used.

図7を参照して説明したように、従来の書込み方法によれば、連続して設定情報を受信した場合、それぞれの設定情報を受信した時点で、フラッシュメモリの消去及び設定情報の書込みを行う。これに対し、第1実施形態の書込み方法によれば、フラッシュメモリの消去を開始する前に、書込み猶予時間を設けているので、設定情報aを受信した時点では、フラッシュメモリの消去及び設定情報の書込みを行わない。書込み猶予時間の経過後に、フラッシュメモリの消去と設定情報a、設定情報b及び設定情報cの書込みを一括して行う。従って、第1実施形態の書込み方法を用いることにより、従来の書込み方法に比べてフラッシュメモリの書込み回数を減らすことができる。   As described with reference to FIG. 7, according to the conventional writing method, when setting information is continuously received, the flash memory is erased and the setting information is written when the setting information is received. . On the other hand, according to the writing method of the first embodiment, since the write grace time is provided before the erasing of the flash memory is started, the erasing and setting information of the flash memory are received when the setting information a is received. Is not written. After the write grace time elapses, the flash memory is erased and the setting information a, setting information b, and setting information c are written together. Therefore, by using the writing method of the first embodiment, the number of flash memory writes can be reduced as compared with the conventional writing method.

なお、ここでは、管理装置から中継装置への設定情報の再送間隔が1秒程度であることに基づいて、書込み猶予時間を2秒間とした例について説明したが、書込み猶予時間は、2秒間に限定されるものではない。書込み猶予時間を長くすると、フラッシュメモリの書込み回数をさらに減らすことができる。しかしながら、設定情報を受信してから、フラッシュメモリへの書込みが終了するまでの時間が長くなるため、その間に発生した中継装置での電源切断によって、中継装置が受信した設定情報を失う恐れがある。一方、書込み猶予時間を短くすると、中継装置での電源切断による設定情報の消失の可能性は低下するが、フラッシュメモリへの書込み回数の低減の程度が小さくなる。従って、管理装置から中継装置への設定情報の再送間隔と、設定情報を受信してからフラッシュメモリへの書き込みを終了する間に発生する電源切断の可能性から、書込み猶予時間を任意好適な時間に設定すれば良い。   Here, an example in which the write grace time is set to 2 seconds based on the fact that the setting information retransmission interval from the management device to the relay device is about 1 second has been described. However, the write grace time is set to 2 seconds. It is not limited. Increasing the write grace time can further reduce the number of writes to the flash memory. However, since it takes a long time until the writing to the flash memory is completed after the setting information is received, there is a risk that the setting information received by the relay device may be lost due to the power-off at the relay device occurring during that time. . On the other hand, if the write grace time is shortened, the possibility of erasure of setting information due to power-off at the relay device is reduced, but the degree of reduction in the number of times of writing to the flash memory is reduced. Therefore, the write grace time can be set to any suitable time from the interval of retransmission of the setting information from the management device to the relay device and the possibility of power-off that occurs during the end of writing to the flash memory after receiving the setting information. Should be set.

(第2実施形態の動作)
図5及び図6を参照して、第2実施形態のフラッシュメモリへの設定情報書込みの処理について説明する。図5は、第2実施形態の処理フローを示す図である。
(Operation of Second Embodiment)
With reference to FIG. 5 and FIG. 6, the process of writing the setting information to the flash memory according to the second embodiment will be described. FIG. 5 is a diagram illustrating a processing flow of the second embodiment.

S10で、設定情報受信手段124は、入出力インタフェース102を経て、管理装置30から受信した情報が設定情報であるか否かの判定を行う。この判定は、設定情報受信手段124が、ROM104に設定情報を示すIDとして書き込まれている設定情報IDを読み出してきて、受信した情報に付されている識別子(ID)と設定情報IDとの照合を行うなどしてなされる。設定情報受信手段124は、受信した情報が設定情報であると判定したときは、S12で、当該設定情報をRAM106に読み出し自在に保存するとともに、設定情報を受信した旨の確認信号を生成し、入出力インタフェース102を経て管理装置30に送信する。   In S10, the setting information receiving unit 124 determines whether the information received from the management apparatus 30 via the input / output interface 102 is setting information. In this determination, the setting information receiving unit 124 reads the setting information ID written as the ID indicating the setting information in the ROM 104, and compares the identifier (ID) attached to the received information with the setting information ID. It is done by doing. When the setting information receiving unit 124 determines that the received information is setting information, in S12, the setting information receiving unit 124 stores the setting information in a readable manner in the RAM 106 and generates a confirmation signal indicating that the setting information has been received. The data is transmitted to the management apparatus 30 via the input / output interface 102.

S20で、書込み猶予手段126は、設定情報のRAM106への書き込みに応答して、書込み猶予タイマ127をリセットする。この過程では、書込み猶予タイマ127は、先ず、RAM106に、そこに書き込まれているクロック信号の個数を0にする指令を与える。   In S <b> 20, the write grace unit 126 resets the write grace timer 127 in response to the writing of the setting information to the RAM 106. In this process, the write grace timer 127 first gives a command to the RAM 106 to set the number of clock signals written therein to zero.

S22で、書込み猶予手段126は、RAM106に書き込まれているクロック信号の個数が0であることを示す確認信号を受け取った後、書込み猶予タイマ127でのクロック信号の計数を開始する。   In S 22, the write grace unit 126 starts counting the clock signal in the write grace timer 127 after receiving a confirmation signal indicating that the number of clock signals written in the RAM 106 is zero.

S25で、設定情報受信手段124は、管理装置30から設定情報を受信したか否かの判定を行う。この過程では、先ず、入出力インタフェース102を経て、管理装置30から受信した情報を受信したか否かの判定を行い、情報を受信している場合は、その受信した情報が設定情報であるか否かの判定を行う。受信した情報が設定情報であるか否かの判定は、設定情報受信手段124が、ROM104に設定情報を示すIDとして書き込まれている設定情報IDを読み出してきて、受信した情報に付されている識別子(ID)と設定情報IDとの照合を行うなどしてなされる。設定情報受信手段124は、受信した情報が設定情報であると判定したときは、S27で、当該設定情報をRAM106に読み出し自在に保存するとともに、設定情報を受信した旨の確認信号を生成し、入出力インタフェース102を経て管理装置30に送信する。設定情報をRAM106に保存した後、S20の過程に戻る。すなわち、書込み猶予手段126は、設定情報のRAM106への書き込みに応答して、書込み猶予タイマ127をリセットした(S20)後、スタートさせる(S22)。   In S <b> 25, the setting information receiving unit 124 determines whether setting information has been received from the management apparatus 30. In this process, first, it is determined whether or not the information received from the management apparatus 30 is received via the input / output interface 102. If the information is received, is the received information the setting information? Determine whether or not. Whether the received information is the setting information is determined by the setting information receiving unit 124 reading out the setting information ID written as the ID indicating the setting information in the ROM 104 and attached to the received information. For example, the identifier (ID) is compared with the setting information ID. When the setting information receiving unit 124 determines that the received information is the setting information, in S27, the setting information receiving unit 124 stores the setting information in a readable manner in the RAM 106, and generates a confirmation signal indicating that the setting information has been received. The data is transmitted to the management apparatus 30 via the input / output interface 102. After the setting information is stored in the RAM 106, the process returns to S20. That is, the write grace means 126 resets the write grace timer 127 in response to the writing of the setting information to the RAM 106 (S20), and then starts (S22).

S30で、書込み猶予手段126は、書込み猶予時間が経過したか否か、すなわち、書込み猶予タイマ127で計時される待機時間が、予め設定された書込み猶予時間に達したか否かを判定する。この判定は、待機時間を計時する際に数えたクロック信号の数と、RAM106から読みだしてきた書き込み猶予時間に対応するクロック信号の個数とを比較して行う。書込み猶予手段126は、待機時間が書込み猶予時間に達するまで、S30の判定過程を繰り返し行う。すなわち、待機時間が書込み猶予時間に達すると(Yの場合)、書込み猶予手段126は、フラッシュメモリへの書き込み開始を許可する書込み開始信号を生成した後、当該書込み開始信号をフラッシュメモリ書込み手段128に対して発信する。一方、待機時間が書込み猶予時間に達していないとき(Nの場合)は、設定情報を受信したか否かが判定され(S25)、受信されていない場合はS30に戻る。   In S30, the write grace unit 126 determines whether or not the write grace time has elapsed, that is, whether or not the standby time counted by the write grace timer 127 has reached a preset write grace time. This determination is made by comparing the number of clock signals counted when measuring the waiting time with the number of clock signals corresponding to the write grace time read from the RAM 106. The write grace unit 126 repeats the determination process of S30 until the standby time reaches the write grace time. That is, when the standby time reaches the write grace time (in the case of Y), the write grace unit 126 generates a write start signal that permits the start of writing to the flash memory, and then sends the write start signal to the flash memory writing unit 128. Send to. On the other hand, when the waiting time has not reached the write grace time (in the case of N), it is determined whether or not the setting information has been received (S25), and if it has not been received, the process returns to S30.

S40で、フラッシュメモリ書込み手段128は、書込み開始信号の受信に応答して、フラッシュメモリ108の消去を開始する。この過程では、フラッシュメモリ書き込み手段128は、消去指令をフラッシュメモリ108に与えて、これに記録されている全てのデータの消去を開始する。なお、フラッシュメモリ108の消去には数秒程度かかる。そのため、フラッシュメモリ108の消去中に、設定情報受信手段124が、管理装置30から設定情報を受信する場合がある。   In S40, the flash memory writing unit 128 starts erasing the flash memory 108 in response to receiving the write start signal. In this process, the flash memory writing means 128 gives an erase command to the flash memory 108 and starts erasing all data recorded in the flash memory 108. Note that it takes about several seconds to erase the flash memory 108. For this reason, the setting information receiving unit 124 may receive setting information from the management apparatus 30 while the flash memory 108 is being erased.

そこで、S45で、設定情報受信手段124は、管理装置30から設定情報を受信したか否かの判定を行う。この過程では、先ず、入出力インタフェース102を経て、管理装置30から受信した情報を受信したか否かの判定を行い、情報を受信している場合は、その受信した情報が設定情報であるか否かの判定を行う。受信した情報が設定情報であるか否かの判定は、設定情報受信手段124が、ROM104に設定情報を示すIDとして書き込まれている設定情報IDを読み出してきて、受信した情報に付されている識別子(ID)と設定情報IDとの照合を行うなどしてなされる。設定情報受信手段124は、受信した情報が設定情報であると判定したときは、S47で、当該設定情報をRAM106に読み出し自在に保存するとともに、設定情報を受信した旨の確認信号を生成し、入出力インタフェース102を経て管理装置30に送信する。管理装置30から設定情報を受信していない場合は、以下に説明するS50の過程を行う。   Therefore, in S45, the setting information receiving unit 124 determines whether the setting information is received from the management apparatus 30. In this process, first, it is determined whether or not the information received from the management apparatus 30 is received via the input / output interface 102. If the information is received, is the received information the setting information? Determine whether or not. Whether the received information is the setting information is determined by the setting information receiving unit 124 reading out the setting information ID written as the ID indicating the setting information in the ROM 104 and attached to the received information. For example, the identifier (ID) is compared with the setting information ID. When the setting information receiving unit 124 determines that the received information is the setting information, in S47, the setting information receiving unit 124 stores the setting information in a readable manner in the RAM 106 and generates a confirmation signal indicating that the setting information has been received. The data is transmitted to the management apparatus 30 via the input / output interface 102. If setting information has not been received from the management apparatus 30, a process of S50 described below is performed.

S50で、フラッシュメモリ書込み手段128は、フラッシュメモリ108のデータが消去されているか否かを判定する。消去されていない場合は、S45に戻る。消去されている場合は、フラッシュメモリ書込み手段128は、フラッシュメモリ108に記録されているデータが全て消去されていることを示す確認信号を受け取った後、RAM106からこれに保存されている設定情報を読み出してきて、フラッシュメモリ108に書き込む(S60)。この場合、RAM106に複数の設定情報が保存されている場合は、フラッシュメモリ108への書き込みの直前に、RAM106に保存されている全ての設定情報が、一括して書き込まれる。   In S50, the flash memory writing unit 128 determines whether or not the data in the flash memory 108 has been erased. If not erased, the process returns to S45. If it has been erased, the flash memory writing means 128 receives the confirmation signal indicating that all of the data recorded in the flash memory 108 has been erased, and then receives the setting information stored in it from the RAM 106. The data is read and written into the flash memory 108 (S60). In this case, when a plurality of setting information is stored in the RAM 106, all the setting information stored in the RAM 106 is written at once immediately before writing to the flash memory 108.

図6は、第2実施形態における中継装置の動作を説明するためのタイムチャートである。   FIG. 6 is a time chart for explaining the operation of the relay device in the second embodiment.

図6(A)は、中継装置が受信する設定情報を示している。ここでは、1.3秒毎に設定情報a、b、c、d、e及びfを受信した状況を示している。   FIG. 6A shows the setting information received by the relay device. Here, a situation is shown in which setting information a, b, c, d, e, and f are received every 1.3 seconds.

図6(B)は、中継装置100でのフラッシュメモリ108の消去動作を示していて、図6(C)は、フラッシュメモリ108への書込み動作を示している。なお、フラッシュメモリの消去にかかる時間を1秒とし、書込み猶予時間を2秒としている。また、フラッシュメモリのデータの書き込みにかかる時間は、数百μ秒程度である。中継装置100は、設定情報aを受信してRAM106に書き込んでから(S12)、書込み猶予時間である2秒間が経過するまで、フラッシュメモリへの書込みを行わずに待機する。すなわち、中継装置100は、待機時間が書込み猶予時間に達したか否かの判定を繰り返し行う(S25〜S30)。ここで、待機時間が書込み猶予時間に達する前に、中継装置100が設定情報bを受信すると、書込み猶予タイマ127がリセットされて、再びスタートする(S20、S22)。その結果、実質的に書込み猶予時間が延長される。同様に、書込み猶予時間中に設定情報c、d、e及びfを受信すると、その都度、書込み猶予時間が延長される。フラッシュメモリ書込み手段128は、設定情報b、c、d、e及びfを受信することにより延長された書込み猶予時間の経過後に、フラッシュメモリ108の消去を開始する(S40)。フラッシュメモリ書込み手段128は、フラッシュメモリ108に保存されているデータの消去後に、RAM106に書き込まれている全ての情報、ここでは、設定情報a、b、c、d、e及びfを一括してフラッシュメモリ108へ書き込む(S60)。   6B shows the erase operation of the flash memory 108 in the relay device 100, and FIG. 6C shows the write operation to the flash memory 108. The time required for erasing the flash memory is 1 second, and the write grace time is 2 seconds. The time required for writing data in the flash memory is about several hundreds of microseconds. The relay apparatus 100 receives the setting information a and writes it in the RAM 106 (S12), and waits for 2 seconds, which is a write grace period, without writing to the flash memory. That is, the relay device 100 repeatedly determines whether or not the standby time has reached the write grace time (S25 to S30). Here, when the relay apparatus 100 receives the setting information b before the standby time reaches the write grace time, the write grace timer 127 is reset and started again (S20, S22). As a result, the write grace time is substantially extended. Similarly, when the setting information c, d, e, and f is received during the write grace period, the write grace time is extended each time. The flash memory writing unit 128 starts erasing the flash memory 108 after the elapse of the write grace time extended by receiving the setting information b, c, d, e, and f (S40). The flash memory writing unit 128 collects all the information written in the RAM 106 after erasing the data stored in the flash memory 108, here, the setting information a, b, c, d, e, and f. Writing to the flash memory 108 (S60).

このように、第2実施形態の書込み方法によれば、待機時間が書込み猶予時間に達する前に設定情報を受信した場合には、設定情報を受信する都度、書込み猶予時間を延長する。このため、管理装置と中継装置の間のネットワーク障害などのために、管理装置が中継装置からの確認信号を受信できない場合に、中継装置が連続的に設定情報を受信したとしてもフラッシュメモリの消去及びフラッシュメモリへの設定情報の書込みは1回になる。従って、フラッシュメモリの書込み回数を第1の実施形態に比べてさらに減らすことができる。   As described above, according to the writing method of the second embodiment, when the setting information is received before the standby time reaches the writing grace time, the writing grace time is extended each time the setting information is received. Therefore, if the management device cannot receive a confirmation signal from the relay device due to a network failure between the management device and the relay device, the flash memory is erased even if the relay device continuously receives the setting information. And the setting information is written to the flash memory once. Therefore, the number of flash memory writes can be further reduced compared to the first embodiment.

遠隔管理システムを説明するための概念図である。It is a conceptual diagram for demonstrating a remote management system. 中継装置の構成を説明するための概略図である。It is the schematic for demonstrating the structure of a relay apparatus. 第1実施形態の処理フローを示す図である。It is a figure which shows the processing flow of 1st Embodiment. 第1実施形態における中継装置の動作を説明するためのタイムチャートである。It is a time chart for demonstrating operation | movement of the relay apparatus in 1st Embodiment. 第2実施形態の処理フローを示す図である。It is a figure which shows the processing flow of 2nd Embodiment. 第2実施形態における中継装置の動作を説明するためのタイムチャートである。It is a time chart for demonstrating operation | movement of the relay apparatus in 2nd Embodiment. 従来の中継装置の動作を説明するためのタイムチャートである。It is a time chart for demonstrating operation | movement of the conventional relay apparatus.

符号の説明Explanation of symbols

10 端末装置
20 公衆回線網
30 管理装置
100 中継装置
102 入出力インタフェース
104 ROM
106 RAM
107 クロック信号発生器
108 フラッシュメモリ
110 CPU
112 制御手段
122 送受信手段
124 設定情報受信手段
126 書込み猶予手段
127 書込み猶予タイマ
128 フラッシュメモリ書込み手段
DESCRIPTION OF SYMBOLS 10 Terminal apparatus 20 Public network 30 Management apparatus 100 Relay apparatus 102 Input / output interface 104 ROM
106 RAM
107 clock signal generator 108 flash memory 110 CPU
DESCRIPTION OF SYMBOLS 112 Control means 122 Transmission / reception means 124 Setting information reception means 126 Write suspension means 127 Write suspension timer 128 Flash memory writing means

Claims (4)

複数の端末装置に接続され、及び、該端末装置間の通信についての設定情報を管理装置から取得する中継装置で、該中継装置が備えるフラッシュメモリに前記設定情報を書き込むにあたり、
前記管理装置から受信した情報が設定情報であるか否かの判定を行い、判定の結果、前記情報が設定情報であるときは、当該情報を、前記中継装置が備えるRAMに保存する過程と、
前記情報が設定情報である旨の判定に応答して、前記中継装置が備える書込み猶予タイマをリセットした後、スタートさせる過程と、
前記書込み猶予タイマで計時される待機時間が、前記中継装置が備えるROMに予め記憶された書込み猶予時間に達したか否かの判定を繰り返し行う過程と、
前記待機時間が前記書込み猶予時間に達したときは、前記RAMに保存された前記設定情報をフラッシュメモリに書き込む過程と
を備え
前記待機時間が前記書込み猶予時間に達するまでに、新たに設定情報である情報を受信したときは、前記書込み猶予タイマをリセットした後、スタートさせる
ことを特徴とするフラッシュメモリの書込み制御方法。
In a relay device connected to a plurality of terminal devices and acquiring setting information about communication between the terminal devices from the management device, in writing the setting information in the flash memory provided in the relay device,
It is determined whether the information received from the management device is setting information, and as a result of the determination, when the information is setting information, a process of storing the information in a RAM included in the relay device;
In response to the determination that the information is setting information, after resetting the write grace timer provided in the relay device, starting,
A process of repeatedly determining whether or not the waiting time counted by the write grace timer has reached a write grace time stored in advance in a ROM included in the relay device;
When the waiting time reaches the write grace time, the step of writing the setting information stored in the RAM to a flash memory ,
The flash memory writing , wherein when the information which is the setting information is newly received before the waiting time reaches the write grace time, the write grace timer is reset and then started. Control method.
前記中継装置が、前記待機時間が前記書き込み猶予時間に達したか否かの判定を繰り返し行ないつつ前記書き込み猶予時間が経過するまで待機して、
前記待機時間が前記書込み猶予時間に達するまでに、新たに設定情報である情報を受信したときは、前記書き込み猶予時間を延長し、
前記書込み猶予タイマをリセットした後、スタートさせる
ことを特徴とする請求項1に記載のフラッシュメモリの書込み制御方法。
The relay device waits until the write grace time elapses while repeatedly determining whether the standby time has reached the write grace time,
When the information that is the setting information is newly received before the waiting time reaches the write grace time, the write grace time is extended,
The flash memory write control method according to claim 1, wherein the write grace timer is reset and then started.
複数の端末装置に接続され、及び、該端末装置間の通信についての設定情報を管理装置から取得する、フラッシュメモリを備える中継装置が具備するコンピュータに、
前記管理装置から受信した情報が設定情報であるか否かの判定を行い、判定の結果、前記情報が設定情報であるときは、当該情報を、前記中継装置が備えるRAMに保存する機能と、
前記情報が設定情報である旨の判定に応答して、前記中継装置が備える書込み猶予タイマをリセットした後、スタートさせる機能と、
前記書込み猶予タイマで計時される待機時間が、前記中継装置が備えるROMに予め記憶された書込み猶予時間に達したか否かの判定を繰り返し行う機能と、
前記待機時間が前記書込み猶予時間に達したときは、前記RAMに保存された前記設定情報をフラッシュメモリに書き込む機能と
前記待機時間が前記書込み猶予時間に達するまでに、新たに設定情報である情報を受信したときは、前記書込み猶予タイマをリセットした後、スタートさせる機能と
を実現させることを特徴とするプログラム。
A computer that is connected to a plurality of terminal devices, and that acquires setting information about communication between the terminal devices from a management device, and that is provided in a relay device including a flash memory,
It is determined whether or not the information received from the management device is setting information, and when the information is setting information as a result of the determination, a function of storing the information in a RAM included in the relay device;
In response to the determination that the information is setting information, after resetting the write grace timer provided in the relay device, a function to start,
A function of repeatedly determining whether or not the waiting time counted by the write grace timer has reached a write grace time stored in advance in a ROM included in the relay device;
When the standby time reaches the write grace time, a function of writing the setting information stored in the RAM to a flash memory ;
When the information that is the setting information is newly received before the waiting time reaches the writing grace time, a function to start after resetting the writing grace timer is realized. Program to do.
前記中継装置が、前記待機時間が前記書き込み猶予時間に達したか否かの判定を繰り返し行ないつつ前記書き込み猶予時間が経過するまで待機して、
前記待機時間が前記書込み猶予時間に達するまでに、新たに設定情報である情報を受信したときは、前記書き込み猶予時間を延長し、
前記書込み猶予タイマをリセットした後、スタートさせる機能を実現させる
ことを特徴とする請求項3に記載のプログラム。
The relay device waits until the write grace time elapses while repeatedly determining whether the standby time has reached the write grace time,
When the information that is the setting information is newly received before the waiting time reaches the write grace time, the write grace time is extended,
The program according to claim 3, wherein a function to start after resetting the write suspension timer is realized.
JP2005258090A 2005-09-06 2005-09-06 Flash memory write control method and program Expired - Lifetime JP4846305B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005258090A JP4846305B2 (en) 2005-09-06 2005-09-06 Flash memory write control method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005258090A JP4846305B2 (en) 2005-09-06 2005-09-06 Flash memory write control method and program

Publications (2)

Publication Number Publication Date
JP2007072696A JP2007072696A (en) 2007-03-22
JP4846305B2 true JP4846305B2 (en) 2011-12-28

Family

ID=37934084

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005258090A Expired - Lifetime JP4846305B2 (en) 2005-09-06 2005-09-06 Flash memory write control method and program

Country Status (1)

Country Link
JP (1) JP4846305B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12530130B2 (en) 2023-12-20 2026-01-20 Sk Hynix Nand Product Solutions Corp. Preemptive write suspension in memory systems

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0458898A (en) * 1990-06-28 1992-02-25 Fujirebio Inc Tripeptide and activity measurement of angiotensin-conversion enzyme using same compound
JP2549034B2 (en) * 1991-07-22 1996-10-30 株式会社メルコ Storage device
JPH064228A (en) * 1992-06-24 1994-01-14 Fujitsu Ltd Semiconductor disk device
JP4557341B2 (en) * 2000-01-07 2010-10-06 キヤノン株式会社 Backup storage controller
JP4163550B2 (en) * 2002-05-09 2008-10-08 株式会社リコー Remote management system and its intermediary device, management device, secret information setting method, and program
JP2005099983A (en) * 2003-09-24 2005-04-14 Murata Mach Ltd Electronic apparatus

Also Published As

Publication number Publication date
JP2007072696A (en) 2007-03-22

Similar Documents

Publication Publication Date Title
CN100458707C (en) Method, system and master core and slave core for realizing user configuration
US9286211B2 (en) Health reporting from non-volatile block storage device to processing device
JP4017178B2 (en) Flash memory and memory control method
JP2006264877A (en) Elevator control device
JP4846305B2 (en) Flash memory write control method and program
CN120199314B (en) System testing method for UFS devices and test host, equipment and media
JP2010049464A (en) Electronic equipment, and method for downloading program for updating in the same
CN113467721B (en) A data deletion system, method and device
JP5286814B2 (en) Semiconductor device, portable electronic device, self-diagnosis method, self-diagnosis program
JP5073977B2 (en) Verification control method and method for semiconductor memory device
CN113785308A (en) Recording apparatus, recording method, program, and memory card
JP5661313B2 (en) Storage device
JP2020021201A (en) Communication system and program update method
CN114265669B (en) A method and device for identifying a destroyed container instance
JP2001147862A (en) Flash memory writing method
JP4790334B2 (en) Nonvolatile memory device
JP6334776B1 (en) Electronic control unit
JP4282536B2 (en) Distributed system and device setup method
JP5821788B2 (en) Electronic control unit
WO2013021423A1 (en) Reprogramming system and reprogramming method
JP2005346403A (en) Information processing apparatus and information processing system
JP2009070303A (en) Program rewrite method when reset vector is erased
JP2012065031A (en) Communication device and program
JP5329747B2 (en) IP-PBX system, IP-PBX, and IP terminal login method used therefor
CN120434123A (en) A fast upgrade method and system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080707

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20110107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20110107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110527

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110801

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111012

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

Free format text: PAYMENT UNTIL: 20141021

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4846305

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term