JP2007334915A - Memory card - Google Patents

Memory card Download PDF

Info

Publication number
JP2007334915A
JP2007334915A JP2007219871A JP2007219871A JP2007334915A JP 2007334915 A JP2007334915 A JP 2007334915A JP 2007219871 A JP2007219871 A JP 2007219871A JP 2007219871 A JP2007219871 A JP 2007219871A JP 2007334915 A JP2007334915 A JP 2007334915A
Authority
JP
Japan
Prior art keywords
firmware
flash
memory
area
memory card
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
JP2007219871A
Other languages
Japanese (ja)
Inventor
Makoto Mori
真琴 森
Narisuke Hirozawa
成祐 廣澤
Junji Yomo
淳史 四方
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2007219871A priority Critical patent/JP2007334915A/en
Publication of JP2007334915A publication Critical patent/JP2007334915A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To additionally correct or modify a program by selecting a certain firmware-on-flash from a plurality of firmware-on-flashes. <P>SOLUTION: In a memory card 1, firmware-on-flashes FOF1-FOF3 serving as programs for adding, modifying or correcting functions such as batch programs are stored in a flash memory 2 independently of programs stored in a built-in ROM 6. Then, the firmware-on-flash to be enabled is set by means of a parameter sector or the like and loaded to an external RAM 7 and the CPU of control logic 4 executes a process. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、メモリカードに関し、特に、不揮発性メモリを用いたメモリカードの多機能化に適用して有効な技術に関するものである。   The present invention relates to a memory card, and more particularly to a technique effective when applied to multi-functionalization of a memory card using a nonvolatile memory.

パーソナルコンピュータや多機能端末機などの記憶装置として、メモリカードが急速に普及している。近年の高性能化の要求に伴って、メモリカードに搭載される半導体メモリとして、たとえば、電気的に一括消去、書き換えが可能であり、大容量のデータを保持できるフラッシュメモリなどの不揮発性メモリが用いられている。   Memory cards are rapidly spreading as storage devices such as personal computers and multi-function terminals. With the recent demand for higher performance, as a semiconductor memory mounted on a memory card, for example, a non-volatile memory such as a flash memory that can be electrically erased and rewritten electrically and can hold a large amount of data. It is used.

このようなメモリカードにおいては、制御プログラムが該メモリカードに設けられたROM(Read Only Memory)などに格納されている。また、制御プログラムに対するパッチプログラムやROMに格納された制御プログラムの機能を拡張する追加制御プログラムなどのファームウェアがフラッシュメモリに格納されている場合もある。   In such a memory card, a control program is stored in a ROM (Read Only Memory) provided in the memory card. In addition, firmware such as a patch program for the control program or an additional control program for expanding the function of the control program stored in the ROM may be stored in the flash memory.

このファームウェア(以下、ファームオンフラッシュという)は、自由に何度でも書き換えが可能であり、製品となっても、変更、機能の追加などを容易に行うことができる。   This firmware (hereinafter referred to as “firm on flash”) can be freely rewritten any number of times, and even if it is a product, it can be easily changed and added with functions.

また、マルチメディアカードなどにおいては、ファームウェアによってコマンド、データ形式の有効/無効をそれぞれ設定するものがある(たとえば、特許文献1参照)。   In some multimedia cards, the command and the data format are set to be valid / invalid by firmware (see, for example, Patent Document 1).

さらに、ICカードにおいては、ROM内のコマンドテーブルとは別にEEPROM(Electricaly Erasable and Programmable ROM)などの不揮発性メモリ内にコマンドテーブルを設け、ROM内のコマンドテーブルが第三者に知られたり、知られる恐れがあるときに、該不揮発性メモリ内にコマンドテーブルを用いるものがある(たとえば、特許文献2参照)。
特開2003−085509号公報 特開平7−44672号公報
Furthermore, in the IC card, a command table is provided in a nonvolatile memory such as an EEPROM (Electrically Erasable and Programmable ROM) separately from the command table in the ROM, and the command table in the ROM is known to third parties. In some cases, a command table is used in the non-volatile memory when there is a risk of being read (see, for example, Patent Document 2).
JP 2003-085509 A Japanese Unexamined Patent Publication No. 7-44672

ところが、上記のようなメモリカードにおいては、次のような問題点があることが本発明者により見い出された。   However, the present inventors have found that the above memory card has the following problems.

すなわち、ファームオンフラッシュは、メモリカードの起動時などにコントローラに設けられたCPUのワークエリアとして用いられるRAM(Random Access Memory)に展開されることになるので、RAMに展開可能な該ファームオンフラッシュのデータ容量に制限が生じてしまうことから、1つのファームオンフラッシュのみが備えられることになる。   That is, the firmware on flash is expanded in a RAM (Random Access Memory) used as a CPU work area provided in the controller when the memory card is activated. Therefore, only one firmware on flash is provided.

そのため、ファームオンフラッシュによる追加機能やプログラム修正なども制限を受けることになってしまい、メモリカードの利便性が損なわれてしまう恐れがある。   For this reason, additional functions and program corrections due to firmware-on-flash are also restricted, and the convenience of the memory card may be impaired.

