摘要 |
PROBLEM TO BE SOLVED: To prevent the contents of a program from being rewritten in error due to a runaway of program processing. SOLUTION: In the case of initializing an one-chip microcomputer, specific data are previously stored in a specific address of a RAM 6, and after checking that the contents of the specific address of the RAM 6 having a volatile characteristic coincide with contents obtained at the time of initialization, the step-up operation of a booster circuit 17 and the data rewriting operation of a flash memory 1 are started. When the program processing of the one-chip microcomputer runs away, the contents of the specific address of the RAM 6 are made different from the contents intentionally prepared at the time of initialization, so that even when a rewriting subroutine program instruction is executed in error due to a runaway of program processing, the contents of the flash memory 1 can be prevented from being rewritten in error. Since the step-up operation of the circuit 17 is executed at the time of writing data in the memory 1, power consumption can be reduced.
|