[go: up one dir, main page]

JP2003331236A - Portable electronic device - Google Patents

Portable electronic device

Info

Publication number
JP2003331236A
JP2003331236A JP2002133060A JP2002133060A JP2003331236A JP 2003331236 A JP2003331236 A JP 2003331236A JP 2002133060 A JP2002133060 A JP 2002133060A JP 2002133060 A JP2002133060 A JP 2002133060A JP 2003331236 A JP2003331236 A JP 2003331236A
Authority
JP
Japan
Prior art keywords
memory
area
program
electronic device
portable electronic
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.)
Pending
Application number
JP2002133060A
Other languages
Japanese (ja)
Inventor
Hiroyasu Uchida
裕康 内田
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2002133060A priority Critical patent/JP2003331236A/en
Publication of JP2003331236A publication Critical patent/JP2003331236A/en
Pending legal-status Critical Current

Links

Landscapes

  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Credit Cards Or The Like (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a portable electronic device capable of shortening a self- diagnosis processing time even when memory capacity is increased. <P>SOLUTION: When an IC card is driven, validity check is performed respectively only to a region for storing a selected application program in a program memory shown by regional information and a region in a working memory corresponding to the selected application program, based on the regional information stored in a data memory. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、たとえば、データ
を記憶する書換え可能な不揮発性メモリを有し、このメ
モリに対してデータの読出しおよび書込みを行なって選
択的に外部との間でデータの入出力を行なうICカード
などの携帯可能電子装置に係り、特に複数のアプリケー
ションに対応した携帯可能電子装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention has, for example, a rewritable non-volatile memory for storing data, and data is read from and written to this memory to selectively store data with the outside. The present invention relates to a portable electronic device such as an IC card that performs input / output, and more particularly to a portable electronic device compatible with a plurality of applications.

【0002】[0002]

【従来の技術】最近、携帯可能電子装置として、書換え
可能な不揮発性メモリ、および、これらを制御するCP
U(セントラル・プロセッシング・ユニット)などの制
御素子を有するICチップを内蔵した、いわゆるICカ
ードが産業各方面で利用されている。
2. Description of the Related Art Recently, a rewritable nonvolatile memory as a portable electronic device and a CP for controlling the rewritable nonvolatile memory
A so-called IC card having a built-in IC chip having a control element such as a U (central processing unit) is used in various industrial fields.

【0003】一般に、この種のICカードは、制御素子
の制御プログラムや複数のアプリケーションプログラム
を格納したプログラムメモリ、および、制御素子が処理
を行なう際の処理データを一時的に保持するワーキング
メモリを有しており、コマンドやレスポンスを用いて、
外部装置(ICカードリーダ・ライタ)との間でデータ
の入出力を行なうようになっている。
In general, this type of IC card has a program memory that stores a control program for a control element and a plurality of application programs, and a working memory that temporarily holds processing data when the control element performs processing. And using commands and responses,
Data is input / output to / from an external device (IC card reader / writer).

【0004】[0004]

【発明が解決しようとする課題】最近のICカードは、
メモリの集積効率技術の向上と下記の理由から、メモリ
容量の増大化が進んでいる。 (1)プログラムメモリ ・開発するICカードのICチップの品種を減らすた
め、1枚のICカードに多数のアプリケーションプログ
ラムを書込んでおき、必要なアプリケーションプログラ
ムのみをカード発行時に選択する。そのため、大きなプ
ログラムメモリ領域が必須。 ・1つのアプリケーションプログラムに関しても複雑な
制御が必要となり、プログラムメモリ領域が増大。 (2)ワーキングメモリ ・複雑な暗号化や計算が必要となり、ワーキングメモリ
領域の増大が必須。
Recently, IC cards are
Due to the improvement of the memory integration efficiency technology and the following reasons, the memory capacity is increasing. (1) Program memory In order to reduce the types of IC chips of the developed IC card, a large number of application programs are written in one IC card, and only the necessary application program is selected at the time of issuing the card. Therefore, a large program memory area is essential. -Complicated control is required even for one application program, increasing the program memory area. (2) Working memory-Complicated encryption and calculations are required, and it is essential to increase the working memory area.

【0005】以上のように、ICカードのメモリ容量は
増大する傾向にある。しかしながら、ICカードは、通
常、使用する前にプログラムメモリ内容の正当性、およ
び、ワーキングメモリの動作チェックを、全メモリエリ
アに対し自己診断として行なうようになっている。その
ため、メモリ領域が大きいと、自己診断処理時間が著し
く増大し、以下の問題を抱えている。 ・ICカードの利用者は、自己診断処理による待ち時間
が長くなる。 ・ICカードの初期化、発行作業時間の増加となり、製
造行程の工数が多くなる。特に、ICカードの初期化あ
るいは発行する枚数が10万枚などになれば、その影響
は極めて大きいものとなる。 そこで、本発明は、メモリ容量が大きくなっても、自己
診断処理時間の短縮が可能となる携帯可能電子装置を提
供することを目的とする。
As described above, the memory capacity of the IC card tends to increase. However, the IC card is usually adapted to perform a self-diagnosis on the entire memory area by checking the validity of the program memory contents and the operation check of the working memory before use. Therefore, if the memory area is large, the self-diagnosis processing time significantly increases, and the following problems occur. -The IC card user has a long waiting time due to self-diagnosis processing. -Initialization of IC cards and increased work time for issuance will increase man-hours in the manufacturing process. In particular, if the number of IC cards to be initialized or issued reaches 100,000, the effect will be extremely large. Therefore, an object of the present invention is to provide a portable electronic device that can reduce the self-diagnosis processing time even if the memory capacity increases.

【0006】[0006]

【課題を解決するための手段】本発明の携帯可能電子装
置は、複数の領域に分割され、かつ、これら複数の領域
のうち少なくとも1つの領域が選択的に使用される第1
のメモリと、少なくとも前記第1のメモリの各領域のう
ち選択された領域を示す領域情報を記憶している第2の
メモリと、前記第1のメモリの選択された領域に対して
アクセスを行なうための制御部とを有し、選択的に外部
との間でデータの入出力を行なう携帯可能電子装置にお
いて、当該携帯可能電子装置が起動されると、前記第2
のメモリ内の領域情報に基づき、その領域情報で示され
る前記第1のメモリの選択された領域に対してのみ正当
性チェックを行なう自己診断手段を具備したことを特徴
とする。
The portable electronic device of the present invention is divided into a plurality of areas, and at least one area of the plurality of areas is selectively used.
Memory, at least a second memory storing area information indicating a selected area of each area of the first memory, and a selected area of the first memory are accessed. In a portable electronic device that selectively inputs / outputs data to / from the outside when the portable electronic device is activated.
The self-diagnosis means for checking the validity of only the selected area of the first memory indicated by the area information based on the area information in the memory.

【0007】[0007]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。図1は、本実施の形態に係
る携帯可能電子装置としてのICカードを取扱う端末装
置の構成を概略的に示すものである。この端末装置は、
ICカード1をICカードリーダ・ライタ2を介してC
PUなどからなる制御部3と接続可能にするとともに、
制御部3にキーボード4、CRT表示部5、プリンタ6
を接続して構成される。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 schematically shows the configuration of a terminal device that handles an IC card as a portable electronic device according to this embodiment. This terminal device
C through the IC card 1 via the IC card reader / writer 2.
In addition to enabling connection to the control unit 3 composed of PU,
The control unit 3 includes a keyboard 4, a CRT display unit 5, and a printer 6.
It is configured by connecting.

【0008】ICカード1は、たとえば、商品購入など
の際にユーザが保持し、暗証番号によるユーザの照合や
商品購入額によるサービスポイントの計算・データ蓄積
などを行なうものであり、図2に示すように構成されて
いる。すなわち、CPUなどの制御素子(制御部)1
1、第1のメモリとしてのプログラムメモリ12、第2
のメモリ(記憶手段)としてのデータメモリ13、第2
のメモリ(記憶手段)としてのワーキングメモリ14、
および、ICカードリーダ・ライタ2との電気的接触を
得るためのコンタクト部15によって構成されており、
これらのうち制御素子11、データメモリ12、ワーキ
ングメモリ13、および、プログラムメモリ14は1つ
のICチップ(あるいは、複数のICチップ)で構成さ
れてICカ―ド本体内に埋設されている。
The IC card 1 is, for example, held by the user at the time of purchasing a product, for collating the user with a personal identification number, for calculating service points based on the amount of the product purchased, and for accumulating data, and is shown in FIG. Is configured. That is, a control element (control unit) 1 such as a CPU
1, a program memory 12 as a first memory, a second
Data memory 13 as a memory (storage means) of the second
Working memory 14 as a memory (storage means) of
And a contact portion 15 for obtaining electrical contact with the IC card reader / writer 2,
Of these, the control element 11, the data memory 12, the working memory 13, and the program memory 14 are composed of one IC chip (or a plurality of IC chips) and are embedded in the IC card main body.

【0009】プログラムメモリ12は、制御素子11の
制御プログラムおよび複数のアプリケーションプログラ
ムなどを記憶するものであり、たとえば、マスクROM
などのICチップ製造時に最初に書込まれたら再度書換
えることができない書換え不可能な不揮発性メモリで構
成されている。
The program memory 12 stores a control program for the control element 11, a plurality of application programs, and the like, and is, for example, a mask ROM.
It is composed of a non-rewritable non-volatile memory that cannot be rewritten once it is written at the time of manufacturing the IC chip.

【0010】データメモリ13は、各種データの記憶に
使用され、たとえば、EEPROM(エレクトリカル・
イレーザブル・プログラムROM)やFeRAM(強誘
電体RAM)などの書換え可能な不揮発性メモリで構成
されている。ワーキングメモリ14は、制御素子11が
処理を行なう際の処理データなどを一時的に保持するた
めのメモリであり、たとえば、SRAM(スタティック
RAM)などの書換え可能な揮発性メモリで構成されて
いる。
The data memory 13 is used to store various kinds of data, for example, an EEPROM (electrical.
It is composed of a rewritable nonvolatile memory such as an erasable program ROM) or FeRAM (ferroelectric RAM). The working memory 14 is a memory for temporarily holding processing data and the like when the control element 11 performs processing, and is composed of, for example, a rewritable volatile memory such as SRAM (static RAM).

【0011】図3は、プログラムメモリ12の構成を模
式的に示すもので、OS(オペレーションシステム)プ
ログラムが格納されるOSプログラム領域121、外部
装置と通信するためのI/F(インターフェース)プロ
グラムが格納されるI/Fプログラム領域122、複数
のアプリケーション、たとえば、第1、第2、第3のア
プリケーションのプログラムが格納される第1のアプリ
ケーションプログラム領域123、第2のアプリケーシ
ョンプログラム領域124、第3のアプリケーションプ
ログラム領域125、および、空き領域126から構成
されている。
FIG. 3 schematically shows the structure of the program memory 12. An OS program area 121 for storing an OS (operating system) program and an I / F (interface) program for communicating with an external device are shown in FIG. An I / F program area 122 to be stored, a plurality of applications, for example, a first application program area 123, a second application program area 124, and a third application program program in which programs of the first, second, and third applications are stored. Of the application program area 125 and a free area 126.

【0012】このように、当該ICカード1は、第1、
第2、第3のアプリケーションの全てが使用できるよう
に、プログラムメモリ12内にそれらのプログラムが格
納されているが、実際に使用するのは、たとえば、第2
のアプリケーションのみの場合がある。そのような場
合、第2のアプリケーションのプログラムが格納されて
いる第2のアプリケーションプログラム領域124、お
よび、全てのアプリケーションの動作に必要なOSプロ
グラムが格納されているOSプログラム領域121、I
/Fプログラムが格納されているI/Fプログラム領域
122のみに対して正当性チェックを実施し、その他の
領域(第1のアプリケーションプログラム領域123、
第3のアプリケーションプログラム領域125、空き領
域126)については、正当性チェックを実施しないよ
うにすれば、プログラムメモリ12の正当性チェック処
理時間が大幅に短縮できることとなる。
In this way, the IC card 1 is
The programs are stored in the program memory 12 so that all of the second and third applications can be used. However, actually, for example, the second program is used.
There is a case of only application In such a case, the second application program area 124 in which the programs of the second application are stored, and the OS program areas 121 and I in which the OS programs necessary for the operation of all the applications are stored.
The validity check is performed only on the I / F program area 122 in which the / F program is stored, and the other areas (the first application program area 123,
If the validity check is not performed for the third application program area 125 and the empty area 126), the validity check processing time of the program memory 12 can be significantly shortened.

【0013】図4は、ワーキングメモリ14の構成を模
式的に示すもので、プログラムメモリ12に格納された
第1、第2、第3のアプリケーションプログラムにそれ
ぞれ対応する複数(たとえば、3つ)の領域141,1
42,143、および、未使用領域144から構成され
ていて、使用する領域は各アプリケーションにより異な
っている。この例では、たとえば、第1のアプリケーシ
ョンプログラムは領域141、第2のアプリケーション
プログラムは領域142、第3のアプリケーションプロ
グラムは領域143をそれぞれ使用するようになってい
る。なお、領域142は、たとえば、領域141に所定
の領域142aを加えた領域となっており、また、領域
143は、たとえば、領域142に所定の領域143a
を加えた領域となっている。
FIG. 4 schematically shows the structure of the working memory 14, and includes a plurality (for example, three) of the first, second, and third application programs stored in the program memory 12, respectively. Area 141,1
42, 143 and an unused area 144, and the area to be used differs depending on each application. In this example, for example, the first application program uses the area 141, the second application program uses the area 142, and the third application program uses the area 143. The region 142 is, for example, a region obtained by adding a predetermined region 142a to the region 141, and the region 143 is, for example, a predetermined region 143a in the region 142.
It is the area which added.

【0014】前記プログラムメモリ12の場合と同様
に、第1、第2、第3のアプリケーションの全てが使用
できるようになっているが、たとえば、第2のアプリケ
ーションのみしか使用しない場合、第2のアプリケーシ
ョンプログラムが使用する領域142のみ動作チェック
を行なうことで、ワーキングメモリ14の動作チェック
処理時間が大幅に短縮できることとなる。
As in the case of the program memory 12, all of the first, second and third applications can be used. For example, when only the second application is used, the second application is used. By performing the operation check only on the area 142 used by the application program, the operation check processing time of the working memory 14 can be significantly shortened.

【0015】次に、本実施の形態における自己診断処理
について説明する。まず、プログラムメモリ12の自己
診断を行なうためのカード初期化時あるいは発行時にお
ける準備処理について説明する。ICカード1の初期化
時あるいは発行時に、たとえば、図5に示すように、デ
ータメモリ13の先頭バイトに、今回発行した内容に合
う必要なプログラムメモリ領域の数量nを、プログラム
エリアチェック数量指定バイト131にセットする。た
とえば、当該ICカード1の運用時に使用するアプリケ
ーションプログラムとして第2のアプリケーションプロ
グラムのみが選択された場合、領域の数量nは「2」に
セットされる。この場合、OSプログラム領域121お
よびI/Fプログラム領域122を1つの領域としてい
る。
Next, the self-diagnosis processing in this embodiment will be described. First, a preparatory process at the time of card initialization or issuance for self-diagnosis of the program memory 12 will be described. At the time of initialization or issuance of the IC card 1, for example, as shown in FIG. 5, in the first byte of the data memory 13, the necessary program memory area quantity n matching the contents issued this time is set to the program area check quantity designation byte. Set it to 131. For example, when only the second application program is selected as the application program used when operating the IC card 1, the number n of areas is set to "2". In this case, the OS program area 121 and the I / F program area 122 are one area.

【0016】次に、プログラムエリアチェック数量指定
バイト131にセットされた数量nが「2」の場合、2
個のチェックする各領域のスタートアドレス(領域情
報)132,134、および、ストップアドレス(領域
情報)133,135をセットする。たとえば、図5に
おいて表記されたプログラム1スタートアドレス13
2、プログラム1ストップアドレス133には、OSプ
ログラム領域121およびI/Fプログラム領域122
を1つの領域として、その先頭アドレス、最終アドレス
が格納され、プログラム2スタートアドレス134、プ
ログラム2ストップアドレス135には、上記例によれ
ば第2のアプリケーションプログラム領域124の先頭
アドレス、最終アドレスが格納される。次に、上記のよ
うに指定したプログラム領域の全てのバイトを順に、1
バイトごとに論理和を取った値(ただし、桁上がりは無
視)を、プログラムエリア正当性チェックバイト136
としてセットする。
Next, when the quantity n set in the program area check quantity designation byte 131 is "2", 2
The start addresses (area information) 132 and 134 and the stop addresses (area information) 133 and 135 of each area to be checked are set. For example, program 1 start address 13 shown in FIG.
2. The program 1 stop address 133 has an OS program area 121 and an I / F program area 122.
, The start address and the final address are stored, and the program 2 start address 134 and the program 2 stop address 135 store the start address and the final address of the second application program area 124 according to the above example. To be done. Next, set all bytes in the program area specified as above to 1
The value obtained by ORing each byte (however, carry is ignored) is used as the program area validity check byte 136.
Set as.

【0017】次に、ワーキングメモリ14の自己診断を
行なうためのカード初期化時あるいは発行時における準
備処理について説明する。上述したプログラムメモリ1
2と同様に、ICカード1の初期化時あるいは発行時
に、図5に示すように、ワーキングエリアチェック数量
指定バイト137に、今回発行した内容に必要なワーキ
ングメモリ領域の数量nをセットする。次に、ワーキン
グエリアチェック数量指定バイト137にセットされた
数量nが「1}の場合、1個のチェックする領域のスタ
ートアドレス138およびストップアドレス139をセ
ットする。たとえば、図5において表記されたワーキン
グメモリ1スタートアドレス138には、上記例によれ
ばワーキングメモリ14の領域142の先頭アドレスが
格納され、ワーキングメモリ1ストップアドレス139
には、上記例によればワーキングメモリ14の領域14
2の最終アドレスが格納される。
Next, a preparatory process at the time of card initialization or issuance for self-diagnosis of the working memory 14 will be described. Program memory 1 described above
As in the case of 2, when the IC card 1 is initialized or issued, as shown in FIG. 5, the working area check quantity designation byte 137 is set to the quantity n of the working memory area required for the contents issued this time. Next, when the quantity n set in the working area check quantity designation byte 137 is “1}, the start address 138 and the stop address 139 of one area to be checked are set. For example, the working shown in FIG. According to the above example, the start address of the area 142 of the working memory 14 is stored in the memory 1 start address 138, and the working memory 1 stop address 139 is stored.
According to the above example, the area 14 of the working memory 14
The final address of 2 is stored.