また、不揮発性メモリ内にコマンドテーブルを有するICカードにおいて、該ICカードでは、不揮発性メモリとコントローラとが1つの半導体チップに形成され、さらにEEPROMでは通常バイト単位でのランダムアクセスが可能とされているが、メモリカードでは、不揮発性メモリとコントローラとが別の半導体チップにそれぞれ形成されており、不揮発性メモリへのアクセス単位もたとえば、512バイト単位などのシーケンシャルアクセスとされている。   Further, in an IC card having a command table in a nonvolatile memory, the nonvolatile memory and the controller are formed in one semiconductor chip, and the EEPROM is usually capable of random access in byte units. However, in the memory card, the non-volatile memory and the controller are formed on different semiconductor chips, and the access unit to the non-volatile memory is also a sequential access such as a 512-byte unit.

よって、メモリカードの場合、不揮発性メモリにファームオンフラッシュを格納し、コントローラによって該ファームオンフラッシュを読み出す構成では、コントローラとの動作速度が異なるために、データの読み出し、およびデータ転送速度のオーバヘッドが大きくなってしまうという問題がある。   Therefore, in the case of a memory card, in the configuration in which the firmware on flash is stored in the non-volatile memory and the firmware on flash is read out by the controller, the operation speed with the controller is different, so the overhead of data reading and data transfer speed is increased. There is a problem that it gets bigger.

本発明の目的は、複数のファームオンフラッシュを有し、ファームオンフラッシュを任意に選択することにより、プログラムの追加修正や変更などを行うことのできるメモリカードを提供することにある。   An object of the present invention is to provide a memory card that has a plurality of firmware-on-flashes, and can arbitrarily add, modify, or change a program by arbitrarily selecting the firmware-on-flash.

本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、次のとおりである。   Of the inventions disclosed in the present application, the outline of typical ones will be briefly described as follows.

本発明は、複数の不揮発性メモリセルを有し、所定の情報を格納可能な不揮発性半導体メモリと、外部から発行されたコマンドに基づいて不揮発性半導体メモリの動作指示を行うコントローラとからなるメモリカードであって、該不揮発性半導体メモリは、2つ以上のファームウェアを格納可能とし、該コントローラは、ファームウェアを格納する揮発性半導体メモリを備え、2つ以上のファームウェアが格納されている場合にファームウェア選択指示があると、揮発性半導体メモリに格納された2つ以上のファームウェアから、任意の1つのファームウェアを選択して揮発性半導体メモリに格納し、コントローラは揮発性半導体メモリにアクセスしてファームウェアによる処理を実行するものである。   The present invention includes a non-volatile semiconductor memory having a plurality of non-volatile memory cells and capable of storing predetermined information, and a controller for instructing operation of the non-volatile semiconductor memory based on an externally issued command. The non-volatile semiconductor memory is a card that can store two or more firmware, and the controller includes a volatile semiconductor memory that stores the firmware, and the firmware is stored when the two or more firmware is stored. When there is a selection instruction, one arbitrary firmware is selected from two or more firmware stored in the volatile semiconductor memory and stored in the volatile semiconductor memory, and the controller accesses the volatile semiconductor memory and depends on the firmware. The process is executed.

より具体的には、複数の不揮発性メモリセルを有し、データおよびそのデータ管理情報を格納可能な不揮発性半導体メモリと、外部から発行されたコマンドに基づいて該不揮発性半導体メモリの動作指示を行うコントローラとからなるメモリカードであって、該不揮発性半導体メモリは、データとして2つ以上のファームウェアを格納可能に構成され、該コントローラは、ファームウェアを格納する揮発性半導体メモリを備え、ファームウェア選択指示が有効になると、揮発性半導体メモリに格納可能な2つ以上のファームウェアから、任意の1つのファームウェアを選択して揮発性半導体メモリに格納し、揮発性半導体メモリにアクセスしてファームウェアによる処理を実行し、コントローラは、不揮発性半導体メモリのファームウェアのデータ管理情報を用いて揮発性半導体メモリに格納するファームウェアを検索するものである。   More specifically, a nonvolatile semiconductor memory having a plurality of nonvolatile memory cells and capable of storing data and data management information thereof, and operating instructions of the nonvolatile semiconductor memory based on an externally issued command A non-volatile semiconductor memory configured to store two or more firmware as data, the controller including a volatile semiconductor memory for storing firmware, and a firmware selection instruction When is enabled, any one firmware is selected from two or more firmware that can be stored in the volatile semiconductor memory, stored in the volatile semiconductor memory, accessed to the volatile semiconductor memory, and executed by the firmware. The controller is the firmware of the nonvolatile semiconductor memory It is to find the firmware to be stored in the volatile semiconductor memory using the chromatography data management information.

また、本発明は、前記ファームウェアのデータ管理情報が、不揮発性半導体メモリに格納されたファームウエアのスタートアドレス値よりなるものである。   According to the present invention, the firmware data management information comprises a firmware start address value stored in a nonvolatile semiconductor memory.

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば以下のとおりである。   Among the inventions disclosed in the present application, effects obtained by typical ones will be briefly described as follows.

(1)メモリカードの多機能化などを実現することができるとともに、プログラムの修正や追加などにも迅速に対応することができる。   (1) It is possible to realize a multi-functional memory card, etc., and it is possible to quickly cope with program correction and addition.

(2)上記(1)により、市場変化にフレキシブルに対応することができ、かつ低コストのメモリカードを提供することができる。   (2) According to the above (1), it is possible to flexibly cope with market changes and to provide a low-cost memory card.

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一の部材には原則として同一の符号を付し、その繰り返しの説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiment, and the repetitive description thereof will be omitted.

