Microcomputer provided with flash memory and method of storing program into flash memory
First Claim
1. A microcomputer provided with a flash memory and having a self-programming function of rewriting a program stored in said flash memory, comprising:
- a rewrite program area for storing a program for a rewriting processing procedure for said flash memory; and
a controller for forming a flag area locally in said flash memory when the rewriting program stored in external storage means or said rewrite program area is written into said flash memory, performing determination of completion of a plurality of stages of rewriting processing or determination of whether the plurality of stages are good or bad and rewrites recording results of the determination of completion of each stage or results of determination of whether each stage is good or bad into said flag areas a stage at a time, wherein said rewriting processing is performed in accordance with said rewriting program, and said stages comprise;
erasure of the flag area;
blank check of data area; and
writing of data into said data area.
3 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides a microcomputer provided with a flash memory and a method of storing a program into a flash memory by which a write failure which arises from an interruption of rewriting processing of the flash memory can be detected rapidly and with certainty. The microcomputer provided with a flash memory comprises a rewrite-program area for storing a program for a rewriting processing procedure for the flash memory, and a controller for forming a plurality of flag areas locally in the flash memory when the rewriting program stored in external storage means or the rewrite program area is written into the flash memory, performing determination of completion of a plurality of stages of rewriting processing or determination of whether the plurality of stages are good or bad and recording results of the determination into the respective flag areas.
15 Citations
10 Claims
-
1. A microcomputer provided with a flash memory and having a self-programming function of rewriting a program stored in said flash memory, comprising:
-
a rewrite program area for storing a program for a rewriting processing procedure for said flash memory; and
a controller for forming a flag area locally in said flash memory when the rewriting program stored in external storage means or said rewrite program area is written into said flash memory, performing determination of completion of a plurality of stages of rewriting processing or determination of whether the plurality of stages are good or bad and rewrites recording results of the determination of completion of each stage or results of determination of whether each stage is good or bad into said flag areas a stage at a time, wherein said rewriting processing is performed in accordance with said rewriting program, and said stages comprise;
erasure of the flag area;
blank check of data area; and
writing of data into said data area. - View Dependent Claims (2)
-
-
3. A microcomputer provided with a flash memory and having a self-programming function of rewriting a program stored in said flash memory, comprising:
-
a rewrite program area for storing a program for a rewriting processing procedure for said flash memory;
a controller for forming a flag area locally in said flash memory when the rewriting program stored in external storage means or said rewrite program area is written into said flash memory, performing determination of completion of a plurality of stages of rewriting processing or determination of whether the plurality of stages are good or bad and recording results of the determination into said flag areas; and
said controller writing an expected value when rewriting is completed regularly into the flag area at the last stage of rewriting processing and changes said expected value at the first stage of rewriting processing, wherein said rewriting processing is performed in accordance with said rewriting program, and said stages comprise;
erasure of the flag area;
blank check of data area; and
writing of data into said data area.
-
-
4. A microcomputer provided with a flash memory and having a self-programming function of rewriting a program stored in said flash memory, comprising:
-
a rewrite program area for storing a program for a rewriting processing procedure for said flash memory;
rewriting means for forming a plurality of flag areas locally in said flash memory when the rewriting program stored in external storage means or said rewrite program area is written into said flash memory; and
a controller for performing determination of completion of a plurality of stages of rewriting processing or determination of whether the plurality of stages are good or bad and rewrites recording results of the determination of completion of each stage or results of determination of whether each stage is good or bad into said flag areas a stage at a time, wherein said rewriting processing is performed in accordance with said rewriting program, and said stages comprise;
erasure of the flag area;
blank check of data area; and
writing of data into said data area. - View Dependent Claims (5)
-
-
6. A microcomputer provided with a flash memory and having a self-programming function of rewriting a program stored in said flash memory, comprising:
-
a rewrite program area for storing a program for a rewriting processing procedure for said flash memory;
rewriting means for forming a plurality of flag areas locally in said flash memory when the rewriting program stored in external storage means or said rewrite program area is written into said flash memory;
a controller for performing determination of completion of a plurality of stages of rewriting processing or determination of whether the plurality of stages are good or bad and rewrites recording results of the determination of completion of each stage or results of determination of whether each stage is good or bad into said flag areas a stage at a time; and
flag state notification means for comparing, when power supply is made available after the rewriting is completed, values read out from said flag areas with expected values for said flag areas stored in advance and notifying said controller of results of the comparison, wherein said rewriting processing is performed in accordance with said rewriting program, and said stages comprise;
erasure of the flag areas;
blank check of data area; and
writing of data into said data area. - View Dependent Claims (7)
-
-
8. A flash memory used in rewriting a stored program, comprising:
-
a flag area for rewriting recording results of the determination of completion of each stage of a plurality of stages or results of determination of whether the each stage of the plurality of stages is good or bad a stage at a time, wherein rewriting is performed in accordance with a rewriting program stored in the flash memory, and said stages comprise;
erasure of the flag area;
blank check of data area; and
writing of data into said data area.
-
-
9. A flash memory used in rewriting a stored program, comprising:
-
a flag area for writing an expected value when rewriting is completed regularly into the flag area at the last stage of rewriting processing and changes said expected value at the first stage of rewriting processing, wherein rewriting is performed in accordance with a rewriting program stored in the flash memory, and said rewriting processing comprise a plurality of stages including erasure of the flag area, blank check of data area, and writing of data into said data area.
-
-
10. A method of storing a program into a flash memory of a microcomputer provided with said flash memory and having a self-programming function of rewriting the program stored in said flash memory, said method comprising:
-
forming a plurality of flag areas in said flash memory when a rewriting program is written into said flash memory;
determining completion of a plurality of stages of rewriting processing or determining whether the plurality of stages are good or bad; and
after results of the determination are made, rewriting recorded results of the determination of completion of each stage or results of determination of whether each stage is good or bad into said flag areas a step at a time, wherein rewriting of the program is performed in accordance with said rewriting program, and said stages comprise;
erasure of the flag area;
blank check of data area; and
writing of data into said data area.
-
Specification