Patent ID: 8151167

Claim:
A program processing device comprising: a non-volatile storage that stores a program, variable data whose value changes in accordance with execution of the program, and constant data whose value is constant regardless of the execution of the program; a volatile storage; and a controller that reads the program, the initial value of the variable data, and the constant data stored in the non-volatile storage, writes the read program, initial value of the variable data, and constant data into the volatile storage, and then executes the program written into the volatile storage, wherein the controller includes a detector configured to detect a bit flip in the program, the variable data, and the constant data stored in the volatile storage, a constant recovery unit configured to, when the detector detects an error in the constant data, read the constant data from the non-volatile storage, write the read constant data into the volatile storage, and then continue the execution of the program from a point at which the program was being executed before the detector detected the error, and a restart unit configured to, when the detector detects an error in one of the variable data and the program, read the program, the initial value of the variable data, and the constant data from the non-volatile storage, write the read program, initial value of the variable data, and constant data into the volatile storage, and then execute the program written into the volatile storage from a beginning of the program.