JP2005222104A - Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit - Google Patents

Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit Download PDF

Info

Publication number
JP2005222104A
JP2005222104A JP2004026266A JP2004026266A JP2005222104A JP 2005222104 A JP2005222104 A JP 2005222104A JP 2004026266 A JP2004026266 A JP 2004026266A JP 2004026266 A JP2004026266 A JP 2004026266A JP 2005222104 A JP2005222104 A JP 2005222104A
Authority
JP
Japan
Prior art keywords
nonvolatile memory
microcomputer
cpu
unwritten
circuit
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
JP2004026266A
Other languages
Japanese (ja)
Inventor
Yoshihiro Murakami
義広 村上
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.)
Toshiba Corp
Kioxia Systems Co Ltd
Original Assignee
Toshiba Corp
Toshiba Memory Systems 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 Toshiba Corp, Toshiba Memory Systems Co Ltd filed Critical Toshiba Corp
Priority to JP2004026266A priority Critical patent/JP2005222104A/en
Publication of JP2005222104A publication Critical patent/JP2005222104A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a nonvolatile memory-integrated microcomputer provided with a circuit for suppressing an abnormal operation of the microcomputer in a state that a program is unwritten to a nonvolatile memory. <P>SOLUTION: The abnormal operation suppressing circuit 10 compares a check sum value of an output of the nonvolatile memory 100 determined by a check sum calculation circuit 11 with a check sum value of the nonvolatile memory 10 in an unwritten state, which is stored in an unwritten check sum value register 12 by a comparator 13, and outputs a reset signal from a reset signal generation circuit 14 to a CPU 200 when the values are matched with each other. In response to this, the CPU 200 lays the nonvolatile microcomputer 1 in a reset state. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、不揮発性メモリ内蔵マイコンに関し、特に不揮発性メモリが未書き込みのときの異常動作を抑止する回路を備える不揮発性メモリ内蔵マイコンに関する。   The present invention relates to a microcomputer with a built-in nonvolatile memory, and more particularly to a microcomputer with a built-in nonvolatile memory provided with a circuit that suppresses an abnormal operation when the nonvolatile memory is not written.

一般に、マイコンは内蔵するROMにプログラムを搭載し、CPUがこのROMからプログラムを一定の順序で読み出して実行する。   Generally, a microcomputer loads a program in a built-in ROM, and a CPU reads the program from the ROM in a certain order and executes it.

しかし、予期せぬ原因で実行するプログラムの順序が狂ったり、ノイズの影響を受けたりした場合に、マイコンがいわゆる暴走状態になって異常動作を行うようになる。そこでマイコンにはこの暴走状態を検出する手段が設けられており、その一つとして、ウォッチドッグタイマがよく用いられる(例えば、特許文献1参照。)。   However, when the order of programs executed for an unexpected cause is out of order or affected by noise, the microcomputer enters a so-called runaway state and performs an abnormal operation. Therefore, the microcomputer is provided with means for detecting the runaway state, and one of them is a watch dog timer (see, for example, Patent Document 1).

このような暴走状態を検出する手段から出力される暴走検知信号でCPUに割り込みをかけることなどにより、マイコンの異常動作を停止させることが可能となる。
特開2001―109645号公報 (第4ページ、図1)
An abnormal operation of the microcomputer can be stopped by interrupting the CPU with a runaway detection signal output from the means for detecting such a runaway state.
JP 2001-109645 A (page 4, FIG. 1)

ところで、近年、プログラムを内蔵するROMとして、ユーザの手元でデータの書き込みが可能なEPROM(Erasable Programmable ROM)、OTPROM(One Time Programmable ROM)、フラッシュメモリなどの不揮発性メモリが使用されるケースが増加している。このような不揮発性メモリを使うと、ユーザはプログラムの書き込みが随時行えるため、プログラムの開発効率の向上やマイコンを搭載した製品の開発期間の短縮などを図ることができる。   By the way, in recent years, the number of non-volatile memories such as an EPROM (Erasable Programmable ROM), an OTPROM (One Time Programmable ROM), and a flash memory that can write data at the user's hand is increasing as a ROM containing a program. doing. By using such a non-volatile memory, the user can write a program at any time, so that it is possible to improve the development efficiency of the program and shorten the development period of a product equipped with a microcomputer.

