JP2010176200A - Flash memory operation protective device and flash memory operation protective method - Google Patents

Flash memory operation protective device and flash memory operation protective method Download PDF

Info

Publication number
JP2010176200A
JP2010176200A JP2009015685A JP2009015685A JP2010176200A JP 2010176200 A JP2010176200 A JP 2010176200A JP 2009015685 A JP2009015685 A JP 2009015685A JP 2009015685 A JP2009015685 A JP 2009015685A JP 2010176200 A JP2010176200 A JP 2010176200A
Authority
JP
Japan
Prior art keywords
flash memory
driver
data
block
written
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.)
Granted
Application number
JP2009015685A
Other languages
Japanese (ja)
Other versions
JP5486193B2 (en
Inventor
Keita Yoshikawa
啓太 吉川
Takeshi Kondo
毅 近藤
Akio Sakai
明夫 酒井
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.)
Tokai Rika Co Ltd
Original Assignee
Tokai Rika Co Ltd
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 Tokai Rika Co Ltd filed Critical Tokai Rika Co Ltd
Priority to JP2009015685A priority Critical patent/JP5486193B2/en
Publication of JP2010176200A publication Critical patent/JP2010176200A/en
Application granted granted Critical
Publication of JP5486193B2 publication Critical patent/JP5486193B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a flash memory operation protective device and a flash memory operation protective method to protect access from a driver to a flash memory. <P>SOLUTION: Specific one (block D 10 in this example) of a plurality of blocks 7-10 in a flash memory 6 provided as data deletion units is used as a fixed block 10 not to be used for rotation. A product eigenvalue 14 and an initial value 15 are stored in the fixed block 10 as initial operation information indispensable for starting an application 11. When the driver 13 loses an access destination due to power reset or the like, the product eigenvalue 14 and the initial value 15 stored in the fixed block 10 are written in the rotation block, and the driver 13 is started by the data to continue operation of the driver 13. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、データ書き換え可能な不揮発性メモリの一種であるフラッシュメモリに係り、詳しくはその動作保護装置及び動作保護方法に関する。   The present invention relates to a flash memory which is a kind of non-volatile data rewritable memory, and more particularly to an operation protection device and an operation protection method therefor.

従来、装置や機器の動作を統括管理するコンピュータには、動作の際に必要となる各種データの格納先として種々のメモリが搭載されている。このメモリの一種としては、例えば各種データの電気的消去及び書き込みが可能なメモリとして不揮発性メモリが使用され、この不揮発性メモリには、例えば図6に示すようなフラッシュメモリ(Flash Read Only Memory:特許文献1参照)81が広く使用されている。フラッシュメモリ81は、データ書き込み先であるメモリ領域が複数(図6ではA〜Dの4つ)のブロック82〜85の集合体により構築され、このブロック単位ごとにデータ消去可能となっている。なお、これらブロック82〜85は、データ消去単位であることから、イレーズブロックとも呼ばれている。フラッシュメモリ81に対するデータ読み書きは、アプリケーション86からの指令に従って作動するドライバ87によって管理される。   2. Description of the Related Art Conventionally, various memories are mounted as storage destinations of various data necessary for operation in a computer that comprehensively manages the operations of apparatuses and devices. As one type of this memory, for example, a non-volatile memory is used as a memory capable of electrically erasing and writing various data, and for example, a flash memory (Flash Read Only Memory: as shown in FIG. 6) is used. 81) is widely used. The flash memory 81 is constructed by an aggregate of blocks 82 to 85 having a plurality of memory areas (four from A to D in FIG. 6) as data write destinations, and data can be erased for each block unit. These blocks 82 to 85 are also referred to as erase blocks because they are data erasure units. Data reading / writing with respect to the flash memory 81 is managed by a driver 87 that operates according to a command from the application 86.

ところで、フラッシュメモリ81以外の他のメモリ種であるEEPROM(Electrically Erasable PROM)やSRAM(Static Random Access Memory)には、同じアドレス上にデータを逐次書き込むことができる上書き機能があるので、データ書き込み済みのアドレスにデータ書き込み指令が出されても、このアドレスに逐次データ書き込みが可能である。しかし、前述したフラッシュメモリ81は、その特性として、データ書き込み済みのアドレス上に新たなデータを書き込む際には、ブロック全体を一旦消去してからでないと、この作業を実行することができないという制限がある。   By the way, EEPROM (Electrically Erasable PROM) and SRAM (Static Random Access Memory), which are other memory types than the flash memory 81, have an overwrite function capable of sequentially writing data on the same address, so that data has already been written. Even if a data write command is issued to this address, data can be sequentially written to this address. However, the above-described flash memory 81 has a characteristic that, when new data is written to an address where data has been written, this operation cannot be executed unless the entire block is erased once. There is.

よって、この種のフラッシュメモリ81では、データ書き込みに際して、図7及び図8に示すようにA〜Dのブロック82〜85をローテーションして使用する。このとき、まずフラッシュメモリ81に新規データを書き込む際には、図7に示すように、ドライバ87は使用ブロック(図7ではAブロック82)の空き領域にデータを順次書き増ししていく。そして、Aブロック82に空き領域がなくなると、図8に示すように、各データ(図8ではID1〜ID3)におけるその最新値を次の使用ブロックであるBブロック83にコピーし、このBブロック83を新たなデータ書き込み先として使用し、使用ブロックに空き領域が無くなる度に、この作業を順次繰り返すことでデータ書き込みが行われる。また、空き領域がなくなった使用済みブロックは、次のローテーションが回ってくるまでにデータが消去される。   Therefore, in this type of flash memory 81, when writing data, the blocks 82 to 85 of A to D are rotated and used as shown in FIGS. At this time, when new data is first written to the flash memory 81, the driver 87 sequentially writes data in the empty area of the used block (A block 82 in FIG. 7) as shown in FIG. When there is no more free space in the A block 82, as shown in FIG. 8, the latest value in each data (ID1 to ID3 in FIG. 8) is copied to the B block 83 which is the next used block. 83 is used as a new data writing destination, and data writing is performed by sequentially repeating this operation each time there is no empty area in the used block. In addition, data is erased from a used block whose free area has run out before the next rotation.

特開2008−243347号公報JP 2008-243347 A

ところで、例えばコンピュータの電源が外的要因等により変動して電源が一時的にリセットされると、例えば図9に示すように、ドライバ87はそれまで保持していた動作情報、即ちA〜Dのブロック82〜85のうち現在使用しているブロックがどれで、その使用ブロック内のどのデータが最新値であるのかの各種情報が全て飛ぶ状態をとることがある。よって、このリセットの後にコンピュータに電源が再度供給された際、ドライバ87がフラッシュメモリ81に再アクセスする動作をとっても、電源が落ちる前の動作状態を把握することができず、結果としてドライバ87は実行すべき動作を認識できずに停止して、アプリケーション86が動作できなくなってしまう状況に陥ることがあった。   By the way, for example, when the power supply of the computer fluctuates due to an external factor or the like and the power supply is temporarily reset, as shown in FIG. 9, for example, the driver 87 holds the operation information, that is, A to D. Of the blocks 82 to 85, there is a case where all the various information indicating which block is currently used and which data in the used block is the latest value may be taken. Therefore, when the power is supplied again to the computer after this resetting, even if the driver 87 takes an operation of re-accessing the flash memory 81, the operation state before the power is turned off cannot be grasped. In some cases, the operation to be executed is stopped without being recognized, and the application 86 cannot be operated.

