Field of the Invention
The invention relates to a data storage device, and more particularly to a data storage device for detecting a programming operation.
Description of the Related Art
Flash memory is a common non-volatile data storage device, which can be erased and programmed electrically. For example, an NAND flash memory is usually for use in a memory card, a USB flash device, a solid-state disk (SSD), an embedded multimedia card, etc. In recent years, flash memories have been made to have the characteristics of data non-volatility, low power consumption, compact size, and non-mechanical structure. Hence, flash memories have been adapted for use in various electronic devices, especially portable electronic devices.
A flash memory comprises a plurality of blocks, and each block comprises a plurality of pages for data storage. When the flash memory receives a program (write) command from a controller, the flash memory writes data to pages of the blocks thereof according to instructions of the controller and the program address. When the flash memory receives a read command from the controller, the flash memory reads data from pages of the blocks thereof according to the instructions of the controller and the program address, and then issues read-out data back to the controller. However, if an unexpected situation occurs when the data is stored into the flash memory, the programming operation may result in failure. If the controller cannot instantly detect that the programming operation has failed, it may be because the read data is wrong.
Therefore, a detection method to determine whether a programming operation of a flash memory is normal is desirable.
A data storage device and a detection method for detecting a programming operation of a flash memory are provided. An embodiment of a data storage device is provided. The data storage device comprises a flash memory and a controller. The flash memory comprises a memory array. The controller performs a programming operation for the flash memory. After the controller issues a program command of the programming operation to the flash memory, the controller issues a first read status command to the flash memory before a page program time of the flash memory has been reached, and the controller determines whether the programming operation is performed in the flash memory according to a first memory status provided by the flash memory.
Furthermore, an embodiment of a detection method for detecting a programming operation of a flash memory is provided. A program command of the programming operation is issued to the flash memory, by a controller. A first read status command is issued to the flash memory before a page program time of the flash memory has been reached, by the controller. It is determining whether the programming operation is performed in the flash memory according to a first memory status corresponding to the first read status command provided by the flash memory.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
Traditionally, a controller can obtain the status of a flash memory via the flash memory, to determine whether a programming operation of the flash memory has succeeded. For example, if the status of the flash memory is “E0h”, the flash memory has succeeded, wherein “E0h” represents that the flash memory is idle, i.e. the flash memory has completed the programming operation and then the flash memory enters an idle mode. Conversely, if the status of the flash memory is “E1h”, the flash memory has failed. However, in the programming operation, if an unexpected situation occurs, the flash memory may remain in the idle mode without entering a busy mode. Thus, the controller can obtain the status “E0h” of the flash memory, and then it makes an erroneous determination that the programming operation has succeeded. Compared with a traditional controller, the controller 110 of
According to the embodiments of the invention, the controller can obtains a status of the flash memory during the page program time tPROG. Thus, in the programming operation, when an unexpected situation occurs in the flash memory, the controller can accurately determine whether the programming operation is performed in the flash memory during the page program time tPROG, and further determine whether the programming operation has succeeded.
While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Number | Date | Country | Kind |
---|---|---|---|
104134820 A | Oct 2015 | TW | national |
This Application is a Divisional of pending U.S. patent application Ser. No. 15/288,012, filed on Oct. 7, 2016, which claims priority of Taiwan Patent Application No. 104134820, filed on Oct. 23, 2015, the entireties of which are incorporated by reference herein.
Number | Name | Date | Kind |
---|---|---|---|
7216183 | Ho et al. | May 2007 | B2 |
8619493 | Kim | Dec 2013 | B2 |
8909854 | Yamagishi et al. | Dec 2014 | B2 |
9081662 | Teo | Jul 2015 | B2 |
20100277987 | Shinozaki et al. | Nov 2010 | A1 |
20130128675 | Kim | May 2013 | A1 |
20140019670 | Huang | Jan 2014 | A1 |
20140129206 | Cheng et al. | May 2014 | A1 |
20140189209 | Sinclair | Jul 2014 | A1 |
20160267980 | Akamine | Sep 2016 | A1 |
20170109059 | Kim | Apr 2017 | A1 |
Number | Date | Country |
---|---|---|
I425515 | Feb 2014 | TW |
Number | Date | Country | |
---|---|---|---|
20170243655 A1 | Aug 2017 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15288012 | Oct 2016 | US |
Child | 15591233 | US |