【0018】次に、時間短縮を実現する自己診断処理に
ついて図6に示すフローチャートを参照して説明する。
ICカード1をICカードリーダ・ライタ2へ挿入セッ
トすると、ICカードリーダ・ライタ2からICカード
1の制御素子11へ電源、クロック信号、および、リセ
ット信号などが供給される。そして、ICカード1の制
御素子11がリセット信号のオンからオフへの変化点を
検出すると(ステップS1)、リセット信号に対応した
初期応答信号(Answer to Reset:ATR)をICカー
ドリーダ・ライタ2へ出力する(ステップS2)。次
に、制御素子11は、ICカードリーダ・ライタ2から
コマンドを受信すると(ステップS3)、受信したコマ
ンドの内容を解析して処理する(ステップS4)。
Next, the self-diagnosis processing for realizing the time reduction will be described with reference to the flowchart shown in FIG.
When the IC card 1 is inserted and set in the IC card reader / writer 2, the IC card reader / writer 2 supplies the control element 11 of the IC card 1 with power, a clock signal, a reset signal and the like. When the control element 11 of the IC card 1 detects the change point of the reset signal from ON to OFF (step S1), the IC card reader / writer 2 sends an initial response signal (Answer to Reset: ATR) corresponding to the reset signal. (Step S2). Next, when the control element 11 receives a command from the IC card reader / writer 2 (step S3), it analyzes and processes the content of the received command (step S4).