図1は、本発明の一実施の形態によるメモリカードのブロック図、図2は、図1のメモリカードに設けられたフラッシュメモリにおける内部構成の説明図、図3は、図2のフラッシュメモリに設けられた管理領域おける構成説明図、図4は、図1のメモリカードによるパラメータによってファームオンフラッシュを選択する際のメモリカードのフローチャート、図5は、図1のメモリカードによるファームオンフラッシュ選択用コマンドを用いてファームオンフラッシュを選択してロードする場合のフローチャート、図6は、図1のメモリカードによるプログラム実行中にファームオンフラッシュを選択する場合のフローチャート、図7は、図1のメモリカードによる選択したファームオンフラッシュを識別コードを用いて検索するフローチャート、図8は、図1のメモリカードによる選択したファームオンフラッシュを検索範囲を指定して検索するフローチャートである。   FIG. 1 is a block diagram of a memory card according to an embodiment of the present invention, FIG. 2 is an explanatory diagram of an internal configuration of a flash memory provided in the memory card of FIG. 1, and FIG. FIG. 4 is a flow chart of the memory card when selecting the firmware on flash according to the parameters by the memory card of FIG. 1, and FIG. 5 is for firmware on flash selection by the memory card of FIG. FIG. 6 is a flowchart for selecting and loading a firmware on flash using a command, FIG. 6 is a flowchart for selecting a firmware on flash during program execution by the memory card of FIG. 1, and FIG. 7 is a memory card of FIG. Float to search for selected farm-on-flash using ID code Over DOO, FIG. 8 is a flowchart for search by specifying a search range farm on flash selected by the memory card of FIG.

本実施の形態において、メモリカード1は、デジタルビデオカメラ、携帯電話、携帯音楽プレーヤやパーソナルコンピュータなどにおけるホスト機器HTの外部記憶メディアとして用いられる。   In the present embodiment, the memory card 1 is used as an external storage medium of the host device HT in a digital video camera, a mobile phone, a portable music player, a personal computer, or the like.

メモリカード1は、図1に示すように、複数個のフラッシュメモリ(不揮発性半導体メモリ)2、ならびにコントローラ3から構成される。フラッシュメモリ2は、電気的にデータの書き換え、消去が可能な不揮発性半導体メモリである。ここでは、フラッシュメモリ2が複数個設けられているが、該フラッシュメモリ2は1つ以上であればよい。   As shown in FIG. 1, the memory card 1 includes a plurality of flash memories (nonvolatile semiconductor memories) 2 and a controller 3. The flash memory 2 is a nonvolatile semiconductor memory that can electrically rewrite and erase data. Here, a plurality of flash memories 2 are provided, but one or more flash memories 2 may be provided.

このフラッシュメモリ2には、内蔵ROM6に格納されているプログラムとは別にパッチプログラムなどの機能の追加や変更、修正などを行うプログラムであるファームオンフラッシュ(ファームウェア)FOF1〜FOF3が格納されている。   In addition to the program stored in the built-in ROM 6, the flash memory 2 stores firmware on flash (firmware) FOF1 to FOF3, which are programs for adding, changing, and correcting functions such as a patch program.

なお、ここでは、3つのファームオンフラッシュFOF1〜FOF3がフラッシュメモリ2に格納されているものとするが、該フラッシュメモリ2に格納されるファームオンフラッシュの数は、3つ以上、または3つ以下のいずれかであってもよい。   Here, it is assumed that three firmware on flashes FOF1 to FOF3 are stored in the flash memory 2, but the number of firmware on flashes stored in the flash memory 2 is three or more, or three or less. Any of these may be sufficient.

コントローラ3は、ホスト機器HTと接続されており、フラッシュメモリ2の制御を司り、フラッシュメモリ2に格納されたプログラムやデータなどを読み出してホスト機器HTへ出力し、またはホスト機器HTから入力されたプログラムやデータの書き込み動作指示を行う。   The controller 3 is connected to the host device HT, controls the flash memory 2, reads out a program or data stored in the flash memory 2, and outputs it to the host device HT or is input from the host device HT. Instructs program and data write operations.

また、コントローラ3は、コントロールロジック4、内蔵RAM(揮発性半導体メモリ)5、内蔵ROM6、および外部RAM7などから構成されている。コントロールロジック4は、コントローラ3におけるすべての制御を司る。   The controller 3 includes a control logic 4, a built-in RAM (volatile semiconductor memory) 5, a built-in ROM 6, an external RAM 7, and the like. The control logic 4 manages all the controls in the controller 3.

内蔵RAM5は、SRAM(Static RAM)などの揮発性メモリであり、コントロールロジック4に設けられたCPUのワークエリアとして用いられる。内蔵ROM6は、コントロールロジック4を動作させる制御プログラムなどが格納されている。外部RAM7は、フラッシュメモリ2に格納されているファームオンフラッシュFOF1〜FOF3のいずれか1つがロードされるメモリである。   The built-in RAM 5 is a volatile memory such as SRAM (Static RAM), and is used as a work area of the CPU provided in the control logic 4. The built-in ROM 6 stores a control program for operating the control logic 4 and the like. The external RAM 7 is a memory in which any one of the firmware-on-flash FOF1 to FOF3 stored in the flash memory 2 is loaded.

図2は、フラッシュメモリ2における内部構成の説明図である。   FIG. 2 is an explanatory diagram of the internal configuration of the flash memory 2.

フラッシュメモリ2は、ユーザアクセス領域A1、およびユーザアクセス不可領域A2から構成されている。   The flash memory 2 includes a user access area A1 and a user access impossible area A2.

ユーザアクセス領域A1は、ユーザが使用できるデータブロック領域R1と、該データブロック領域を管理するためのデータが格納される管理領域K1とから構成されている。   The user access area A1 includes a data block area R1 that can be used by the user, and a management area K1 in which data for managing the data block area is stored.

ユーザアクセス不可領域A2は、ユーザによるアクセスが不可能な領域であり、データブロック代替領域R2、FOF領域R3、CIS・ID・パラメータ領域R4、ならびに代替テーブル領域R5から構成されている。   The user inaccessible area A2 is an area that cannot be accessed by the user, and includes a data block substitution area R2, a FOF area R3, a CIS / ID / parameter area R4, and a substitution table area R5.

また、これらデータブロック代替領域R2、FOF領域R3、CIS・ID・パラメータ領域R4、およびに代替テーブル領域R5には、管理領域K2〜K5がそれぞれ設けられている。   The data block substitution area R2, the FOF area R3, the CIS / ID / parameter area R4, and the substitution table area R5 are provided with management areas K2 to K5, respectively.

データブロック代替領域R2は、データブロック領域において不良が発生した際に代替される領域であり、管理領域K2は、データブロック代替領域R2を管理する情報を格納する。   The data block replacement area R2 is an area that is replaced when a defect occurs in the data block area, and the management area K2 stores information for managing the data block replacement area R2.

FOF領域R3は、ファームオンフラッシュFOF1〜FOF3が格納される領域であり、管理領域(ファームウェア管理領域)K3は、FOF領域R3を管理する情報を格納する。   The FOF area R3 is an area in which the firmware on flashes FOF1 to FOF3 are stored, and the management area (firmware management area) K3 stores information for managing the FOF area R3.

CIS・ID・パラメータ領域R4は、メモリカード1のドライブ情報ID(Identify Drive Information)、メモリカード1の名前、種類、機能などの情報とCIS(Card Information Structure)、および各種のパラメータなどが格納される領域であり、管理領域K4は、これらCIS・ID・パラメータ領域R4を管理する情報を格納する。代替テーブル領域R5は、エリア代替領域情報を格納する領域であり、管理領域K5は、代替テーブル領域R5を管理する情報を格納する。   The CIS / ID / parameter area R4 stores a drive information ID (Identify Drive Information) of the memory card 1, information such as the name, type, and function of the memory card 1, a CIS (Card Information Structure), and various parameters. The management area K4 stores information for managing these CIS / ID / parameter areas R4. The substitution table area R5 is an area for storing area substitution area information, and the management area K5 stores information for managing the substitution table area R5.

また、管理領域K3における構成について図3の構成説明図を用いて説明する。   The configuration in the management area K3 will be described with reference to the configuration explanatory diagram of FIG.

図示するように、管理領域K3には、良セクタコード、ファームオンフラッシュNo.、識別コード(ファームウェア識別情報)、および管理ECC情報などが格納されている。   As shown in the figure, the management area K3 includes a good sector code, a firmware on flash No. , An identification code (firmware identification information), management ECC information, and the like are stored.

良セクタコードは、FOF領域R3の各セクタが正常か異常かを示すコードである。ファームオンフラッシュNo.は、各々のファームオンフラッシュFOF1〜FOF3に割り付けられた番号である。   The good sector code is a code indicating whether each sector in the FOF area R3 is normal or abnormal. Farm on flash No. Is a number assigned to each of the firmware-on-flash FOF1 to FOF3.

識別コードは、FOF領域R3に格納された各ファームオンフラッシュFOF1〜FOF3のブロック(以下、FOFブロック)であることを示すコードであり、FOFブロックを検索する際に用いられる。管理ECC情報は、データ訂正を行う際に用いられるECC(Error Correcting Code)情報である。   The identification code is a code indicating that it is a block of each firmware-on-flash FOF1 to FOF3 (hereinafter referred to as FOF block) stored in the FOF area R3, and is used when searching for the FOF block. The management ECC information is ECC (Error Collecting Code) information used when performing data correction.

次に、本実施の形態のメモリカード1における作用について説明する。   Next, the operation of the memory card 1 of the present embodiment will be described.

始めに、パラメータによってファームオンフラッシュFOF1〜FOF3の選択指示(ファームウェア選択指示)が行われる際のメモリカード1の動作について、図4のフローチャートを用いて説明する。   First, the operation of the memory card 1 when a firmware-on-flash FOF1 to FOF3 selection instruction (firmware selection instruction) is performed using parameters will be described with reference to the flowchart of FIG.

この場合、パラメータセクタにファームオンフラッシュFOF1〜FOF3の選択ビットを設け、該選択ビットによって選択されたファームオンフラッシュのロードはパワーオン時などのリセットシーケンスで行われる。   In this case, a selection bit of firmware on flash FOF1 to FOF3 is provided in the parameter sector, and loading of the firmware on flash selected by the selection bit is performed in a reset sequence such as at power-on.

まず、リセットシーケンスにおいて、コントローラ3のCPUは、フラッシュメモリ2のCIS・ID・パラメータ領域R4から必要なパラメータセクタをリードし、外部RAM7に格納する(ステップS101)。   First, in the reset sequence, the CPU of the controller 3 reads a necessary parameter sector from the CIS / ID / parameter region R4 of the flash memory 2 and stores it in the external RAM 7 (step S101).

その後、リードしたパラメータセクタから、選択するファームオンフラッシュNo.を取得する(ステップS102)。そして、フラッシュメモリ2の管理領域K3における識別コードを参照し、該フラッシュメモリ2にFOF領域R3があるか否かを検索する(ステップS103)。   Thereafter, the selected firmware on flash No. is selected from the read parameter sector. Is acquired (step S102). Then, with reference to the identification code in the management area K3 of the flash memory 2, it is searched whether or not the flash memory 2 has the FOF area R3 (step S103).

このステップS103の処理において、FOF領域R3が存在する場合には、該FOF領域R3内のFOFブロックを検索する処理を行う(ステップS104)。   In the process of step S103, if the FOF area R3 exists, a process for searching for an FOF block in the FOF area R3 is performed (step S104).

また、FOF領域R3が存在しない場合、CPUは内蔵ROM6にアクセスし、該内蔵ROM6に格納されているプログラムに基づいてメモリカード1を動作させる。   When the FOF area R3 does not exist, the CPU accesses the built-in ROM 6 and operates the memory card 1 based on a program stored in the built-in ROM 6.

次に、ファームオンフラッシュ選択用コマンドを用いて、ファームオンフラッシュの選択指示が行われる場合のメモリカード1における動作について、図5のフローチャートを用いて説明する。   Next, the operation of the memory card 1 when a firmware on flash selection command is issued using the firmware on flash selection command will be described with reference to the flowchart of FIG.

まず、ホスト機器HTなどからファームオンフラッシュ選択用コマンドを受けると、CPUは、該ファームオンフラッシュ選択用コマンドをコントロールロジック4に設けられたタスクファイルレジスタにセットする(ステップS201)。このタスクファイルレジスタは、通常のコマンドと同様に、ホスト機器HTとデータをやり取りするレジスタである。   First, when receiving a firmware on flash selection command from the host device HT or the like, the CPU sets the firmware on flash selection command in the task file register provided in the control logic 4 (step S201). This task file register is a register for exchanging data with the host device HT in the same manner as a normal command.

その後、有効にしたいファームオンフラッシュNo.をタスクファイルレジスタにセットする(ステップS202)。そして、フラッシュメモリ2の管理領域K3における識別コードを参照し、該フラッシュメモリ2にFOF領域R3があるか否かを検索する(ステップS203)。   After that, the firmware on flash No. Is set in the task file register (step S202). Then, with reference to the identification code in the management area K3 of the flash memory 2, it is searched whether or not the FOF area R3 exists in the flash memory 2 (step S203).

このステップS203の処理において、FOF領域R3が存在する場合には、該FOF領域R3内のFOFブロックを検索する処理を行う(ステップS204)。FOF領域R3が存在しない場合、CPUは内蔵ROM6にアクセスし、該内蔵ROM6に格納されているプログラムに基づいてメモリカード1を動作させる。   In the process of step S203, if the FOF area R3 exists, a process for searching for an FOF block in the FOF area R3 is performed (step S204). When the FOF area R3 does not exist, the CPU accesses the built-in ROM 6 and operates the memory card 1 based on the program stored in the built-in ROM 6.

次に、プログラム実行中に任意のファームオンフラッシュを選択する選択指示の場合のメモリカード1の動作について、図6のフローチャートを用いて説明する。   Next, the operation of the memory card 1 in the case of a selection instruction for selecting an arbitrary firmware-on-flash during program execution will be described using the flowchart of FIG.

ここでは、たとえば、ファームオンフラッシュFOF1の処理中に、ファームオンフラッシュFOF2を新たに選択して実行させる場合について記載するが、内蔵ROM6のプログラムの処理中に、ファームオンフラッシュFOF1〜FOF3のいずれかを新たに選択して実行させる処理についても同様である。   Here, for example, a case where the firmware-on-flash FOF2 is newly selected and executed during the processing of the firmware-on-flash FOF1 will be described. The same applies to the process of newly selecting and executing.

ファームオンフラッシュFOF1のファームウェアに基づいて任意の処理が実行中である場合において(ステップS301)、CPUは、割り込み処理やエラー処理の発生などによって選択されていない他のファームオンフラッシュFOF2,FOF3のいずれかの処理が必要か否かを判断する(ステップS302)。   When an arbitrary process is being executed based on the firmware of the firmware-on-flash FOF1 (step S301), the CPU determines which of the other firmware-on-flash FOF2, FOF3 that is not selected due to the occurrence of an interrupt process or an error process. It is determined whether or not such processing is necessary (step S302).

選択されていない他のファームオンフラッシュFOF2,FOF3のいずれかの処理が必要な場合、選択するファームオンフラッシュNo.を設定する(ステップS303)。   When processing of any other firmware-on-flash FOF2 or FOF3 that is not selected is necessary, the firmware-on-flash No. to be selected is selected. Is set (step S303).

そして、フラッシュメモリ2の管理領域K3における識別コードを参照し、該フラッシュメモリ2にFOF領域R3があるか否かを検索する(ステップS304)。   Then, with reference to the identification code in the management area K3 of the flash memory 2, it is searched whether or not the flash memory 2 has the FOF area R3 (step S304).

このステップS304の処理において、FOF領域R3が存在する場合には、該FOF領域R3内のFOFブロックを検索する処理を行う(ステップS305)。   In the process of step S304, if the FOF area R3 exists, a process for searching for an FOF block in the FOF area R3 is performed (step S305).

また、FOF領域R3が存在しない場合、CPUは内蔵ROM6にアクセスし、該内蔵ROM6に格納されているプログラムに基づいてメモリカード1を動作させる。   When the FOF area R3 does not exist, the CPU accesses the built-in ROM 6 and operates the memory card 1 based on a program stored in the built-in ROM 6.

次に、図4〜図6においてそれぞれ選択されたファームオンフラッシュの検索処理について説明する。   Next, the search process of the firmware on flash selected in FIGS. 4 to 6 will be described.

始めに、管理領域K3の識別コードを用いて検索する処理について、図7のフローチャートを用いて説明する。   First, processing for searching using the identification code in the management area K3 will be described with reference to the flowchart of FIG.

まず、CPUは、FOF領域R3の先頭アドレスから管理領域K3をリードし(ステップS401)、該管理領域K3の識別コードをチェックする(ステップS402)。そして、識別コードによってFOFブロックであるか否かを判別する(ステップS403)。このステップS403の処理において、チェックした識別コードがFOFブロック以外のブロックコードの場合には、処理が終了となる。   First, the CPU reads the management area K3 from the head address of the FOF area R3 (step S401), and checks the identification code of the management area K3 (step S402). And it is discriminate | determined by an identification code whether it is a FOF block (step S403). In the process of step S403, if the checked identification code is a block code other than the FOF block, the process ends.

また、ステップS403の処理でFOFブロックの場合には、管理領域K3のファームオンフラッシュNo.をチェックし(ステップS404)、該ファームオンフラッシュNo.に基づいて、ステップS403の処理におけるFOFブロックが該当するファームオンフラッシュであるか否かを判断する(ステップS405)。   In the case of the FOF block in the process of step S403, the firmware on flash No. in the management area K3 is displayed. (Step S404), the firmware on flash No. Based on the above, it is determined whether or not the FOF block in the process of step S403 is the corresponding firmware-on-flash (step S405).

ステップS405の処理において、該当するFOFブロックでなければ、FOFブロックのアドレスをインクリメント(逆順検索する際にはデクリメント)し(ステップS406)、ステップS402〜S405の処理を繰り返し実行する。   In step S405, if it is not the corresponding FOF block, the address of the FOF block is incremented (decremented when searching in reverse order) (step S406), and the processes of steps S402 to S405 are repeatedly executed.

そして、ステップS405の処理において、該当するFOFブロックが検索されると、そのファームオンフラッシュのファームウェアを内蔵RAM5にロードし(ステップS407)、該ファームウェアによる処理を行う。   When the corresponding FOF block is searched in the process of step S405, the firmware of the firmware on flash is loaded into the built-in RAM 5 (step S407), and the process by the firmware is performed.

このように、ファームオンフラッシュをランダムアクセス可能な内蔵RAM5にロードすることにより、CPUは高速処理を実行することができる。   As described above, the CPU can execute high-speed processing by loading the firmware-on-flash into the built-in RAM 5 that can be randomly accessed.

次に、検索範囲を制限してFOFブロックを検索する場合について、図8のフローチャートを用いて説明する。この場合、パラメータセクタにFOFブロック(FOF領域R3)の範囲を示すアドレス値を設定する。   Next, a case where the FOF block is searched by limiting the search range will be described with reference to the flowchart of FIG. In this case, an address value indicating the range of the FOF block (FOF area R3) is set in the parameter sector.

まず、CIS・ID・パラメータ領域R4のパラメータセクタから、FOFブロックの検索範囲を取得する(ステップS501)。   First, the search range of the FOF block is acquired from the parameter sector in the CIS / ID / parameter region R4 (step S501).

そして、FOF領域R3の先頭アドレスが、パラメータセクタから取得した検索範囲であるか否かを判断する(ステップS502)。検索範囲内でない場合には、処理が終了となる。   Then, it is determined whether or not the head address of the FOF area R3 is the search range acquired from the parameter sector (step S502). If it is not within the search range, the process ends.

また、検索範囲内である場合には、管理領域K3をリードし(ステップS503)、該管理領域K3のファームオンフラッシュNo.をチェックする(ステップS504)。   If it is within the search range, the management area K3 is read (step S503), and the firmware on flash No. of the management area K3 is read. Is checked (step S504).

そして、チェックしたファームオンフラッシュNo.から、FOFブロックが該当するファームオンフラッシュであるか否かを判断する(ステップS505)。   The checked farm-on-flash No. From this, it is determined whether or not the FOF block is the corresponding firmware-on-flash (step S505).

ステップS505の処理において、該当するFOFブロックでなければ、FOFブロックのアドレスをインクリメント(逆順検索する際にはデクリメント)し(ステップS506)、ステップS502〜S505の処理を繰り返し実行する。   In step S505, if it is not the corresponding FOF block, the address of the FOF block is incremented (decremented when searching in reverse order) (step S506), and the processes in steps S502 to S505 are repeatedly executed.

ステップS505の処理において、該当するFOFブロックが検索されると、そのファームオンフラッシュのファームウェアを内蔵RAM5にロードし(ステップS507)、該ファームウェアによる処理を行う。   When the corresponding FOF block is searched in the process of step S505, the firmware on flash firmware is loaded into the internal RAM 5 (step S507), and the process by the firmware is performed.

それにより、本実施の形態によれば、フラッシュメモリ2に複数のファームオンフラッシュを設定することにより、メモリカード1の多機能化を実現することができる。   Thereby, according to the present embodiment, by setting a plurality of firmware-on-flashes in the flash memory 2, it is possible to realize the multi-function of the memory card 1.

また、複数のファームオンフラッシュによって、内蔵ROM6に格納されたプログラムを変更することなく、プログラムの修正、変更、追加などを容易に行うことができ、フレキシブルに対応することができる。   Further, the plurality of firmware-on-flashes can easily modify, change, and add programs without changing the programs stored in the built-in ROM 6, and can flexibly deal with them.

さらに、本実施の形態において、ファームオンフラッシュFOF1〜FOF3は、たとえば、セキュア機能などを有したプログラムなどのオプション機能を有するプログラムであってもよい。   Furthermore, in the present embodiment, the firmware-on-flash FOF1 to FOF3 may be programs having an optional function such as a program having a secure function.

これにより、セキュア機能が要/不要のいずれのメモリカード1であっても、内蔵ROM6のプログラムを共通化することができるので、製品管理のコストを大幅に低減することができる。   As a result, the program in the built-in ROM 6 can be shared for any memory card 1 that requires or does not require a secure function, so that the cost of product management can be greatly reduced.

以上、本発明者によってなされた発明を発明の実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiments of the invention. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention. Needless to say.

たとえば、前記実施の形態では、メモリカードが、予めフラッシュメモリに複数のファームオンフラッシュが格納された構成としたが、ホスト機器がアップデータプログラムなどを実行することにより、新たなファームオンフラッシュの追加や書き換えなどを行うようにしてもよい。   For example, in the above embodiment, the memory card has a configuration in which a plurality of firmware-on-flashes are stored in the flash memory in advance. However, when the host device executes an updater program or the like, a new firmware-on-flash can be added. Rewriting or the like may be performed.

新たなファームオンフラッシュを追加する場合には、たとえば、フラッシュメモリにおけるFOF領域に予備領域を備え、該予備領域に追加するファームオンフラッシュを格納したり、あるいはデータブロック代替領域などの他の領域に追加するファームオンフラッシュを格納する。   When a new firmware-on-flash is added, for example, a spare area is provided in the FOF area in the flash memory, and the firmware-on-flash to be added to the spare area is stored, or in another area such as a data block replacement area. Stores the farm-on-flash to be added.

それにより、よりフレキシブルに、プログラムの修正、変更、追加などに対応することができる。   Thereby, it is possible to deal with the correction, change, addition, etc. of the program more flexibly.

また、前記実施の形態におけるフラッシュメモリは、ある電圧レベルのしきい値を複数設定し、1ビット以上のデータを1つの不揮発性メモリセルに記憶する多値フラッシュメモリであってもよい。   The flash memory in the above embodiment may be a multi-value flash memory that sets a plurality of threshold values of a certain voltage level and stores data of 1 bit or more in one nonvolatile memory cell.

本発明は、不揮発性メモリを用いたメモリカードに適している。   The present invention is suitable for a memory card using a nonvolatile memory.

本発明の一実施の形態によるメモリカードのブロック図である。1 is a block diagram of a memory card according to an embodiment of the present invention. 図1のメモリカードに設けられたフラッシュメモリにおける内部構成の説明図である。It is explanatory drawing of the internal structure in the flash memory provided in the memory card of FIG. 図2のフラッシュメモリに設けられた管理領域おける構成説明図である。FIG. 3 is an explanatory diagram of a configuration in a management area provided in the flash memory of FIG. 2. 図1のメモリカードによるパラメータによってファームオンフラッシュを選択する際のメモリカードのフローチャートである。FIG. 2 is a flowchart of a memory card when firmware on flash is selected according to parameters by the memory card of FIG. 1. FIG. 図1のメモリカードによるファームオンフラッシュ選択用コマンドを用いてファームオンフラッシュを選択してロードする場合のフローチャートである。FIG. 3 is a flowchart for selecting and loading a firmware-on-flash using a firmware-on-flash selection command by the memory card of FIG. 1. FIG. 図1のメモリカードによるプログラム実行中にファームオンフラッシュを選択する場合のフローチャートである。FIG. 3 is a flowchart in the case of selecting firmware on flash during program execution by the memory card of FIG. 1. FIG. 図1のメモリカードによる選択したファームオンフラッシュを識別コードを用いて検索するフローチャートである。2 is a flowchart for searching for a selected firmware-on-flash using the memory card of FIG. 1 using an identification code. 図1のメモリカードによる選択したファームオンフラッシュを検索範囲を指定して検索するフローチャートである。3 is a flowchart for searching for a selected firmware-on-flash using the memory card of FIG. 1 by specifying a search range.

符号の説明Explanation of symbols

1 メモリカード
2 フラッシュメモリ(不揮発性半導体メモリ)
3 コントローラ
4 コントロールロジック
5 内蔵RAM(揮発性半導体メモリ)
6 内蔵ROM
7 外部RAM
FOF1〜FOF3 ファームオンフラッシュ(ファームウェア)
A1 ユーザアクセス領域
A2 ユーザアクセス不可領域
R1 データブロック領域
R2 データブロック代替領域
R3 FOF領域
R4 CIS・ID・パラメータ領域
R5 代替テーブル領域
K1,K2 管理領域
K3 管理領域(ファームウェア管理領域)
K4,K5 管理領域
HT ホスト機器
1 Memory card 2 Flash memory (nonvolatile semiconductor memory)
3 Controller 4 Control logic 5 Built-in RAM (volatile semiconductor memory)
6 Internal ROM
7 External RAM
FOF1 to FOF3 firmware on flash (firmware)
A1 User access area A2 User inaccessible area R1 Data block area R2 Data block substitution area R3 FOF area R4 CIS / ID / parameter area R5 substitution table area K1, K2 management area K3 management area (firmware management area)
K4, K5 management area HT Host device

Claims (2)

複数の不揮発性メモリセルを有し、データおよびそのデータ管理情報を格納可能な不揮発性半導体メモリと、
外部から発行されたコマンドに基づいて前記不揮発性半導体メモリの動作指示を行うコントローラとからなるメモリカードであって、
前記不揮発性半導体メモリは、データとして2つ以上のファームウェアを格納可能に構成され、
前記コントローラは、
前記ファームウェアを格納する揮発性半導体メモリを備え、
ファームウェア選択指示が有効になると、前記揮発性半導体メモリに格納可能な2つ以上のファームウェアから、任意の1つの前記ファームウェアを選択して前記揮発性半導体メモリに格納し、前記揮発性半導体メモリにアクセスして前記ファームウェアによる処理を実行し、
前記コントローラは、前記不揮発性半導体メモリのファームウェアのデータ管理情報を用いて前記揮発性半導体メモリに格納するファームウェアを検索することを特徴とするメモリカード。
A nonvolatile semiconductor memory having a plurality of nonvolatile memory cells and capable of storing data and data management information thereof;
A memory card comprising a controller for instructing operation of the nonvolatile semiconductor memory based on a command issued from the outside,
The nonvolatile semiconductor memory is configured to be able to store two or more firmware as data,
The controller is
A volatile semiconductor memory for storing the firmware;
When the firmware selection instruction is enabled, any one of the firmware that can be stored in the volatile semiconductor memory is selected, stored in the volatile semiconductor memory, and accessed to the volatile semiconductor memory And execute the process by the firmware,
The memory card, wherein the controller searches for firmware stored in the volatile semiconductor memory using data management information of firmware of the nonvolatile semiconductor memory.
請求項1記載のメモリカードにおいて、
前記ファームウェアのデータ管理情報は、
前記不揮発性半導体メモリに格納されたファームウエアのスタートアドレス値であることを特徴とするメモリカード。
The memory card according to claim 1,
The firmware data management information is:
A memory card having a firmware start address value stored in the nonvolatile semiconductor memory.
JP2007219871A 2007-08-27 2007-08-27 Memory card Pending JP2007334915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007219871A JP2007334915A (en) 2007-08-27 2007-08-27 Memory card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007219871A JP2007334915A (en) 2007-08-27 2007-08-27 Memory card

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003048498A Division JP2004258946A (en) 2003-02-26 2003-02-26 Memory card

Publications (1)

Publication Number Publication Date
JP2007334915A true JP2007334915A (en) 2007-12-27

Family

ID=38934265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007219871A Pending JP2007334915A (en) 2007-08-27 2007-08-27 Memory card

Country Status (1)

Country Link
JP (1) JP2007334915A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107203391A (en) * 2016-03-17 2017-09-26 日本电气株式会社 Firmware activation equipment and firmware Activiation method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001027953A (en) * 1999-07-15 2001-01-30 Mitsubishi Electric Corp Semiconductor storage device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001027953A (en) * 1999-07-15 2001-01-30 Mitsubishi Electric Corp Semiconductor storage device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107203391A (en) * 2016-03-17 2017-09-26 日本电气株式会社 Firmware activation equipment and firmware Activiation method

Similar Documents

Publication Publication Date Title
US7298649B2 (en) Nonvolatile memory card
US8448046B2 (en) Memory access method capable of reducing usage rate of problematic memory blocks
US9058256B2 (en) Data writing method, memory controller and memory storage apparatus
US10475516B2 (en) Data storage device and data erasing method wherein after erasing process, predetermined value is written to indicate completion of said erasing method
JP2009217391A (en) Memory system
US9971682B2 (en) Wear-leveling system and method for reducing stress on memory device using erase counters
TWI437569B (en) Method for managing a plurality of blocks of a flash memory, and associated memory device and controller thereof
KR20100092752A (en) Nonvolatile memory device having a buffer ram and boot code management method thereof
US9396769B1 (en) Memory device and operating method of same
JP2007034581A (en) Memory controller, flash memory system and method for controlling flash memory
JP2009123191A (en) Nor-interface flash memory device and method of accessing the same
JP4703753B2 (en) Information processing apparatus, semiconductor memory device, and program
JP2008251154A (en) Nonvolatile semiconductor memory device
US7979606B2 (en) Method for storing data
JP2006338083A (en) Memory controller
JP2007334915A (en) Memory card
JP4235624B2 (en) Memory controller, flash memory system, and flash memory control method
US8312205B2 (en) Method for identifying a page of a block of flash memory, and associated memory device
JP4888333B2 (en) Flash disk device
JP2006504202A (en) Method for driving a memory structure
JP2006048746A (en) Memory card
JP2007317078A (en) Nonvolatile memory, memory controller, nonvolatile storage device, and nonvolatile storage system
JP4213166B2 (en) Memory controller and flash memory system
JP2005174468A (en) Access control method of flash memory
JP2008009945A (en) Memory system

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100528

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100726

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100803

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101130