本発明の目的は、フラッシュメモリに対するドライバのアクセスを保護することができるフラッシュメモリの動作保護装置及びフラッシュメモリの動作保護方法を提供することにある。   An object of the present invention is to provide a flash memory operation protection device and a flash memory operation protection method capable of protecting a driver's access to the flash memory.

前記問題点を解決するために、本発明では、データ書き換え可能な不揮発性メモリとしてフラッシュメモリを使用し、アプリケーションからの書き込み指令によりドライバが前記フラッシュメモリにデータ書き込みを行う際、当該フラッシュメモリのメモリ領域を構築しつつデータ消去単位となっている複数のブロックを、順番にローテーションして使用しながらデータの読み書きを実行するフラッシュメモリの動作保護装置において、複数の前記ブロックのうち前記ローテーションには使用されず、前記アプリケーションを動作させるのに最低限必要な初期動作情報が書き込まれた固定ブロックと、前記フラッシュメモリに対する前記ドライバのアクセスに対して異常があるか否かを監視する監視手段と、前記監視手段で前記異常を確認した際、前記固定ブロックに書き込んだ前記初期動作情報を前記ブロックに新たに書き込んで当該初期動作情報により前記ドライバを動作させることで、前記アクセスを継続させる保護実行手段とを備えたことを要旨とする。   In order to solve the above problems, in the present invention, when a flash memory is used as a rewritable nonvolatile memory and a driver writes data to the flash memory by a write command from an application, the memory of the flash memory In a flash memory operation protection device that reads and writes data while sequentially using a plurality of blocks that are data erasure units while constructing an area, and used for the rotation among the plurality of blocks A monitoring block for monitoring whether there is an abnormality with respect to the access of the driver to the flash memory, a fixed block in which minimum operation information necessary for operating the application is written, Check the abnormality with monitoring means The initial execution information written in the fixed block is newly written in the block, and the driver is operated according to the initial operation information, thereby providing protection execution means for continuing the access. .

この構成によれば、フラッシュメモリがメモリ領域として持つ複数のブロックのうちの所定のものを、データ読み書きのローテーションに使用しない固定ブロックとして用い、アプリケーションを動作させるのに最低限必要な初期動作情報をこの固定ブロックに書き込んでおく。そして、ドライバがフラッシュメモリにアクセスした際のそのアクセス異常の有無を監視手段で監視し、アクセス異常を確認した際には、固定ブロックから初期動作情報を読み出してこれをローテーション用のブロックに書き込み、この初期動作情報によってドライバを動作させる。このため、もし仮に電源リセット等の電圧変動によりドライバの電源が一時的にオフしてドライバが次動作を認識できない状態に陥っても、固定ブロックに書き込んだ初期動作情報によってドライバは次動作を把握可能となるので、ドライバがアクセス先を見失って停止する状況が生じ難くなる。よって、このような電圧変動によってドライバにリセットがかかっても、フラッシュメモリに対するドライバのアクセスを保護することが可能となる。   According to this configuration, a predetermined block of a plurality of blocks that the flash memory has as a memory area is used as a fixed block that is not used for data read / write rotation, and the minimum initial operation information necessary for operating the application is obtained. Write in this fixed block. Then, when the driver accesses the flash memory, the monitoring means monitors the presence or absence of the access abnormality, and when the access abnormality is confirmed, the initial operation information is read from the fixed block and written to the rotation block. The driver is operated based on the initial operation information. For this reason, even if the driver's power supply is temporarily turned off due to voltage fluctuations such as power reset, and the driver cannot recognize the next operation, the driver knows the next operation based on the initial operation information written in the fixed block. This makes it difficult for the driver to lose track of the access destination and stop. Therefore, even if the driver is reset due to such voltage fluctuations, it becomes possible to protect the driver's access to the flash memory.

本発明では、前記初期動作情報は、前記フラッシュメモリの使用時において書き換えられることのない固定値であることを要旨とする。
この構成によれば、フラッシュメモリの使用時において初期動作情報が間違った値に書き換えられる状況がなくなるので、初期動作情報の値を信頼度の高いものとすることが可能となる。
The gist of the present invention is that the initial operation information is a fixed value that is not rewritten when the flash memory is used.
According to this configuration, there is no situation where the initial operation information is rewritten to an incorrect value when the flash memory is used, so that the value of the initial operation information can be made highly reliable.

本発明では、データ書き換え可能な不揮発性メモリとしてフラッシュメモリを使用し、アプリケーションからの書き込み指令によりドライバが前記フラッシュメモリにデータ書き込みを行う際、当該フラッシュメモリのメモリ領域を構築するデータ消去単位の複数のブロックを、順番にローテーションして使用しながら前記書き込みを実行するフラッシュメモリの動作保護方法において、複数の前記ブロックのうち前記ローテーションには使用しないものを固定ブロックとして設け、前記アプリケーションを動作させるのに最低限必要な初期動作情報を当該固定ブロックに書き込み、前記フラッシュメモリに対するアクセスに対して異常があるか否かを監視手段で監視し、前記異常が発生した際、前記固定ブロックに書き込んだ前記初期動作情報を前記ブロックに新たに書き込んで当該初期動作情報により前記ドライバを動作させることで、前記アクセスを継続させることを要旨とする。   In the present invention, when a flash memory is used as a data rewritable nonvolatile memory and a driver writes data to the flash memory in accordance with a write command from an application, a plurality of data erasing units for constructing a memory area of the flash memory In the operation protection method of the flash memory that executes the writing while rotating the blocks in order, the blocks that are not used for the rotation among the plurality of blocks are provided as fixed blocks, and the application is operated. The minimum necessary initial operation information is written to the fixed block, and monitoring means is used to monitor whether there is an abnormality in access to the flash memory, and when the abnormality occurs, the fixed block is written to the fixed block. Initial operation Is newly written distribution to the block by operating the driver by the initial operation information, and summarized in that to continue the access.

本発明によれば、フラッシュメモリに対するドライバのアクセスを保護することができる。   According to the present invention, it is possible to protect driver access to the flash memory.

一実施形態における車内運転席の外観を示す斜視図。The perspective view which shows the external appearance of the driver's seat in a vehicle in one Embodiment. コンピュータのソフトウェア構成を含めた概略構成を示すブロック図。The block diagram which shows schematic structure including the software configuration of a computer. アクセス異常が発生した際にコンピュータとる対処動作を示すブロック図。The block diagram which shows the coping operation which a computer takes when access abnormality generate | occur | produces. アクセス異常が発生した際に固定ブロックのデータがローテーションブロックに書き込まれる状態を示す説明図。Explanatory drawing which shows the state in which the data of a fixed block are written in a rotation block when access abnormality generate | occur | produces. 本例に示したコンピュータが持つ効果を説明するブロック図。The block diagram explaining the effect which the computer shown in this example has. 従来におけるコンピュータの概略構成を示すブロック図。The block diagram which shows schematic structure of the computer in the past. フラッシュメモリのブロックにデータを書き込むときの動作を示す説明図。Explanatory drawing which shows operation | movement when writing data in the block of flash memory. フラッシュメモリのブロックからデータを消去するときの動作を示す説明図。Explanatory drawing which shows operation | movement when erasing data from the block of flash memory. リセット等によりアクセスに不具合が発生したときの状態を示す説明図。Explanatory drawing which shows a state when malfunction occurs in access by reset etc. FIG.