【0019】また、ICカード1の制御素子11は、リ
セット信号のオンからオフへの変化点を検出すると(ス
テップS1)、ステップS2の処理と同時に、ICカー
ド1内の電源チェック、プログラムメモリ12の正当性
チェック、ワーキングメモリ14の正当性チェックなど
の自己診断処理を実施する(ステップS5)。そして、
その自己診断処理結果を、ステップS2でのATR出力
後の最初のコマンド処理(ステップS3)の結果と併せ
てレスポンスとしてICカードリーダ・ライタ2へ出力
する(ステップS6)。なお、ステップS5の自己診断
処理をステップS2の前に行ない、その自己診断処理結
果をステップS2でATRとともにICカードリーダ・
ライタ2へ出力するようにしてもよい。
When the control element 11 of the IC card 1 detects the change point of the reset signal from ON to OFF (step S1), the power supply check in the IC card 1 and the program memory 12 are performed simultaneously with the process of step S2. The self-diagnosis processing such as the validity check of (1) and the validity check of the working memory 14 is performed (step S5). And
The self-diagnosis processing result is output to the IC card reader / writer 2 as a response together with the result of the first command processing (step S3) after the ATR output in step S2 (step S6). Note that the self-diagnosis process of step S5 is performed before step S2, and the self-diagnosis process result is displayed in step S2 together with the ATR in the IC card reader /
You may make it output to the writer 2.

