Patent ID: 9710374
Date: 2017-07-18
CPC Classifications: G06F

Claim:
1. A data writing method for controlling a rewritable non-volatile memory module, the rewritable non-volatile memory module comprising a first memory unit and a second memory unit, the first memory unit comprising a plurality of first physical erasing units, the second memory unit comprising a plurality of second physical erasing units, the data writing method comprising: configuring a plurality of logical addresses and mapping the logical addresses to a part of the first physical erasing units of the first memory unit and a part of the second physical erasing units of the second memory unit; receiving a writing command from a host system, wherein the writing command instructs to write a first data into a first logical address among the logical addresses; selecting a third physical erasing unit from the first physical erasing units of the first memory unit or the second physical erasing units of the second memory unit; determining whether the third physical erasing unit belongs to the first memory unit; if the third physical erasing unit belongs to the first memory unit, erasing a second physical erasing unit among the second physical erasing units of the second memory unit while writing the first data into the third physical erasing unit determined to be belonging to the first memory unit; if the third physical erasing unit does not belong to the first memory unit, erasing a first physical erasing unit among the first physical erasing units of the first memory unit while writing the first data into the third physical erasing unit; at least grouping the first physical erasing units of the first memory unit and the second physical erasing units of the second memory unit into a data area and a spare area, wherein the part of the first physical erasing units and the part of the second physical erasing units belong to the data area; and configuring a first erasing area and a second erasing area, wherein the third physical erasing unit belongs to the spare area, the erased first physical erasing unit among the first physical erasing units of the first memory unit belongs to the first erasing area, and the erased second physical erasing unit among the second physical erasing units of the second memory unit belongs to the second erasing area, wherein, when a reading, writing, or erasing operation is performed on the first memory, another reading, writing or erasing operation is simultaneously performed on the second memory unit.