Patent ID: 8055873

Claim:
A data writing method for a flash memory, the data writing method comprising: selecting a block as a substitute block from a spare area of the flash memory, wherein the substitute block is used for substituting a data block of a data area for writing a new data, the data block and the substitute block respectively has a plurality of pages which are arranged orderly and the new data is about to be written into at least one first page among the pages of the data block; directly writing the new data into at least one first page among the pages of the substitute block, wherein the at least one first page of the substitute block starts from a start page among the pages of the substitute block, wherein at least one second page among the pages of the data block arranged before the at least one first page of the data block that the new data to be written into stores first valid data; and copying second valid data into at least one third page among the pages of the substitute block from at least one third page among the pages of the data block, wherein the at least one third page of the data block follows the at least one first page of the data block and the at least one third page of the substitute block follows the at least one first page of the substitute block.