【0020】次に、ステップS5における自己診断処理
の詳細について図7に示すフローチャートを参照して説
明する。まず、ICカード1が正常に動作するのに必要
な電源に関する電圧レベル、および、電流チェックを行
なう(ステップS11)。次に、プログラムメモリ12
およびワーキングメモリ14の当該ICカード1の運用
時に使用するアプリケーションに関連する各領域のみを
チェックするため、当該ICカード1の初期化時あるい
は発行時にデータメモリ13内に書込まれたプログラム
メモリ12の領域情報132〜135、および、プログ
ラムエリア正当性チェックバイト136と、ワーキング
メモリ14の領域情報138,139をそれぞれ取得す
る(ステップS12)。
Next, the details of the self-diagnosis processing in step S5 will be described with reference to the flowchart shown in FIG. First, the voltage level and current check related to the power supply necessary for the IC card 1 to operate normally are performed (step S11). Next, the program memory 12
In order to check only each area of the working memory 14 related to the application used when the IC card 1 is operated, the program memory 12 written in the data memory 13 when the IC card 1 is initialized or issued is checked. The area information 132 to 135, the program area validity check byte 136, and the area information 138 and 139 of the working memory 14 are acquired (step S12).

【0021】次に、取得した各領域情報に基づき、プロ
グラムメモリ12の選択されたアプリケーションに必要
なアプリケーションプログラムが格納された領域、およ
び、OSプログラム領域121、I/Fプログラム領域
122に対してのみ正当性チェックを行なうとともに
(ステップS13)、ワーキングメモリ14の選択され
たアプリケーションで用いる領域に対してのみ動作チェ
ックを行なう(ステップS14)。
Next, based on the obtained area information, only for the area in the program memory 12 in which the application program required for the selected application is stored, and for the OS program area 121 and the I / F program area 122. The validity check is performed (step S13), and the operation check is performed only on the area used by the selected application in the working memory 14 (step S14).

