JP2002099468A - Writing control circuit - Google Patents

Writing control circuit

Info

Publication number
JP2002099468A
JP2002099468A JP2000288909A JP2000288909A JP2002099468A JP 2002099468 A JP2002099468 A JP 2002099468A JP 2000288909 A JP2000288909 A JP 2000288909A JP 2000288909 A JP2000288909 A JP 2000288909A JP 2002099468 A JP2002099468 A JP 2002099468A
Authority
JP
Japan
Prior art keywords
write control
memory
cpu
signal
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
JP2000288909A
Other languages
Japanese (ja)
Inventor
Kazuya Akiyama
一也 秋山
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2000288909A priority Critical patent/JP2002099468A/en
Publication of JP2002099468A publication Critical patent/JP2002099468A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To efficiently prevent a miswriting into a memory. SOLUTION: In a writing control circuit, a protect circuit 20 is arranged on a line to apply a writing control signal to a memory 12 from a CPU 10. The circuit 20 does not output the control signal while a reset signal is applied from a reset circuit 22. Then, an occurrence of the miswriting into the memory 12 at on-off time of power source is prevented with outputting the reset signal at dropping of a power source voltage.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、CPUからの書き
込み制御信号に応じて、メモリへのデータ書き込みを許
可する書き込み制御回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a write control circuit for permitting data writing to a memory in response to a write control signal from a CPU.

【0002】[0002]

【従来の技術】従来より、マイクロコンピュータ等のデ
ータ処理機器においては、データの記憶に各種のメモリ
を使用しており、書き換え可能な不揮発性メモリとし
て、フラッシュメモリや、EEPROMなどを使用して
いる。
2. Description of the Related Art Conventionally, in a data processing device such as a microcomputer, various memories are used for storing data, and a flash memory or an EEPROM is used as a rewritable nonvolatile memory. .

【0003】これらの不揮発性メモリには、製造時にお
いて所定のデータを記憶して、出荷し、かつ必要に応じ
てデータの書き換えを行う。
[0003] These nonvolatile memories store predetermined data at the time of manufacture, are shipped, and rewrite data as needed.

【0004】[0004]

【発明が解決しようとする課題】このような不揮発性メ
モリでは、通常の電源のオフでは、記憶内容は失われな
いことを条件としており、従ってここへの誤書き込みが
生じるとその後の動作に問題が生じる。このため、メモ
リへの誤書き込みを防止したいという要求がある。
In such a non-volatile memory, it is assumed that the stored contents are not lost when the power is normally turned off. Therefore, if an erroneous write occurs here, there is a problem in the subsequent operation. Occurs. For this reason, there is a demand to prevent erroneous writing to the memory.

【0005】一方、CPUとメモリとは、複数の信号線
によって接続されており、CPUにより、メモリの書き
込みが制御される。例えば、図6に示すように、CPU
10とメモリ12とは、書き込み制御信号ライン、チッ
プ選択信号ライン、アドレスバス、データバスによっ
て、接続されている。そして、図7に示すように、書き
込み制御信号ラインおよびチップ選択ラインがLの状態
で、アドレスバスにセットされているメモリのアドレス
にデータバスにセットされているデータが書き込まれ
る。
On the other hand, the CPU and the memory are connected by a plurality of signal lines, and writing of the memory is controlled by the CPU. For example, as shown in FIG.
The memory 10 and the memory 12 are connected by a write control signal line, a chip selection signal line, an address bus, and a data bus. Then, as shown in FIG. 7, while the write control signal line and the chip select line are at L level, the data set on the data bus is written to the address of the memory set on the address bus.

【0006】ここで、メモリへの誤書き込みは、電源の
オンオフ時や、CPUの暴走時に発生しやすい。この理
由について説明する。
Here, erroneous writing to the memory is likely to occur when the power is turned on or off or when the CPU goes out of control. The reason will be described.