しかし、このような不揮発性メモリをプログラムを内蔵するROMとして使用するときに、時として不揮発性メモリへのプログラムの書き込みの行われていないマイコンを基板に実装し、そのまま誤ってマイコンを動作させてしまうことがある。この場合、マイコンの動作開始後、不揮発性メモリから未書き込みのデータが連続して読み出されるため、マイコンが正常な動作をせず、いわゆる暴走状態になってしまう。そこで、上述したウォッチドッグタイマなどの暴走状態を検出する手段が機能し、暴走検知信号を出力する。   However, when using such a non-volatile memory as a ROM containing a program, sometimes a microcomputer that has not been written to the non-volatile memory is mounted on the board, and the microcomputer is operated by mistake. It may end up. In this case, since the unwritten data is continuously read from the nonvolatile memory after the operation of the microcomputer is started, the microcomputer does not operate normally and enters a so-called runaway state. Therefore, the means for detecting the runaway state such as the watchdog timer described above functions and outputs a runaway detection signal.

ところが、一般にウォッチドッグタイマの監視期間は一定の長い時間に設定されているため、暴走状態になってから暴走検知信号が出力されるまでにかなりの時間を要してしまう。その間マイコンは暴走を続け、マイコンに接続される周辺回路に悪影響を及ぼし、最悪の場合、マイコンが搭載される機器を故障に至らしめるという問題があった。   However, since the monitoring period of the watchdog timer is generally set to a certain long time, it takes a considerable time until the runaway detection signal is output after the runaway state occurs. In the meantime, the microcomputer continued to run away, adversely affecting the peripheral circuits connected to the microcomputer, and in the worst case, there was a problem that the device on which the microcomputer was mounted could be broken.

そこで、本発明の目的は、内蔵する不揮発性メモリへのプログラムが未書き込みのままマイコンを動作させても周辺回路へ及ぶ影響を少なくすることのできる異常動作抑止回路を備える不揮発性メモリ内蔵マイコンを提供することにある。   Accordingly, an object of the present invention is to provide a microcomputer with a built-in nonvolatile memory having an abnormal operation suppression circuit that can reduce the influence on peripheral circuits even if the microcomputer is operated without writing a program to the built-in nonvolatile memory. It is to provide.

本発明の一態様によれば、CPUと、前記CPUが実行するプログラムを書き込むことのできる不揮発性メモリとを備える不揮発性メモリ内蔵マイコンであって、前記不揮発性メモリの出力データのチェックサム値を計算するチェックサム計算回路と、前記不揮発性メモリが未書き込みであるときのチェックサム値を格納する未書き込みチェックサム値レジスタと、前記チェックサム計算回路の出力値と前記未書き込みチェックサム値レジスタの値とを比較する比較回路と、前記比較回路の一致出力信号に基づいて前記CPUの実行する動作を抑止する信号を出力する回路とを有することを特徴とする異常動作抑止回路を備える不揮発性メモリ内蔵マイコンが提供される。   According to one aspect of the present invention, there is provided a microcomputer with a built-in nonvolatile memory comprising a CPU and a nonvolatile memory into which a program executed by the CPU can be written, wherein a checksum value of output data of the nonvolatile memory is obtained. A checksum calculation circuit for calculating, an unwritten checksum value register for storing a checksum value when the nonvolatile memory is unwritten, an output value of the checksum calculation circuit, and an unwritten checksum value register A non-volatile memory having an abnormal operation suppression circuit, comprising: a comparison circuit for comparing values; and a circuit for outputting a signal for suppressing an operation executed by the CPU based on a coincidence output signal of the comparison circuit A built-in microcomputer is provided.

本発明によれば、マイコンへの電源投入後、短時間で内蔵する不揮発性メモリへのプログラムが未書き込みであることを検出でき、マイコンが異常な動作を行うことを抑止できるので、マイコンに接続される周辺回路へ及ぶ影響を少なくすることができる。   According to the present invention, it is possible to detect that the program to the non-volatile memory incorporated in the microcomputer is not written in a short time after turning on the power to the microcomputer, and it is possible to prevent the microcomputer from performing an abnormal operation. It is possible to reduce the influence on the peripheral circuits.

以下、本発明の実施例を図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の第1の実施例に係る異常動作抑止回路を備える不揮発性メモリ内蔵マイコンのブロック図である。   FIG. 1 is a block diagram of a microcomputer with a built-in nonvolatile memory including an abnormal operation suppression circuit according to a first embodiment of the present invention.

