Patent ID: 8386699

Claim:
A program command giving method, for writing data from a host system into a flash memory chip, the program command giving method comprising: providing a flash memory controller; receiving a plurality of host write commands from the host system by using a native command queuing (NCQ) protocol by the flash memory controller; generating a command giving sequence according to the host write commands by the flash memory controller; and sequentially receiving the host write commands and data corresponding to the host write commands from the host system according to the command giving sequence, and respectively giving a cache program command to the flash memory chip to write the data into the flash memory chip, wherein the flash memory chip comprises a first buffer area, a second buffer area, and a storage area, and the step of sequentially receiving the host write commands and the data corresponding to the host write commands from the host system according to the command giving sequence and respectively giving the cache program command to the flash memory chip to write the data into the flash memory chip comprises: receiving first data corresponding to a first host write command from the host system; giving the cache program command to the flash memory chip by the flash memory controller to transmit the first data into the first buffer area, wherein the first data is moved from the first buffer area to the second buffer area and written from the second buffer area into the storage area; receiving second data corresponding to a second host write command from the host system; and giving the cache program command to the flash memory chip by the flash memory controller to transmit the second data into the first buffer area, wherein the second data is moved from the first buffer area to the second buffer area and written from the second buffer area into the storage area, wherein the second data is transmitted into the first buffer area after the first data is moved from the first buffer area to the second buffer area.