A controller includes a first memory of non-volatile that stores a
program; a processor that executes the program; and a second memory that
provides a work area for the processor. In this controller, the processor
executes the program read from the first memory and stored in the second
memory as a first mode, and executes the program stored in the first
memory as a second mode.