Patent ID: 8527840

Claim:
A system for restoring damaged data programmed on a memory, the system comprising: a memory controller associated with a memory, the memory controller adapted to perform a first decoding algorithm having a first error correction capability on a portion of encoded data stored on the memory, wherein in the event of a failure of the first decoding algorithm to decode the portion of encoded data, the memory controller is adapted to send a failure notification; and a recovery module associated with a processor, said recovery module being adapted to receive the failure notification, send a request for soft sampling of the portion of encoded data stored on the memory, wherein the memory controller is further adapted to receive the request for soft sampling of the portion of encoded data stored on the memory, perform the soft sampling of the portion of encoded data accordingly, and send the results of the soft sampling to the recovery module, and wherein the recovery module is adapted to receive the results of the soft sampling and perform thereon a second decoding algorithm in response to at least one out of: (a) an existence of an older version of the memory block in which the portion of encoded data is stored in the memory; (b) scrambling information of the memory block in which the portion of encoded data is stored; (c) a threshold value shift along the memory block in which the portion of encoded data is stored; and (d) decoded bits stored at a first memory page of the memory, said first memory page being different from a second memory page in which the encoded data is stored, wherein the first and second memory pages comprise the same memory rows; wherein the second decoding algorithm has a second error correction capability, wherein the second error correction capability exceeds the first error correction capability.