【0007】まず、電源のオンオフ時には、電源電圧が
0から所定電圧まで立ち上がり、また所定電圧から0へ
低下する。通常メモリには、そのデバイス自身で電圧が
低下すると書き込みが行われないようにするライトプロ
テクト機能を有している。従って、電源電圧が一定の電
圧、例えば、3.3V動作のメモリでは2V程度以下と
なった場合における誤書き込みからは保護される。
First, when the power supply is turned on and off, the power supply voltage rises from 0 to a predetermined voltage and drops from the predetermined voltage to 0. The normal memory has a write protection function that prevents writing when the voltage of the device itself drops. Therefore, the memory is protected from erroneous writing when the power supply voltage becomes a fixed voltage, for example, about 2 V or less in a memory operating at 3.3 V.

【0008】一方、CPUは、動作保証電圧が規定され
ており、3.3V動作のCPUで通常2.7V〜3.6
Vである。従って、2V〜2.7Vの範囲では、CPU
から誤った出力がなされ、メモリへの誤書き込みが発生
する可能性がある。すなわち、図8に示すように、たま
たま書き込み制御信号と、チップ選択信号の両方がLレ
ベルとなると、そのときの不定のアドレスに不定のデー
タが書き込まれてしまう。
On the other hand, a guaranteed operation voltage is specified for a CPU, and a 3.3 V operation CPU is usually 2.7 V to 3.6 V.
V. Therefore, in the range of 2V to 2.7V, the CPU
Erroneous output from the memory, and erroneous writing to the memory may occur. That is, as shown in FIG. 8, when both the write control signal and the chip select signal are at L level, undefined data is written to an undefined address at that time.

【0009】また、CPUが暴走した時には、すべての
出力が不定の場合があり、その場合にも、書き込み制御
信号と、チップ選択信号の両方がLレベルとなる可能性
がある。
When the CPU goes out of control, all outputs may be undefined. In such a case, both the write control signal and the chip select signal may be at the L level.

【0010】本発明は、上記課題に鑑みなされたもので
あり、メモリへの誤書き込みを効果的に防止できる書き
込み制御回路を提供することを目的とする。
The present invention has been made in view of the above problems, and has as its object to provide a write control circuit that can effectively prevent erroneous writing to a memory.

【0011】[0011]

【課題を解決するための手段】本発明は、CPUからの
書き込み制御信号に応じて、メモリへのデータ書き込み
を許可する書き込み制御回路であって、電源電圧がCP
Uの動作保証電圧より高い電圧であって、通常の電源電
圧より低い状態においてリセット信号を発生するリセッ
ト信号発生回路と、このリセット信号発生回路からリセ
ット信号が発生しているときに、書き込み制御信号によ
る書き込み許可を禁止するプロテクト回路と、を有する
ことを特徴とする。
According to the present invention, there is provided a write control circuit for permitting data writing to a memory in response to a write control signal from a CPU.
A reset signal generating circuit for generating a reset signal when the voltage is higher than the operation guarantee voltage of U and lower than a normal power supply voltage; and a write control signal when the reset signal is generated from the reset signal generating circuit. And a protection circuit for prohibiting write permission by the above.

【0012】このように、本発明によれば、CPUが誤
動作を起こす可能性が生じる電圧より高い電圧から、リ
セット信号を発生し、メモリへの書き込みを禁止する。
従って、CPUが誤った書き込み制御信号を発生して
も、メモリへの誤書き込みが生じるのを効果的に防止す
ることができる。
As described above, according to the present invention, the reset signal is generated from a voltage higher than the voltage at which the CPU may malfunction, and writing to the memory is prohibited.
Therefore, even if the CPU generates an erroneous write control signal, erroneous writing to the memory can be effectively prevented.

【0013】また、本発明は、書き込み制御信号に応じ
て、メモリへのデータ書き込みを許可する書き込み制御
回路であって、CPUにより信号出力が制御される汎用
I/Oポートと、この汎用I/Oポートから書き込み許
可信号が出力されていないときに、書き込み制御信号に
よる書き込み許可を禁止するプロテクト回路と、を有す
ることを特徴とする。
According to another aspect of the present invention, there is provided a write control circuit for permitting data writing to a memory in response to a write control signal, comprising: a general-purpose I / O port whose signal output is controlled by a CPU; A protection circuit for prohibiting write permission by a write control signal when a write permission signal is not output from the O port.