【0022】ステップS13におけるプログラムメモリ
12の自己診断、すなわち、正当性を確認する方法は、
具体的には以下のようにして行なわれる。プログラムメ
モリ12の正当性チェックを行なう場合、データメモリ
13の先頭に配置されているプログラムエリアチェック
数量指定バイト131を取得し、その数量nにしたが
い、続いて配置されているスタートアドレス132、ス
トップアドレス133、および、n=2の場合、2個目
のスタートアドレス134、ストップアドレス135の
各情報をそれぞれ取得する。これにより、今回チェック
を行なうプログラムメモリ12の領域情報を得ることが
できる。
The self-diagnosis of the program memory 12 in step S13, that is, the method of confirming the correctness is as follows.
Specifically, it is performed as follows. When the validity of the program memory 12 is checked, the program area check quantity designation byte 131 arranged at the head of the data memory 13 is acquired, and according to the quantity n, the start address 132 and the stop address are arranged subsequently. In the case of 133 and n = 2, each information of the second start address 134 and stop address 135 is acquired. Thereby, the area information of the program memory 12 to be checked this time can be obtained.

【0023】次に、取得した各領域情報に基づき、プロ
グラムメモリ12の選択されたアプリケーションに必要
なアプリケーションプログラムが格納された領域、この
例では第2のアプリケーションプログラム領域124、
および、OSプログラム領域121、I/Fプログラム
領域122に対して、順に1バイトごとに論理和を取り
(桁上がりは無視)、データメモリ13内のプログラム
エリア正当性チェックバイト136の値と比較する。こ
の比較の結果、両者が同一ならば、プログラムメモリ1
2は初期化時あるいは発行時に対し変化がないものとみ
なし、正当性があると判断する。
Next, based on the acquired area information, an area of the program memory 12 in which an application program required for the selected application is stored, which is the second application program area 124 in this example,
Further, the OS program area 121 and the I / F program area 122 are logically ORed byte by byte (ignoring carry) and compared with the value of the program area validity check byte 136 in the data memory 13. . As a result of this comparison, if both are the same, the program memory 1
2 is regarded as having no change from the time of initialization or issuance, and is judged to be valid.

