Even when the number of rewrite operations varies among erase unit areas,
the number of rewrite operations is improved for all of the erase unit
areas. A flash EEPROM 100 comprises a trimming value storing area 130 of
storing a trimming value corresponding to each erase unit area 120
included in a memory cell array 110. When an erase operation and a write
operation are performed with respect to a certain erase unit area 120, a
regulator circuit 150 converts a voltage boosted by a booster circuit 140
to a level corresponding to the trimming value for the erase unit area
120. When a read determination circuit 170 detects an abnormality as the
number of rewrite operations is increased, the trimming value is updated
to a value which causes the regulator circuit 150 to increase the output
voltage.