以下、本発明を具体化したフラッシュメモリの動作保護装置及びフラッシュメモリの動作保護方法の一実施形態を図1〜図5に従って説明する。
図1に示すように、車両1には、ステアリングホイール2の操舵角を検出する操舵角検出装置3が設けられている。この操舵角検出装置3には、同装置3のセンサ部品(例えば、磁気式センサ)としてステアリングアングルセンサ4と、操舵角検出装置3のコントロールユニットとしてコンピュータ5とが設けられている。コンピュータ5は、ステアリングアングルセンサ4から取得するセンサ出力値を基に、ステアリングホイール2の操舵角を演算し、この演算した操舵角(演算舵角値)を、必要とする他の車載機器に車内LAN(Local Area Network)を介して出力する。
Hereinafter, an embodiment of a flash memory operation protection device and a flash memory operation protection method embodying the present invention will be described with reference to FIGS.
As shown in FIG. 1, the vehicle 1 is provided with a steering angle detection device 3 that detects the steering angle of the steering wheel 2. The steering angle detection device 3 includes a steering angle sensor 4 as a sensor component (for example, a magnetic sensor) of the device 3 and a computer 5 as a control unit of the steering angle detection device 3. The computer 5 calculates the steering angle of the steering wheel 2 based on the sensor output value acquired from the steering angle sensor 4, and uses the calculated steering angle (calculated steering angle value) to other in-vehicle devices that need it. Output via a LAN (Local Area Network).

図2に示すように、コンピュータ5には、各種データを書き込むためのメモリとしてフラッシュメモリ(Flash ROM)6が設けられている。フラッシュメモリ6は、自身のメモリ領域に対するデータの書き換えが可能な不揮発性メモリの一種であって、背景技術でも述べたように、データ消去単位として区分けされた複数(本例はA〜Dの4つ)のブロック7〜10からなる。即ち、この種のフラッシュメモリ6は、自身のメモリ領域に書き込んだデータが書き換え可能であるものの、データ消去はブロック単位でしか実行することができない特性を持ったメモリである。なお、これらブロック7〜10は、フラッシュメモリ6のメモリ領域を均等に区分することにより、同じ記憶容量をとる。また、これらA〜Dのブロック7〜10がブロックを構成する。   As shown in FIG. 2, the computer 5 is provided with a flash memory (Flash ROM) 6 as a memory for writing various data. The flash memory 6 is a kind of nonvolatile memory capable of rewriting data in its own memory area. As described in the background art, the flash memory 6 is divided into a plurality of data erasing units (in this example, 4 to 4). Block) 7-10. That is, this type of flash memory 6 is a memory having a characteristic that data erasure can be executed only in block units, although data written in its own memory area can be rewritten. The blocks 7 to 10 have the same storage capacity by equally dividing the memory area of the flash memory 6. Further, these blocks 7 to 10 of A to D constitute a block.

本例のフラッシュメモリ6では、データ書き込みに際して、A〜Dのブロック7〜10のうちA〜Cのブロック7〜9をデータ書込先としてローテーションして使用する。ここで、これら3つのローテーションブロック7〜9のうち、最初に使用するブロックを例えばAブロック7とすると、まずはAブロック7をデータ書き込み先として、操舵角検出装置3に関係する各種データを書き込んでいく。なお、このときにAブロック7に書き込まれるデータとしては、例えば車両1のイグニッションスイッチ(エンジンスイッチ)がイグニッションオン位置(IG ON位置)に操作されてエンジンが始動したときの時刻(ID1データ)や、イグニッションスイッチがオンしている間の時間(ID2データ)や、ステアリングアングルセンサ4のセンサ出力値(ID3データ)等がある。   In the flash memory 6 of this example, when data is written, among the blocks 7 to 10 of A to D, the blocks 7 to 9 of A to C are rotated and used as data write destinations. Here, of these three rotation blocks 7 to 9, if the first block to be used is, for example, A block 7, first, various data related to the steering angle detection device 3 are written using A block 7 as the data write destination. Go. The data written in the A block 7 at this time includes, for example, the time (ID1 data) when the engine is started by operating the ignition switch (engine switch) of the vehicle 1 to the ignition on position (IG ON position). The time during which the ignition switch is on (ID2 data), the sensor output value of the steering angle sensor 4 (ID3 data), and the like.

ところで、フラッシュメモリ6にデータを書き込む際、フラッシュメモリ6にはデータ消去がブロック単位という制限があるので、データ書き込み済みのアドレスにデータを上書きすることができない。このため、フラッシュメモリ6は、新規書き込みデータを受け付けた際、使用中のAブロック7において、その空き領域に受け付けデータを順次書き増ししていく動作をとる。そして、書込領域が一杯になると、使用ブロックを次使用ブロック(本例はBブロック8)に切り換え、ID1〜ID3の各データの最新値をBブロック8に書き込みつつ、データの書き込みをBブロック8で継続し、ブロックに空き領域が無くなる度にこの動作を繰り返すことにより、データ書き込みを実行する。なお、データ書き込みが一杯になったブロックは、次ローテーションが回ってくるまでの間に、データ書き込みやデータ読み取りを実行していない手の空いたときにデータ消去が実行される。   By the way, when data is written to the flash memory 6, the data cannot be overwritten at the data-written address because the flash memory 6 has a restriction that data erasure is in units of blocks. Therefore, when new write data is received, the flash memory 6 performs an operation of sequentially increasing the received data in the empty area in the A block 7 in use. When the writing area becomes full, the used block is switched to the next used block (in this example, B block 8), and the latest value of each data of ID1 to ID3 is written to the B block 8, while the data is written to the B block. The data write is executed by continuing this operation and repeating this operation every time there is no free area in the block. It should be noted that data erasure is executed for a block in which data writing is full, when there is no free time during which data writing or data reading is not performed, until the next rotation starts.

図2に示すように、コンピュータ5には、同コンピュータ5を動作させるソフトウェアとして、操舵角検出装置3を動作させるための専用ソフトウェアであるアプリケーション11と、このアプリケーション11とOS(Operating System)との間の中間的な立場で機能するミドルウェア12と、フラッシュメモリ6を動作させるためのソフトウェアであるドライバ13と設けられている。アプリケーション11は、自身に入力される各種情報やデータに基づき、ミドルウェア12を介してドライバ13に動作指令を出力することにより、コンピュータ5を動作させる。また、アプリケーション11は、ドライバ13が複数存在する場合、これらドライバ13を統括管理することが可能となっている。   As shown in FIG. 2, the computer 5 includes, as software for operating the computer 5, an application 11 which is dedicated software for operating the steering angle detection device 3, and an application 11 and an OS (Operating System). There are provided middleware 12 that functions in an intermediate position and a driver 13 that is software for operating the flash memory 6. The application 11 operates the computer 5 by outputting an operation command to the driver 13 via the middleware 12 based on various information and data input to the application 11. In addition, when there are a plurality of drivers 13, the application 11 can collectively manage these drivers 13.

