| CPC G06F 12/0246 (2013.01) [G06F 12/02 (2013.01); G06F 12/0253 (2013.01); G06F 12/0292 (2013.01)] | 15 Claims |

|
1. A control method of a flash memory controller, wherein the flash memory controller is configured to access a flash memory module, the flash memory module comprises multiple blocks, and the control method comprises:
after the flash memory controller is powered on, determining whether the flash memory controller encountered an abnormal power failure before the flash memory controller is powered on;
if the flash memory controller encounters the abnormal power failure before the flash memory controller is powered on, determining a first block having an open state, and selecting a specific block within the flash memory module, wherein the specific block is a blank block;
moving a portion of valid data within the first block to the specific block;
setting the first block to have a close state;
determining if a number of blank blocks within the flash memory module is less than a threshold value; and
if the number of blank blocks within the flash memory module is less than the threshold value, selecting a second block having the close state and a lowest number of valid pages, and moving all valid data of the second block into the specific block.
|