不揮発性メモリ内蔵マイコン1は、不揮発性メモリ100と、CPU200とを有している。通常、不揮発性メモリ100にはユーザにより予めプログラムが書き込まれており、CPU200からのアドレス信号で指定された順にプログラムデータをCPU200へ出力する。CPU200は、不揮発性メモリ100から出力されたプログラムに書かれた命令を解釈し、その命令に従った動作を行なう。   The nonvolatile memory built-in microcomputer 1 includes a nonvolatile memory 100 and a CPU 200. Normally, a program is written in advance in the nonvolatile memory 100 by the user, and the program data is output to the CPU 200 in the order specified by the address signal from the CPU 200. CPU 200 interprets an instruction written in a program output from nonvolatile memory 100, and performs an operation according to the instruction.

さらに、不揮発性メモリ内蔵マイコン1は、不揮発性メモリ100が未書き込みであることを検出してCPU200へのリセット信号を出力する異常動作抑止回路10を備えている。   Furthermore, the nonvolatile memory built-in microcomputer 1 includes an abnormal operation suppression circuit 10 that detects that the nonvolatile memory 100 is not yet written and outputs a reset signal to the CPU 200.

異常動作抑止回路10は、不揮発性メモリ100の出力データのチェックサム値を計算するチェックサム計算回路11と、予め求めておいた不揮発性メモリ100が未書き込みであるときのチェックサム値を格納した未書き込みチェックサム値レジスタ12と、チェックサム計算回路11の出力値と未書き込みチェックサム値レジスタ12の値を比較する比較器13と、チェックサム計算回路11の出力値と未書き込みチェックサム値レジスタ12の値が一致したときに比較器13から出力される一致出力信号が入力されてCPUへのリセット信号を出力するリセット信号発生回路14を有している。   The abnormal operation suppression circuit 10 stores a checksum calculation circuit 11 that calculates a checksum value of output data of the nonvolatile memory 100, and a checksum value obtained when the nonvolatile memory 100 that has been obtained in advance is unwritten. The unwritten checksum value register 12, the comparator 13 that compares the output value of the checksum calculation circuit 11 and the value of the unwritten checksum value register 12, the output value of the checksum calculation circuit 11 and the unwritten checksum value register It has a reset signal generation circuit 14 that receives a coincidence output signal output from the comparator 13 when the values of 12 coincide, and outputs a reset signal to the CPU.

なお、比較器13から出力される一致出力信号は、不揮発性メモリ100が未書き込み状態であることをユーザへ報知するために、未書き込み検出信号として不揮発性メモリ内蔵マイコン1の外部へ出力される。   The coincidence output signal output from the comparator 13 is output as an unwritten detection signal to the outside of the microcomputer 1 with built-in nonvolatile memory in order to notify the user that the nonvolatile memory 100 is in an unwritten state. .

CPU200は、異常動作抑止回路10からリセット信号が入力されると、不揮発性メモリ内蔵マイコン1をリセット状態に設定するリセット動作を行う。   When a reset signal is input from the abnormal operation suppression circuit 10, the CPU 200 performs a reset operation for setting the microcomputer 1 with built-in nonvolatile memory to a reset state.

次に、図2の動作フロー図を用いて、本実施例における異常動作抑止回路10が、不揮発性メモリ100の未書き込みに起因する不揮発性メモリ内蔵マイコン1の異常動作を抑止する動作について説明する。   Next, an operation in which the abnormal operation suppression circuit 10 according to the present exemplary embodiment suppresses the abnormal operation of the microcomputer 1 with built-in nonvolatile memory due to the unwritten state of the nonvolatile memory 100 will be described with reference to the operation flowchart of FIG. .

電源が投入されると(ステップS1)、CPU200は不揮発性メモリ内蔵マイコン1の初期設定を開始する(ステップS2)。このとき、先ずCPU200は不揮発性メモリ100へアドレスを0番地から順次与えて不揮発性メモリ100の全データを読み出す(ステップS3)。   When the power is turned on (step S1), the CPU 200 starts the initial setting of the nonvolatile memory built-in microcomputer 1 (step S2). At this time, first, the CPU 200 sequentially gives addresses to the nonvolatile memory 100 from address 0 and reads all data in the nonvolatile memory 100 (step S3).

この不揮発性メモリ100から読み出された全データに対してチェックサム計算回路11がチェックサム値を計算する(ステップS4)。チェックサム値の計算が終わると、その計算した値を、比較器13で、未書き込みチェックサム値レジスタ12に格納されている不揮発性メモリ100が未書き込みのときのチェックサム値と比較する(ステップS5)。   The checksum calculation circuit 11 calculates a checksum value for all data read from the nonvolatile memory 100 (step S4). When the calculation of the checksum value is completed, the calculated value is compared by the comparator 13 with the checksum value when the nonvolatile memory 100 stored in the unwritten checksum value register 12 is not yet written (step S5).

チェックサム計算回路11で計算した値と未書き込みチェックサム値レジスタ12の値が一致すると(ステップS6のYES)、比較器13は一致信号を出力する。この比較器13から一致信号が出力されるということは、不揮発性メモリ100が未書き込み状態であることを意味する。そこで、不揮発性メモリ100が未書き込み状態であることをユーザに知らせるために、この比較器13からの一致信号を未書き込み検出信号として不揮発性メモリ内蔵マイコン1の外部へ出力する(ステップS7)。   When the value calculated by the checksum calculation circuit 11 matches the value of the unwritten checksum value register 12 (YES in step S6), the comparator 13 outputs a match signal. That the coincidence signal is output from the comparator 13 means that the nonvolatile memory 100 is in an unwritten state. Therefore, in order to notify the user that the nonvolatile memory 100 is in an unwritten state, the coincidence signal from the comparator 13 is output to the outside of the nonvolatile memory built-in microcomputer 1 as an unwritten detection signal (step S7).

なお、チェックサム計算回路11で計算した値と未書き込みチェックサム値レジスタ12の値が一致しないときは、不揮発性メモリ100が未書き込みでないことを意味するので通常の初期設定動作へ移行する(ステップS6のNO)。   When the value calculated by the checksum calculation circuit 11 and the value in the unwritten checksum value register 12 do not match, it means that the nonvolatile memory 100 is not yet written, and the routine proceeds to a normal initial setting operation (step NO in S6).

比較器13から一致信号が出力されると、リセット信号発生回路14がCPU200へのリセット信号を生成する(ステップS8)。   When the coincidence signal is output from the comparator 13, the reset signal generation circuit 14 generates a reset signal to the CPU 200 (step S8).

リセット信号発生回路14からリセット信号が出力されると、CPU200が不揮発性メモリ内蔵マイコン1をリセット状態に設定する(ステップS9)。   When a reset signal is output from the reset signal generation circuit 14, the CPU 200 sets the microcomputer 1 with built-in nonvolatile memory to a reset state (step S9).

その後、比較器13から外部へ出力された未書き込み検出信号による報知を受けてユーザが電源を切断することにより、不揮発性メモリ内蔵マイコン1は動作を終了する(ステップS10)。   Thereafter, when the user turns off the power in response to the notification by the unwritten detection signal output from the comparator 13 to the outside, the microcomputer 1 with built-in nonvolatile memory ends the operation (step S10).

このような本実施例によれば、マイコンへの電源投入後の初期設定動作の最初に内蔵する不揮発性メモリへのプログラムが未書き込みであるかどうかをチェックし、不揮発性メモリへのプログラムが未書き込みであるときは、CPUへのリセット信号を生成してマイコンをリセット状態に設定する。これにより、マイコンが異常な動作を行うことを抑止できる。   According to such a present embodiment, at the beginning of the initial setting operation after turning on the power to the microcomputer, it is checked whether the program to the built-in nonvolatile memory is unwritten, and the program to the nonvolatile memory is not yet written. When writing, a reset signal to the CPU is generated to set the microcomputer to a reset state. Thereby, it can suppress that a microcomputer performs abnormal operation | movement.

また、マイコンの外部へ未書き込み検出信号を出力するので、ユーザは不揮発性メモリが未書き込みであることを知ることができ、マイコンの電源を切る等の適切な処置を取ることができる。   In addition, since the unwritten detection signal is output to the outside of the microcomputer, the user can know that the nonvolatile memory is not written, and can take appropriate measures such as turning off the power of the microcomputer.

