JP2016057817A - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP2016057817A
JP2016057817A JP2014183335A JP2014183335A JP2016057817A JP 2016057817 A JP2016057817 A JP 2016057817A JP 2014183335 A JP2014183335 A JP 2014183335A JP 2014183335 A JP2014183335 A JP 2014183335A JP 2016057817 A JP2016057817 A JP 2016057817A
Authority
JP
Japan
Prior art keywords
reset
input
data
reset signal
terminal
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
JP2014183335A
Other languages
Japanese (ja)
Other versions
JP6340291B2 (en
Inventor
祐輔 宇田川
Yusuke Udagawa
祐輔 宇田川
英卓 橋本
Hidetaka Hashimoto
英卓 橋本
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2014183335A priority Critical patent/JP6340291B2/en
Publication of JP2016057817A publication Critical patent/JP2016057817A/en
Application granted granted Critical
Publication of JP6340291B2 publication Critical patent/JP6340291B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent data from being broken during execution of writing processing on a memory in spite of initialization request input by a reset switch.SOLUTION: An information processing device comprises: a reset generation part which outputs a first reset signal in response to an initialization request; a delay part which outputs a second reset signal after a predetermined delay time has elapsed since the first reset signal is input; a control part comprising an input terminal for receiving the first reset signal and a reset terminal for receiving the second reset signal; and a storage part comprising a reset terminal for receiving the second reset signal, the control part confirming whether the first reset signal is received before making a request to write data to the storage part and not executing data writing to the storage part when the first reset signal is received.SELECTED DRAWING: Figure 5

Description

この発明は、情報処理装置に関し、特に、CPUおよびメモリ等の動作を初期化あるいは停止させることのできるリセット制御機能を有する情報処理装置に関する。   The present invention relates to an information processing apparatus, and more particularly to an information processing apparatus having a reset control function capable of initializing or stopping operations of a CPU and a memory.

従来から、情報処理装置は、一般的に、CPU,ROM,RAM,フラッシュメモリ,I/Oコントローラなどを備えたマイクロコンピュータが用いられ、CPUが、ROM等に記憶されているプログラムに基づいて、要求されたデータを、RAMやフラッシュメモリに対して読出/書込をして、各種ハードウェアを動作させることにより、所望の機能を実行している。
このような情報処理装置では、強制的に供給電源をOFFにしたり、初期化させるためのリセットスイッチが設けられているものがある。
Conventionally, an information processing apparatus generally uses a microcomputer including a CPU, ROM, RAM, flash memory, I / O controller, etc., and the CPU is based on a program stored in the ROM or the like. The requested function is executed by reading / writing the requested data to / from the RAM or flash memory and operating various hardware.
Some of such information processing apparatuses are provided with a reset switch for forcibly turning off the power supply or for initialization.

リセットスイッチが押し下げられると、CPU,ROM,RAM,フラッシュメモリなどのハードウェアに、ほぼ同時に、リセット信号が与えられ、それぞれのハードウェアが初期化されたり、電源電圧の供給が停止される。
もし、CPUからの書込み命令がフラッシュメモリに与えられ、フラッシュメモリにデータを書き込んでいる途中に、リセットスイッチが押し下げられた場合、フラッシュメモリへの電源供給が一旦停止されるので、書込み中のデータが破損し、データの書込み誤りやその後のデータ読出エラーが発生する場合があった。
When the reset switch is depressed, a reset signal is given to hardware such as CPU, ROM, RAM, and flash memory almost simultaneously, and the hardware is initialized or the supply of power supply voltage is stopped.
If a write command from the CPU is given to the flash memory and the reset switch is pushed down while data is being written to the flash memory, the power supply to the flash memory is temporarily stopped, so the data being written May be damaged, resulting in data write errors and subsequent data read errors.

特許文献1では、書込み可能ROMや不揮発性RAMにデータを書き込んでいる時にリセット信号が発生しても、書込み誤りを防止するために、CPUに供給する第1リセット信号より遅延したリセット信号を書込み可能ROMおよび不揮発性RAMに供給するようにしたリセット信号発生回路が提案されている。   In Patent Document 1, even if a reset signal is generated when data is written to a writable ROM or nonvolatile RAM, a reset signal delayed from the first reset signal supplied to the CPU is written in order to prevent a write error. There has been proposed a reset signal generating circuit which is supplied to a possible ROM and a non-volatile RAM.

特開2001−142792号公報JP 2001-142792 A

しかし、従来のリセット信号を制御する装置では、リセット信号の入力の有無にかかわらず、CPUからRAM等のメモリに対してデータの書込み命令が与えられ、また、リセットスイッチ押下時に、いわゆるチャタリングが発生して、リセット信号が入力されたことが誤検出されてしまう場合があった。
RAMやフラッシュメモリ等のメモリへのデータの書込処理時において、書込みデータの破損を確実に防止するためには、リセット信号の入力の有無を確認してから、CPUからメモリへ書込み命令を送信することが望まれる。
そこで、この発明は、以上のような事情を考慮してなされたものであり、リセットスイッチが押下げられたこと等により発生したリセット信号と、メモリに対する書込要求とのタイミングを考慮して、メモリに書込まれるデータが破損するのを防止することを課題とする。
However, in a conventional device for controlling a reset signal, a data write command is given from a CPU to a memory such as a RAM regardless of whether the reset signal is input, and so-called chattering occurs when the reset switch is pressed. As a result, it may be erroneously detected that the reset signal has been input.
In order to prevent damage to the write data during the process of writing data to a memory such as RAM or flash memory, after confirming whether a reset signal has been input, send a write command from the CPU to the memory. It is desirable to do.
Therefore, the present invention has been made in view of the above circumstances, and in consideration of the timing of the reset signal generated due to the reset switch being pressed and the like, and the write request to the memory, It is an object to prevent data written to a memory from being damaged.

この発明は、初期化要求に対応して第1リセット信号を出力するリセット発生部と、前記第1リセット信号が入力された後、所定の遅延時間が経過した後に、第2リセット信号を出力する遅延部と、前記第1リセット信号を入力する入力端子および前記第2リセット信号を入力するリセット端子とを備えた制御部と、前記第2リセット信号を入力するリセット端子を備えた記憶部とを備え、前記制御部が、前記記憶部へのデータの書込要求を行う前に、前記第1リセット信号の入力の有無を確認し、前記第1リセット信号が入力されている場合には、前記記憶部へのデータ書込みを実行しないことを特徴とする情報処理装置を提供するものである。   According to the present invention, a reset generation unit that outputs a first reset signal in response to an initialization request, and a second reset signal that is output after a predetermined delay time has elapsed after the first reset signal has been input. A control unit including a delay unit, an input terminal for inputting the first reset signal and a reset terminal for inputting the second reset signal, and a storage unit including a reset terminal for inputting the second reset signal. And the controller checks whether or not the first reset signal is input before making a data write request to the storage unit, and if the first reset signal is input, An information processing apparatus is provided that does not execute data writing to a storage unit.

また、前記制御部が、前記第1リセット信号の入力の有無を確認したときに、前記第1リセット信号が入力されていない場合に、前記記憶部へのデータ書込みを実行することを特徴とする。
これによれば、初期化要求に対応して出力された第1リセット信号が入力されていない場合に、記憶部へのデータの書込みが実行され、上記のように第1リセット信号が入力されている場合には、データの書込みは実行されないので、書込みデータが破損することがないタイミングで、データの書込みが開始される。
In addition, when the control unit confirms whether or not the first reset signal is input, if the first reset signal is not input, data writing to the storage unit is executed. .
According to this, when the first reset signal output in response to the initialization request is not input, the data writing to the storage unit is executed, and the first reset signal is input as described above. In the case where the data is written, the data writing is not executed. Therefore, the data writing is started at a timing at which the written data is not damaged.

また、前記制御部の入力端子は、汎用入力端子であり、前記遅延時間には、前記記憶部にデータを書き込むのにかかる最大書込時間と、前記記憶部のデータを消去するのにかかる最大消去時間のいずれよりも長い時間が予め設定され、前記第2リセット信号は、前記記憶部において、データの書込処理が実際に行われていない時間に、前記遅延部から前記制御部および前記記憶部に出力されることを特徴とする。
これによれば、データの書込処理が行われていない時間に、第2リセット信号が、制御部および記憶部に出力されるので、書込みデータが破損することを防止できる。
The input terminal of the control unit is a general-purpose input terminal, and the delay time includes a maximum writing time required to write data to the storage unit and a maximum time required to erase data in the storage unit. A time longer than any of the erasing times is preset, and the second reset signal is transmitted from the delay unit to the control unit and the storage at a time when the data writing process is not actually performed in the storage unit. It is output to the part.
According to this, since the second reset signal is output to the control unit and the storage unit when the data writing process is not performed, it is possible to prevent the write data from being damaged.

また、強制的な初期化要求を入力するためのリセットスイッチを有する入力部をさらに備え、前記リセットスイッチを押し下げる入力操作がされたときに、前記リセット発生部が、前記第1リセット信号を出力することを特徴とする。
また、前記第1リセット信号が前記制御部の入力端子に入力された後、所定時間以上経過しても前記第1リセット信号が入力されている場合に、前記記憶部へのデータの書込みを実行しないことを特徴とする。これによれば、後述する実施例2に記載したように、リセット信号の誤検出を防止できる。
また、前記記憶部は、複数のページからなるメモリセルを備えたフラッシュメモリであってもよく、前記メモリセルに対するデータの書き込みおよび読み出しは、前記ページ単位で行われることを特徴とする。この発明によれば、フラッシュメモリのメモリセルに書き込まれるべきデータの破損を防止できる。
In addition, an input unit having a reset switch for inputting a forced initialization request is further provided, and the reset generation unit outputs the first reset signal when an input operation is performed to depress the reset switch. It is characterized by that.
In addition, after the first reset signal is input to the input terminal of the control unit, if the first reset signal is input even after a predetermined time has elapsed, data is written to the storage unit It is characterized by not. According to this, as described in Example 2 described later, it is possible to prevent erroneous detection of the reset signal.
In addition, the storage unit may be a flash memory including memory cells composed of a plurality of pages, and writing and reading of data to and from the memory cells are performed in units of pages. According to the present invention, it is possible to prevent the data to be written to the memory cell of the flash memory from being damaged.

この発明によれば、制御部が第1リセット信号の入力の有無を確認し、第1リセット信号が入力されている場合には、記憶部へのデータの書込みを実行しないので、初期化要求が行われた後には記憶部に対するデータの書込処理が行われることはなく、リセット要求発生時に書込処理によるデータの破損を未然に防止できる。   According to the present invention, the control unit checks whether or not the first reset signal is input, and when the first reset signal is input, the data is not written to the storage unit. After being performed, the data writing process to the storage unit is not performed, and it is possible to prevent the data from being damaged by the writing process when a reset request is generated.

この発明の情報処理装置のリセット処理に関係する部分の概略構成ブロック図である。It is a schematic structure block diagram of the part relevant to the reset process of the information processing apparatus of this invention. この発明のフラッシュメモリの一実施例の構成を示すブロック図である。1 is a block diagram showing a configuration of an embodiment of a flash memory according to the present invention. FIG. この発明のリセット処理の一実施例を説明するタイムチャートである。It is a time chart explaining one Example of the reset process of this invention. この発明の消去処理時におけるリセット処理の一実施例のタイムチャートである。It is a time chart of one Example of the reset process at the time of the erasure | elimination process of this invention. この発明のリセット処理の実施例1のフローチャートである。It is a flowchart of Example 1 of the reset process of this invention. この発明のリセット処理の実施例2のフローチャートである。It is a flowchart of Example 2 of the reset process of this invention.

以下に、本発明を実施するための最良の形態について図面を参照して説明する。なお、これによって、この発明が限定されるものではない。
以下の実施例では、上記した第1リセット信号は、リセット開始信号に相当し、第2リセット信号は、リセット要求信号に相当する。
<情報処理装置の構成>
図1に、この発明の情報処理装置のリセット処理に関係する部分の構成ブロック図を示す。
図1において、リセット発生部1は、初期化要求に対応してリセット開始信号を出力する部分であり、ユーザが初期化のための入力操作(リセット要求入力)をした場合に、リセット開始信号Rstを出力する部分である。
リセット要求入力としては、たとえば、リセットスイッチ12の押下げあるいは電源スイッチ13の所定秒数以上の長押しなどがある。リセットスイッチ12および電源スイッチ13は、ユーザが強制的な初期化要求を入力するための入力部に相当する。
リセット発生部1は、リセットスイッチ12などから、リセット要求入力があることを常に監視する。
The best mode for carrying out the present invention will be described below with reference to the drawings. However, this does not limit the present invention.
In the following embodiments, the first reset signal described above corresponds to a reset start signal, and the second reset signal corresponds to a reset request signal.
<Configuration of information processing apparatus>
FIG. 1 shows a configuration block diagram of a portion related to reset processing of the information processing apparatus of the present invention.
In FIG. 1, a reset generation unit 1 is a part that outputs a reset start signal in response to an initialization request. When the user performs an input operation for initialization (reset request input), a reset start signal Rst Is the part that outputs
The reset request input includes, for example, pressing down the reset switch 12 or long pressing the power switch 13 for a predetermined number of seconds. The reset switch 12 and the power switch 13 correspond to an input unit for a user to input a forced initialization request.
The reset generation unit 1 always monitors whether there is a reset request input from the reset switch 12 or the like.

また、リセット発生部1は、リセット開始信号Rstを出力する端子RO11を備える。
リセット発生部1が、ユーザによってリセットスイッチ12を押し下げる入力操作がされたことを確認すると、出力端子RO11から、リセット開始信号Rstを出力する。
以下の実施例では、リセット開始信号Rstが出力された場合、出力端子ROがH状態(たとえば、+5V)となり、出力されていない場合、出力端子ROはL状態(たとえば、0V)となるものとする。
このリセット開始信号Rstは、遅延部2と、制御部(CPU)3に与えられる。
The reset generator 1 includes a terminal RO11 that outputs a reset start signal Rst.
When the reset generation unit 1 confirms that an input operation for depressing the reset switch 12 is performed by the user, a reset start signal Rst is output from the output terminal RO11.
In the following embodiments, when the reset start signal Rst is output, the output terminal RO is in the H state (for example, +5 V), and when not output, the output terminal RO is in the L state (for example, 0 V). To do.
This reset start signal Rst is given to the delay unit 2 and the control unit (CPU) 3.

遅延部2は、入力開始信号Rstが入力された後、所定の時間(遅延時間Trd)が経過した後に、リセットを要求する信号(リセット要求信号Rrqと呼ぶ)を出力する部分である。
遅延部2は少なくとも、リセット開始信号Rstを入力する入力端子と、リセット要求信号Rrqを出力する端子RD21を備え、抵抗、コンデンサ等からなる既存の遅延回路によって構成される。
遅延時間Trdの長さは、後述するように、たとえば、記憶部4がフラッシュメモリの場合、フラッシュメモリへの書込みデータの破損防止を行う観点から、CPUから与えられたフラッシュメモリに書込むべきデータをフラッシュメモリのメモリセルに書き込むのにかかる最大書込時間と、メモリセルのデータを消去するのにかかる最大消去時間のいずれよりも長い時間が、予め設定される。
The delay unit 2 is a part that outputs a signal (referred to as a reset request signal Rrq) requesting reset after a predetermined time (delay time Trd) has elapsed after the input start signal Rst is input.
The delay unit 2 includes at least an input terminal for inputting a reset start signal Rst and a terminal RD21 for outputting a reset request signal Rrq, and is configured by an existing delay circuit including a resistor, a capacitor, and the like.
As will be described later, for example, when the storage unit 4 is a flash memory, the length of the delay time Trd is data to be written to the flash memory given from the CPU from the viewpoint of preventing damage to data written to the flash memory. Is set in advance to be longer than both the maximum write time required to write the data in the memory cell of the flash memory and the maximum erase time required to erase the data in the memory cell.

リセット要求信号Rrqも、リセット開始信号Rstと同様に、H状態とL状態とからなる2値信号であり、リセットを行いたい電子部品のリセット端子に与えられる。
たとえば、図1に示すように、リセット要求信号Rrqは、制御部(CPU)3や、記憶部(フラッシュメモリ)4に与えられるが、特に、記憶部4において、データの書込み処理が実際に行われていない時間に、遅延部2から、制御部3および記憶部4に出力される。
リセット端子は、主として、リセット信号が入力されることによって、その端子を有する電子部品の機能を初期化するための端子であり、リセット端子にリセット信号が入力されると、ただちに、電子部品の初期化が行われる。
Similarly to the reset start signal Rst, the reset request signal Rrq is a binary signal composed of an H state and an L state, and is given to a reset terminal of an electronic component to be reset.
For example, as shown in FIG. 1, the reset request signal Rrq is given to the control unit (CPU) 3 and the storage unit (flash memory) 4. In particular, in the storage unit 4, data write processing is actually performed. At a time when the delay is not performed, the signal is output from the delay unit 2 to the control unit 3 and the storage unit 4.
The reset terminal is a terminal mainly for initializing the function of the electronic component having the terminal when a reset signal is input. Immediately after the reset signal is input to the reset terminal, the initial state of the electronic component is reset. Is done.

制御部3は、情報処理装置の機能を実行する部分であり、たとえば、CPU(中央演算処理装置)に相当する。
あるいは、CPU,ROM,RAM,I/Oコントローラ,タイマー等などを内蔵して1チップ化されたマイクロコンピュータも、制御部3に相当する。
以下、制御部3として、CPUを用いる場合について説明する。
CPU3は、多数の汎用入出力端子(I/O端子)を有し、リセット端子CR32を有している。
汎用入力端子PINとして、複数個の入力端子を有しているが、この発明では、そのうちの1つの入力端子RI31に、上記したリセット開始信号Rstを入力する。
すなわち、リセット発生部1の出力端子RO11と、CPU3の入力端子RI31とを、電気的に接続する。
リセット端子CR32は、上記したリセット要求信号Rrqを入力する端子であり、たとえばH状態のリセット要求信号が所定時間以上入力された場合に、CPUを初期化するための端子である。
入力端子RI31にリセット開始信号Rstが入力されても、CPUは、初期化されないが、リセット端子CR32にリセット要求信号Rrqが入力された場合、CPUは、強制的に初期化される。
The control part 3 is a part which performs the function of information processing apparatus, for example, is corresponded to CPU (central processing unit).
Alternatively, a microcomputer that incorporates a CPU, a ROM, a RAM, an I / O controller, a timer, and the like into one chip corresponds to the control unit 3.
Hereinafter, a case where a CPU is used as the control unit 3 will be described.
The CPU 3 has a large number of general-purpose input / output terminals (I / O terminals) and a reset terminal CR32.
The general-purpose input terminal PIN has a plurality of input terminals. In the present invention, the reset start signal Rst is input to one of the input terminals RI31.
That is, the output terminal RO11 of the reset generator 1 and the input terminal RI31 of the CPU 3 are electrically connected.
The reset terminal CR32 is a terminal for inputting the above-described reset request signal Rrq. For example, when a reset request signal in the H state is input for a predetermined time or more, the reset terminal CR32 is a terminal for initializing the CPU.
Even if the reset start signal Rst is input to the input terminal RI31, the CPU is not initialized. However, when the reset request signal Rrq is input to the reset terminal CR32, the CPU is forcibly initialized.

また、この発明では、CPU3は、入力端子RI31にリセット開始信号Rstが入力されたことを確認した場合に、記憶部4に対するデータ書込要求が発生したとしても、記憶部4に、書込要求コマンド(以下、Wコマンドと呼ぶ)を発行しない。
言いかえれば、記憶部4に対するデータの書込要求が発生した場合において、記憶部4へ書込要求コマンドの送信を行う前に、入力端子RI31にリセット開始信号Rstが入力されているか否かを確認し、リセット開始信号Rstが入力されている場合には、記憶部4へのデータ書込みを実行しない。すなわち、制御部3は、記憶部4に対して、書込要求コマンド(Wコマンド)を発行しない。
このように、リセット開始信号Rstが入力されてから、一定時間経過後にリセット端子CR32にリセット要求信号Rrqが入力される可能性がある場合は、書込要求コマンドを記憶部4に対して発行しないことによって、記憶部4へ書込むべきデータが破損することを未然に防止する。
一方、上記リセット開始信号Rstの入力の有無を確認したときに、リセット開始信号Rstが入力されていない場合に、記憶部4へのデータの書込みを実行するようにする。
In the present invention, even when a data write request to the storage unit 4 is generated when the CPU 3 confirms that the reset start signal Rst is input to the input terminal RI31, the CPU 3 sends a write request to the storage unit 4. No command (hereinafter referred to as W command) is issued.
In other words, whether or not the reset start signal Rst is input to the input terminal RI31 before sending a write request command to the storage unit 4 when a data write request to the storage unit 4 occurs. If the reset start signal Rst is input, data writing to the storage unit 4 is not executed. That is, the control unit 3 does not issue a write request command (W command) to the storage unit 4.
As described above, when there is a possibility that the reset request signal Rrq is input to the reset terminal CR32 after a predetermined time has elapsed after the reset start signal Rst is input, the write request command is not issued to the storage unit 4. As a result, the data to be written to the storage unit 4 is prevented from being damaged.
On the other hand, when it is confirmed whether or not the reset start signal Rst is input, if the reset start signal Rst is not input, data is written to the storage unit 4.

データ端子DT33は、データ、アドレスおよびコマンドを入出力する端子であり、主として、記憶部4と接続されたデータライン(I/Oライン)51に接続される。
R/B端子34は、R/Bライン52に接続された他の電子部品からCPUに対して、ReadyあるいはBusyであることの通知を受信するための入力端子である。
たとえば、記憶部4のフラッシュメモリが、そのメモリセルに対して読み出しあるいは書き込みを行っている場合、R/Bライン52を介して、そのフラッシュメモリがBusy状態であることがCPU3に通知される。
The data terminal DT33 is a terminal for inputting / outputting data, addresses and commands, and is mainly connected to a data line (I / O line) 51 connected to the storage unit 4.
The R / B terminal 34 is an input terminal for receiving a notice of Ready or Busy from another electronic component connected to the R / B line 52 to the CPU.
For example, when the flash memory in the storage unit 4 is reading from or writing to the memory cell, the CPU 3 is notified via the R / B line 52 that the flash memory is busy.

制御端子CNT35は、種々の制御信号を、制御ライン53を介して他の電子部品に与える出力端子である。
制御端子CNT35は、複数の端子から構成され、たとえば、ALE(アドレスラッチイネーブル)、CLE(コマンドラッチイネーブル)、CE(チップイネーブル)、WE(ライトイネーブル)、RE(リードイネーブル)などの制御信号を、それぞれ制御ライン53に送信する端子群からなる。
ALE,CLEは、データライン51を介して入出力される情報がデータ、コマンドあるいはアドレスであることを区別するための制御信号であり、CEは、データバスをCPUが使用中であることを示す制御信号であり、WEは、データライン51を介して、記憶部4にデータを書込み中であることを示す制御信号であり、REは、記憶部4からデータを読出し中であることを示す制御信号である。
The control terminal CNT35 is an output terminal that supplies various control signals to other electronic components via the control line 53.
The control terminal CNT35 includes a plurality of terminals. For example, the control terminal CNT35 receives control signals such as ALE (address latch enable), CLE (command latch enable), CE (chip enable), WE (write enable), and RE (read enable). , Each of which consists of a terminal group that transmits to the control line 53.
ALE and CLE are control signals for distinguishing whether information input / output via the data line 51 is data, command or address, and CE indicates that the CPU is using the data bus. WE is a control signal indicating that data is being written to the storage unit 4 via the data line 51, and RE is a control indicating that data is being read from the storage unit 4. Signal.

たとえば、CPU3からフラッシュメモリ4に対し、データを書き込む場合は、WE信号を制御ライン53に出力した状態で、書込むデータ(D1,D2,…Dn)をデータライン51に出力した後、書込要求コマンド(Wコマンド)をデータライン51に送信する。
その後、フラッシュメモリのメモリセルにデータの書込みを実行中は、R/Bライン52に、フラッシュメモリ4からCPU3に対して、Busy信号が送信される。
For example, when data is written from the CPU 3 to the flash memory 4, the data (D 1, D 2,... Dn) to be written is output to the data line 51 in a state where the WE signal is output to the control line 53. A request command (W command) is transmitted to the data line 51.
Thereafter, a Busy signal is transmitted from the flash memory 4 to the CPU 3 to the R / B line 52 while data is being written to the memory cell of the flash memory.

記憶部4は、情報を記憶する部分であり、ROM,RAM,フラッシュメモリなどの半導体記憶素子に相当する。
以下の実施例では、記憶部4として、フラッシュメモリを用いる場合について説明する。
フラッシュメモリ4も、主として、リセット端子FR41、データ端子DT43、R/B端子44、制御端子CNT45を備える。
データ端子DT43は、データライン51を介して、CPU3のデータ端子DT33に接続され、R/B端子44は、R/Bライン52を介して、CPU3のR/B端子34に接続され、複数個の制御端子CNT45は、制御ライン53を介して、それぞれ対応するCPU3の制御端子35に接続される。
リセット端子FR41は、上記したリセット要求信号Rrqを入力する端子であり、たとえば、H状態のリセット要求信号が所定時間以上入力された場合に、ただちにフラッシュメモリ自体を初期化するための端子である。
The storage unit 4 is a part that stores information, and corresponds to a semiconductor storage element such as a ROM, a RAM, or a flash memory.
In the following embodiments, a case where a flash memory is used as the storage unit 4 will be described.
The flash memory 4 also mainly includes a reset terminal FR41, a data terminal DT43, an R / B terminal 44, and a control terminal CNT45.
The data terminal DT43 is connected to the data terminal DT33 of the CPU 3 via the data line 51, and the R / B terminal 44 is connected to the R / B terminal 34 of the CPU 3 via the R / B line 52. The control terminals CNT45 are connected to the control terminals 35 of the corresponding CPUs 3 through the control lines 53, respectively.
The reset terminal FR41 is a terminal for inputting the above-described reset request signal Rrq. For example, when the reset request signal in the H state is input for a predetermined time or more, the reset terminal FR41 is a terminal for immediately initializing the flash memory itself.

この発明では、遅延部2から出力されたリセット要求信号Rrqが、CPU3のリセット端子CR32と、フラッシュメモリ4のリセット端子FR41に、ほぼ同時に入力される。
上記したように、リセット発生部1からリセット開始信号Rstが出力されても、フラッシュメモリのメモリセルへの書込処理および消去処理にかかる時間よりも長い遅延時間が経過した後に、リセット要求信号Rrqが、フラッシュメモリ4のリセット端子FR41に入力される。
すなわち、この発明では、フラッシュメモリのメモリセルへの書込処理中に、リセット要求信号Rrqがリセット端子FR41へ入力されないように遅延時間が設定され、メモリセルへの書込処理が実際に行われていないときに、遅延部2から出力されたリセット要求信号Rrqがリセット端子FRに入力されるようにする。
In the present invention, the reset request signal Rrq output from the delay unit 2 is input to the reset terminal CR32 of the CPU 3 and the reset terminal FR41 of the flash memory 4 almost simultaneously.
As described above, even when the reset start signal Rst is output from the reset generation unit 1, the reset request signal Rrq after a delay time longer than the time required for the writing process and the erasing process in the memory cell of the flash memory has elapsed. Is input to the reset terminal FR41 of the flash memory 4.
That is, according to the present invention, during the writing process to the memory cell of the flash memory, the delay time is set so that the reset request signal Rrq is not input to the reset terminal FR41, and the writing process to the memory cell is actually performed. If not, the reset request signal Rrq output from the delay unit 2 is input to the reset terminal FR.

<フラッシュメモリの構成>
図2に、フラッシュメモリ4の一実施例の構成ブロック図を示す。
図2(a)において、NAND型のフラッシュメモリの概略構成を示しており、フラッシュメモリ4は、主として、コントローラ46と、メモリセル47と、ページバッファ48とから構成される。
NAND型フラッシュメモリ4は、一般的に、アドレスバスを有さず、書込みコマンドや読出しコマンド等が、データライン51を介してデータ端子43から入出力され、書込み開始、ページアドレス指定、メモリセルの書き換え、ページデータの読出し等の処理が行われる。
<Configuration of flash memory>
FIG. 2 shows a configuration block diagram of an embodiment of the flash memory 4.
FIG. 2A shows a schematic configuration of a NAND flash memory. The flash memory 4 is mainly composed of a controller 46, a memory cell 47, and a page buffer 48.
The NAND flash memory 4 generally does not have an address bus, and a write command, a read command, and the like are input / output from the data terminal 43 via the data line 51, and write start, page address designation, memory cell Processing such as rewriting and reading of page data is performed.

コマンド、指定アドレスおよび書込みデータは、いずれも、データライン51を介して、コントローラ46に入力され、コマンド等の区別は、制御端子45に入力された制御信号に基づいて行われる。
たとえば、ALEがそれに対応する制御端子45に入力されている状態において、データ端子43に入力されたデータはアドレスであり、CLEが対応する制御端子45に入力されている状態において、データ端子43に入力されたデータは、コマンドとして処理される。
The command, the specified address, and the write data are all input to the controller 46 via the data line 51, and the command is distinguished based on the control signal input to the control terminal 45.
For example, when ALE is input to the corresponding control terminal 45, the data input to the data terminal 43 is an address, and when CLE is input to the corresponding control terminal 45, The input data is processed as a command.

コントローラ46は、外部から入出力される制御信号を利用して、メモリセル47に対するデータの読み出しと書き込みを制御する部分である。
データの読み出しおよび書き込みは、ページバッファ48を介して行う。
ページバッファ48は、メモリセル47に格納すべきデータを一時記憶する部分であり、揮発性メモリである。
メモリセル47は、複数のページからなる不揮発性メモリであり、ページという単位で、データの書き込みおよび読み出しが行われるメモリである。また、複数のページからなるブロックという単位でデータの消去処理が行われる。
また、フラッシュメモリでは、データをメモリセル47に書き込む場合、所望のページにそのデータを直接上書きすることはできず、一旦所定のブロック領域のデータを読出し、一時的に保持しておき、そのブロック領域を消去した後に、書き込むべきデータを含む保持データを、消去したブロック領域に書き戻す(書き換える)ことが行われる。
The controller 46 is a part that controls reading and writing of data with respect to the memory cell 47 using a control signal input / output from the outside.
Data reading and writing are performed via the page buffer 48.
The page buffer 48 is a part that temporarily stores data to be stored in the memory cell 47 and is a volatile memory.
The memory cell 47 is a non-volatile memory including a plurality of pages, and is a memory in which data is written and read in units of pages. In addition, data erasure processing is performed in units of blocks composed of a plurality of pages.
In addition, in the flash memory, when data is written to the memory cell 47, the data cannot be directly overwritten on a desired page, but data in a predetermined block area is once read and temporarily stored in the block. After erasing the area, the held data including the data to be written is written back (rewritten) to the erased block area.

コントローラ46がデータライン51から書込みデータ(D1〜Dn)を受信した場合、その書込みデータは、まず、ページバッファ48に転送される。その後、データライン51を介して書込要求コマンド(Wコマンド)が入力された場合に、ページバッファ48に一時記憶されていたデータが、メモリセル47の中の指定されたページに、書き込まれる。
メモリセル47へデータを書き込んでいる間は、R/B端子44から、R/Bライン52を介して、CPU3に対して、Busy信号が出力される。
R/B端子44から出力される信号として、Ready信号と、Busy信号とがある。Ready信号は、現在準備状態であり、外部からの制御信号を受け入れることが可能な状態であることを示し、Busy信号は、現在書込み等の内部処理を実行中であって、外部からの制御信号を受け入れることができない状態であることを示している。
以下の説明では、R/B端子44がL状態の場合、Ready信号の出力状態とし、H状態の場合、Busy信号の出力状態であるとする。
When the controller 46 receives write data (D 1 to Dn) from the data line 51, the write data is first transferred to the page buffer 48. Thereafter, when a write request command (W command) is input via the data line 51, the data temporarily stored in the page buffer 48 is written to the designated page in the memory cell 47.
While data is being written to the memory cell 47, a Busy signal is output from the R / B terminal 44 to the CPU 3 via the R / B line 52.
As signals output from the R / B terminal 44, there are a Ready signal and a Busy signal. The Ready signal indicates that it is currently in a ready state and is capable of accepting an external control signal. The Busy signal is currently executing internal processing such as writing, and an external control signal. Is in a state where it cannot accept.
In the following description, it is assumed that when the R / B terminal 44 is in the L state, it is in the output state of the Ready signal, and in the H state, it is in the output state of the Busy signal.

図2(b)に、データ端子DT43に入力される情報と、R/B端子44から出力される信号の一実施例のタイムチャートを示す。
図2(b)において、まず、データライン51を介して、書込みデータ(D1〜Dn)が入力されたとすると、その入力された書込みデータ(D1〜Dn)が、ページバッファ48に転送される。
このページバッファ48への転送期間においては、書込みデータは、ページバッファ48に記憶されているだけなので、もしリセットがかかり、ページバッファ48に記憶されているデータが消去されたとしても、メモリセル47に記憶されているデータに影響を及ぼすことはなく、書込みデータそのものはまだ保存されてはいないが、破損が生じることもない。
FIG. 2B shows a time chart of an embodiment of information input to the data terminal DT43 and a signal output from the R / B terminal 44.
In FIG. 2B, first, assuming that write data (D1 to Dn) is input via the data line 51, the input write data (D1 to Dn) is transferred to the page buffer 48.
During the transfer period to the page buffer 48, the write data is only stored in the page buffer 48. Therefore, even if a reset is applied and the data stored in the page buffer 48 is erased, the memory cell 47 The data stored in the memory is not affected, and the written data itself is not yet saved, but no damage occurs.

その後、ページバッファ48へのデータ(D1〜Dn)の転送が終了した後、データ端子43に、書込要求コマンド(Wコマンド)が入力される。
コントローラ46が、Wコマンドを確認した場合、R/B端子44から、Busy信号が出力され、データライン51はBusy状態となってページバッファ48に記憶されていたデータ(D1〜Dn)が、メモリセル47の所定のページの位置に、書き込まれる。
メモリセル47へデータを書き込んでいる間(メモリセル転送期間)は、R/B端子44からは、H状態のBusy信号が出力されている。
メモリセル47への書込みが終了した後、すなわちメモリセル転送期間が経過した後、R/B端子44からReady信号が出力される。
この発明では、上記のメモリセル転送期間中においては、リセット要求信号Rrqが、リセット端子FR41に入力されることがないようにする。
さらに、CPU3において、データの書込要求が発生したとしても、リセット開始信号Rstがすでに入力されていた場合には、データライン51を介して、フラッシュメモリ4に対して書込要求コマンドを転送しないようにする。
Thereafter, after the transfer of data (D1 to Dn) to the page buffer 48 is completed, a write request command (W command) is input to the data terminal 43.
When the controller 46 confirms the W command, the Busy signal is output from the R / B terminal 44, the data line 51 is in the Busy state, and the data (D1 to Dn) stored in the page buffer 48 is stored in the memory. The data is written at a predetermined page position in the cell 47.
While data is being written to the memory cell 47 (memory cell transfer period), a busy signal in the H state is output from the R / B terminal 44.
After writing to the memory cell 47 is completed, that is, after the memory cell transfer period has elapsed, a Ready signal is output from the R / B terminal 44.
In the present invention, the reset request signal Rrq is prevented from being input to the reset terminal FR41 during the memory cell transfer period.
Further, even if a data write request occurs in the CPU 3, if the reset start signal Rst has already been input, the write request command is not transferred to the flash memory 4 via the data line 51. Like that.

<リセット処理の説明>
図3に、リセット発生部1からリセット信号が出力された場合に、CPU3とフラッシュメモリ4に対して行われるリセット処理の一実施例のタイムチャートを示す。
図3(a)に、メモリセル転送期間終了後に、リセット要求信号Rrqが、CPU3とフラッシュメモリ4に入力される場合の説明図を示す。
図3(a)において、当初、リセット開始信号Rstと、リセット要求信号Rrqのどちらも出力されていない状態で、データライン51を介して、書込みデータ(D1〜Dn)が、CPU3からフラッシュメモリ4に送信され、ページバッファ転送期間において、ページバッファ48に転送されたとする。
その後、CPU3は、入力端子RI31に、リセット開始信号Rstが入力されていないことを確認した場合、書込要求コマンド(Wコマンド)をデータライン51に出力する。
<Description of reset processing>
FIG. 3 shows a time chart of an embodiment of a reset process performed on the CPU 3 and the flash memory 4 when a reset signal is output from the reset generator 1.
FIG. 3A shows an explanatory diagram when the reset request signal Rrq is input to the CPU 3 and the flash memory 4 after the memory cell transfer period ends.
In FIG. 3A, initially, write data (D1 to Dn) is transferred from the CPU 3 to the flash memory 4 via the data line 51 in a state where neither the reset start signal Rst nor the reset request signal Rrq is output. And is transferred to the page buffer 48 in the page buffer transfer period.
Thereafter, when the CPU 3 confirms that the reset start signal Rst is not input to the input terminal RI31, it outputs a write request command (W command) to the data line 51.

フラッシュメモリ4は、Wコマンドを受理したことを確認すると、ページバッファ48に一時記憶された書込みデータ(D1〜Dn)を、メモリセル47に転送する処理を開始する。
このとき、ページバッファ48からメモリセル47へデータを転送するのに、メモリセル転送期間Tbsだけかかるものとする。このメモリセル転送期間Tbsは、メモリセルのページにデータを書込む時間の最大値である最大書込時間に相当する。
メモリセル47への転送を開始した後、その転送中に、リセットスイッチ12が押下げられ、リセット発生部1の出力端子RO11から、H状態のリセット開始信号Rstが出力されたとする。
リセット開始信号Rstは、CPUの入力端子RI31と、遅延部2に入力される。
遅延部2は、リセット開始信号Rstが入力された場合、所定の遅延時間Trdだけ遅延させて、出力端子RD21から、H状態のリセット要求信号Rrqを出力する。
この遅延時間Trdは、メモリセルへのデータの書き込みにかかる時間(最大書込時間Tbs)よりも十分に長い時間が予め設定されている。
When the flash memory 4 confirms that the W command has been received, the flash memory 4 starts a process of transferring the write data (D1 to Dn) temporarily stored in the page buffer 48 to the memory cell 47.
At this time, it is assumed that it takes only the memory cell transfer period Tbs to transfer data from the page buffer 48 to the memory cell 47. This memory cell transfer period Tbs corresponds to the maximum write time which is the maximum value of the time for writing data to the page of the memory cell.
It is assumed that after the transfer to the memory cell 47 is started, the reset switch 12 is pushed down during the transfer, and an H-state reset start signal Rst is output from the output terminal RO11 of the reset generation unit 1.
The reset start signal Rst is input to the CPU input terminal RI31 and the delay unit 2.
When the reset start signal Rst is input, the delay unit 2 delays by a predetermined delay time Trd and outputs an H-state reset request signal Rrq from the output terminal RD21.
The delay time Trd is set in advance to a time sufficiently longer than the time required to write data to the memory cell (maximum write time Tbs).

したがって、Trd>Tbsなので、メモリセル転送期間Tbsが経過し、メモリセルへの全データの書込みが終了した後に、リセット要求信号Rrqが、CPU3のリセット端子CR32と、フラッシュメモリ4のリセット端子FR41に入力される。このリセット要求信号Rrqが、リセット端子(CR,FR)に入力されることによって、実際にCPUとフラッシュメモリのリセット処理が実行される。
リセット要求信号Rrqが、メモリセルへのデータ書き込み終了後に、CPUとフラッシュメモリに与えられるので、実際のリセット処理の実行中に、メモリセルへの書込みは行われておらず、書込みデータがメモリセルに誤って書き込まれることはなく、データの破損が防止される。
Therefore, since Trd> Tbs, after the memory cell transfer period Tbs has elapsed and the writing of all data to the memory cells is completed, the reset request signal Rrq is sent to the reset terminal CR32 of the CPU 3 and the reset terminal FR41 of the flash memory 4. Entered. When this reset request signal Rrq is input to the reset terminals (CR, FR), the CPU and the flash memory are actually reset.
Since the reset request signal Rrq is given to the CPU and the flash memory after the data write to the memory cell is completed, the write to the memory cell is not performed during execution of the actual reset process, and the write data is stored in the memory cell. Data is not erroneously written, and data corruption is prevented.

図3(b)は、CPU3が、フラッシュメモリ4に対して書込要求コマンドを発行する前に、リセット開始信号Rstが入力されたことを確認した場合の説明図を示す。
この場合、書込みデータのメモリへの書込要求があったとしても、リセット開始信号Rstの入力があったので、フラッシュメモリ4に対して、書込要求コマンドを送信しない。
図3(b)において、リセット信号(Rst,Rrq)が出力されていない状態で、書込みデータ(D1〜Dn)が、フラッシュメモリ4に送信され、ページバッファ転送期間において、ページバッファ48に転送されたとする。
その後、CPU3が、書込要求コマンド(Wコマンド)をフラッシュメモリ4に発行する前に、リセット開始信号Rstが、CPU3の入力端子RI31と遅延部2に、入力されたとする。
FIG. 3B shows an explanatory diagram when the CPU 3 confirms that the reset start signal Rst is input before issuing a write request command to the flash memory 4.
In this case, even if there is a write request to the memory for the write data, the reset request signal Rst is input, so that a write request command is not transmitted to the flash memory 4.
In FIG. 3B, the write data (D1 to Dn) is transmitted to the flash memory 4 in a state where the reset signal (Rst, Rrq) is not output, and is transferred to the page buffer 48 in the page buffer transfer period. Suppose.
Thereafter, it is assumed that the reset start signal Rst is input to the input terminal RI31 and the delay unit 2 of the CPU 3 before the CPU 3 issues a write request command (W command) to the flash memory 4.

CPU3は、このリセット開始信号Rstが入力されたことを確認すると、出力するはずであったWコマンドを発行しないようにする。
その後、リセット開始信号Rstが遅延部2に入力されたことによって、遅延時間Trd経過後、遅延部2の出力端子RD21から、リセット要求信号Rrqが、CPU3とフラッシュメモリ4に対して出力される。
リセット要求信号Rrqが、CPU3とフラッシュメモリ4のリセット端子(CR,FR)に入力されると、それぞれ初期化が行われる。
フラッシュメモリ4において、初期化が行われると、ページバッファ48に記憶されていたデータ(D1〜Dn)はなくなってしまうが、メモリセルへの書込みはまだ行われていなかったので、メモリセル自体における書込みデータの破損は発生しない。
When the CPU 3 confirms that the reset start signal Rst has been input, the CPU 3 does not issue the W command that should have been output.
Thereafter, when the reset start signal Rst is input to the delay unit 2, the reset request signal Rrq is output from the output terminal RD 21 of the delay unit 2 to the CPU 3 and the flash memory 4 after the delay time Trd has elapsed.
When the reset request signal Rrq is input to the reset terminals (CR, FR) of the CPU 3 and the flash memory 4, initialization is performed.
In the flash memory 4, when initialization is performed, data (D1 to Dn) stored in the page buffer 48 is lost, but writing to the memory cell has not yet been performed. The write data is not damaged.

図4に、フラッシュメモリに対して消去コマンド(Eコマンド)を発行後に、CPU3がリセット開始信号Rstの入力を確認した場合の説明図を示す。
上記の図3に示すように、メモリセル47自体へのデータの書込み中に、リセット要求信号Rrqが入力されないようにしてデータの破損を防止したが、メモリセル47のデータの消去を実行しているときにも、リセット要求信号Rrqが入力されないようにする必要がある。
フラッシュメモリ4が、消去コマンドをCPU3から受信した後、メモリセル47の消去処理が実行され、その消去処理が終了するまでの間に、リセット要求信号Rrqが入力されたとすると、消去処理が途中で中断され、メモリセル47に記憶されていたデータが破損する場合があるからである。
FIG. 4 shows an explanatory diagram when the CPU 3 confirms the input of the reset start signal Rst after issuing the erase command (E command) to the flash memory.
As shown in FIG. 3 above, the reset request signal Rrq is not input during data writing to the memory cell 47 itself to prevent data corruption. However, the data in the memory cell 47 is erased. It is necessary to prevent the reset request signal Rrq from being input even when
If the flash memory 4 receives an erase command from the CPU 3 and the erase process of the memory cell 47 is executed and before the erase process is completed, the reset request signal Rrq is input. This is because the data stored in the memory cell 47 may be interrupted.

図4に示すように、遅延時間Trdを、メモリセルの消去処理にかかる時間(最大消去時間Te)よりも十分長い時間に設定しておき、リセット要求信号Rrqが入力されるタイミングを遅らせる(Te<Trd)。
たとえば、図4に示すように、CPU3からフラッシュメモリ4に対して、消去コマンド(Eコマンド)が発行された後、メモリセル47の消去処理中に、リセット開始信号Rstが、リセット発生部1から出力されたとする。
リセット開始信号Rstが遅延部2に入力されると、遅延時間Trd(>Te)だけ遅れて、リセット要求信号Rrqが出力され、CPU3とフラッシュメモリ4に入力される。
Trd>Teなので、リセット要求信号Rrqは、最大消去時間Teがすでに経過し、メモリセルの消去処理が終了した後に、CPU3とフラッシュメモリ4に入力されることになる。
As shown in FIG. 4, the delay time Trd is set to a time sufficiently longer than the time required for erasing the memory cell (maximum erase time Te), and the timing at which the reset request signal Rrq is input is delayed (Te <Trd).
For example, as shown in FIG. 4, after an erase command (E command) is issued from the CPU 3 to the flash memory 4, the reset start signal Rst is sent from the reset generation unit 1 during the erase process of the memory cell 47. Suppose that it is output.
When the reset start signal Rst is input to the delay unit 2, the reset request signal Rrq is output after being delayed by the delay time Trd (> Te) and input to the CPU 3 and the flash memory 4.
Since Trd> Te, the reset request signal Rrq is input to the CPU 3 and the flash memory 4 after the maximum erase time Te has already elapsed and the erase process of the memory cell is completed.

その後、CPU3とフラッシュメモリ4は、リセットによって初期化されるが、メモリセル47に対する処理は行われていない状態で初期化処理が行われるので、メモリセル47のデータの破損は生じない。
なお、遅延時間Trdは、図3に示したメモリセル転送期間(最大書込時間)Tbsよりも長く(Trd>Tbs)、かつ図4に示した最大消去期間Teよりも長く(Trd>Te)設定する必要がある。
上記したように、フラッシュメモリ4では、データの書き込み(書き換え)処理はページ単位で行われるのに対し、消去処理は、複数ページを含むブロック単位で行われる。
したがって、消去処理にかかる時間の方が、書込処理にかかる時間よりも長く、一般的に、Te>Tbsであるので、遅延時間Trdは、最大消去期間Teよりも長くすればよい。
Thereafter, the CPU 3 and the flash memory 4 are initialized by resetting, but the initialization process is performed in a state where the process for the memory cell 47 is not performed, so that the data in the memory cell 47 is not damaged.
The delay time Trd is longer than the memory cell transfer period (maximum write time) Tbs shown in FIG. 3 (Trd> Tbs) and longer than the maximum erase period Te shown in FIG. 4 (Trd> Te). Must be set.
As described above, in the flash memory 4, data writing (rewriting) processing is performed in units of pages, whereas erasing processing is performed in units of blocks including a plurality of pages.
Accordingly, the time required for the erasing process is longer than the time required for the writing process, and generally Te> Tbs. Therefore, the delay time Trd may be longer than the maximum erasing period Te.

マージンとなる時間Tmを考慮して、Trd=Te+Tmとした場合、時間Tmとしては、少なくとも、CPU3において、リセット開始信号Rstが入力された後、そのリセット開始信号Rstが入力されたことを確認し、消去コマンド(Eコマンド)を停止するか否かを判断するまでにかかる時間を考慮した時間を設定することが好ましい。
具体的には、マージンとなる時間Tmとしては、Teの2倍以上と十分な時間を確保することが好ましい。
When Trd = Te + Tm is considered in consideration of the margin time Tm, at least the CPU 3 confirms that the reset start signal Rst is input after the reset start signal Rst is input as the time Tm. It is preferable to set a time in consideration of the time taken to determine whether to stop the erase command (E command).
Specifically, it is preferable to secure a sufficient time as the margin time Tm, which is at least twice Te.

<リセット処理の実施例1>
図5に、この発明のリセット処理の実施例1のフローチャートを示す。
ここでは、CPU3が、実行中のプログラムに基づいてデータの書き込み要求が生じた後、リセット開始信号Rstの入力があったことを確認した場合には、フラッシュメモリ4に対して、書込要求コマンド(Wコマンド)を転送しないようにする。
図5のフローチャートでは、データの書き込み要求とリセット処理とが関係する部分の処理についてのみ示す。
図5のステップS1において、CPU3が、プログラムに基づいて、フラッシュメモリへのデータの書き込み要求があることを確認する。
データの書き込み要求がなければ、ステップS1をループするが、データの書き込み要求があった場合、ステップS2へ進む。
ステップS2において、CPU3は、入力端子RI31を監視し、リセット開始信号Rstの入力があるか否かを確認する。
<Example 1 of reset processing>
FIG. 5 shows a flowchart of the reset processing according to the first embodiment of the present invention.
Here, when the CPU 3 confirms that the reset start signal Rst has been input after the data write request is generated based on the program being executed, the CPU 3 issues a write request command to the flash memory 4. (W command) is not transferred.
In the flowchart of FIG. 5, only the processing related to the data write request and the reset processing is shown.
In step S1 of FIG. 5, the CPU 3 confirms that there is a data write request to the flash memory based on the program.
If there is no data write request, step S1 is looped. If there is a data write request, the process proceeds to step S2.
In step S2, the CPU 3 monitors the input terminal RI31 and checks whether or not the reset start signal Rst is input.

ステップS3において、リセット開始信号Rstの入力があった場合は、フラッシュメモリ4に対して、書込要求コマンド(Wコマンド)を転送することなく、処理を終了する。
一方、リセット開始信号Rstの入力がなかった場合は、ステップS4へ進み、フラッシュメモリ4に対して、書込要求コマンド(Wコマンド)を転送する。これにより、書き込み要求のあったデータがフラッシュメモリのメモリセル47へ書込まれる。その後、処理を終了する。
このように、リセット要求信号Rrqが、CPU3やフラッシュメモリ4のリセット端子(CR,FR)に直接入力される前に、CPU3がリセット開始信号Rstを確認することによって、データのメモリセル47への書き込みが実際に行われる前にリセット開始信号Rstの入力があれば、データの書込要求コマンドをフラッシュメモリ4に対して送らないようにする。
したがって、ユーザがリセットスイッチを押し下げる入力操作をすることなどによって、リセットが実行される場合に、フラッシュメモリのメモリセル47に対して不測のデータが書き込まれることを未然に防止し、データの破損を防止できる。
In step S3, when the reset start signal Rst is input, the process ends without transferring the write request command (W command) to the flash memory 4.
On the other hand, if the reset start signal Rst is not input, the process proceeds to step S4, and a write request command (W command) is transferred to the flash memory 4. As a result, the data requested to be written is written into the memory cell 47 of the flash memory. Thereafter, the process ends.
Thus, before the reset request signal Rrq is directly input to the reset terminals (CR, FR) of the CPU 3 and the flash memory 4, the CPU 3 confirms the reset start signal Rst, whereby the data is sent to the memory cell 47. If the reset start signal Rst is input before writing is actually performed, a data write request command is not sent to the flash memory 4.
Therefore, when a reset is executed, for example, when the user performs an input operation to depress the reset switch, it is possible to prevent unexpected data from being written to the memory cell 47 of the flash memory. Can be prevented.

<リセット処理の実施例2>
図6に、この発明のリセット処理の実施例2のフローチャートを示す。
ここでは、実施例1とは異なり、リセット開始信号Rstの入力の確認を所定時間が経過するごとに行い、所定時間が経過した後の再確認において、リセット開始信号の入力がないことが検出された場合、フラッシュメモリ4に対して、書込要求コマンドを転送する。
一方、リセット開始信号Rstが、CPU3の入力端子RI31に入力された後、所定時間以上経過してもリセット開始信号Rstが入力されている場合には、フラッシュメモリへのデータの書込みを実行しないようにする。
これにより、リセットスイッチ12などに生じるいわゆるチャタリングによるリセット信号の誤入力を防止することができる。
<Example 2 of reset processing>
FIG. 6 shows a flowchart of the reset process according to the second embodiment of the present invention.
Here, unlike the first embodiment, the input of the reset start signal Rst is confirmed every time a predetermined time elapses, and it is detected that there is no input of the reset start signal in the reconfirmation after the predetermined time elapses. If so, a write request command is transferred to the flash memory 4.
On the other hand, if the reset start signal Rst is input even after a predetermined time has elapsed after the reset start signal Rst is input to the input terminal RI31 of the CPU 3, data is not written to the flash memory. To.
Thereby, erroneous input of a reset signal due to so-called chattering that occurs in the reset switch 12 or the like can be prevented.

図6のフローチャートにおいて、図5と同一の処理をするステップには、同一の番号を付与している。
図6において、図5のフローと同様に、ステップS1およびS2において、データの書き込み要求があった場合、リセット開始信号Rstの入力の有無を確認する。
ステップS3において、リセット開始信号Rstの入力がなかった場合は、ステップS4へ進み、フラッシュメモリ4へ、書込要求コマンド(Wコマンド)を転送した後、処理を終了する。
一方、リセット開始信号Rstの入力があった場合、ステップS11へ進み、所定の設定時間をカウントするタイマーを起動させる。
ステップS12において、その設定時間が経過した後、ステップS2へ戻り、再度、リセット開始信号Rstの入力の有無を確認する。
In the flowchart of FIG. 6, the same number is assigned to the step performing the same process as in FIG. 5.
In FIG. 6, as in the flow of FIG. 5, in step S <b> 1 and S <b> 2, when there is a data write request, it is confirmed whether or not the reset start signal Rst is input.
In step S3, if the reset start signal Rst is not input, the process proceeds to step S4, the write request command (W command) is transferred to the flash memory 4, and the process ends.
On the other hand, when the reset start signal Rst is input, the process proceeds to step S11, and a timer for counting a predetermined set time is started.
In step S12, after the set time has elapsed, the process returns to step S2, and it is confirmed again whether or not the reset start signal Rst has been input.

その後、もし、リセット開始信号Rstの入力がなかった場合には、ステップS4へ進んで、書込要求コマンド(Wコマンド)を送信する。
しかし、リセット開始信号Rstの入力が再度確認された場合、そのリセットが実際に入力されたものであれば、その後遅延時間が経過した後に、遅延部2から出力されたリセット要求信号Rrqが、CPU3とフラッシュメモリ4に入力されることになるので、CPU3は初期化され、このフローチャートも終了することになる。
Thereafter, if the reset start signal Rst is not input, the process proceeds to step S4, and a write request command (W command) is transmitted.
However, when the input of the reset start signal Rst is confirmed again, if the reset is actually input, the reset request signal Rrq output from the delay unit 2 after the delay time has elapsed is the CPU 3 Are input to the flash memory 4, the CPU 3 is initialized, and this flowchart is also terminated.

このフローチャートにおいて、タイマーに設定する設定時間は、上記した遅延時間Trdよりも長くすることが好ましい。
一度リセット開始信号Rstの入力を確認した後、遅延時間Trdが経過することによってリセット要求信号Rrqが入力されると、タイマーの設定時間が経過するまでに、CPU自体にリセットがかかるようにできるからである。
遅延時間Trdが経過してもリセットがかからなければ、ステップS12においてタイムアウトが発生して、ステップS2へ戻って、リセット開始信号Rstの再確認を行うことになる。
これにより、チャタリング等によるリセット信号の誤検出が防止できる。
In this flowchart, the set time set in the timer is preferably longer than the delay time Trd.
Once the reset request signal Rrq is input after the delay time Trd has elapsed after confirming the input of the reset start signal Rst, the CPU itself can be reset before the timer set time elapses. It is.
If the reset does not occur even after the delay time Trd elapses, a timeout occurs in step S12, and the process returns to step S2 to reconfirm the reset start signal Rst.
Thereby, erroneous detection of the reset signal due to chattering or the like can be prevented.

1 リセット発生部
2 遅延部
3 制御部(CPU)
4 記憶部(フラッシュメモリ)
11 出力端子RO
12 リセットスイッチ
13 電源スイッチ
21 出力端子RD
31 入力端子RI
32 リセット端子CR
33 データ端子DT
34 R/B端子
35 制御端子CNT
41 リセット端子FR
43 データ端子DT
44 R/B端子
45 制御端子CNT
51 データライン(I/Oライン)
52 R/Bライン
53 制御ライン
Rst リセット開始信号
Rrq リセット要求信号
DESCRIPTION OF SYMBOLS 1 Reset generation part 2 Delay part 3 Control part (CPU)
4 Storage unit (flash memory)
11 Output terminal RO
12 Reset switch 13 Power switch 21 Output terminal RD
31 Input terminal RI
32 Reset terminal CR
33 Data terminal DT
34 R / B terminal 35 Control terminal CNT
41 Reset terminal FR
43 Data terminal DT
44 R / B terminal 45 Control terminal CNT
51 Data line (I / O line)
52 R / B line 53 Control line Rst Reset start signal Rrq Reset request signal

Claims (6)

初期化要求に対応して第1リセット信号を出力するリセット発生部と、
前記第1リセット信号が入力された後、所定の遅延時間が経過した後に、第2リセット信号を出力する遅延部と、
前記第1リセット信号を入力する入力端子および前記第2リセット信号を入力するリセット端子とを備えた制御部と、
前記第2リセット信号を入力するリセット端子を備えた記憶部とを備え、
前記制御部が、前記記憶部へのデータの書込要求を行う前に、前記第1リセット信号の入力の有無を確認し、前記第1リセット信号が入力されている場合には、前記記憶部へのデータ書込みを実行しないことを特徴とする情報処理装置。
A reset generator for outputting a first reset signal in response to an initialization request;
A delay unit that outputs a second reset signal after a predetermined delay time has elapsed after the first reset signal is input;
A control unit including an input terminal for inputting the first reset signal and a reset terminal for inputting the second reset signal;
A storage unit including a reset terminal for inputting the second reset signal;
Before the control unit makes a data write request to the storage unit, the control unit checks whether or not the first reset signal is input, and if the first reset signal is input, the storage unit An information processing apparatus that does not execute data writing to a computer.
前記制御部が、前記第1リセット信号の入力の有無を確認したときに、前記第1リセット信号が入力されていない場合に、前記記憶部へのデータ書込みを実行することを特徴とする請求項1に記載の情報処理装置。   The control section executes data writing to the storage section when the first reset signal is not inputted when the presence of the first reset signal is confirmed. The information processing apparatus according to 1. 前記制御部の入力端子は、汎用入力端子であり、
前記遅延時間には、前記記憶部にデータを書き込むのにかかる最大書込時間と、前記記憶部のデータを消去するのにかかる最大消去時間のいずれよりも長い時間が予め設定され、
前記第2リセット信号は、前記記憶部において、データの書込処理が実際に行われていない時間に、前記遅延部から前記制御部および前記記憶部に出力されることを特徴とする請求項1または2に記載の情報処理装置。
The input terminal of the control unit is a general-purpose input terminal,
The delay time is set in advance to a time longer than either the maximum writing time required to write data to the storage unit or the maximum erasing time required to erase data in the storage unit,
2. The second reset signal is output from the delay unit to the control unit and the storage unit during a time when data is not actually written in the storage unit. Or the information processing apparatus according to 2;
強制的な初期化要求を入力するためのリセットスイッチを有する入力部をさらに備え、
前記リセットスイッチを押し下げる入力操作がされたときに、
前記リセット発生部が、前記第1リセット信号を出力することを特徴とする請求項1から3のいずれかに記載の情報処理装置。
An input unit having a reset switch for inputting a forced initialization request;
When an input operation is performed to depress the reset switch,
The information processing apparatus according to claim 1, wherein the reset generation unit outputs the first reset signal.
前記第1リセット信号が前記制御部の入力端子に入力された後、所定時間以上経過しても前記第1リセット信号が入力されている場合に、前記記憶部へのデータの書込みを実行しないことを特徴とする請求項1から4のいずれかに記載の情報処理装置。   After the first reset signal is input to the input terminal of the control unit, if the first reset signal is input even after a predetermined time has elapsed, data is not written to the storage unit. The information processing apparatus according to claim 1, wherein: 前記記憶部は、複数のページからなるメモリセルを備えたフラッシュメモリであり、
前記メモリセルに対するデータの書き込みおよび読み出しは、前記ページ単位で行われることを特徴とする請求項1から5のいずれかに記載の情報処理装置。
The storage unit is a flash memory including memory cells composed of a plurality of pages.
6. The information processing apparatus according to claim 1, wherein writing and reading of data to and from the memory cell are performed in units of pages.
JP2014183335A 2014-09-09 2014-09-09 Information processing device Active JP6340291B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014183335A JP6340291B2 (en) 2014-09-09 2014-09-09 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014183335A JP6340291B2 (en) 2014-09-09 2014-09-09 Information processing device

Publications (2)

Publication Number Publication Date
JP2016057817A true JP2016057817A (en) 2016-04-21
JP6340291B2 JP6340291B2 (en) 2018-06-06

Family

ID=55756540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014183335A Active JP6340291B2 (en) 2014-09-09 2014-09-09 Information processing device

Country Status (1)

Country Link
JP (1) JP6340291B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020143932A (en) * 2019-03-04 2020-09-10 シチズン時計株式会社 Electronic watch
CN113672165A (en) * 2020-05-15 2021-11-19 美光科技公司 Power management during reset and initialization of memory devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61166617A (en) * 1985-01-19 1986-07-28 Panafacom Ltd Reset control system
JPH07191389A (en) * 1993-12-27 1995-07-28 Canon Inc Switch operation recognizing device for camera
JPH09288530A (en) * 1996-04-22 1997-11-04 Sharp Corp Reset delay device for information processor
JP2006515691A (en) * 2002-12-03 2006-06-01 ユニロイ・ミラクロン・ユーエスエイ・インコーポレーテッド Power failure detection and response
JP2009230434A (en) * 2008-03-21 2009-10-08 Victor Co Of Japan Ltd Reset circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61166617A (en) * 1985-01-19 1986-07-28 Panafacom Ltd Reset control system
JPH07191389A (en) * 1993-12-27 1995-07-28 Canon Inc Switch operation recognizing device for camera
JPH09288530A (en) * 1996-04-22 1997-11-04 Sharp Corp Reset delay device for information processor
JP2006515691A (en) * 2002-12-03 2006-06-01 ユニロイ・ミラクロン・ユーエスエイ・インコーポレーテッド Power failure detection and response
JP2009230434A (en) * 2008-03-21 2009-10-08 Victor Co Of Japan Ltd Reset circuit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020143932A (en) * 2019-03-04 2020-09-10 シチズン時計株式会社 Electronic watch
CN113672165A (en) * 2020-05-15 2021-11-19 美光科技公司 Power management during reset and initialization of memory devices
CN113672165B (en) * 2020-05-15 2024-05-28 美光科技公司 Power management during memory device reset and initialization

Also Published As

Publication number Publication date
JP6340291B2 (en) 2018-06-06

Similar Documents

Publication Publication Date Title
KR101986872B1 (en) Memory chip power management
US9229806B2 (en) Block closure techniques for a data storage device
US9165670B2 (en) Data retention detection techniques for a data storage device
US10585822B2 (en) Operation method of host system including storage device and operation method of storage device controller
US8982617B1 (en) Block closure techniques for a data storage device
US9400747B2 (en) Batch command techniques for a data storage device
US10909051B2 (en) NAND flash reset control
JP4843222B2 (en) Semiconductor memory device control method, memory card, and host device
CN110047538B (en) Memory system and method of operating the same
KR20160074025A (en) Operating method for data storage device
CN110797058A (en) Data storage device, method of operating the same, and storage system
CN109426627B (en) Data storage device and operation method thereof
KR20130011033A (en) Memory system including nonvolatile memory and method of controlling thereof
CN107045484B (en) Data storage device
JP6340291B2 (en) Information processing device
KR102626039B1 (en) Semiconductor memory device and method for operating the same
CN109840224B (en) Memory system and method of operating the same
US20170357461A1 (en) Data storage device and operating method thereof
CN113467709A (en) Memory system and operating method thereof
US10817445B2 (en) Semiconductor devices including command priority policy management and related systems
KR102475688B1 (en) Nonvolatile memory device, data storage apparatus including the same and operating method thereof
CN116560902A (en) Processing system, related integrated circuit and method
US20230089489A1 (en) Memory system and method of controlling nonvolatile memory
US20220214817A1 (en) Memory system and operating method thereof
JP2009176147A (en) Electronic equipment and method for determining permission of access to memory of electronic equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170403

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180123

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180307

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180514

R150 Certificate of patent or registration of utility model

Ref document number: 6340291

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150