【0014】このように、本発明によれば、メモリへの
書き込みの際には、汎用I/Oポートからの書き込み許
可は必要である。CPUが暴走した際には、汎用I/O
ポートから書き込み許可信号を出力させ、その上で書き
込み制御信号を発生するというような手順を踏むことは
ほとんどあり得ない。従って、CPUが暴走しても、メ
モリへの誤書き込みが生じるのを効果的に防止すること
ができる。
As described above, according to the present invention, when writing to a memory, it is necessary to permit writing from a general-purpose I / O port. When CPU runs away, general-purpose I / O
It is almost impossible to perform a procedure such as outputting a write enable signal from a port and then generating a write control signal. Therefore, even if the CPU goes out of control, erroneous writing to the memory can be effectively prevented.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施の形態(以下
実施形態という)について、図面に基づいて説明する。
Embodiments of the present invention (hereinafter referred to as embodiments) will be described below with reference to the drawings.

【0016】図1は、実施形態の構成を示すブロック図
であり、CPU10と、メモリ12は、書き込み制御信
号ライン、チップ選択信号ライン、アドレスバス、デー
タバスで接続されている。そして、書き込み制御信号、
チップ選択信号をLとしたときに、メモリ12のアドレ
スバス上の値で決定されるアドレスに、データバス上の
データが書き込まれる。
FIG. 1 is a block diagram showing the configuration of the embodiment. A CPU 10 and a memory 12 are connected by a write control signal line, a chip selection signal line, an address bus, and a data bus. And a write control signal,
When the chip selection signal is set to L, data on the data bus is written to an address of the memory 12 determined by a value on the address bus.

【0017】そして、本実施形態では、書き込み制御信
号ラインにプロテクト回路20が挿入配置されており、
このプロテクト回路20へは、リセット回路22からリ
セット信号が供給されるようになっている。
In this embodiment, the protection circuit 20 is inserted and arranged in the write control signal line.
The protection circuit 20 is supplied with a reset signal from a reset circuit 22.

【0018】プロテクト回路20は、例えば図示のよう
にオアゲートで構成され、リセット信号がHの場合に
は、出力はHに固定される。従って、リセット信号がH
の期間は、書き込み制御信号2がLになることが禁止さ
れる。
The protection circuit 20 is formed of, for example, an OR gate as shown in the drawing, and when the reset signal is H, the output is fixed at H. Therefore, the reset signal is H
During this period, the write control signal 2 is prohibited from going low.

【0019】一方、リセット回路22は、電源電圧がC
PU10の動作電圧(例えば、D[V]:2.8V程
度)以下の場合にリセット信号として、Hを出力する。
例えば、電源電圧を負入力端子、電圧Dを正入力端子に
入力するコンパレータを設ける。これによって、電源電
圧がD以下になったときにコンパレータの出力にHが得
られる。このコンパレータからのHの出力は、電源電圧
が、メモリ12の自己保護機能が働く電圧(例えば、B
[V]:2.0V)までHを出力すればよく、そのよう
に設定されている。
On the other hand, when the power supply voltage is C
When the voltage is equal to or lower than the operating voltage of the PU 10 (for example, D [V]: about 2.8 V), H is output as a reset signal.
For example, a comparator is provided which inputs a power supply voltage to a negative input terminal and a voltage D to a positive input terminal. Thereby, when the power supply voltage becomes equal to or less than D, H is obtained in the output of the comparator. The output of H from this comparator indicates that the power supply voltage is a voltage (for example, B
[V]: H may be output up to 2.0 V), which is set as such.