図3は、本発明の第2の実施例に係る異常動作抑止回路を備える不揮発性メモリ内蔵マイコンのブロック図である。本実施例の異常動作抑止回路は、図1に示した第1の実施例の異常動作抑止回路のリセット信号発生回路をストップ信号発生回路に代えたものであり、その他の回路は第1の実施例と同じである。そこで、図3において図1と同一のブロックには同一の符号を付し、ここではその詳細な説明を省略する。   FIG. 3 is a block diagram of a microcomputer with a built-in nonvolatile memory including an abnormal operation inhibiting circuit according to the second embodiment of the present invention. The abnormal operation suppression circuit of this embodiment is obtained by replacing the reset signal generation circuit of the abnormal operation suppression circuit of the first embodiment shown in FIG. 1 with a stop signal generation circuit, and other circuits are the first embodiment. Same as example. Therefore, in FIG. 3, the same blocks as those in FIG. 1 are denoted by the same reference numerals, and detailed description thereof is omitted here.

本実施例の不揮発性メモリ内蔵マイコン2は、不揮発性メモリ100と、CPU200と、異常動作抑止回路20を有する。   The microcomputer 2 with built-in nonvolatile memory according to this embodiment includes a nonvolatile memory 100, a CPU 200, and an abnormal operation suppression circuit 20.

本実施例における異常動作抑止回路20は、チェックサム計算回路11と、未書き込みチェックサム値レジスタ12と、チェックサム計算回路11の出力と未書き込みチェックサム値レジスタ12の値を比較する比較器13と、比較器13から出力される一致出力信号が入力されてCPU200へのストップ信号を出力するストップ信号発生回路24を有している。   The abnormal operation suppression circuit 20 in this embodiment includes a checksum calculation circuit 11, an unwritten checksum value register 12, and a comparator 13 that compares the output of the checksum calculation circuit 11 and the value of the unwritten checksum value register 12. And a stop signal generation circuit 24 that receives the coincidence output signal output from the comparator 13 and outputs a stop signal to the CPU 200.

CPU200は、異常動作抑止回路20からストップ信号が入力されると、不揮発性メモリ内蔵マイコン2のクロックの発振を停止し、入出力ポートの出力をハイインピーダンスに保持するストップモードにする。   When the stop signal is input from the abnormal operation suppression circuit 20, the CPU 200 stops the oscillation of the clock of the microcomputer 2 with built-in nonvolatile memory and enters a stop mode in which the output of the input / output port is held at high impedance.

次に、図4の動作フロー図を用いて、本実施例における異常動作抑止回路20が、不揮発性メモリ100の未書き込みに起因する不揮発性メモリ内蔵マイコン2の異常動作を抑止する動作について説明する。ただし、本フローにおける動作は基本的に図2に示した第1の実施例の動作フローと同じであるので、図2と同一の動作のステップには図2と同一のステップ番号を付し、ここではその詳細な説明を省略する。   Next, an operation in which the abnormal operation suppression circuit 20 according to the present exemplary embodiment suppresses the abnormal operation of the microcomputer 2 with built-in nonvolatile memory due to the unwritten state of the nonvolatile memory 100 will be described with reference to the operation flowchart of FIG. . However, since the operation in this flow is basically the same as the operation flow of the first embodiment shown in FIG. 2, the same step numbers as in FIG. Detailed description thereof is omitted here.

図4に示したステップS1からステップS7までの動作は、図2に示した第1の実施例のステップS1からステップS7までのフローと同じである。すなわち、不揮発性メモリ内蔵マイコン200に電源が投入されると、不揮発性メモリ100の出力と未書き込みチェックサム値レジスタ12の値を比較し、両者の値が一致すると一致信号が比較器13から出力される。   The operation from step S1 to step S7 shown in FIG. 4 is the same as the flow from step S1 to step S7 in the first embodiment shown in FIG. That is, when the microcomputer 200 with built-in nonvolatile memory is turned on, the output of the nonvolatile memory 100 and the value of the unwritten checksum value register 12 are compared, and when both values match, a coincidence signal is output from the comparator 13. Is done.

比較器13から一致信号が出力されると、ストップ信号発生回路24がCPU200へのストップ信号を生成する(ステップS18)。   When the coincidence signal is output from the comparator 13, the stop signal generation circuit 24 generates a stop signal to the CPU 200 (step S18).

ストップ信号発生回路24からストップ信号が出力されると、CPU200が不揮発性メモリ内蔵マイコン2をストップ状態に設定する(ステップS19)。   When the stop signal is output from the stop signal generation circuit 24, the CPU 200 sets the microcomputer 2 with built-in nonvolatile memory to the stop state (step S19).