ドライバ13は、アプリケーション11からミドルウェア12を介して動作指令を受け付けると、この動作指令に従って動いて、フラッシュメモリ6(ブロック7〜10)へのデータ書き込み、データ読み取り、データ消去等の各種処理を実行する。このとき、ドライバ13は、アプリケーション11からの動作指令をトリガとして受け付け、アプリケーション11が他動作を実行していても、この動作指令に基づく動作をアプリケーション11の動作状態に依らず実行する。また、ドライバ13によるブロック7〜10のデータ消去は、前述したようにドライバ13がデータ書き込みやデータ読み取りを行っていないときの手の空いたときに実行される。   When the driver 13 receives an operation command from the application 11 via the middleware 12, the driver 13 operates according to the operation command and executes various processes such as data writing, data reading, and data erasing to the flash memory 6 (blocks 7 to 10). To do. At this time, the driver 13 receives an operation command from the application 11 as a trigger, and executes an operation based on this operation command regardless of the operation state of the application 11 even if the application 11 is executing another operation. Further, the data erasure of the blocks 7 to 10 by the driver 13 is executed when the driver 13 is free when the driver 13 is not writing or reading data as described above.

また、本例の場合、A〜Dのブロック7〜10のうちDブロック10は、データ書き込みのローテーションとして使用せずに、予め決められた初期動作情報をデフォルト値として書き込んでおく固定ブロック10として使用されている。この初期動作情報としては、車両1が持つ製品個々の値として製品固有値14や、動作過程上でやり取りされるデータ(ID1〜ID3)の初期値15が書き込まれている。例えば、製品固有値14としては、車両コード、車両1のシリアル番号、仕向情報等がある。また、初期値15としては、イグニッションオンの開始時刻、イグニッションオン時の経過時間、ステアリングアングルセンサ4等の初期値として「0」がある。これら製品固有値14や初期値15は、アプリケーション11が動作するのに最低限必要なデータであって、車両1の製造ライン上や製品出荷時に固定ブロック10に書き込まれ、製品出荷後の実際の使用時においては上書きされることのないものとなっている。なお、製品固有値14及び初期値15が初期動作情報を構成する。   In the case of this example, among the blocks 7 to 10 of A to D, the D block 10 is not used as a rotation for writing data, but is used as a fixed block 10 in which predetermined initial operation information is written as a default value. in use. As the initial operation information, a product unique value 14 as an individual product value of the vehicle 1 and an initial value 15 of data (ID1 to ID3) exchanged in the operation process are written. For example, the product specific value 14 includes a vehicle code, a serial number of the vehicle 1, destination information, and the like. The initial value 15 includes “0” as the initial value of the ignition angle, the elapsed time when the ignition is turned on, the steering angle sensor 4, and the like. These product specific value 14 and initial value 15 are the minimum data necessary for the application 11 to operate, and are written in the fixed block 10 on the production line of the vehicle 1 or at the time of product shipment, and are actually used after product shipment. Sometimes it will not be overwritten. The product specific value 14 and the initial value 15 constitute initial operation information.

更に、ドライバ13には、ドライバ13がフラッシュメモリ6に正常にアクセスできない異常の有無を監視する異常発生監視部16が設けられている。本例の異常発生監視部16は、ドライバ13がフラッシュメモリ6にアクセスのアクセス先を見失っているか否かを見ることで異常の有無を確認し、例えばフラッシュメモリ6にアクセスしたにも拘わらず、一定時間が経ってもデータを取得できないことを以て、フラッシュメモリ6へのアクセスに異常が発生したと認識する。なお、異常発生監視部16が監視手段に相当する。   Further, the driver 13 is provided with an abnormality occurrence monitoring unit 16 that monitors whether there is an abnormality in which the driver 13 cannot normally access the flash memory 6. The abnormality occurrence monitoring unit 16 of this example confirms whether there is an abnormality by seeing whether the driver 13 has lost sight of the access destination of access to the flash memory 6, for example, despite having accessed the flash memory 6, It is recognized that an abnormality has occurred in access to the flash memory 6 because data cannot be acquired even after a certain period of time. The abnormality occurrence monitoring unit 16 corresponds to a monitoring unit.

また、ドライバ13には、異常発生監視部16が異常を確認した際に、固定ブロック10の初期動作情報(製品固有値14、初期値15)を使用して動作することにより、ドライバ13がフラッシュメモリ6にアクセスできることを確保する保護処理部17が設けられている。なお、保護処理部17が保護実行手段に相当する。また、異常発生監視部16及び保護処理部17は、コンピュータ5のCPUがプログラムに沿って動作することにより機能的に生成されるもので、図2ではこれをブロック図で図示する。   Further, the driver 13 operates using the initial operation information (product specific value 14 and initial value 15) of the fixed block 10 when the abnormality occurrence monitoring unit 16 confirms the abnormality, so that the driver 13 is a flash memory. A protection processing unit 17 is provided to ensure that access to 6 is possible. The protection processing unit 17 corresponds to protection execution means. Further, the abnormality occurrence monitoring unit 16 and the protection processing unit 17 are functionally generated when the CPU of the computer 5 operates in accordance with a program, and this is illustrated in a block diagram in FIG.

次に、本例のコンピュータ5(ドライバ13)が電源オンした後、例えば一時的な電圧変動によりコンピュータ5がリセット状態をとるときの動作例を図3及び図4に従って説明する。   Next, after the computer 5 (driver 13) of this example is turned on, an example of operation when the computer 5 takes a reset state due to, for example, temporary voltage fluctuation will be described with reference to FIGS.

イグニッションスイッチがイグニッションオン位置に操作された際、コンピュータ5は車載バッテリから電源を受け付けて、それまでの停止状態から起動状態に動作状態が切り換わる。そして、ドライバ13は、イグニッションスイッチがオンした開始時刻(ID1データ)や、イグニッションスイッチがオンしてからの経過時間(ID2データ)、これ以降においてステアリングアングルセンサ4から受け付けるセンサ出力値(ID3データ)をフラッシュメモリ6に書き込む。本例は、A〜Dのブロック7〜10のうちAブロック7が最初に使用されるブロックとして設定されているので、まずは最初にAブロック7からこれらデータが書き込まれる。   When the ignition switch is operated to the ignition-on position, the computer 5 receives power from the in-vehicle battery, and the operation state is switched from the stopped state to the activated state. The driver 13 then starts the time when the ignition switch is turned on (ID1 data), the elapsed time after the ignition switch is turned on (ID2 data), and the sensor output value (ID3 data) received from the steering angle sensor 4 thereafter. Is written into the flash memory 6. In this example, since the A block 7 is set as a block to be used first among the blocks 7 to 10 of A to D, first, these data are written from the A block 7 first.