【0020】従って、この回路によれば、図2に示すよ
うにして誤書き込みが防止される。すなわち、この例で
は、電源電圧が徐々に下がり、電源電圧が、CPU10
の動作が保証されない電圧B以下になったときに、CP
U10が書き込み制御信号1としてLを出力する。そこ
で、CPU10からプロテクト回路20に供給される書
き込み制御1は、Lレベルとなる。しかし、その電源電
圧が電圧Dにまで下がった段階で、リセット信号がHに
なっているため、プロテクト回路20の出力である書き
込み制御信号2はHのままであり、メモリ12への書き
込みは確実に防止される。
Therefore, according to this circuit, erroneous writing is prevented as shown in FIG. That is, in this example, the power supply voltage gradually decreases, and
When the voltage becomes equal to or lower than the voltage B at which the operation of
U10 outputs L as the write control signal 1. Therefore, the write control 1 supplied from the CPU 10 to the protection circuit 20 becomes L level. However, at the stage when the power supply voltage has dropped to the voltage D, the reset signal has become H, so that the write control signal 2 which is the output of the protection circuit 20 remains at H, and the writing to the memory 12 is surely performed. Is prevented.

【0021】また、プロテクト回路20またはリセット
回路22がCPU10にこのプロテクト状態を伝え、書
き込み処理を行えないことを通知しておくことも好適で
ある。
It is also preferable that the protection circuit 20 or the reset circuit 22 inform the CPU 10 of this protection state to notify that the writing process cannot be performed.

【0022】次に、図3には、CPU10の暴走状態に
おけるメモリ12の誤書き込み防止の構成が示されてい
る。この例では、プロテクト回路20には、汎用I/O
ポート24からの信号が供給されるようになっている。
そして、CPU10は、メモリ12への書き込みを行う
場合に、汎用I/Oポート24をコントロールして、書
き込み許可信号を出力させる。そして、汎用I/Oポー
ト24から書き込み許可信号が出力されている期間の
み、メモリ12への書き込みが可能になる。
FIG. 3 shows a configuration for preventing erroneous writing of the memory 12 when the CPU 10 runs out of control. In this example, the protection circuit 20 includes a general-purpose I / O
A signal from the port 24 is supplied.
Then, when writing to the memory 12, the CPU 10 controls the general-purpose I / O port 24 to output a write permission signal. Then, writing to the memory 12 is enabled only during the period when the write permission signal is output from the general-purpose I / O port 24.

【0023】すなわち、図4に示すように、CPU10
は、汎用I/Oポート24から書き込み許可信号として
Lを出力させる。次に、CPU10は、書き込み制御1
をLにする。プロテクト回路20は、書き込み許可信号
がLであるため、書き込み制御2としてLを出力する。
従って、この状態で、CPU10がチップ選択信号をL
とすることで、データバス上のデータがアドレスバス上
の値で決定されるメモリアドレスに書き込まれる。そし
て、書き込みが終わった場合には、CPU10は汎用I
/Oポート24からの書き込み許可信号をHに戻す。
That is, as shown in FIG.
Causes the general-purpose I / O port 24 to output L as a write enable signal. Next, the CPU 10 executes the write control 1
To L. Since the write enable signal is at L, the protect circuit 20 outputs L as the write control 2.
Therefore, in this state, the CPU 10 sets the chip selection signal to L.
Thus, the data on the data bus is written to the memory address determined by the value on the address bus. When the writing is completed, the CPU 10 returns to the general-purpose I / O.
The write enable signal from the / O port 24 is returned to H.

【0024】一方、CPU10が暴走している場合に
は、CPU10が上述のように、汎用I/Oポート24
からの書き込み許可信号を予めLにしておき、その後書
き込み制御1およびチップ選択信号の両方をLとすると
いうようなことはほとんどあり得ない。従って、CPU
10の暴走時においても、メモリ12への誤書き込みが
効果的に防止できる。
On the other hand, when the CPU 10 is running out of control, the CPU 10 controls the general-purpose I / O port 24 as described above.
It is almost impossible to set the write enable signal from L to L in advance and then set both the write control 1 and the chip select signal to L. Therefore, CPU
Even at the time of runaway of 10, the erroneous writing to the memory 12 can be effectively prevented.