【0024】ステップS14におけるワーキングメモリ
14の自己診断、すなわち、動作チェック方法は、具体
的には以下のようにして行なわれる。ワーキングメモリ
14の動作チェックを行なう場合、データメモリ13の
先頭に配置されているワーキングエリアチェック数量指
定バイト137を取得し、その数量nにしたがい、続い
て配置されているスタートアドレス138、ストップア
ドレス139を取得する。これにより、今回チェックを
行なうワーキングメモリ14の領域情報を得ることがで
きる。
The self-diagnosis of the working memory 14, that is, the operation check method in step S14 is specifically performed as follows. When the operation check of the working memory 14 is performed, the working area check quantity designation byte 137 arranged at the head of the data memory 13 is acquired and, according to the quantity n, the start address 138 and the stop address 139 are arranged subsequently. To get. As a result, the area information of the working memory 14 to be checked this time can be obtained.

【0025】次に、取得した各領域情報に基づき、ワー
キングメモリ14の選択されたアプリケーションで用い
る領域、この例では領域142のみに対し、たとえば、
データ「00hex」の書込み/読出しを行なった後、
データ「FFhex」の書込み/読出しを行なうことに
より、メモリが正常に動作するかなどを確認する。
Next, based on the acquired area information, for example, only the area 142 used in the selected application of the working memory 14, in this example, the area 142,
After writing / reading the data “00hex”,
By writing / reading the data “FFhex”, it is confirmed whether or not the memory operates normally.

【0026】次に、ステップS13,S14の自己診断
が終了すると、それ以外のあらかじめ定められた他の部
分(たとえば、演算部など)に対する自己診断を行なう
(ステップS15)。ステップS15の自己診断が終了
すると、それまで行なった自己診断の結果を制御素子1
1へ出力し(ステップS16)、自己診断処理を終了す
る。
Next, when the self-diagnosis in steps S13 and S14 is completed, the self-diagnosis is performed on other predetermined parts (for example, the arithmetic unit) (step S15). When the self-diagnosis in step S15 is completed, the result of the self-diagnosis performed up to then is applied to the control element 1
1 (step S16), and the self-diagnosis process ends.

【0027】以上説明したように、上記実施の形態によ
れば、実際のカード運用時に選択されたアプリケーショ
ンに必要なプログラムメモリ領域、ワーキングメモリ領
域のみに対して自己診断を行ない、実際のカード運用時
に使用しない不要なメモリ領域に対しては自己診断を行
なわないため、近年のメモリ容量の大きくなったICカ
ードに対しても、自己診断処理時間の短縮が可能とな
る。
As described above, according to the above embodiment, self-diagnosis is performed only on the program memory area and working memory area required for the application selected during actual card operation, and during actual card operation. Since the self-diagnosis is not performed on the unused memory area that is not used, the self-diagnosis processing time can be shortened even for an IC card having a large memory capacity in recent years.

【0028】また、メモリサイズが大容量化すると、一
般的に生産時の歩留まりが悪くなる。しかしながら、本
実施の形態のように、実際のカード運用時に必要なアプ
リケーションのメモリ領域のみに対して自己診断するこ
とで、もし未使用のメモリ領域に不良(欠陥)が見られ
ても、運用上において問題がないため、歩留まりの向上
にもなる。
Further, as the memory size increases, the yield in production generally deteriorates. However, as in the present embodiment, self-diagnosis is performed only on the memory area of the application required during actual card operation, so that even if a defect (defect) is found in the unused memory area, the operation is Since there is no problem in, the yield can be improved.

