Patent ID: 7990774

Claim:
A communication device, the communication device comprising: a flash memory; at least one processor; and one or more programs stored in the flash memory and being executable by the at least one processor, the one or more programs comprising: an initializing module operable to set erasing parameters, the erasing parameters comprise a current erasing count and a max erasing time, the initializing module further operable to initialize the current erasing count as zero, and initialize the max erasing time as a predetermined integer; an erasing module operable to erase data in a target data block of the flash memory once, and calculate the current erasing count of the erased block; a setting module operable to set a first bit of the erased block as “0”; a determining module operable to determine whether other bits except for the first bit of the erased block are all “1”, and determine whether the current erasing count is less than the max erasing time if any bits except for the first bit of the erased block is not “1”; a status displaying module operable to display that the flash memory is in an abnormal state if the current erasing count equals to the max erasing time.