ところで、イグニッションスイッチがイグニッションオン位置から例えばエンジンスタート位置に操作された際、この操作過程におけるイグニッションスイッチのスイッチ接点の切り換わりが原因で、コンピュータ5に供給される電圧が変動して、コンピュータ5に供給される電源が一時的にオフして電源がリセットされる場合がある。このときは、瞬間的な電源オフに伴ってコンピュータ5が一時的に電圧が供給されなくなり、電圧が元のレベルまで戻ると、コンピュータ5に電源が再度供給されて、コンピュータ5が起動状態に復帰する動作をとる。   By the way, when the ignition switch is operated, for example, from the ignition on position to the engine start position, the voltage supplied to the computer 5 fluctuates due to the switching of the switch contact of the ignition switch in this operation process. The supplied power may be temporarily turned off and the power may be reset. At this time, the voltage is temporarily not supplied to the computer 5 due to the momentary power-off, and when the voltage returns to the original level, the power is supplied to the computer 5 again, and the computer 5 returns to the activated state. Take action to do.

ここで、この状況下では、背景技術でも述べたように、ドライバ13は電源が落ちる前の各種情報を逐次保持しておく機能を持たないことから、一旦起動した後に一時的に電源が落ちると、ドライバ13は電源が落ちる前の各種情報、例えば電源オフ前にどのブロックを使用していたのかや、或いは使用ブロックのどのアドレス先にアクセスしていたのかなどを見失うことになる。この場合、電源が再投入された後、ドライバ13はそれまで使用していたブロックにアクセスしようしとしてもそれを実行できなくなり、場合によってはブロック7〜9に書き込んでいたデータを消失する動作に入ることもあり、結果としてブロック7〜9に書き込んだデータを消失してしまうことがあった。   In this situation, as described in the background art, the driver 13 does not have a function of sequentially holding various information before the power is turned off. The driver 13 loses sight of various information before the power is turned off, such as which block was used before the power was turned off, and which address of the used block was accessed. In this case, after the power is turned on again, the driver 13 cannot execute the access to the block that has been used so far, and in some cases, the data written in the blocks 7 to 9 is lost. As a result, the data written in the blocks 7 to 9 may be lost.

しかし、本例の場合、図3に示すように、異常発生監視部16は、電源投入(電源再投入)の際、ドライバ13がフラッシュメモリ6へのアクセスに対して行き先を見失っていないか否かを確認することにより、アクセス異常の有無を見ている。なお、本例の異常発生監視部16は、ドライバ13が実際にフラッシュメモリ6にアクセスしに行って、一定時間の間にデータを読み込めるかどうかを見ることで、アクセス異常の有無を確認する。そして、異常発生監視部16は、一定時間内にブロック7〜9からデータを正常に読み取ることができれば、ドライバ13のアクセスに異常は発生していないと認識し、一方で一定時間を経てもブロック7〜9のデータを正常に読み取ることができなければ、ドライバ13のアクセスに異常が発生していると認識する。異常発生監視部16は、以上のアクセス異常有無の確認を行った後、この確認結果を保護処理部17に出力する。   However, in this example, as shown in FIG. 3, the abnormality occurrence monitoring unit 16 determines whether the driver 13 has lost sight of the destination for accessing the flash memory 6 when the power is turned on (power is turned on again). By checking whether or not there is an access abnormality. It should be noted that the abnormality occurrence monitoring unit 16 of this example confirms whether there is an access abnormality by checking whether the driver 13 actually accesses the flash memory 6 and can read data during a predetermined time. Then, if the abnormality occurrence monitoring unit 16 can normally read the data from the blocks 7 to 9 within a predetermined time, the abnormality occurrence monitoring unit 16 recognizes that no abnormality has occurred in the access of the driver 13, and on the other hand, the block does not stop even after a predetermined time. If the data of 7 to 9 cannot be read normally, it is recognized that an abnormality has occurred in the access of the driver 13. The abnormality occurrence monitoring unit 16 confirms the presence / absence of the access abnormality and outputs the confirmation result to the protection processing unit 17.

保護処理部17は、異常発生監視部16から確認結果を受け付けた際、これが異常無しの通知であれば、電源リセットによってコンピュータ5の電源が一時的に落ちた状況下であっても、電源再投入後のドライバ13はフラッシュメモリ6のアクセス先を保持できていると認識する。よって、このときは、ドライバ13が通常通りにブロック7〜9にアクセスしにいってもアクセスが可能であることから、保護処理部17は特別な対処は行わず、ドライバ13によるA〜Cのブロック7〜9へのデータ書き込み、データ読み取り、データ消去等の各種処理を、通常動作に沿ってドライバ13に実行させる。   When the protection processing unit 17 receives the confirmation result from the abnormality occurrence monitoring unit 16 and this is a notification that there is no abnormality, the protection processing unit 17 can restart the power supply even if the computer 5 is temporarily turned off due to a power reset. The inserted driver 13 recognizes that the access destination of the flash memory 6 can be held. Therefore, at this time, since the driver 13 can access the blocks 7 to 9 as usual, the access can be made, so the protection processing unit 17 does not take any special measures and Various processes such as data writing, data reading, and data erasing to the blocks 7 to 9 are executed by the driver 13 along the normal operation.

一方、保護処理部17は、異常発生監視部16から監視結果を受け付けた際、これが異常有りの通知であれば、ドライバ13によるフラッシュメモリ6へのアクセスに異常が発生して、ドライバ13がフラッシュメモリ6のアクセス先を見失ってしまっていると認識する。なお、このとき、場合によっては、電源リセットに伴ってA〜Dのブロック7〜10のうちローテーションブロック7〜9のデータが消失してしまうことがあるが、Dブロック10は値を書き換えない固定ブロック10として使用しているので、電源リセットによってローテーションブロック7〜9のデータが仮に飛んでも、この固定ブロック10に書き込まれているデータ群は保持される状態を保つ。   On the other hand, when the protection processing unit 17 receives the monitoring result from the abnormality occurrence monitoring unit 16, if this is a notification that there is an abnormality, an abnormality occurs in the access to the flash memory 6 by the driver 13, and the driver 13 flashes. It is recognized that the access destination of the memory 6 has been lost. At this time, in some cases, the data of the rotation blocks 7 to 9 among the blocks 7 to 10 of A to D may be lost due to the power reset, but the D block 10 is fixed so that the value is not rewritten. Since the block 10 is used, even if the data of the rotation blocks 7 to 9 are temporarily skipped by the power reset, the data group written in the fixed block 10 is maintained.

保護処理部17は、ドライバ13によるフラッシュメモリ6のアクセスに異常が発生したことを確認した際、図3に示すように固定ブロック10から車両1(操舵角検出装置3)が持つ製品固有値14やID1〜ID3等の初期値15を読み出すとともに、図4に示すようにこのときの読み出しデータを、最先使用に設定されたAブロック7の先頭に書き込むことにより、ブロック7内のデータを復旧する。なお、このデータ書き込み時、もし仮にAブロック7にデータが残っていたままの場合には、Aブロック7に消去処理を実行してAブロック7を空にしてから、復旧用のデータ書き込を実行する。   When the protection processing unit 17 confirms that an abnormality has occurred in the access to the flash memory 6 by the driver 13, as shown in FIG. 3, the product unique value 14 that the vehicle 1 (steering angle detection device 3) has from the fixed block 10 and The initial value 15 such as ID1 to ID3 is read, and the read data at this time is written at the head of the A block 7 set to be used first as shown in FIG. . When data is written, if data remains in the A block 7, an erasing process is executed on the A block 7 to empty the A block 7, and then data for recovery is written. Execute.

