JP4764034B2 - Portable electronic device, IC card and portable electronic device self-diagnosis method - Google Patents
Portable electronic device, IC card and portable electronic device self-diagnosis method Download PDFInfo
- Publication number
- JP4764034B2 JP4764034B2 JP2005069219A JP2005069219A JP4764034B2 JP 4764034 B2 JP4764034 B2 JP 4764034B2 JP 2005069219 A JP2005069219 A JP 2005069219A JP 2005069219 A JP2005069219 A JP 2005069219A JP 4764034 B2 JP4764034 B2 JP 4764034B2
- Authority
- JP
- Japan
- Prior art keywords
- application
- self
- diagnosis
- memory area
- diagnosed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000004092 self-diagnosis Methods 0.000 title claims description 168
- 238000000034 method Methods 0.000 title claims description 12
- 230000015654 memory Effects 0.000 claims description 120
- 230000003936 working memory Effects 0.000 claims description 47
- 230000004044 response Effects 0.000 claims description 28
- 230000004913 activation Effects 0.000 claims description 12
- 238000003745 diagnosis Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 claims description 2
- 238000002405 diagnostic procedure Methods 0.000 claims 1
- 238000012790 confirmation Methods 0.000 description 5
- 230000005856 abnormality Effects 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 241000030538 Thecla Species 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
Images
Landscapes
- Credit Cards Or The Like (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- For Increasing The Reliability Of Semiconductor Memories (AREA)
Description
本発明は、たとえば、書込み、書換えが可能な不揮発性メモリおよびCPU(セントラル・プロセッシング・ユニット)などの制御素子を有し、選択的に外部との間でデータの入出力を行なう手段を備えたICチップを内蔵した、いわゆるICカードと称される携帯可能電子装置に係り、特に複数のアプリケーションが登録されている携帯可能電子装置、ICカードおよび携帯可能電子装置の自己診断方法に関する。 The present invention has a control element such as a non-volatile memory that can be written and rewritten and a CPU (Central Processing Unit), and includes means for selectively inputting / outputting data to / from the outside. The present invention relates to a portable electronic device called an IC card that incorporates an IC chip, and more particularly to a portable electronic device in which a plurality of applications are registered , an IC card, and a self-diagnosis method for the portable electronic device .
最近、携帯可能電子装置として、不揮発性メモリ(EEPROM)、揮発性メモリ(RAM)、これらのメモリに対してデータの読出しおよびまたは書込みなどを行なう制御素子(CPU)、および、CPUの動作用プログラムなどを格納したROMを有し、選択的に外部との間でデータの入出力を行なう手段を備えたICチップを内蔵したICカードが産業各方面で利用されている。
一般に、この種のICカードは、コマンドやレスポンスを用いて、外部装置(ICカードリーダ・ライタ)との間でデータの入出力を行なうようになっている。
Recently, as portable electronic devices, nonvolatile memories (EEPROM), volatile memories (RAM), control elements (CPU) for reading and writing data to these memories, and programs for operating the CPU An IC card having an IC chip having a ROM storing the above and having a means for selectively inputting / outputting data to / from the outside is used in various industries.
In general, this type of IC card inputs and outputs data to and from an external device (IC card reader / writer) using commands and responses.
ところで、このようなICカードは、正常に動作するか否かの自己診断を行なう自己診断機能を備えていないのが一般的であるが、最近、そのような自己診断機能を備えたものが開発されている(たとえば、特許文献1、特許文献2参照)。
特許文献1に記載されたICカードは、活性化後に外部装置に対して行なわれる初期応答データの出力前に全ての自己診断を実施するものであり、特許文献2に記載されたICカードは、活性化後、初期応答データの出力に使用するレジスタなどの自己診断を実施した後、初期応答データの先頭バイトのみを出力してから残りの自己診断を実施するものである。
By the way, such an IC card generally does not have a self-diagnosis function for performing a self-diagnosis as to whether or not it normally operates. Recently, an IC card having such a self-diagnosis function has been developed. (For example, see
The IC card described in
一般に、ICカードにおける自己診断の内容は、ROM、RAM、CPU、EEPROMなどが正しく動作するか否かを確認するものである。自己診断の例として、ROMは、全てのROMデータに対してCRC(Cyclic Redundancy Code:巡回符号)計算を行なうことにより、あらかじめ計算しておいたCRCデータと比較し、両者が一致している場合はROMデータに問題がないとするものである。 In general, the content of self-diagnosis in an IC card is to check whether ROM, RAM, CPU, EEPROM, etc. operate correctly. As an example of self-diagnosis, the ROM performs CRC (Cyclic Redundancy Code) calculation for all ROM data, and compares them with the CRC data calculated in advance. Indicates that there is no problem in the ROM data.
また、RAMは、全てのバイトに対してデータが正しく書込まれ、読出されるか検査する。たとえば、各バイトにデータ「0xAA」を書込み、書込後に読出し、次にデータ「0x55」を書込み、書込後に読出し、問題ないかを確認する。CPUは、各レジスタに対してRAMと同様の確認を行なう。EEPROMに対しても、自己診断可能な領域に対してRAMと同様の確認を行なう。
従来のICカードにおける自己診断のタイミングは、上述したように、リセット解除後から初期応答データの出力前まで、あるいは、初期応答データの出力中に実施している。自己診断を実施できるタイミングは、国際標準仕様であるISO−7816−3で規定されているタイミングの範囲で、ICカードが独自で実施している。ISO−7816−3に記載されているタイミングとは、リセット解除後から初期応答データの先頭までは、400〜40000クロック以内で行なうこと、初期応答データは、1ビットが372クロックで構成されるビットの間隔で送信すること、などである。
このため、リソースであるRAM、EEPROM、ROMのメモリサイズが大きくなると、自己診断の処理時間が長くなり、上記のタイミングでは全てを自己診断するのは困難となっている。
As described above, the timing of the self-diagnosis in the conventional IC card is carried out after the reset is released and before the output of the initial response data or during the output of the initial response data. The timing at which the self-diagnosis can be performed is uniquely performed by the IC card within the range of the timing defined in ISO-7816-3, which is an international standard specification. The timing described in ISO-7816-3 is that it is performed within 400 to 40000 clocks from the release of reset to the beginning of the initial response data, and the initial response data is a bit composed of 372 clocks. And so on.
For this reason, if the memory size of the RAM, EEPROM, or ROM, which is a resource, increases, the self-diagnosis processing time becomes longer, and it is difficult to self-diagnose all at the above timing.
そこで、本発明は、動作するために最低限必要な機能のみに自己診断を行ない、その他の診断はアプリケーションが選択された場合に実行し、新たなアプリケーションが必要としている新たなリソースに対して自己診断を実施することで、リソースが増えた場合でも、活性化時に全てのリソースに対して自己診断するのではなく必要の範囲で順次診断を実施するので、自己診断の処理時間を著しく短縮することができる携帯可能電子装置、ICカードおよび携帯可能電子装置の自己診断方法を提供することを目的とする。 Therefore, the present invention performs self-diagnosis only for functions that are at least necessary for operation, and performs other diagnosis when an application is selected, and performs self-diagnosis for new resources required by the new application. By performing diagnosis, even if resources increase, self-diagnosis is not performed for all resources at the time of activation. An object of the present invention is to provide a portable electronic device , an IC card, and a portable electronic device self-diagnosis method .
本発明の携帯可能電子装置は、メモリと、このメモリに対してデータの読出しおよびまたは書込みを行なう制御素子を有し、外部からコマンドが入力されると、このコマンドに対応した処理を実行してその処理結果を外部へ出力し、かつ、少なくとも1つ以上のアプリケーションが登録されているとともに、これらアプリケーションごとに使用するメモリ領域を有していて、外部から入力されるアプリケーション選択コマンドにより所望のアプリケーションが選択可能な携帯可能電子装置において、前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するメモリ領域を示すアドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するメモリ領域が自己診断されているか否かを示す履歴情報が格納されている自己診断履歴テーブルと、外部からのアプリケーション選択コマンドによりアプリケーションが選択された際、前記自己診断履歴テーブルを参照することにより当該選択されたアプリケーションが利用するメモリ領域は自己診断済か否かを判定する判定手段と、この判定手段による判定の結果、選択されたアプリケーションが利用するメモリ領域が自己診断済である場合は当該メモリ領域の自己診断はスキップし、選択されたアプリケーションが利用するメモリ領域が自己診断済でない場合は当該メモリ領域が正常に動作するか否か自己診断する自己診断手段と、この自己診断手段において、選択されたアプリケーションが利用するメモリ領域が自己診断済でなく、他のアプリケーションが利用するメモリ領域と重複し、当該重複する他のアプリケーションが利用するメモリ領域が自己診断済である場合、当該アプリケーションが利用するメモリ領域のアドレスと前記重複する他のアプリケーションが利用するメモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段とを具備している。 The portable electronic device of the present invention has a memory and a control element that reads and / or writes data to and from the memory. When a command is input from the outside, a process corresponding to the command is executed. The processing result is output to the outside, and at least one or more applications are registered, and a memory area is used for each of these applications. A desired application is input by an application selection command input from the outside. Is a portable electronic device that manages the memory area for each application. The application program registration table stores the name of the application and the address indicating the memory area used by the application, and corresponds to each application. To do And diagnostics history table history information indicating whether re region is self-diagnosis is stored, when the application selected by the application selection command from an external, the by referring to the self-diagnostic history table Determination means for determining whether or not the memory area used by the selected application has been self-diagnosed, and if the result of determination by this determination means is that the memory area used by the selected application has been self-diagnosed, the memory The self-diagnosis of the area is skipped, and if the memory area used by the selected application is not self-diagnosed, the self-diagnosis means for self-diagnosis whether the memory area operates normally and the self-diagnosis means select The memory area used by the selected application is not self-diagnosis, If the memory area used by another application overlaps with the memory area used by the application and the memory area used by the other application has been self-diagnosed, the memory used by the other application overlapped with the address of the memory area used by the application An area for self-diagnosis is determined based on the address of the area, and a means for self-diagnosis for the determined area is provided.
また、本発明の携帯可能電子装置は、メモリと、このメモリに対してデータの読出しおよびまたは書込みを行なう制御素子を有し、外部装置からコマンドが入力されると、このコマンドに対応した処理を実行してその処理結果を外部装置へ出力し、かつ、少なくとも1つ以上のアプリケーションが登録されているとともに、これらアプリケーションごとに当該アプリケーションが動作するためのプログラムを格納したプログラム領域および当該アプリケーションが使用する作業用メモリ領域を有していて、外部装置から入力されるアプリケーション選択コマンドにより所望のアプリケーションが選択可能な携帯可能電子装置において、前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するプログラム領域および作業用メモリ領域を示す各アドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するプログラム領域および作業用メモリ領域が自己診断されているか否かを示す各履歴情報が格納されている自己診断履歴テーブルと、当該携帯可能電子装置の活性化後、前記外部装置に対して初期応答データを出力する初期応答出力手段と、この初期応答出力手段により初期応答データが出力された後、前記外部装置からアプリケーション選択コマンドが入力されると、前記アプリケーションプログラム登録テーブルを参照することにより、当該アプリケーション選択コマンドにより指定されたアプリケーションが登録されているか否かを判定する第1の判定手段と、この第1の判定手段による判定の結果、指定されたアプリケーションが登録されている場合、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションのプログラム領域は自己診断済か否かを判定する第2の判定手段と、この第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済でない場合、当該プログラム領域が正常に動作するか否か自己診断する第1の自己診断手段と、前記第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済の場合、あるいは、前記第1の自己診断手段による自己診断が終了すると、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションの作業用メモリ領域は自己診断済か否かを判定する第3の判定手段と、この第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済でない場合、当該作業用メモリ領域が正常に動作するか否か自己診断する第2の自己診断手段と、この第2の自己診断手段において、指定されたアプリケーションの作業用メモリ領域が自己診断済でなく、他のアプリケーションの作業用メモリ領域と重複し、当該重複する他のアプリケーションの作業用メモリ領域が自己診断済である場合、当該アプリケーションの作業用メモリ領域のアドレスと前記重複する他のアプリケーションの作業用メモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段と、前記第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済の場合、あるいは、前記第2の自己診断手段による自己診断が終了した後、前記外部装置からコマンドが入力されると、当該コマンドに対する処理を実行するコマンド処理手段とを具備している。 The portable electronic device of the present invention has a memory and a control element that reads and / or writes data to and from the memory. When a command is input from an external device, a process corresponding to the command is performed. Execute and output the processing result to an external device, and at least one or more applications are registered, and a program area storing a program for operating the application for each application and the application In a portable electronic device that has a working memory area for selecting a desired application by an application selection command input from an external device , the memory area for each application is managed. Application Application program registration table storing addresses indicating program areas to be used and work memory areas, and history information indicating whether the program areas and work memory areas corresponding to each application are self-diagnosed. The stored self-diagnosis history table, initial response output means for outputting initial response data to the external device after activation of the portable electronic device, and initial response data are output by the initial response output means. After that, when an application selection command is input from the external device, a first determination is made to determine whether or not the application designated by the application selection command is registered by referring to the application program registration table Means and this first Results of the determination by the constant unit, if the specified application is registered, the program area of the specified application by referring to the self-diagnostic history table second determination determines whether the self-diagnosis already means, and the second determination means results of the determination by, if the program of a specified application is not already self-diagnosis, the first self-diagnosis means for whether self the program area to work correctly, Refer to the self-diagnosis history table when the program area of the designated application has been self-diagnosed as a result of the determination by the second determination means, or when the self-diagnosis by the first self-diagnosis means is completed. the third is determined whether the self-diagnosis already working memory area of the specified application by And determination means, the result of the determination by the third determination means, when the working memory area of the specified application is not already self-diagnosis, a second of said working memory region to whether self operates normally In the self-diagnostic means and the second self-diagnostic means, the working memory area of the designated application is not self-diagnosed and overlaps with the working memory area of another application, and If the working memory area has been self-diagnosed, the area to be self-diagnosed this time is determined based on the address of the working memory area of the application and the address of the working memory area of another overlapping application, means for self-diagnosis for a region, of the determination by the third determination means results specified application Command processing means for executing processing for a command when a command is input from the external device when the working memory area has been self-diagnosed, or after self-diagnosis by the second self-diagnosis means is completed It has.
また、本発明のICカードは、メモリと、このメモリに対してデータの読出しおよびまたは書込みを行なう制御素子を有し、外部からコマンドが入力されると、このコマンドに対応した処理を実行してその処理結果を外部へ出力し、かつ、少なくとも1つ以上のアプリケーションが登録されているとともに、これらアプリケーションごとに使用するメモリ領域を有していて、外部から入力されるアプリケーション選択コマンドにより所望のアプリケーションが選択可能なICカードにおいて、前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するメモリ領域を示すアドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するメモリ領域が自己診断されているか否かを示す履歴情報が格納されている自己診断履歴テーブルと、外部からのアプリケーション選択コマンドによりアプリケーションが選択された際、前記自己診断履歴テーブルを参照することにより当該選択されたアプリケーションが利用するメモリ領域は自己診断済か否かを判定する判定手段と、この判定手段による判定の結果、選択されたアプリケーションが利用するメモリ領域が自己診断済である場合は当該メモリ領域の自己診断はスキップし、選択されたアプリケーションが利用するメモリ領域が自己診断済でない場合は当該メモリ領域が正常に動作するか否か自己診断する自己診断手段と、この自己診断手段において、選択されたアプリケーションが利用するメモリ領域が自己診断済でなく、他のアプリケーションが利用するメモリ領域と重複し、当該重複する他のアプリケーションが利用するメモリ領域が自己診断済である場合、当該アプリケーションが利用するメモリ領域のアドレスと前記重複する他のアプリケーションが利用するメモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段とを有したICモジュールと、このICモジュールを収納したICカード本体とを具備している。 Further, the IC card of the present invention has a memory and a control element for reading and / or writing data to / from the memory, and when a command is input from the outside, executes processing corresponding to the command. The processing result is output to the outside, and at least one or more applications are registered, and a memory area is used for each of these applications. A desired application is input by an application selection command input from the outside. In an IC card that can select the memory area for each application, an application program registration table storing an application name and an address indicating a memory area used by the application, and a memory corresponding to each application Territory There and diagnostics history table history information indicating whether it is the self-diagnosis is stored, when the application selected by the application selection command from an external, the selected by referring to the self-diagnostic history table A determination unit that determines whether or not the memory area used by the application is self-diagnosis; and as a result of determination by the determination unit, if the memory area used by the selected application is self-diagnosis, The self-diagnosis is skipped, and if the memory area used by the selected application is not self-diagnosis, the self-diagnosis means for self-diagnosis whether the memory area operates normally, and the self-diagnosis means selected by the self-diagnosis means The memory area used by the application is not self-diagnosis, and other applications If the memory area used by the other application overlaps with the memory area used by the application, and the memory area used by the other application that overlaps the address of the memory area used by the application And an IC module having a means for performing self-diagnosis on the determined area and an IC card main body containing the IC module.
さらに、本発明のICカードは、メモリと、このメモリに対してデータの読出しおよびまたは書込みを行なう制御素子を有し、外部装置からコマンドが入力されると、このコマンドに対応した処理を実行してその処理結果を外部装置へ出力し、かつ、少なくとも1つ以上のアプリケーションが登録されているとともに、これらアプリケーションごとに当該アプリケーションが動作するためのプログラムを格納したプログラム領域および当該アプリケーションが使用する作業用メモリ領域を有していて、外部装置から入力されるアプリケーション選択コマンドにより所望のアプリケーションが選択可能なICカードにおいて、前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するプログラム領域および作業用メモリ領域を示す各アドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するプログラム領域および作業用メモリ領域が自己診断されているか否かを示す各履歴情報が格納されている自己診断履歴テーブルと、当該携帯可能電子装置の活性化後、前記外部装置に対して初期応答データを出力する初期応答出力手段と、この初期応答出力手段により初期応答データが出力された後、前記外部装置からアプリケーション選択コマンドが入力されると、前記アプリケーションプログラム登録テーブルを参照することにより、当該アプリケーション選択コマンドにより指定されたアプリケーションが登録されているか否かを判定する第1の判定手段と、この第1の判定手段による判定の結果、指定されたアプリケーションが登録されている場合、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションのプログラム領域は自己診断済か否かを判定する第2の判定手段と、この第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済でない場合、当該プログラム領域が正常に動作するか否か自己診断する第1の自己診断手段と、前記第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済の場合、あるいは、前記第1の自己診断手段による自己診断が終了すると、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションの作業用メモリ領域は自己診断済か否かを判定する第3の判定手段と、この第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済でない場合、当該作業用メモリ領域が正常に動作するか否か自己診断する第2の自己診断手段と、この第2の自己診断手段において、指定されたアプリケーションの作業用メモリ領域が自己診断済でなく、他のアプリケーションの作業用メモリ領域と重複し、当該重複する他のアプリケーションの作業用メモリ領域が自己診断済である場合、当該アプリケーションの作業用メモリ領域のアドレスと前記重複する他のアプリケーションの作業用メモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段と、前記第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済の場合、あるいは、前記第2の自己診断手段による自己診断が終了した後、前記外部装置からコマンドが入力されると、当該コマンドに対する処理を実行するコマンド処理手段とを有したICモジュールと、このICモジュールを収納したICカード本体とを具備している。
Furthermore, the IC card of the present invention has a memory and a control element for reading and / or writing data to / from the memory, and executes a process corresponding to the command when a command is input from an external device. The processing result is output to an external device, and at least one or more applications are registered, a program area storing a program for operating the application for each application, and work used by the application In an IC card that has a memory area for use and can select a desired application by an application selection command input from an external device , the memory area for each application is managed and used by the application name and application The Application program registration table storing each address indicating the gram area and working memory area, and each history information indicating whether the corresponding program area and working memory area are self-diagnosed for each application. Self-diagnosis history table, initial response output means for outputting initial response data to the external device after activation of the portable electronic device, and after the initial response data is output by the initial response output means First determination means for determining whether or not an application designated by the application selection command is registered by referring to the application program registration table when an application selection command is input from the external device; In this first determination means That a result of the determination, if the specified application is registered, the program area of the specified application by referring to the self-diagnostic history table and a second determining means for determining whether the self-diagnosis already , the result of the determination by the second determination means, when the program of a specified application is not already self, the first self-diagnosis means for whether self the program area to work properly, the first As a result of the determination by the
本発明によれば、動作するために最低限必要な機能のみに自己診断を行ない、その他の診断はアプリケーションが選択された場合に実行し、新たなアプリケーションが必要としている新たなリソースに対して自己診断を実施することで、リソースが増えた場合でも、活性化時に全てのリソースに対して自己診断するのではなく必要の範囲で順次診断を実施するので、自己診断の処理時間を著しく短縮することができる携帯可能電子装置、ICカードおよび携帯可能電子装置の自己診断方法を提供できる。 According to the present invention, the self-diagnosis is performed only for the minimum necessary functions to operate, and other diagnoses are executed when an application is selected, and self-diagnosis is performed for new resources required by the new application. By performing diagnosis, even if resources increase, self-diagnosis is not performed for all resources at the time of activation. A portable electronic device , an IC card, and a portable electronic device self-diagnosis method can be provided.
以下、本発明の実施の形態について図面を参照して説明する。
図1は、本実施の形態に係る携帯可能電子装置としてのICカードを取扱うICカードシステムの構成例を示すものである。このICカードシステムは、ICカード10をカードリーダ・ライタ11を介してパーソナルコンピュータなどの端末装置12と接続可能にするとともに、端末装置12にキーボード13、CRT表示部13、プリンタ15を接続して構成される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a configuration example of an IC card system that handles an IC card as a portable electronic device according to the present embodiment. In this IC card system, an
図2は、ICカード10の構成を示すもので、制御部としての制御素子101(以下、単にCPUともいう)、データメモリ102、ワーキングメモリ103、プログラムメモリ104、および、カードリーダ・ライタ12との電気的接触を得るためのコンタクト部105によって構成されている。そして、これらのうち、破線内の部分(制御素子101、データメモリ102、ワーキングメモリ103、プログラムメモリ104)は1つ(あるいは複数)のICチップで構成され、さらに、このICチップとコンタクト部105とが一体的にICモジュール化されて、ICカード本体C内に埋設されている。
FIG. 2 shows a configuration of the
データメモリ102は、各種データの記憶に使用され、たとえば、EEPROMなどの記憶内容が書換え可能な不揮発性メモリで構成されている。以下、データメモリ102を単にEEPROMともいう。
The
ワーキングメモリ103は、制御素子101が処理を行なう際の処理データなどを一時的に保持するための作業用メモリであり、たとえば、RAMなどで構成される。以下、ワーキングメモリ103を単にRAMともいう。
The
プログラムメモリ104は、たとえば、マスクROMなどの記憶内容が書換え不可能な不揮発性メモリで構成されており、制御素子101の制御プログラム、および、複数のアプリケーションプログラムなどを記憶するものである。以下、プログラムメモリ104を単にROMともいう。
The program memory 104 is composed of, for example, a non-volatile memory that cannot be rewritten, such as a mask ROM, and stores a control program for the
図3は、データメモリ102の構成を示している。データメモリ102は、複数のアプリケーションに関するデータがファイル構造で記憶される。図3の例では、たとえば、2つのクレジット用アプリケーションが登録された状態を示している。
すなわち、最上位がマスタファイル(MF:Master File)201で、その配下には、各アプリケーションごとに設定されるフォルダとしてアプリケーションファイル(以下、単にADF(Application Dedicated File)ともいう)202,203が設けられ、さらに、これらアプリケーションファイル202,203の配下には、それぞれ実際にアプリケーションで使用されるエレメンタリファイル(以下、単にEF(Elementary File)ともいう)204,205,206、207,208,209が設けられている構成になっている。
FIG. 3 shows the configuration of the
In other words, a master file (MF: Master File) 201 is at the top, and application files (hereinafter, also simply referred to as ADF (Application Dedicated File)) 202 and 203 are provided as folders set for each application. Further, under these application files 202 and 203, elementary files (hereinafter also simply referred to as EF (Elementary File)) 204, 205, 206, 207, 208, and 209 that are actually used in the application are respectively stored. It is the configuration provided.
図4は、本実施の形態におけるメモリマップを示しており、使用メモリ領域を示すアドレスとそのメモリの種類を示している。
図5は、本実施の形態におけるアプリケーションプログラム登録テーブルを示していて、アプリケーションの名称とそのアプリケーションが使用するプログラム領域およびRAM領域とからなり、これは例えばROM内に設けられている。
図6は、本実施の形態におけるアプリケーションプログラムデータ格納フォーマットの一例を示しており、プログラムデータとCRC(巡回符号)データとで構成されている。
図7は、RAM自己診断履歴テーブルを示していて、アプリケーションごとに使用するRAM領域の自己診断診断が実施されたか否かの履歴が格納されており、これは例えばRAM内に設けられている。
図8は、アプリケーションプログラムの自己診断履歴テーブルを示していて、アプリケーションごとにアプリケーションプログラム領域の自己診断が実施されたか否かの履歴が格納されており、これは例えばRAM内に設けられている。
FIG. 4 shows a memory map in the present embodiment, and shows an address indicating a used memory area and a type of the memory.
FIG. 5 shows an application program registration table according to the present embodiment. The application program registration table includes an application name, a program area used by the application, and a RAM area, and is provided in, for example, a ROM.
FIG. 6 shows an example of an application program data storage format in the present embodiment, which is composed of program data and CRC (cyclic code) data.
FIG. 7 shows a RAM self-diagnosis history table, which stores a history of whether or not a self-diagnosis diagnosis of a RAM area used for each application has been performed, and is provided in, for example, the RAM.
FIG. 8 shows a self-diagnosis history table of the application program, in which a history as to whether or not self-diagnosis of the application program area has been performed is stored for each application, which is provided in, for example, the RAM.
図9は、アプリケーション(ファイル)選択コマンドのフォーマット例を示している。図示するように、コマンド分類部CLA(class)、命令部INS(instruction)、パラメータ部P1,P2、データ長Le、および、データ(アプリケーション名)Dataから構成されており、CLA/INS=00/A4の場合がアプリケーション選択コマンドである。パラメータP1が「04」の場合がADF選択、「00」の場合がDF選択であり、「02」の場合がEF選択である。本例では、ADF選択の場合に自己診断を行なう。ADF選択以外の場合は、そのパラメータに対応した処理を行なう。 FIG. 9 shows a format example of the application (file) selection command. As shown in the figure, it is composed of a command classification part CLA (class), an instruction part INS (instruction), parameter parts P1 and P2, a data length Le, and data (application name) Data, and CLA / INS = 00 / The case of A4 is an application selection command. When the parameter P1 is “04”, ADF is selected, when “00” is DF, and when “02” is EF, it is EF. In this example, self-diagnosis is performed when ADF is selected. In cases other than ADF selection, processing corresponding to the parameter is performed.
次に、上記のような構成において、図10〜図11に示すフローチャートを参照してICカード10の動作について説明する。
Next, the operation of the
まず、カードリーダ・ライタ11からの活性化動作(リセット解除)により、当該ICカード10は活性化される(ステップS1)。活性化されると、CPU101は、自身の自己診断を行なう(ステップS2)。CPU101の自己診断としては、レジスタにデータが正常に書込まれ、正常に読出されるか確認を行なう。たとえば、データ「0xAA」を書込み、読出し、次にデータ「0x55」を書込み、読出す。これにより、レジスタ内のデータがビットごとに干渉しないで正常に動作することを確認する。正常に行なわれなかった場合は、その時点で動作を停止する。
First, the
ステップS2における自己診断の結果、正常であることが確認されると、CPU101は、データの送信、受信のみに必要なRAMの領域(RAMの一部の領域)に対し自己診断を行なう(ステップS3)。RAMの自己診断としては、自己診断する領域のRAMの各バイトに対して、データが正常に書込まれ、正常に読出されるか確認を行なう。たとえば、データ「0xAA」を書込み、読出し、次にデータ「0x55」を書込み、読出す。これにより、各バイトのデータがビットごとに干渉しないで正常に動作することを確認する。確認する領域で異常が発生した場合は、その時点で動作を停止する。
If the result of the self-diagnosis in step S2 is normal, the
ステップS3における自己診断の結果、正常であることが確認されると、CPU101は、カードリーダ・ライタ11に対して初期応答データを送信し(ステップS4)、その後、カードリーダ・ライタ11から送信されるコマンドの受信を待機する(ステップS5)。
If the result of the self-diagnosis in step S3 is normal, the
カードリーダ・ライタ11からのコマンドを受信すると、CPU101は、まず、コマンドがCLA/INSコードからアプリケーション選択コマンドであるか確認する(ステップS6)。アプリケーション選択コマンド以外の場合は各コマンド処理を実行する(ステップS7)。
When receiving a command from the card reader /
アプリケーション選択コマンドの場合、CPU101は、パラメータP1が「04」、すなわちADF選択であるか確認し(ステップS8)、ADF選択以外の場合は、そのパラメータに対応した処理を行なう(ステップS9)。
In the case of an application selection command, the
ADF選択であった場合、CPU101は、図5に示すアプリケーションプログラム登録テーブルから指定されたアプリケーションが登録されているか確認する(ステップS10)。たとえば、アプリケーション選択コマンドが図9の例であった場合、アプリケーション名が「A000000005112233」であるので、そのアプリケーション名であるADFとそれに対するプログラム領域、使用RAM領域が図5に示すように登録されている。 When it is ADF selection, CPU101 confirms whether the application designated from the application program registration table shown in FIG. 5 is registered (step S10). For example, if the application selection command is the example shown in FIG. 9, the application name is “A000000005112233”, so that the application name ADF, the corresponding program area, and the RAM area used are registered as shown in FIG. Yes.
なお、指定されたアプリケーションが登録されていない場合、CPU101は、指定されたADFは存在しないことを意味するエラー処理を行ない(ステップS1)、そのステータスをカードリーダ・ライタ11へ送信する(ステップS12)。
If the designated application is not registered, the
図5に示すように、指定されたアプリケーションが登録されている場合、CPU101は、指定されたADFのプログラムが格納されているプログラム領域の自己診断が既に実施されているか確認する(ステップS13)。この確認は、RAM内に格納されている図8に示すアプリケーションプログラムの自己診断履歴テーブルを参照する。この確認の結果、自己診断が既に実施されている場合は、当該プログラム領域の自己診断はスキップする。
As shown in FIG. 5, when the designated application is registered, the
指定されたADFのプログラムが格納されているプログラム領域の自己診断が実施されていない場合、CPU101は、当該プログラム領域の自己診断を行なう(ステップS14)。プログラム領域の自己診断は、アプリケーションプログラムデータ格納フォーマットは図6に示すように構成されているので、全領域データの最後にCRCデータをあらかじめ格納しておき、自己診断時に全データのCRCを計算し、あらかじめ登録しておいたCRCデータと比較し、一致していれば正常と判断するものである。
上記自己診断の結果、正常である場合、CPU101は、図8に示すアプリケーションプログラムの自己診断履歴テーブルに実施済を意味するデータをセットする。
上記自己診断の結果、異常である場合、CPU101は、自己診断異常を示すエラー処理を行ない(ステップS15)、そのステータスをカードリーダ・ライタ11へ送信する(ステップS12)。
When the self-diagnosis of the program area in which the designated ADF program is stored is not performed, the
If the result of the self-diagnosis is normal, the
If the result of the self-diagnosis is abnormal, the
上記自己診断の結果、正常である場合、CPU101は、指定されたADFで使用するRAM領域の自己診断が既に実施されているか確認する(ステップS16)。この確認は、RAM内に格納されている図7に示すRAM自己診断履歴テーブルを参照する。この確認の結果、自己診断が既に実施されている場合は、当該RAM領域の自己診断はスキップする。
If the result of the self-diagnosis is normal, the
指定されたADFで使用するRAM領域の自己診断が実施されていない場合、CPU101は、当該RAM領域の自己診断を行なう(ステップS17)。この場合、まず、図7に示すRAM自己診断履歴テーブルを参照することで、当該RAM領域が他のアプリケーションで既に自己診断されているかの確認を行なう。この確認の結果、当該RAM領域が他のアプリケーションで自己診断済であった場合、図5のアプリケーションプログラム登録テーブルを参照することにより、他のアプリケーションで使用した領域(自己診断済のRAM領域)のアドレスを記憶し、今回自己診断するRAM領域のアドレスと比較して、オーバーラップしていないRAM領域のみを自己診断する。
If the self-diagnosis of the RAM area used in the designated ADF has not been performed, the
ここで、図12〜図16を参照して具体例を説明する。
まず、図12の具体例1は、今回指定されたアプリケーション名が「A000000005112233」であるが、全てのアプリケーションで使用するRAM領域が「未実施」の場合である。したがって、この場合、RAMの自己診断領域は、図5のアプリケーションプログラム登録テーブルから「0x0000−0x2FFF」のアドレスとなる。
Here, a specific example will be described with reference to FIGS.
First, specific example 1 in FIG. 12 is a case where the application name specified this time is “A000000005112233”, but the RAM area used by all the applications is “unexecuted”. Therefore, in this case, the RAM self-diagnosis area has an address of “0x0000-0x2FFF” from the application program registration table of FIG.
次に、図13の具体例2は、同じく今回指定されたアプリケーション名が「A000000005112233」であるが、他のアプリケーションの1つ、図13の例ではアプリケーション名が「A000000005445566」のアプリケーションで使用するRAM領域が「実施済」の場合である。したがって、この場合、RAMの自己診断領域は、図5のアプリケーションプログラム登録テーブルから、「0x0000−0x2FFF」と「0x0000−0x1FFF」との差である「0x2000−0x2FFF」のアドレスとなる。 Next, in the specific example 2 of FIG. 13, the application name specified this time is “A000000005112233”, but in one of the other applications, in the example of FIG. 13, the RAM used by the application whose application name is “A000000005445566”. This is a case where the area is “performed”. Therefore, in this case, the self-diagnosis area of the RAM is an address of “0x2000-0x2FFF” that is the difference between “0x0000-0x2FFF” and “0x0000-0x1FFF” from the application program registration table of FIG.
次に、図14の具体例3は、同じく今回指定されたアプリケーション名が「A000000005112233」であるが、他のアプリケーションの1つ、図14の例ではアプリケーション名が「A000000005778899」のアプリケーションで使用するRAM領域が「実施済」の場合である。したがって、この場合、RAMの自己診断領域は、図5のアプリケーションプログラム登録テーブルから、今回指定されたアプリケーションのRAM領域「0x0000−0x2FFF」は既に「実施済」のRAM領域「0x0000−0x3FFF」に含まれているので、無しとなる。すなわち、今回指定されたアプリケーションのRAM領域の自己診断はスキップする。 Next, in the specific example 3 of FIG. 14, the application name specified this time is “A000000005112233”, but in the example of FIG. 14, the RAM used by the application with the application name “A000000005778899”. This is a case where the area is “performed”. Therefore, in this case, from the application program registration table of FIG. 5, the RAM area “0x0000-0x2FFF” of the application specified this time is already included in the “executed” RAM area “0x0000-0x3FFF”. Because it is, it becomes none. That is, the self-diagnosis of the RAM area of the application specified this time is skipped.
次に、図15の具体例4は、同じく今回指定されたアプリケーション名が「A000000005112233」であるが、他の全てのアプリケーション、図15の例ではアプリケーション名が「A000000005445566」、「A000000005778899」のアプリケーションで使用するRAM領域が「実施済」の場合である。したがって、この場合、RAMの自己診断領域は、図14の具体例3と同様に、今回指定されたアプリケーションのRAM領域「0x0000−0x2FFF」は既に「実施済」のRAM領域「0x0000−0x3FFF」に含まれているので、無しとなる。すなわち、今回指定されたアプリケーションのRAM領域の自己診断はスキップする。 Next, in the specific example 4 of FIG. 15, the application name specified this time is “A000000005112233”, but in all other applications, in the example of FIG. 15, the application names are “A000000005445566” and “A000000005778899” This is a case where the RAM area to be used is “performed”. Therefore, in this case, the RAM self-diagnosis area of the application designated this time is “0x0000-0x2FFF” in the RAM area “0x0000-0x3FFF” already “executed”, as in the specific example 3 of FIG. Since it is included, it becomes none. That is, the self-diagnosis of the RAM area of the application specified this time is skipped.
次に、図16の具体例5は、同じく今回指定されたアプリケーション名が「A000000005112233」であるが、当該アプリケーションで使用するRAM領域は既に他のアプリケーションにより「実施済」で、他の全てのアプリケーション、図16の例ではアプリケーション名が「A000000005445566」、「A000000005778899」のアプリケーションで使用するRAM領域が「未実施」の場合である。したがって、この場合、RAMの自己診断領域は、今回指定されたアプリケーションのRAM領域「0x0000−0x2FFF」は既に「実施済」であるので、無しとなる。すなわち、今回指定されたアプリケーションのRAM領域の自己診断はスキップする。 Next, in the specific example 5 of FIG. 16, the application name specified this time is “A000000005112233”, but the RAM area used by the application is already “executed” by another application, and all other applications In the example of FIG. 16, the RAM area used by the application whose application name is “A000000005445566” and “A000000005778899” is “unexecuted”. Therefore, in this case, there is no RAM self-diagnosis area because the RAM area “0x0000-0x2FFF” of the application specified this time is already “executed”. That is, the self-diagnosis of the RAM area of the application specified this time is skipped.
ステップS17におけるRAM領域の自己診断は、自己診断する領域の各バイトに対して、データが正常に書込まれ、正常に読出されるか確認を行なう。たとえば、データ「0xAA」を書込み、読出し、次にデータ「0x55」を書込み、読出す。これにより、各バイトのデータがビットごとに干渉しないで正常に動作することを確認する。 In the self-diagnosis of the RAM area in step S17, it is confirmed whether data is normally written and read normally for each byte of the self-diagnosis area. For example, data “0xAA” is written and read, and then data “0x55” is written and read. As a result, it is confirmed that the data of each byte operates normally without interfering with each bit.
上記自己診断の結果、正常である場合、CPU101は、図7に示すRAM自己診断履歴テーブルに実施済を意味するデータをセットする。そして、CPU101は、当該コマンドに対する処理を実行し(ステップS19)、当該コマンド処理に対するレスポンスをカードリーダ・ライタ11へ送信し(ステップS20)、ステップS5に戻る。
If the result of the self-diagnosis is normal, the
上記自己診断の結果、異常である場合、CPU101は、自己診断異常を示すエラー処理を行ない(ステップS18)、そのステータスをカードリーダ・ライタ11へ送信する(ステップS12)。
If the result of the self-diagnosis is abnormal, the
以上説明したように、上記実施の形態によれば、ICカードの活性化後、当該ICカードが動作するために最低限必要な機能のみに自己診断を行ない、その他の診断はアプリケーションが選択された場合に実行し、新たなアプリケーションが必要としている新たなリソースに対して自己診断を実施する。
したがって、今後、ICカードのリソースが増えた場合でも、活性化時に全てのリソースに対して自己診断するのではなく、必要の範囲で順次診断を実施することで、自己診断の処理時間を著しく短縮することができる。
As described above, according to the above-described embodiment, after the activation of the IC card, the self-diagnosis is performed only for the functions necessary for the operation of the IC card, and the application is selected for the other diagnosis. If so, perform a self-diagnosis on new resources needed by the new application.
Therefore, even if the resources of the IC card increase in the future, the self-diagnosis processing time will be significantly shortened by performing the diagnosis in order as necessary instead of self-diagnosis for all resources at the time of activation. can do.
10…ICカード(携帯可能電子装置)、11…カードリーダ・ライタ(外部装置)、12…端末装置、13…キーボード、14…CRT表示部、15…プリンタ、101…制御素子(CPU)、102…データメモリ(EEPROM)、103…ワーキングメモリ(RAM)、104…プログラムメモリ(ROM)、105…コンタク部、201…マスタファイル(MF)、202,203…アプリケーションファイル(ADF)、204〜209…エレメンタリファイル(EF)。
DESCRIPTION OF
Claims (6)
前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するメモリ領域を示すアドレスが格納されているアプリケーションプログラム登録テーブルと、
アプリケーションごとに対応するメモリ領域が自己診断されているか否かを示す履歴情報が格納されている自己診断履歴テーブルと、
外部からのアプリケーション選択コマンドによりアプリケーションが選択された際、前記自己診断履歴テーブルを参照することにより当該選択されたアプリケーションが利用するメモリ領域は自己診断済か否かを判定する判定手段と、
この判定手段による判定の結果、選択されたアプリケーションが利用するメモリ領域が自己診断済である場合は当該メモリ領域の自己診断はスキップし、選択されたアプリケーションが利用するメモリ領域が自己診断済でない場合は当該メモリ領域が正常に動作するか否か自己診断する自己診断手段と、
この自己診断手段において、選択されたアプリケーションが利用するメモリ領域が自己診断済でなく、他のアプリケーションが利用するメモリ領域と重複し、当該重複する他のアプリケーションが利用するメモリ領域が自己診断済である場合、当該アプリケーションが利用するメモリ領域のアドレスと前記重複する他のアプリケーションが利用するメモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段と、
を具備したことを特徴とする携帯可能電子装置。 It has a memory and a control element that reads and / or writes data to / from this memory. When a command is input from the outside, it executes processing corresponding to this command and outputs the processing result to the outside. In addition, in the portable electronic device in which at least one or more applications are registered and a memory area is used for each of these applications, and a desired application can be selected by an application selection command input from the outside. ,
Managing the memory area for each application, an application program registration table storing the name of the application and the address indicating the memory area used by the application;
A self-diagnosis history table storing history information indicating whether or not the memory area corresponding to each application has been self-diagnosed;
When an application is selected by an application selection command from the outside , a determination unit that determines whether or not the memory area used by the selected application is self-diagnosis by referring to the self-diagnosis history table ;
If the memory area used by the selected application has already been self-diagnosed as a result of determination by this determining means, the self-diagnosis of the memory area is skipped, and the memory area used by the selected application is not self-diagnosed Self-diagnosis means for self-diagnosis whether the memory area operates normally;
In this self-diagnosis means, the memory area used by the selected application is not self-diagnosed, but overlaps with the memory area used by another application, and the memory area used by the other application is self-diagnosed. If there is, means for determining the area to be self-diagnosed this time based on the address of the memory area used by the application and the address of the memory area used by the overlapping other application, and means for self-diagnosis for the determined area;
A portable electronic device comprising:
前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するプログラム領域および作業用メモリ領域を示す各アドレスが格納されているアプリケーションプログラム登録テーブルと、
アプリケーションごとに対応するプログラム領域および作業用メモリ領域が自己診断されているか否かを示す各履歴情報が格納されている自己診断履歴テーブルと、
当該携帯可能電子装置の活性化後、前記外部装置に対して初期応答データを出力する初期応答出力手段と、
この初期応答出力手段により初期応答データが出力された後、前記外部装置からアプリケーション選択コマンドが入力されると、前記アプリケーションプログラム登録テーブルを参照することにより、当該アプリケーション選択コマンドにより指定されたアプリケーションが登録されているか否かを判定する第1の判定手段と、
この第1の判定手段による判定の結果、指定されたアプリケーションが登録されている場合、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションのプログラム領域は自己診断済か否かを判定する第2の判定手段と、
この第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済でない場合、当該プログラム領域が正常に動作するか否か自己診断する第1の自己診断手段と、
前記第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済の場合、あるいは、前記第1の自己診断手段による自己診断が終了すると、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションの作業用メモリ領域は自己診断済か否かを判定する第3の判定手段と、
この第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済でない場合、当該作業用メモリ領域が正常に動作するか否か自己診断する第2の自己診断手段と、
この第2の自己診断手段において、指定されたアプリケーションの作業用メモリ領域が自己診断済でなく、他のアプリケーションの作業用メモリ領域と重複し、当該重複する他のアプリケーションの作業用メモリ領域が自己診断済である場合、当該アプリケーションの作業用メモリ領域のアドレスと前記重複する他のアプリケーションの作業用メモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段と、
前記第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済の場合、あるいは、前記第2の自己診断手段による自己診断が終了した後、前記外部装置からコマンドが入力されると、当該コマンドに対する処理を実行するコマンド処理手段と、
を具備したことを特徴とする携帯可能電子装置。 It has a memory and a control element that reads and / or writes data from / to this memory. When a command is input from an external device, processing corresponding to this command is executed and the processing result is output to the external device. In addition, at least one or more applications are registered, and each application has a program area storing a program for operating the application and a working memory area used by the application, In a portable electronic device in which a desired application can be selected by an application selection command input from an external device,
Managing the memory area for each application, an application program registration table in which each address indicating the name of the application, the program area used by the application, and the working memory area is stored;
A self-diagnosis history table storing each history information indicating whether or not a program area and a working memory area corresponding to each application are self-diagnosed;
Initial response output means for outputting initial response data to the external device after activation of the portable electronic device;
After the initial response data is output by the initial response output means, when an application selection command is input from the external device, the application specified by the application selection command is registered by referring to the application program registration table. First determination means for determining whether or not
If the specified application is registered as a result of the determination by the first determining means, it is determined whether or not the program area of the specified application has been self-diagnosed by referring to the self-diagnosis history table. A second determination means;
Results of the determination by the second determination means, when the program of a specified application is not already self, the first self-diagnosis means for whether self the program area to work correctly,
Refer to the self-diagnosis history table when the program area of the designated application has been self-diagnosed as a result of the determination by the second determination means, or when the self-diagnosis by the first self-diagnosis means is completed. A third determination means for determining whether or not the working memory area of the designated application is self-diagnosis;
Results of the determination by the third determination means, when the working memory area of the specified application is not already self-diagnosis and the second self-diagnosis means for whether self the working memory area to operate normally ,
In the second self-diagnostic means, the working memory area of the designated application is not self-diagnosis, and the working memory area of another application overlaps with the working memory area of the other application. If the diagnosis has been completed, an area to be self-diagnosed this time is determined based on the address of the working memory area of the application and the address of the working memory area of another overlapping application, and self-diagnosis is performed on the determined area. Means,
As a result of the determination by the third determination means, if the working memory area of the designated application has been self-diagnosis, or after the self-diagnosis by the second self-diagnosis means is completed, a command is issued from the external device. When input, command processing means for executing processing for the command;
A portable electronic device comprising:
前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するメモリ領域を示すアドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するメモリ領域が自己診断されているか否かを示す履歴情報が格納されている自己診断履歴テーブルと、外部からのアプリケーション選択コマンドによりアプリケーションが選択された際、前記自己診断履歴テーブルを参照することにより当該選択されたアプリケーションが利用するメモリ領域は自己診断済か否かを判定する判定手段と、この判定手段による判定の結果、選択されたアプリケーションが利用するメモリ領域が自己診断済である場合は当該メモリ領域の自己診断はスキップし、選択されたアプリケーションが利用するメモリ領域が自己診断済でない場合は当該メモリ領域が正常に動作するか否か自己診断する自己診断手段と、この自己診断手段において、選択されたアプリケーションが利用するメモリ領域が自己診断済でなく、他のアプリケーションが利用するメモリ領域と重複し、当該重複する他のアプリケーションが利用するメモリ領域が自己診断済である場合、当該アプリケーションが利用するメモリ領域のアドレスと前記重複する他のアプリケーションが利用するメモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段とを有したICモジュールと、
このICモジュールを収納したICカード本体と、
を具備したことを特徴とするICカード。 It has a memory and a control element that reads and / or writes data to / from this memory. When a command is input from the outside, it executes processing corresponding to this command and outputs the processing result to the outside. In addition, in an IC card in which at least one or more applications are registered and a memory area is used for each of these applications, and a desired application can be selected by an application selection command input from the outside.
The memory area for each application is managed, and an application program registration table storing an address indicating the name of the application and the memory area used by the application, and whether or not the memory area corresponding to each application has been self-diagnosed And a memory area used by the selected application by referring to the self-diagnosis history table when an application is selected by an external application selection command. Determines whether the self-diagnosis has been completed, and if the result of determination by the determination means is that the memory area used by the selected application has been self-diagnosed, the self-diagnosis of the memory area is skipped and selected. A And self diagnosis means if the memory region is not already self-diagnosis of whether or not the self-diagnosis the memory area to work properly that publication is to use, in the self-diagnosis unit, the memory region is self selected application uses If the memory area used by the other application is self-diagnosed, the address of the memory area used by the application and the other An IC module having a means for self-diagnosis based on an address of a memory area used by an application and a means for self-diagnosis for the determined area ;
An IC card body containing the IC module;
An IC card comprising:
前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するプログラム領域および作業用メモリ領域を示す各アドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するプログラム領域および作業用メモリ領域が自己診断されているか否かを示す各履歴情報が格納されている自己診断履歴テーブルと、当該携帯可能電子装置の活性化後、前記外部装置に対して初期応答データを出力する初期応答出力手段と、この初期応答出力手段により初期応答データが出力された後、前記外部装置からアプリケーション選択コマンドが入力されると、前記アプリケーションプログラム登録テーブルを参照することにより、当該アプリケーション選択コマンドにより指定されたアプリケーションが登録されているか否かを判定する第1の判定手段と、この第1の判定手段による判定の結果、指定されたアプリケーションが登録されている場合、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションのプログラム領域は自己診断済か否かを判定する第2の判定手段と、この第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済でない場合、当該プログラム領域が正常に動作するか否か自己診断する第1の自己診断手段と、前記第2の判定手段による判定の結果、指定されたアプリケーションのプログラム領域が自己診断済の場合、あるいは、前記第1の自己診断手段による自己診断が終了すると、前記自己診断履歴テーブルを参照することにより当該指定されたアプリケーションの作業用メモリ領域は自己診断済か否かを判定する第3の判定手段と、この第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済でない場合、当該作業用メモリ領域が正常に動作するか否か自己診断する第2の自己診断手段と、この第2の自己診断手段において、指定されたアプリケーションの作業用メモリ領域が自己診断済でなく、他のアプリケーションの作業用メモリ領域と重複し、当該重複する他のアプリケーションの作業用メモリ領域が自己診断済である場合、当該アプリケーションの作業用メモリ領域のアドレスと前記重複する他のアプリケーションの作業用メモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する手段と、前記第3の判定手段による判定の結果、指定されたアプリケーションの作業用メモリ領域が自己診断済の場合、あるいは、前記第2の自己診断手段による自己診断が終了した後、前記外部装置からコマンドが入力されると、当該コマンドに対する処理を実行するコマンド処理手段とを有したICモジュールと、
このICモジュールを収納したICカード本体と、
を具備したことを特徴とするICカード。 It has a memory and a control element that reads and / or writes data from / to this memory. When a command is input from an external device, processing corresponding to this command is executed and the processing result is output to the external device. In addition, at least one or more applications are registered, and each application has a program area storing a program for operating the application and a working memory area used by the application, In an IC card in which a desired application can be selected by an application selection command input from an external device,
Managing the memory area for each application, an application program registration table storing each address indicating the name of the application, the program area used by the application, and the working memory area, and the program area corresponding to each application, A self-diagnosis history table storing each history information indicating whether or not the working memory area has been self-diagnosed, and outputting the initial response data to the external device after activation of the portable electronic device initial response output means, after the initial response data is output by the initial response output means, when the application selection command is input from the external device, by referring to the application program registration table, the application selected scene A first determination means for determining whether the given application is registered by de, a result of determination by the first determination unit, if the specified application is registered, the self-diagnostic history table The second determination means for determining whether or not the program area of the designated application has been self-diagnosed by referring to, and the program area of the designated application is determined as a result of the determination by the second determination means. If not already diagnosed, the first self-diagnostic means for the program area is whether self operates normally, the result of determination by the second determination means, a program of a specified application is in the diagnostic test already If, alternatively, the self-diagnosis is completed by the first self-diagnosis means, the self-diagnostic history table Third determining means for determining whether the self-diagnosis already working memory area of the specified application is by irradiation, the result of the determination by the third determination means, a working memory of the specified application If the area is not already self-diagnosis and the second self-diagnosis means for the working memory area is whether self operates normally, in the second self-diagnosis means, a working memory of a specified application Is not self-diagnosed and overlaps with the working memory area of another application, and the overlapping working memory area of the other application is self-diagnosed, the duplicate of the address of the working memory area of the application Determine the area to be self-diagnosed this time based on the address of the working memory area of other applications If the result of the determination by the third determination means and the working memory area of the designated application has already been self-diagnosed, or the self-diagnosis by the second self-diagnosis means An IC module having command processing means for executing processing for the command when a command is input from the external device after the termination;
An IC card body containing the IC module;
An IC card comprising:
前記アプリケーションごとのメモリ領域を管理するもので、アプリケーションの名称とアプリケーションが使用するメモリ領域を示すアドレスが格納されているアプリケーションプログラム登録テーブルと、アプリケーションごとに対応するメモリ領域が自己診断されているか否かを示す履歴情報が格納されている自己診断履歴テーブルとを有し、The memory area for each application is managed, and an application program registration table storing an address indicating the name of the application and the memory area used by the application, and whether or not the memory area corresponding to each application has been self-diagnosed And a self-diagnosis history table storing history information indicating
外部からのアプリケーション選択コマンドによりアプリケーションが選択された際、前記自己診断履歴テーブルを参照することにより当該選択されたアプリケーションが利用するメモリ領域は自己診断済か否かを判定する判定工程と、A determination step of determining whether or not the memory area used by the selected application is self-diagnosed by referring to the self-diagnosis history table when an application is selected by an external application selection command;
この判定工程による判定の結果、選択されたアプリケーションが利用するメモリ領域が自己診断済である場合は当該メモリ領域の自己診断はスキップし、選択されたアプリケーションが利用するメモリ領域が自己診断済でない場合は当該メモリ領域が正常に動作するか否か自己診断する自己診断工程と、If the memory area used by the selected application has already been self-diagnosed as a result of the determination in this determination step, the self-diagnosis of the memory area is skipped, and the memory area used by the selected application has not been self-diagnosed Is a self-diagnosis process for self-diagnosis whether the memory area operates normally;
この自己診断工程において、選択されたアプリケーションが利用するメモリ領域が自己診断済でなく、他のアプリケーションが利用するメモリ領域と重複し、当該重複する他のアプリケーションが利用するメモリ領域が自己診断済である場合、当該アプリケーションが利用するメモリ領域のアドレスと前記重複する他のアプリケーションが利用するメモリ領域のアドレスとに基づき今回自己診断する領域を決定し、この決定した領域に対し自己診断する工程と、In this self-diagnosis process, the memory area used by the selected application is not self-diagnosed, overlaps with the memory area used by another application, and the memory area used by the other application is self-diagnosed. If there is, determining the area to be self-diagnosed this time based on the address of the memory area used by the application and the address of the memory area used by the overlapping other application, self-diagnosis for the determined area,
を具備したことを特徴とする携帯可能電子装置の自己診断方法。A self-diagnosis method for a portable electronic device, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005069219A JP4764034B2 (en) | 2005-03-11 | 2005-03-11 | Portable electronic device, IC card and portable electronic device self-diagnosis method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005069219A JP4764034B2 (en) | 2005-03-11 | 2005-03-11 | Portable electronic device, IC card and portable electronic device self-diagnosis method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006252284A JP2006252284A (en) | 2006-09-21 |
JP4764034B2 true JP4764034B2 (en) | 2011-08-31 |
Family
ID=37092706
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005069219A Expired - Lifetime JP4764034B2 (en) | 2005-03-11 | 2005-03-11 | Portable electronic device, IC card and portable electronic device self-diagnosis method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4764034B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5367236B2 (en) * | 2007-06-14 | 2013-12-11 | 株式会社東芝 | Portable electronic device and IC card |
JP2011039656A (en) * | 2009-08-07 | 2011-02-24 | Dainippon Printing Co Ltd | Ic chip, self-diagnostic method, self-diagnostic program and ic card |
JP5413060B2 (en) * | 2009-08-28 | 2014-02-12 | 富士通株式会社 | Memory diagnostic method and memory circuit |
JP7400528B2 (en) * | 2020-02-21 | 2023-12-19 | 大日本印刷株式会社 | IC card with self-diagnosis function and IC card self-diagnosis method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03147086A (en) * | 1989-11-01 | 1991-06-24 | Hitachi Maxell Ltd | Ic card |
JPH03171386A (en) * | 1989-11-30 | 1991-07-24 | Toshiba Corp | Portable electronic device |
JPH0635813A (en) * | 1992-07-17 | 1994-02-10 | N T T Data Tsushin Kk | Diagnosing method for electronic computer |
JPH08190614A (en) * | 1995-01-11 | 1996-07-23 | Dainippon Printing Co Ltd | Ic card |
JP2003281487A (en) * | 2002-03-20 | 2003-10-03 | Toshiba Corp | Portable electronic device and method of providing application and data area in memory |
JP2003331236A (en) * | 2002-05-08 | 2003-11-21 | Toshiba Corp | Portable electronic device |
-
2005
- 2005-03-11 JP JP2005069219A patent/JP4764034B2/en not_active Expired - Lifetime
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03147086A (en) * | 1989-11-01 | 1991-06-24 | Hitachi Maxell Ltd | Ic card |
JPH03171386A (en) * | 1989-11-30 | 1991-07-24 | Toshiba Corp | Portable electronic device |
JPH0635813A (en) * | 1992-07-17 | 1994-02-10 | N T T Data Tsushin Kk | Diagnosing method for electronic computer |
JPH08190614A (en) * | 1995-01-11 | 1996-07-23 | Dainippon Printing Co Ltd | Ic card |
JP2003281487A (en) * | 2002-03-20 | 2003-10-03 | Toshiba Corp | Portable electronic device and method of providing application and data area in memory |
JP2003331236A (en) * | 2002-05-08 | 2003-11-21 | Toshiba Corp | Portable electronic device |
Also Published As
Publication number | Publication date |
---|---|
JP2006252284A (en) | 2006-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR940007351B1 (en) | Portable electronic equipement | |
JP3590338B2 (en) | Portable electronic devices | |
JP4764034B2 (en) | Portable electronic device, IC card and portable electronic device self-diagnosis method | |
JP5259540B2 (en) | Portable electronic device, IC card, portable electronic device processing system, and portable electronic device control method | |
EP2194458A2 (en) | Request processing device, request processing system, and access testing method | |
JP2008310596A (en) | Portable electronic equipment and control method for potable electronic equipment | |
JP2007257271A (en) | Memory diagnosis method, microcomputer system and program | |
JP2005174045A (en) | Source program conversion device, source program conversion method, source program conversion program and program recording medium | |
JP4868979B2 (en) | Portable electronic device and IC card | |
JP2731047B2 (en) | Program operand check method | |
JP4203165B2 (en) | IC card | |
US5146458A (en) | Data transfer checking system | |
JP5367236B2 (en) | Portable electronic device and IC card | |
JP7400528B2 (en) | IC card with self-diagnosis function and IC card self-diagnosis method | |
JPS6373339A (en) | Portable electronic equipment | |
JP4601968B2 (en) | IC card and IC card program that eliminates data integrity check | |
JP4527419B2 (en) | Program trace method and trace processing system | |
JP6926945B2 (en) | IC card and terminal equipment | |
JP2024036028A (en) | Electronic information storage medium, ic card, issuing process method, and program | |
JP2003288215A (en) | Information processing apparatus | |
JP5075404B2 (en) | Portable electronic device, file access method and IC card in portable electronic device | |
JP2008152452A (en) | Portable electronic device, control method for portable electronic device, and ic card | |
JP2677043B2 (en) | Program development support device | |
JP2022106442A (en) | Electronic information storage medium, patch program writing method, and program | |
JP2004021297A (en) | Portable electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080122 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110222 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110425 |
|
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: 20110517 |
|
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: 20110610 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140617 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4764034 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: 20140617 Year of fee payment: 3 |