主权项 |
1. A data programming method for a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module comprises a plurality of physical erasing units, the data programming method comprising:
dividing the physical erasing units into a plurality of first type physical erasing units and a plurality of second type physical erasing units, wherein a programming mode of the first type physical erasing units is a first programming mode, and a programming mode of the second type physical erasing units is a second programming mode; setting the first type physical erasing units as a current writing area and recording a current writing data amount; calculating a first data amount threshold according to a first writable data amount of the first type physical erasing units and a change ratio; receiving first data; determining whether the current writing data amount is less than the first data amount threshold; if the current writing data amount is less than the first data amount threshold, programming the first data into at least one physical erasing unit of the first type physical erasing units using the first programming mode and updating the current writing data amount according to a data amount of the first data; and if the current writing data amount is not less than the first data amount threshold, setting the second type physical erasing units as the current writing area, resetting the current writing data amount, programming the first data into at least one physical erasing unit of the second type physical erasing units using the second programming mode and updating the current writing data amount according to the data amount of the first data. |