これにより、ドライバ13は電源リセットによって電源オフ前の使用ブロックやアクセス先アドレスが分からなくなっても、電源再投入時には最先使用のAブロック7に新たに書き込んだ製品固有値14や初期値15を読み取ることにより、電源再投入時において実行すべき動作を把握することが可能となる。よって、電源リセットを要因としてドライバ13がフラッシュメモリ6へのアクセス先を見失っても、ドライバ13は製品固有値14や初期値15というデフォルト値(初期動作情報)からではあるものの、動作の継続実行が可能となる。   As a result, the driver 13 reads the product specific value 14 and the initial value 15 that are newly written in the A block 7 that is used first when the power is turned on even if the used block and the access destination address before the power-off are not known due to the power reset. Thus, it is possible to grasp the operation to be executed when the power is turned on again. Therefore, even if the driver 13 loses sight of the access destination to the flash memory 6 due to the power reset, the driver 13 continues to execute the operation although it is from the default value (initial operation information) such as the product specific value 14 and the initial value 15. It becomes possible.

さて、本例においては、電源リセットを原因としてドライバ13がフラッシュメモリ6のアクセス先を見失うアクセス異常が発生しても、各種データを固定値として保持する固定ブロック10に保存された製品固有値14や初期値15をローテーションブロック7〜9に新たに書き込み、このデータ群によって次動作をドライバ13に把握させる。このため、電源リセットによりドライバ13がアクセス先を見失っても、ドライバ13は製品固有値14や初期値15によって次動作を継続実行することが可能となる。よって、電源リセットが発生した際に、ドライバ13が次動作を把握できずに停止してしまう状況が生じ難くなり、ひいてはアプリケーション11の異常停止の防止も図られる。   In this example, even if an access abnormality occurs in which the driver 13 loses sight of the access destination of the flash memory 6 due to a power reset, the product specific value 14 stored in the fixed block 10 that holds various data as fixed values, The initial value 15 is newly written in the rotation blocks 7 to 9, and the driver 13 is made aware of the next operation by this data group. For this reason, even if the driver 13 loses sight of the access destination due to the power reset, the driver 13 can continue to execute the next operation with the product specific value 14 and the initial value 15. Therefore, when the power supply reset occurs, it is difficult for the driver 13 to stop without knowing the next operation, thereby preventing the application 11 from being abnormally stopped.

本実施形態の構成によれば、以下に記載の効果を得ることができる。
(1)フラッシュメモリ6の複数のブロック7〜10の中の1つ(本例は、Dブロック10)を、ローテーションに使用しない固定ブロック10として使用し、この固定ブロック10に、アプリケーション11を動作させるのに最低限必要な初期動作情報として製品固有値14や初期値15を保存する。そして、電源リセット等によりドライバ13がアクセス先を見失った際には、固定ブロック10に保存された製品固有値14や初期値15をローテーションブロック7〜9に書き込み、これらデータによってドライバ13を継続動作させる。よって、一旦起動したコンピュータ5に電源リセットがかかっても、ドライバ13はアクセス先を把握可能となるので、ドライバ13の動作が停止してしまう状況を生じ難くすることができる。また、このようにドライバ13の動作確保を図ることが可能となれば、アプリケーション11の動作停止も生じ難くなる。
According to the configuration of the present embodiment, the following effects can be obtained.
(1) One of the plurality of blocks 7 to 10 of the flash memory 6 (D block 10 in this example) is used as a fixed block 10 that is not used for rotation, and the application 11 is operated on the fixed block 10. The product specific value 14 and the initial value 15 are stored as the minimum initial operation information required for the operation. When the driver 13 loses track of the access destination due to power reset or the like, the product specific value 14 and the initial value 15 stored in the fixed block 10 are written to the rotation blocks 7 to 9, and the driver 13 is continuously operated by these data. . Therefore, even if the computer 5 once activated is reset, the driver 13 can grasp the access destination, so that the situation in which the operation of the driver 13 is stopped can be made difficult to occur. If the operation of the driver 13 can be ensured in this way, the operation of the application 11 is hardly stopped.

(2)製品固有値14や初期値15の保存先としては、実施形態で述べたようなフラッシュメモリ6が持つ複数のブロック7〜10の1つを固定ブロック10としてこれを保存先とすることに限定されず、例えば図5に示すように、EEPROM(Electrically Erasable PROM))21を別途設けて、これに保存することも想定される。しかし、この場合は、EEPROM21用のドライバ22を別途用意しなくてはならないので、計2つのドライバ13,22が必要となり、その分だけデータ管理が煩雑化する問題が発生するが、本例の場合はこの種のドライバが1つのドライバ13で済むので、前述したデータ管理の煩雑さという問題は考えずに済む。また、本例のようにEEPROM21が不要となれば、その分だけROMに必要となるメモリ容量も削減することができる。   (2) As a storage destination of the product specific value 14 and the initial value 15, one of a plurality of blocks 7 to 10 included in the flash memory 6 as described in the embodiment is set as the fixed block 10 and is used as the storage destination. For example, as shown in FIG. 5, it is assumed that an EEPROM (Electrically Erasable PROM) 21 is separately provided and stored therein. However, in this case, since the driver 22 for the EEPROM 21 must be prepared separately, a total of two drivers 13 and 22 are required, and there is a problem that data management becomes complicated accordingly. In this case, since only one driver 13 is required for this type of driver, the above-described problem of data management is not considered. If the EEPROM 21 is not required as in this example, the memory capacity required for the ROM can be reduced accordingly.

(3)図5に示すように、製品固有値14や初期値15の保存先としてEEPROM21を使用した場合には、EEPROM21から読み取った製品固有値14や初期値15のデータを、ミドルウェア12を一旦介してからローテーション用のブロック7〜10に送る動作を経るので、データ転送においてミドルウェア12を経る分だけデータ処理時間が余計にかかる問題がある。しかし、本例の場合は、1つのドライバ13内で完結する処理であるので、ミドルウェア12を介さない分だけ、製品固有値14や初期値15のデータ処理速度を高速化することができる。   (3) As shown in FIG. 5, when the EEPROM 21 is used as the storage destination of the product unique value 14 and the initial value 15, the data of the product unique value 14 and the initial value 15 read from the EEPROM 21 are temporarily passed through the middleware 12. Therefore, there is a problem that extra data processing time is required for the data transfer through the middleware 12 in the data transfer. However, in the case of this example, since the process is completed within one driver 13, the data processing speed of the product specific value 14 and the initial value 15 can be increased by the amount not via the middleware 12.

