Data processor

Electrical computers and digital processing systems: processing – Architecture based instruction processing

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C711S103000

Reexamination Certificate

active

06738894

ABSTRACT:

BACKGROUND OF THE INVENTION
The present invention relates to an 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 be delayed. 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 trouble at the time of rewriting by moving a trouble handling program to another area when rewriting a flash memory.
SUMMARY OF THE INVENTION
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 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 interr

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Data processor does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Data processor, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Data processor will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3229310

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.