In recent years, flash memories are used as a storage medium in various apparatuses. Such flash memories have a characteristic that repeated data writing (including data rewriting) into the same block at short time intervals reduces a data retaining period of the block.
This characteristic will be described now. Generally, a flash memory is constituted by MOS (Metal Oxide Semiconductor) transistors (corresponding to memory cells), and each MOS transistor includes gate electrodes in a two-layer structure. There are two main types of flash memory, which are a NOR type flash memory and a NAND type flash memory. A NOR type flash memory can read, write, delete, and rewrite its content one byte at a time, since each cell is connected a source line and a bit line. A NAND type flash memory can read, write, delete, and rewrite its content plural bytes at a time, since plural cells are connected in series between a source line and a bit line. In both types, by applying a high electric field between a floating gate of a MOS transistor and a silicon substrate, electrons pass through a gate insulating film with a tunneling effect and are injected into the floating gate, which changes the gate voltage (threshold voltage) at which the MOS transistor is switched from OFF state to ON state. The both types of flash memory store information in itself using this feature.
Accordingly, the increased number of times of writing data into a flash memory causes deterioration of the gate insulating film because of tunnel injection of electrons. Therefore, electrons injected into the floating gate tend to run into the silicon substrate more, and thus the data retention period is shortened. In particular, a NAND type flash memory carries out data writing on one whole memory block at a time even for writing data into a part of cells in a memory block (hereafter referred to as “a block”). It substantially increases the number of times of data writing in the flash memory, and deterioration of the gate insulating film worsens, and thus the data retention period is shortened.
Due to the above circumstances, data writing into flash memories are controlled by using a wear leveling function such that data writing is not concentrated onto the same block. The wear leveling function records a writing history for each block of the flash memory, and performs data writing onto the blocks evenly by referring to the history.
With respect to such techniques for diversifying data writing, for example, Japanese Unexamined Patent Publication (JP-A) No. 2010-108522 discloses a method of controlling a memory system including a nonvolatile memory having a plurality of blocks, wherein data erasing is performed in a unit of one block. The method includes: a step of measuring erasure time when data in each block is erased; and a step of writing at least data supplied from the outside into a first block which is vacant and whose erasure time is the oldest.
The wear leveling function can restrict repeated data writing into the same block. However, when the amount of data to be written into the flash memory is so large, data writing is frequently performed in the flash memory, and data writing can be performed repeatedly within a short period of time in several blocks even if the wear leveling works. Since deterioration of the gate insulating film advances in a block into which data writing is carried out repeatedly within a short period of time, the data retention period of such a block is shortened, and thus the life of the flash memory is shortened.
In addition, even if data is preferentially written into a block whose erasure time is the oldest using the technique of JP-A No. 2010-108522, that block merely has erasure time that is relatively old as compared to other blocks, and thus absolute erasure time may not be old. It can causes a situation that the sufficient time interval from when data is written into each block until when next data is written into the corresponding block is hardly secured. Such a situation worsens a deterioration of the gate insulating film of the block, and shorten the data retention period and the life of the flash memory.
Such issues arise in any apparatus that writes data into a flash memory. In particular, in image formation apparatuses that use a flash memory as an image data buffer, writing of image data having large size is repeatedly carried out within a short period of time, and those issues become conspicuous in the apparatuses.