JP4644967B2 - Portable information terminal device - Google Patents
Portable information terminal device Download PDFInfo
- Publication number
- JP4644967B2 JP4644967B2 JP2001118252A JP2001118252A JP4644967B2 JP 4644967 B2 JP4644967 B2 JP 4644967B2 JP 2001118252 A JP2001118252 A JP 2001118252A JP 2001118252 A JP2001118252 A JP 2001118252A JP 4644967 B2 JP4644967 B2 JP 4644967B2
- Authority
- JP
- Japan
- Prior art keywords
- area
- erasure
- erase
- management area
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 230000000694 effects Effects 0.000 claims 1
- 238000000034 method Methods 0.000 description 46
- 230000006870 function Effects 0.000 description 7
- 238000005286 illumination Methods 0.000 description 7
- 238000003384 imaging method Methods 0.000 description 2
- 229920001690 polydopamine Polymers 0.000 description 2
- 125000002066 L-histidyl group Chemical group [H]N1C([H])=NC(C([H])([H])[C@](C(=O)[*])([H])N([H])[H])=C1[H] 0.000 description 1
- 235000004347 Perilla Nutrition 0.000 description 1
- 244000124853 Perilla frutescens Species 0.000 description 1
- 239000003990 capacitor Substances 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
Images
Landscapes
- Calculators And Similar Devices (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、フラッシュメモリを備え着脱可能な電池を電源として動作する携帯情報端末装置に関する。
【0002】
【発明が解決しようとする課題】
バーコードや二次元コードなどを光学的に読み取る携帯型のコードスキャナ (ハンディターミナル)、携帯電話装置、PDAなどの携帯情報端末装置は、読み取ったコードデータ、電話番号データ、PIMデータなどを記憶するための記憶手段としてフラッシュメモリを備えている。これらの携帯情報端末装置には電池が収納されており、その電池は使用者により交換可能となっている。
【0003】
携帯情報端末装置の制御手段(マイクロコンピュータ)は、フラッシュメモリのブロックに記憶されているデータが不要となった場合、特定のブロックに記憶されているデータを書き替える場合、使用済みクラスタを含むブロックを未使用クラスタからなるブロックにする場合(ガーベジコレクション)、電源のオフに際しRAM上にある必要なデータをフラッシュメモリに退避する場合などにおいてブロックの消去処理を実行する。この消去処理は、各ブロックについて例えば700msec程度の時間を要する。この消去処理の間は、使用者が携帯情報端末装置の電源スイッチをオフ操作してもその操作は受け付けられないようになっている。
【0004】
しかし、例えばこの消去処理の間に使用者が電池を取り外してしまうと、フラッシュメモリへの電源供給が断たれ、消去処理が中断(中止)してしまう。その結果、フラッシュメモリについて制御手段が管理している消去状態と実際の消去状態とが異なってしまい、制御手段が次に上記消去中断ブロックに書き込みを行うと書き込みエラーが発生する。このエラーは使用者では対応できないものであるため、例えば表示部に「フラッシュメモリへの上書きが発生しました」という警告を表示し、使用者に対し修理依頼を促すなどの対策がとられていた。
【0005】
本発明は上記事情に鑑みてなされたもので、その目的は、フラッシュメモリの消去処理中に電池が取り外された場合であっても、その消去処理を正常に完了することができる携帯情報端末装置を提供することにある。
【0006】
【課題を解決するための手段】
請求項1に記載した手段によれば、フラッシュメモリの記憶領域の一部が当該フラッシュメモリの消去状態に関する情報を記憶する消去管理領域とされる。そして、消去制御手段は、フラッシュメモリの指定領域の消去処理を実行する場合、フラッシュメモリの消去動作が完了した後、その消去管理領域に当該指定領域の消去完了を示す情報を書き込む。これにより、消去管理領域には、指定領域の消去動作が完了したか否かの情報つまり消去状態に関する情報が記憶されるので、消去制御手段は、この情報を参照することにより消去動作が中断された領域を特定できる。
【0007】
そして、消去制御手段は、電源投入時に上記消去中断領域を特定する処理を実行し、消去中断領域が存在する場合にはその領域の消去動作を再実行するので、フラッシュメモリの消去処理中に電池が取り外されて消去動作が中断された場合であっても、その消去処理を正常に完了することができる。
【0008】
消去制御手段は、指定領域の消去処理を実行する前に消去管理領域の未使用領域をサーチしその未使用領域に当該指定領域を特定するための領域番号を書き込み、消去動作が完了した後その領域番号に対応させて消去完了を示す情報を書き込む。これにより、消去制御手段は、これら領域番号とそれに対応した情報とに基づいて消去中断領域を特定できる。また、この手段によれば、消去管理領域の未使用領域がなくなるまでの間、消去管理領域には書き込み処理しか発生しないので、ブロックデータの一部書き替えができない特性を持つフラッシュメモリに適した手段となる。さらに、消去管理領域の未使用領域がなくなった場合には、請求項2に記載した手段により消去管理領域を消去すれば、消去管理領域を継続して使用可能となる。
【0009】
請求項3に記載した手段によれば、消去管理領域に整合性データ領域が設けられ、消去制御手段は、整合性データ領域に対し消去管理領域の消去動作に先立って消去動作中であることを示す不整合データを書き込み、消去動作の終了後に消去動作が完了したことを示す整合データを書き込む。ただし、不整合データは、一旦整合データが書き込まれた後に書き込まれるデータであるため、ビットクリアあるいはビットセットなどのフラッシュメモリの特性上再書き込み可能なデータである。これにより、整合性データ領域には、消去管理領域の消去動作が完了したか否かの情報つまり消去管理領域の消去状態に関する情報が記憶される。
【0010】
そして、消去制御手段は、電源投入時に整合性データ領域に整合データが記憶されていない場合に消去管理領域の消去動作を再実行するので、消去管理領域の消去処理中に電池が取り外されて消去動作が中断された場合であっても、消去管理領域の消去処理を正常に完了することができる。
【0011】
請求項4に記載した手段によれば、消去中断領域の消去動作を再実行する場合にその旨が表示手段に表示されるので、使用者は電源投入時における待ち時間の発生原因を認識することができる。
【0012】
【発明の実施の形態】
以下、本発明をバーコードスキャナに適用した一実施形態について図面を参照しながら説明する。
図5は、バーコードスキャナの外観を示している。このバーコードスキャナ1(携帯情報端末装置に相当)は、使用者が手で持って操作を行うハンディターミナルと称されるもので、バーコードの読取り機能、読み取ったバーコードデータの処理機能や記憶機能、図示しない外部装置例えばパソコンとのデータ通信機能などを備えている。
【0013】
バーコードスキャナ1のケース2は、基端側が握り部とされ、先端側がやや幅広となるとともに前方にやや下降傾斜するように折れ曲がり、その先端部が読取部とされている。ケース2の基端側の上面部には、キー入力部3を構成する複数のキースイッチ3aが配設されている。各キースイッチ3aのキー上面には記号が表示されており、「PW」が電源キー、「BS」が後退キー、「C」がキャンセルキー、「SF」がシフトキー、「M1」と「M2」が割当キー、「ENT」が決定キー、「0」〜「9」が数字キー、「.」がピリオドキー、「F1」〜 「F8」がファンクションキーとなっている。使用者は、割当キー「M1」と 「M2」に種々の機能(例えば頻繁に使用する機能)を割り当てて使用することができる。
【0014】
ケース2の側面部には読取用のトリガスイッチ4が設けられ、ケース2の先端側の上面部には例えば液晶表示装置からなる表示部5(表示手段に相当)が設けられている。これらキースイッチ3aや表示部5は、ケース2内に配設されたプリント基板(図示せず)に実装されている。また、ケース2の基端側内部には、バーコードスキャナ1の電源となる着脱可能な電池6が収納されている。
【0015】
図4は、バーコードスキャナ1の電気的構成を機能ブロックにより示したものである。制御回路7には、上述したキー入力部3、トリガスイッチ4および表示部5が接続されているとともに、RAM8、フラッシュメモリ9、照明用LED10、ラインセンサ11およびデータ通信部12が接続されている。これらは上記電池6から電源供給を受けて動作するようになっており、バーコードスキャナ1から電池6が取り外されると、図示しない平滑用コンデンサの電荷によって数msecの間動作を維持した後動作を停止する。なお、RAM8は図示しない別の電池によって常時バックアップされている。
【0016】
制御回路7は、CPUを主体とするマイクロコンピュータにより構成されており、本発明でいう消去制御手段に相当する。この制御回路7は、フラッシュメモリ9に記憶されている処理プログラム(アプリケーションプログラム)に従って、上述したバーコード読取り処理、読み取ったバーコードデータの処理や記憶、パソコンとのデータ通信処理を実行するようになっている。
【0017】
RAM8には、読み取ったバーコードデータや作業用データなどが一時的に記憶されるようになっている。また、フラッシュメモリ9は、周知のようにブロックを単位として一括消去可能に構成されており、上記処理プログラムの他に、後述する消去制御プログラム、バーコードデータや商品名データなどからなるユーザデータファイル、パラメータデータ、作業用データなどが記憶されるようになっている。さらに、フラッシュメモリ9の記憶領域の一部は、当該フラッシュメモリ9の消去処理において消去状態が記憶される消去管理領域として用いられている。
【0018】
照明用LED10は、複数のLEDからなるバーコード読取用の照明光源であって、制御回路7は、トリガスイッチ4が押圧操作されたことに応じてこの照明用LED10を点滅動作させるようになっている。この照明光は、図示しない照明用レンズを通して読取対象であるバーコードに照射される。
【0019】
ラインセンサ11は、図示しないフォトダイオードをライン状に並べて構成される一次元のイメージセンサであって、照明光を照射した状態でバーコードから反射される反射光を図示しない撮像用レンズを通して撮像し、その撮像信号を制御回路7に出力するようになっている。
【0020】
データ通信部12は、IrDAなどによる光通信、通信ケーブルを介した通信、または小電力の無線通信の何れかにより、上記パソコンとの間でデータ通信を行うようになっている。
【0021】
次に、上記構成の動作について図1ないし図3も参照しながら説明する。
フラッシュメモリ9は、例えば64kバイトの記憶容量を持つブロックを単位として消去可能に構成されている。各ブロックにはブロック番号が付されており、ブロック番号0、1、2、…が付されたブロックをそれぞれブロック0、ブロック1、ブロック2、…とする。これらブロックには、上記処理プログラム、消去制御プログラム、ユーザデータなどが記憶されるとともに、消去管理領域として使用されてブロックの消去状態が記憶される。消去管理領域は、ブロック消去処理の途中で電池6が取り外されたことにより消去動作が中断した場合に、その消去中断ブロックを検出するために用いられる。
【0022】
図3は、消去管理領域の記憶内容を具体的に示したものである。本実施形態では、000000Hから00FFFFHまでのアドレスを持つブロック0を消去管理領域とし、アドレス010000Hから01FFFFHまでのアドレスを持つブロック1と020000Hから02FFFFHまでのアドレスを持つブロック2とをユーザデータ領域としている。このユーザデータ領域であるブロック1と2とは、使用者がキー入力部3から消去指令を入力した場合、ガーベジコレクションの実行時などにおいて消去される。
【0023】
消去管理領域のうちアドレス000000Hから00000FHまでの16バイトは、整合性データ領域として用いられる。後述するように、消去管理領域の未使用領域がなくなった場合にはブロック0自体も消去される場合があり、この間に電池6が取り外されると消去動作が中断してしまう。整合性データ領域には、ブロック0の消去処理中を除いて予め決められた整合データ「F0E1…1E0F」が書き込まれており、制御回路7は整合性データ領域を参照することによりブロック0の消去中断状態を検出することができる。なお、図3において、アドレス000010Hから000047Hまでがブロック消去処理で既に使用された領域で、アドレス000048Hから00FFFFHまでが未使用の領域である。
【0024】
図1は、消去制御プログラムのうちフラッシュメモリ9のブロック1または2についてのブロック消去処理を示すフローチャートで、図2は、消去制御プログラムのうち電源オン時における消去中断ブロックの再消去処理を示すフローチャートである。これら図1、図2には示していないが、消去ブロック2内に必要なデータと不要なデータとが混在している場合には、必要なデータを一旦RAM8に退避させ、ブロック消去後に復帰させる処理を追加しても良い。また、制御回路7は、消去制御プログラムの実行中、電源キー「PW」による電源オフ操作を受け付けない。
【0025】
図1において、制御回路7は、ブロック消去に先立って整合性データ領域に所定の整合データ「F0E1…1E0F」が書き込まれているか否かを判断し(ステップS1)、書き込まれている場合には「YES」に従ってステップS2に移行する。制御回路7は、ステップS2において、ブロック0に設けられた消去管理領域のうち未使用領域の先頭アドレス(以下、未使用先頭アドレスと称す)を検索する。フラッシュメモリ9は消去状態において全ビットが1になること、およびブロック番号FFFFHは存在しないことから、データFFFFHが記憶されている最も低位側のアドレスが上記未使用先頭アドレスとなる(図3では000048H)。
【0026】
しかし、消去管理領域がアドレス00FFFFHまで全て使用されている場合には、上記未使用先頭アドレスを見出だすことができない。そこで、制御回路7は、ステップS3において未使用領域があるか否かを判断する。未使用領域がある場合には「YES」に従ってステップS4に移行し、消去するブロック番号 (2バイト)を上記未使用先頭アドレスに書き込む。その後、ステップS5において当該ブロックの消去動作を実行する。この消去には700msec程度の時間を要する。消去動作が完了すると、制御回路7はステップS6に移行し、(未使用先頭アドレス+2)で示されるアドレスに消去完了フラグ0000Hを書き込んでブロック消去処理を終了する。なお、ブロック消去が正常に終了した場合には、書き込まれたブロック番号とそれに対応した消去完了フラグ0000Hとはもはや不要データとなる。
【0027】
一方、上記ステップS3において、未使用領域がない場合には「NO」に従ってステップS7に移行し、ステップS7〜S9からなる消去管理領域(ブロック0)の消去処理を実行する。すなわち、制御回路7は、ステップS7において整合性データ領域に消去動作中であることを示す不整合データ「0000…0000」を書き込んでその全ビットを0クリアし、その後ステップS8においてブロック0の消去動作を実行する。消去動作が完了すると、ブロック0の全ビットが1になる。制御回路7はステップS9に移行し、整合性データ領域に消去が完了したことを示す上記整合データ「F0E1…1E0F」を書き込む。これにより、消去管理領域は整合性データ領域を除いて未使用領域となるため、上述したステップS4に移行してブロック消去処理を続行することができる。
【0028】
また、上記ステップS1において、整合性データ領域に整合データが書き込まれていない場合には「NO」に従ってステップS8に移行し、消去管理領域(ブロック0)の消去処理を実行する。この場合には、既に整合性データ領域に整合データとは異なるデータが書き込まれているので、ステップS7を実行する必要はない(勿論実行しても良い)。
【0029】
続いて、図2に示す消去中断ブロックの再消去処理について説明する。電源がオンされると、制御回路7は、整合性データ領域に上記整合データが書き込まれているか否かを判断し(ステップT1)、書き込まれている場合には「YES」に従ってステップT2に移行する。制御回路7は、ステップT2において、消去管理領域のうちブロック番号を書き込むために使用された最終アドレス(以下、最終使用アドレスと称す)を検索する。そして、ステップT3において、(最終使用アドレス+2)で示されるアドレスに消去完了フラグ0000Hが書き込まれているか否かを判断し、書き込まれている場合には消去中断ブロックが存在しないために再消去処理を終了する。
【0030】
これに対し、消去管理領域(ブロック0)の消去処理中に電池6が取り外されるなどして消去動作が中断した場合には、整合性データ領域に整合データが書き込まれていない。この場合には、制御回路7は上記ステップT1において「NO」と判断し、ステップT4、T5において消去管理領域(ブロック0)の再消去処理を実行した後処理を終了する。このステップT4、T5の処理は、上述したブロック消去処理のステップS8、S9の処理と同じである。
【0031】
また、ブロック1または2の消去処理中に電池6が取り外されるなどして消去動作が中断した場合には、(最終使用アドレス+2)で示されるアドレスに消去完了フラグ0000Hが書き込ままれていない。この場合には、制御回路7は上記ステップT3において「NO」と判断し、ステップT6において当該ブロックの再消去処理を実行する。消去動作が完了すると、ステップT7に移行して消去完了フラグ0000Hを書き込んだ後処理を終了する。制御回路7は、この再消去動作の間、表示部5に「フラッシュメモリの再消去処理を実行します。しばらくお待ち下さい。」というメッセージを表示する。これにより、使用者は電源投入時における待ち時間の発生原因を認識することができる。
【0032】
以上説明したように、バーコードスキャナ1に内蔵されたフラッシュメモリ9には消去管理領域が設けられ、制御回路7は、ブロック消去処理の実行に先立ってその消去管理領域に消去対象のブロック番号を書き込むとともに、消去動作の完了後にそのブロック番号に対応させて消去完了フラグを書き込むので、消去管理領域にはブロックの消去中か消去が完了したかを示すブロック消去状態が記憶される。従って、制御回路7は、この消去管理領域を参照することにより、消去動作が中断されたブロックの有無およびその番号を特定することができる。
【0033】
そして、制御回路7は、電源投入時に消去管理領域を参照し、消去中断ブロックが存在する場合にはそのブロックの再消去処理を実行するので、消去処理中に電池6が取り外されて消去動作が中断された場合であっても、その消去処理を正常に完了することができる。その結果、フラッシュメモリ9について、制御回路7が管理している消去状態と実際の消去状態とが異なることがなくなり、たとえ使用者が誤ったタイミングで電池6を取り外しても、エラーが発生することがなくなる。
【0034】
また、本実施形態によれば、消去処理が実行されるごとにブロック番号と消去完了フラグとが消去管理領域の未使用領域に順次書き込まれていくので、未使用領域がなくなるまでの間、消去管理領域には書き込み処理しか発生しない。これは、ブロックデータの一部書き替えができない特性を持つフラッシュメモリに適した手段となる。そして、消去管理領域の未使用領域がなくなった場合には、消去管理領域(ブロック0)をブロック消去するので、消去管理領域を継続して使用可能となる。
【0035】
さらに、消去管理領域には整合性データ領域が設けられ、制御回路7は、消去管理領域の消去処理に先立ってその整合性データ領域に不整合データを書き込むとともに、消去動作の終了後に整合データを書き込むので、整合性データ領域には消去管理領域の消去中か消去が完了したかを示す消去管理領域の消去状態が記憶される。
【0036】
そして、制御回路7は、電源投入時に整合性データ領域に整合データが記憶されていない場合に消去管理領域の消去動作を再実行するので、消去管理領域の消去処理中に電池6が取り外されて消去動作が中断された場合であっても、消去管理領域の消去処理を正常に完了することができる。
【0037】
なお、書き込み処理中に電池6が取り外されることも考えられるが、上述したように電池6が取り外されても数msecの間は動作が維持されてその間に書き込み処理が完了するので、書き込み処理の中断は発生しない。
【0038】
本発明はバーコードスキャナに限らず、携帯電話装置やPDAなどフラッシュメモリを備え着脱可能な電池を電源として動作する携帯情報端末装置に対しても同様に適用できる。
【図面の簡単な説明】
【図1】本発明の一実施形態であるバーコードスキャナにおいてフラッシュメモリのブロック消去処理を示すフローチャート
【図2】電源オン時における消去中断ブロックの再消去処理を示すフローチャート
【図3】消去管理領域の記憶内容を示す図
【図4】バーコードスキャナの電気的構成を機能ブロックにより示す図
【図5】バーコードスキャナの外観斜視図
【符号の説明】
1はバーコードスキャナ(携帯情報端末装置)、5は表示部(表示手段)、6は電池、7は制御回路(消去制御手段)、9はフラッシュメモリである。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a portable information terminal device that operates using a detachable battery including a flash memory as a power source.
[0002]
[Problems to be solved by the invention]
Portable code scanners (handy terminals), mobile phone devices, PDAs and other portable information terminal devices that optically read barcodes, two-dimensional codes, etc. store the read code data, phone number data, PIM data, etc. A flash memory is provided as a storage means. A battery is stored in these portable information terminal devices, and the battery can be replaced by a user.
[0003]
When the data stored in the block of the flash memory is no longer necessary, the control means (microcomputer) of the portable information terminal device is a block including a used cluster when the data stored in the specific block is rewritten. When a block is made up of unused clusters (garbage collection), block erasure processing is executed when necessary data in the RAM is saved to the flash memory when the power is turned off. This erasure process takes about 700 msec for each block. During this erasing process, even if the user turns off the power switch of the portable information terminal device, the operation is not accepted.
[0004]
However, for example, if the user removes the battery during the erasing process, the power supply to the flash memory is cut off, and the erasing process is interrupted (stopped). As a result, the erase state managed by the control means for the flash memory is different from the actual erase state, and a write error occurs when the control means next writes to the erase interrupt block. Since this error cannot be dealt with by the user, for example, a warning such as "Overwriting to flash memory has occurred" is displayed on the display, and measures such as prompting the user to request repairs were taken. .
[0005]
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a portable information terminal device capable of successfully completing the erasure process even when the battery is removed during the erasure process of the flash memory. Is to provide.
[0006]
[Means for Solving the Problems]
According to the first aspect of the present invention, a part of the storage area of the flash memory is an erasure management area for storing information related to the erase state of the flash memory. Then, when executing the erasing process of the designated area of the flash memory, the erasing control means writes information indicating the erasure completion of the designated area in the erasure management area after the erasing operation of the flash memory is completed. As a result, information on whether or not the erasing operation of the designated area is completed, that is, information on the erasing state is stored in the erasing management area, so that the erasing control means interrupts the erasing operation by referring to this information Area can be specified.
[0007]
The erasure control means executes the process of specifying the erasure interruption area when the power is turned on, and re-executes the erasure operation of the erasure area when the erasure interruption area exists. Even if the erasing operation is interrupted due to removal, the erasing process can be completed normally.
[0008]
Erase control unit writes the area number for specifying the specified area of the unused area of the erased management area in an unused area of the search perilla before performing the erasing process of the designated area, after the erase operation has been completed Information indicating completion of erasure is written in correspondence with the area number. Thereby, the erasure control means can specify the erasure interruption area based on these area numbers and the information corresponding thereto. In addition, according to this means, only the writing process is generated in the erase management area until there is no unused area in the erase management area, so that it is suitable for a flash memory having a characteristic that a part of block data cannot be rewritten. It becomes a means. Furthermore, when there is no unused area in the erase management area, the erase management area can be used continuously by erasing the erase management area by means described in
[0009]
According to the means described in claim 3 , the consistency data area is provided in the erasure management area, and the erasure control means confirms that the erasure operation is being performed on the consistency data area prior to the erasure operation of the erasure management area. Inconsistent data is written, and after the erase operation is finished, matched data indicating that the erase operation is completed is written. However, the inconsistent data is data that is written after the matched data is once written, and is therefore rewritable data due to the characteristics of the flash memory such as bit clear or bit set. Thus, information on whether or not the erase operation in the erase management area is completed, that is, information on the erase state of the erase management area is stored in the consistency data area.
[0010]
The erase control means re-executes the erase operation in the erase management area when the consistency data is not stored in the consistency data area when the power is turned on, so that the battery is removed during the erase process in the erase management area and erased. Even when the operation is interrupted, the erasure process of the erasure management area can be normally completed.
[0011]
According to the means described in
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment in which the present invention is applied to a barcode scanner will be described with reference to the drawings.
FIG. 5 shows the appearance of the barcode scanner. The barcode scanner 1 (corresponding to a portable information terminal device) is called a handy terminal that is operated by a user with his / her hand. The
[0013]
The
[0014]
A
[0015]
FIG. 4 shows the electrical configuration of the
[0016]
The control circuit 7 is constituted by a microcomputer having a CPU as a main body, and corresponds to an erasure control means in the present invention. The control circuit 7 executes the above-described barcode reading processing, processing and storage of the read barcode data, and data communication processing with a personal computer in accordance with a processing program (application program) stored in the
[0017]
The
[0018]
The
[0019]
The
[0020]
The
[0021]
Next, the operation of the above configuration will be described with reference to FIGS.
The
[0022]
FIG. 3 specifically shows the contents stored in the erasure management area. In this embodiment, block 0 having an address from 000000H to 00FFFFH is used as an erase management area, and block 1 having an address from addresses 010000H to 01FFFFH and block 2 having an address from 020000H to 02FFFFH are used as user data areas. .
[0023]
Of the erasure management area, 16 bytes from addresses 000000H to 00000FH are used as a consistency data area. As will be described later, when there is no unused area in the erase management area, the block 0 itself may be erased. If the
[0024]
FIG. 1 is a flowchart showing a block erase process for the
[0025]
In FIG. 1, the control circuit 7 determines whether or not predetermined matching data “F0E1... 1E0F” is written in the consistency data area prior to block erasing (step S1). The process proceeds to step S2 according to “YES”. In step S2, the control circuit 7 searches for the start address of the unused area in the erase management area provided in the block 0 (hereinafter referred to as an unused start address). Since the
[0026]
However, when the erasure management area is completely used up to the address 00FFFFH, the unused head address cannot be found. Therefore, the control circuit 7 determines whether or not there is an unused area in step S3. If there is an unused area, the process proceeds to step S4 according to “YES”, and the block number (2 bytes) to be erased is written to the unused head address. Thereafter, in step S5, the erase operation of the block is executed. This erasure takes about 700 msec. When the erase operation is completed, the control circuit 7 proceeds to step S6, writes the erase completion flag 0000H at the address indicated by (unused head address + 2), and ends the block erase process. When the block erase is normally completed, the written block number and the erase completion flag 0000H corresponding to the block number become unnecessary data.
[0027]
On the other hand, if there is no unused area in step S3, the process proceeds to step S7 according to “NO”, and the erase process of the erase management area (block 0) consisting of steps S7 to S9 is executed. That is, the control circuit 7 writes inconsistent data “0000... 0000” indicating that the erasing operation is being performed in the consistency data area in step S7, clears all the bits to 0, and then erases block 0 in step S8. Perform the action. When the erase operation is completed, all the bits of block 0 become 1. The control circuit 7 proceeds to step S9 and writes the matching data “F0E1... 1E0F” indicating that the erasure is completed in the consistency data area. As a result, the erasure management area becomes an unused area except for the consistency data area, so that the block erasure process can be continued by proceeding to step S4 described above.
[0028]
Further, in step S1, if the consistency data is not written in the consistency data area, the process proceeds to step S8 according to “NO”, and the erase process of the erase management area (block 0) is executed. In this case, since data different from the consistency data has already been written in the consistency data area, step S7 need not be executed (of course, it may be executed).
[0029]
Next, the erase process for the erase interrupt block shown in FIG. 2 will be described. When the power is turned on, the control circuit 7 determines whether or not the matching data is written in the consistency data area (step T1). If written, the process proceeds to step T2 according to “YES”. To do. In step T2, the control circuit 7 searches for the last address used for writing the block number in the erase management area (hereinafter referred to as the last used address). In step T3, it is determined whether or not the erase completion flag 0000H has been written to the address indicated by (last used address + 2). Exit.
[0030]
On the other hand, when the erasing operation is interrupted due to the removal of the
[0031]
Further, when the erasing operation is interrupted due to the removal of the
[0032]
As described above, the
[0033]
Then, the control circuit 7 refers to the erasure management area when the power is turned on, and executes the erasure process of the erasure block if there is an erasure interrupted block. Even if it is interrupted, the erasure process can be completed normally. As a result, for the
[0034]
Further, according to the present embodiment, the block number and the erase completion flag are sequentially written in the unused area of the erase management area every time the erase process is executed, so that the erase is performed until there is no unused area. Only write processing occurs in the management area. This is a means suitable for a flash memory having a characteristic in which part of block data cannot be rewritten. When there is no unused area in the erase management area, the erase management area (block 0) is erased in blocks, so that the erase management area can be used continuously.
[0035]
Further, a consistency data area is provided in the erasure management area, and the control circuit 7 writes inconsistent data to the consistency data area prior to the erasure processing of the erasure management area, and outputs the consistency data after the erase operation is completed. Since data is written, the consistency data area stores the erase state of the erase management area indicating whether the erase management area is being erased or erased.
[0036]
The control circuit 7 re-executes the erasing operation in the erasure management area when the consistency data is not stored in the consistency data area when the power is turned on. Therefore, the
[0037]
Although it is conceivable that the
[0038]
The present invention is not limited to a barcode scanner, and can be similarly applied to a portable information terminal device that includes a flash memory such as a mobile phone device and a PDA and operates using a detachable battery as a power source.
[Brief description of the drawings]
FIG. 1 is a flowchart showing block erase processing of a flash memory in a barcode scanner according to an embodiment of the present invention. FIG. 2 is a flowchart showing re-erasing processing of an erase interrupted block at power-on. Fig. 4 is a diagram showing the electrical configuration of a barcode scanner using functional blocks. Fig. 5 is an external perspective view of the barcode scanner.
1 is a barcode scanner (portable information terminal device), 5 is a display unit (display means), 6 is a battery, 7 is a control circuit (erase control means), and 9 is a flash memory.
Claims (4)
前記フラッシュメモリの記憶領域の一部に前記フラッシュメモリの消去状態に関する情報を記憶する消去管理領域を設け、
前記フラッシュメモリの指定領域の消去動作に先立って前記消去管理領域の未使用領域に当該指定領域を特定するための領域番号を書き込み、当該指定領域の消去動作が完了した時に前記消去管理領域に前記領域番号に対応させて当該指定領域の消去完了を示す情報を書き込むとともに、電源投入時に前記消去管理領域に記憶された消去状態に関する情報に基づいて消去動作が中断された領域を特定しその消去中断領域の消去動作を再実行する消去制御手段を備えて構成されていることを特徴とする携帯情報端末装置。In a portable information terminal device operating with a detachable battery equipped with a flash memory as a power source,
An erasure management area for storing information on the erasure state of the flash memory is provided in a part of the storage area of the flash memory,
Wherein the erase management area when the prior to the erase operation of the designated area of the flash memory writes the area number for specifying the specified area in an unused area of the erase management area, the erase operation of the specified area is completed Writes information indicating the completion of erasure of the specified area corresponding to the area number, and identifies the area where the erasure operation was interrupted based on the information on the erasure state stored in the erasure management area when the power is turned on A portable information terminal device comprising an erasing control means for re-executing an erasing operation of an area.
前記消去制御手段は、前記整合性データ領域に対し前記消去管理領域の消去動作に先立って不整合データを書き込むとともに消去動作の終了後に整合データを書き込み、電源投入時に前記整合性データ領域に整合データが記憶されていない場合に前記消去管理領域の消去動作を再実行することを特徴とする請求項2記載の携帯情報端末装置。 The erasure management area is provided with a consistency data area,
The erasure control means writes inconsistent data to the consistency data area prior to the erase operation in the erase management area and writes the consistency data after the erase operation is completed. 3. The portable information terminal device according to claim 2 , wherein the erasure operation of the erasure management area is re-executed when no is stored .
前記消去制御手段は、前記消去中断領域の消去動作を再実行する場合に、その旨を前記表示手段に表示することを特徴とする請求項1ないし3の何れかに記載の携帯情報端末装置。 A display means,
It said erasure control means, to re-execute the erasing operation of the erase suspend region, portable information terminal device according to any one of claims 1 to 3, characterized in that a message to that effect on the display means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001118252A JP4644967B2 (en) | 2001-04-17 | 2001-04-17 | Portable information terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001118252A JP4644967B2 (en) | 2001-04-17 | 2001-04-17 | Portable information terminal device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002312253A JP2002312253A (en) | 2002-10-25 |
JP4644967B2 true JP4644967B2 (en) | 2011-03-09 |
Family
ID=18968673
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001118252A Expired - Fee Related JP4644967B2 (en) | 2001-04-17 | 2001-04-17 | Portable information terminal device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4644967B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5451682B2 (en) * | 2011-05-20 | 2014-03-26 | 株式会社東海理化電機製作所 | Flash memory device |
JP2013003655A (en) * | 2011-06-13 | 2013-01-07 | Denso Corp | Control device for writing data in flash memory |
JP6056567B2 (en) * | 2013-03-12 | 2017-01-11 | 株式会社リコー | Information processing apparatus, image forming apparatus, data erasing method, and data erasing program |
JP6036618B2 (en) * | 2013-09-13 | 2016-11-30 | カシオ計算機株式会社 | Electronic device and program |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000222292A (en) * | 1999-02-04 | 2000-08-11 | Nec Saitama Ltd | Data managing method utilizing flash memory |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3489708B2 (en) * | 1996-10-23 | 2004-01-26 | シャープ株式会社 | Nonvolatile semiconductor memory device |
JPH10124404A (en) * | 1996-10-24 | 1998-05-15 | Toshiba Corp | Recording and playback device |
-
2001
- 2001-04-17 JP JP2001118252A patent/JP4644967B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000222292A (en) * | 1999-02-04 | 2000-08-11 | Nec Saitama Ltd | Data managing method utilizing flash memory |
Also Published As
Publication number | Publication date |
---|---|
JP2002312253A (en) | 2002-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104317622B (en) | A kind of embedded device burning program processing method and system | |
EP0390303B1 (en) | Electronic notebook | |
EP1387284A3 (en) | Computer system with nand flash memory for booting and data storage | |
JP2008033844A (en) | Display device, control method and program | |
JP2979092B2 (en) | Information processing device | |
JP4644967B2 (en) | Portable information terminal device | |
RU99112484A (en) | METHOD FOR STORING OFFICIAL INFORMATION | |
TWI543027B (en) | Input device | |
KR100385184B1 (en) | Computer system and method for setting up an operating system information thereof | |
US6485306B1 (en) | Locus-recordable portable handwriting device | |
JP2001154839A (en) | Recording medium for managing reading information, and information processor | |
TWI537735B (en) | Electronic apparatus and bios updating apparatus thereof | |
JP2002312110A (en) | Portable information terminal device | |
JPH07319752A (en) | Storage device | |
JP5343767B2 (en) | Mobile device | |
JP2008009494A (en) | Image forming device | |
JPH03158184A (en) | Sewing machine operated by control program | |
JPH10283174A (en) | Basic program rewriting method of handy terminal | |
JP2692905B2 (en) | Portable electronic devices | |
JP3098250U (en) | Calculator without power key | |
JPH08190530A (en) | Portable terminal | |
JP2006190180A (en) | Information device and start management program | |
JP4949763B2 (en) | Display device, control method, and program | |
JP2012185606A (en) | Portable terminal | |
JP2006024076A (en) | Two-dimensional code reader |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070608 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100820 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100824 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101019 |
|
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: 20101109 |
|
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: 20101122 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131217 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4644967 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131217 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131217 Year of fee payment: 3 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |