[go: up one dir, main page]

JP2009176147A - Electronic equipment and method for determining permission of access to memory of electronic equipment - Google Patents

Electronic equipment and method for determining permission of access to memory of electronic equipment Download PDF

Info

Publication number
JP2009176147A
JP2009176147A JP2008015334A JP2008015334A JP2009176147A JP 2009176147 A JP2009176147 A JP 2009176147A JP 2008015334 A JP2008015334 A JP 2008015334A JP 2008015334 A JP2008015334 A JP 2008015334A JP 2009176147 A JP2009176147 A JP 2009176147A
Authority
JP
Japan
Prior art keywords
memory
data
flash memory
mode
cpu
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
JP2008015334A
Other languages
Japanese (ja)
Inventor
Masakazu Hayashi
政和 林
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2008015334A priority Critical patent/JP2009176147A/en
Publication of JP2009176147A publication Critical patent/JP2009176147A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Storage Device Security (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data-writing device which easily writes data to a nonvolatile memory, which is mounted on a substrate on an electronic device side, while keeping security, a data-writing method, and a data-writing program therefor. <P>SOLUTION: A NOR-type flash memory 204 which is mounted on a substrate of electronic equipment is connected to an external device via a connector which is not illustrated. The state checking part 241 of the flash memory part 221 enables a multiplexer 262 to write on the conditions that data are not written to the NOR-type flash memory 204 and a mode selection signal line 209 designates ROM writing. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、NOR型フラッシュメモリに代表される不揮発性メモリを使用する電子機器および電子機器のメモリアクセス許可判別方法に係わり、特に基板に実装した不揮発性メモリに関するデータ書き替えを可能にする電子機器およびこのような電子機器のメモリアクセス許可判別方法に関する。   The present invention relates to an electronic device using a non-volatile memory typified by a NOR flash memory and a memory access permission determination method for the electronic device, and more particularly to an electronic device that enables data rewriting related to a non-volatile memory mounted on a substrate. The present invention also relates to a memory access permission determination method for such an electronic device.

フラッシュメモリは、書き換え可能で、電源を切ってもデータを保持する不揮発性の半導体メモリである。電子機器の多くは、その電源を投入すると、内部に配置されたCPU(Central Processing Unit)が動作を開始して、制御プログラムを実行するようになっている。このような電子機器内の記憶装置には、実行対象の制御プログラムが格納されている。近年、組み込みシステム系の電子機器が数多く登場している。組み込みシステム系の電子機器では、この種の記憶装置にNOR(Not OR)型フラッシュメモリが使われることが多い。   A flash memory is a non-volatile semiconductor memory that is rewritable and retains data even when the power is turned off. In many electronic devices, when the power is turned on, a CPU (Central Processing Unit) arranged therein starts to operate and executes a control program. Such a storage device in the electronic device stores a control program to be executed. In recent years, many embedded system electronic devices have appeared. In embedded system electronic devices, a NOR (Not OR) flash memory is often used for this type of storage device.

フラッシュメモリには、NOR型の他にNAND(Not AND)型も存在している。NOR型のフラッシュメモリは、データの読み込みや書き込みをバイト単位で行うことができ、ランダムアクセスが速いといった特徴がある。また、NAND型とは異なって、誤り訂正が不要で信頼性が高いため、携帯電話やPDA(Personal Digital Assistants)のような電子機器の半導体メモリにプログラム等のデータを格納することが多い。   In addition to the NOR type, flash memory also has a NAND (Not AND) type. The NOR type flash memory is characterized in that data can be read and written in units of bytes and random access is fast. In addition, unlike the NAND type, error correction is unnecessary and reliability is high, so that data such as programs is often stored in a semiconductor memory of an electronic device such as a mobile phone or a PDA (Personal Digital Assistants).

ところで電子機器はその組立の工程で、基板にCPUやNOR型フラッシュメモリといった部品を半田で電気的に接続する作業としての実装が行われる。実装された後のNOR型フラッシュメモリは、CPUからの読み込みや、書き込みのアクセスがあるだけであり、その他の装置からのアクセスはない。すなわち、基板に実装された状態で、NOR型フラッシュメモリへのアクセスは、常にCPUを介して行われることになる。   By the way, in the assembly process, the electronic device is mounted as a work for electrically connecting components such as a CPU and a NOR type flash memory to the substrate with solder. After being mounted, the NOR type flash memory has only read and write access from the CPU, and no access from other devices. In other words, the NOR flash memory is always accessed via the CPU while mounted on the substrate.

これは、NOR型フラッシュメモリを制御する信号線、アドレス線およびデータ線を1セットとして、NOR型フラッシュメモリの制御が行われているからである。すなわち、NOR型フラッシュメモリを電子機器に実装した後は、アドレス線およびデータ線が基板内でCPUと接続されている。したがって、基板にNOR型フラッシュメモリを実装した状態では、CPU以外からNOR型フラッシュメモリへのアクセス手段がない。   This is because the NOR type flash memory is controlled with a set of signal lines, address lines and data lines for controlling the NOR type flash memory. That is, after the NOR flash memory is mounted on the electronic device, the address line and the data line are connected to the CPU in the substrate. Therefore, in a state where the NOR flash memory is mounted on the substrate, there is no means for accessing the NOR flash memory from other than the CPU.

電子機器は、電源が投入されると、たとえばNOR型フラッシュメモリから制御用のプログラムを読み出してその動作を開始させる。このような起動時の動作を可能にするために、NOR型フラッシュメモリは基板に実装される前に、電子機器の動作に必要なプログラムが書き込まれている必要がある。   When power is turned on, the electronic device reads a control program from, for example, a NOR flash memory and starts its operation. In order to enable such startup operation, the NOR flash memory needs to be written with a program necessary for the operation of the electronic device before being mounted on the substrate.

従来、NOR型フラッシュメモリへのプログラムの書き込みはROM(Read Only Memory)ライタと呼ばれる機器を使用して基板へ実装する前に行っていた。ROMライタとしては、たとえばミナトエレクトロニクス株式会社のデバイスプログラマと呼ばれる製品が使用される。ROMライタで書き込みの終了したNOR型フラッシュメモリを、基板に実装するという手法が、従来から多く採用されている。   Conventionally, a program is written into a NOR flash memory before being mounted on a substrate using a device called a ROM (Read Only Memory) writer. As the ROM writer, for example, a product called a device programmer of Minato Electronics Co., Ltd. is used. Conventionally, a technique of mounting a NOR type flash memory, which has been written by a ROM writer, on a substrate has been widely employed.

図8は、この従来の手法におけるNOR型フラッシュメモリを用いて電子機器を動作させるまでの一連の作業の流れを表わしたものである。まず、図示しないROMライタを使用してNOR型フラッシュメモリにプログラム等のデータを書き込む(ROM書きする)(ステップS101)。次にこのNOR型フラッシュメモリを基板に実装する(ステップS102)。そして、この基板が組み込まれた電子機器の起動が行われる(ステップS103)。   FIG. 8 shows a flow of a series of operations until an electronic device is operated using the NOR flash memory in this conventional method. First, using a ROM writer (not shown), data such as a program is written into the NOR type flash memory (ROM writing) (step S101). Next, this NOR type flash memory is mounted on a substrate (step S102). Then, the electronic device in which the substrate is incorporated is activated (step S103).

このように基板に実装したNOR型フラッシュメモリにROM書きが正常に行われていれば電子機器の起動に問題は生じない。しかしながら、何らかの原因でROM書きに障害が発生したような場合には、実装後にNOR型フラッシュメモリに対するROM書きが行えることが好ましい。また、実装後にROM書きが行えれば、実装前にNOR型フラッシュメモリにROM書きを完了させる必要もない。   As described above, if the ROM writing is normally performed on the NOR type flash memory mounted on the substrate, there is no problem in starting the electronic apparatus. However, when a failure occurs in ROM writing for some reason, it is preferable that ROM writing to the NOR flash memory can be performed after mounting. Further, if ROM writing can be performed after mounting, it is not necessary to complete ROM writing in the NOR type flash memory before mounting.

そこで、JTAG(Joint Test Action Group)コネクタと呼ばれるコネクタを基板上に予め配置しておくことで、基板に実装したNOR型フラッシュメモリにデータの書き込みを行うことが従来から行われている。JTAGコネクタを使用すると、NOR型フラッシュメモリへデータを書き込むことだけでなく、NOR型フラッシュメモリからデータを読み込むことも可能である。   Therefore, it has been conventionally performed to write data to a NOR type flash memory mounted on a substrate by previously arranging a connector called a JTAG (Joint Test Action Group) connector on the substrate. When the JTAG connector is used, it is possible not only to write data to the NOR type flash memory but also to read data from the NOR type flash memory.

しかしながら、JTAGコネクタを基板上に配置しておくと、第三者もこのJTAGコネクタを使用してNOR型フラッシュメモリにデータを書き込んだり、NOR型フラッシュメモリ内のデータを読み出すことができるというセキュリティ上の問題が発生する。   However, if the JTAG connector is arranged on the board, a third party can use this JTAG connector to write data into the NOR flash memory or read data in the NOR flash memory. Problems occur.

そこで、パーソナルコンピュータに接触式ICカードを接続する一方、電子機器のCPU側には接触式ICカードリーダ・ライタを接続しておいて、パーソナルコンピュータ側からのデータを接触式ICカードリーダ・ライタを介してCPUに送り、メモリの内容の書き換えを行うことが本発明の第1の関連技術として提案されている(たとえば特許文献1参照)。   Therefore, while a contact IC card is connected to a personal computer, a contact IC card reader / writer is connected to the CPU side of the electronic device, and data from the personal computer side is transferred to the contact IC card reader / writer. It has been proposed as a first related technique of the present invention to rewrite the contents of the memory via the CPU (see, for example, Patent Document 1).

また、電子機器に対して着脱自在の記憶媒体を用意して、電子機器側のプログラムデータの書き換え禁止状態を解除して書き換えを実行するようにした第2の関連技術も提案されている(たとえば特許文献2参照)。
特開2000−076395号公報(第0010段落、図1) 特開2001−188686号公報(第0069段落、第0144段落、図2)
There has also been proposed a second related technique in which a storage medium that is detachable from the electronic device is prepared, and the rewrite prohibition state of the program data on the electronic device side is canceled and rewriting is executed (for example, Patent Document 2).
JP 2000-076395 (paragraph 0010, FIG. 1) JP 2001-188686A (paragraphs 0069 and 0144, FIG. 2)

以上説明した第1の関連技術では、データの書き込みを行う際に、NOR型フラッシュメモリを実装した電子機器に接触式ICカードリーダ・ライタを接続しておく必要がある。したがって、このようなデバイスを接続する構造となっていない電子機器ではROM書きを行うことができない。また、第2の関連技術では、電子機器側のフラッシュROMには機能の追加前の制御プログラムが記憶されている必要がある。すなわち、第2の関連技術では、電子機器側のフラッシュメモリには、修正の対象となる制御プログラムが正常な形で格納されていなければならないという問題がある。   In the first related technology described above, when writing data, it is necessary to connect a contact IC card reader / writer to an electronic device in which a NOR flash memory is mounted. Accordingly, ROM writing cannot be performed by an electronic device that is not configured to connect such devices. Further, in the second related technology, it is necessary to store a control program before the addition of functions in the flash ROM on the electronic device side. In other words, the second related technique has a problem that the control program to be corrected must be stored in a normal form in the flash memory on the electronic device side.

なお、以上の説明ではNOR型フラッシュメモリの実装上の問題について説明したが、NAND型フラッシュメモリ等のその他の不揮発性メモリについても、同様の問題があった。   In the above description, the NOR flash memory mounting problem has been described. However, other nonvolatile memories such as the NAND flash memory have the same problem.

そこで本発明の目的は、基板に実装された不揮発性メモリに対して、セキュリティも確保しながら簡易にデータの書き込みが可能な電子機器および電子機器のメモリアクセス許可判別方法を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide an electronic device capable of easily writing data to a nonvolatile memory mounted on a substrate while ensuring security, and a memory access permission determination method for the electronic device.

本発明では、(イ)基板に実装され、データの読み書きの対象となるメモリと、(ロ)このメモリを使用して所定の制御を行うCPUと、(ハ)前記したメモリに外部からデータの書き込みを行うためのコネクタと、(ニ)前記したCPUおよびコネクタのいずれか一方を選択して前記したメモリと接続するスイッチ手段と、(ホ)前記したメモリにデータが格納されているか否かを判別するデータ格納有無判別手段と、(へ)前記したCPUが前記したメモリにアクセスするモードとしての通常モードであるか否かを判別するモード判別手段と、(ト)このモード判別手段が前記した通常モードでないと判別したとき、前記したスイッチ手段を前記したコネクタ側に接続し、それ以外は前記したCPU側に接続するスイッチ制御手段とを電子機器に具備させる。   In the present invention, (a) a memory that is mounted on a board and is a target for data reading and writing; (b) a CPU that performs predetermined control using the memory; and (c) data stored in the memory from the outside. A connector for performing writing; (d) switch means for selecting one of the CPU and the connector and connecting to the memory; and (e) whether or not data is stored in the memory. Data storage presence / absence determining means for determining; (f) mode determining means for determining whether the CPU is in a normal mode as a mode for accessing the memory; and (g) the mode determining means described above. When it is determined that the mode is not the normal mode, the switch means described above is connected to the connector side described above, and otherwise the switch control means connected to the CPU side is electrically connected. To be provided in the equipment.

また、本発明では、(イ)基板に実装されたメモリに対してCPUがアクセスするモードであるか否かを判別するモード判別ステップと、(ロ)前記したメモリにデータが格納されているかどうかを判別するデータ格納有無判別ステップと、(ハ)前記したモード判別ステップがCPUがアクセスするモードではないと判別し、前記したデータ格納有無判別ステップが前記したメモリにデータが格納されていないと判別したときのみ前記したメモリに対する外部からのアクセスを認めるアクセス許可ステップとを電子機器のメモリアクセス許可判別方法に具備させる。   In the present invention, (b) a mode determination step for determining whether or not the CPU is in a mode for accessing the memory mounted on the board; and (b) whether or not data is stored in the memory. And (c) determining that the mode determining step is not the mode accessed by the CPU, and determining that the data storing presence / absence determining step is not storing data in the memory. The memory access permission determining method of the electronic device is provided with an access permission step for permitting external access to the memory only when the memory device has been accessed.

以上説明したように本発明によれば、CPUがメモリにアクセスするモードではない設定の状態でスイッチ手段を介してコネクタがメモリに接続されてデータの書き込みが可能になる。あるいは更に、メモリにデータが格納されていていないと判別されたときにのみデータの書き込みが可能になるので、データが不用意に書き込まれることがない。また、メモリにデータが格納されていていないと判別されたときにのみ、このメモリに対するアクセスが可能になることにより、メモリ内のデータが外部に不用意に読み出されることがない。   As described above, according to the present invention, data can be written by connecting the connector to the memory via the switch means in a setting state that is not the mode in which the CPU accesses the memory. Alternatively, data can be written only when it is determined that no data is stored in the memory, so that data is not inadvertently written. Further, only when it is determined that no data is stored in the memory, the memory can be accessed, so that the data in the memory is not inadvertently read out to the outside.

次に本発明を一実施の形態と共に説明する。   Next, the present invention will be described together with an embodiment.

図1は、本発明の一実施の形態における電子機器の要部を表わしたものである。この電子機器201は、内蔵された基板202に、CPU203と、NOR型フラッシュメモリ204およびコネクタ205を実装している。このうちのコネクタ205は、NOR型フラッシュメモリ204の所定の複数の端子と第1の信号線群207を介して接続されている。また、CPU203はNOR型フラッシュメモリ204と第2の信号線群208を介して接続されている。   FIG. 1 shows a main part of an electronic device according to an embodiment of the present invention. In the electronic apparatus 201, a CPU 203, a NOR flash memory 204, and a connector 205 are mounted on a built-in board 202. Of these, the connector 205 is connected to a plurality of predetermined terminals of the NOR flash memory 204 via the first signal line group 207. The CPU 203 is connected to the NOR flash memory 204 via the second signal line group 208.

ここで、第1および第2の信号線群207、208は、それぞれデータ線、アドレス線および信号線の集まったものとなっている。NOR型フラッシュメモリ204は、この他に、データの書き込みを行うROM書きモードであるか、それ以外のモードとしての通常モードであるかを選択するためのモード選択信号線209と、NOR型フラッシュメモリ204に格納されているデータのリセット(初期化)を行うためのリセット信号線210を、それぞれ図示しない端子に接続した構成となっている。   Here, the first and second signal line groups 207 and 208 are a collection of data lines, address lines, and signal lines, respectively. In addition to this, the NOR flash memory 204 includes a mode selection signal line 209 for selecting whether the mode is a ROM write mode for writing data or a normal mode other than that, and a NOR flash memory. A reset signal line 210 for resetting (initializing) data stored in 204 is connected to a terminal (not shown).

CPU203とNOR型フラッシュメモリ204を接続する第2の信号線群208は、この電子機器201を通常使用するモードで使用されるものであり、このモードは従来から存在している。一方、コネクタ205は、NOR型フラッシュメモリ204にデータを書き込んだり、格納されたデータを読み出す際に使用される。これに対して、コネクタ205およびこれとNOR型フラッシュメモリ204を接続する第1の信号線群207は、本実施の形態独自のものであり、従来の電子機器では存在していない。   The second signal line group 208 connecting the CPU 203 and the NOR type flash memory 204 is used in a mode in which the electronic apparatus 201 is normally used, and this mode has existed conventionally. On the other hand, the connector 205 is used when writing data into the NOR flash memory 204 or reading stored data. On the other hand, the connector 205 and the first signal line group 207 that connects the NOR type flash memory 204 and the connector 205 are unique to this embodiment and do not exist in the conventional electronic apparatus.

図2は、NOR型フラッシュメモリの機能的な構成を表わしたものである。NOR型フラッシュメモリ204は、プログラム等の各種のデータを格納する領域としてのフラッシュメモリ部221と、現在のモードを確認するためのモード確認部222を備えている。   FIG. 2 shows a functional configuration of the NOR type flash memory. The NOR type flash memory 204 includes a flash memory unit 221 as an area for storing various data such as programs, and a mode confirmation unit 222 for confirming the current mode.

ここでフラッシュメモリ部221には、状態確認部241が配置されている。状態確認部241は、フラッシュメモリ部221内にプログラムなどのデータが書き込まれているか、または何もデータが書き込まれていない状態であるのかを記録している。そして、要求があったときには、現在のフラッシュメモリ部221の状態を状態信号224で要求先のモード確認部222へ送るようになっている。   Here, a state confirmation unit 241 is arranged in the flash memory unit 221. The state confirmation unit 241 records whether data such as a program is written in the flash memory unit 221 or whether no data is written. When there is a request, the current state of the flash memory unit 221 is sent to the requested mode confirmation unit 222 by a status signal 224.

図3は、状態確認部の確認原理を説明するためのものである。図2にも示したNOR型フラッシュメモリ204は、所定のメモリサイズの複数のブロック251で構成されている。たとえば本実施の形態のNOR型フラッシュメモリ204は64メガバイト(MBytes)のデータを記憶する容量を持っており、1024のブロック251で構成されている。この場合、それぞれのブロック251は64キロバイト(KBytes)の容量を持っている。   FIG. 3 is a diagram for explaining the confirmation principle of the state confirmation unit. The NOR flash memory 204 also shown in FIG. 2 includes a plurality of blocks 251 having a predetermined memory size. For example, the NOR flash memory 204 of the present embodiment has a capacity for storing 64 megabytes of data, and is composed of 1024 blocks 251. In this case, each block 251 has a capacity of 64 kilobytes (KBbytes).

状態確認部241は、それぞれのブロック251内で1バイトでもデータが格納されていれば、これを信号「0」と記録し、データが全然格納されていない場合に信号「1」と記録する管理テーブル261を備えている。そして、各ブロック251の信号状態をスキャンして、これらの論理積をとっている。管理テーブル261による論理積が信号「1」の場合には、64メガバイトの全記憶領域にデータが書き込まれていない状態であると判別する。また、論理積が信号「0」の場合には、64メガバイトの全記憶領域のいずれかにデータが書き込まれている状態であると判別する。   The status confirmation unit 241 records a signal “0” if even one byte is stored in each block 251, and records a signal “1” when no data is stored. A table 261 is provided. Then, the signal state of each block 251 is scanned and the logical product of these is obtained. When the logical product according to the management table 261 is a signal “1”, it is determined that data is not written in the entire storage area of 64 megabytes. If the logical product is a signal “0”, it is determined that data is written in any of the 64 megabyte storage areas.

図2に戻って説明を続ける。モード確認部222は、フラッシュメモリ部221からの状態信号224とNOR型フラッシュメモリ204の外部からのモード選択信号線209を用いて、第1の信号線群207を使用するモードであるか、あるいは第2の信号線群208を使用するモードであるかを判定する。そして、その判定結果に基づいてマルチプレクサ262が第1および第2の信号線群207、208のいずれかを第3の信号線群225と接続するようになっている。ここで第3の信号線群225も、第1および第2の信号線群207、208と同様に、データ、アドレスおよび信号線の集合(バス構造)となっている。   Returning to FIG. 2, the description will be continued. The mode confirmation unit 222 is a mode in which the first signal line group 207 is used by using the state signal 224 from the flash memory unit 221 and the mode selection signal line 209 from the outside of the NOR flash memory 204, or It is determined whether the mode uses the second signal line group 208. Based on the determination result, the multiplexer 262 connects one of the first and second signal line groups 207 and 208 to the third signal line group 225. Here, similarly to the first and second signal line groups 207 and 208, the third signal line group 225 is also a set of data, address, and signal lines (bus structure).

今、モード選択信号線209によってモード確認部222が第1の信号線群207を使用すると判定したものとする。この場合、第2の信号線群208から第3の信号線群225に対するアクセスは無視される。これとは逆にモード確認部222が第2の信号線群208を使用すると判定したものとする。この場合、第1の信号線群207から第3の信号線群225に対するアクセスは無視される。モード選択信号線209は、電気的にH(ハイ)レベルあるいはL(ロー)レベルのいずれかの状態に設定されるようになっている。そして、このモード選択信号線209の電位の状態によって、第1および第2の信号線群207、208のイネーブルとディスエーブルを判別できるようになっている。   Now, it is assumed that the mode check unit 222 determines that the first signal line group 207 is to be used by the mode selection signal line 209. In this case, access from the second signal line group 208 to the third signal line group 225 is ignored. On the contrary, it is assumed that the mode check unit 222 determines that the second signal line group 208 is used. In this case, access from the first signal line group 207 to the third signal line group 225 is ignored. The mode selection signal line 209 is electrically set to either the H (high) level or the L (low) level. The enable and disable of the first and second signal line groups 207 and 208 can be determined according to the potential state of the mode selection signal line 209.

このようなマルチプレクサ262の一端側には第1および第2の信号線群207、208が接続されており、他端側には第3の信号線群225が接続されている。モード選択信号線209はマルチプレクサ262の制御入力となっており、この信号線に現われる信号レベルがHレベルかLレベルかによって第1あるいは第2の信号線群207、208のいずれかが第3の信号線群225に接続されるようになっている。   The first and second signal line groups 207 and 208 are connected to one end side of the multiplexer 262, and the third signal line group 225 is connected to the other end side. The mode selection signal line 209 is a control input of the multiplexer 262, and either the first or second signal line group 207, 208 is the third depending on whether the signal level appearing on this signal line is H level or L level. The signal line group 225 is connected.

図4は、本実施の形態における電子機器の動作の概要を表わしたものである。図1および図2と共に説明する。電子機器201に電源が投入されたり、リセット信号線210によってNOR型フラッシュメモリ204が初期状態になると、モード確認部222はモード選択信号線209の信号状態を確認する(ステップS301)。モード選択信号線209がイネーブルではない状態としてのディスエーブルとなっている場合には(ステップS301:N)、通常モードが実行される(ステップS304)。   FIG. 4 shows an outline of the operation of the electronic device in the present embodiment. This will be described with reference to FIGS. When the electronic device 201 is powered on or the NOR flash memory 204 is initialized by the reset signal line 210, the mode confirmation unit 222 confirms the signal state of the mode selection signal line 209 (step S301). If the mode selection signal line 209 is disabled (NO in step S301), the normal mode is executed (step S304).

この図4で示したような制御は、制御プログラムで実現することも可能であるが、ハードウェアとして組み込むことも可能である。この場合には、モード選択信号と状態信号を、2入力アンドゲートに入力して、その出力によってモードを切り替えるようにすればよい。   The control as shown in FIG. 4 can be realized by a control program, but can also be incorporated as hardware. In this case, a mode selection signal and a status signal may be input to the 2-input AND gate, and the mode may be switched according to the output.

図5は、通常モードにおけるNOR型フラッシュメモリ内でのデータの伝達状況を表わしたものである。モード選択信号線209がディスエーブルとなっているとき、マルチプレクサ262は第2の信号線群208を第3の信号線群225と接続する。これにより、第2の信号線群208を経てフラッシュメモリ部221に信号が伝送される。このとき第1の信号線群207からマルチプレクサ262に信号が送られてきても、モード確認部222は、これをフラッシュメモリ部221に送り出すことはない。   FIG. 5 shows the state of data transmission in the NOR flash memory in the normal mode. When the mode selection signal line 209 is disabled, the multiplexer 262 connects the second signal line group 208 to the third signal line group 225. As a result, a signal is transmitted to the flash memory unit 221 via the second signal line group 208. Even if a signal is sent from the first signal line group 207 to the multiplexer 262 at this time, the mode confirmation unit 222 does not send it to the flash memory unit 221.

図4に戻って説明を続ける。モード選択信号線209がイネーブルになると(ステップS301:Y)、モード確認部222は現在のフラッシュメモリ部221の状態を、状態確認部241から出力される状態信号224によってチェックする(ステップS302)。この結果、状態信号224が信号「1」となっており、NOR型フラッシュメモリ204の記憶領域にデータが書き込まれていない状態であると判別された場合、すなわちデータの消去状態であると判別された場合には(Y)、ROM書きモードが実行される(ステップS303)。   Returning to FIG. 4, the description will be continued. When the mode selection signal line 209 is enabled (step S301: Y), the mode confirmation unit 222 checks the current state of the flash memory unit 221 with the state signal 224 output from the state confirmation unit 241 (step S302). As a result, the status signal 224 is the signal “1”, and when it is determined that the data is not written in the storage area of the NOR flash memory 204, that is, it is determined that the data is in the erased state. If (Y), the ROM writing mode is executed (step S303).

これに対して、モード選択信号線209がイネーブルとなっているが(ステップS301:Y)、状態信号224が信号「0」となっており、NOR型フラッシュメモリ204の記憶領域にデータがすでに書き込まれた状態であると判別されたものとする(ステップS302:N)。この場合に、図1に示すコネクタ205からNOR型フラッシュメモリ204へアクセスできることにすると、NOR型フラッシュメモリ204にすでに格納されているプログラムやデータを外部から読み取ることや書き換えることが可能になってしまう。このような事態の発生を防止するために、状態信号224が信号「1」となっており消去状態を示している場合以外は(ステップS302:N)、NOR型フラッシュメモリに対して通常モードが実行される(ステップS304)。ステップS302でNOR型フラッシュメモリ204の記憶領域にデータが書き込まれていると判別された場合にも(N)、同様に通常モードが実行される(ステップS304)。   In contrast, although the mode selection signal line 209 is enabled (step S301: Y), the status signal 224 is the signal “0”, and data has already been written in the storage area of the NOR flash memory 204. Suppose that it is determined that the current state has been reached (step S302: N). In this case, if the NOR type flash memory 204 can be accessed from the connector 205 shown in FIG. 1, the program and data already stored in the NOR type flash memory 204 can be read or rewritten from the outside. . In order to prevent the occurrence of such a situation, the normal mode is set for the NOR flash memory except when the status signal 224 is the signal “1” indicating the erased state (step S302: N). It is executed (step S304). Even when it is determined in step S302 that data has been written to the storage area of the NOR flash memory 204 (N), the normal mode is similarly executed (step S304).

一方、ステップS302で状態信号が信号「1」となっており、NOR型フラッシュメモリ204の記憶領域にデータが書き込まれていない状態であると判別された場合、すなわち消去状態であると判別された場合には(Y)、プログラムやデータの読み取りや書き換えのおそれがない。そこで、この場合にはROM書きモードが実行される(ステップS303)。   On the other hand, if the status signal is “1” in step S302 and it is determined that data is not written in the storage area of the NOR flash memory 204, that is, it is determined that the data is in the erased state. In this case (Y), there is no fear of reading or rewriting the program or data. Therefore, in this case, the ROM writing mode is executed (step S303).

図6は、ROM書きモードにおけるNOR型フラッシュメモリ内でのデータの伝達状況を表わしたものである。モード選択信号線209がイネーブルとなっているとき、マルチプレクサ262は第1の信号線群207を第3の信号線群225と接続する。これにより、第1の信号線群207を経てフラッシュメモリ部221に信号が伝送される。このとき第2の信号線群208からマルチプレクサ262に信号が送られてきても、モード確認部222は、これをフラッシュメモリ部221に送り出すことはない。   FIG. 6 shows the state of data transmission in the NOR type flash memory in the ROM write mode. When the mode selection signal line 209 is enabled, the multiplexer 262 connects the first signal line group 207 to the third signal line group 225. As a result, a signal is transmitted to the flash memory unit 221 via the first signal line group 207. At this time, even if a signal is sent from the second signal line group 208 to the multiplexer 262, the mode confirmation unit 222 does not send it to the flash memory unit 221.

図7は、以上説明した本実施の形態で電子機器を最初に起動させるまでの処理の概要を表わしたものである。図1と共に説明する。   FIG. 7 shows an outline of processing until the electronic device is first activated in the present embodiment described above. This will be described with reference to FIG.

電子機器は組み立て工程でNOR型フラッシュメモリ204を基板202(図1)に実装し(ステップS321)、このNOR型フラッシュメモリ204にデータを書き込んでいないこの状態で、コネクタ205を使用してこれに制御プログラムのデータ源を接続してROM書きを行う(ステップS322)。したがって、従来のようなROMライタは使用しない。なお、ROM書きを行うに際してNOR型フラッシュメモリ204に何らかのデータが残存して書き込みが実行できない場合がある。このような場合には、ROM書きを行う前にリセット信号線210を使用してNOR型フラッシュメモリ204に残存しているデータをリセットにより除去してしまえばよい。   The electronic device mounts the NOR flash memory 204 on the substrate 202 (FIG. 1) in the assembly process (step S321), and in this state in which no data is written in the NOR flash memory 204, the connector 205 is used for this. The ROM data is written by connecting the data source of the control program (step S322). Therefore, a conventional ROM writer is not used. It should be noted that some data may remain in the NOR flash memory 204 when writing to the ROM, and writing may not be performed. In such a case, the data remaining in the NOR flash memory 204 may be removed by resetting using the reset signal line 210 before performing ROM writing.

以上のようにしてNOR型フラッシュメモリ204に電子機器の起動および制御に必要な制御プログラムをROM書きした後に、電子機器の起動が行われることになる(ステップS323)。   As described above, after writing the control program necessary for the activation and control of the electronic device in the NOR flash memory 204 in the ROM, the electronic device is activated (step S323).

以上説明したように本実施の形態によれば、電子機器201は、図1に示すようにコネクタ205を介して外部装置からのアクセスを可能にしている。したがって、ROMライタを使用して事前にフラッシュメモリ204にROM書きを行うことなく、基板202上でROM書きを行うことができる。   As described above, according to the present embodiment, the electronic apparatus 201 can be accessed from an external device via the connector 205 as shown in FIG. Therefore, ROM writing can be performed on the substrate 202 without writing ROM in the flash memory 204 in advance using a ROM writer.

しかも、NOR型フラッシュメモリ204に対してCPU203からのアクセスが選択された場合であっても、状態信号224がNOR型フラッシュメモリ204の記憶領域にデータが書き込まれていない状態であることを示していない限りROM書きモードへの移行が禁止される。したがって、電子機器201の記憶装置に書かれているプログラムなどのデータをコネクタ205を介してユーザに見られることがなく、悪意あるユーザがデータを改ざんする事態の発生を避けることができる。   Moreover, even when the access from the CPU 203 to the NOR flash memory 204 is selected, the status signal 224 indicates that no data is written in the storage area of the NOR flash memory 204. Unless it is, the transition to the ROM writing mode is prohibited. Therefore, data such as a program written in the storage device of the electronic device 201 is not seen by the user via the connector 205, and a situation in which a malicious user alters the data can be avoided.

また、本実施の形態ではリセット信号線210をNOR型フラッシュメモリ204に接続したので、電子機器201に対して制御プログラム等のデータを入れ替える際に、先に格納されているデータを簡単に消去し初期化することができるという利点もある。   In this embodiment, since the reset signal line 210 is connected to the NOR flash memory 204, when data such as a control program is exchanged for the electronic device 201, the previously stored data is easily deleted. There is also an advantage that it can be initialized.

以上説明した実施の形態ではNOR型フラッシュメモリ204を電子機器201に用いた例について説明したが、これに限るものではない。たとえばNAND型のフラッシュメモリや、相変化メモリといった他の書き換え可能な不揮発性メモリを使用した場合にも、本発明を同様に適用することができる。すなわち、図2に示したフラッシュメモリ部221をこのような他の不揮発性メモリに置き代えても同様の効果を得ることができる。   In the embodiment described above, the example in which the NOR flash memory 204 is used in the electronic device 201 has been described. However, the present invention is not limited to this. For example, the present invention can be similarly applied to the case where another rewritable nonvolatile memory such as a NAND flash memory or a phase change memory is used. That is, the same effect can be obtained even if the flash memory unit 221 shown in FIG. 2 is replaced with such other nonvolatile memory.

本発明の一実施の形態における電子機器の要部を表わしたブロック図である。It is a block diagram showing the principal part of the electronic device in one embodiment of this invention. 本実施の形態におけるNOR型フラッシュメモリの機能的な構成を示すブロック図である。2 is a block diagram showing a functional configuration of a NOR flash memory according to the present embodiment. FIG. 本実施の形態の状態確認部における管理テーブルの原理図である。It is a principle figure of the management table in the state confirmation part of this Embodiment. 本実施の形態における電子機器の動作の概要を表わした流れ図である。It is a flowchart showing the outline | summary of operation | movement of the electronic device in this Embodiment. 通常モードにおけるNOR型フラッシュメモリ内でのデータの伝達状況を表わした説明図である。It is explanatory drawing showing the transmission condition of the data in the NOR type flash memory in a normal mode. ROM書きモードにおけるNOR型フラッシュメモリ内でのデータの伝達状況を表わした説明図である。It is explanatory drawing showing the transmission condition of the data in the NOR type flash memory in ROM write mode. 本実施の形態で電子機器を最初に起動させるまでの処理の概要を表わした流れ図である。It is a flowchart showing the outline | summary of the process until an electronic device is first started in this Embodiment. 従来の手法におけるNOR型フラッシュメモリを用いて電子機器を動作させるまでの一連の作業を示した流れ図である。It is the flowchart which showed a series of work until it operates an electronic device using the NOR type flash memory in the conventional method.

符号の説明Explanation of symbols

201 電子機器
202 基板
203 CPU
204 NOR型フラッシュメモリ
205 コネクタ
209 モード選択信号線
210 リセット信号線
221 フラッシュメモリ部
224 状態信号
241 状態確認部
262 マルチプレクサ
201 Electronic Device 202 Substrate 203 CPU
204 NOR type flash memory 205 Connector 209 Mode selection signal line 210 Reset signal line 221 Flash memory unit 224 Status signal 241 Status confirmation unit 262 Multiplexer

Claims (7)

基板に実装され、データの読み書きの対象となるメモリと、
このメモリを使用して所定の制御を行うCPUと、
前記メモリに外部からデータの書き込みを行うためのコネクタと、
前記CPUおよびコネクタのいずれか一方を選択して前記メモリと接続するスイッチ手段と、
前記メモリにデータが格納されているか否かを判別するデータ格納有無判別手段と、
前記CPUが前記メモリにアクセスするモードとしての通常モードであるか否かを判別するモード判別手段と、
このモード判別手段が前記通常モードでないと判別したとき、前記スイッチ手段を前記コネクタ側に接続し、それ以外は前記CPU側に接続するスイッチ制御手段
とを具備することを特徴とする電子機器。
A memory that is mounted on a board and is a target for reading and writing data,
A CPU that performs predetermined control using this memory;
A connector for externally writing data to the memory;
Switch means for selecting any one of the CPU and the connector and connecting to the memory;
Data storage presence / absence determining means for determining whether or not data is stored in the memory;
Mode determining means for determining whether or not the CPU is in a normal mode as a mode for accessing the memory;
An electronic apparatus comprising: switch control means for connecting the switch means to the connector side when the mode discrimination means determines that the mode is not the normal mode, and connecting to the CPU side otherwise.
前記コネクタは前記基板に取り付けられていることを特徴とする請求項1記載の電子機器。   The electronic device according to claim 1, wherein the connector is attached to the substrate. 前記メモリは不揮発性メモリであることを特徴とする請求項1記載の電子機器。   The electronic device according to claim 1, wherein the memory is a nonvolatile memory. 前記スイッチ制御手段は、更に前記データ格納有無判別手段によって前記メモリにデータが格納されていないと判別されたときにのみ、前記スイッチ手段を前記コネクタ側に接続することを特徴とする請求項1記載の電子機器。   The switch control means connects the switch means to the connector side only when it is determined by the data storage presence / absence determining means that no data is stored in the memory. Electronic equipment. 前記メモリに格納されているデータを一括消去するデータ消去手段を具備することを特徴とする請求項1記載の電子機器。   2. The electronic apparatus according to claim 1, further comprising a data erasing unit that collectively erases data stored in the memory. 基板に実装されたメモリに対してCPUがアクセスするモードであるか否かを判別するモード判別ステップと、
前記メモリにデータが格納されているかどうかを判別するデータ格納有無判別ステップと、
前記モード判別ステップがCPUがアクセスするモードではないと判別し、前記データ格納有無判別ステップが前記メモリにデータが格納されていないと判別したときのみ前記メモリに対する外部からのアクセスを認めるアクセス許可ステップ
とを具備することを特徴とする電子機器のメモリアクセス許可判別方法。
A mode determination step for determining whether or not the CPU is in a mode for accessing the memory mounted on the substrate;
A data storage presence / absence determining step for determining whether data is stored in the memory; and
An access permission step for determining that the mode is not a mode to be accessed by the CPU, and permitting external access to the memory only when the data storage presence / absence determination step determines that no data is stored in the memory; A memory access permission determination method for an electronic device, comprising:
前記メモリに対する外部からのアクセスは、データの書き込みのためのアクセスであることを特徴とする請求項5記載の電子機器のメモリアクセス許可判別方法。   6. The memory access permission determining method according to claim 5, wherein the external access to the memory is an access for writing data.
JP2008015334A 2008-01-25 2008-01-25 Electronic equipment and method for determining permission of access to memory of electronic equipment Pending JP2009176147A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008015334A JP2009176147A (en) 2008-01-25 2008-01-25 Electronic equipment and method for determining permission of access to memory of electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008015334A JP2009176147A (en) 2008-01-25 2008-01-25 Electronic equipment and method for determining permission of access to memory of electronic equipment

Publications (1)

Publication Number Publication Date
JP2009176147A true JP2009176147A (en) 2009-08-06

Family

ID=41031141

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008015334A Pending JP2009176147A (en) 2008-01-25 2008-01-25 Electronic equipment and method for determining permission of access to memory of electronic equipment

Country Status (1)

Country Link
JP (1) JP2009176147A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011018431A (en) * 2009-05-11 2011-01-27 Kerry Dean Tedrow Dedicated interface to factory program phase-change memories
US8509430B2 (en) 2010-03-15 2013-08-13 Samsung Electronics Co., Ltd. Storage devices having a security function and methods of securing data stored in the storage device
US9591786B2 (en) 2013-03-04 2017-03-07 Denso Corporation Electronic device for vehicle
US10256170B2 (en) 2015-01-08 2019-04-09 Denso Corporation Electronic device for vehicle

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011018431A (en) * 2009-05-11 2011-01-27 Kerry Dean Tedrow Dedicated interface to factory program phase-change memories
US8509430B2 (en) 2010-03-15 2013-08-13 Samsung Electronics Co., Ltd. Storage devices having a security function and methods of securing data stored in the storage device
US9591786B2 (en) 2013-03-04 2017-03-07 Denso Corporation Electronic device for vehicle
US10256170B2 (en) 2015-01-08 2019-04-09 Denso Corporation Electronic device for vehicle

Similar Documents

Publication Publication Date Title
US7640424B2 (en) Initialization of flash storage via an embedded controller
JP4672742B2 (en) Memory controller and memory system
KR101395778B1 (en) Memory card and memory system including the same and operating method thereof
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
CN100535933C (en) Memory card, data processor, memory card control method and memory card setting method
US20100017558A1 (en) Memory device operable in read-only and re-writable modes of operation
KR101622416B1 (en) Peripheral device locking mechanism
KR20100097041A (en) Memory controller, semiconductor memory device and control method thereof
KR20070060101A (en) System and method for nonvolatile memory management in wireless terminal
KR20070076849A (en) Apparatus and method for performing a copyback operation of a memory card
JP4153802B2 (en) Storage device
KR20110121897A (en) How to handle user device and its program fail
JPWO2008117520A1 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY SYSTEM, AND HOST DEVICE
KR20100094241A (en) Nonvolatile memory device not including reserved blocks
KR20220104486A (en) Memory system, operating method thereof and computing system
JP2009176147A (en) Electronic equipment and method for determining permission of access to memory of electronic equipment
CN114579474A (en) Memory system and operating method thereof
JP4843222B2 (en) Semiconductor memory device control method, memory card, and host device
KR20110078171A (en) Bootable volatile memory device, memory module and processing system having same, and method of booting processing system using same
US11720276B2 (en) Memory system and controller for managing write status
JP4452158B2 (en) Nonvolatile memory system
CN109933282B (en) Memory system and method of operation
JP2008287727A (en) Storage device
KR100743252B1 (en) Code data error correction method and apparatus
KR100743253B1 (en) Code data error correction method and apparatus