その後、比較器13から外部へ出力された未書き込み検出信号による報知を受けてユーザが電源を切断することにより、メモリ内蔵マイコン2は動作を終了する(ステップS10)。   Thereafter, the user turns off the power in response to the notification by the unwritten detection signal output from the comparator 13 to the outside, and the microcomputer 2 with a built-in memory ends the operation (step S10).

このような本実施例によれば、マイコンへの電源投入後の初期設定動作の最初に内蔵する不揮発性メモリへのプログラムが未書き込みであるかどうかをチェックし、不揮発性メモリへのプログラムが未書き込みであるときは、CPUへのストップ信号を生成してマイコンをストップ状態に設定する。これにより、マイコンの入出力ポートの出力がハイインピーダンス状態になり、この入出力ポートに接続される周辺回路の出力との間で信号レベルがコンフリクト状態になることを防止することができる。   According to the present embodiment, at the beginning of the initial setting operation after turning on the power to the microcomputer, it is checked whether the program to the built-in nonvolatile memory is unwritten, and the program to the nonvolatile memory is not yet written. When writing, a stop signal to the CPU is generated and the microcomputer is set to a stop state. Thereby, the output of the input / output port of the microcomputer becomes a high impedance state, and it is possible to prevent the signal level from being in a conflict state with the output of the peripheral circuit connected to the input / output port.

また、本実施例においてもマイコンの外部へ未書き込み検出信号が出力されるので、ユーザは不揮発性メモリが未書き込みであることを知ることができ、マイコンの電源を切る等の適切な処置を取ることができる。   Also in this embodiment, since an unwritten detection signal is output to the outside of the microcomputer, the user can know that the nonvolatile memory has not been written, and take appropriate measures such as turning off the microcomputer. be able to.

本発明の実施例1に係る異常動作抑止回路を備える不揮発性メモリ内蔵マイコンのブロック図。1 is a block diagram of a microcomputer with a built-in nonvolatile memory including an abnormal operation suppression circuit according to Embodiment 1 of the present invention. 本発明の実施例1に係る異常動作抑止回路を備える不揮発性メモリ内蔵マイコンの異常動作を抑止する動作のフローを示すフロー図。The flowchart which shows the flow of the operation | movement which suppresses the abnormal operation of the microcomputer with a built-in nonvolatile memory provided with the abnormal operation suppression circuit which concerns on Example 1 of this invention. 本発明の実施例2に係る異常動作抑止回路を備える不揮発性メモリ内蔵マイコンのブロック図。The block diagram of the microcomputer with a built-in nonvolatile memory provided with the abnormal operation suppression circuit which concerns on Example 2 of this invention. 本発明の実施例2に係る異常動作抑止回路を備える不揮発性メモリ内蔵マイコンの異常動作を抑止する動作のフローを示すフロー図。The flowchart which shows the flow of the operation | movement which suppresses the abnormal operation of the microcomputer with a built-in nonvolatile memory provided with the abnormal operation suppression circuit which concerns on Example 2 of this invention.

符号の説明Explanation of symbols

1、2 不揮発性メモリ内蔵マイコン
10、20 異常動作抑止回路
11 チェックサム計算回路
12 未書き込みチェックサム値レジスタ
13 比較器
14 リセット信号発生回路
24 ストップ信号発生回路
100 不揮発性メモリ
200 CPU
1, 2 Non-volatile memory built-in microcomputers 10 and 20 Abnormal operation suppression circuit 11 Checksum calculation circuit 12 Unwritten checksum value register 13 Comparator 14 Reset signal generation circuit 24 Stop signal generation circuit 100 Nonvolatile memory 200 CPU

Claims (4)

