Patent ID: 8832358

Claim:
A data writing method for writing data into a physical block of a rewritable non-volatile memory module, wherein the physical block has a plurality of physical page sets, each of the physical page sets has a plurality of physical pages, the physical pages comprises a lower physical page and an upper physical page, a reliability of the lower physical page is better than a reliability of the upper physical page, and the data writing method comprises: setting danger distance respectively corresponding to each of the physical pages of the physical page sets; receiving a secure write command and setting a secure writing flag in an enable state in response to the secure write command; receiving a write command and new data corresponding to the write command; identifying a predetermined physical page of the physical pages of the physical page sets; determining whether the secure writing flag is set in the enable state; if the secure writing flag is set in the enable state, writing the new data into a secure physical page of the physical pages of the physical page sets in response to the write command and re-setting the secure writing flag in a disable state, wherein a distance between the secure physical page and the predetermined physical page in the physical block is equal to the danger distance corresponding to the predetermined physical page; and if the secure writing flag is not set in the enable state, writing the new data into the predetermined physical page of the physical pages in response to the write command.