(4)固定ブロック10に予め書き込んでおく初期動作情報は、製品が出荷されてからの実際の使用時において、上書きされることのない固定値として設定されている。このため、製品使用時に初期動作情報が間違った値に書き換えられる状況がなくなるので、初期動作情報の値を信頼度の高いものとすることができる。   (4) The initial operation information written in advance in the fixed block 10 is set as a fixed value that is not overwritten at the time of actual use after the product is shipped. For this reason, since there is no situation in which the initial operation information is rewritten to an incorrect value when the product is used, the value of the initial operation information can be made highly reliable.

なお、実施形態はこれまでに述べた構成に限らず、以下の態様に変更してもよい。
・ アクセス異常の検出方法は、ドライバ13がフラッシュメモリ6に対するアクセス先を見失っているか否かであることに限定されない。例えば、フラッシュメモリ6(ブロック7〜9)が空になっていることや、フラッシュメモリ6に書き込まれているデータそのものが化けてしまっていることを確認するものでもよい。
Note that the embodiment is not limited to the configuration described so far, and may be modified as follows.
The method for detecting an access abnormality is not limited to whether or not the driver 13 has lost sight of the access destination for the flash memory 6. For example, it may be confirmed that the flash memory 6 (blocks 7 to 9) is empty or that data written in the flash memory 6 has been garbled.

・ 初期動作情報は、前述した製品固有値14や初期値15に限定されず、ドライバ13が次動作の動作内容を知ることができれば、どのような種類のものでもよい。
・ フラッシュメモリ6に書き込まれるデータは、ID1〜ID3で示すイグニッションオン開始時刻、イグニッションオン実行時間、ステアリングアングルセンサのセンサ値に限定されず、操舵角検出装置3の動作時にやり取りされるデータであれば、どのようなものでもよい。
The initial operation information is not limited to the product specific value 14 or the initial value 15 described above, and may be any type as long as the driver 13 can know the operation content of the next operation.
The data written in the flash memory 6 is not limited to the ignition on start time, the ignition on execution time, and the sensor value of the steering angle sensor indicated by ID1 to ID3. Anything can be used.

・ ミドルウェア12は、必ずしも必要ではなく、これを省略してもよい。
・ フラッシュメモリ6のブロック数は、A〜Dの計4つに限定されず、これ以外の数をとるものでもよい。
The middleware 12 is not always necessary and may be omitted.
The number of blocks of the flash memory 6 is not limited to a total of four of A to D, and may take other numbers.

・ 固定ブロック10の個数は、必ずしも1つに限らず、ローテーションブロック7〜9の個数が少なく済むのであれば、2つ以上あってもよい。
・ アクセス異常時において初期動作情報を書き込むその書き込み先は、必ずしもAブロック7に限らず、例えばBブロック8やCブロック9としてもよい。
The number of the fixed blocks 10 is not necessarily limited to one, and may be two or more as long as the number of the rotation blocks 7 to 9 is small.
The write destination of the initial operation information when the access is abnormal is not necessarily limited to the A block 7, but may be the B block 8 or the C block 9, for example.

・ アクセス保護の機能を持つ本例のコンピュータ5は、必ずしも操舵角検出装置3に搭載されることに限らず、メモリとしてフラッシュメモリ6を持つコンピュータ5を備えたものであれば、特に限定されるものではない。   The computer 5 of this example having an access protection function is not limited to being mounted on the steering angle detection device 3 and is particularly limited as long as it includes the computer 5 having the flash memory 6 as a memory. It is not a thing.

次に、上記実施形態及び別例から把握できる技術的思想について、それらの効果とともに以下に追記する。
(1)請求項1又は2において、前記初期動作情報は、前記ブロックに書き込まれる検出値(測定値)の初期値である。この構成によれば、ドライバがフラッシュメモリ内の検出値にアクセスする際に、そのアクセスが停止してしまう状況を生じ難くすることが可能となる。
Next, technical ideas that can be grasped from the above-described embodiment and other examples will be described below together with their effects.
(1) In Claim 1 or 2, the initial operation information is an initial value of a detection value (measurement value) written in the block. According to this configuration, when the driver accesses the detection value in the flash memory, it is possible to make it difficult to cause a situation where the access stops.

(2)請求項1又は2において、前記初期動作情報は、前記フラッシュメモリの製品個々が持つ製品固有値である。この構成によれば、ドライバがフラッシュメモリ内の製品固有値にアクセスする際に、そのアクセスが停止してしまう状況を生じ難くすることが可能となる。   (2) In Claim 1 or 2, the initial operation information is a product-specific value possessed by each product of the flash memory. According to this configuration, when the driver accesses the product specific value in the flash memory, it is possible to make it difficult to cause a situation where the access stops.

6…フラッシュメモリ、7…ブロックを構成するAブロック、8…ブロックを構成するBブロック、9…ブロックを構成するCブロック、10ブロック(固定ブロック)を構成するDブロック、11…アプリケーション、13,22…ドライバ、14…初期動作情報を構成する製品固有値、15…初期動作情報を構成する初期値、16…監視手段としての異常発生監視部、17…保護実行手段としての保護処理部。   6 ... Flash memory, 7 ... A block constituting the block, 8 ... B block constituting the block, 9 ... C block constituting the block, 10 D block constituting the 10 block (fixed block), 11 ... Application, 13, DESCRIPTION OF SYMBOLS 22 ... Driver, 14 ... Product specific value which comprises initial operation information, 15 ... Initial value which comprises initial operation information, 16 ... Abnormality generation monitoring part as a monitoring means, 17 ... Protection processing part as a protection execution means.

Claims (3)