CPUと、前記CPUが実行するプログラムを書き込むことのできる不揮発性メモリとを備える不揮発性メモリ内蔵マイコンであって、
前記不揮発性メモリの出力データのチェックサム値を計算するチェックサム計算回路と、
前記不揮発性メモリが未書き込みであるときのチェックサム値を格納する未書き込みチェックサム値レジスタと、
前記チェックサム計算回路の出力値と前記未書き込みチェックサム値レジスタの値とを比較する比較回路と、
前記比較回路の一致出力信号に基づいて前記CPUの実行する動作を抑止する信号を出力する回路と
を有することを特徴とする異常動作抑止回路を備える不揮発性メモリ内蔵マイコン。
A microcomputer with built-in nonvolatile memory comprising a CPU and a nonvolatile memory into which a program executed by the CPU can be written,
A checksum calculation circuit for calculating a checksum value of output data of the nonvolatile memory;
An unwritten checksum value register for storing a checksum value when the nonvolatile memory is unwritten;
A comparison circuit that compares the output value of the checksum calculation circuit with the value of the unwritten checksum value register;
A microcomputer with a built-in nonvolatile memory, comprising: an abnormal operation inhibiting circuit, comprising: a circuit that outputs a signal that inhibits an operation performed by the CPU based on a coincidence output signal of the comparison circuit.
前記CPUの実行する動作を抑止する信号が、前記CPUへ入力するリセット信号であることを特徴とする異常動作抑止回路を備える不揮発性メモリ内蔵マイコン。   A microcomputer with a built-in nonvolatile memory comprising an abnormal operation suppression circuit, wherein the signal for suppressing the operation executed by the CPU is a reset signal input to the CPU. 前記CPUの実行する動作を抑止する信号が、前記CPUへ入力するストップ信号であることを特徴とする異常動作抑止回路を備える不揮発性メモリ内蔵マイコン。   A microcomputer with a built-in nonvolatile memory comprising an abnormal operation suppression circuit, wherein a signal for suppressing an operation executed by the CPU is a stop signal input to the CPU. 前記比較回路の一致出力信号を前記不揮発性メモリが未書き込みであることを検出したことを示す未書き込み検出信号として外部へ出力することを特徴とする請求項1乃至3のいずれか1項に記載の異常動作抑止回路を備える不揮発性メモリ内蔵マイコン。   4. The coincidence output signal of the comparison circuit is output to the outside as an unwritten detection signal indicating that the nonvolatile memory is detected to be unwritten. Microcomputer with built-in non-volatile memory equipped with an abnormal operation suppression circuit.
JP2004026266A 2004-02-03 2004-02-03 Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit Pending JP2005222104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004026266A JP2005222104A (en) 2004-02-03 2004-02-03 Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004026266A JP2005222104A (en) 2004-02-03 2004-02-03 Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit

Publications (1)

Publication Number Publication Date
JP2005222104A true JP2005222104A (en) 2005-08-18

Family

ID=34997709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004026266A Pending JP2005222104A (en) 2004-02-03 2004-02-03 Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit

Country Status (1)

Country Link
JP (1) JP2005222104A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101197556B1 (en) 2006-01-09 2012-11-09 삼성전자주식회사 Device and method capable of verifying program operation of non-volatile memory and memory card including the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101197556B1 (en) 2006-01-09 2012-11-09 삼성전자주식회사 Device and method capable of verifying program operation of non-volatile memory and memory card including the same

Similar Documents

Publication Publication Date Title
JP2010086523A (en) Secure memory interface
US7966486B2 (en) Computer system with dual basic input output system and operation method thereof
US10108469B2 (en) Microcomputer and microcomputer system
JP4393954B2 (en) Microcomputer
JP2004152194A (en) Memory data protection method
US9778981B2 (en) Microcontroller
JP2005222104A (en) Nonvolatile memory-integrated microcomputer provided with abnormal operation suppressing circuit
JP2008310896A (en) Nonvolatile memory device, nonvolatile memory system, and method for controlling nonvolatile memory device
JP2004348627A (en) Microcomputer system
JP6332134B2 (en) Memory diagnostic circuit
CN110321078B (en) Method for preventing system from mistakenly erasing MTP data of single chip microcomputer under interference
JP2008225922A (en) Nonvolatile storage device
JP4535316B2 (en) Terminal fail-safe system, terminal fail-safe method, and terminal fail-safe program
JP2009230425A (en) Information processor
JP4647276B2 (en) Semiconductor circuit device
JP2008059191A (en) Microcontroller and its debugging method
JP2012059034A (en) Boot processor
JP2009087507A (en) Control device, and memory initialization method of control device
US20040153783A1 (en) Circuit for detecting abnormal operation of memory and integrated circuit and method for detectiing abnormal operation
JP2006120098A (en) Cache memory device and management method for the same
JP2007064762A (en) Semiconductor device and test mode control circuit
JP4848126B2 (en) Microcomputer, data protection method for nonvolatile memory in microcomputer
JP2007188383A (en) Microcomputer
JP2008158636A (en) Program execution device having flash memory
JP2008117148A (en) Information processor and information processing method

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20050606