【0025】[0025]

【発明の効果】以上説明したように、本発明によれば、
CPUが誤動作を起こす可能性が生じる電圧より高い電
圧から、リセット信号を発生し、メモリへの書き込みを
禁止する。従って、CPUが誤った書き込み制御信号を
発生しても、メモリへの誤書き込みが生じるのを効果的
に防止することができる。
As described above, according to the present invention,
A reset signal is generated from a voltage higher than the voltage at which the CPU may malfunction, and writing to the memory is prohibited. Therefore, even if the CPU generates an erroneous write control signal, erroneous writing to the memory can be effectively prevented.

【0026】また、本発明によれば、メモリへの書き込
みの際には、汎用I/Oポートからの書き込み許可は必
要である。CPUが暴走した際には、汎用I/Oから書
き込み許可信号を出力させ、その上で書き込み制御信号
を発生するというような手順を踏むことはほとんどあり
得ない。従って、CPUが暴走しても、メモリへの誤書
き込みが生じるのを効果的に防止することができる。
According to the present invention, when writing to a memory, it is necessary to permit writing from a general-purpose I / O port. When the CPU goes out of control, it is almost impossible to take a procedure such as outputting a write enable signal from the general-purpose I / O and then generating a write control signal. Therefore, even if the CPU goes out of control, erroneous writing to the memory can be effectively prevented.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 第1実施形態の構成を示す図である。FIG. 1 is a diagram showing a configuration of a first embodiment.

【図2】 第1実施形態の各部の波形を示す図である。FIG. 2 is a diagram illustrating waveforms of respective units according to the first embodiment.

【図3】 第2実施形態の構成を示す図である。FIG. 3 is a diagram illustrating a configuration of a second embodiment.

【図4】 第2実施形態の書き込み時の各部の波形を示
す図である。
FIG. 4 is a diagram illustrating waveforms of respective units at the time of writing according to a second embodiment.

【図5】 第2実施形態の書き込み禁止時の各部の波形
を示す図である。
FIG. 5 is a diagram illustrating waveforms of respective units when writing is prohibited according to the second embodiment.

【図6】 従来例の構成を示す図である。FIG. 6 is a diagram showing a configuration of a conventional example.

【図7】 従来例の書き込み動作を説明する図である。FIG. 7 is a diagram for explaining a write operation of a conventional example.

【図8】 従来例の誤書き込みを説明する図である。FIG. 8 is a diagram for explaining erroneous writing in a conventional example.

【符号の説明】[Explanation of symbols]

10 CPU、12 メモリ、20 プロテクト回路、
22 リセット回路、24 汎用I/Oポート。
10 CPUs, 12 memories, 20 protection circuits,
22 reset circuit, 24 general purpose I / O ports.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 CPUからの書き込み制御信号に応じ
て、メモリへのデータ書き込みを許可する書き込み制御
回路であって、 電源電圧がCPUの動作保証電圧より高い電圧であっ
て、通常の電源電圧より低い状態においてリセット信号
を発生するリセット信号発生回路と、 このリセット信号発生回路からリセット信号が発生して
いるときに、書き込み制御信号による書き込み許可を禁
止するプロテクト回路と、 を有することを特徴とする書き込み制御回路。
1. A write control circuit for permitting data writing to a memory in response to a write control signal from a CPU, wherein the power supply voltage is higher than the operation guarantee voltage of the CPU and is lower than the normal power supply voltage. A reset signal generating circuit that generates a reset signal in a low state; and a protect circuit that prohibits writing by a write control signal when the reset signal is generated from the reset signal generating circuit. Write control circuit.
【請求項2】 書き込み制御信号に応じて、メモリへの
データ書き込みを許可する書き込み制御回路であって、 CPUにより信号出力が制御される汎用I/Oポート
と、 この汎用I/Oポートから書き込み許可信号が出力され
ていないときに、書き込み制御信号による書き込み許可
を禁止するプロテクト回路と、 を有することを特徴とする書き込み制御回路。
2. A write control circuit for permitting data writing to a memory according to a write control signal, comprising: a general-purpose I / O port whose signal output is controlled by a CPU; A write control circuit, comprising: a protection circuit for prohibiting write permission by a write control signal when a permission signal is not output.
JP2000288909A 2000-09-22 2000-09-22 Writing control circuit Pending JP2002099468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000288909A JP2002099468A (en) 2000-09-22 2000-09-22 Writing control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000288909A JP2002099468A (en) 2000-09-22 2000-09-22 Writing control circuit

