JP2016071745A - Radio communication equipment having recording function, recording device for writing data in non-volatile memory, and recording method for writing data in non-volatile memory - Google Patents
Radio communication equipment having recording function, recording device for writing data in non-volatile memory, and recording method for writing data in non-volatile memory Download PDFInfo
- Publication number
- JP2016071745A JP2016071745A JP2014202312A JP2014202312A JP2016071745A JP 2016071745 A JP2016071745 A JP 2016071745A JP 2014202312 A JP2014202312 A JP 2014202312A JP 2014202312 A JP2014202312 A JP 2014202312A JP 2016071745 A JP2016071745 A JP 2016071745A
- Authority
- JP
- Japan
- Prior art keywords
- area
- address
- main data
- code
- block
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 81
- 238000000034 method Methods 0.000 title claims description 15
- 230000006870 function Effects 0.000 title claims description 12
- 230000005856 abnormality Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本発明は、記録媒体として、例えばフラッシュメモリなどのデータの書き換えが可能な不揮発性メモリを備え、録音機能を有する無線通信装置、不揮発性メモリへデータを書き込む記録装置及び不揮発性メモリへデータを書き込む記録方法に関する。 The present invention includes a non-volatile memory capable of rewriting data, such as a flash memory, as a recording medium, a wireless communication device having a recording function, a recording device for writing data to the non-volatile memory, and writing data to the non-volatile memory It relates to a recording method.
無線通信の分野においては、過去の交信内容を確認したり、聞き逃した命令を確認したりするために、交信内容を録音しておく必要がある場合がある。また、フライトレコーダ(ドライブレコーダ)やボイスレコーダのように、有事の際に位置情報などの様々な情報や、交信記録や会話などを記録する装置も知られている。これらいずれの場合も、記録されたデータは半永久的に保存しておく必要はなく、特に問題が生じなければ一定期間経過後に消去しても構わない。その一方で、有事の際の電源喪失などによって記録されたデータが消失してしまわないように、記録媒体としてフラッシュメモリなどの書き換えが可能な不揮発性記録媒体が使用されている。 In the field of wireless communication, it may be necessary to record the contents of communication in order to confirm past communication contents or confirm missed commands. Devices such as a flight recorder (drive recorder) and a voice recorder that record various information such as position information, communication records, conversations, and the like in an emergency are also known. In any of these cases, the recorded data need not be stored semipermanently, and may be erased after a certain period of time if no particular problem occurs. On the other hand, a rewritable nonvolatile recording medium such as a flash memory is used as a recording medium so that the recorded data is not lost due to power loss in the event of an emergency.
フラッシュメモリやEEPROMなどの不揮発性メモリにデータを書き込む場合、一般的にリングバッファ方式が用いられており、不揮発性メモリの記録領域の先頭からデータを書き込んでいき、記録領域の最後に達すると、先頭に戻って上書きを行う。ところで、不揮発性メモリにデータを書き込んでいる最中に、何らかの原因により電源喪失が発生したとすると、電源喪失が発生した箇所のデータが不定となり、それまでに記録されたデータは破壊されて再生できなくなる。ところが、不揮発性メモリに通信内容などの音声データが記録される場合、仮に電源喪失によってデータが破壊されたとしても、音声が一時的に途絶えるだけであるので、記録されたデータが破壊されること自体はさほど大きな問題とはならない。しかしながら、電源回復後に次のデータを書き込む場合、データの書き込みを開始するべきアドレスの特定に時間がかかり、データの書き込みの再開に時間がかかるという問題が生じる。 When writing data to a nonvolatile memory such as a flash memory or an EEPROM, a ring buffer method is generally used. When data is written from the beginning of the recording area of the nonvolatile memory and the end of the recording area is reached, Return to the top and overwrite. By the way, if power loss occurs for some reason while data is being written to the non-volatile memory, the data at the location where the power loss has occurred becomes indefinite, and the data recorded so far is destroyed and played back. become unable. However, when voice data such as communication contents is recorded in the non-volatile memory, even if the data is destroyed due to power loss, the voice is temporarily interrupted, so the recorded data is destroyed. It is not a big problem. However, when the next data is written after the power supply is restored, there is a problem that it takes time to specify an address where data writing is to be started, and it takes time to resume data writing.
特許文献1は、コンピュータの外部記録装置に関するものであり、不揮発性メモリの記録領域を所定バイト数(例えば、512バイト)のセクタに分割すると共に、各セクタをさらにデータ領域と管理領域に分割し、各セクタのデータ領域に記録されるべき主データを書き込むと共に、管理領域に書き込み開始フラグ、セクタアドレス、書き込み終了フラグなどの管理データを書き込む。そして、この外部記録装置の制御部は、各セクタの管理領域に書き込まれた書き込み開始フラグ及び書き込み終了フラグの値(それぞれ、初期値は「1」、終了値は「0」)に基づいて、そのセクタに主データが正しく書き込まれたことを判断している。また、制御部は、新たな主データの書き込みに際して、各セクタの管理領域の書き込み開始フラグをサーチし、書き込み開始フラグの初期値「1」を示すセクタのうち最も小さいセクタアドレスを有するセクタから、次の主データの書き込みを開始する。
特許文献1の外部記録装置では、電源喪失による主データ書き込みの失敗が発生した場合に、不定の主データが書き込まれたセクタに連続性のない主データが続けて書き込まれないようにするために、各セクタのデータ領域への主データの書き込み開始よりも先に、書き込み開始フラグの値を「1」から「0」に書き換えている。それによって、電源喪失による主データ書き込みの失敗が発生した場合でも、そのセクタは書き込みが終了しているものとして、新たな主データは次のセクタに書き込まれる。但し、書き込み開始フラグ及び書き込み終了フラグの値を書き換えているときに電源喪失が起こらないとも限らず、不定の主データが書き込まれたセクタに連続性にない主データが続けて書き込まれることもあり得る。その場合は、主データが破壊されているので再生不能になる。
In the external recording device of
特許文献2は、EEPROM内蔵型のデータ処理装置に関し、製品出荷時にROMから各種のアプリケーションプログラムや所定のシステムプリセットデータをEEPROMに書き込む。その際、所定単位のデータの先頭位置と終了位置に同じコードを書き込み、両コードが一致している場合にデータが正常に書き込まれたものと判断している。なお、両コードが一致していない場合は、書き込み異常が発生したものと判断し、最初からやり直す。そのため、この方式では、異常発生前に正常に書き込まれたデータであっても再生することはできず、録音装置には適しない。
本発明は、上記従来例の問題を解決するためになされたものであり、記録媒体として、例えばフラッシュメモリなどのデータの書き換えが可能な不揮発性メモリを備え、録音機能を有する無線通信装置、不揮発性メモリへデータを書き込む記録装置及び不揮発性メモリへデータを書き込む記録方法において、一時的な電源喪失が発生した場合でも、電源回復後、直ちにデータの記録の再開を可能にすることを目的とする。 The present invention has been made to solve the above-described problems of the conventional example, and includes, as a recording medium, a non-volatile memory capable of rewriting data, such as a flash memory, and a wireless communication apparatus having a recording function, An object of the present invention is to enable data recording to be resumed immediately after power is restored even in the event of a temporary power loss in a recording device for writing data to a volatile memory and a recording method for writing data to a non-volatile memory. .
上記目的を達成するために、本発明に係る録音機能を有する無線通信装置は、
基地局又は他の無線通信装置との間で交信を行う通信部と、前記基地局又は他の無線通信装置との間で行われた交信内容を記録するためのデータの書き換えが可能な不揮発性メモリを備えた記録部と、前記記録部への前記交信内容に対応する主データの書き込みを行う制御部とを備え、
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスの直前のアドレスのブロックに前記第2コードが記録されているか否かを判断し、前記第2コードが記録されているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、前記第2コードが記録されていないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする。
In order to achieve the above object, a wireless communication apparatus having a recording function according to the present invention,
Non-volatile memory capable of rewriting data for recording the content of communication performed between the base station or other wireless communication devices and the communication unit that communicates with the base station or other wireless communication devices. A recording unit including a memory, and a control unit that writes main data corresponding to the communication content to the recording unit,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the non-volatile memory, it is determined whether or not the second code is recorded in the block at the address immediately before the current address recorded in the second area. When the second code is recorded, it is assumed that the previous main data was normally recorded, and the first code, the new main data, and the second code are sequentially recorded from the block indicated by the current address. When writing is performed and the second code is not recorded, it is assumed that the previous main data was not normally recorded, and the first code, the new main data, and the first data are sequentially recorded from the block indicated by the backup address. Write 2 codes,
It is characterized by that.
また、本発明に係る他の録音機能を有する無線通信装置は、
基地局又は他の無線通信装置との間で交信を行う通信部と、前記基地局又は他の無線通信装置との間で行われた交信内容を記録するためのデータの書き換えが可能な不揮発性メモリを備えた記録部と、前記記録部への前記交信内容に対応する主データの書き込みを行う制御部とを備え、
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスとバックアップアドレスが一致しているか否かを判断し、現在アドレスとバックアップアドレスが一致しているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、現在アドレスとバックアップアドレスが一致していないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする。
In addition, the wireless communication device having another recording function according to the present invention,
Non-volatile memory capable of rewriting data for recording the content of communication performed between the base station or other wireless communication devices and the communication unit that communicates with the base station or other wireless communication devices. A recording unit including a memory, and a control unit that writes main data corresponding to the communication content to the recording unit,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the nonvolatile memory, it is determined whether or not the current address recorded in the second area matches the backup address, and the current address and the backup address are If they match, the first code, the new main data, and the second code are written in order from the block indicated by the current address, assuming that the previous main data was normally recorded, and the current address and When the backup addresses do not match, the first code, the new main data, and the second code are written in order from the block indicated by the backup address, assuming that the previous main data was not normally recorded. ,
It is characterized by that.
前記第2領域は、物理的に同一の不揮発性メモリ上の前記第1領域とは異なる領域であってもよい。 The second area may be an area different from the first area on the physically same nonvolatile memory.
または、前記第2領域は、前記第1領域として使用される不揮発性メモリとは異なる別の不揮発性メモリ上の領域であってもよい。 Alternatively, the second area may be an area on a non-volatile memory different from the non-volatile memory used as the first area.
また、前記制御部は、前記基地局又は他の無線通信装置との通話が所定時間以上途切れた場合、直前の通話内容を1つの主データとして記録してもよい。 Moreover, the said control part may record the content of the last call as one main data, when the call with the said base station or another radio | wireless communication apparatus interrupts more than predetermined time.
また、本発明に係る不揮発性メモリへデータを書き込む記録装置は、記録媒体としてのデータの書き換えが可能な不揮発性メモリと、前記不揮発性メモリに対するデータの書き込みを制御する制御部を備え、
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスの直前のアドレスのブロックに前記第2コードが記録されているか否かを判断し、前記第2コードが記録されているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、前記第2コードが記録されていないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする。
The recording device for writing data to the nonvolatile memory according to the present invention includes a nonvolatile memory capable of rewriting data as a recording medium, and a control unit that controls writing of data to the nonvolatile memory,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the non-volatile memory, it is determined whether or not the second code is recorded in the block at the address immediately before the current address recorded in the second area. When the second code is recorded, it is assumed that the previous main data was normally recorded, and the first code, the new main data, and the second code are sequentially recorded from the block indicated by the current address. When writing is performed and the second code is not recorded, it is assumed that the previous main data was not normally recorded, and the first code, the new main data, and the first data are sequentially recorded from the block indicated by the backup address. Write 2 codes,
It is characterized by that.
また、本発明に係る他の不揮発性メモリへデータを書き込む記録装置は、記録媒体としてのデータの書き換えが可能な不揮発性メモリと、前記不揮発性メモリに対するデータの書き込みを制御する制御部を備え、
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスとバックアップアドレスが一致しているか否かを判断し、現在アドレスとバックアップアドレスが一致しているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、現在アドレスとバックアップアドレスが一致していないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする。
Further, a recording device for writing data to another nonvolatile memory according to the present invention includes a nonvolatile memory capable of rewriting data as a recording medium, and a control unit that controls writing of data to the nonvolatile memory,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the nonvolatile memory, it is determined whether or not the current address recorded in the second area matches the backup address, and the current address and the backup address are If they match, the first code, the new main data, and the second code are written in order from the block indicated by the current address, assuming that the previous main data was normally recorded, and the current address and When the backup addresses do not match, the first code, the new main data, and the second code are written in order from the block indicated by the backup address, assuming that the previous main data was not normally recorded. ,
It is characterized by that.
また、本発明に係る不揮発性メモリへデータを書き込む記録方法は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスの直前のアドレスのブロックに前記第2コードが記録されているか否かを判断し、前記第2コードが記録されているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、前記第2コードが記録されていないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う
ことを特徴とする。
In addition, a recording method for writing data to the nonvolatile memory according to the present invention includes:
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the non-volatile memory, it is determined whether or not the second code is recorded in the block at the address immediately before the current address recorded in the second area. When the second code is recorded, it is assumed that the previous main data was normally recorded, and the first code, the new main data, and the second code are sequentially recorded from the block indicated by the current address. When writing is performed and the second code is not recorded, it is assumed that the previous main data was not normally recorded, and the first code, the new main data, and the first data are sequentially recorded from the block indicated by the backup address. Two codes are written.
また、本発明に係る他の不揮発性メモリへデータを書き込む記録方法は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスとバックアップアドレスが一致しているか否かを判断し、現在アドレスとバックアップアドレスが一致しているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、現在アドレスとバックアップアドレスが一致していないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする。
Further, a recording method for writing data to another nonvolatile memory according to the present invention is as follows.
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the nonvolatile memory, it is determined whether or not the current address recorded in the second area matches the backup address, and the current address and the backup address are If they match, the first code, the new main data, and the second code are written in order from the block indicated by the current address, assuming that the previous main data was normally recorded, and the current address and When the backup addresses do not match, the first code, the new main data, and the second code are written in order from the block indicated by the backup address, assuming that the previous main data was not normally recorded. ,
It is characterized by that.
本発明によれば、主データの書き込み中に電源喪失が生じた場合でも、書き込み中の主データは破壊され、再生不能となるが、次に記録される主データは、不揮発性メモリに記録されているバックアップアドレスが示すアドレスから書き込まれる。そのため、電源回復後、直ちにデータの記録を再開することができる。 According to the present invention, even when a power loss occurs during writing of the main data, the main data being written is destroyed and cannot be reproduced, but the next main data to be recorded is recorded in the nonvolatile memory. It is written from the address indicated by the backup address. Therefore, data recording can be resumed immediately after power is restored.
本発明の一実施形態に係る録音機能を有する無線通信装置、不揮発性メモリへデータを書き込む記録装置及び不揮発性メモリへの記録方法について説明する。図1は、本実施形態に係る無線通信装置1の基本的な構成を示すブロック図である。また、図2乃至図10は、不揮発性メモリの第1領域に第1コード(START)、主データ及び第2コード(END)を書き込むと共に、第2領域に現在アドレス及びバックアップアドレスを書き込む際の、概念図である。図2乃至図10において、便宜上、横方向1列を1つのブロックとし、複数のブロックを縦方向に並列している。
A wireless communication apparatus having a recording function, a recording apparatus for writing data to a nonvolatile memory, and a recording method for the nonvolatile memory according to an embodiment of the present invention will be described. FIG. 1 is a block diagram showing a basic configuration of a
図1に示すように、無線通信装置1は、基地局又は他の無線通信装置2との間で交信を行う通信部11と、基地局又は他の無線通信装置2との間で行われた交信内容を記録するためのデータの書き換えが可能な不揮発性メモリを備えた記録部12と、記録部12への交信内容に対応するデータの書き込み及び記録部12からのデータの読み出しを行う制御部13と、基地局又は他の無線通信装置2との間で交信を行うためのマイクロホン14、スピーカ15、表示部16、電源17などを備えている。
As illustrated in FIG. 1, the
記録部12は、主記録媒体として、例えばフラッシュメモリなどのデータの書き換えが可能な不揮発性メモリを備えている。不揮発性メモリの容量を、例えば1Gビット(128Mバイト)とした場合、通信用の高圧縮符号化を行うことにより、100時間程度の録音が可能になる。不揮発性メモリの容量は、特に限定されず、無線通信装置1の用途や使用に応じて適宜設定される。
The
無線通信装置1と、基地局又は他の無線通信装置2との間で行われる交信の通話時間は不定である。一般的には、1回の送信時間は数秒から数分程度であろうが、無線通信装置1と、基地局又は他の無線通信装置2は、交互に送受信を繰り返して交信するため、無線通信装置1は、通話が途絶えた時間が所定時間以上ならば、直前の通話内容を1つの録音単位として、その録音データ(主データ)を不揮発性メモリに記録する。具体的には、通信部11への無線信号の入感がなくなった時点又は通信部11が送信を停止した時点のいずれかでタイマーによるカウントを開始し、所定期間が経過するまでに通信部11が送信を行わなかったか又は通信部11への無線信号の入感がなかった場合に「通話が途切れた」と判断し、直前の通話内容を1つの録音単位とする。このように、1通話をタイマーによる通話が途絶えた時間で判断しているので、例えば基地局又は他の無線通信装置2からの指令のみを1通話として録音する場合もあれば、その指令に対する無線通信装置1からの返信も含めて1通話として録音する場合もある。
The call duration of communication performed between the
無線通信装置1では、一定期間、基地局又は他の無線通信装置2との間で行われた交信内容を記録する。そのため、制御部13は、記録部12の不揮発性メモリの所定の第1領域21(図2参照)をリングバッファとして使用する。その際、不揮発性メモリの第1領域21を所定のビット数(例えば8ビット)ごとにブロック化し、ブロックごとにアドレスを設定する。1ブロックのビット数は、8ビットに限定されず、16ビット、32ビット・・・であってもよい。前述のように、1通話当たりの通話時間は不定であるので、1通話当たりの主データの容量が不定となる。従って、制御部13は、不揮発性メモリの第1領域21を所定容量ごとの記録領域に仕切らず、第1領域21の未使用又は上書きされていないブロックのうち、最も小さいアドレスを有するブロックから順に主データを詰めて記録していく。そのため、主データの「始まり」と「終わり」を示すために、未使用又は上書きされていないブロックのうち、最も小さいアドレスを有するブロックに主データの始まりを表す所定の第1コード(図では「START」とする)を書き込む。また、主データの書き込みが終了すると、その次のブロックに主データの終わりを表す所定の第2コード(図では「END」とする)を書き込む。すなわち、主データはその前後を第1コードと第2コードで挟まれることになる。あるいは、主データと第1コード及び第2コードをまとめて1つの録音データと考えることも可能である。不揮発性メモリに記録されている録音データを再生する場合は、第2コード(END)から逆順に各ブロックに記載されているデータを検索し、第1コード(START)が現れたときに、この第1コード(START)から第2コード(END)までの間のデータを1つの録音データとして読み出して使用する。
The
この無線通信装置1では、電源喪失及び電源回復時に備えて、現在アドレスとバックアップアドレスを、不揮発性メモリのリングバッファとして使用される第1領域21とは異なる第2領域22に記録する。この現在アドレスとバックアップアドレスが記録される第2領域22は、リングバッファとして使用される第1領域21が設定されている不揮発性メモリと物理的に同一の不揮発性メモリ上に設定されていてもよいし、物理的に別の不揮発性メモリ上に設定されていてもよい。「現在アドレス」とは、現在データが書き込まれつつあるブロックのアドレスのことであり、1つのブロックにデータが書き込まれると、現在アドレスは次のブロックのアドレスに更新される。それに対して、「バックアップアドレス」とは、1つの主データを記録するに際して、最初に第1コード(START)が書き込まれたブロックのアドレスのことをいい、第2コード(END)がいずれかのブロックに書き込まれるまで更新されない。
In the
次に、この無線通信装置1における主データの正常な書き込み動作について説明する。図2は、不揮発性メモリの第1領域が未使用であり、1つの主データを第1領域に最初に記録する前の状態を表している。不揮発性メモリは、リングバッファとして使用される第1領域21と、現在アドレス及びバックアップアドレスが記録される第2領域22を有する。制御部13は、第1領域21の最も小さいアドレス(例えば・・・001)を有するブロックに主データの始まりを表す所定の第1コード(START)を書き込む。このとき、現在アドレス及びバックアップアドレスの初期値として上記アドレス(・・・001)があらかじめ第2領域22に記録されていてもよいし、この段階で第1コードを書き込んだブロックのアドレスを現在アドレス及びバックアップアドレスとして第2領域22に記録してもよい。
Next, a normal writing operation of main data in the
第1コード(START)が最も小さいアドレスを有するブロックに書き込まれると、図3に示すように、制御部13は、次のブロックから順に主データを書き込むと共に、第2領域22に記録されている現在アドレスを現在主データが書き込まれつつあるブロックのアドレスに順次更新する。この間、バックアップアドレスは更新されない。主データの書き込みが終了すると、図4に示すように、その次のブロックに主データの終わりを表す所定の第2コード(END)を書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして第2領域22に書き込む。正常に主データが第1領域21に記録されると、前述のようにその主データは第1コード(START)と第2コード(END)で挟まれることとなる。
When the first code (START) is written in the block having the smallest address, the
次の主データを不揮発性メモリの第1領域21に書き込む際、制御部13は、第2領域に記録されている現在アドレスの1つ前のアドレスの示すブロックに第2コードが記録されているか否かを判断する。前の主データが正常に記録されている場合、図5に示すように、現在アドレスの1つ前のアドレスの示すブロックに第2コードが記録されているので、制御部13は、現在アドレスの示すブロックに第1コード(START)を書き込み、上記図2乃至図4に示す動作を行う。
When writing the next main data to the
次に、この無線通信装置1における主データの正常に書き込まれなかった場合に、次の主データを書き込む動作について説明する。電源喪失による主データの書き込み異常は、次の5つのパターンで起こりうる。
(1)第1コード(START)を書き込むときに異常が発生する場合
(2)主データを書き込んでいる間に異常が発生する場合
(3)第2コード(END)を書き込むときに異常が発生する場合
(4)現在アドレスを更新しているときに異常が発生する場合
(5)バックアップアドレスを更新するときに異常が発生する場合
Next, an operation for writing the next main data when the main data is not normally written in the
(1) When an error occurs when writing the first code (START) (2) When an error occurs while writing the main data (3) An error occurs when writing the second code (END) (4) When an error occurs while updating the current address (5) When an error occurs when updating the backup address
図6は、第1コード(START)を書き込むときに異常が発生したときの状態を示す。1つ前の主データは正常に記録されているので、第1コード(START)の書き込みに失敗したブロックの1つ前のブロックには第2コード(END)が記録されている。また、第2コード(END)が正常に記録されているので、第2領域22には、第1コード(START)の書き込みに失敗したブロックのアドレスが現在アドレス及びバックアップアドレスとして記録されていて、これら現在アドレス及びバックアップアドレスは健在である。電源が回復すると、制御部13によるデータの書き込み動作がリセットされる。その際、通信部11からデータが出力され続けていると、制御部13は、第2領域22に記録されている現在アドレスに基づいて、そのアドレスが示すブロック、すなわち、第1コード(START)の書き込みに失敗したブロックの1つ前のブロックを検索する。現在アドレスが示すブロックの1つ前のブロックには第2コード(END)が記録されているので、制御部13は、前回の主データの記録が正常に終了しているものと判断して、現在アドレスが示すブロックに、新たな第1コード(START)を上書きする(図5に示す場合と同様)。そして、第1コード(START)の上書きが終了すると、制御部13は、次のブロックから順に主データ、第2コード(END)を書き込む(図3及び図4参照)。この場合、電源喪失中のデータは失われ、また第1コード(START)が記録されたブロックの上書き回数が増加するものの、電源回復後、直ちに録音を再開することができる。
FIG. 6 shows a state when an abnormality occurs when writing the first code (START). Since the previous main data is normally recorded, the second code (END) is recorded in the block immediately before the block in which the writing of the first code (START) has failed. Since the second code (END) is normally recorded, the address of the block in which the writing of the first code (START) has failed is recorded in the
図7は、主データを書き込んでいる間に異常が発生したときの状態を示す。主データの書き込みが進むにつれて、データが書き込まれつつあるブロックが移動し、それに伴って現在アドレスも順次更新されている。主データの書き込み中に電源喪失が生じ、その後電源が回復すると、制御部13によるデータの書き込み動作がリセットされる。その際、通信部11からデータが出力され続けていると、制御部13は、第2領域22に記録されている現在アドレスに基づいて、そのアドレスが示すブロック、すなわち、主データの書き込みに失敗したブロックの1つ前のブロックを検索する。この場合、現在アドレスが示すブロックの1つ前のブロックには第2コード(END)が記録されていないので、制御部13は、前回の主データの記録が正常に終了していないものと判断して、バックアップアドレスの示すブロックに、新たな第1コード(START)を上書きする(図5に示す場合と同様)。そして、第1コード(START)の上書きが終了すると、制御部13は、次のブロックから順に主データ、第2コード(END)を書き込む(図3及び図4参照)。この場合、電源喪失中のデータは失われ、また第1コード(START)及び電源喪失が生じるまでデータが記録されたブロックの上書き回数が増加するものの、電源回復後、直ちに録音を再開することができる。
FIG. 7 shows a state when an abnormality occurs while main data is being written. As the main data writing proceeds, the block in which the data is being written moves, and the current address is sequentially updated accordingly. When the power supply is lost during the writing of the main data and then the power is restored, the data writing operation by the
図8は、第2コード(END)を書き込むときに異常が発生したときの状態を示す。主データの書き込みが完了し、続いて第2コード(END)を書き込むときに電源喪失が生じると、制御部13によるデータの書き込み動作は事実上終了する。その際、第2領域に記録されている現在アドレスは、その第2コード(END)を書き込もうとしたブロックのアドレスに更新されているが、バックアップデータは更新されておらず、直前の第1コード(START)が記録されたブロックのアドレスを示している。その後電源が回復し、制御部13による新たなデータの書き込み動作が開始されると、制御部13は、第2領域22に記録されている現在アドレスに基づいて、そのアドレスが示すブロック、すなわち、第2コード(END)の書き込みに失敗したブロックの1つ前のブロックを検索する。この場合、現在アドレスが示すブロックの1つ前のブロックには第2コード(END)が記録されていないので、制御部13は、前回の主データの記録が正常に終了していないものと判断して、バックアップアドレスの示すブロックに、新たな第1コード(START)を上書きする(図5に示す場合と同様)。そして、第1コード(START)の上書きが終了すると、制御部13は、次のブロックから順に主データ、第2コード(END)を書き込む(図3及び図4参照)。この場合、1つ前の主データは正常に記録されたものの、その主データは第1コード(START)と第2コード(END)で挟まれていないので、その主データは新たな主データによって上書きされて失われる。また、第1コード(START)及び主データが記録されたブロックの上書き回数が増加するものの、電源回復後、直ちに録音を再開することができる。
FIG. 8 shows a state when an abnormality occurs when writing the second code (END). When the main data writing is completed, and the power loss occurs when the second code (END) is subsequently written, the data writing operation by the
図9は、現在アドレスを第2領域22に書き込む(更新する)ときに異常が発生したときの状態を示す。現在アドレスを書き込むときに電源喪失が生じると、第2領域22に書き込まれた現在アドレスの値が不定となり、どのブロックを示すかわからなくなる。その場合でも、バックアップアドレスは更新されておらず、直前に第1コード(START)が記録されたブロックのアドレスを示している。ほとんどの場合、不定の現在アドレスが示すブロックの直前のブロックには第2コード(END)が記録されていないので、制御部13は、前回の主データの記録が正常に終了していないものと判断する。その場合の動作は、上記の各場合と同様である。ところが、不定の現在アドレスが、偶然、過去に第1コードが記録されたブロックのアドレスを示すこともあり得る。本来は、現在アドレスの書き込み異常として処理すべきであるが、この場合は、現在アドレスが示すブロックの1つ前のブロックに第2コード(END)が記録されているので、制御部13は、前回の主データの記録が正常に終了しているものと判断して、偶然現在アドレスが示したブロックから順に、新たな第1コード(START)、主データ、第2コード(END)を上書きする。この場合、新たなデータが上書きされたブロックに記録されていた過去のデータは失われるが、不定の現在アドレスが、偶然、過去に第1コードが記録されたブロックを示す可能性は、現実には極めて低い。
FIG. 9 shows a state when an abnormality occurs when writing (updating) the current address in the
図10は、バックアップアドレスを第2領域22に書き込む(更新する)ときに異常が発生したときの状態を示す。バックアップアドレスを書き込むときに電源喪失が生じると、第2領域22に書き込まれるバックアップアドレスの値が不定となり、どのブロックを示すかわからなくなる。ところが、バックアップアドレスの更新よりも前に現在アドレスが更新されており、更新された現在アドレスは健在である。従って、電源回復後、制御部13による新たなデータの書き込み動作が開始されると、制御部13は、第2領域22に記録されている現在アドレスに基づいて、そのアドレスが示すブロックの1つ前のブロックを検索する。この場合、現在アドレスが示すブロックの1つ前のブロックには第2コード(END)が記録されているので、制御部13は、前回の主データの記録が正常に終了しているものと判断して、バックアップアドレスを現在アドレスに更新し、新たな第1コード(START)、主データ、第2コード(END)の書き込みを行う。
FIG. 10 shows a state when an abnormality occurs when the backup address is written (updated) in the
このように、本実施形態に係る無線通信装置1によれば、電源17の喪失によって、そのとき記録部12の不揮発性メモリの第1領域21に書き込まれつつあった主データは失われ、再生することができないものの、次に新たな主データを書き込む際には、不揮発性メモリの第2領域22に記録されているバックアップアドレスが示すブロックなどから、書き込みを実行することができる。
As described above, according to the
上記実施形態によれば、電源喪失による主データの書き込み失敗が生じた場合、不揮発性メモリの第1領域21のうちバックアップアドレスなどが示すアドレスのブロックは、通常のブロックよりも多くデータが上書きされることになる。また、フラッシュメモリなどの不揮発性メモリは、その上書き回数が制限されているが、一般的に105回程度保証されている。前述のように、この無線通信装置1では、不揮発性メモリをリングバッファとして使用する場合、1回の書き込みで100時間程度連続して録音が可能である。そのため、この無線通信装置1を、不揮発性メモリが使用不能になるまで使用したと仮定すると、100(時間)×105(上書き回数)÷365(日)÷24(時間)≒1140(年)となる。この値は、通常の無線通信装置の耐用期間を遙かに超えるものであり、不揮発性メモリの第1領域21の上書き回数は、事実上無視することができる。
According to the above embodiment, when a main data write failure occurs due to power loss, the block at the address indicated by the backup address in the
一方、不揮発性メモリの第2領域22に記録される現在アドレスは、データが書き込まれつつあるブロックが移動するたびに更新されるので、不揮発性メモリの第1領域21の容量を前述の1Gビット(128Mバイト)と仮定して、第1領域21を8ビット(1バイト)ごとにブロックに分割したとすると、第1領域21がその領域の先頭から最後まで使用される間に現在データは106(回)更新されることになる。現在アドレスを、毎回第2領域22の同じブロックに上書きしたとすると、第1領域21をリングバッファとして1回使用しただけで、第2領域22の特定ブロックの上書き可能回数を超えてしまう可能性がある。そのため、第2領域22としてある程度の容量(ブロック数)を確保しておき、第2領域22をリングバッファとして使用し、現在アドレス及びバックアップアドレスを毎回異なる領域に書き込むようにしてもよい。
On the other hand, the current address recorded in the
また、上記説明において、図6乃至図10に示す、電源喪失による主データの書き込み異常が発生する5つのパターンのうち、図10に示すバックアップアドレスを更新するときに異常が発生する場合を除いては、バックアップアドレスが健在であれば、現在アドレスが失われていても、バックアップアドレスが示すブロックから主データの書き込みを再開することができる。また、図10に示す場合、バックアップアドレスよりも先に現在アドレスが更新されているので、正常に主データが書き込まれた場合と実質的に差はない。 In the above description, except for the case where an abnormality occurs when updating the backup address shown in FIG. 10 among the five patterns shown in FIGS. If the backup address is alive, writing of the main data can be resumed from the block indicated by the backup address even if the current address is lost. In the case shown in FIG. 10, since the current address is updated before the backup address, there is substantially no difference from the case where the main data is normally written.
上記実施形態では、現在アドレスの直前に第2コード(END)が記録されているか否かによって、主データが正常に記録されているか否かを判断しているが、不揮発性メモリの第2領域22に記録されている現在アドレスとバックアップアドレスが一致するか否かを判断することによって、主データが正常に記録されているか否かを判断することも可能である。すなわち、第1コード(START)、主データ、第2コード(END)の順に、書き込みが正常に終了した場合にのみ、現在アドレスとバックアップアドレスが一致する。この方法によっても、バックアップアドレスの書き込み中に電源喪失が発生した場合を除いて、電源回復後、直ちに次の主データの書き込みを行うことができる。 In the above embodiment, whether or not the main data is normally recorded is determined based on whether or not the second code (END) is recorded immediately before the current address. It is also possible to determine whether or not the main data is normally recorded by determining whether or not the current address recorded in 22 matches the backup address. That is, the current address and the backup address match only when the writing is normally completed in the order of the first code (START), the main data, and the second code (END). With this method, the next main data can be written immediately after the power is restored, except when the power loss occurs during the writing of the backup address.
なお、本発明は上記録音機能を有する無線通信装置に限定されるものではなく、無線通信装置から無線通信機能を省略した記録装置として、又は不揮発性メモリへの記録方法として応用することが可能である。記録装置としては、前述のフライトレコーダ(ドライブレコーダ)やボイスレコーダに使用することが可能である。 The present invention is not limited to the wireless communication device having the recording function, but can be applied as a recording device in which the wireless communication function is omitted from the wireless communication device or as a recording method in a nonvolatile memory. is there. The recording device can be used for the above-described flight recorder (drive recorder) or voice recorder.
1 録音機能を有する無線通信装置
2 基地局又は他の無線通信装置
11 通信部
12 記憶部
13 制御部
17 電源
21 第1領域(記録領域)
22 第2領域(他の領域)
DESCRIPTION OF
22 2nd area (other areas)
Claims (9)
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスの直前のアドレスのブロックに前記第2コードが記録されているか否かを判断し、前記第2コードが記録されているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、前記第2コードが記録されていないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする無線通信装置。 Non-volatile memory capable of rewriting data for recording the content of communication performed between the base station or other wireless communication devices and the communication unit that communicates with the base station or other wireless communication devices. A wireless communication apparatus having a recording function, comprising: a recording unit including a memory; and a control unit that writes main data corresponding to the communication content to the recording unit,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the non-volatile memory, it is determined whether or not the second code is recorded in the block at the address immediately before the current address recorded in the second area. When the second code is recorded, it is assumed that the previous main data was normally recorded, and the first code, the new main data, and the second code are sequentially recorded from the block indicated by the current address. When writing is performed and the second code is not recorded, it is assumed that the previous main data was not normally recorded, and the first code, the new main data, and the first data are sequentially recorded from the block indicated by the backup address. Write 2 codes,
A wireless communication apparatus.
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスとバックアップアドレスが一致しているか否かを判断し、現在アドレスとバックアップアドレスが一致しているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、現在アドレスとバックアップアドレスが一致していないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする無線通信装置。 Non-volatile memory capable of rewriting data for recording the content of communication performed between the base station or other wireless communication devices and the communication unit that communicates with the base station or other wireless communication devices. A wireless communication apparatus having a recording function, comprising: a recording unit including a memory; and a control unit that writes main data corresponding to the communication content to the recording unit,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the nonvolatile memory, it is determined whether or not the current address recorded in the second area matches the backup address, and the current address and the backup address are If they match, the first code, the new main data, and the second code are written in order from the block indicated by the current address, assuming that the previous main data was normally recorded, and the current address and When the backup addresses do not match, the first code, the new main data, and the second code are written in order from the block indicated by the backup address, assuming that the previous main data was not normally recorded. ,
A wireless communication apparatus.
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスの直前のアドレスのブロックに前記第2コードが記録されているか否かを判断し、前記第2コードが記録されているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、前記第2コードが記録されていないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする記録装置。 A recording device for writing data to a nonvolatile memory, comprising a nonvolatile memory capable of rewriting data as a recording medium, and a control unit that controls writing of data to the nonvolatile memory,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the non-volatile memory, it is determined whether or not the second code is recorded in the block at the address immediately before the current address recorded in the second area. When the second code is recorded, it is assumed that the previous main data was normally recorded, and the first code, the new main data, and the second code are sequentially recorded from the block indicated by the current address. When writing is performed and the second code is not recorded, it is assumed that the previous main data was not normally recorded, and the first code, the new main data, and the first data are sequentially recorded from the block indicated by the backup address. Write 2 codes,
A recording apparatus.
前記制御部は、
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスとバックアップアドレスが一致しているか否かを判断し、現在アドレスとバックアップアドレスが一致しているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、現在アドレスとバックアップアドレスが一致していないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする記録装置。 A recording device for writing data to a nonvolatile memory, comprising a nonvolatile memory capable of rewriting data as a recording medium, and a control unit that controls writing of data to the nonvolatile memory,
The controller is
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the nonvolatile memory, it is determined whether or not the current address recorded in the second area matches the backup address, and the current address and the backup address are If they match, the first code, the new main data, and the second code are written in order from the block indicated by the current address, assuming that the previous main data was normally recorded, and the current address and When the backup addresses do not match, the first code, the new main data, and the second code are written in order from the block indicated by the backup address, assuming that the previous main data was not normally recorded. ,
A recording apparatus.
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスの直前のアドレスのブロックに前記第2コードが記録されているか否かを判断し、前記第2コードが記録されているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、前記第2コードが記録されていないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う
ことを特徴とする記録方法。 A recording method for writing data to a nonvolatile memory,
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the non-volatile memory, it is determined whether or not the second code is recorded in the block at the address immediately before the current address recorded in the second area. When the second code is recorded, it is assumed that the previous main data was normally recorded, and the first code, the new main data, and the second code are sequentially recorded from the block indicated by the current address. When writing is performed and the second code is not recorded, it is assumed that the previous main data was not normally recorded, and the first code, the new main data, and the first data are sequentially recorded from the block indicated by the backup address. A recording method comprising writing two codes.
(a)前記不揮発性メモリの第1領域を、その第1領域の先頭からデータを書き込み、前記第1領域の最後に達すると、先頭に戻って上書きを行うリングバッファとして使用し、前記第1領域を所定のビット数ごとにブロック化し、ブロックごとにアドレスを設定し、
(b)現在、データが書き込まれつつあるブロックのアドレスを、現在アドレスとして前記不揮発性メモリの第2領域に書き込み、
(c)1つの主データを前記第1領域に記録する際、前記主データの始まりを表す所定の第1コードを書き込んだ後、次のブロックから前記主データの書き込みを開始し、前記主データの書き込みが終了すると、その次のブロックに前記主データの終わりを表す所定の第2コードを書き込むと共に、さらにその次のブロックのアドレスに現在アドレスを更新してから、同じブロックのアドレスをバックアップアドレスとして前記第2領域に書き込み、
(d)次に、新たな主データを前記不揮発性メモリに書き込む際、前記第2領域に記録されている現在アドレスとバックアップアドレスが一致しているか否かを判断し、現在アドレスとバックアップアドレスが一致しているときは、前回の主データが正常に記録されたものとして、前記現在アドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行い、現在アドレスとバックアップアドレスが一致していないときは、前回の主データが正常に記録されなかったものとして、前記バックアップアドレスの示すブロックから順に前記第1コード、新たな主データ及び前記第2コードの書き込みを行う、
ことを特徴とする記録方法。 A recording method for writing data to a nonvolatile memory,
(A) The first area of the non-volatile memory is used as a ring buffer in which data is written from the beginning of the first area, and when reaching the end of the first area, the first area is overwritten and overwritten. Block the area by a predetermined number of bits, set the address for each block,
(B) writing the address of the block in which data is currently written into the second area of the nonvolatile memory as the current address;
(C) When recording one main data in the first area, after writing a predetermined first code representing the start of the main data, the writing of the main data is started from the next block, and the main data Is written, a predetermined second code indicating the end of the main data is written to the next block, the current address is updated to the address of the next block, and then the address of the same block is set to the backup address. To the second area as
(D) Next, when writing new main data to the nonvolatile memory, it is determined whether or not the current address recorded in the second area matches the backup address, and the current address and the backup address are If they match, the first code, the new main data, and the second code are written in order from the block indicated by the current address, assuming that the previous main data was normally recorded, and the current address and When the backup addresses do not match, the first code, the new main data, and the second code are written in order from the block indicated by the backup address, assuming that the previous main data was not normally recorded. ,
And a recording method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014202312A JP6311560B2 (en) | 2014-09-30 | 2014-09-30 | Wireless communication device having recording function, recording device for writing data to nonvolatile memory, and recording method for writing data to nonvolatile memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014202312A JP6311560B2 (en) | 2014-09-30 | 2014-09-30 | Wireless communication device having recording function, recording device for writing data to nonvolatile memory, and recording method for writing data to nonvolatile memory |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016071745A true JP2016071745A (en) | 2016-05-09 |
JP6311560B2 JP6311560B2 (en) | 2018-04-18 |
Family
ID=55864815
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014202312A Active JP6311560B2 (en) | 2014-09-30 | 2014-09-30 | Wireless communication device having recording function, recording device for writing data to nonvolatile memory, and recording method for writing data to nonvolatile memory |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6311560B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH086865A (en) * | 1994-06-22 | 1996-01-12 | Casio Comput Co Ltd | Data processor |
JPH08249091A (en) * | 1995-03-15 | 1996-09-27 | Toshiba Corp | Data storage device |
JPH11282765A (en) * | 1998-03-27 | 1999-10-15 | Hitachi Ltd | External storage device using flash memory |
JP2002544590A (en) * | 1999-05-07 | 2002-12-24 | ギーゼッケ ウント デフリエント ゲーエムベーハー | Safe writing method of ring memory pointer |
JP2010117956A (en) * | 2008-11-14 | 2010-05-27 | Fuji Electric Holdings Co Ltd | Information processor |
-
2014
- 2014-09-30 JP JP2014202312A patent/JP6311560B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH086865A (en) * | 1994-06-22 | 1996-01-12 | Casio Comput Co Ltd | Data processor |
JPH08249091A (en) * | 1995-03-15 | 1996-09-27 | Toshiba Corp | Data storage device |
JPH11282765A (en) * | 1998-03-27 | 1999-10-15 | Hitachi Ltd | External storage device using flash memory |
JP2002544590A (en) * | 1999-05-07 | 2002-12-24 | ギーゼッケ ウント デフリエント ゲーエムベーハー | Safe writing method of ring memory pointer |
JP2010117956A (en) * | 2008-11-14 | 2010-05-27 | Fuji Electric Holdings Co Ltd | Information processor |
Also Published As
Publication number | Publication date |
---|---|
JP6311560B2 (en) | 2018-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100288203B1 (en) | Real time data recording method | |
JP4560408B2 (en) | Method for controlling nonvolatile memory device | |
US20050028067A1 (en) | Data with multiple sets of error correction codes | |
US8276044B2 (en) | Method for appending data to tape medium, and apparatus employing the same | |
KR20090042337A (en) | Information recording medium, recording apparatus, reproduction apparatus, integrated circuit and computer program allowing for updating of a defect list | |
US9465538B2 (en) | Flash memory control chip and data storage device and flash memory control method | |
JP2007241618A (en) | Nonvolatile storage device and its write determination method | |
US10009574B2 (en) | Transferring multiple records including video data to/from host | |
KR20010075124A (en) | Recording medium with write protected defect list | |
JPH0135427B2 (en) | ||
JP2005525668A (en) | Hard disk drive system, method and apparatus using such a system | |
US20200167235A1 (en) | Data processing method for solid state drive | |
JP6311560B2 (en) | Wireless communication device having recording function, recording device for writing data to nonvolatile memory, and recording method for writing data to nonvolatile memory | |
KR100954603B1 (en) | A log file of file system and method for recovering file system | |
JP4150861B2 (en) | Information recording medium, defect management method, information recording / reproducing apparatus, and information reproducing apparatus | |
CN107273051B (en) | The reading/writing method and device of I/O data | |
JPWO2016136014A1 (en) | Surveillance recorder | |
CN111104256A (en) | Data reading method, device, equipment and storage medium | |
US6804075B1 (en) | Logical expiration of media having embedded non-volatile memory | |
JP4866114B2 (en) | MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD | |
JP2006338731A (en) | Data write method | |
US10073735B1 (en) | Seeding mechanism for error detection codes | |
JP2005316667A (en) | Method for updating firmware | |
CN111158589B (en) | Dynamic management method and device for storage array | |
JP6884675B2 (en) | Video server and broadcasting system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170601 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180214 |
|
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: 20180220 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180305 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6311560 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |