Patent ID: 8423705

Claim:
A semiconductor device comprising: a first nonvolatile storage area including a plurality of sectors; a second nonvolatile storage area; a third nonvolatile storage area located in the first nonvolatile storage area; a fourth nonvolatile storage area located in the second nonvolatile storage area; and a control portion that is configured to select between two modes that control storage in four storage areas selecting one of a first mode and a second mode wherein the first and the second modes determine whether control information is stored in the third or the fourth nonvolatile storage area wherein one of the first mode and the second mode is a boot mode and in the first mode the third storage area is used as one time programmable memory, wherein: in the first mode, sectors of the first nonvolatile storage area where the third nonvolatile storage area is not located are used as a main storage area, and the second nonvolatile storage area is used to store a program or data that is read before the first nonvolatile storage area is accessed, the third nonvolatile storage area being used to store control information that controls writing, reading, and erasing of data involved in the first nonvolatile storage area or the second nonvolatile storage area; and in the second mode, the first nonvolatile storage area is used as the main storage area, and the fourth nonvolatile storage area is used to store the control information.