Publications (1)

Publication Number Publication Date
JP2002099468A true JP2002099468A (en) 2002-04-05

Family

ID=18772406

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000288909A Pending JP2002099468A (en) 2000-09-22 2000-09-22 Writing control circuit

Country Status (1)

Country Link
JP (1) JP2002099468A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013115866A (en) * 2011-11-25 2013-06-10 Mitsubishi Electric Corp Control device, storage device, and display device
JPWO2020255997A1 (en) * 2019-06-21 2020-12-24
JP2022182955A (en) * 2021-05-26 2022-12-08 三菱電機株式会社 Nonvolatile memory writing device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013115866A (en) * 2011-11-25 2013-06-10 Mitsubishi Electric Corp Control device, storage device, and display device
JPWO2020255997A1 (en) * 2019-06-21 2020-12-24
WO2020255997A1 (en) * 2019-06-21 2020-12-24 京セラ株式会社 Electronic apparatus, vehicle, and control method
US11782827B2 (en) 2019-06-21 2023-10-10 Kyocera Corporation Electronic device, vehicle, and control method for controlling a non-volatile memory based on a detected voltage drop
JP7407188B2 (en) 2019-06-21 2023-12-28 京セラ株式会社 Electronic equipment, vehicles, and control methods
JP2022182955A (en) * 2021-05-26 2022-12-08 三菱電機株式会社 Nonvolatile memory writing device

Similar Documents

Publication Publication Date Title
US5991849A (en) Rewriting protection of a size varying first region of a reprogrammable non-volatile memory
JP2010086523A (en) Secure memory interface
TWI534809B (en) A non-volatile memory device for which control information may be set from an external source
EP0806772A2 (en) Method and apparatus for providing erasing and programming protection for electrically erasable programmable read only memory
JPH07114497A (en) Semiconductor integrated circuit device
WO2016180093A1 (en) Read/write control circuit and method for flash chip, and amoled application circuit
US6836433B2 (en) Rewrite disable control method for determining rewrite enable/disable based on result of majority decision
US10628302B2 (en) Semiconductor storage device
US20090070523A1 (en) Flash memory device storing data with multi-bit and single-bit forms and programming method thereof
JP2000268584A (en) Nonvolatile semiconductor storage device and its manufacture
KR100377608B1 (en) Data processor and method of processing data
US6728136B2 (en) Electronically rewritable non-volatile semiconductor memory device
US7310277B2 (en) Non-volatile semiconductor storage device with specific command enable/disable control signal
JP2002099468A (en) Writing control circuit
JP2710890B2 (en) Memory designation controller
JP2002366436A (en) Circuit and method for preventing erroneous erasure and erroneous writing of non-volatile memory
KR100334201B1 (en) Semiconductor memory device
JP2005078489A (en) Microcontroller and its control method
US20230335198A1 (en) Semiconductor device
JP2002269988A (en) Non-volatile semiconductor memory
JP2004062978A (en) Nonvolatile semiconductor storage device
JP2701790B2 (en) Nonvolatile semiconductor memory device
JP2006277012A (en) Semiconductor integrated circuit
US8806107B2 (en) Semiconductor integrated circuit and method of controlling memory
JP2001014872A (en) Erroneous write prevention system for nonvolatile semiconductor memory