US20070083745A1 - Data processor - Google Patents
Data processor Download PDFInfo
- Publication number
- US20070083745A1 US20070083745A1 US11/520,420 US52042006A US2007083745A1 US 20070083745 A1 US20070083745 A1 US 20070083745A1 US 52042006 A US52042006 A US 52042006A US 2007083745 A1 US2007083745 A1 US 2007083745A1
- Authority
- US
- United States
- Prior art keywords
- data
- memory
- programming
- built
- address
- 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.)
- Abandoned
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
- G06F12/0638—Combination of memories, e.g. ROM and RAM such as to permit replacement or supplementing of words in one module by words in another module
Definitions
- the present invention relates to a on-board write art of a program memory built in a single-chip microcomputer serving as a data processor, particularly to an art to be effectively applied to a single-chip microcomputer provided with a flash-type electrically erasable and programmable read only memory (hereafter referred to as a flash-type EEPROM or a flash memory).
- a flash-type electrically erasable and programmable read only memory hereafter referred to as a flash-type EEPROM or a flash memory.
- a single-chip microcomputer (also known as a microcomputer) serving as a data processor has a built-in program memory for storing an operation program.
- the single-chip microcomputer executes predetermined data processing specified in the operation program stored in the built-in program memory.
- the program memory has been formed with a mask-type nonvolatile memory (hereafter referred to as a mask-type read-only memory or mask ROM) or an electrically programmable nonvolatile memory (hereafter referred to as an electrically programmable read-only memory or EPROM).
- a flash-type electrically erasable and programmable read-only memory hereafter referred to as a flash-type EEPROM or flash memory
- flash-type EEPROM or flash memory has been applied to a program memory.
- the flash memory allows written data to be electrically erased or electrically rewritten. Therefore, a microcomputer having a built-in flash memory as a program memory has the following advantages.
- Cutover of a software program (application software) developed by a user generally tends to delay. Therefore, it is possible to assemble the hardware for a microcomputer-applied system before the cutover of a software program and then write a developed software program in a flash memory of a microcomputer. Thereby, it is possible to quickly ship the microcomputer-applied system.
- the microcomputer in the case of a microcomputer having a built-in flash memory as a program memory, the microcomputer is assembled on a printed circuit board, mounting board, or system board-and then, the processing for writing an operation program in the above flash memory can be performed.
- the processing for programming data in a built-in flash memory after assembling a microcomputer having the built-in flash memory on a printed circuit board, mounting board, or system board is referred to as “on-board programming” and this programming mode is referred to as “on-board programming mode”.
- the first method is referred to as a user program mode or boot mode.
- This mode uses a method for branching the flow of program execution by a central processing unit (CPU) built in a microcomputer to the on-board programming and changing the data in a flash memory by the CPU.
- CPU central processing unit
- the second method is referred to as a programming mode using a ROM writer.
- This mode uses a method for changing the data in a flash memory by external means (ROM writer) by stopping a microcomputer.
- Japanese Patent Laid-Open No. 180664/1994 discloses a system for handling a trouble at the time of rewriting by moving a trouble handling program to another area when rewriting a flash memory.
- the processing by a central processing unit is branched to an interrupt handling routine or exception handling routine.
- a vector address showing the head address of an interrupt handling routine or exception handling routine is used to branch the processing by the central processing unit to the interrupt handling routine or exception handling routine.
- the vector address of a relative interrupt or exception handling routine is obtained by the central processing unit. The obtained vector address is programmed in a program counter of the central processing unit and the program flow of the central processing unit jumps to an address indicated by the vector address to execute relative interrupt or exception handling.
- a plurality of vector addresses are generally stored in the vector address storage area of a program memory. Even when a flash memory is used as a program memory, the same is applied to the above mentioned and thus, a plurality of vector addresses are stored in the vector address storage area of the flash memory.
- vector addresses are present in the program memory, though a rewrite control program for erasing or programming the data in the flash memory in the user program mode or boot mode is present in a memory (e.g. RAM) other than the flash memory. Therefore, no correct vector address can be obtained during erasing or programming for the flash memory serving as the program memory.
- a microcomputer may run away or an application system may be damaged if an interrupt occurs or exception handling occurs in the user program mode or boot mode of a program memory.
- the microcomputer runs away and data is over-erased from or over-programmed in the flash memory, it may be impossible to reproduce the microcomputer-application system. It is general means to detect a trouble such as a power-supply voltage drop by an interrupt such as an NMI.
- erasing or programming for the flash memory includes erasing verify operation and programming verify operation.
- a user can program software in the built-in flash memory after assembling the hardware of an application system or rewrite the software stored in the built-in flash memory of a shipped applied system. Therefore, there are a lot of advantages in setting a flash memory in a microcomputer. However, it is found that occurrence of an interrupt or occurrence of exception handling during on-board programming in the user program mode or boot mode of a built-in flash memory may cause a microcomputer to run away or an application system to be damaged.
- a data processor comprises an electrically erasable or programmable program memory ( 18 ), a central processing unit ( 12 ) accessible to the program memory ( 18 ), and malfunction exclusion means for excluding a malfunction due to occurrence of an interrupt or occurrence of exception handling while the data in the program memory is erased or programmed.
- the malfunction exclusion means can include the following structures.
- a first control logic circuit (G 5 ) for excluding or invalidating an interrupt request or an exception handling request to the central processing unit ( 12 ) while the data in the program memory ( 18 ) is erased or programmed is provided in the data processor.
- the central processing unit ( 12 ) does not execute the operation for obtaining a vector address corresponding to the interrupt request or exception handling request while the data in the program memory ( 18 ) is erased or programmed. This improves the safety of a system during on-board programming of the program memory ( 18 ). Thereby, it is possible to inhibit an unintended interrupt request from occurring.
- a second control logic circuit (G 6 ) for stopping erasing or programming of the data in the program memory ( 18 ) in response to an interrupt request or exception handling request to the central processing unit ( 12 ) while the data in the program memory ( 18 ) is erased or programmed in the user program mode or boot mode is provided in the data processor.
- the second control logic circuit (G 5 ) responds to an interrupt request or exception handling request to the central processing unit ( 12 ) and stops erasing or programming of the data in the program memory ( 18 ). Specifically, the second control logic circuit (G 5 ) changes the data in the control bits such as an erasing control bit ( 32 ), a programming control bit ( 33 ), and a verifying control bit ( 34 ) of an operation control register set to the program memory ( 18 ) from active state to inactive state.
- the control bits such as an erasing control bit ( 32 ), a programming control bit ( 33 ), and a verifying control bit ( 34 ) of an operation control register set to the program memory ( 18 ) from active state to inactive state.
- the second control logic circuit (G 5 ) stops erasing or programming of the data in the program memory ( 18 ). Occurrence of the above interrupt may be caused by a programming error of a programming and erasing control program or an emergency such as an outage. Therefore, by stopping erasing or programming of the data in the program memory ( 18 ), over-erasing or over-programming of data in a flash memory can be prevented. Moreover, thereafter, the central processing unit ( 12 ) can obtain a vector address corresponding to the interrupt request or exception handling request from the program memory ( 18 ). Thus, improvement of the safety of the system during on-board programming of the program memory ( 18 ) is achieved.
- selected memory change means (G 1 , G 2 , and G 4 ) for changing a memory selecting operation from the program memory ( 18 ) to another memory are provided in the data processor so that a predetermined area of a memory other than the program memory ( 18 ) such as a random access memory ( 13 ) can be accessed by inhibiting access to the vector address storage area of the program memory ( 18 ) when an interrupt request or exception handling request to the central processing unit ( 12 ) occurs while the data in the program memory ( 18 ) is erased or programmed.
- the selected memory change means (G 1 , G 2 , and G 4 ) can be set to a bus controller ( 27 ).
- vector address data for interrupt handling or exception handling to be processed when an interrupt request or exception handling request to the central processing unit ( 12 ) occurs while the data in the program memory ( 18 ) is erased or programmed is previously stored in a predetermined area of a memory other than the program memory ( 18 ).
- the vector address data stored in the predetermined storage area is set so as to indicate the head address of a predetermined interrupt handling routine or exception handling routine stored in another storage area of the memory other than the program memory ( 18 ).
- the selected memory change means (G 1 and G 2 ) respond to detection of the access to the vector address storage area of the program memory ( 18 ) and in activates a selection signal of the program memory ( 18 ). Instead, the selected memory change means (G 1 and G 2 ) activate a selection signal of the memory ( 13 ) other than the program memory ( 18 ).
- the selected memory change means (G 4 ) responds to detection of the access to the vector address storage area of the program memory ( 18 ) and converts an address signal for accessing the vector address storage area of the program memory ( 18 ) into an address signal for accessing a predetermined storage area of a memory such as the random access memory ( 13 ) other than the program memory ( 18 ).
- the central processing unit ( 12 ) can obtain a vector address related to a relative interrupt handling routine or exception handling routine by accessing another area of the memory other than the program memory ( 18 ) even if an interrupt request or exception handling request to the central processing unit ( 12 ) occurs while the data in the program memory ( 18 ) is erased or programmed in the user program mode or boot mode. Therefore, over-erasing or over-programming of data in a flash memory can be prevented by using an NMI and thereby, notifying a microcomputer of an emergency such as drop of power supply voltage Vcc due to an outage and stopping erasing or programming of the data in the program memory ( 18 ).
- FIG. 1 is a block diagram showing the whole structure of the single-chip microcomputer of an embodiment of the present invention
- FIG. 2 is an illustration for explaining an address map when moving part of a built-in RAM included in the above microcomputer to a vector address area;
- FIG. 3 is an illustration showing the structure of the main portion of the bus controller 27 in terms of the relation between the built-in ROM 18 and the built-in RAM 13 when address-converting a vector address storage area B-V of the built-in RAM 13 into a vector address storage area A-V of the flash memory 18 ;
- FIG. 4 is an illustration for explaining an address map of another embodiment of the present invention.
- FIG. 5 shows an address conversion circuit ACC serving as malfunction exclusion means set to the bus control circuit 27 in FIG. 1 ;
- FIG. 6 shows the bus controller 27 including a gate G 5 for ignoring all interrupts including an NMI (Non-Maskable Interrupt) during erasing or programming of data in a flash memory serving as the built-in ROM 18 ;
- NMI Non-Maskable Interrupt
- FIG. 7 shows the control logic circuit G 6 serving as malfunction exclusion means for resetting the erasing control bit register, programming control bit register, and verifying control bit register of the built-in ROM 18 when a programming request occurs during erasing, programming, or verifying of the data in the built-in ROM 18 ;
- FIG. 8 shows a circuit for generating a control signal CONT explained in FIG. 3 and a control signal CONT′ complained in FIG. 5 ;
- FIG. 9 shows the programming method of the flash memory 18 of the microcomputer 30 in FIG. 1 in terms of the relation between the PROM mode and the on-board programming mode described above;
- FIG. 10 shows a further detailed address map of the present invention, in which areas for storing a vector address of an NMI (Non-Maskable Interrupt) and an NMI handling routine for the vector address in the normal mode (single-chip mode or external memory expansion mode) and the on-board loading mode of a flash memory are shown;
- NMI Non-Maskable Interrupt
- FIG. 11 shows an illustration for explaining the usage of an NMI (Non-Maskable Interrupt) in the on-board programming mode and a circuit for generating the NMI
- FIG. 12 shows a reloading flow to be executed between the start and the end of the on-board programming mode (example of the user program mode) of the flash memory 18 ;
- NMI Non-Maskable Interrupt
- FIG. 13 shows a cross section of a memory cell of the flash memory 18 ;
- FIG. 14 shows thresholds of the erasing state and the programming state of a memory cell of the flash memory 18 ;
- FIG. 15 shows the structure of a memory array of the flash memory 18 ;
- FIG. 16 shows a voltage condition for erasing and programming data in a memory cell of the flash memory 18 ;
- FIG. 17 shows a block diagram of the flash memory 18 ;
- FIG. 18 shows the whole block diagram of the flash memory 18 .
- FIG. 19 shows a control register of the flash memory 18 .
- FIG. 1 shows the single-chip microcomputer 30 serving as the data processor of the present invention.
- the single-chip microcomputer 30 is formed on a semiconductor substrate (semiconductor chip) such as a single-crystal silicon substrate.
- the single-chip microcomputer 30 comprises an interrupt control circuit 10 , a clock generation circuit 11 , the central processing unit (CPU) 12 , the built-in random access memory (RAM),internal RAM or on-chip RAM 13 , a host interface circuit 14 , a serial communication interface circuit 15 serving as a serial communication circuit, a 10-bit analog-to-digital conversion circuit (A-D converter) 16 , an 8-bit digital-to-analog conversion circuit (D-A converter) 17 , the built-in read-only memory (ROM),internal ROM or on-chip ROM 18 serving as a program memory, a watchdog timer circuit 19 , a 16-bit free-running timer circuit 20 , an 8-bit timer circuit 21 , a PWM timer circuit 22 used for pulse width modulation, and ports P 1 to P 9 used for inputting and outputting a plurality of signals or inputting/outputting a plurality of signals.
- A-D converter analog-to-digital conversion circuit
- D-A converter
- circuit modules ( 10 , 12 to 22 , and P 1 to P 9 ) are connected by an address bus 24 and a data bus 26 so that the central processing unit 12 can access the circuit modules ( 12 to 22 and P 1 to P 9 ) by using the address bus 24 and data buses 25 and 26 .
- the central processing unit 12 accesses any one of the circuit modules ( 12 to 22 and P 1 to P 9 ), it outputs an address signal for selecting the address assigned to a circuit module to be accessed to the address bus 24 .
- the circuit module to be accessed outputs data to the data buses 25 and 26 and the central processing unit 12 captures the data through the data bus 26 .
- the central processing unit 12 outputs desired data to the data buses 25 and 26 and the circuit module to be accessed captures the data through the data buses 25 and 26 .
- circuit blocks ( 10 to 22 ) functions of the circuit blocks ( 10 to 22 ) are described below.
- the clock generator 11 comprises an oscillator for oscillating by using a crystal oscillator, a duty correction circuit for correcting the duty of pulses output from the oscillator, a clock divider for generating built-in peripheral-module clock signals for the built-in peripheral modules ( 12 to 22 ) by dividing a system clock signal output from the duty correction circuit, and a prescaler for generating an internal clock signal by dividing the built-in peripheral-module clock signal output from the clock divider.
- the circuit modules ( 10 and 12 to 22 ) are operated synchronously with a system clock with a predetermined frequency generated by the clock generator 11 .
- the CPU 12 though not restricted, comprises an instruction register (IR) for storing a defined instruction in a program to be processed, an instruction decoder (IDEC) for decoding an instruction stored in the instruction register, and an instruction executing section (IEXE) whose operation is controlled in accordance with a control signal output from the instruction decoder.
- the instruction executing section (IEXE) comprises an arithmetic and logic unit (ALU) for executing arithmetic operations and logic operations, 8-bits — 16 general-purpose registers (R 0 to R 15 ), and a program counter (PC) for storing data related to the instruction address of an instruction to be next executed in a program.
- ALU arithmetic and logic unit
- R 0 to R 15 general-purpose registers
- PC program counter
- the data in the program counter (PC) is incremented whenever an instruction is executed by the instruction executing section (IEXE).
- the instruction executing section (IEXE) performs predetermined types of processing and controls operations of the built-in peripheral modules ( 12 to 22 ) by using a system clock output from the clock generator 11 as a time base.
- the instruction register (IR), instruction decoder (IDEC), instruction executing section (IEXE), arithmetic and logic unit (ALU), general-purpose registers (R 0 to R 15 ), and program counter (PC) are not illustrated in FIG. 1 in order to simplify the drawing.
- One of the general-purpose registers is used as a stack pointer when an interrupt or exception occurs. That is, when the interrupt or exception occurs, the data stored in the general-purpose register at the point of that time is saved in, for example, a predetermined external memory. In this case, the stack point stores address data showing the address of the saved data. At the time of returning from interrupt handling or exception handling, the data in the general-purpose register which is saved in the external memory is recovered into the general-purpose register by using the address data stored in the stack pointer when the interrupt handling or exception handling is accepted.
- a memory cycle or bus cycle of the CPU 12 comprises, for example, two or three states. In other words, the CPU 12 is designed so as to be able to access the built-in peripheral modules ( 12 to 22 ) at two or three periods of the system clock.
- the built-in RAM 13 uses a static RAM having a storage capacity of 1 K bytes.
- the built-in RAM 13 is connected to the CPU 12 by the address bus 24 and the data buses 25 and 26 respectively having an 8-bit width.
- the built-in RAM 13 makes it possible to input and output byte data (8-bit data) and word data (16-bit data) at one two-state memory access cycle.
- the host interface circuit 14 has a parallel interface function of two channels of the CPU 12 and a host system and, though not restricted, comprises a 4-byte data register, a high-speed gate logic, and an interrupt request circuit.
- the circuit 14 can communicate with the host system through five control signals from the host system, four output signals to the host system, and the data bus 25 with an 8-bit width serving as a command or data input/output bus.
- the serial communication interface circuit 15 is a module for performing serial data communication with other LSI and makes it possible to select between the communication in a start-stop synchronous mode and the communication in a clock synchronous mode.
- the circuit 15 allows designation of an operation mode, designation of a data format, and setting of a bit rate, and includes a plurality of control registers for transmission/reception control, a transmission/reception control circuit, and a bus interface.
- the A-D converter 16 is used to convert an input analog signal into a digital signal according to the sequential conversion system and, though not restricted, makes it possible to select analog inputs of up to 8 channels.
- the D-A converter 17 has a function for converting a digital signal input through the data bus 25 into an analog signal and includes various registers, an 8-bit D-A converting section, and a control circuit.
- the watchdog timer 19 monitors a system. When values of a timer counter in the watchdog timer 19 overflow without being rewritten due to runaway of a system, the timer 19 outputs a reset signal or an NMI (Non-Maskable Interrupt) request to the CPU 12 . When this function is not used, the timer counter in the watchdog time 19 can also be used as an interval timer.
- NMI Non-Maskable Interrupt
- the 16-bit free-running timer 20 can generate two types of independent waveform outputs by basing on the 16-bit free-running counter and moreover, makes it possible to measure the width of an input pulse and the period of an external clock.
- the 8-bit timer 21 is provided with two channels and moreover, provided with an 8-bit time constant register in addition to a timer counter for each channel. Thereby, the timer 21 can output a pulse signal with any duty ratio.
- the PWM timer 22 is provided with two channels and with an 8-bit timer counter and an 8-bit duty register for each channel, and makes it possible to obtain a duty pulse of 0 to 100% according to a value set to the 8-bit duty register.
- the interrupt control circuit 10 has a function for receiving an NMI (Non-Maskable Interrupt) and IRQ 0 and IRQ 2 which serve as external interrupt request signals and not-illustrated internal interrupt requests supplied from the peripheral modules 15 to 22 and performing types of processing in accordance with a predetermined priority sequence so that an interrupt and exception handling request signal IRQS is transmitted to the CPU 12 in accordance with the interrupt request handling result.
- the interrupt control circuit 10 though not illustrated in FIG. 1 , is connected to the address bus 24 and the data bus 25 so that an internal register can be accessed by the CPU 12 .
- the NMI Non-Maskable Interrupt
- the interrupt control circuit 10 executes the interrupt handling according to the NMI.
- the built-in ROM 18 is referred to as a program memory for storing a program to be executed by the CPU 12 .
- the built-in ROM 18 though not restricted, is connected to the CPU 12 by the address bus 24 and the data buses 25 and 26 respectively having an 8-bit width.
- the built-in ROM 18 can output byte data (8-bit data) and word data (16-bit data) at one two-state memory access cycle.
- the built-in ROM 18 comprises a flash-type electrically erasable and programmable read-only memory (hereafter referred to as a flash-type EEPROM or flash memory).
- a program stored in the flash memory as data can be programmed by setting a single-chip microcomputer to the on-board programming mode.
- the on-board programming mode includes two types of operation modes (boot mode and user program mode).
- the boot mode is referred to as a first on-board programming mode and the user program mode is referred to as a second on-board programming mode.
- the operation mode of the microcomputer 30 is discriminated by a mode setting circuit MC and the mode setting circuit MC sets one of mode setting signals MS 0 to MS 4 to high level.
- the high-level mode setting signal showing a designated operation mode is supplied to, for example, circuits of the central processing unit CPU 12 and the bus controller 27 .
- the mode setting circuit MC judges whether signal voltages of mode signals MDS 0 to MDS 2 supplied to mode setting terminals MD 0 to MD 2 and a high voltage Vp supplied to a high-voltage supply terminal Vpp are combined as predetermined and sets the operation mode of the microcomputer 30 to a desired operation mode.
- the operation mode of the microcomputer 30 includes not only the boot mode and the user program mode but also the PROM mode, single chip mode, and external memory extension mode to be mentioned later.
- the single chip mode is a mode for constituting a microcomputer system by using address spaces of a built-in RAM and a built-in ROM.
- the external memory extension mode is a mode for constituting a microcomputer system by using not only the address spaces of the built-in RAM and ROM but also those of other memories.
- the operation of the microcomputer 30 is set to the boot mode. That is, the mode setting signal MS 0 is set to high level.
- a voltage of 0 or 5 V is supplied to the mode setting terminals MD 1 and MD 0 respectively in accordance with the address-space setting mode of the microcomputer 30 .
- the operation mode of the microcomputer 30 is set to the user program mode. That is, the mode setting signal MS 1 is set to high level.
- a voltage of 0 or 5 V is supplied to the mode setting terminals MD 0 to MD 2 respectively in accordance with the address-space setting mode of the microcomputer 30 .
- the high level of the mode setting signal MS 2 shows the above PROM mode
- the high level of the mode setting signal MS 3 shows the above single chip mode
- the high level of the mode setting signal MS 4 shows the above external memory extension mode.
- the programming and erasing user program (rewrite control program) of the flash memory 18 and programming data are previously prepared in a not-illustrated host system.
- the boot program previously programmed in a boot ROM is started after resetting is canceled.
- the low-level period of data transmitted from the host system is measured by the serial communication interface circuit 15 , thereby the bit rate of the data transmitted from the host system is calculated, and the value of the bit rate register of the serial communication interface circuit 15 is determined.
- the host system transfers the data constituting the rewrite control program.
- the data for the rewrite control program received by the serial communication interface circuit 15 is stored in the built-in RAM 13 .
- the above boot ROM comprises a nonvolatile memory circuit such as a mask ROM and the data stored in the ROM is not erased even if the power supply potential lowers.
- programming or erasing of the data in the flash memory 18 can be made by the programming and erasing user program (rewrite control program) of the flash memory 18 .
- high-voltage supply means for supplying a high voltage and data supply means for supplying rewrite data are provided on a mounting board.
- the rewrite control program is stored in the flash memory 18 or a part of the program area of other memory (external memory).
- the CPU 12 stores the rewrite control program in the built-in RAM 13 in response to setting of the user program mode and on-board rewriting of the flash memory is performed by the CPU 12 for executing the rewrite control program.
- the RPOM mode is a mode for making it possible to program the program data in the flash memory 18 by using a general-purpose PROM writer.
- the PROM mode is set by, for example, supplying the mode setting signals MDS 0 to MDS 2 at the low level “0” to all of the mode setting terminals MD 0 to MD 2 .
- this embodiment is constituted so that a part of the storage area (address area) of the built-in RAM 13 is moved to the vector address storage area of the flash memory 18 while the data in the flash memory 18 is erased or programmed in the user program mode or boot mode. That is, the address of the vector address storage area of the flash memory 18 is moved to the address of a part of the storage area of the built-in RAM 13 while the data in the flash memory 18 is erased or programmed. Thereby, an address signal for fetching a vector address generated during erasing or programming of the data in the flash memory 18 accesses a part of the storage area of the built-in RAM 13 .
- the built-in RAM 13 of this embodiment is used to substitute for the vector address storage area stored in the flash memory 18 while the data in the built-in ROM 18 is erased or programmed in the user program mode or boot mode.
- available addresses are previously programmed in a part of the storage area of the built-in RAM 13 and thereafter, execution of a program for erasing or programming data in the built-in ROM 18 is started.
- FIG. 2 shows the first embodiment of the address map according to the present invention including the vector address storage area B-V of the built-in RAM 13 used to erase or program the data in a flash memory serving as the built-in ROM 18 .
- An address space controlled by the CPU 12 in other words, an address space which can be accessed by the CPU 12 , though not restricted, has 64K bytes (H′0000 to H′FFFF). That is, the address bus 24 has 16 bits.
- the address area A of an address space assigned to the built-in ROM 18 has 32K bytes (H′0000 to H′FFFF).
- the vector address storage area A-V for storing address data related to a vector address has 256 bytes (H′0000 to H′00FF).
- An address area B of the address space assigned to the built-in RAM 13 has 1K bytes (H′00FC00 to H′FFFF).
- the address area B includes the address area B-V as shown in FIG. 2 .
- the address area B-V serves as an area for substituting for the vector address storage area A-V in order to safely perform on-board programming of the built-in ROM 18 and, for example, 256 bytes (H′FC00 to H′FCFF) are assigned to the area B-V. Therefore, the vector address storage area B-V stores one or more vector addresses used when an interrupt request or exception handling request occurs in the on-board programming mode (user program mode) of the built-in ROM 18 .
- the vector address storage area B-V is accessed because the addresses (H′FC00 to H′FCFF) assigned to the vector address storage area B-V are apparently moved to the vector address storage area A-V as described above. Thereby, a correct vector address is obtained from the vector address storage area B-V during erasing or programming of data in a flash memory serving as the built-in ROM 18 . Therefore, the CPU 12 can correctly perform desired interrupt handling and exception handling correspondingly to an interrupt request and exception handling request even during erasing or programming of the data in the flash memory 18 .
- the vector address storage area B-V of the built-in RAM 13 is accessed by the bus controller 27 so that the contents of the area B-V (predetermined vector address data) are read when a vector address signal is output from the CPU 12 .
- the bus controller 27 when the CPU 12 generates an address signal for reading the vector address storage area A-V of the flash memory 18 at the time of interrupt handling during erasing or programming of data in a flash memory serving as the built-in ROM 18 in the user program mode or boot mode, it is necessary for the bus controller 27 to control a module selection signal as shown below. That is, the bus controller 27 inactivates a module selection signal of the built-in ROM 18 , which should originally be activated and instead, activates a module selection signal of the built-in RAM 13 and performs control so that the vector address storage area B-V of the built-in RAM 13 is read. Specifically, it is necessary to set the control circuits (G 1 , G 2 , and G 3 ) shown in FIG. 3 to the bus controller 27 shown in FIG. 1 .
- FIG. 3 shows a structure of main portion of the bus controller 27 when address-converting the vector address storage area B-V of the built-in RAM 13 into the vector address storage area A-V of the flash memory 18 in terms of the relation between the built-in ROM 18 and the built-in RAM 13 .
- the bus controller 27 includes a built-in ROM 29 for selecting the built-in ROM 18 , a built-in RAM selection circuit 28 , and gates G 1 to G 3 serving as control logic circuits (malfunction exclusion means).
- the built-in ROM selection circuit 29 outputs an output signal A at the high level “1” when an address signal showing the address of the built-in ROM 18 is present on the address bus 24 .
- the built-in RAM selection circuit 28 outputs an output signal B at the high level “1” when an address signal showing the vector address storage area A-V of the built-in ROM 18 is present on the address bus 24 and an output signal C at the high level “1” when an address signal showing the address of the built-in RAM 13 is present on the address bus 24 .
- the gate G 1 ANDs the inversion signal of the control signal CONT to be set to high level during erasing or programming of the data in the built-in ROM 18 in the user program mode or boot mode and under vector fetch with the output signal A and asserts a selection signal SEL 1 serving as a module selection signal of the built-in ROM 18 from the low level “0” to the high level “1” when the built-in ROM 18 should be selected.
- the gate G 2 ANDs the control signal CONT with the output signal B and outputs an output signal D at the high level “1” when these signals are set to the high level “1”.
- the gate G 3 receives the output signals C and D and asserts a selection signal SEL 2 serving as a module selection signal of the built-in RAM 18 from the low level “0” to the high level “1” when the output signal C or D is set to the high level “1”.
- Addresses A 14 to A 0 (15 bits) are input to the built-in ROM 18 so that the built-in ROM (32K bytes) 18 can be accessed and addresses A 9 to A 0 (10 bits) are input to the built-in RAM 13 from the CPU so that the built-in RAM (1K bytes) can be accessed.
- the built-in ROM selection circuit 29 receives an address A 15 (only one bit) from the CPU 12 through the address bus 24 .
- the output signal A is set to high level when the address A 15 is low-level, that is, when addresses A 15 to A 0 output from the CPU 12 are set to “0xxx xxxx xxxx xxxx” (0 represents low level and x represents logic indetermination) and “0” or “1” is acceptable. That is, when an address signal for accessing the built-in ROM 18 is output onto the address bus 24 , the output signal A becomes high-level.
- the built-in RAM selection circuit 28 receives the addresses A 15 to A 8 from the CPU 12 through the address bus 24 .
- the addresses A 15 to A 0 output from the CPU 12 are set to “0000 0000 xxxx xxxx”, the output signal B becomes high-level. That is, the output signal B is set to high level when an address signal for accessing the vector address storage area A-V of the built-in ROM 18 is output onto the address bus 24 .
- the output signal C becomes high-level. That is, the output signal C is set to high level when an address signal for accessing the built-in RAM 13 is output onto the address bus 24 .
- a high voltage is supplied to the built-in ROM 18 through a predetermined external terminal Vpp for erasing or programming.
- the control signal CONT becomes high-level. That is, while the data in the built-in ROM 18 is erased or programmed and under vector fetch, the control signal CONT becomes high-level.
- the control signal CONT can be generated by a logic circuit constituted so as to be able to judge whether a high voltage is supplied through the predetermined external terminal Vpp and whether the CPU 12 is under the vector fetch state.
- the gate G 1 for obtaining the AND logic between the output signal A of the built-in ROM selection circuit 29 and the control signal CONT is arranged at the rear stage of the built-in ROM selection circuit 29 so that the built-in ROM 18 is selected when the selection signal SELL output from the gate GI is set to high level.
- the gate G 2 for obtaining the AND logic between the output signal B of the built-in RAM selection circuit 28 and the control signal CONT and the gate G 3 for obtaining the OR logic between the output logic of the gate G 2 and the output signal C of the built-in RAM selection circuit 28 are used so that the built-in RAM 13 is selected when the selection signal SEL 2 output from the gate G 3 is set to high level.
- the selection signal SEL 1 is set to low level and thereby, selection of the built-in ROM 18 is inhibited but instead, the selection signal SEL 2 is set to high level and thereby the built-in RAM 13 is selected. That is, a vector address on the built-in ROM 18 is read while the data in the built-in ROM 18 is erased or programmed.
- FIG. 4 shows the address map of this embodiment. As shown in FIG. 4 , this embodiment is constituted so as to move a vector address area to a built-in RAM area while the data in the built-in ROM 18 is erased or programmed in the user program mode or boot mode.
- the vector address area is moved not to the original vector address storage area A-V (H′0000 to H′00FF) of the built-in ROM 18 but to the vector address storage area B-V (H′FC00 to H′FCFF) of the built-in RAM while the data in the flash memory 18 is erased or programmed in the user program mode or boot mode.
- data for one or more available vector addresses is previously programmed in the built-in RAM 13 in response to erasing or programming of the data in the flash memory and thereafter, erasing or programming of the data in the flash memory 18 is started.
- an address signal for accessing the vector address storage area A-V of the built-in ROM 18 is converted into an address signal for accessing the vector address storage area B-V of the built-in RAM. Therefore, it is necessary to use an address conversion circuit for converting the address signal for accessing the vector address storage area A-V into the address signal for accessing the vector address storage area B-V when the address signal for accessing the vector address storage area A-V of the built-in ROM 18 is output from the CPU 12 .
- FIG. 5 shows an address conversion circuit ACC serving as malfunction exclusion means set to the bus control circuit 27 in FIG. 1 .
- the address conversion circuit ACC can be realized by a plurality of control logic circuits (gate circuits) G 4 for ORing the address signals A 15 to A 10 output from the CPU 12 with the control signal CONT, and a built-in RoM/built-in RAM selection circuit 31 for selecting the built-in ROM 18 or the built-in RAM 13 in accordance with output address signals of the gate circuits G 4 and the addresses A 9 to A 0 output from the CPU 12 .
- the gates G 4 and the built-in ROM/built-in RAM selection circuit 31 are built in the bus controller 27 shown in FIG. 1 . Though only one gate G 4 is shown in FIG. 5 , six gates G 4 are actually used correspondingly to the addresses A 15 to A 10 .
- the built-in ROM/built-in RAM selection circuit 31 includes the built-in ROM selection circuit 29 and the built-in RAM selection circuit 28 in FIG. 4 , and the output signal A in FIG. 4 serves as the module selection signal SELL and the output signal C in FIG. 4 serves as the module selection signal SEL 2 .
- the vector address storage area A-V is made to serve as a 256-byte storage area starting with “0000 0000 0000” and the vector address storage area B-V is made to start with “1111 1100 0000 0000”. Therefore, it will easily be understood that the start address of the area B-V in which the address signals A 10 and A 9 are set to “0” should properly be changed when it is different from the above.
- FIG. 6 shows the bus controller 27 including the gate G 5 for ignoring all interrupts including an NMI (Non-Maskable Interrupt) while the data in the flash memory serving as the built-in ROM 18 is erased or programmed.
- NMI Non-Maskable Interrupt
- the bus controller 27 includes the control logic circuit (gate circuit) G 5 serving as malfunction exclusion means between the interrupt control circuit 10 and the CPU 12 .
- the gate G 5 receives the control signal CONT′ to be set to high level while the data in the flash memory 18 is erased or programmed and it is controlled to active state in response to the high-level control signal CONT′. However, when the control signal CONT′ is low-level, the gate G 5 is controlled to inactive state.
- an NMI is an effective means for notifying the microcomputer of an emergency such as an outage
- a case in which erasing or programming of the data in the flash memory 18 fails due to a hardware-involved cause such as an outage cannot be recovered if the NMI is neglected.
- FIG. 7 shows the control logic circuit G 6 serving as malfunction exclusion means for resetting the erasing control bit register, programming control bit register, or verifying control bit of the built-in ROM 18 when an interrupt request occurs while the data in the built-in ROM 18 is erase, programmed, or verified in the user program mode or boot mode.
- the data in the built-in ROM 18 can be erased, programmed, or verified by setting a control bit to the erasing control bit register 32 , programming control bit register 33 , or verifying control bit register 34 . Therefore, it is also possible to form the structure so that the erasing control bit register 32 , programming control bit register 33 , or verifying control bit register 34 is reset when the interrupt and exception handling request IRQS output from the interrupt control circuit is asserted.
- the erasing control bit register 32 , programming control bit register 33 , and verifying control bit register 34 must correspond to an external reset request RESET 1 and a reset request RESET 2 from the watchdog timer 19 .
- the gate G 6 is used which ORs the reset requests RESET 1 and RESET 2 on one hand with the interrupt and exception handling request signal IRQS on the other.
- An output signal of the gate G 6 is supplied to the reset terminal of the erasing control bit register 32 , programming control bit register 33 , or verifying control bit register 34 .
- erasing, programming, or verifying of the data in the built-in ROM 18 is stopped because the erasing control bit register 32 , programming control bit register 33 , or verifying control bit register 34 is reset if a programming request occurs while the data in the built-in ROM 18 is erased, programmed, or verified.
- FIG. 8 shows a circuit for generating the control signal CONT described in FIG. 3 and the control signal CONT 1 described in FIG. 5 .
- a high-voltage detection circuit 81 is connected to the external terminal Vpp to which a high voltage such as 12 V is applied while the data in the flash memory 18 is programmed or erased and the circuit 81 outputs a high-level output signal V in response to the supply of the high voltage of 12 V.
- the high-level output signal V can be used as, for example, the control signal CONT′ in FIG. 5 .
- an enabling bit VATE 83 for controlling whether to enable movement of a vector address storage area is set to the microcomputer 30 .
- the CPU 12 executes a predetermined instruction (instruction for setting the enabling bit VATE 83 ) in response to the setting of the programming mode (user program mode) or boot mode of the flash memory 18 .
- An AND gate 80 is a gate circuit for ANDing the output signal V with the output state of the enabling bit VATE 83 and an output signal of the gate G 80 serves as the control signal CONT in FIG. 3 .
- the above structure makes it possible to generate the control signal CONT in FIG. 3 and the control signal CONT′ in FIG. 5 .
- FIG. 9 shows the programming method of the flash memory 18 of the microcomputer 30 in terms of the relation between the PROM mode and the on-board programming mode which are described above.
- the programming method includes the programming of the flash memory 18 according to the PROM mode and the programming of the flash memory 18 according to the on-board programming mode.
- Start (1) shows the start of the programming of the flash memory 18 according to the PROM mode, in which the operation mode of the microcomputer 30 is set to the PROM mode by the above described method and desired program data is programmed in the flash memory 18 by a general-purpose ROM writer (step S 1 ).
- the microcomputer 30 in which the desired program data is programmed is mounted on a board such as a printed circuit board and a microcomputer-applied system is assembled by using the mounting board (step S 2 ).
- Start (2) shows the start of the programming of the flash memory 18 according to on-board programming mode, in which the microcomputer 30 in which no desired program data is programmed is mounted on a board such as a printed circuit board and a microcomputer-applied system is assembled by using the mounting board (step S 3 ). Thereafter, the operation mode of the microcomputer 30 is set to the boot mode by the above-described method and desired program data is programmed in the flash memory 18 in accordance with a boot program (step S 4 ).
- a software program application software
- the microcomputer-applied system executes system operations in accordance with the desired program data programmed in the flash memory 18 (step S 5 ).
- specification-modified software or function-added software upgraded or version-up software
- case 1 or 2 occurs, it is necessary to reload the data in the flash memory 18 to desired program data.
- the operation mode of the microcomputer 30 is set to the boot mode or user program mode.
- the operation mode of the microcomputer 30 is set to the boot mode and the program data in the flash memory 18 is reloaded to desired program data.
- the operation mode of the microcomputer 30 is set to the user program mode and part of the program data in the flash memory 18 is reloaded to desired data.
- step S 6 step 5 is restarted and the microcomputer-applied system executes system operations in accordance with the reloaded program as shown by a broken line X.
- Steps S 5 and S 6 are repeated according to necessity.
- FIG. 10 shows a further detailed address map of the present invention, in which the vector address of an NMI (Non-Maskable Interrupt) and the NMI handling routine storage area corresponding to the address are shown in the user program mode or boot mode in the normal mode (single chip mode or external memory extension mode) and the user program mode or boot mode in the on-board reloaded mode of the flash memory.
- FIG. 10 can also be used as a specific example of the address maps shown in FIGS. 2 and 4 .
- a vector address NMIA of the NMI (Non-Maskable Interrupt) is stored in the vector address storage area A-V of the flash memory 18 and an NMI handling routine RA corresponding to the vector address NMIA is stored in a part of the address space A of the flash memory 18 in the normal mode such as the single chip mode or external memory extension mode. That is, the vector address NMIA shows the head address of the NMI handling routine RA.
- the CPU 12 obtains the vector address NMIA of the NMI by vector fetch operation and jumps to the address shown by the vector address NMIA, that is, the head address of the NMI handling routine RA to execute the processing.
- NMI Non-Maskable Interrupt
- the vector address NMIB of the NMI (Non-Maskable Interrupt) is stored in the vector address storage area B-V of the built-in RAM 13 and the NMI handling routine RB corresponding to the vector address NMIB is stored in a part of the address space B of the built-in RAM 13 . That is, the vector address NMIB shows the head address of the NMI handling routine RB.
- the CPU 12 obtains the vector address NMIB of the NMI (Non-Maskable Interrupt) by vector fetch operation and vector-jumps to the address shown by the vector address NMIB, that is, the head address of the NMI handling routine RB to execute the processing.
- NMI Non-Maskable Interrupt
- the NMI (Non-Maskable Interrupt) at the time of on-board reloading of the data in the flash memory 18 in the user program mode or boot mode is executed by using the vector address NMIA or NMI handling routine RA stored in the built-in RAM 13 instead of using the vector address NMIB or NMI handling routine RA stored in the flash memory 18 . Therefore, the NMI (Non-Maskable Interrupt) is securely executed at the time of on-board reloading of the data in the flash memory 18 in the user program mode or boot mode. In this case, attention must be paid to the fact that use of the vector address storage area B-V of the built-in RAM 13 or an area for storing the NMI handling routine RB or the like is limited as a work area for reloading.
- FIGS. 3 to 5 can be used to move the vector address storage areas A-V and B-V and the addresses of the vector address storage areas A-V and B-V are -moved in accordance with the control signals CONT and CONT′.
- FIG. 11 shows an illustration for explaining the usage of an NMI (Non-Maskable Interrupt) and its forming circuit at the time of on-board reloading in the user program mode or boot mode.
- NMI Non-Maskable Interrupt
- the microcomputer 30 of the present invention is assembled on a printed circuit board 120 together with a voltage maintenance means 110 and NMI signal generation means 112 .
- the voltage maintenance means 110 includes a function for maintaining the voltage of the Vcc terminal at 4.5 V or higher for a certain time (e.g. approx. 1 ms) when the voltage of the Vcc power supply (normally, 5 V) lowers to a specified value or less such as 4.5 V or lower.
- the microcomputer 30 sets a mode prepared to prevent the internal state from being damaged due to runaway of the microcomputer 30 such as a software standby mode for stopping generation of system clocks.
- the voltage maintenance means 110 is formed by using, for example, a large-capacity capacitor.
- the voltage maintenance means 110 maintains the potential of the power supply terminal Vcc of the microcomputer 30 at a voltage (e.g. 2.0 V) with which the microcomputer 30 can maintain the software standby mode.
- the voltage maintenance means 110 is constituted by including, for example, a secondary battery.
- the NMI signal generation means 112 detects the voltage and generates an NMI.
- the NMI signal generation means 112 generates a trailing edge changing from 5 to 0 V at the NMI signal input terminal of the microcomputer 30 to assert the NMI.
- the contents of the general-purpose registers (R 0 to R 15 ) and program counter (PC) can be returned to the NMI accepted state in accordance with the value of the above stack pointer (SP) when returning from the NMI handling routine RB.
- an external memory for storing the contents of the general purpose registers (R 0 to R 15 ) and the program counter (PC) is accessed in accordance with the value of the stack pointer (PC) and the reloading state of the flash memory 18 can be analyzed in accordance with the contents.
- FIG. 12 shows a flow of reloading executed between start and end of the on-board reloading mode of the flash memory 18 (example of user program mode).
- a command for starting the reloading of the data in the flash memory 18 is first issued to the CPU 12 .
- the CPU 12 executes preprocessing such as saving of the contents of an address area serving as a reloading work area if necessary (step S 13 ).
- the reloading area can also use a part of the address area of the built-in RAM 18 or a part of the address area of an external RAM in the external memory extension mode.
- a reloading routine is programmed in the reloading area by, for example, the CPU 12 .
- the reloading routine includes a programming control program and the NMI handling routine RB.
- the reloading routine may be stored in the flash memory 18 or supplied to the microcomputer 30 from an external unit.
- the vector address NMIB corresponding to the NMI handling routine RB is programmed in the vector address storage area B-V of the built-in RAM 13 by, for example, the CPU 12 (step S 15 ). Then, as shown in FIG. 8 , the CPU 12 sets a vector address movement enabling bit VATE 82 (step S 16 ). The above preprocessing is executed.
- step S 17 the CPU 12 executes the reloading routine programmed in the reloading work area to reload the program in the flash memory 18 .
- Program data to be programmed in the flash memory 18 is supplied from a unit outside of the microcomputer 30 .
- step S 17 the following postprocessing is executed by the CPU 12 . That is, the vector address movement enabling bit VATE 82 set in step S 16 is reset (step S 18 ). In other words, the enabling bit VATE 82 is cleared.
- the CPU 12 executes postprocessing such as recovering or saving of the contents of the reloading work area if necessary (step S 19 ). That is, when the contents are saved in step S 13 , the contents are recovered in step S 19 .
- step S 20 notice or reset-start of termination of reloading of the data in the flash memory 18 is executed and the reloading of the data in the flash memory 18 is completed.
- FIGS. 13 and 14 show the principle of a memory cell of the flash memory 18 .
- the memory cell illustrated in FIG. 13 comprises an insulated-gate field-effect transistor having a two-layer gate structure.
- symbol 1 represents a P-type silicon substrate
- 14 represents a P-type semiconductor region formed on the silicon substrate 1
- 13 represents an N-type semiconductor region
- 15 represents a low-concentration N-type semiconductor region.
- Symbol 8 represents a floating gate formed on the P-type silicon substrate 1 through a thin oxide film 7 (with a thickness of, for example, 10 nm) serving as a tunnel insulating film
- 11 represents a control gate formed on the floating gate 8 through an oxide film 9 .
- a source comprises symbols 13 and 15 and a drain comprises symbols 13 and 14 .
- Information stored in this memory cell is substantially held by the transistor as a change of a threshold voltage.
- a transistor for storing information hereafter referred to as a storage transistor
- a storage transistor is the N-channel type in a memory cell unless otherwise specified.
- Programming of information in a memory cell is realized by applying a high voltage to, for example, the control gate 11 and the drain and injecting electrons into the floating gate 8 from the drain side by means of avalanche injection.
- the threshold voltage of the storage transistor viewed from the control gate 7 becomes higher than that of the erased-state storage transistor in which programming is not performed as shown in FIG. 14 .
- Erasing of information in the memory cell is realized by applying a high voltage to, for example, the source and extracting electrons from the floating gate 8 to the source side by tunneling.
- the threshold voltage of the storage transistor viewed from the control gate 11 is lowered due to erasing.
- the threshold of the storage transistor is set to a positive voltage level under any of the programming and the erasing states. That is, the threshold voltage under the programming state is raised and the threshold voltage under the erasing state is lowered compared to a word line selection level supplied to the control gate 11 from a word line. Because the both threshold voltages and the word line selection level have the above relation, it is possible to constitute a memory cell with one transistor without using a selective transistor.
- Stored information is electrically erased by extracting electrons accumulated in the floating gate 8 to a source electrode. Therefore, when erasing is continued for a comparatively long time, electrons are extracted which are more than electrons injected into the floating gate at the time of programming. Therefore, when over-erasing in which electrical erasing is continued for a comparatively long time is performed, a trouble occurs that a word line is selected even at a word-line non-selective level because the threshold voltage of the storage transistor becomes a negative level. However, it is also possible to perform programming by using tunnel current similarly to the case of erasing.
- a voltage to be applied to the drain and the control gate 11 is limited to a comparatively low value so that weak programming is not performed for the above memory cell, that is, undesirable carrier injection is not performed for the floating gate 8 .
- a low voltage of approx. 1 V is applied to the drain 10
- a low voltage of approx. 5 V is applied to the control gate 11 .
- FIG. 15 shows the structural principle of a memory array using the above storage transistor.
- four storage transistors (memory cells) Q 1 to Q 4 are typically shown.
- control gates (selective gates of memory cells) of the storage transistors Q 1 and Q 2 (Q 3 and Q 4 ) in the same row are respectively connected to a corresponding word line WL 1 (WL 2 ) and the drain regions (input/output nodes of memory cells) of the storage transistors Q 1 and Q 3 (Q 2 and Q 4 ) arranged in the same column are respectively connected to corresponding data lines DL 1 and DL 2 .
- the source regions of the storage transistors Q 1 and Q 3 (Q 2 and Q 4 ) are connected to a source line SL 1 (SL 2 ).
- FIG. 16 shows voltage conditions for erasing and programming of data in a memory cell.
- a memory device represents a memory cell and a gate represents a control gate serving as a selective gate of a memory cell.
- a high electric field necessary for erasing is formed by applying a negative voltage such as ⁇ 10 V to a control gate.
- simultaneous erasing can be applied to memory cells as least-whose sources are connected in common in the case of the positive-voltage-type erasing. Therefore, when the source lines SL 1 and SL 2 are connected in the structure in FIG.
- the source-line division method includes not only the case typically shown in FIG. 15 in which a data line is used as the unit (common source line is extended in the data line direction) but also a case in which a word line is used as the unit (common source line is extended in the word line direction). Moreover, in the case of the negative-voltage-type erasing, simultaneous erasing can be applied to memory cells whose control gates are connected in common.
- FIG. 17 shows a circuit block diagram of the flash memory 18 in which storage capacities of simultaneously-erasable memory blocks differ from each other.
- the flash memory 18 shown in FIG. 17 (hereafter also referred to as an FMRY) has 8-bit data input/output terminals D 0 to D 7 and each data input/output terminal is provided with memory mats ARY 0 to ARY 7 .
- the memory mats ARY 0 to ARY 7 though not restricted, are divided into the following two parts: a memory block with a relatively large storage capacity and a memory block SMB with a relatively small storage capacity. Though a typical memory mat ARY 0 is shown in FIG. 17 , other memory mats ARY 1 to ARY 7 are similarly constituted. Moreover, each memory block can have the same storage capacity.
- a memory cell MC comprising the insulated-gate field-effect transistor of the two-layer gate structure described in FIG. 13 is arranged like a matrix on each of the memory mats ARY 0 to ARY 7 .
- WL 0 to WLn are word lines common to all the memory mats ARY 0 to ARY 7 .
- Control gates of memory cells arranged on the same row are respectively connected to a corresponding word line.
- Drain regions of memory cells MC arranged on the same column are respectively connected to corresponding data lines DL 0 to DL 7 in each of the memory mats ARY 0 to ARY 7 .
- Source regions of memory cells MC constituting the memory block SMB are connected to the source line SL 1 in common and source regions of memory cells MC constituting the memory block LMB are connected to the source line SL 2 in common.
- a high voltage Vpp used for erasing is supplied to the source lines SL 1 and SL 2 from voltage output circuits VOUT 1 and VOUT 2 .
- Output operations of the voltage output circuits VOUT 1 and VOUT 2 are selected in accordance with values of bits B 1 and B 2 of an erasing-block designation register. For example, when “1” is set to the bit B 1 of the erasing-block designation register, only the memory block SMB of each of the memory mats ARY 0 to ARY 7 is made simultaneously erasable. When “1” is set to the bit B 2 of the erasing-block designation register, only the memory block LMB of each of the memory mats ARY 0 to ARY 7 is made simultaneously erasable. When “1” is set to the both bits B 1 and B 2 , the whole flash memory is made simultaneously erasable.
- Selection of the word lines WL 0 to WLn is performed when a low address decoder XADEC decodes a low address signal Ax captured through a low address buffer XABUFF and a low address latch XALAT.
- a word driver WDRV drives a word line in accordance with a selection signal output from the low address decoder XADEC.
- the word driver WDRV operates by using a voltage Vcc such as 5 V supplied from a voltage selection circuit VSEL and an earth potential such as 0 V as its power supplies, drives a word line to be selected to a selection level by the voltage Vcc, and keeps a word line to be non-selected at a non-selection level such as the earth potential.
- the word driver WDRV operates by using the voltage Vpp such as 12 V supplied from the voltage selection circuit VSEL and an earth potential such as 0 V as its power supplies and drives a word line to be selected to a programming high-voltage level.
- the output of the word driver WDRV is set to a low voltage level such as 0 V.
- the data lines DL 0 to DL 7 are connect to a common data line CD in common through column selection switches YS 0 to YS 7 .
- the column selection switches YS 0 to YS 7 are controlled by the fact that a column address decoder YADEC decodes a column address signal AY captured through a column address buffer YABUFF and a column address latch YALAT. Selection signals output from the column address decoder YADEC are supplied to all the column address mats ARY 0 to ARY 7 in common. Therefore, when any one of the selection signals output from the column address decoder YADEC is set to a selection level, one data line is connected to the common data line CD in each of the memory mats ARY 0 to ARY 7 .
- Data read out of the memory cell MC to the common data line CD is supplied to a sense amplifier SAMP through a selection switch RS, amplified by the amplifier SAMP, and output to an external unit from a data output buffer DOBUFF through a data output latch DOLAT.
- the selection switch RS is set to a selection level synchronously with reading.
- Programming data supplied from an external unit is held by a data input latch circuit DILAT through a data input buffer DIBUFF.
- a programming circuit WRIT supplies a high voltage for programming to the common data line CD through a selection switch WS.
- the high voltage for programming is supplied to a drain of a memory cell to whose control gate a high voltage is applied through a data line selected by a column address signal AY in accordance with the low address signal Ax and thereby, data is programmed in the memory cell.
- the selection switch WS is set to a selection level synchronously with programming.
- a programming and erasing control circuit WECONT generates various timings for programming and erasing and voltage selection control.
- FIG. 18 shows the whole block diagram of the flash memory 18 (FMRY) built in the microcomputer 30 in FIG. 1 .
- symbol ARY represents a memory array formed by arranging a memory cell comprising the insulated-gate field-effect transistor of a two-layer gate structure described in FIG. 13 like a matrix.
- control gates of memory cells are respectively connected to a corresponding word line, drain regions of them are respectively connected to a corresponding data line, and source regions of them are connected to a common source line in every memory block.
- the memory block dividing state is different from that in FIG. 17 .
- the memory block is divided into seven large memory blocks (large blocks) LMB 0 to LMB 6 each of which has a relatively large storage capacity and eight small memory blocks (small blocks) SMB 0 to SMB 7 each of which has a relatively small storage capacity.
- the large memory blocks are used for a program storage area or a large-capacity data storage area.
- the small memory blocks are used for a small-capacity data storage area or the like.
- symbol ALAT represents a latch circuit for address signals PAB 0 to PAB 15 .
- the address signals PAB 0 to PAB 15 are supplied from the address bus 24 corresponding to the address signal output from the central processing unit CPU 12 .
- the address signals PAB 0 to PAB 15 correspond to the address signal output from a PROM writer.
- Symbol XADEC represents a low address decoder for decoding a low address signal captured through the address latch ALAT.
- Symbol WDRV represents a word driver for driving a word line in accordance with a selection signal output from the low address decoder XADEC.
- the word driver WDRV drives a word line at a voltage such as 5 V in the case of data reading and drives a word line at a high voltage such as 12 V in the case of data programming. In the case of data erasing, every output of the word driver WDRV is set to a low voltage level such as 0 V.
- Symbol YADEC represents a column address decoder for decoding a column address signal captured through the address latch YALAt.
- Symbol YSEL represents a column address decoder for selecting a data line in accordance with a selection signal output from the column address decoder YADEC.
- Symbol SAMP represents a sense amplifier for amplifying a signal read out of a data line selected by the column selection circuit YSEL.
- Symbol DOLAT represents a data output latch for holding an output of the sense amplifier.
- Symbol DOBUFF represents a data output buffer for output data held by the data output latch DOLAT to an external unit.
- PDB 0 to PDB 7 are low-order 8-bit (1 byte) data to be supplied to the data bus 26 in FIG.
- PDB 8 to PDB 15 are high-order 8-bit (1 byte) data to be supplied to the data bus 25 in FIG. 1 .
- output data is up to 2 bytes.
- DIBUFF represents a data input buffer for capturing the programming data supplied from an external unit. The data captured from the data input buffer DIBUFF is held by the data input latch circuit DILAT. When the data held by the data input latch circuit DILAT is set to “0”, the programming circuit WRIT supplies a high voltage for programming to a data line selected by the column selection circuit YSEL. The high voltage for programming is supplied to the drain of a memory cell to whose control gate a high voltage is applied in accordance with a low address signal and thereby, data in the memory cell is programmed.
- Symbol ERASEC represents an erasing circuit for supplying a high voltage for erasing to the source line of a designated memory block to simultaneously erase the data in the memory block.
- Symbol FCONT represents a control circuit for performing control of the timing for reading data from the flash memory FMRY and control of various timings for programming and erasing and voltage selection.
- the control circuit FCONT is provided with a control register CREG.
- FIG. 19 shows a control register CREG.
- Each control register CREG comprises an 8-bit program/erase control register PEREG and erasing-block designation registers MBREG 1 and MBREG 2 .
- Vpp represents a high-voltage applying flag to be set to “1” correspondingly to application of a high voltage for reloading.
- E bit is used as an erasing indication bit and EV bit is used as a verifying indication bit for erasing.
- P bit is used as a programming indication bit and PV pit is used as a verifying indication bit for programming.
- the erasing-block designation registers MBREG 1 and MBREG 2 are registers for designating a memory block to be erased among the large block divided into 7 parts and the small block divided into 8 parts and the zero-th to seventh bits of the resisters are used as bits for designating each memory block.
- the bit set to “1” represents selection of a corresponding memory block and the bit set to 101 represents non-selection of the corresponding memory block.
- the seventh bit of the erasing-block designation register MBREG 2 is set to “1”, erase of the data in the small memory block SMB 7 is designated.
- the control register CREG is set so that data can be read from or written in the register by an external unit.
- the control circuit FCONT refers to the contents set in the control register CREG and controls erasing or programming in accordance with the contents. It is possible to control the erasing or programming state by reloading the contents of the control register CREG through an external unit.
- control signals FLM, MS-FLN, MS-MISN, M 2 RDN, M 2 WRN, MRDN, MWRN, IOWORDN, and RST are supplied to the control circuit FCONT and moreover, predetermined bits of high-order one-byte data PDB 8 to PDB 15 and address signals PAB 0 to PAB 15 are given to the circuit FCONT.
- the control signal FLM is a signal for designating an operation mode of the flash memory FMRY, and the signal set to “0” designates the first operation mode of the flash memory and the signal set to “1” designates the second operation mode of it.
- the signal FLM is formed in accordance with, for example, the mode signals MD 0 to MD 2 .
- the control signal MS-FLM is a signal for selecting the flash memory FMRY, and the signal set to “0” designates selection and the signal set to “1” designates non-selection.
- a central processing unit CPU outputs the control signal MS-FLN.
- the control signal MS-FLN is made to correspond to a chip enable signal CE* supplied from a PROM writer PRW.
- the control signal MS-MISN is a signal for selecting the control register CREG.
- a register to be selected among the program/erase control register PEREG and the erasing-block designation registers MBREG 1 and MBREG 2 is determined by referring to a predetermined bit of the address signals PAB 0 to PAB 15 .
- a central processing unit CU In the first operation mode, a central processing unit CU outputs the control signal MS-MISN.
- the most-significant address bit EA 16 is regarded as the control signal MS-MISN.
- the M 2 RDN is a memory read strobe signal
- M 2 WRN is a memory write strobe signal
- MRDN is a read signal for the control register CREG
- MWRN is a write signal for the control register CREG.
- a central processing unit CPU outputs these control signals.
- a write enable signal WE* supplied from a PROM writer is regarded as the signal M 2 WRN or MWRN and an output enable signal OE* is regarded as the signal M 2 RDN or MRDN.
- the memory write strobe signal M 2 WRN is regarded as a strobe signal for programming the data to be programmed in a memory cell in the data input latch circuit DILAT. Actual programming of data in the memory cell is started by setting the P bit of the control register CREG.
- the IOWORDN is used as a signal for switching between 8-bit read access and 16-bit read access for the flash memory FMRY.
- the control signal IOWORDN is fixed to a logical value for indicating 8-bit read access.
- the RST is a reset signal for the flash memory FMRY.
- the mode setting bits EV, PV, E, and P of the program/erase control register PEREG are cleared. Therefore, the output of the gate G 7 shown in FIG. 7 is used as the reset signal RST and thereby, each bit of the control register PEREG can be cleared.
- the above embodiment performs programming of data in a flash memory by hot electrons, it is possible to use an embodiment for performing the programming by the tunnel effect.
- the above embodiment uses a flash memory as the built-in ROM 18 , it is also possible to use other semiconductor memory allowing on-board programming like the user program mode such as an EPROM.
- the present invention can be applied to an object by premising that the object includes at least an electrically erasable or programmable program memory.
- a malfunction due to an interrupt during erasing or programming of the data in the above program memory is excluded by malfunction exclusion means when no correct data is present in the program memory and thereby, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- a part of random-accessible storage means is moved to the vector address area of a program memory in accordance with an interrupt request generated during erasing or programming of the data in the program memory and thereby, a correct vector address can be obtained for occurrence of the interrupt during erasing or programming of the data in the program memory and thus, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- the vector address area of a program memory is moved to storage means in accordance with an interrupt request generated during erasing or programming of the data in the program memory and thereby, a correct vector address can be obtained for occurrence of the interrupt during erasing or programming of the data in the program memory and thus, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- erasing or programming of the data in a flash memory is automatically stopped even for an interrupt request erroneously generated due to an error in generating a program for erasing or programming data in a flash memory (a reloading control program), a malfunction, or an error in operating an external circuit and thereby, it is possible to protect the flash memory from an abnormal state such as over-erasing or over-programming of the data in the flash memory or an intermediate state by executing the processing for recording the state of stopping erasing or programming of the data in the flash memory during interrupt processing. Therefore, it is possible to protect a microcomputer-applied system from breakdown.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Storage Device Security (AREA)
- Read Only Memory (AREA)
- Microcomputers (AREA)
Abstract
To obtain a correct vector address even if an interrupt occurs during erasing or programming of the data in a built-in ROM 18 by moving a part of a built-in RAM13 to a vector address area by a bus controller 27. Thereby, a microcomputer is prevented from running away and the safety of a system is improved at the time of on-board programming of the built-in ROM 18.
Description
- The present invention relates to a on-board write art of a program memory built in a single-chip microcomputer serving as a data processor, particularly to an art to be effectively applied to a single-chip microcomputer provided with a flash-type electrically erasable and programmable read only memory (hereafter referred to as a flash-type EEPROM or a flash memory).
- A single-chip microcomputer (also known as a microcomputer) serving as a data processor has a built-in program memory for storing an operation program. The single-chip microcomputer executes predetermined data processing specified in the operation program stored in the built-in program memory.
- The program memory has been formed with a mask-type nonvolatile memory (hereafter referred to as a mask-type read-only memory or mask ROM) or an electrically programmable nonvolatile memory (hereafter referred to as an electrically programmable read-only memory or EPROM). In recent years, however, a flash-type electrically erasable and programmable read-only memory (hereafter referred to as a flash-type EEPROM or flash memory) has been applied to a program memory.
- The flash memory allows written data to be electrically erased or electrically rewritten. Therefore, a microcomputer having a built-in flash memory as a program memory has the following advantages.
- Cutover of a software program (application software) developed by a user generally tends to delay. Therefore, it is possible to assemble the hardware for a microcomputer-applied system before the cutover of a software program and then write a developed software program in a flash memory of a microcomputer. Thereby, it is possible to quickly ship the microcomputer-applied system.
- Moreover, when specification-modified software or function-added software (upgraded software or version-up software) is developed for already shipped application system software, it is possible for a user to rewrite the shipped application system software to the above newly-developed software.
- That is, in the case of a microcomputer having a built-in flash memory as a program memory, the microcomputer is assembled on a printed circuit board, mounting board, or system board-and then, the processing for writing an operation program in the above flash memory can be performed. In this specification, the processing for programming data in a built-in flash memory after assembling a microcomputer having the built-in flash memory on a printed circuit board, mounting board, or system board is referred to as “on-board programming” and this programming mode is referred to as “on-board programming mode”.
- Several methods are available to the flash memory programming. These methods are roughly divided into the following two types.
- (1) The first method is referred to as a user program mode or boot mode. This mode uses a method for branching the flow of program execution by a central processing unit (CPU) built in a microcomputer to the on-board programming and changing the data in a flash memory by the CPU.
- (2) The second method is referred to as a programming mode using a ROM writer. This mode uses a method for changing the data in a flash memory by external means (ROM writer) by stopping a microcomputer.
- Japanese Patent Laid-Open No. 180664/1994 discloses a system for handling a trouble at the time of rewriting by moving a trouble handling program to another area when rewriting a flash memory.
- In the case of the above first method, because the information stored in a built-in flash memory are subject to rewriting, programming control programs present in memories other than a flash memory such as a built-in RAM (random access memory) are executed by a central processing unit (CPU) to erase or program the data in the flash memory.
- In the case of the above first method, original functions of a microcomputer are not lost under the erasing or programming state of the flash memory. Therefore, an interrupt to the central processing unit (CPU) erroneously occurs due to a signal input supplied from a unit outside of the microcomputer or an address error occurs while the programming control program is executed. Moreover, because an NMI (Non-Maskable Interrupt) cannot inhibit an interrupt, an unexpected NMI may occur while the data in the flash memory is programmed or erased according to the above first method. A similar state may occur if an interrupt other than the NMI is enabled.
- In general, when an interrupt or address error occurs, the processing by a central processing unit is branched to an interrupt handling routine or exception handling routine. A vector address showing the head address of an interrupt handling routine or exception handling routine is used to branch the processing by the central processing unit to the interrupt handling routine or exception handling routine. When an interrupt occurs or exception handling occurs, the vector address of a relative interrupt or exception handling routine is obtained by the central processing unit. The obtained vector address is programmed in a program counter of the central processing unit and the program flow of the central processing unit jumps to an address indicated by the vector address to execute relative interrupt or exception handling.
- It is clarified as the result of study by the present inventor that the following is a matter to be cautioned.
- That is, a plurality of vector addresses are generally stored in the vector address storage area of a program memory. Even when a flash memory is used as a program memory, the same is applied to the above mentioned and thus, a plurality of vector addresses are stored in the vector address storage area of the flash memory.
- However, if an interrupt occurs or exception handling occurs when a flash memory is used as a program memory and erasing or programming is executed for the flash memory in the user program mode or boot mode, a central processing unit cannot obtain a desired vector address stored in the vector address storage area of the flash memory.
- That is, vector addresses are present in the program memory, though a rewrite control program for erasing or programming the data in the flash memory in the user program mode or boot mode is present in a memory (e.g. RAM) other than the flash memory. Therefore, no correct vector address can be obtained during erasing or programming for the flash memory serving as the program memory. As a result, it has been clarified that a microcomputer may run away or an application system may be damaged if an interrupt occurs or exception handling occurs in the user program mode or boot mode of a program memory. Moreover, if the microcomputer runs away and data is over-erased from or over-programmed in the flash memory, it may be impossible to reproduce the microcomputer-application system. It is general means to detect a trouble such as a power-supply voltage drop by an interrupt such as an NMI.
- It is regarded that erasing or programming for the flash memory includes erasing verify operation and programming verify operation.
- In the case of a microcomputer having a built-in flash memory as a program memory, a user can program software in the built-in flash memory after assembling the hardware of an application system or rewrite the software stored in the built-in flash memory of a shipped applied system. Therefore, there are a lot of advantages in setting a flash memory in a microcomputer. However, it is found that occurrence of an interrupt or occurrence of exception handling during on-board programming in the user program mode or boot mode of a built-in flash memory may cause a microcomputer to run away or an application system to be damaged.
- It is an object of the present invention to improve the safety of a system during on-board programming of a program memory.
- It is another object of the present invention to provide a data processor including an electrically erasable and programmable non-volatile memory as a program memory and capable of preventing a microcomputer from running away and from being damaged even when an interrupt handling or exception handling is requested during on-board programming of the above program memory.
- It is still another object of the present invention to provide a microcomputer which includes a flash memory as a program memory and can respond to a request for an interrupt handling or exception handling made during on-board programming or erasing of the program memory.
- It is still another object of the present invention to provide a single-chip microcomputer which includes a flash memory as a program memory and is constituted so as to be able to obtain a vector address related to the interrupt handling or exception handling to which a central processing unit responds. When an request for an interrupt handling or exception handling is made during on-board programming or erasing of the program memory.
- The above and other objects and novel features of the present invention will become more apparent from the description and accompanying drawings of this specification.
- The outline of a typical invention among those disclosed in this application is briefly described below.
- A data processor comprises an electrically erasable or programmable program memory (18), a central processing unit (12) accessible to the program memory (18), and malfunction exclusion means for excluding a malfunction due to occurrence of an interrupt or occurrence of exception handling while the data in the program memory is erased or programmed.
- The malfunction exclusion means can include the following structures.
- (1) As shown in
FIG. 6 , a first control logic circuit (G5) for excluding or invalidating an interrupt request or an exception handling request to the central processing unit (12) while the data in the program memory (18) is erased or programmed is provided in the data processor. - Therefore, because the first control logic circuit (G5) excludes or invalidates the interrupt request or exception handling request to the central processing unit (12) while the data in the program memory (18) is erased or programmed in the user program mode or boot mode, the central processing unit (12) does not execute the operation for obtaining a vector address corresponding to the interrupt request or exception handling request while the data in the program memory (18) is erased or programmed. This improves the safety of a system during on-board programming of the program memory (18). Thereby, it is possible to inhibit an unintended interrupt request from occurring.
- (2) As shown in
FIG. 7 , a second control logic circuit (G6) for stopping erasing or programming of the data in the program memory (18) in response to an interrupt request or exception handling request to the central processing unit (12) while the data in the program memory (18) is erased or programmed in the user program mode or boot mode is provided in the data processor. - That is, while the data in the program memory (18) is erased or programmed, the second control logic circuit (G5) responds to an interrupt request or exception handling request to the central processing unit (12) and stops erasing or programming of the data in the program memory (18). Specifically, the second control logic circuit (G5) changes the data in the control bits such as an erasing control bit (32), a programming control bit (33), and a verifying control bit (34) of an operation control register set to the program memory (18) from active state to inactive state.
- Therefore, when an interrupt request or exception handling request to the central processing unit (12) occurs while the data in the program memory (18) is erased or programmed, the second control logic circuit (G5) stops erasing or programming of the data in the program memory (18). Occurrence of the above interrupt may be caused by a programming error of a programming and erasing control program or an emergency such as an outage. Therefore, by stopping erasing or programming of the data in the program memory (18), over-erasing or over-programming of data in a flash memory can be prevented. Moreover, thereafter, the central processing unit (12) can obtain a vector address corresponding to the interrupt request or exception handling request from the program memory (18). Thus, improvement of the safety of the system during on-board programming of the program memory (18) is achieved.
- (3) As shown in
FIGS. 3 and 5 , selected memory change means (G1, G2, and G4) for changing a memory selecting operation from the program memory (18) to another memory are provided in the data processor so that a predetermined area of a memory other than the program memory (18) such as a random access memory (13) can be accessed by inhibiting access to the vector address storage area of the program memory (18) when an interrupt request or exception handling request to the central processing unit (12) occurs while the data in the program memory (18) is erased or programmed. Moreover, the selected memory change means (G1, G2, and G4) can be set to a bus controller (27). - In this case, vector address data for interrupt handling or exception handling to be processed when an interrupt request or exception handling request to the central processing unit (12) occurs while the data in the program memory (18) is erased or programmed is previously stored in a predetermined area of a memory other than the program memory (18). Moreover, the vector address data stored in the predetermined storage area is set so as to indicate the head address of a predetermined interrupt handling routine or exception handling routine stored in another storage area of the memory other than the program memory (18).
- (3.1) In the above Item (3), when an interrupt request or exception handling request to the central processing unit (12) occurs while the data in the program memory (18) is erased or programmed, the selected memory change means (G1 and G2) respond to detection of the access to the vector address storage area of the program memory (18) and in activates a selection signal of the program memory (18). Instead, the selected memory change means (G1 and G2) activate a selection signal of the memory (13) other than the program memory (18).
- (3.2) In the above Item (3), when an interrupt request or exception handling request to the central processing unit (12) occurs while the data in the program memory (18) is erased or programmed, the selected memory change means (G4) responds to detection of the access to the vector address storage area of the program memory (18) and converts an address signal for accessing the vector address storage area of the program memory (18) into an address signal for accessing a predetermined storage area of a memory such as the random access memory (13) other than the program memory (18).
- According to the structure shown in the above Item (3.1) or (3.2), the central processing unit (12) can obtain a vector address related to a relative interrupt handling routine or exception handling routine by accessing another area of the memory other than the program memory (18) even if an interrupt request or exception handling request to the central processing unit (12) occurs while the data in the program memory (18) is erased or programmed in the user program mode or boot mode. Therefore, over-erasing or over-programming of data in a flash memory can be prevented by using an NMI and thereby, notifying a microcomputer of an emergency such as drop of power supply voltage Vcc due to an outage and stopping erasing or programming of the data in the program memory (18). In this case, it is possible to protect a flash memory from an abnormal state such as over-erasing, over-programming, or intermediate state by executing the processing for recording a stop state of erasing or programming in an interrupt handling routine to an NMI. This achieves the improvement of the safety of a system during on-board programming of the program memory (18).
-
FIG. 1 is a block diagram showing the whole structure of the single-chip microcomputer of an embodiment of the present invention; -
FIG. 2 is an illustration for explaining an address map when moving part of a built-in RAM included in the above microcomputer to a vector address area; -
FIG. 3 is an illustration showing the structure of the main portion of thebus controller 27 in terms of the relation between the built-inROM 18 and the built-inRAM 13 when address-converting a vector address storage area B-V of the built-inRAM 13 into a vector address storage area A-V of theflash memory 18; -
FIG. 4 is an illustration for explaining an address map of another embodiment of the present invention; -
FIG. 5 shows an address conversion circuit ACC serving as malfunction exclusion means set to thebus control circuit 27 inFIG. 1 ; -
FIG. 6 shows thebus controller 27 including a gate G5 for ignoring all interrupts including an NMI (Non-Maskable Interrupt) during erasing or programming of data in a flash memory serving as the built-inROM 18; -
FIG. 7 shows the control logic circuit G6 serving as malfunction exclusion means for resetting the erasing control bit register, programming control bit register, and verifying control bit register of the built-inROM 18 when a programming request occurs during erasing, programming, or verifying of the data in the built-inROM 18; -
FIG. 8 shows a circuit for generating a control signal CONT explained inFIG. 3 and a control signal CONT′ complained inFIG. 5 ; -
FIG. 9 shows the programming method of theflash memory 18 of themicrocomputer 30 inFIG. 1 in terms of the relation between the PROM mode and the on-board programming mode described above; -
FIG. 10 shows a further detailed address map of the present invention, in which areas for storing a vector address of an NMI (Non-Maskable Interrupt) and an NMI handling routine for the vector address in the normal mode (single-chip mode or external memory expansion mode) and the on-board loading mode of a flash memory are shown; -
FIG. 11 shows an illustration for explaining the usage of an NMI (Non-Maskable Interrupt) in the on-board programming mode and a circuit for generating the NMI;FIG. 12 shows a reloading flow to be executed between the start and the end of the on-board programming mode (example of the user program mode) of theflash memory 18; -
FIG. 13 shows a cross section of a memory cell of theflash memory 18; -
FIG. 14 shows thresholds of the erasing state and the programming state of a memory cell of theflash memory 18; -
FIG. 15 shows the structure of a memory array of theflash memory 18; -
FIG. 16 shows a voltage condition for erasing and programming data in a memory cell of theflash memory 18; -
FIG. 17 shows a block diagram of theflash memory 18; -
FIG. 18 shows the whole block diagram of theflash memory 18; and -
FIG. 19 shows a control register of theflash memory 18. -
FIG. 1 shows the single-chip microcomputer 30 serving as the data processor of the present invention. Though not restricted, the single-chip microcomputer 30 is formed on a semiconductor substrate (semiconductor chip) such as a single-crystal silicon substrate. - As shown in
FIG. 1 , the single-chip microcomputer 30, though not restricted, comprises an interruptcontrol circuit 10, aclock generation circuit 11, the central processing unit (CPU) 12, the built-in random access memory (RAM),internal RAM or on-chip RAM 13, ahost interface circuit 14, a serialcommunication interface circuit 15 serving as a serial communication circuit, a 10-bit analog-to-digital conversion circuit (A-D converter) 16, an 8-bit digital-to-analog conversion circuit (D-A converter) 17, the built-in read-only memory (ROM),internal ROM or on-chip ROM 18 serving as a program memory, awatchdog timer circuit 19, a 16-bit free-runningtimer circuit 20, an 8-bit timer circuit 21, a PWM timer circuit 22 used for pulse width modulation, and ports P1 to P9 used for inputting and outputting a plurality of signals or inputting/outputting a plurality of signals. - These circuit modules (10, 12 to 22, and P1 to P9) are connected by an
address bus 24 and adata bus 26 so that thecentral processing unit 12 can access the circuit modules (12 to 22 and P1 to P9) by using theaddress bus 24 anddata buses - When the
central processing unit 12 accesses any one of the circuit modules (12 to 22 and P1 to P9), it outputs an address signal for selecting the address assigned to a circuit module to be accessed to theaddress bus 24. In this case, when the data read mode is set, the circuit module to be accessed outputs data to thedata buses central processing unit 12 captures the data through thedata bus 26. However, when the data write mode is set, thecentral processing unit 12 outputs desired data to thedata buses data buses - Then, functions of the circuit blocks (10 to 22) are described below.
- The
clock generator 11, though not restricted, comprises an oscillator for oscillating by using a crystal oscillator, a duty correction circuit for correcting the duty of pulses output from the oscillator, a clock divider for generating built-in peripheral-module clock signals for the built-in peripheral modules (12 to 22) by dividing a system clock signal output from the duty correction circuit, and a prescaler for generating an internal clock signal by dividing the built-in peripheral-module clock signal output from the clock divider. The circuit modules (10 and 12 to 22) are operated synchronously with a system clock with a predetermined frequency generated by theclock generator 11. - The
CPU 12, though not restricted, comprises an instruction register (IR) for storing a defined instruction in a program to be processed, an instruction decoder (IDEC) for decoding an instruction stored in the instruction register, and an instruction executing section (IEXE) whose operation is controlled in accordance with a control signal output from the instruction decoder. The instruction executing section (IEXE) comprises an arithmetic and logic unit (ALU) for executing arithmetic operations and logic operations, 8-bits —16 general-purpose registers (R0 to R15), and a program counter (PC) for storing data related to the instruction address of an instruction to be next executed in a program. The data in the program counter (PC) is incremented whenever an instruction is executed by the instruction executing section (IEXE). The instruction executing section (IEXE) performs predetermined types of processing and controls operations of the built-in peripheral modules (12 to 22) by using a system clock output from theclock generator 11 as a time base. The instruction register (IR), instruction decoder (IDEC), instruction executing section (IEXE), arithmetic and logic unit (ALU), general-purpose registers (R0 to R15), and program counter (PC) are not illustrated inFIG. 1 in order to simplify the drawing. - One of the general-purpose registers is used as a stack pointer when an interrupt or exception occurs. That is, when the interrupt or exception occurs, the data stored in the general-purpose register at the point of that time is saved in, for example, a predetermined external memory. In this case, the stack point stores address data showing the address of the saved data. At the time of returning from interrupt handling or exception handling, the data in the general-purpose register which is saved in the external memory is recovered into the general-purpose register by using the address data stored in the stack pointer when the interrupt handling or exception handling is accepted. Moreover, when one unit from one leading edge to the next leading edge of the system clock is assumed as one state, a memory cycle or bus cycle of the
CPU 12 comprises, for example, two or three states. In other words, theCPU 12 is designed so as to be able to access the built-in peripheral modules (12 to 22) at two or three periods of the system clock. - The built-in
RAM 13, though not restricted, uses a static RAM having a storage capacity of 1K bytes. The built-inRAM 13 is connected to theCPU 12 by theaddress bus 24 and thedata buses RAM 13 makes it possible to input and output byte data (8-bit data) and word data (16-bit data) at one two-state memory access cycle. - The
host interface circuit 14 has a parallel interface function of two channels of theCPU 12 and a host system and, though not restricted, comprises a 4-byte data register, a high-speed gate logic, and an interrupt request circuit. Thecircuit 14 can communicate with the host system through five control signals from the host system, four output signals to the host system, and thedata bus 25 with an 8-bit width serving as a command or data input/output bus. - The serial
communication interface circuit 15 is a module for performing serial data communication with other LSI and makes it possible to select between the communication in a start-stop synchronous mode and the communication in a clock synchronous mode. Thecircuit 15 allows designation of an operation mode, designation of a data format, and setting of a bit rate, and includes a plurality of control registers for transmission/reception control, a transmission/reception control circuit, and a bus interface. - The
A-D converter 16, though not restricted, is used to convert an input analog signal into a digital signal according to the sequential conversion system and, though not restricted, makes it possible to select analog inputs of up to 8 channels. - The
D-A converter 17 has a function for converting a digital signal input through thedata bus 25 into an analog signal and includes various registers, an 8-bit D-A converting section, and a control circuit. - The
watchdog timer 19 monitors a system. When values of a timer counter in thewatchdog timer 19 overflow without being rewritten due to runaway of a system, thetimer 19 outputs a reset signal or an NMI (Non-Maskable Interrupt) request to theCPU 12. When this function is not used, the timer counter in thewatchdog time 19 can also be used as an interval timer. - The 16-bit free-running
timer 20, though not restricted, can generate two types of independent waveform outputs by basing on the 16-bit free-running counter and moreover, makes it possible to measure the width of an input pulse and the period of an external clock. - The 8-
bit timer 21 is provided with two channels and moreover, provided with an 8-bit time constant register in addition to a timer counter for each channel. Thereby, thetimer 21 can output a pulse signal with any duty ratio. - The PWM timer 22 is provided with two channels and with an 8-bit timer counter and an 8-bit duty register for each channel, and makes it possible to obtain a duty pulse of 0 to 100% according to a value set to the 8-bit duty register.
- The interrupt
control circuit 10 has a function for receiving an NMI (Non-Maskable Interrupt) and IRQ0 and IRQ2 which serve as external interrupt request signals and not-illustrated internal interrupt requests supplied from theperipheral modules 15 to 22 and performing types of processing in accordance with a predetermined priority sequence so that an interrupt and exception handling request signal IRQS is transmitted to theCPU 12 in accordance with the interrupt request handling result. The interruptcontrol circuit 10, though not illustrated inFIG. 1 , is connected to theaddress bus 24 and thedata bus 25 so that an internal register can be accessed by theCPU 12. Moreover, the NMI (Non-Maskable Interrupt) is regarded as an interrupt which cannot be masked. Therefore, when the interruptcontrol circuit 10 receives the NMI (Non-Maskable Interrupt), it executes the interrupt handling according to the NMI. - The built-in
ROM 18 is referred to as a program memory for storing a program to be executed by theCPU 12. The built-inROM 18, though not restricted, is connected to theCPU 12 by theaddress bus 24 and thedata buses ROM 18 can output byte data (8-bit data) and word data (16-bit data) at one two-state memory access cycle. As described above, the built-inROM 18 comprises a flash-type electrically erasable and programmable read-only memory (hereafter referred to as a flash-type EEPROM or flash memory). A program stored in the flash memory as data can be programmed by setting a single-chip microcomputer to the on-board programming mode. - When the operation mode of the
microcomputer 30 of this embodiment is set to the on-board programming mode, it is possible to program, erase, and verify a program (data) in the built-inROM 18. The on-board programming mode includes two types of operation modes (boot mode and user program mode). The boot mode is referred to as a first on-board programming mode and the user program mode is referred to as a second on-board programming mode. - The operation mode of the
microcomputer 30 is discriminated by a mode setting circuit MC and the mode setting circuit MC sets one of mode setting signals MS0 to MS4 to high level. The high-level mode setting signal showing a designated operation mode is supplied to, for example, circuits of the centralprocessing unit CPU 12 and thebus controller 27. The mode setting circuit MC judges whether signal voltages of mode signals MDS0 to MDS2 supplied to mode setting terminals MD0 to MD2 and a high voltage Vp supplied to a high-voltage supply terminal Vpp are combined as predetermined and sets the operation mode of themicrocomputer 30 to a desired operation mode. Thereby, the operation mode of themicrocomputer 30 includes not only the boot mode and the user program mode but also the PROM mode, single chip mode, and external memory extension mode to be mentioned later. The single chip mode is a mode for constituting a microcomputer system by using address spaces of a built-in RAM and a built-in ROM. The external memory extension mode is a mode for constituting a microcomputer system by using not only the address spaces of the built-in RAM and ROM but also those of other memories. - For example, when a voltage of 12 V is supplied to the mode setting terminal MD2 and the high-voltage supply terminal Vpp, the operation of the
microcomputer 30 is set to the boot mode. That is, the mode setting signal MS0 is set to high level. In this case, a voltage of 0 or 5 V is supplied to the mode setting terminals MD1 and MD0 respectively in accordance with the address-space setting mode of themicrocomputer 30. When a voltage of 12 V is supplied to the high-voltage supply terminal Vpp, the operation mode of themicrocomputer 30 is set to the user program mode. That is, the mode setting signal MS1 is set to high level. In this case, a voltage of 0 or 5 V is supplied to the mode setting terminals MD0 to MD2 respectively in accordance with the address-space setting mode of themicrocomputer 30. Though not restricted, the high level of the mode setting signal MS2 shows the above PROM mode, the high level of the mode setting signal MS3 shows the above single chip mode, and the high level of the mode setting signal MS4 shows the above external memory extension mode. - To use the boot mode, the programming and erasing user program (rewrite control program) of the
flash memory 18 and programming data are previously prepared in a not-illustrated host system. When the boot mode is set, the boot program previously programmed in a boot ROM is started after resetting is canceled. Then, the low-level period of data transmitted from the host system is measured by the serialcommunication interface circuit 15, thereby the bit rate of the data transmitted from the host system is calculated, and the value of the bit rate register of the serialcommunication interface circuit 15 is determined. Then, the host system transfers the data constituting the rewrite control program. The data for the rewrite control program received by the serialcommunication interface circuit 15 is stored in the built-inRAM 13. After programming of the rewrite control program-is completed, the processing of the boot program is branched to the head address of the rewrite control program of the built-inRAM 13. Thereby, the rewrite control program programmed in the built-inRAM 13 is executed by theCPU 12 and programming or erasing of the data in the flash memory is executed. The above boot ROM comprises a nonvolatile memory circuit such as a mask ROM and the data stored in the ROM is not erased even if the power supply potential lowers. - In the user program mode, programming or erasing of the data in the
flash memory 18 can be made by the programming and erasing user program (rewrite control program) of theflash memory 18. In this case, high-voltage supply means for supplying a high voltage and data supply means for supplying rewrite data are provided on a mounting board. Then, the rewrite control program is stored in theflash memory 18 or a part of the program area of other memory (external memory). TheCPU 12 stores the rewrite control program in the built-inRAM 13 in response to setting of the user program mode and on-board rewriting of the flash memory is performed by theCPU 12 for executing the rewrite control program. - It is possible to prepare not only the on-board programming mode but also the PROM mode as the erasing or programming mode of the
flash memory 18 serving as a built-in ROM. The RPOM mode is a mode for making it possible to program the program data in theflash memory 18 by using a general-purpose PROM writer. The PROM mode is set by, for example, supplying the mode setting signals MDS0 to MDS2 at the low level “0” to all of the mode setting terminals MD0 to MD2. - If an interrupt request or exception handling request occurs during erasing or programming of the data in the
flash memory 18 in the user program mode or boot mode when a vector address is present in theflash memory 18 serving as a built-in ROM, theCPU 12 cannot obtain a correct vector address. This is because the data in the built-inROM 18 is being erased or programmed and thereby, theCPU 12 cannot access the vector address storage area of theflash memory 18. Thus, a microcomputer may run away as described above. - Therefore, this embodiment is constituted so that a part of the storage area (address area) of the built-in
RAM 13 is moved to the vector address storage area of theflash memory 18 while the data in theflash memory 18 is erased or programmed in the user program mode or boot mode. That is, the address of the vector address storage area of theflash memory 18 is moved to the address of a part of the storage area of the built-inRAM 13 while the data in theflash memory 18 is erased or programmed. Thereby, an address signal for fetching a vector address generated during erasing or programming of the data in theflash memory 18 accesses a part of the storage area of the built-inRAM 13. Therefore, it is possible to prevent a microcomputer from running away by previously storing necessary addresses in a part of the storage area of the built-inRAM 13 so that a correct vector can be obtained. In other words, the built-inRAM 13 of this embodiment is used to substitute for the vector address storage area stored in theflash memory 18 while the data in the built-inROM 18 is erased or programmed in the user program mode or boot mode. In this case, available addresses are previously programmed in a part of the storage area of the built-inRAM 13 and thereafter, execution of a program for erasing or programming data in the built-inROM 18 is started. -
FIG. 2 shows the first embodiment of the address map according to the present invention including the vector address storage area B-V of the built-inRAM 13 used to erase or program the data in a flash memory serving as the built-inROM 18. - An address space controlled by the
CPU 12, in other words, an address space which can be accessed by theCPU 12, though not restricted, has 64K bytes (H′0000 to H′FFFF). That is, theaddress bus 24 has 16 bits. - The address area A of an address space assigned to the built-in
ROM 18 has 32K bytes (H′0000 to H′FFFF). In the address area A, the vector address storage area A-V for storing address data related to a vector address has 256 bytes (H′0000 to H′00FF). - An address area B of the address space assigned to the built-in
RAM 13 has 1K bytes (H′00FC00 to H′FFFF). The address area B includes the address area B-V as shown inFIG. 2 . The address area B-V serves as an area for substituting for the vector address storage area A-V in order to safely perform on-board programming of the built-inROM 18 and, for example, 256 bytes (H′FC00 to H′FCFF) are assigned to the area B-V. Therefore, the vector address storage area B-V stores one or more vector addresses used when an interrupt request or exception handling request occurs in the on-board programming mode (user program mode) of the built-inROM 18. - Even if the
CPU 12 reads the vector address area A-V when theCPU 12 handles an interrupt request generated during erasing or programming of the data in theflash memory 18 in the user program mode or boot mode, the vector address storage area B-V is accessed because the addresses (H′FC00 to H′FCFF) assigned to the vector address storage area B-V are apparently moved to the vector address storage area A-V as described above. Thereby, a correct vector address is obtained from the vector address storage area B-V during erasing or programming of data in a flash memory serving as the built-inROM 18. Therefore, theCPU 12 can correctly perform desired interrupt handling and exception handling correspondingly to an interrupt request and exception handling request even during erasing or programming of the data in theflash memory 18. - To realize the substitution for the above vector address area, it is necessary that the vector address storage area B-V of the built-in
RAM 13 is accessed by thebus controller 27 so that the contents of the area B-V (predetermined vector address data) are read when a vector address signal is output from theCPU 12. - That is, when the
CPU 12 generates an address signal for reading the vector address storage area A-V of theflash memory 18 at the time of interrupt handling during erasing or programming of data in a flash memory serving as the built-inROM 18 in the user program mode or boot mode, it is necessary for thebus controller 27 to control a module selection signal as shown below. That is, thebus controller 27 inactivates a module selection signal of the built-inROM 18, which should originally be activated and instead, activates a module selection signal of the built-inRAM 13 and performs control so that the vector address storage area B-V of the built-inRAM 13 is read. Specifically, it is necessary to set the control circuits (G1, G2, and G3) shown inFIG. 3 to thebus controller 27 shown inFIG. 1 . -
FIG. 3 shows a structure of main portion of thebus controller 27 when address-converting the vector address storage area B-V of the built-inRAM 13 into the vector address storage area A-V of theflash memory 18 in terms of the relation between the built-inROM 18 and the built-inRAM 13. - The
bus controller 27 includes a built-inROM 29 for selecting the built-inROM 18, a built-inRAM selection circuit 28, and gates G1 to G3 serving as control logic circuits (malfunction exclusion means). The built-inROM selection circuit 29 outputs an output signal A at the high level “1” when an address signal showing the address of the built-inROM 18 is present on theaddress bus 24. The built-inRAM selection circuit 28 outputs an output signal B at the high level “1” when an address signal showing the vector address storage area A-V of the built-inROM 18 is present on theaddress bus 24 and an output signal C at the high level “1” when an address signal showing the address of the built-inRAM 13 is present on theaddress bus 24. The gate G1 ANDs the inversion signal of the control signal CONT to be set to high level during erasing or programming of the data in the built-inROM 18 in the user program mode or boot mode and under vector fetch with the output signal A and asserts a selection signal SEL1 serving as a module selection signal of the built-inROM 18 from the low level “0” to the high level “1” when the built-inROM 18 should be selected. The gate G2 ANDs the control signal CONT with the output signal B and outputs an output signal D at the high level “1” when these signals are set to the high level “1”. The gate G3 receives the output signals C and D and asserts a selection signal SEL2 serving as a module selection signal of the built-inRAM 18 from the low level “0” to the high level “1” when the output signal C or D is set to the high level “1”. - Addresses A14 to A0 (15 bits) are input to the built-in
ROM 18 so that the built-in ROM (32K bytes) 18 can be accessed and addresses A9 to A0 (10 bits) are input to the built-inRAM 13 from the CPU so that the built-in RAM (1K bytes) can be accessed. - The built-in
ROM selection circuit 29 receives an address A15 (only one bit) from theCPU 12 through theaddress bus 24. The output signal A is set to high level when the address A15 is low-level, that is, when addresses A15 to A0 output from theCPU 12 are set to “0xxx xxxx xxxx xxxx” (0 represents low level and x represents logic indetermination) and “0” or “1” is acceptable. That is, when an address signal for accessing the built-inROM 18 is output onto theaddress bus 24, the output signal A becomes high-level. - The built-in
RAM selection circuit 28 receives the addresses A15 to A8 from theCPU 12 through theaddress bus 24. When the addresses A15 to A0 output from theCPU 12 are set to “0000 0000 xxxx xxxx”, the output signal B becomes high-level. That is, the output signal B is set to high level when an address signal for accessing the vector address storage area A-V of the built-inROM 18 is output onto theaddress bus 24. - However, when the address signal is output onto the
address bus 24 and the addresses A15 to A10 output from theCPU 12 are set to “1111 1100 xxxx xxxx”, the output signal C becomes high-level. That is, the output signal C is set to high level when an address signal for accessing the built-inRAM 13 is output onto theaddress bus 24. - A high voltage is supplied to the built-in
ROM 18 through a predetermined external terminal Vpp for erasing or programming. When the supplied high voltage is detected and a signal showing the vector fetch state is asserted by theCPU 12, the control signal CONT becomes high-level. That is, while the data in the built-inROM 18 is erased or programmed and under vector fetch, the control signal CONT becomes high-level. The control signal CONT can be generated by a logic circuit constituted so as to be able to judge whether a high voltage is supplied through the predetermined external terminal Vpp and whether theCPU 12 is under the vector fetch state. - The gate G1 for obtaining the AND logic between the output signal A of the built-in
ROM selection circuit 29 and the control signal CONT is arranged at the rear stage of the built-inROM selection circuit 29 so that the built-inROM 18 is selected when the selection signal SELL output from the gate GI is set to high level. Moreover, the gate G2 for obtaining the AND logic between the output signal B of the built-inRAM selection circuit 28 and the control signal CONT and the gate G3 for obtaining the OR logic between the output logic of the gate G2 and the output signal C of the built-inRAM selection circuit 28 are used so that the built-inRAM 13 is selected when the selection signal SEL2 output from the gate G3 is set to high level. Therefore, when the addresses H′FC00 to H′FCFF are accessed, the selection signal SEL1 is set to low level and thereby, selection of the built-inROM 18 is inhibited but instead, the selection signal SEL2 is set to high level and thereby the built-inRAM 13 is selected. That is, a vector address on the built-inROM 18 is read while the data in the built-inROM 18 is erased or programmed. - Moreover, in this case, it is assumed that the addresses A9 to A0 for designating the vector address storage area A-V of the built-in
ROM 18 coincide with the addresses A9 to A0 of the vector address storage area B-V of the built-inRAM 13. Therefore, if the addresses A9 to A0 for designating the vector address storage area A-V of the built-inROM 18 do not coincide with the addresses A9 to A0 of the vector address storage area B-V of the built-inRAM 13, it is necessary to design an address conversion circuit so that the address conversion function of the address conversion circuit operates when the output signal D is set to high level by setting the address conversion circuit between theaddress bus 24 and the built-inRAM 13. This type of the address conversion circuit frees the arrangement of the vector address storage area B-V of the built-inRAM 13 on the address space. - Then, another embodiment of the present invention is described below.
-
FIG. 4 shows the address map of this embodiment. As shown inFIG. 4 , this embodiment is constituted so as to move a vector address area to a built-in RAM area while the data in the built-inROM 18 is erased or programmed in the user program mode or boot mode. - That is, the vector address area is moved not to the original vector address storage area A-V (H′0000 to H′00FF) of the built-in
ROM 18 but to the vector address storage area B-V (H′FC00 to H′FCFF) of the built-in RAM while the data in theflash memory 18 is erased or programmed in the user program mode or boot mode. In this case, data for one or more available vector addresses is previously programmed in the built-inRAM 13 in response to erasing or programming of the data in the flash memory and thereafter, erasing or programming of the data in theflash memory 18 is started. - That is, an address signal for accessing the vector address storage area A-V of the built-in
ROM 18 is converted into an address signal for accessing the vector address storage area B-V of the built-in RAM. Therefore, it is necessary to use an address conversion circuit for converting the address signal for accessing the vector address storage area A-V into the address signal for accessing the vector address storage area B-V when the address signal for accessing the vector address storage area A-V of the built-inROM 18 is output from theCPU 12. -
FIG. 5 shows an address conversion circuit ACC serving as malfunction exclusion means set to thebus control circuit 27 inFIG. 1 . - The address conversion circuit ACC can be realized by a plurality of control logic circuits (gate circuits) G4 for ORing the address signals A15 to A10 output from the
CPU 12 with the control signal CONT, and a built-in RoM/built-inRAM selection circuit 31 for selecting the built-inROM 18 or the built-inRAM 13 in accordance with output address signals of the gate circuits G4 and the addresses A9 to A0 output from theCPU 12. The gates G4 and the built-in ROM/built-inRAM selection circuit 31 are built in thebus controller 27 shown inFIG. 1 . Though only one gate G4 is shown inFIG. 5 , six gates G4 are actually used correspondingly to the addresses A15 to A10. Moreover, the built-in ROM/built-inRAM selection circuit 31 includes the built-inROM selection circuit 29 and the built-inRAM selection circuit 28 inFIG. 4 , and the output signal A inFIG. 4 serves as the module selection signal SELL and the output signal C inFIG. 4 serves as the module selection signal SEL2. - In the above structure, when the address signal for accessing the vector address storage area A-V “0000 0000 xxxx xxxx” is output to the
address bus 24 from theCPU 12, the signal is converted into the address signal “1111 1100 xxxx xxxx” for accessing the vector address storage area B-V and input to the built-in ROM/built-inRAM selection signal 31. Because the vector address storage area B-V of the built-inRAM 13 is thereby selected, vector fetch by theCPU 12 is applied to the vector address storage area B-V of the built-inRAM 13 while the data in the built-inROM 18 is erased or programmed. Moreover, inFIG. 5 , the vector address storage area A-V is made to serve as a 256-byte storage area starting with “0000 0000 0000 0000” and the vector address storage area B-V is made to start with “1111 1100 0000 0000”. Therefore, it will easily be understood that the start address of the area B-V in which the address signals A10 and A9 are set to “0” should properly be changed when it is different from the above. - Thus, because the vector fetch performed while the data in the built-in
ROM 18 is erased or programmed in the user program mode or boot mode is applied not to the vector address storage area A-V of the built-inROM 18 but to the vector address storage area B-V of the built-inRAM 13, a correct vector address can be obtained from the vector address storage area B-V of the built-inRAM 13 even if an interrupt request or exception handling request occurs while the data in the flash memory serving as the built-inROM 18 is erased or programmed similarly to the case of the previous embodiment (FIGS. 2 to 3). Therefore, it is possible to prevent a microcomputer from running away and improve the safety of a system at the time of on-board programming of a program memory. Moreover, in the case of this embodiment, it is unnecessary to switch between the access to the built-inRAM 13 and the access to the built-inROM 18 depending on vector address fetch or not. - Moreover, even by ignoring all interrupt requests including a NMI (Non-Maskable Interrupt), it is possible to improve the safety of the system at the time of on-board programming of the program memory.
-
FIG. 6 shows thebus controller 27 including the gate G5 for ignoring all interrupts including an NMI (Non-Maskable Interrupt) while the data in the flash memory serving as the built-inROM 18 is erased or programmed. - As shown in
FIG. 6 , thebus controller 27 includes the control logic circuit (gate circuit) G5 serving as malfunction exclusion means between the interruptcontrol circuit 10 and theCPU 12. The gate G5 receives the control signal CONT′ to be set to high level while the data in theflash memory 18 is erased or programmed and it is controlled to active state in response to the high-level control signal CONT′. However, when the control signal CONT′ is low-level, the gate G5 is controlled to inactive state. - Even when the interrupt and exception handling request signal IRQS output from the interrupt
circuit 10 is asserted to high level, the asserted state of the signal IRQS is not transferred to theCPU 12 if the control signal CONT′ showing the erasing or programming state of theflash memory 18 is asserted to high level. Therefore, any malfunction related to vector fetch operation does not occur because theCPU 12 does not execute the vector fetch operation when theflash memory 18 is under the erasing or programming state. - In this case, however, because an NMI is an effective means for notifying the microcomputer of an emergency such as an outage, it should be noted that a case in which erasing or programming of the data in the
flash memory 18 fails due to a hardware-involved cause such as an outage cannot be recovered if the NMI is neglected. -
FIG. 7 shows the control logic circuit G6 serving as malfunction exclusion means for resetting the erasing control bit register, programming control bit register, or verifying control bit of the built-inROM 18 when an interrupt request occurs while the data in the built-inROM 18 is erase, programmed, or verified in the user program mode or boot mode. - As shown in
FIG. 7 , the data in the built-inROM 18 can be erased, programmed, or verified by setting a control bit to the erasing control bit register 32, programming control bit register 33, or verifying control bit register 34. Therefore, it is also possible to form the structure so that the erasing control bit register 32, programming control bit register 33, or verifying control bit register 34 is reset when the interrupt and exception handling request IRQS output from the interrupt control circuit is asserted. The erasing control bit register 32, programming control bit register 33, and verifying control bit register 34 must correspond to an external reset request RESET1 and a reset request RESET2 from thewatchdog timer 19. Therefore, the gate G6 is used which ORs the reset requests RESET1 and RESET2 on one hand with the interrupt and exception handling request signal IRQS on the other. An output signal of the gate G6 is supplied to the reset terminal of the erasing control bit register 32, programming control bit register 33, or verifying control bit register 34. According to the above structure, erasing, programming, or verifying of the data in the built-inROM 18 is stopped because the erasing control bit register 32, programming control bit register 33, or verifying control bit register 34 is reset if a programming request occurs while the data in the built-inROM 18 is erased, programmed, or verified. Thereby, it is possible to prevent the microcomputer from running away and improve the safety of a system at the time of on-board programming of a program memory. -
FIG. 8 shows a circuit for generating the control signal CONT described inFIG. 3 and the control signal CONT1 described inFIG. 5 . - As shown in
FIG. 8 , a high-voltage detection circuit 81 is connected to the external terminal Vpp to which a high voltage such as 12 V is applied while the data in theflash memory 18 is programmed or erased and thecircuit 81 outputs a high-level output signal V in response to the supply of the high voltage of 12 V. The high-level output signal V can be used as, for example, the control signal CONT′ inFIG. 5 . Moreover, an enabling bit VATE 83 for controlling whether to enable movement of a vector address storage area is set to themicrocomputer 30. TheCPU 12 executes a predetermined instruction (instruction for setting the enabling bit VATE 83) in response to the setting of the programming mode (user program mode) or boot mode of theflash memory 18. Thereby, the enabling bit VATE 83 is set. An AND gate 80 is a gate circuit for ANDing the output signal V with the output state of the enabling bit VATE 83 and an output signal of the gate G80 serves as the control signal CONT inFIG. 3 . The above structure makes it possible to generate the control signal CONT inFIG. 3 and the control signal CONT′ inFIG. 5 . -
FIG. 9 shows the programming method of theflash memory 18 of themicrocomputer 30 in terms of the relation between the PROM mode and the on-board programming mode which are described above. - As shown in
FIG. 9 , the programming method includes the programming of theflash memory 18 according to the PROM mode and the programming of theflash memory 18 according to the on-board programming mode. Start (1) shows the start of the programming of theflash memory 18 according to the PROM mode, in which the operation mode of themicrocomputer 30 is set to the PROM mode by the above described method and desired program data is programmed in theflash memory 18 by a general-purpose ROM writer (step S1). Thereafter, themicrocomputer 30 in which the desired program data is programmed is mounted on a board such as a printed circuit board and a microcomputer-applied system is assembled by using the mounting board (step S2). - Moreover, Start (2) shows the start of the programming of the
flash memory 18 according to on-board programming mode, in which themicrocomputer 30 in which no desired program data is programmed is mounted on a board such as a printed circuit board and a microcomputer-applied system is assembled by using the mounting board (step S3). Thereafter, the operation mode of themicrocomputer 30 is set to the boot mode by the above-described method and desired program data is programmed in theflash memory 18 in accordance with a boot program (step S4). Thus, even if cutover of a software program (application software) developed by a user is delayed, it is possible to assemble the hardware of a microcomputer-applied system before the cutover of the software program and then, program the developed software program in a flash memory of a microcomputer. Thereby, it is possible to quickly ship the microcomputer-applied system. - After steps S2 and S4, the microcomputer-applied system executes system operations in accordance with the desired program data programmed in the flash memory 18 (step S5). In this case, when specification-modified software or function-added software (upgraded or version-up software) is developed for the software of already shipped microcomputer-applied system, it may be necessary for a user to reload the software of the already shipped application system to the above newly-developed software (case 1). Moreover, it may be necessary for a user of the microcomputer-applied system to change the keyboard function from, for example, English mode to French mode (case 2). When the
case flash memory 18 to desired program data. - Therefore, as shown in step S6, the operation mode of the
microcomputer 30 is set to the boot mode or user program mode. For example, because it may be necessary to entirely reload the program for theabove case 1, the operation mode of themicrocomputer 30 is set to the boot mode and the program data in theflash memory 18 is reloaded to desired program data. However, because it is enough to reload only part of the program data for theabove case 2, the operation mode of themicrocomputer 30 is set to the user program mode and part of the program data in theflash memory 18 is reloaded to desired data. - After step S6,
step 5 is restarted and the microcomputer-applied system executes system operations in accordance with the reloaded program as shown by a broken line X. - Steps S5 and S6 are repeated according to necessity.
-
FIG. 10 shows a further detailed address map of the present invention, in which the vector address of an NMI (Non-Maskable Interrupt) and the NMI handling routine storage area corresponding to the address are shown in the user program mode or boot mode in the normal mode (single chip mode or external memory extension mode) and the user program mode or boot mode in the on-board reloaded mode of the flash memory.FIG. 10 can also be used as a specific example of the address maps shown inFIGS. 2 and 4 . - As shown in
FIG. 10 , a vector address NMIA of the NMI (Non-Maskable Interrupt) is stored in the vector address storage area A-V of theflash memory 18 and an NMI handling routine RA corresponding to the vector address NMIA is stored in a part of the address space A of theflash memory 18 in the normal mode such as the single chip mode or external memory extension mode. That is, the vector address NMIA shows the head address of the NMI handling routine RA. Therefore, when an NMI (Non-Maskable Interrupt) occurs in the normal mode, theCPU 12 obtains the vector address NMIA of the NMI by vector fetch operation and jumps to the address shown by the vector address NMIA, that is, the head address of the NMI handling routine RA to execute the processing. - Moreover, at the time of on-board reloading of the data in the
flash memory 18 in the user program mode or boot mode, the vector address NMIB of the NMI (Non-Maskable Interrupt) is stored in the vector address storage area B-V of the built-inRAM 13 and the NMI handling routine RB corresponding to the vector address NMIB is stored in a part of the address space B of the built-inRAM 13. That is, the vector address NMIB shows the head address of the NMI handling routine RB. At the time of reloading of the data in theflash memory 18 in the user program mode or boot mode, if an NMI (Non-Maskable Interrupt) occurs, theCPU 12 obtains the vector address NMIB of the NMI (Non-Maskable Interrupt) by vector fetch operation and vector-jumps to the address shown by the vector address NMIB, that is, the head address of the NMI handling routine RB to execute the processing. - Therefore, the NMI (Non-Maskable Interrupt) at the time of on-board reloading of the data in the
flash memory 18 in the user program mode or boot mode is executed by using the vector address NMIA or NMI handling routine RA stored in the built-inRAM 13 instead of using the vector address NMIB or NMI handling routine RA stored in theflash memory 18. Therefore, the NMI (Non-Maskable Interrupt) is securely executed at the time of on-board reloading of the data in theflash memory 18 in the user program mode or boot mode. In this case, attention must be paid to the fact that use of the vector address storage area B-V of the built-inRAM 13 or an area for storing the NMI handling routine RB or the like is limited as a work area for reloading. - The methods shown in FIGS. 3 to 5 can be used to move the vector address storage areas A-V and B-V and the addresses of the vector address storage areas A-V and B-V are -moved in accordance with the control signals CONT and CONT′.
-
FIG. 11 shows an illustration for explaining the usage of an NMI (Non-Maskable Interrupt) and its forming circuit at the time of on-board reloading in the user program mode or boot mode. - The
microcomputer 30 of the present invention is assembled on a printedcircuit board 120 together with a voltage maintenance means 110 and NMI signal generation means 112. - The voltage maintenance means 110 includes a function for maintaining the voltage of the Vcc terminal at 4.5 V or higher for a certain time (e.g. approx. 1 ms) when the voltage of the Vcc power supply (normally, 5 V) lowers to a specified value or less such as 4.5 V or lower. Moreover, the
microcomputer 30 sets a mode prepared to prevent the internal state from being damaged due to runaway of themicrocomputer 30 such as a software standby mode for stopping generation of system clocks. For this purpose, the voltage maintenance means 110 is formed by using, for example, a large-capacity capacitor. Even if the voltage of the Vcc power supply further lowers, the voltage maintenance means 110 maintains the potential of the power supply terminal Vcc of themicrocomputer 30 at a voltage (e.g. 2.0 V) with which themicrocomputer 30 can maintain the software standby mode. For this purpose, the voltage maintenance means 110 is constituted by including, for example, a secondary battery. - When the voltage of the Vcc power supply (normally, 5 V) lowers to a specified value or less such as 4.5 V or lower, the NMI signal generation means 112 detects the voltage and generates an NMI. The NMI signal generation means 112 generates a trailing edge changing from 5 to 0 V at the NMI signal input terminal of the
microcomputer 30 to assert the NMI. - When the voltage of the Vcc power supply (normally, 5 V) lowers to a specified value or less at the time of on-board reloading of the flash memory 18 (in the user program mode or boot mode), the on-board reloading of the
flash memory 18 cannot be performed. Therefore, as shown above, it is detected that the voltage of the Vcc power supply (normally, 5 V) lowers to a specified value or less, an NMI is generated, reloading of the data in theflash memory 18 is interrupted, and the NMI handling routine is executed by theCPU 12. In this case, when the NMI is accepted by theCPU 12, the contents of the general-purpose registers (R0 to R15) and the program counter (PC) of theCPU 12, though not restricted, are stacked in an external memory. - Therefore, there is an advantage that the contents of the general-purpose registers (R0 to R15) and program counter (PC) can be returned to the NMI accepted state in accordance with the value of the above stack pointer (SP) when returning from the NMI handling routine RB. Moreover, there is an advantage that an external memory for storing the contents of the general purpose registers (R0 to R15) and the program counter (PC) is accessed in accordance with the value of the stack pointer (PC) and the reloading state of the
flash memory 18 can be analyzed in accordance with the contents. -
FIG. 12 shows a flow of reloading executed between start and end of the on-board reloading mode of the flash memory 18 (example of user program mode). - As shown in
FIG. 12 , a command for starting the reloading of the data in theflash memory 18 is first issued to theCPU 12. TheCPU 12 executes preprocessing such as saving of the contents of an address area serving as a reloading work area if necessary (step S13). - The reloading area can also use a part of the address area of the built-in
RAM 18 or a part of the address area of an external RAM in the external memory extension mode. - In the next step S14, a reloading routine is programmed in the reloading area by, for example, the
CPU 12. The reloading routine includes a programming control program and the NMI handling routine RB. Moreover, the reloading routine may be stored in theflash memory 18 or supplied to themicrocomputer 30 from an external unit. - Then, the vector address NMIB corresponding to the NMI handling routine RB is programmed in the vector address storage area B-V of the built-in
RAM 13 by, for example, the CPU 12 (step S15). Then, as shown inFIG. 8 , theCPU 12 sets a vector address movement enabling bit VATE 82 (step S16). The above preprocessing is executed. - Thereafter, in step S17, the
CPU 12 executes the reloading routine programmed in the reloading work area to reload the program in theflash memory 18. Program data to be programmed in theflash memory 18 is supplied from a unit outside of themicrocomputer 30. After reloading is completed (step S17), the following postprocessing is executed by theCPU 12. That is, the vector address movement enablingbit VATE 82 set in step S16 is reset (step S18). In other words, the enablingbit VATE 82 is cleared. Thereafter, theCPU 12 executes postprocessing such as recovering or saving of the contents of the reloading work area if necessary (step S19). That is, when the contents are saved in step S13, the contents are recovered in step S19. - Then, in step S20, notice or reset-start of termination of reloading of the data in the
flash memory 18 is executed and the reloading of the data in theflash memory 18 is completed. - Then, concrete structure of the
flash memory 18 is described below. -
FIGS. 13 and 14 show the principle of a memory cell of theflash memory 18. The memory cell illustrated inFIG. 13 comprises an insulated-gate field-effect transistor having a two-layer gate structure. InFIG. 13 ,symbol 1 represents a P-type silicon substrate, 14 represents a P-type semiconductor region formed on thesilicon substrate Symbol 8 represents a floating gate formed on the P-type silicon substrate 1 through a thin oxide film 7 (with a thickness of, for example, 10 nm) serving as a tunnel insulating film and 11 represents a control gate formed on the floatinggate 8 through anoxide film 9. A source comprisessymbols symbols - Programming of information in a memory cell is realized by applying a high voltage to, for example, the
control gate 11 and the drain and injecting electrons into the floatinggate 8 from the drain side by means of avalanche injection. As the result of this programming, the threshold voltage of the storage transistor viewed from thecontrol gate 7 becomes higher than that of the erased-state storage transistor in which programming is not performed as shown inFIG. 14 . - Erasing of information in the memory cell is realized by applying a high voltage to, for example, the source and extracting electrons from the floating
gate 8 to the source side by tunneling. As shown inFIG. 14 , the threshold voltage of the storage transistor viewed from thecontrol gate 11 is lowered due to erasing. InFIG. 14 , the threshold of the storage transistor is set to a positive voltage level under any of the programming and the erasing states. That is, the threshold voltage under the programming state is raised and the threshold voltage under the erasing state is lowered compared to a word line selection level supplied to thecontrol gate 11 from a word line. Because the both threshold voltages and the word line selection level have the above relation, it is possible to constitute a memory cell with one transistor without using a selective transistor. Stored information is electrically erased by extracting electrons accumulated in the floatinggate 8 to a source electrode. Therefore, when erasing is continued for a comparatively long time, electrons are extracted which are more than electrons injected into the floating gate at the time of programming. Therefore, when over-erasing in which electrical erasing is continued for a comparatively long time is performed, a trouble occurs that a word line is selected even at a word-line non-selective level because the threshold voltage of the storage transistor becomes a negative level. However, it is also possible to perform programming by using tunnel current similarly to the case of erasing. - In reading, a voltage to be applied to the drain and the
control gate 11 is limited to a comparatively low value so that weak programming is not performed for the above memory cell, that is, undesirable carrier injection is not performed for the floatinggate 8. For example, when a low voltage of approx. 1 V is applied to thedrain 10, a low voltage of approx. 5 V is applied to thecontrol gate 11. By detecting the level of the channel current flowing through the storage transistor, it is possible to decide “0” or “1” of the information stored in the memory cell. -
FIG. 15 shows the structural principle of a memory array using the above storage transistor. InFIG. 15 , four storage transistors (memory cells) Q1 to Q4 are typically shown. In the case of the memory cells arranged like a matrix in X and Y directions, control gates (selective gates of memory cells) of the storage transistors Q1 and Q2 (Q3 and Q4) in the same row are respectively connected to a corresponding word line WL1 (WL2) and the drain regions (input/output nodes of memory cells) of the storage transistors Q1 and Q3 (Q2 and Q4) arranged in the same column are respectively connected to corresponding data lines DL1 and DL2. The source regions of the storage transistors Q1 and Q3 (Q2 and Q4) are connected to a source line SL1 (SL2). -
FIG. 16 shows voltage conditions for erasing and programming of data in a memory cell. InFIG. 16 , a memory device represents a memory cell and a gate represents a control gate serving as a selective gate of a memory cell. In the case of the negative-voltage-type erasing inFIG. 16 , a high electric field necessary for erasing is formed by applying a negative voltage such as −10 V to a control gate. As known from the voltage conditions shown inFIG. 16 , simultaneous erasing can be applied to memory cells as least-whose sources are connected in common in the case of the positive-voltage-type erasing. Therefore, when the source lines SL1 and SL2 are connected in the structure inFIG. 15 , data in the four memory cells Q1 to Q4 can simultaneously be erased. In this case, it is possible to set the size of a memory block optionally by changing the number of memory bits connected to the same source line. The source-line division method includes not only the case typically shown inFIG. 15 in which a data line is used as the unit (common source line is extended in the data line direction) but also a case in which a word line is used as the unit (common source line is extended in the word line direction). Moreover, in the case of the negative-voltage-type erasing, simultaneous erasing can be applied to memory cells whose control gates are connected in common. -
FIG. 17 shows a circuit block diagram of theflash memory 18 in which storage capacities of simultaneously-erasable memory blocks differ from each other. - The
flash memory 18 shown inFIG. 17 (hereafter also referred to as an FMRY) has 8-bit data input/output terminals D0 to D7 and each data input/output terminal is provided with memory mats ARY0 to ARY7. The memory mats ARY0 to ARY7, though not restricted, are divided into the following two parts: a memory block with a relatively large storage capacity and a memory block SMB with a relatively small storage capacity. Though a typical memory mat ARY0 is shown inFIG. 17 , other memory mats ARY1 to ARY7 are similarly constituted. Moreover, each memory block can have the same storage capacity. - A memory cell MC comprising the insulated-gate field-effect transistor of the two-layer gate structure described in
FIG. 13 is arranged like a matrix on each of the memory mats ARY0 to ARY7. Moreover, inFIG. 17 , WL0 to WLn are word lines common to all the memory mats ARY0 to ARY7. Control gates of memory cells arranged on the same row are respectively connected to a corresponding word line. Drain regions of memory cells MC arranged on the same column are respectively connected to corresponding data lines DL0 to DL7 in each of the memory mats ARY0 to ARY7. Source regions of memory cells MC constituting the memory block SMB are connected to the source line SL1 in common and source regions of memory cells MC constituting the memory block LMB are connected to the source line SL2 in common. - A high voltage Vpp used for erasing is supplied to the source lines SL1 and SL2 from voltage output circuits VOUT1 and VOUT2. Output operations of the voltage output circuits VOUT1 and VOUT2 are selected in accordance with values of bits B1 and B2 of an erasing-block designation register. For example, when “1” is set to the bit B1 of the erasing-block designation register, only the memory block SMB of each of the memory mats ARY0 to ARY7 is made simultaneously erasable. When “1” is set to the bit B2 of the erasing-block designation register, only the memory block LMB of each of the memory mats ARY0 to ARY7 is made simultaneously erasable. When “1” is set to the both bits B1 and B2, the whole flash memory is made simultaneously erasable.
- Selection of the word lines WL0 to WLn is performed when a low address decoder XADEC decodes a low address signal Ax captured through a low address buffer XABUFF and a low address latch XALAT. A word driver WDRV drives a word line in accordance with a selection signal output from the low address decoder XADEC. In the case of data reading, the word driver WDRV operates by using a voltage Vcc such as 5 V supplied from a voltage selection circuit VSEL and an earth potential such as 0 V as its power supplies, drives a word line to be selected to a selection level by the voltage Vcc, and keeps a word line to be non-selected at a non-selection level such as the earth potential. In the case of data programming, the word driver WDRV operates by using the voltage Vpp such as 12 V supplied from the voltage selection circuit VSEL and an earth potential such as 0 V as its power supplies and drives a word line to be selected to a programming high-voltage level. In the case of data erasing, the output of the word driver WDRV is set to a low voltage level such as 0 V.
- In each of the memory mats ARY0 to ARY7, the data lines DL0 to DL7 are connect to a common data line CD in common through column selection switches YS0 to YS7. The column selection switches YS0 to YS7 are controlled by the fact that a column address decoder YADEC decodes a column address signal AY captured through a column address buffer YABUFF and a column address latch YALAT. Selection signals output from the column address decoder YADEC are supplied to all the column address mats ARY0 to ARY7 in common. Therefore, when any one of the selection signals output from the column address decoder YADEC is set to a selection level, one data line is connected to the common data line CD in each of the memory mats ARY0 to ARY7.
- Data read out of the memory cell MC to the common data line CD is supplied to a sense amplifier SAMP through a selection switch RS, amplified by the amplifier SAMP, and output to an external unit from a data output buffer DOBUFF through a data output latch DOLAT. The selection switch RS is set to a selection level synchronously with reading. Programming data supplied from an external unit is held by a data input latch circuit DILAT through a data input buffer DIBUFF. When the data held by the data input latch circuit DILAT is set to “0”, a programming circuit WRIT supplies a high voltage for programming to the common data line CD through a selection switch WS. The high voltage for programming is supplied to a drain of a memory cell to whose control gate a high voltage is applied through a data line selected by a column address signal AY in accordance with the low address signal Ax and thereby, data is programmed in the memory cell. The selection switch WS is set to a selection level synchronously with programming. A programming and erasing control circuit WECONT generates various timings for programming and erasing and voltage selection control.
-
FIG. 18 shows the whole block diagram of the flash memory 18 (FMRY) built in themicrocomputer 30 inFIG. 1 . InFIG. 18 , symbol ARY represents a memory array formed by arranging a memory cell comprising the insulated-gate field-effect transistor of a two-layer gate structure described inFIG. 13 like a matrix. In the case of the memory array ARY, similarly to the structure described inFIG. 17 , control gates of memory cells are respectively connected to a corresponding word line, drain regions of them are respectively connected to a corresponding data line, and source regions of them are connected to a common source line in every memory block. However, the memory block dividing state is different from that inFIG. 17 . For example, the memory block is divided into seven large memory blocks (large blocks) LMB0 to LMB6 each of which has a relatively large storage capacity and eight small memory blocks (small blocks) SMB0 to SMB7 each of which has a relatively small storage capacity. The large memory blocks are used for a program storage area or a large-capacity data storage area. The small memory blocks are used for a small-capacity data storage area or the like. InFIG. 18 , symbol ALAT represents a latch circuit for address signals PAB0 to PAB15. In the first operation mode (operation mode other than the PROM mode), the address signals PAB0 to PAB15 are supplied from theaddress bus 24 corresponding to the address signal output from the centralprocessing unit CPU 12. In the second operation mode (PROM mode), the address signals PAB0 to PAB15 correspond to the address signal output from a PROM writer. Symbol XADEC represents a low address decoder for decoding a low address signal captured through the address latch ALAT. Symbol WDRV represents a word driver for driving a word line in accordance with a selection signal output from the low address decoder XADEC. The word driver WDRV drives a word line at a voltage such as 5 V in the case of data reading and drives a word line at a high voltage such as 12 V in the case of data programming. In the case of data erasing, every output of the word driver WDRV is set to a low voltage level such as 0 V. Symbol YADEC represents a column address decoder for decoding a column address signal captured through the address latch YALAt. Symbol YSEL represents a column address decoder for selecting a data line in accordance with a selection signal output from the column address decoder YADEC. Symbol SAMP represents a sense amplifier for amplifying a signal read out of a data line selected by the column selection circuit YSEL. Symbol DOLAT represents a data output latch for holding an output of the sense amplifier. Symbol DOBUFF represents a data output buffer for output data held by the data output latch DOLAT to an external unit. InFIG. 18 , PDB0 to PDB7 are low-order 8-bit (1 byte) data to be supplied to thedata bus 26 inFIG. 1 and PDB8 to PDB15 are high-order 8-bit (1 byte) data to be supplied to thedata bus 25 inFIG. 1 . According to this example, output data is up to 2 bytes. Symbol DIBUFF represents a data input buffer for capturing the programming data supplied from an external unit. The data captured from the data input buffer DIBUFF is held by the data input latch circuit DILAT. When the data held by the data input latch circuit DILAT is set to “0”, the programming circuit WRIT supplies a high voltage for programming to a data line selected by the column selection circuit YSEL. The high voltage for programming is supplied to the drain of a memory cell to whose control gate a high voltage is applied in accordance with a low address signal and thereby, data in the memory cell is programmed. Symbol ERASEC represents an erasing circuit for supplying a high voltage for erasing to the source line of a designated memory block to simultaneously erase the data in the memory block. - Symbol FCONT represents a control circuit for performing control of the timing for reading data from the flash memory FMRY and control of various timings for programming and erasing and voltage selection. The control circuit FCONT is provided with a control register CREG.
-
FIG. 19 shows a control register CREG. Each control register CREG comprises an 8-bit program/erase control register PEREG and erasing-block designation registers MBREG1 and MBREG2. In the program/erase control register PEREG, Vpp represents a high-voltage applying flag to be set to “1” correspondingly to application of a high voltage for reloading. E bit is used as an erasing indication bit and EV bit is used as a verifying indication bit for erasing. P bit is used as a programming indication bit and PV pit is used as a verifying indication bit for programming. The erasing-block designation registers MBREG1 and MBREG2 are registers for designating a memory block to be erased among the large block divided into 7 parts and the small block divided into 8 parts and the zero-th to seventh bits of the resisters are used as bits for designating each memory block. For example, the bit set to “1” represents selection of a corresponding memory block and the bit set to 101 represents non-selection of the corresponding memory block. For example, when the seventh bit of the erasing-block designation register MBREG2 is set to “1”, erase of the data in the small memory block SMB7 is designated. - The control register CREG is set so that data can be read from or written in the register by an external unit. The control circuit FCONT refers to the contents set in the control register CREG and controls erasing or programming in accordance with the contents. It is possible to control the erasing or programming state by reloading the contents of the control register CREG through an external unit. In
FIG. 18 , control signals FLM, MS-FLN, MS-MISN, M2RDN, M2WRN, MRDN, MWRN, IOWORDN, and RST are supplied to the control circuit FCONT and moreover, predetermined bits of high-order one-byte data PDB8 to PDB15 and address signals PAB0 to PAB15 are given to the circuit FCONT. - The control signal FLM is a signal for designating an operation mode of the flash memory FMRY, and the signal set to “0” designates the first operation mode of the flash memory and the signal set to “1” designates the second operation mode of it. The signal FLM is formed in accordance with, for example, the mode signals MD0 to MD2.
- The control signal MS-FLM is a signal for selecting the flash memory FMRY, and the signal set to “0” designates selection and the signal set to “1” designates non-selection. In the first operation mode, a central processing unit CPU outputs the control signal MS-FLN. In the second operation mode, the control signal MS-FLN is made to correspond to a chip enable signal CE* supplied from a PROM writer PRW.
- The control signal MS-MISN is a signal for selecting the control register CREG. In this case, a register to be selected among the program/erase control register PEREG and the erasing-block designation registers MBREG1 and MBREG2 is determined by referring to a predetermined bit of the address signals PAB0 to PAB15. In the first operation mode, a central processing unit CU outputs the control signal MS-MISN. In the second operation mode, though not restricted, the most-significant address bit EA16 is regarded as the control signal MS-MISN.
- The M2RDN is a memory read strobe signal, M2WRN is a memory write strobe signal, MRDN is a read signal for the control register CREG, and MWRN is a write signal for the control register CREG. In the first operation mode, a central processing unit CPU outputs these control signals. In the second operation mode, though not restricted, a write enable signal WE* supplied from a PROM writer is regarded as the signal M2WRN or MWRN and an output enable signal OE* is regarded as the signal M2RDN or MRDN. The memory write strobe signal M2WRN is regarded as a strobe signal for programming the data to be programmed in a memory cell in the data input latch circuit DILAT. Actual programming of data in the memory cell is started by setting the P bit of the control register CREG.
- The IOWORDN is used as a signal for switching between 8-bit read access and 16-bit read access for the flash memory FMRY. In the second operation mode, the control signal IOWORDN is fixed to a logical value for indicating 8-bit read access.
- The RST is a reset signal for the flash memory FMRY. When he flash memory FMRY is reset by the signal RST or the Vpp flag of the program/erase control register PEREG is set to “0”, the mode setting bits EV, PV, E, and P of the program/erase control register PEREG are cleared. Therefore, the output of the gate G7 shown in
FIG. 7 is used as the reset signal RST and thereby, each bit of the control register PEREG can be cleared. - The invention made by the present inventor is concretely described above in accordance with the embodiment. However, it is needless to say that the present invention is not restricted to the embodiment but various modifications of the present invention are allowed as long as the modifications do not deviate from the gist of the present invention.
- For example, though the above embodiment performs programming of data in a flash memory by hot electrons, it is possible to use an embodiment for performing the programming by the tunnel effect. Moreover, though the above embodiment uses a flash memory as the built-in
ROM 18, it is also possible to use other semiconductor memory allowing on-board programming like the user program mode such as an EPROM. - The above description is mainly made on a case in which the invention made by the present inventor is applied to a single-chip computer in the field of the application which is the background of the invention. However, the present invention is not restricted to the single-chip microcomputer but it is possible to widely apply the present invention to various data processors.
- The present invention can be applied to an object by premising that the object includes at least an electrically erasable or programmable program memory.
- Advantages of a typical invention among the inventions disclosed in this application are briefly described below.
- That is, a malfunction due to an interrupt during erasing or programming of the data in the above program memory is excluded by malfunction exclusion means when no correct data is present in the program memory and thereby, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- A part of random-accessible storage means is moved to the vector address area of a program memory in accordance with an interrupt request generated during erasing or programming of the data in the program memory and thereby, a correct vector address can be obtained for occurrence of the interrupt during erasing or programming of the data in the program memory and thus, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- Because the vector address area of a program memory is moved to storage means in accordance with an interrupt request generated during erasing or programming of the data in the program memory and thereby, a correct vector address can be obtained for occurrence of the interrupt during erasing or programming of the data in the program memory and thus, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- Because an interrupt request for a central processing unit is excluded during erasing or programming of the data in a program memory in accordance with an erasing or programming request to the program memory, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- Because the processing for erasing or programming the data in a program memory is stopped in response to an interrupt request generated for a central processing unit during erasing or programming of the data in the program memory in accordance with a request for rasing or programming the data in the program memory, it is possible to improve the safety of a system at the time of on-board programming of the program memory.
- Therefore, erasing or programming of the data in a flash memory is automatically stopped even for an interrupt request erroneously generated due to an error in generating a program for erasing or programming data in a flash memory (a reloading control program), a malfunction, or an error in operating an external circuit and thereby, it is possible to protect the flash memory from an abnormal state such as over-erasing or over-programming of the data in the flash memory or an intermediate state by executing the processing for recording the state of stopping erasing or programming of the data in the flash memory during interrupt processing. Therefore, it is possible to protect a microcomputer-applied system from breakdown.
Claims (4)
1-5. (canceled)
6. A data processing unit formed on a semiconductor substrate, comprising:
a non-volatile memory adapted to electrically erase or program data into the non-volatile memory;
a central processing unit accessing the non-volatile memory; and
a control circuit;
wherein the data processing unit is capable of operating in a boot mode or an active mode;
wherein the control circuit terminates a process for erasing or programming of data into the non-volatile memory in response to an interrupt request or an exception processing request to the central processing unit, when the non-volatile memory is erasing or programming data in the boot mode; and
wherein the data processing unit operates in part to input data from outside the data processing unit for programming in the non-volatile memory in the boot mode.
7. A data processing unit according to claim 6 ,
wherein the data processing unit comprises an interface unit for inputting or outputting data, and
wherein the interface unit inputs data for programming in the non-volatile memory from outside of the data processing unit in the boot mode.
8. A data processing unit according to claim 7 ,
wherein the data processing unit executes data for programming of the non-volatile memory in the active mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US11/520,420 US20070083745A1 (en) | 1995-02-07 | 2006-09-12 | Data processor |
Applications Claiming Priority (9)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7-42301 | 1995-02-07 | ||
JP4230195 | 1995-02-07 | ||
JP7-353256 | 1995-12-27 | ||
JP35325695A JP3292864B2 (en) | 1995-02-07 | 1995-12-27 | Data processing device |
US08/594,022 US5881295A (en) | 1995-02-07 | 1996-01-29 | Data processor which controls interrupts during programming and erasing of on-chip erasable and programmable non-volatile program memory |
US09/263,917 US6141700A (en) | 1995-02-07 | 1999-03-05 | Data processor which accesses a second memory while responding to an interrupt request during programming and erasing mode of first erasable and programmable non-volatile memory |
US09/655,465 US6738894B1 (en) | 1995-02-07 | 2000-09-05 | Data processor |
US10/824,260 US7111150B2 (en) | 1995-02-07 | 2004-04-13 | Data processor |
US11/520,420 US20070083745A1 (en) | 1995-02-07 | 2006-09-12 | Data processor |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US10/824,260 Continuation US7111150B2 (en) | 1995-02-07 | 2004-04-13 | Data processor |
Publications (1)
Publication Number | Publication Date |
---|---|
US20070083745A1 true US20070083745A1 (en) | 2007-04-12 |
Family
ID=38537531
Family Applications (3)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/655,465 Expired - Fee Related US6738894B1 (en) | 1995-02-07 | 2000-09-05 | Data processor |
US10/824,260 Expired - Fee Related US7111150B2 (en) | 1995-02-07 | 2004-04-13 | Data processor |
US11/520,420 Abandoned US20070083745A1 (en) | 1995-02-07 | 2006-09-12 | Data processor |
Family Applications Before (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/655,465 Expired - Fee Related US6738894B1 (en) | 1995-02-07 | 2000-09-05 | Data processor |
US10/824,260 Expired - Fee Related US7111150B2 (en) | 1995-02-07 | 2004-04-13 | Data processor |
Country Status (1)
Country | Link |
---|---|
US (3) | US6738894B1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100095139A1 (en) * | 2007-04-26 | 2010-04-15 | Grabba International Pty Ltd. | Docking station |
US20110063896A1 (en) * | 2009-09-14 | 2011-03-17 | Renesas Electronics Corporation | Semiconductor memory device |
US7979685B1 (en) * | 2007-11-27 | 2011-07-12 | Oracle America, Inc. | Multiple instruction execution mode resource-constrained device |
US20130290587A1 (en) * | 2012-04-27 | 2013-10-31 | Denso Corporation | Microcomputer |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6862635B1 (en) * | 1998-11-13 | 2005-03-01 | Cray Inc. | Synchronization techniques in a multithreaded environment |
JP4230122B2 (en) * | 2001-03-30 | 2009-02-25 | 株式会社ルネサステクノロジ | Microcomputer, writing method and erasing method |
KR100701123B1 (en) * | 2004-12-08 | 2007-03-28 | 한국전자통신연구원 | Self-oscilation communication module |
US7502916B2 (en) * | 2005-12-02 | 2009-03-10 | Infineon Technologies Flash Gmbh & Co. Kg | Processing arrangement, memory card device and method for operating and manufacturing a processing arrangement |
US7480810B2 (en) * | 2006-02-14 | 2009-01-20 | International Business Machines Corporation | Voltage droop dynamic recovery |
JP4327863B2 (en) * | 2007-03-19 | 2009-09-09 | 株式会社東芝 | Video storage device and control method thereof |
US20110011621A1 (en) * | 2009-07-17 | 2011-01-20 | Searete Llc, A Limited Liability Corporation Of The State Of Delaware | Smart link coupled to power line |
RU2520399C2 (en) * | 2009-10-15 | 2014-06-27 | Эл И ТЕК КО., ЛТД. | Microcomputer and operation method thereof |
US10788176B2 (en) | 2013-02-08 | 2020-09-29 | Ideal Industries Lighting Llc | Modular LED lighting system |
US8908464B2 (en) * | 2013-02-12 | 2014-12-09 | Qualcomm Incorporated | Protection for system configuration information |
Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4794558A (en) * | 1979-06-12 | 1988-12-27 | Motorola, Inc. | Microprocessor having self-programmed eprom |
US4802119A (en) * | 1987-03-17 | 1989-01-31 | Motorola, Inc. | Single chip microcomputer with patching and configuration controlled by on-board non-volatile memory |
US4872106A (en) * | 1983-04-06 | 1989-10-03 | New Forney Corp. | Industrial process control system with back-up data processors to take over from failed primary data processors |
US4902965A (en) * | 1987-06-15 | 1990-02-20 | Bodrug John D | Consumption meter for accumulating digital power consumption signals via telephone lines without disturbing the consumer |
US5163148A (en) * | 1989-08-11 | 1992-11-10 | Digital Equipment Corporation | File backup system for producing a backup copy of a file which may be updated during backup |
US5263168A (en) * | 1991-06-03 | 1993-11-16 | Motorola, Inc. | Circuitry for automatically entering and terminating an initialization mode in a data processing system in response to a control signal |
US5269022A (en) * | 1990-03-28 | 1993-12-07 | Kabushiki Kaisha Toshiba | Method and apparatus for booting a computer system by restoring the main memory from a backup memory |
US5276890A (en) * | 1989-11-30 | 1994-01-04 | Kabushiki Kaisha Toshiba | Resume control system and method for executing resume processing while checking operation mode of CPU |
US5287511A (en) * | 1988-07-11 | 1994-02-15 | Star Semiconductor Corporation | Architectures and methods for dividing processing tasks into tasks for a programmable real time signal processor and tasks for a decision making microprocessor interfacing therewith |
US5410711A (en) * | 1991-02-14 | 1995-04-25 | Dell Usa, L.P. | Portable computer with BIOS-independent power management |
US5435001A (en) * | 1993-07-06 | 1995-07-18 | Tandem Computers Incorporated | Method of state determination in lock-stepped processors |
US5444664A (en) * | 1993-07-13 | 1995-08-22 | Hitachi, Ltd. | Flash memory and a microcomputer |
US5522076A (en) * | 1993-05-13 | 1996-05-28 | Kabushiki Kaisha Toshiba | Computer system having BIOS (basic input/output system)-ROM (Read Only Memory) writing function |
US5590303A (en) * | 1991-11-13 | 1996-12-31 | Mita Industrial Co., Ltd. | Memory designation control device |
US5603038A (en) * | 1994-09-07 | 1997-02-11 | International Business Machines Corporation | Automatic restoration of user options after power loss |
US5712969A (en) * | 1993-09-24 | 1998-01-27 | Robert Bosch Gmbh | Method for completely reprogramming an erasable, non-volatile memory |
US5765184A (en) * | 1993-10-26 | 1998-06-09 | Intel Corporation | Method and apparatus for programming an array controller in a flash memory device |
US5909180A (en) * | 1991-06-28 | 1999-06-01 | Square D Company | Electrical distribution system with informational display |
US6148441A (en) * | 1994-04-06 | 2000-11-14 | Dell Usa, L.P. | Method for reprogramming flash ROM in a personal computer implementing an EISA bus system |
US6237120B1 (en) * | 1991-05-23 | 2001-05-22 | Sony Corporation | Program patching of a ROM |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3032207B2 (en) | 1987-04-24 | 2000-04-10 | 株式会社日立製作所 | Micro computer |
JPH0343836A (en) | 1989-07-11 | 1991-02-25 | Nec Ibaraki Ltd | Vectored interruption control system |
JPH0345299A (en) | 1989-07-11 | 1991-02-26 | Matsushita Electric Ind Co Ltd | Drainage solenoid valve |
JPH0414699A (en) | 1990-05-08 | 1992-01-20 | Matsushita Electric Ind Co Ltd | Device for preventing eeprom from being inactive |
US5355007A (en) * | 1990-11-23 | 1994-10-11 | Texas Instruments Incorporated | Devices for non-volatile memory, systems and methods |
JPH04257030A (en) | 1991-02-08 | 1992-09-11 | Nec Corp | Rom patch system |
US5687345A (en) * | 1992-03-17 | 1997-11-11 | Hitachi, Ltd. | Microcomputer having CPU and built-in flash memory that is rewritable under control of the CPU analyzing a command supplied from an external device |
JP3480957B2 (en) | 1992-12-11 | 2003-12-22 | ブラザー工業株式会社 | Memory programming equipment |
JPH07261997A (en) | 1994-03-22 | 1995-10-13 | Fanuc Ltd | Flash rom management system |
JPH08179993A (en) | 1994-12-22 | 1996-07-12 | Hitachi Ltd | Data processor and data processing system using the processor |
JP3339262B2 (en) * | 1995-01-12 | 2002-10-28 | 三菱電機株式会社 | Sewing machine control device and control method thereof |
JP3292864B2 (en) * | 1995-02-07 | 2002-06-17 | 株式会社日立製作所 | Data processing device |
-
2000
- 2000-09-05 US US09/655,465 patent/US6738894B1/en not_active Expired - Fee Related
-
2004
- 2004-04-13 US US10/824,260 patent/US7111150B2/en not_active Expired - Fee Related
-
2006
- 2006-09-12 US US11/520,420 patent/US20070083745A1/en not_active Abandoned
Patent Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4794558A (en) * | 1979-06-12 | 1988-12-27 | Motorola, Inc. | Microprocessor having self-programmed eprom |
US4872106A (en) * | 1983-04-06 | 1989-10-03 | New Forney Corp. | Industrial process control system with back-up data processors to take over from failed primary data processors |
US4802119A (en) * | 1987-03-17 | 1989-01-31 | Motorola, Inc. | Single chip microcomputer with patching and configuration controlled by on-board non-volatile memory |
US4902965A (en) * | 1987-06-15 | 1990-02-20 | Bodrug John D | Consumption meter for accumulating digital power consumption signals via telephone lines without disturbing the consumer |
US5287511A (en) * | 1988-07-11 | 1994-02-15 | Star Semiconductor Corporation | Architectures and methods for dividing processing tasks into tasks for a programmable real time signal processor and tasks for a decision making microprocessor interfacing therewith |
US5163148A (en) * | 1989-08-11 | 1992-11-10 | Digital Equipment Corporation | File backup system for producing a backup copy of a file which may be updated during backup |
US5276890A (en) * | 1989-11-30 | 1994-01-04 | Kabushiki Kaisha Toshiba | Resume control system and method for executing resume processing while checking operation mode of CPU |
US5269022A (en) * | 1990-03-28 | 1993-12-07 | Kabushiki Kaisha Toshiba | Method and apparatus for booting a computer system by restoring the main memory from a backup memory |
US5410711A (en) * | 1991-02-14 | 1995-04-25 | Dell Usa, L.P. | Portable computer with BIOS-independent power management |
US6237120B1 (en) * | 1991-05-23 | 2001-05-22 | Sony Corporation | Program patching of a ROM |
US5263168A (en) * | 1991-06-03 | 1993-11-16 | Motorola, Inc. | Circuitry for automatically entering and terminating an initialization mode in a data processing system in response to a control signal |
US5909180A (en) * | 1991-06-28 | 1999-06-01 | Square D Company | Electrical distribution system with informational display |
US5590303A (en) * | 1991-11-13 | 1996-12-31 | Mita Industrial Co., Ltd. | Memory designation control device |
US5522076A (en) * | 1993-05-13 | 1996-05-28 | Kabushiki Kaisha Toshiba | Computer system having BIOS (basic input/output system)-ROM (Read Only Memory) writing function |
US5435001A (en) * | 1993-07-06 | 1995-07-18 | Tandem Computers Incorporated | Method of state determination in lock-stepped processors |
US5444664A (en) * | 1993-07-13 | 1995-08-22 | Hitachi, Ltd. | Flash memory and a microcomputer |
US5712969A (en) * | 1993-09-24 | 1998-01-27 | Robert Bosch Gmbh | Method for completely reprogramming an erasable, non-volatile memory |
US5765184A (en) * | 1993-10-26 | 1998-06-09 | Intel Corporation | Method and apparatus for programming an array controller in a flash memory device |
US6148441A (en) * | 1994-04-06 | 2000-11-14 | Dell Usa, L.P. | Method for reprogramming flash ROM in a personal computer implementing an EISA bus system |
US5603038A (en) * | 1994-09-07 | 1997-02-11 | International Business Machines Corporation | Automatic restoration of user options after power loss |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100095139A1 (en) * | 2007-04-26 | 2010-04-15 | Grabba International Pty Ltd. | Docking station |
US7979685B1 (en) * | 2007-11-27 | 2011-07-12 | Oracle America, Inc. | Multiple instruction execution mode resource-constrained device |
US8943486B2 (en) | 2007-11-27 | 2015-01-27 | Oracle America, Inc. | Multiple instruction execution mode resource-constrained device |
US20110063896A1 (en) * | 2009-09-14 | 2011-03-17 | Renesas Electronics Corporation | Semiconductor memory device |
US8134863B2 (en) * | 2009-09-14 | 2012-03-13 | Renesas Electronics Corporation | Semiconductor memory device |
US20130290587A1 (en) * | 2012-04-27 | 2013-10-31 | Denso Corporation | Microcomputer |
US9501434B2 (en) * | 2012-04-27 | 2016-11-22 | Denso Corporation | Microcomputer |
Also Published As
Publication number | Publication date |
---|---|
US6738894B1 (en) | 2004-05-18 |
US7111150B2 (en) | 2006-09-19 |
US20040190330A1 (en) | 2004-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5881295A (en) | Data processor which controls interrupts during programming and erasing of on-chip erasable and programmable non-volatile program memory | |
US20070083745A1 (en) | Data processor | |
US5844843A (en) | Single chip data processing apparatus having a flash memory which is rewritable under the control of built-in CPU in the external write mode | |
US7164610B2 (en) | Microcomputer having a flush memory that can be temporarily interrupted during an erase process | |
US6438665B2 (en) | System and method which compares data preread from memory cells to data to be written to the cells | |
US6643725B1 (en) | Memory card having a buffer memory for storing testing instruction | |
US5561627A (en) | Nonvolatile semiconductor memory device and data processor | |
US20070279988A1 (en) | Apparatus and method for reduced peak power consumption during common operation of multi-NAND flash memory devices | |
KR100334173B1 (en) | Microcomputer | |
EP0370529B1 (en) | Microcomputer having EEPROM | |
JPH06110793A (en) | Monovolatile semiconductor memory | |
EP0617377A2 (en) | Microcomputer with flash memory | |
EP0582991B1 (en) | Data processing apparatus having a flash memory built-in which is rewritable by use of external device | |
US20060268625A1 (en) | Semiconductor integrated circuit and microcomputer | |
JP3669625B2 (en) | Data processing system and method of operating data processing system | |
JP2002132746A (en) | Data processor and single chip microcomputer | |
JP2000099346A (en) | Data processor | |
JP4127562B2 (en) | Microcomputer | |
JP2005202984A (en) | Data processor and single-chip microcomputer | |
JP4018402B2 (en) | Manufacturing method of semiconductor system | |
JP4083247B2 (en) | Microcomputer and microcomputer system | |
JPH11288410A (en) | Microcomputer | |
JP2004246923A (en) | Microcomputer | |
JP2003076672A (en) | Microcomputer | |
JPH05189981A (en) | Flash type eeprom and electronic computer using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |