[go: up one dir, main page]

JP2006085868A - Rewrite restriction method and semiconductor device - Google Patents

Rewrite restriction method and semiconductor device Download PDF

Info

Publication number
JP2006085868A
JP2006085868A JP2004271908A JP2004271908A JP2006085868A JP 2006085868 A JP2006085868 A JP 2006085868A JP 2004271908 A JP2004271908 A JP 2004271908A JP 2004271908 A JP2004271908 A JP 2004271908A JP 2006085868 A JP2006085868 A JP 2006085868A
Authority
JP
Japan
Prior art keywords
rewriting
area
nonvolatile memory
rewrite
program
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.)
Withdrawn
Application number
JP2004271908A
Other languages
Japanese (ja)
Inventor
Kenji Yoshida
賢司 吉田
Yoshihiko Koike
良彦 小池
Tetsuya Yoshida
哲也 吉田
Naoya Watanabe
尚哉 渡辺
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2004271908A priority Critical patent/JP2006085868A/en
Publication of JP2006085868A publication Critical patent/JP2006085868A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Read Only Memory (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve reliability of data by surely preventing rewriting in an area where the permissible number of rewriting times of a nonvolatile memory is exceeded, to effectively use the rewriting of the entire nonvolatile memory, and to make decision of an error in a writing process within a short period of time. <P>SOLUTION: In the rewrite limiting method of the electrically erasable nonvolatile memory, signals inhibiting the rewriting in the area when the number of rewriting times reaches a predetermined value are outputted to the respective areas of the nonvolatile memory. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、書換え制限方法及び半導体装置に係り、特に電気的に消去可能な不揮発性メモリの書換えを制限する制限回路及び書換え制限機能を備えた半導体装置に関する。   The present invention relates to a rewrite restriction method and a semiconductor device, and more particularly to a restriction circuit for restricting rewriting of an electrically erasable nonvolatile memory and a semiconductor device having a rewrite restriction function.

一般的に、不揮発性メモリには、書換え回数に制限があり、許容書換え回数を超えると、データを正しく書込むことが難しくなり、データの信頼性が著しく低下してしまう。このため、不揮発性メモリでは、書換え回数を監視する必要がある。不揮発性メモリ及びCPUからなる半導体装置の場合、書換え回数は、プログラムにより監視することができる。しかし、この場合、CPUが実行するべきプログラム数が増加してCPUへの負荷が増加するため、書換え回数の監視処理に時間がかかってしまう。   In general, a nonvolatile memory has a limit on the number of times of rewriting. If the number of times of rewriting exceeds the allowable number of times of rewriting, it becomes difficult to correctly write data, and the reliability of data is significantly lowered. For this reason, it is necessary to monitor the number of rewrites in the nonvolatile memory. In the case of a semiconductor device including a nonvolatile memory and a CPU, the number of rewrites can be monitored by a program. However, in this case, since the number of programs to be executed by the CPU increases and the load on the CPU increases, it takes time to monitor the number of rewrites.

特許文献1は、監視回路により不揮発性メモリの書換え回数をインクリメントし、インクリメント結果がリミット値に達すると、外部の制御装置に対して割り込み要求信号を出力するものである。   In Patent Literature 1, the number of times of rewriting of the nonvolatile memory is incremented by a monitoring circuit, and when the increment result reaches a limit value, an interrupt request signal is output to an external control device.

特許文献2は、外部の不揮発性メモリへの書換え回数をカウントし、リミット値に達すると警告を発生すると共に書換えを禁止するものである。   Patent Document 2 counts the number of times of rewriting to an external nonvolatile memory, generates a warning when the limit value is reached, and prohibits rewriting.

特許文献3は、不揮発性メモリの領域毎に書換え回数をカウントし、書換え回数の多い領域への書込みを、書換え回数の少ない領域への書込みに再配置したり、禁止したりするものである。   In Patent Document 3, the number of rewrites is counted for each area of the nonvolatile memory, and writing to an area with a large number of rewrites is rearranged or prohibited from being written to an area with a small number of rewrites.

特許文献4は、不揮発性メモリの特定領域への書換え頻度が高いと、他の領域への書換えに変換するものである。
特開平11−66869号公報 特開平10−64290号公報 特開2001−290792号公報 特開2000−20252号公報
In Patent Document 4, when the frequency of rewriting to a specific area of a nonvolatile memory is high, conversion to another area is performed.
Japanese Patent Laid-Open No. 11-66869 Japanese Patent Laid-Open No. 10-64290 JP 2001-290792 A JP 2000-20252 A

特許文献1では、割り込み要求信号を制御装置に出力することで不揮発性メモリへの書換えを禁止する構成であるため、リミット値に達した不揮発性メモリの書換えは、ハードウェアにより禁止されるわけではない。このため、例えば割り込みプログラムが誤った動作を行うと、リミット値に達した不揮発性メモリへの書込みが禁止されない場合があり、このような場合にはデータの信頼性が低下してしまう。   In Patent Document 1, since an interrupt request signal is output to a control device, rewriting to a non-volatile memory is prohibited, so rewriting of a non-volatile memory that reaches a limit value is not prohibited by hardware. Absent. For this reason, for example, if the interrupt program performs an incorrect operation, writing to the non-volatile memory that has reached the limit value may not be prohibited. In such a case, the reliability of the data is lowered.

特許文献2では、不揮発性メモリの書換え制限を領域毎に管理していないので、不揮発性メモリ全体の書換えを有効に利用できない。   In Patent Document 2, since the rewrite restriction of the nonvolatile memory is not managed for each area, rewriting of the entire nonvolatile memory cannot be effectively used.

特許文献3では、不揮発性メモリの領域毎に、書換え回数の少ない領域へのアドレス変換を行うため、アドレス変換処理に時間がかかってしまい、書込み処理でのエラー判定、即ち、書換えができないことが判明するまでに、時間がかかる。   In Patent Document 3, since address conversion is performed for each area of the nonvolatile memory to an area with a small number of rewrites, the address conversion process takes time, and error determination in the write process, that is, rewriting cannot be performed. It takes time to become clear.

特許文献4では、不揮発性メモリの特定領域への書換え頻度が高いと、他の領域への書換えに変換する処理を行うため、処理に時間がかかってしまい、書込み処理でのエラー判定までに時間がかかる。   In Patent Document 4, if the frequency of rewriting to a specific area of a nonvolatile memory is high, the process of converting to a rewrite to another area is performed, so that the process takes time, and it takes time to determine an error in the write process. It takes.

従って、従来は、不揮発性メモリの許容書換え回数を超えた領域の書換えを確実に防止してデータの信頼性を向上すると共に、不揮発性メモリ全体の書換えを有効に利用し、且つ、書込み処理でのエラー判定を短時間で行うことができないという問題があった。   Therefore, conventionally, the rewriting of the area exceeding the allowable number of times of rewriting of the nonvolatile memory is surely prevented to improve the reliability of the data, the rewriting of the entire nonvolatile memory is effectively used, and the writing process is performed. There is a problem that the error judgment cannot be performed in a short time.

そこで、本発明は、不揮発性メモリの許容書換え回数を超えた領域の書換えを確実に防止してデータの信頼性を向上すると共に、不揮発性メモリ全体の書換えを有効に利用し、且つ、書込み処理でのエラー判定を短時間で行うことができる書換え制限方法及び半導体装置を提供することを目的とする。   Therefore, the present invention reliably prevents rewriting of an area exceeding the allowable number of times of rewriting of the nonvolatile memory to improve data reliability, effectively uses rewriting of the entire nonvolatile memory, and performs write processing. An object of the present invention is to provide a rewrite restriction method and a semiconductor device capable of performing error determination in a short time.

上記の課題は、電気的に消去可能な不揮発性メモリの書換え制限方法であって、該不揮発性メモリの各領域に対して、書換え回数が所定値に達すると当該領域の書換えを禁止する信号を出力するステップを含むことを特徴とする書換え制限方法によって達成できる。   The above problem is a method for restricting rewriting of an electrically erasable non-volatile memory, and for each area of the non-volatile memory, when a rewrite count reaches a predetermined value, a signal for prohibiting rewriting of the area is issued. This can be achieved by a rewriting restriction method including an output step.

上記の課題は、電気的に消去可能な不揮発性メモリの書換え制限方法であって、該不揮発性メモリの各領域に対して、書換え回数が所定値に達していないと書換えプログラムを実行して当該領域の書換えを行い、書換え回数が所定値に達すると警告プログラムを実行すると共に当該領域の書換えを禁止するステップを含むことを特徴とする書換え制限方法によっても達成できる。   The above-described problem is a method for restricting rewriting of an electrically erasable nonvolatile memory, and when the number of times of rewriting has not reached a predetermined value for each area of the nonvolatile memory, This can also be achieved by a rewrite restriction method that includes a step of rewriting an area and executing a warning program when the number of rewrites reaches a predetermined value and prohibiting rewriting of the area.

上記の課題は、電気的に消去可能な複数の領域からなる不揮発性メモリと、各領域の書換え回数を監視して保持するカウンタ部と、各領域に対して、書換え回数が所定値に達すると当該領域の書換えを禁止する禁止信号を出力する信号発生回路とを備え、該不揮発性メモリの当該領域の書換えは該禁止信号に基づいて禁止されることを特徴とする半導体装置によっても達成できる。   The above-described problems include a nonvolatile memory composed of a plurality of electrically erasable areas, a counter unit that monitors and holds the number of rewrites in each area, and when the number of rewrites reaches a predetermined value for each area. And a signal generation circuit that outputs a prohibition signal for prohibiting rewriting of the area, and rewriting of the area of the nonvolatile memory is prohibited based on the prohibition signal.

本発明によれば、不揮発性メモリの許容書換え回数を超えた領域の書換えを確実に防止してデータの信頼性を向上すると共に、不揮発性メモリ全体の書換えを有効に利用し、且つ、書込み処理でのエラー判定を短時間で行うことができる書換え制限方法及び半導体装置を実現することができる。   According to the present invention, it is possible to reliably prevent rewriting of an area exceeding the allowable number of times of rewriting of the nonvolatile memory to improve data reliability, to effectively use rewriting of the entire nonvolatile memory, and to perform writing processing. Thus, it is possible to realize a rewrite restriction method and a semiconductor device that can perform error determination in a short time.

以下に、本発明になる書換え制限方法及び本発明になる半導体装置の実施例を、図面と共に説明する。   Embodiments of a rewrite restriction method according to the present invention and a semiconductor device according to the present invention will be described below with reference to the drawings.

尚、以下の説明で、「書換え」とは、消去を含むものとする。従って、以下の説明でデータ書換えコマンドに基づくデータの書換えとは、データ消去コマンドに基づくデータの消去であっても良い。   In the following description, “rewrite” includes erasure. Therefore, in the following description, data rewriting based on the data rewriting command may be erasing data based on the data erasing command.

図1は、本発明になる半導体装置の一実施例を示すブロック図である。半導体装置の本実施例は、本発明になる書換え制限方法の一実施例を採用する。本実施例では、本発明が1チップマイクロコンピュータ(マイコン)に適用されているが、本発明はこれに限定されるものではない。   FIG. 1 is a block diagram showing an embodiment of a semiconductor device according to the present invention. This embodiment of the semiconductor device employs an embodiment of the rewrite limiting method according to the present invention. In this embodiment, the present invention is applied to a one-chip microcomputer (microcomputer), but the present invention is not limited to this.

図1に示す1チップマイコン1は、バス3で接続されたCPU2、監視回路4、インタフェース(I/F)部11及び不揮発性メモリ15からなる。監視回路4は、カウンタ部5、書換え制限回数設定用レジスタ部6、比較部7、信号発生回路8及び書換え制限回数超過表示レジスタ部9を有する。I/F部11は、切替えスイッチ12,16を有する。不揮発性メモリ15は、複数の領域からなり、本実施例では、書換えプログラムを格納するプログラム領域13と、警告プログラムを格納するプログラム領域14と、複数のアクセス領域R1〜R5からなる。図1では、説明の便宜上5つのアクセス領域R1〜R5が図示されているが、アクセス領域の数は任意に設定可能である。   A one-chip microcomputer 1 shown in FIG. 1 includes a CPU 2, a monitoring circuit 4, an interface (I / F) unit 11, and a nonvolatile memory 15 connected by a bus 3. The monitoring circuit 4 includes a counter unit 5, a rewrite limit number setting register unit 6, a comparison unit 7, a signal generation circuit 8, and a rewrite limit number excess display register unit 9. The I / F unit 11 includes changeover switches 12 and 16. The non-volatile memory 15 includes a plurality of areas, and in this embodiment, includes a program area 13 that stores a rewrite program, a program area 14 that stores a warning program, and a plurality of access areas R1 to R5. In FIG. 1, for convenience of explanation, five access areas R1 to R5 are shown, but the number of access areas can be arbitrarily set.

本実施例では、不揮発性メモリ15が1つの場合について説明するが、2以上の不揮発性メモリが設けられていても良いことは、言うまでもない。又、プログラム領域13,14は、同じ不揮発性メモリ内に設けられている必要はなく、互いに異なる不揮発性メモリ内に設けられていても良い。更に、本実施例では、各アクセス領域R1〜R5は固定長であるが、可変長としても良い。   In the present embodiment, the case where there is one nonvolatile memory 15 will be described, but it goes without saying that two or more nonvolatile memories may be provided. The program areas 13 and 14 need not be provided in the same nonvolatile memory, and may be provided in different nonvolatile memories. Furthermore, in the present embodiment, each of the access areas R1 to R5 has a fixed length, but may have a variable length.

本実施例では、不揮発性メモリ15が5つのアクセス領域R1〜R5を有するので、カウンタ部5は対応する5つのカウンタC1〜C5からなり、書換え制限回数超過表示レジスタ部9は対応する5つのレジスタr1〜r5からなる。   In this embodiment, since the nonvolatile memory 15 has five access areas R1 to R5, the counter unit 5 is composed of the corresponding five counters C1 to C5, and the rewrite limit count excess display register unit 9 is the corresponding five registers. It consists of r1-r5.

尚、本発明の要旨と直接関係がないので図1においてその図示は省略するが、CPU2には1チップマイコン1の外部と接続可能なインターフェース部が接続されている。このインタフェース部は、I/F部11と兼用されるものであっても良い。   Although not shown in FIG. 1 because it is not directly related to the gist of the present invention, an interface unit that can be connected to the outside of the one-chip microcomputer 1 is connected to the CPU 2. This interface unit may also be used as the I / F unit 11.

監視回路4は、CPU2からバス3を介してI/F部11に送られるデータ書換えコマンドを監視する。監視回路4のカウンタ部5は、不揮発性メモリ15の各アクセス領域R1〜R5に対して書換えが行われる毎に書換え回数をカウントしてカウント値を対応するカウンタC1〜C5に保持する。書換え制限回数設定レジスタ部6には、不揮発性メモリ15の各領域R1〜R5に対する共通の書換え制限回数が予め設定されている。比較部7は、バス3を介して得られる不揮発性メモリ15の書込みアドレス(書換えアドレス)で示されるアクセス領域に対応するカウンタ部5のカウンタに保持されているカウント値と書換え制限回数設定レジスタ部6に設定されている書換え制限回数とを比較し、比較結果が等しい時は書換え制限回数超過表示レジスタ部9の対応するレジスタにフラグをセットする。   The monitoring circuit 4 monitors a data rewrite command sent from the CPU 2 to the I / F unit 11 via the bus 3. The counter unit 5 of the monitoring circuit 4 counts the number of times of rewriting every time the access areas R1 to R5 of the nonvolatile memory 15 are rewritten, and holds the count values in the corresponding counters C1 to C5. In the rewrite limit number setting register unit 6, a common rewrite limit number for each of the regions R1 to R5 of the nonvolatile memory 15 is set in advance. The comparison unit 7 includes a count value held in a counter of the counter unit 5 corresponding to an access area indicated by a write address (rewrite address) of the nonvolatile memory 15 obtained via the bus 3 and a rewrite limit number setting register unit. 6 is compared with the rewrite limit number set to 6, and when the comparison results are equal, a flag is set in the corresponding register of the rewrite limit number excess display register unit 9.

書換え時には、信号発生回路8は、バス3を介して得られる書込みアドレス(書換えアドレス)を読み取り、書換え制限回数超過表示レジスタ部9内のレジスタにセットされたフラグが示すアクセス領域と一致した場合、書込み禁止信号10をI/F部11に出力する。書込み禁止信号10は、I/F部11内の切替えスイッチ12,16に入力される。   At the time of rewriting, when the signal generation circuit 8 reads the write address (rewrite address) obtained via the bus 3 and matches the access area indicated by the flag set in the register in the rewrite limit number excess display register unit 9, The write inhibit signal 10 is output to the I / F unit 11. The write inhibit signal 10 is input to the changeover switches 12 and 16 in the I / F unit 11.

バス3を介して得られる書込みアドレスが、書換え制限回数超過表示レジスタ部9内のレジスタにセットされたフラグが示すアクセス領域と一致しない場合、書込みアドレスへの書換えが可能であり、信号発生回路8は書込み禁止信号10を出力しない。つまり、信号発生回路8からI/F部11へは、書込みを禁止する信号は出力されない。この場合、切替えスイッチ16は、書込み禁止信号10を入力されないので、書込みアドレスに対する書込み許可信号WEXを不揮発性メモリ15に出力する。又、切替えスイッチ12は、書込み禁止信号10を入力されないので、不揮発性メモリ15のプログラム領域13から書換えを行うための書換えプログラムを読み出すよう切替え制御され、CPU2は書換えプログラムを実行して書込みアドレスへの書換えを行う。   When the write address obtained via the bus 3 does not coincide with the access area indicated by the flag set in the register within the rewrite limit count display register unit 9, rewriting to the write address is possible, and the signal generating circuit 8 Does not output the write inhibit signal 10. That is, a signal for prohibiting writing is not output from the signal generation circuit 8 to the I / F unit 11. In this case, the changeover switch 16 does not receive the write inhibit signal 10, and therefore outputs the write enable signal WEX for the write address to the nonvolatile memory 15. Further, since the changeover switch 12 is not input with the write prohibition signal 10, the changeover control is performed so that the rewrite program for rewriting is read from the program area 13 of the nonvolatile memory 15, and the CPU 2 executes the rewrite program to the write address. Rewrite.

他方、信号発生回路8からI/F部11へ書込み禁止信号10が出力されると、切替えスイッチ16は、書込み禁止信号10に応答して、書込みアドレスに対する書込み許可信号WEXの不揮発性メモリ15への出力を停止する。これにより、書込みアドレスへの書換えは禁止される。又、切替えスイッチ12は、書込み禁止信号10に応答して、不揮発性メモリ15のプログラム領域14から警告プログラムを読み出すよう切替え制御され、CPU2は警告プログラムを実行して任意のエラー処理等を行い、書込みアドレスに対する書換えは行われない。   On the other hand, when the write inhibit signal 10 is output from the signal generation circuit 8 to the I / F unit 11, the changeover switch 16 responds to the write inhibit signal 10 to the nonvolatile memory 15 of the write enable signal WEX for the write address. Stop the output of. As a result, rewriting to the write address is prohibited. Further, the changeover switch 12 is controlled so as to read out the warning program from the program area 14 of the non-volatile memory 15 in response to the write inhibit signal 10, and the CPU 2 executes the warning program to perform arbitrary error processing, etc. Rewriting to the write address is not performed.

図2は、半導体装置の動作を説明するフローチャートである。図2において、ステップS1では、CPU2が外部要求に応答して不揮発性メモリ15に対する書込みを許可する。ステップS2では、CPU2が許可した書込みに基づいて、周知の書込みコマンドシーケンスを行い、データ書込みコマンド、書込みアドレス及び書込みデータを出力する。説明の便宜上、ここではデータ書換えコマンドがデータ書込みコマンドとして出力されるものとする。   FIG. 2 is a flowchart for explaining the operation of the semiconductor device. In FIG. 2, in step S1, the CPU 2 permits writing to the nonvolatile memory 15 in response to an external request. In step S2, a known write command sequence is performed based on the writing permitted by the CPU 2, and a data write command, a write address, and write data are output. For convenience of explanation, it is assumed here that a data rewrite command is output as a data write command.

ステップS3では、監視回路4が書き込みアドレスに基づいて、カウンタ部5に保持されている書換え領域の書換え回数のカウント値が、書換え制限回数設定用レジスタ6に設定されている書換え制限回数を超えているか否かを比較部7により判定する。ステップS3の判定結果がNOであると、信号発生回路8からは書込み禁止信号10が出力されないので、ステップS4では、切替えスイッチ12は書換えプログラムを不揮発性メモリ15のプログラム領域13から読み出すように切替え制御され、切替えスイッチ16は書込みアドレスに対する書込み許可信号WEXを不揮発性メモリ15に出力するよう切替え制御されるので、書込みアドレスへの書換えは許可される。ステップS5では、CPU2が書換えプログラムを実行して書込みアドレスへの書換えを行う書込み処理を行う。   In step S3, based on the write address, the monitoring circuit 4 exceeds the rewrite limit count set in the rewrite limit count setting register 6 so that the count value of the rewrite area held in the counter unit 5 exceeds the rewrite limit count setting register 6. The comparison unit 7 determines whether or not it exists. If the determination result in step S3 is NO, the signal prohibition signal 10 is not output from the signal generation circuit 8. Therefore, in step S4, the changeover switch 12 switches to read the rewrite program from the program area 13 of the nonvolatile memory 15. Thus, the changeover switch 16 is controlled to output the write permission signal WEX for the write address to the nonvolatile memory 15, so that the rewrite to the write address is permitted. In step S5, the CPU 2 executes a rewriting program and performs a writing process for rewriting to a write address.

ステップS6では、CPU2が書込み処理の最終アドレスに達したか否かを判定し、判定結果がNOであると、ステップS7で次のアドレスへ移り、処理はステップS2へ戻る。他方、ステップS6の判定結果がYESであると、処理は終了する。   In step S6, the CPU 2 determines whether or not the final address of the writing process has been reached. If the determination result is NO, the process proceeds to the next address in step S7, and the process returns to step S2. On the other hand, the process ends if the decision result in the step S6 is YES.

ステップS3の判定結果がYESであると、処理ST1及びST2が行われる。処理ST1は、ステップS8からなる。処理ST2は、ステップS11〜S13からなる。   If the decision result in the step S3 is YES, the processes ST1 and ST2 are performed. Process ST1 consists of step S8. The process ST2 includes steps S11 to S13.

処理ST1において、切替えスイッチ12は書込み禁止信号10に応答して不揮発性メモリ15のプログラム領域14から警告プログラムを読み出すよう切替え制御されるので、CPU2はステップS8で警告プログラムを実行して任意のエラー処理等のソフトウェア処理を行い、書込みアドレスに対する書換えは行われない。   In process ST1, since the changeover switch 12 is controlled to read out the warning program from the program area 14 of the non-volatile memory 15 in response to the write inhibit signal 10, the CPU 2 executes the warning program in step S8 and executes any error. Software processing such as processing is performed, and rewriting to the write address is not performed.

処理ST2において、ステップS11では、切替えスイッチ16が書込み禁止信号10に応答して書込みアドレスに対する書込み許可信号WEXの不揮発性メモリ15への出力を停止するので、書込みアドレスへの書換えは禁止される。ステップS12では、CPU2がデータポーリングを行い、タイムオーバーによるエラー(タイムオーバーエラー)が発生したか否かをソフトウェアにより判定する。データポーリングを行って所定時間内に書込みデータが不揮発性メモリ15に書込めない場合、ステップS13では、CPU2が書込みエラーが発生したことを認識し、任意のエラー処理等のソフトウェア処理を行う。   In process ST2, in step S11, the changeover switch 16 stops outputting the write permission signal WEX for the write address to the nonvolatile memory 15 in response to the write prohibition signal 10, so that rewriting to the write address is prohibited. In step S12, the CPU 2 performs data polling and determines by software whether an error due to time over (time over error) has occurred. When data polling is performed and write data cannot be written to the nonvolatile memory 15 within a predetermined time, in step S13, the CPU 2 recognizes that a write error has occurred and performs software processing such as arbitrary error processing.

書込み禁止信号10が出力されると、切替えスイッチ12が切替え制御されて警告プログラムが実行されるので、書込み動作が行なわれない。従って、例えば警告プログラムがエラー処理へジャンプするものであれば、処理ST2を待たずにエラー処理を行うことができ、エラー判定の時間が短縮される。   When the write inhibit signal 10 is output, the changeover switch 12 is controlled to be switched and the warning program is executed, so that the write operation is not performed. Therefore, for example, if the warning program jumps to error processing, error processing can be performed without waiting for the processing ST2, and the time for error determination is shortened.

このように、本実施例では、書込み禁止信号10により不揮発性メモリ15の許容書換え回数を超えた領域の書換えを確実に防止するので、データの信頼性を向上することができると共に、不揮発性メモリ15全体の書換えを有効に利用することができる。又、書換え回数の少ない領域へのアドレス変換や、特定領域への書換え頻度が高いと他の領域への書換えに変換する処理を行わないので、書込み処理でのエラー判定を短時間で行うことができる。   As described above, in this embodiment, the rewrite of the area exceeding the allowable number of rewrites of the nonvolatile memory 15 is reliably prevented by the write inhibit signal 10, so that the reliability of data can be improved and the nonvolatile memory can be improved. The entire 15 rewrites can be used effectively. Also, address conversion to an area with a small number of rewrites or processing to convert to another area when the frequency of rewriting to a specific area is high is not performed, so error determination in the writing process can be performed in a short time. it can.

更に、処理ST1において警告プログラムがエラー処理へジャンプするものであれば、処理ST2を待たずにエラー処理を行うことができるので、エラー判定の時間を更に短縮可能となる。   Furthermore, if the warning program jumps to the error process in the process ST1, the error process can be performed without waiting for the process ST2, so that the error determination time can be further shortened.

上記実施例において、監視回路4の少なくとも一部の機能を、CPU2により実現するようにしても良い。同様に、I/F部11の少なくとも一部の機能を、CPU2にとり実現するようにしても良い。   In the above embodiment, at least a part of the functions of the monitoring circuit 4 may be realized by the CPU 2. Similarly, at least some of the functions of the I / F unit 11 may be realized by the CPU 2.

又、書換え制限回数設定用レジスタ6及び/又は書換え制限回数超過表示レジスタ9の機能を、監視回路4側ではなく、不揮発性メモリ15側に設けても良い。   The functions of the rewrite limit count setting register 6 and / or the rewrite limit count excess display register 9 may be provided not on the monitoring circuit 4 side but on the nonvolatile memory 15 side.

本発明は、以下に付記する発明をも包含するものである。
(付記1) 電気的に消去可能な不揮発性メモリの書換え制限方法であって、
該不揮発性メモリの各領域に対して、書換え回数が所定値に達すると当該領域の書換えを禁止する信号を出力するステップを含むことを特徴とする、書換え制限方法。
(付記2) 電気的に消去可能な不揮発性メモリの書換え制限方法であって、
該不揮発性メモリの各領域に対して、書換え回数が所定値に達していないと書換えプログラムを実行して当該領域の書換えを行い、書換え回数が所定値に達すると警告プログラムを実行すると共に当該領域の書換えを禁止するステップを含むことを特徴とする、書換え制限方法。
(付記3) 前記書換えプログラム及び前記警告プログラムは、前記不揮発性メモリのプログラム領域に格納されていることを特徴とする、付記2記載の書換え制限方法。
(付記4) 前記ステップは、前記不揮発性メモリの当該領域に対して書込み禁止信号を出力することを特徴とする、付記1又は2記載の書換え制限方法。
(付記5) 電気的に消去可能な複数の領域からなる不揮発性メモリと、
各領域の書換え回数を監視して保持するカウンタ部と、
各領域に対して、書換え回数が所定値に達すると当該領域の書換えを禁止する禁止信号を出力する信号発生回路とを備え、
該不揮発性メモリの当該領域の書換えは該禁止信号に基づいて禁止されることを特徴とする、半導体装置。
(付記6) CPUを更に備え、
前記不揮発性メモリは書換えプログラム及び警告プログラムを格納するプログラム領域を含み、
該CPUは、該不揮発性メモリの各領域に対して、書換え回数が前記所定値に達していないと該書換えプログラムを実行して当該領域の書換えを行い、書換え回数が該所定値に達すると該警告プログラムを実行することを特徴とする、付記5記載の半導体装置。
(付記7) 前記書換えプログラム及び前記警告プログラムは、同じ不揮発性メモリ又は互いに異なる不揮発性メモリのプログラム領域に格納されていることを特徴とする、付記6記載の半導体装置。
(付記8) 前記禁止信号が入力されるインタフェース部を更に備え、
該インタフェース部は、該禁止信号に応答して前記CPUが実行する前記書換えプログラムと前記警告プログラムの切替えを行う第1のスイッチと、該禁止信号に応答して前記不揮発性メモリの各領域の書換えと書換えの禁止の切替えを行う第2のスイッチを有することを特徴とする、付記6又は7記載の半導体装置。
(付記9) 前記カウンタ部、前記信号発生回路及び前記インタフェース部の少なくとも1つは、前記CPUにより実現されることを特徴とする、付記8記載の半導体装置。
(付記10) 前記カウンタ部及び前記信号発生回路の少なくとも一方は、前記CPUにより実現されることを特徴とする、付記6〜8のいずれか1項記載の半導体装置。
(付記11) 前記警告プログラムは、前記CPUによるエラー処理へジャンプするプログラムであることを特徴とする、付記6〜10のいずれか1項記載の半導体装置。
(付記12) 前記不揮発性メモリ、前記カウンタ部、前記信号発生回路及び前記CPUは、単一チップ内に設けられていることを特徴とする、付記6〜11のいずれか1項記載の半導体装置。
The present invention includes the inventions appended below.
(Appendix 1) A method for restricting rewriting of an electrically erasable nonvolatile memory,
A method for restricting rewriting, comprising a step of outputting a signal for prohibiting rewriting of each area when the number of times of rewriting reaches a predetermined value for each area of the nonvolatile memory.
(Appendix 2) A method for restricting rewriting of an electrically erasable nonvolatile memory,
For each area of the non-volatile memory, if the number of rewrites has not reached the predetermined value, the rewrite program is executed to rewrite the area. When the number of rewrites reaches the predetermined value, the warning program is executed and the area is rewritten. A rewriting restriction method comprising a step of prohibiting rewriting of
(Supplementary note 3) The rewrite restriction method according to supplementary note 2, wherein the rewrite program and the warning program are stored in a program area of the nonvolatile memory.
(Additional remark 4) The rewriting restriction | limiting method of Additional remark 1 or 2 characterized by the above-mentioned step outputting a write prohibition signal with respect to the said area | region of the said non-volatile memory.
(Supplementary Note 5) Non-volatile memory composed of a plurality of electrically erasable areas;
A counter unit that monitors and holds the number of rewrites in each area;
For each area, a signal generation circuit that outputs a prohibition signal for prohibiting rewriting of the area when the number of times of rewriting reaches a predetermined value,
A semiconductor device, wherein rewriting of the area of the nonvolatile memory is prohibited based on the prohibition signal.
(Supplementary Note 6) A CPU is further provided.
The nonvolatile memory includes a program area for storing a rewrite program and a warning program,
The CPU executes the rewriting program for each area of the non-volatile memory when the number of rewrites does not reach the predetermined value, and rewrites the area, and when the number of rewrites reaches the predetermined value, 6. The semiconductor device according to appendix 5, wherein a warning program is executed.
(Supplementary note 7) The semiconductor device according to supplementary note 6, wherein the rewriting program and the warning program are stored in a program area of the same nonvolatile memory or different nonvolatile memories.
(Additional remark 8) It further has an interface part into which the prohibition signal is inputted,
The interface unit includes a first switch for switching between the rewriting program executed by the CPU and the warning program in response to the prohibition signal, and rewriting each area of the nonvolatile memory in response to the prohibition signal. The semiconductor device according to appendix 6 or 7, further comprising a second switch for switching over prohibition of rewriting.
(Supplementary note 9) The semiconductor device according to supplementary note 8, wherein at least one of the counter unit, the signal generation circuit, and the interface unit is realized by the CPU.
(Additional remark 10) At least one of the said counter part and the said signal generation circuit is implement | achieved by the said CPU, The semiconductor device of any one of additional marks 6-8 characterized by the above-mentioned.
(Additional remark 11) The said warning program is a program which jumps to the error processing by said CPU, The semiconductor device of any one of additional marks 6-10 characterized by the above-mentioned.
(Supplementary Note 12) The semiconductor device according to any one of Supplementary Notes 6 to 11, wherein the nonvolatile memory, the counter unit, the signal generation circuit, and the CPU are provided in a single chip. .

以上、本発明を実施例により説明したが、本発明は上記実施例に限定されるものではなく、種々の変形及び改良が可能であることは、言うまでもない。   As mentioned above, although this invention was demonstrated by the Example, this invention is not limited to the said Example, It cannot be overemphasized that various deformation | transformation and improvement are possible.

本発明になる半導体装置の一実施例を示すブロック図である。It is a block diagram which shows one Example of the semiconductor device which becomes this invention. 半導体装置の動作を説明するフローチャートである。3 is a flowchart illustrating an operation of a semiconductor device.

符号の説明Explanation of symbols

1 マイコン
2 CPU
4 監視回路
5 カウンタ部
6 書換え制限回数設定用レジスタ
7 比較部
8 信号発生回路
9 書換え制限回数超過表示レジスタ
11 I/F部
12,16 切替えスイッチ
15 不揮発性メモリ
1 Microcomputer 2 CPU
4 Monitoring circuit 5 Counter unit 6 Rewrite limit count setting register 7 Comparison unit 8 Signal generation circuit 9 Rewrite limit count excess display register 11 I / F units 12, 16 Changeover switch 15 Non-volatile memory

Claims (5)

電気的に消去可能な不揮発性メモリの書換え制限方法であって、
該不揮発性メモリの各領域に対して、書換え回数が所定値に達すると当該領域の書換えを禁止する信号を出力するステップを含むことを特徴とする、書換え制限方法。
A method for restricting rewriting of electrically erasable nonvolatile memory,
A method for restricting rewriting, comprising a step of outputting a signal for prohibiting rewriting of each area when the number of times of rewriting reaches a predetermined value for each area of the nonvolatile memory.
電気的に消去可能な不揮発性メモリの書換え制限方法であって、
該不揮発性メモリの各領域に対して、書換え回数が所定値に達していないと書換えプログラムを実行して当該領域の書換えを行い、書換え回数が所定値に達すると警告プログラムを実行すると共に当該領域の書換えを禁止するステップを含むことを特徴とする、書換え制限方法。
A method for restricting rewriting of electrically erasable nonvolatile memory,
If the number of rewrites does not reach the predetermined value for each area of the nonvolatile memory, the rewrite program is executed to rewrite the area, and when the number of rewrites reaches the predetermined value, the warning program is executed and the area is rewritten. A rewriting restriction method comprising a step of prohibiting rewriting of
電気的に消去可能な複数の領域からなる不揮発性メモリと、
各領域の書換え回数を監視して保持するカウンタ部と、
各領域に対して、書換え回数が所定値に達すると当該領域の書換えを禁止する禁止信号を出力する信号発生回路とを備え、
該不揮発性メモリの当該領域の書換えは該禁止信号に基づいて禁止されることを特徴とする、半導体装置。
A nonvolatile memory composed of a plurality of electrically erasable areas;
A counter unit that monitors and holds the number of rewrites in each area;
For each area, a signal generation circuit that outputs a prohibition signal that prohibits rewriting of the area when the number of times of rewriting reaches a predetermined value,
A semiconductor device, wherein rewriting of the area of the nonvolatile memory is prohibited based on the prohibition signal.
CPUを更に備え、
前記不揮発性メモリは書換えプログラム及び警告プログラムを格納するプログラム領域を含み、
該CPUは、該不揮発性メモリの各領域に対して、書換え回数が前記所定値に達していないと該書換えプログラムを実行して当該領域の書換えを行い、書換え回数が該所定値に達すると該警告プログラムを実行することを特徴とする、請求項3記載の半導体装置。
A CPU;
The nonvolatile memory includes a program area for storing a rewrite program and a warning program,
The CPU executes the rewrite program for each area of the non-volatile memory when the number of rewrites does not reach the predetermined value, and rewrites the area, and when the number of rewrites reaches the predetermined value, 4. The semiconductor device according to claim 3, wherein a warning program is executed.
前記カウンタ部及び前記信号発生回路の少なくとも一方は、前記CPUにより実現されることを特徴とする、請求項4記載の半導体装置。
The semiconductor device according to claim 4, wherein at least one of the counter unit and the signal generation circuit is realized by the CPU.
JP2004271908A 2004-09-17 2004-09-17 Rewrite restriction method and semiconductor device Withdrawn JP2006085868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004271908A JP2006085868A (en) 2004-09-17 2004-09-17 Rewrite restriction method and semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004271908A JP2006085868A (en) 2004-09-17 2004-09-17 Rewrite restriction method and semiconductor device

Publications (1)

Publication Number Publication Date
JP2006085868A true JP2006085868A (en) 2006-03-30

Family

ID=36164206

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004271908A Withdrawn JP2006085868A (en) 2004-09-17 2004-09-17 Rewrite restriction method and semiconductor device

Country Status (1)

Country Link
JP (1) JP2006085868A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011081754A (en) * 2009-10-09 2011-04-21 Chiba Univ Recording device
JP2014029737A (en) * 2013-11-13 2014-02-13 Chiba Univ Storage device
JP2018180792A (en) * 2017-04-07 2018-11-15 株式会社リコー INFORMATION PROCESSING SYSTEM, INFORMATION PROCESSING METHOD, PROGRAM, AND INFORMATION PROCESSING APPARATUS

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59162695A (en) * 1983-03-07 1984-09-13 Nec Corp Storage device
JPS6282600A (en) * 1985-10-08 1987-04-16 Nitto Kohki Co Ltd Memory device capable of electrically erasing and writing
JPS63187499A (en) * 1987-01-30 1988-08-03 Toshiba Corp Management system for number of times of memory rewrite
JPH05325593A (en) * 1992-05-27 1993-12-10 Sharp Corp Flash type EEPROM management device
JPH11232885A (en) * 1998-02-10 1999-08-27 Oki Micro Design Miyazaki Co Ltd Semiconductor memory
JPH11283380A (en) * 1998-03-27 1999-10-15 Victor Co Of Japan Ltd Writing method for flash memory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59162695A (en) * 1983-03-07 1984-09-13 Nec Corp Storage device
JPS6282600A (en) * 1985-10-08 1987-04-16 Nitto Kohki Co Ltd Memory device capable of electrically erasing and writing
JPS63187499A (en) * 1987-01-30 1988-08-03 Toshiba Corp Management system for number of times of memory rewrite
JPH05325593A (en) * 1992-05-27 1993-12-10 Sharp Corp Flash type EEPROM management device
JPH11232885A (en) * 1998-02-10 1999-08-27 Oki Micro Design Miyazaki Co Ltd Semiconductor memory
JPH11283380A (en) * 1998-03-27 1999-10-15 Victor Co Of Japan Ltd Writing method for flash memory

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011081754A (en) * 2009-10-09 2011-04-21 Chiba Univ Recording device
JP2014029737A (en) * 2013-11-13 2014-02-13 Chiba Univ Storage device
JP2018180792A (en) * 2017-04-07 2018-11-15 株式会社リコー INFORMATION PROCESSING SYSTEM, INFORMATION PROCESSING METHOD, PROGRAM, AND INFORMATION PROCESSING APPARATUS
JP7043737B2 (en) 2017-04-07 2022-03-30 株式会社リコー Information processing system and information processing method

Similar Documents

Publication Publication Date Title
CN100371906C (en) Method and apparatus for determining access permissions
US7213117B2 (en) 1-chip microcomputer having controlled access to a memory and IC card using the 1-chip microcomputer
US5991849A (en) Rewriting protection of a size varying first region of a reprogrammable non-volatile memory
US8234476B2 (en) Information processing apparatus and method of updating stack pointer
JP5576557B2 (en) Processor system and control method thereof
JP3875153B2 (en) Nonvolatile semiconductor memory device and its rewrite prohibition control method
JPWO2006040798A1 (en) Semiconductor integrated circuit device and electronic system
US8176281B2 (en) Controlling access to an embedded memory of a microcontroller
JP2006085868A (en) Rewrite restriction method and semiconductor device
JP4563707B2 (en) Memory protector
JP2001075941A (en) Microcomputer with built-in flash memory and operating method thereof
EP1262857B1 (en) Information processing apparatus and method of controlling an access level
CN109147847B (en) Semiconductor device and flash memory control method
US7191323B2 (en) Information processing unit selecting one of reset vector addresses
US20110219219A1 (en) Semiconductor integrated circuit and register address controller
JP3882628B2 (en) Memory control device and serial memory
JP2002099468A (en) Writing control circuit
US6987697B2 (en) Memory device
KR20000009381A (en) Memory writing protection apparatus of computer system
JP4202116B2 (en) Memory control circuit, memory device and microcomputer
JPH06236695A (en) Non-volatile memory device with exchange display function
JP2006120098A (en) Cache memory device and management method thereof
JP3918089B2 (en) Memory protection circuit
CN112417528A (en) Method and electronic device for managing a secure library supporting data storage
JP2008203988A (en) Microcomputer with security protection function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070822

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080728

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100405

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100420

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100803

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101001

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20101203