1. A memory system comprising: a volatile memory; a non-volatile memory; and an error correction code (ECC) module in communication with the volatile memory and the non-volatile memory, wherein the ECC module is configured to encode, decode, and correct data stored in the volatile memory when the memory system enters and exits a sleep mode and is further configured to encode, decode, and correct data stored in the non-volatile memory when the memory system is in an active mode.