データ書き換え可能な不揮発性メモリとしてフラッシュメモリを使用し、アプリケーションからの書き込み指令によりドライバが前記フラッシュメモリにデータ書き込みを行う際、当該フラッシュメモリのメモリ領域を構築しつつデータ消去単位となっている複数のブロックを、順番にローテーションして使用しながらデータの読み書きを実行するフラッシュメモリの動作保護装置において、
複数の前記ブロックのうち前記ローテーションには使用されず、前記アプリケーションを動作させるのに最低限必要な初期動作情報が書き込まれた固定ブロックと、
前記フラッシュメモリに対する前記ドライバのアクセスに対して異常があるか否かを監視する監視手段と、
前記監視手段で前記異常を確認した際、前記固定ブロックに書き込んだ前記初期動作情報を前記ブロックに新たに書き込んで当該初期動作情報により前記ドライバを動作させることで、前記アクセスを継続させる保護実行手段と
を備えたことを特徴とするフラッシュメモリの動作保護装置。
When a flash memory is used as a rewritable nonvolatile memory and a driver writes data to the flash memory in response to a write command from an application, a plurality of data erasing units are constructed while building the memory area of the flash memory. In the operation protection device for flash memory that reads and writes data while using the blocks in turn,
Among the plurality of blocks, a fixed block that is not used for the rotation and in which initial operation information necessary for operating the application is written is written.
Monitoring means for monitoring whether there is an abnormality with respect to access of the driver to the flash memory;
Protection execution means for continuing the access by newly writing the initial operation information written in the fixed block to the block and operating the driver based on the initial operation information when the monitoring means confirms the abnormality. And a flash memory operation protection device.
前記初期動作情報は、前記フラッシュメモリの使用時において書き換えられることのない固定値であることを特徴とする請求項1に記載のフラッシュメモリの動作保護装置。   2. The flash memory operation protection device according to claim 1, wherein the initial operation information is a fixed value that is not rewritten when the flash memory is used. データ書き換え可能な不揮発性メモリとしてフラッシュメモリを使用し、アプリケーションからの書き込み指令によりドライバが前記フラッシュメモリにデータ書き込みを行う際、当該フラッシュメモリのメモリ領域を構築するデータ消去単位の複数のブロックを、順番にローテーションして使用しながら前記書き込みを実行するフラッシュメモリの動作保護方法において、
複数の前記ブロックのうち前記ローテーションには使用しないものを固定ブロックとして設け、前記アプリケーションを動作させるのに最低限必要な初期動作情報を当該固定ブロックに書き込み、前記フラッシュメモリに対するアクセスに対して異常があるか否かを監視手段で監視し、前記異常が発生した際、前記固定ブロックに書き込んだ前記初期動作情報を前記ブロックに新たに書き込んで当該初期動作情報により前記ドライバを動作させることで、前記アクセスを継続させることを特徴とするフラッシュメモリの動作保護方法。
When a flash memory is used as a data rewritable nonvolatile memory, and a driver writes data to the flash memory in accordance with a write command from an application, a plurality of blocks of data erasing units that construct the memory area of the flash memory In the operation protection method of the flash memory that executes the writing while rotating and using in order,
A plurality of the blocks that are not used for the rotation are provided as fixed blocks, and initial operation information necessary for operating the application is written to the fixed blocks, and there is an abnormality in access to the flash memory. By monitoring whether or not there is, when the abnormality occurs, the initial operation information written in the fixed block is newly written in the block and the driver is operated by the initial operation information, An operation protection method for a flash memory, characterized by continuing access.
JP2009015685A 2009-01-27 2009-01-27 Flash memory operation protection device and flash memory operation protection method Expired - Fee Related JP5486193B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009015685A JP5486193B2 (en) 2009-01-27 2009-01-27 Flash memory operation protection device and flash memory operation protection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009015685A JP5486193B2 (en) 2009-01-27 2009-01-27 Flash memory operation protection device and flash memory operation protection method

Publications (2)

Publication Number Publication Date
JP2010176200A true JP2010176200A (en) 2010-08-12
JP5486193B2 JP5486193B2 (en) 2014-05-07

Family

ID=42707153

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009015685A Expired - Fee Related JP5486193B2 (en) 2009-01-27 2009-01-27 Flash memory operation protection device and flash memory operation protection method

Country Status (1)

Country Link
JP (1) JP5486193B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08287697A (en) * 1995-04-18 1996-11-01 Nippondenso Co Ltd Memory device
JPH09282237A (en) * 1996-04-19 1997-10-31 Fujitsu General Ltd Storage device using eeprom
JPH10320984A (en) * 1997-05-15 1998-12-04 Sharp Corp Memory device
JPH11141391A (en) * 1997-11-06 1999-05-25 Hitachi Ltd Controller for automobile
JP2001154909A (en) * 1999-11-25 2001-06-08 Casio Comput Co Ltd Flash memory management device and recording medium
JP2001331382A (en) * 2000-05-19 2001-11-30 Matsushita Electric Ind Co Ltd Method and device for managing nonvolatile memory
JP2002041370A (en) * 2000-07-25 2002-02-08 Canon Inc Storage device and its control method
JP2003208352A (en) * 2002-01-17 2003-07-25 Fujitsu Ltd Flash memory enabling restriction of writing frequency and ware levelling
JP2004078907A (en) * 2002-06-20 2004-03-11 Tokyo Electron Device Ltd Storage device, memory management method, and program thereof
WO2004066157A1 (en) * 2003-01-22 2004-08-05 Fujitsu Limited Memory controller
JP2006072461A (en) * 2004-08-31 2006-03-16 Mitsubishi Electric Corp Onboard electronic control device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08287697A (en) * 1995-04-18 1996-11-01 Nippondenso Co Ltd Memory device
JPH09282237A (en) * 1996-04-19 1997-10-31 Fujitsu General Ltd Storage device using eeprom
JPH10320984A (en) * 1997-05-15 1998-12-04 Sharp Corp Memory device
JPH11141391A (en) * 1997-11-06 1999-05-25 Hitachi Ltd Controller for automobile
JP2001154909A (en) * 1999-11-25 2001-06-08 Casio Comput Co Ltd Flash memory management device and recording medium
JP2001331382A (en) * 2000-05-19 2001-11-30 Matsushita Electric Ind Co Ltd Method and device for managing nonvolatile memory
JP2002041370A (en) * 2000-07-25 2002-02-08 Canon Inc Storage device and its control method
JP2003208352A (en) * 2002-01-17 2003-07-25 Fujitsu Ltd Flash memory enabling restriction of writing frequency and ware levelling
JP2004078907A (en) * 2002-06-20 2004-03-11 Tokyo Electron Device Ltd Storage device, memory management method, and program thereof
WO2004066157A1 (en) * 2003-01-22 2004-08-05 Fujitsu Limited Memory controller
JP2006072461A (en) * 2004-08-31 2006-03-16 Mitsubishi Electric Corp Onboard electronic control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015225023A (en) * 2014-05-29 2015-12-14 日本電産サンキョー株式会社 Encoder

Also Published As

Publication number Publication date
JP5486193B2 (en) 2014-05-07

Similar Documents

Publication Publication Date Title
JP5202130B2 (en) Cache memory, computer system, and memory access method
TWI436369B (en) Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same
JP2010020586A (en) Data processing device
US10013343B2 (en) Apparatus and method of refreshing a memory area of a non-volatile memory unit used in an embedded system
JP2013222435A (en) Semiconductor storage device and method of controlling the same
JP2007287022A (en) Information storage method for electronic control device
TWI530954B (en) Apparatuses for securing software code stored in a non-volatile memory
JP5883284B2 (en) Semiconductor memory control device and control method
JP5486193B2 (en) Flash memory operation protection device and flash memory operation protection method
JP4661369B2 (en) Memory controller
US9778981B2 (en) Microcontroller
JP2010176201A (en) Data loss prevention device for flash memory, and data loss prevention method for flash memory
JP5983512B2 (en) Writing device
JP2008310896A (en) Nonvolatile memory device, nonvolatile memory system, and method for controlling nonvolatile memory device
JP4734582B2 (en) Non-volatile memory data update method, control device, and data update program
JP6040895B2 (en) Microcomputer and non-volatile memory block management method
JP6636930B2 (en) Microcomputer with built-in flash memory, method of writing data to flash memory built in microcontroller, and program for writing data to flash memory
JP2009116521A (en) Data rewriting method for memory
JP5520880B2 (en) Flash memory device
JP2012033222A (en) Semiconductor memory device and its control method
JP6241373B2 (en) Storage device, flash memory control device, and program
JP2008225922A (en) Nonvolatile storage device
JP2013003985A (en) Information processing apparatus, image forming apparatus, and program
JP2006139341A (en) Nonvolatile memory system
JP2005078489A (en) Microcontroller and its control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130709

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130807

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: 20140212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140221

R150 Certificate of patent or registration of utility model

Ref document number: 5486193

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees