Method of executing wear leveling in a flash memory device according to ambient temperature information and related flash memory device

A method of executing wear leveling in a flash memory device includes determining whether a current temperature is in a normal operating temperature range of the flash memory device, and reprogramming data associated with data blocks to another location in a flash memory array when the current temperature is in the normal operating temperature range of the flash memory device, wherein the data is programmed in a temperature out of the normal operating temperature range of the flash memory device.

BACKGROUND

1. Technical Field

The invention relates to flash memory devices, and more particularly, to a method of executing wear leveling while taking into consideration ambient temperature information of the flash memory devices.

2. Description of the Conventional Art

Flash memory has become an increasingly popular type of memory in recent years, and flash memory is now used in a variety of consumer electronic devices. Flash memory device manufacturers typically specify a range of operating temperatures under which the flash memory devices should be operated for optimum results. However, the flash memory device manufacturers ultimately have no control over the temperature conditions in which the end user will use the flash memory devices.

It has been observed that the operation and behavior of flash memory devices can be affected by temperature. If data is programmed in a flash memory at one extreme temperature and then later read at an opposite extreme temperature, the read data may not match the programmed data due to electron displacement effects that are influenced by the temperature change.

Please refer toFIG. 1.FIG. 1is a diagram showing examples of two worst case scenarios for producing data errors due to temperature differences between data programming and data reading actions performed on a prior art flash memory device. Scenario 1 contains steps10,12, and14. In step10data is programmed to the flash memory device when the ambient temperature information of the flash memory device is −40° C. In step12data is read from the flash memory device when the ambient temperature information of the flash memory device is 25° C. In step14data is read from the flash memory device when the ambient temperature information of the flash memory device is 85° C. Thus, in scenario 1, the temperature in step10is considerably lower than the temperature in step14. As a result, the data read in step14may not match the data programmed in step10due to electron displacement effects that are influenced by the large temperature change from step10to step14.

Scenario 2 is a substantial opposite situation depicted in scenario 1. Scenario 2 contains steps20,22, and24. In step20data is programmed to the flash memory device when the ambient temperature information of the flash memory device is 85° C. In step22data is read from the flash memory device when the ambient temperature information of the flash memory device is 25° C. In step24data is read from the flash memory device when the ambient temperature information of the flash memory device is −40° C. Thus, in scenario 2, the temperature in step20is much higher than the temperature in step24. Consequently, the data read in step24may not match the data programmed in step20due to electron displacement effects that are influenced by the temperature change.

Another factor that may be affected by the temperature change is the occurrence of read disturb errors. Read disturb errors arise when non-selected memory blocks are unintentionally programmed while selected neighboring memory blocks are programmed. Extreme operating temperatures of flash memory devices outside of the optimum operating temperature ranges can exacerbate the effects of read disturb errors.

Due to the inability to predict under what operating temperatures the end user will operate a flash memory device, there exists the possibility of data loss due to wide temperature fluctuations. Since flash memory devices may be used in harsh environments, such as in industrial or automotive applications, there is a need for flash memory devices that can maintain data integrity despite these temperature fluctuations.

In conventional flash memory devices error correction code (ECC) engines are often used to correct errors that are detected in data. However, there exists no simple and effective mechanism for forecasting errors or even preventing the errors from occurring due to temperature fluctuations.

SUMMARY

It is therefore one of the primary objectives of the claimed invention to provide a method of executing wear leveling in a flash memory device according to ambient temperature information of the flash memory device.

According to an exemplary embodiment of the claimed invention, a method of executing wear leveling in a flash memory device according to temperature information recorded in the flash memory device is disclosed. The method includes determining whether a current temperature is in a normal operating temperature range of the flash memory device, and reprogramming data associated with data blocks to another location in a flash memory array when the current temperature is in the normal operating temperature range of the flash memory device, wherein the data is programmed in a temperature out of the normal operating temperature range of the flash memory device.

According to another exemplary embodiment of the claimed invention, a flash memory device includes a controller for controlling operation of the flash memory device, a temperature sensor for providing ambient temperature information of the flash memory device to the controller, and a flash memory array controlled by the controller to store data and record temperature information of the data, which is a temperature while the data is programmed to data blocks in the flash memory array. The temperature information of the data is updated by executing wear leveling in the flash memory device in a normal operating temperature range of the flash memory device when the data is programmed in the temperature which is out of the normal operating temperature range.

According to yet another exemplary embodiment of the claimed invention, a method of executing wear leveling in a flash memory device according to temperature information recorded in the flash memory device is disclosed. The method includes programming data to data blocks in a flash memory array in a first temperature which is out of a normal operating temperature range of the flash memory device, and recording the first temperature as first temperature information in the flash memory array. The method also includes determining whether a current temperature is in the normal operating temperature range of the flash memory device, and reprogramming the data associated with the data blocks to another location in the flash memory array when the current temperature is in the normal operating temperature range of the flash memory device.

It is an advantage that the present invention records ambient temperature information associated with data written do the flash memory device. In this way the flash memory device can have an indication of what the ambient temperature information of the flash memory device was when the data was last written to the flash memory device. Furthermore, when performing wear leveling on data recorded on the flash memory device in the condition that the current ambient temperature is within the normal operating temperature range but the recorded ambient temperature information indicates that the data was programmed to the flash memory device when the ambient temperature of the flash memory device was outside the normal operating temperature range, an updated ambient temperature information will be recorded in the flash memory when the data is reprogrammed as part of the wear leveling process. By updating the ambient temperature information data associated with the data reprogrammed through the wear leveling process, the flash memory will be aware of the ambient temperature information at which the data was most recently written to the flash memory device, which will increase the confidence in the accuracy of this stored data. Moreover, since updating the recorded temperature is part of the usual wear leveling process, no significant extra burden is put on the flash memory device for updating the recorded ambient temperature information data when the data is reprogrammed by the wear leveling process.

The temperature data is not limited to being recorded in the spare areas of the flash memory array. For example, the temperature data can be recorded in data blocks as a part of the stored data information, or a small area of the data block can be separated for recording the temperature data.

The temperature sensor can be integrated with the controller, or can be a separate component. Also, the flash memory device can be any storage apparatus containing flash memory inside, such as a solid-state drive or a memory card.

DETAILED DESCRIPTION

Please refer toFIG. 2.FIG. 2is a functional block diagram of a flash memory device50according to one embodiment of the present invention. The so-called flash memory device in the present invention may include any storage apparatus containing flash memory inside, such as a solid-state drive or a memory card. The flash memory device50contains a controller52for controlling operation of the flash memory device50and a temperature sensor54for measuring an ambient temperature of the flash memory device50. It should be noted that the temperature sensor54can be integrated with the controller52as a single component, or can be separately set up out of the flash memory device50to provide the ambient temperature information to the controller52of the flash memory device50. A firmware may be embedded in the controller52to be executed by the controller52for operating the flash memory device50.

The flash memory device50also includes a flash memory array60containing a plurality of data blocks62and66as well as a plurality of spare areas64and68. The data blocks62and66store data that is programmed or written to the flash memory device50. Notably, this embodiment of the present invention uses the spare areas64and68for recording the ambient temperature information of the flash memory device50as measured by the temperature sensor54at the time that data is programmed to the data blocks62and66. The spare areas64and68therefore provide an indication of the integrity of the data stored in the data blocks62and66based on whether the recorded ambient temperature information is within the normal operating temperature range for the flash memory device50. Please note that the number of spare areas used for storing the temperature data does not necessarily need to equal the number of data blocks, and multiple temperature data can be recorded in a single spare area if desired. Also, the temperature data is not limited to being recorded in the spare areas of the flash memory array60as mentioned in this embodiment of the present invention. For example, the temperature data is able to be recorded in the data blocks62and66as a part of the stored data information, or a small area of the data blocks62and66can be separated for storing the temperature data.

All flash memory devices have their own temperature range for normal operating, which may depend on the manufacturing process, types of memory chip, etc. In this embodiment of the present invention, suppose that the normal operating temperature range for the flash memory device50is between −25° C. and 70° C. While in ideal situations the flash memory device50would only be operated within this normal operating temperature range, this operating temperature range may not always be true in practical applications. There may be short time periods in which the ambient temperature of the flash memory device50is, for example, between −40° C. and −25° C. or between 70° C. to 85° C. At other times the ambient temperature may be room temperature. However, this ambient temperature information could later fluctuate to being less than −25° C. or being greater than 70° C. Because it is difficult to ensure what the ambient temperature of the flash memory device50will be when used by the end user, the present invention records the ambient temperature information of the data that is programmed to the flash memory device50to provide an indication of this temperature information.

As previously mentioned in the preferred embodiment of the present invention, the ambient temperature information will be recorded in the memory array60of the flash memory device50when the data is programmed to the data blocks62and66in the memory array60. However, in another embodiment of the present invention, the ambient temperature information will be recorded in the memory array60only in the situation that the data is programmed to the data blocks in the temperature which is out of the normal operating temperature range for the flash memory device50, otherwise the ambient temperature information will not be recorded. Once the data, which is programmed in the temperature out of the normal operating temperature range for the flash memory device50, is reprogrammed by executing wear leveling under the normal operating temperature range of the of the flash memory device50as mentioned above, the recorded ambient temperature information will be erased. This can be looked on as another format of updating the recorded ambient temperature information of the data.

Please refer toFIG. 3.FIG. 3is a flowchart illustrating performing wear leveling while considering ambient temperature information of the flash memory device50according to the embodiment of the present invention method. Steps contained in the flowchart will be explained below.

Step100: Start the wear leveling process for reprogramming data associated with data blocks to another location in the flash memory array60.

Step102: Determine if the current ambient temperature of the flash memory device50is greater than −25° C. and less than 70° C. If so, go to step105. If not, and the current ambient temperature is greater than 70° C., go to step103. If not, and the current ambient temperature is less than −25° C., go to step104.

Step103: Perform wear leveling on the data which was programmed at a temperature greater than 70° C. Data meeting this condition can be determined according to recorded ambient temperature information. Since the current ambient temperature is also greater than 70° C., data errors due to temperature differences between when the data was programmed and when data is read for the wear leveling process will be minimized.

Step104: Perform wear leveling on the data which was programmed at a temperature less than −25° C. Data meeting this condition can be determined according to recorded ambient temperature information. Since the current ambient temperature is also less than −25° C., data errors due to temperature differences between when the data was programmed and when data is read for the wear leveling process will be minimized.

Step105: Determine if a recorded ambient temperature information of the data blocks is less than −25° C. or greater than 70° C. If either condition is satisfied, go to step108. If not, go to step106.

Step106: Perform wear leveling for reprogramming data associated with the data blocks to another location in the flash memory array60according to erase counts of data blocks of the flash memory array60.

Step108: Perform wear leveling for reprogramming data associated with the data blocks to another location in the flash memory array60and record an updated ambient temperature information of the flash memory device50.

Please note that the lower limit temperature threshold value of −25° C. and the upper limit temperature threshold value of 70° C. may be changed to other threshold values. In addition, the lower and upper limit temperature threshold values used in steps102and104do not need to be equal to each other, and can be separately chosen.

In another embodiment, steps102,103, and104could be modified such that no wear leveling process is executed at all instead of executing steps103and104. In other words, when the temperature is less than −25° C. or greater than 70° C., no wear leveling step is executed in order to avoid performing wear leveling at extremely high or extremely low temperatures. Yet in another embodiment, recording an updated ambient temperature information in step108, can be replaced by erasing the ambient temperature information in the flash memory array60.

The described embodiment of the present invention is implemented as part of the existing wear leveling procedure, and the embodiment of the present invention records updated ambient temperature information into the flash memory array60when performing wear leveling on a data block being reprogrammed when the temperature criteria specified in steps102and104are satisfied. In this way, if the data block was previously recorded at an extremely low temperature or an extremely high temperature, as indicated in step104, and if the current ambient temperature information is within a normal operating temperature range, as indicated in step102, then the updated ambient temperature information is recorded as the data is reprogrammed during the wear leveling process. Thus, step108not only reprograms the data of the data block during the wear leveling process, but the updated ambient temperature information is also recorded in the flash memory array60during the wear leveling process. In this way, the wear leveling process removes the problems that could be caused when the data block was originally programmed at the extreme temperature since the wear leveling process reprograms the data at a normal operating temperature and also records the updated ambient temperature information in the flash memory array60. The updated ambient temperature information data will provide the flash memory device50with a higher degree of confidence in the data stored in the data block than if the original recorded ambient temperature information data was an extreme temperature value.

In short, the present invention provides a simple and effective way to overcome the problems of electron displacement effects and read disturb error effects that are exacerbated when programming data at extreme temperatures and later reading the data at opposite extreme temperatures.

The present invention avoids the need to store a lookup table containing electron displacement parameters to compensate for various operating environmental factors when operating the flash memory device50in different conditions. Furthermore, the present invention is implemented during the wear leveling process, which is a process that would already be executed anyway. Thus, by performing wear leveling when the ambient temperature information of the flash memory device50is in a normal operating temperature range, the integrity of the data stored in the flash memory device50can be maintained.