5.6 Error Correction Code (ECC)

Error Correction Code (ECC) is a commonly used technique in nonvolatile memory devices to reduce the Bit Error Rate (BER) over the device operating lifetime and improve device reliability. To support error detection and correction, redundancy data are added to store the ECC calculation results for a defined block of data.

In the MC25VF256, the internal ECC engine checks every aligned 16-byte data block stored in the memory array using the SEC-DED (Single Error Correction-Double Error Detection) Hamming code algorithm. The 16-byte ECC granularity minimizes ECC calculation latency while maintaining a high level of data integrity.

All memory locations are initialized to FFH (erased state) when the device is shipped from the factory. User data can be programmed into the memory array using the following commands:
  • Page Program (02H/12H)
  • Quad Input Page Program (32H/34H)
  • Quad Page Program (33H/C2H/3EH)
When ECC is enabled (ECC = 1 in Status Register 2), ECC calculations are performed during the internal programming operation, and the resulting ECC data are stored in the redundancy area of the memory array. To ensure correct ECC operation:
  • Data must be programmed in aligned 16-byte units
  • Each aligned 16-byte block must be programmed only once

Reprogramming the same 16-byte block may trigger additional ECC calculations and result in invalid ECC information.

During read operations, the internal ECC engine checks the ECC data stored in the spare area and performs any required error correction or error detection on the data being read. The ECC status bits, SEC and DED, in the Extended Address register can be checked to determine whether ECC correction or detection occurred during the most recent read operation.

Read operations may begin at any byte address and continue across the entire memory array. Alignment to a 16-byte boundary is not required when issuing a Read command.

Additional hardware monitoring of ECC status is available through the /ECS pin, which provides real-time ECC status indication during data output. The /ECS pin can be configured to indicate either SEC (Single Error Correction) or DED (Double Error Detection) events.

By default, the /ECS pin is asserted low when an SEC event is detected. The pin behavior can be changed to indicate DED events instead by setting the ECS bit in the Extended Address register.

The ECC status bits in the Extended Address register are cleared under any of the following conditions:
  • A new Read command is issued
  • A Software Reset command is executed
  • A Hardware Reset occurs
  • A power cycle occurs