【0029】[0029]

【発明の効果】以上詳述したように本発明によれば、メ
モリ容量が大きくなっても、自己診断処理時間の短縮が
可能となる携帯可能電子装置を提供できる。
As described above in detail, according to the present invention, it is possible to provide a portable electronic device capable of shortening the self-diagnosis processing time even if the memory capacity increases.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施の形態に係るICカードを取扱う
端末装置の構成例を示すブロック図。
FIG. 1 is a block diagram showing a configuration example of a terminal device that handles an IC card according to an embodiment of the present invention.

【図2】ICカードの構成を概略的に示すブロック図。FIG. 2 is a block diagram schematically showing the configuration of an IC card.

【図3】プログラムメモリの構成を模式的に示す構成
図。
FIG. 3 is a configuration diagram schematically showing a configuration of a program memory.

【図4】ワーキングメモリの構成を模式的に示す構成
図。
FIG. 4 is a configuration diagram schematically showing a configuration of a working memory.

【図5】デ―タメモリに対するチェックするメモリ領域
の領域情報の格納方法を説明するための図。
FIG. 5 is a diagram for explaining a method of storing area information of a memory area to be checked in a data memory.

【図6】自己診断処理について説明するフローチャー
ト。
FIG. 6 is a flowchart illustrating a self-diagnosis process.

【図7】図6における自己診断処理の詳細を説明するフ
ローチャート。
FIG. 7 is a flowchart illustrating details of self-diagnosis processing in FIG.

【符号の説明】[Explanation of symbols]

1…ICカード(携帯可能電子装置)、2…ICカード
リーダ・ライタ、3…制御部、4…キーボード、5…デ
ィスプレイ装置、6…プリンタ、11…制御素子(制御
部)、12…プログラムメモリ(第1のメモリ)、13
…デ―タメモリ(第2のメモリ、記憶手段)、14…ワ
ーキングメモリ、15…コンタクト部、121…OSプ
ログラム領域、122…I/Fプログラム領域、123
…第1のアプリケーションプログラム領域、124…第
2のアプリケーションプログラム領域、125…第3の
アプリケーションプログラム領域、126…空き領域、
141,142,143…領域、144…未使用領域。
1 ... IC card (portable electronic device), 2 ... IC card reader / writer, 3 ... control unit, 4 ... keyboard, 5 ... display device, 6 ... printer, 11 ... control element (control unit), 12 ... program memory (First memory), 13
... data memory (second memory, storage means), 14 ... working memory, 15 ... contact part, 121 ... OS program area, 122 ... I / F program area, 123
... first application program area, 124 ... second application program area, 125 ... third application program area, 126 ... free area,
141, 142, 143 ... Area, 144 ... Unused area.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数の領域に分割され、かつ、これら複
数の領域のうち少なくとも1つの領域が選択的に使用さ
れる第1のメモリと、少なくとも前記第1のメモリの各
領域のうち選択された領域を示す領域情報を記憶してい
る第2のメモリと、前記第1のメモリの選択された領域
に対してアクセスを行なうための制御部とを有し、選択
的に外部との間でデータの入出力を行なう携帯可能電子
装置において、 当該携帯可能電子装置が起動されると、前記第2のメモ
リ内の領域情報に基づき、その領域情報で示される前記
第1のメモリの選択された領域に対してのみ正当性チェ
ックを行なう自己診断手段を具備したことを特徴とする
携帯可能電子装置。
1. A first memory which is divided into a plurality of areas, and at least one area of the plurality of areas is selectively used, and at least one of the areas of the first memory is selected. A second memory that stores area information indicating a different area, and a controller for accessing the selected area of the first memory, and selectively communicates with the outside. In a portable electronic device that inputs and outputs data, when the portable electronic device is activated, a selection of the first memory indicated by the area information is made based on the area information in the second memory. A portable electronic device comprising a self-diagnosis means for checking the validity of only an area.
【請求項2】 前記第1のメモリは書換え不可能な不揮
発性メモリおよび揮発性メモリの少なくともいずれか一
方のメモリからなり、前記第2のメモリは書換え可能な
不揮発性メモリからなることを特徴とする請求項1記載
の携帯可能電子装置。
2. The first memory comprises at least one of a non-rewritable nonvolatile memory and a volatile memory, and the second memory comprises a rewritable nonvolatile memory. The portable electronic device according to claim 1.
【請求項3】 少なくとも複数のアプリケーションプロ
グラムが格納されたプログラムメモリと、このプログラ
ムメモリに格納された複数のアプリケーションプログラ
ムにそれぞれ対応し、そのアプリケーションプログラム
の実行時に対応する領域が選択的に使用される複数の領
域からなるワーキングメモリと、前記プログラムメモリ
に格納された複数のアプリケーションプログラムのうち
選択されたアプリケーションプログラムが格納されてい
る領域、および、当該選択されたアプリケーションプロ
グラムに対応する前記ワーキングメモリの領域を示す各
領域情報を記憶している記憶手段と、前記プログラムメ
モリに格納された複数のアプリケーションプログラムの
うち選択されたアプリケーションプログラムを実行し、
当該アプリケーションプログラムに対応する前記ワーキ
ングメモリの領域を用いて所定の処理を行なう制御部と
を有し、選択的に外部との間でデータの入出力を行なう
携帯可能電子装置において、 当該携帯可能電子装置が起動されると、前記記憶手段内
の領域情報に基づき、その領域情報で示される前記プロ
グラムメモリの選択されたアプリケーションプログラム
が格納された領域、および、当該選択されたアプリケー
ションプログラムに対応する前記ワーキングメモリの領
域に対してのみそれぞれ正当性チェックを行なう自己診
断手段を具備したことを特徴とする携帯可能電子装置。
3. A program memory in which at least a plurality of application programs are stored, and an area corresponding to each of the plurality of application programs stored in the program memory and corresponding to the execution time of the application program are selectively used. A working memory including a plurality of areas, an area in which an application program selected from the plurality of application programs stored in the program memory is stored, and an area of the working memory corresponding to the selected application program. And executing a selected application program from among a plurality of application programs stored in the program memory,
A portable electronic device that has a control unit that performs a predetermined process using an area of the working memory corresponding to the application program and selectively inputs / outputs data to / from the outside. When the device is activated, based on the area information in the storage means, an area in which the selected application program of the program memory indicated by the area information is stored, and the area corresponding to the selected application program A portable electronic device comprising self-diagnosis means for checking the validity of each area of a working memory.
JP2002133060A 2002-05-08 2002-05-08 Portable electronic device Pending JP2003331236A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002133060A JP2003331236A (en) 2002-05-08 2002-05-08 Portable electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002133060A JP2003331236A (en) 2002-05-08 2002-05-08 Portable electronic device

Publications (1)

Publication Number Publication Date
JP2003331236A true JP2003331236A (en) 2003-11-21

Family

ID=29696261

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002133060A Pending JP2003331236A (en) 2002-05-08 2002-05-08 Portable electronic device

Country Status (1)

Country Link
JP (1) JP2003331236A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1518680A1 (en) 2003-09-24 2005-03-30 Fuji Photo Film Co., Ltd. Ink jet head and ink jet recording apparatus
JP2006252284A (en) * 2005-03-11 2006-09-21 Toshiba Corp Portable electronic device and IC card
US7664988B2 (en) 2004-08-25 2010-02-16 Universal Entertainment Corporation Gaming apparatus having memory fault detection
JP2021135539A (en) * 2020-02-21 2021-09-13 大日本印刷株式会社 Ic card with self-diagnosis function and self-diagnosis method of ic card

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1518680A1 (en) 2003-09-24 2005-03-30 Fuji Photo Film Co., Ltd. Ink jet head and ink jet recording apparatus
US7664988B2 (en) 2004-08-25 2010-02-16 Universal Entertainment Corporation Gaming apparatus having memory fault detection
US8112670B2 (en) 2004-08-25 2012-02-07 Universal Entertainment Corporation Gaming apparatus having memory fault detection
JP2006252284A (en) * 2005-03-11 2006-09-21 Toshiba Corp Portable electronic device and IC card
JP2021135539A (en) * 2020-02-21 2021-09-13 大日本印刷株式会社 Ic card with self-diagnosis function and self-diagnosis method of ic card
JP7400528B2 (en) 2020-02-21 2023-12-19 大日本印刷株式会社 IC card with self-diagnosis function and IC card self-diagnosis method

Similar Documents

Publication Publication Date Title
JP3015377B2 (en) IC card
JP2856393B2 (en) Portable electronic devices
JP2003331236A (en) Portable electronic device
JP3923546B2 (en) IC card
JP3471842B2 (en) Data management device, data storage device, and data management method
KR19990048136A (en) Computer system having identification number storage function and method
JPS59107491A (en) Ic card
JP2635601B2 (en) Portable electronic devices
JPH09212598A (en) Portable terminal device for ic card
JP3251579B2 (en) Portable electronic devices
JP2002150246A (en) Portable electronic device
JP4784138B2 (en) IC card and IC card program
JP7559916B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, ELEMENT DATA STORAGE METHOD, AND PROGRAM
JP4371696B2 (en) IC card issuing system
JPH05100961A (en) Data storage system
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP2004334745A (en) Ic card
US7346730B2 (en) Mobile electronic device
JP2005056259A (en) Portable electronic medium and portable electronic medium handling device
JP2008047042A (en) Portable electronic device and ic card
JP2974144B2 (en) Portable electronic devices
JP2008047040A (en) Portable electronic device and ic card
JP4810108B2 (en) IC card and control method thereof
JP2538907B2 (en) IC card
JP2003203211A (en) Portable electronic device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040713

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040913

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041019