249
32072H–AVR32–10/2012
AT32UC3A3
Figure 17-2. FREEZE signal waveform
The application can check the ECC Status Registers (SR1/SR2) for any detected errors. It is up
to the application to correct any detected error for ECC-H. The application can correct any
detected error or let the hardware do the correction by writing a one to the Correction Enable bit
in the MD register (MD.CORRS4) for ECC-RS.
ECC computation can detect four different circumstances:
No error: XOR between the ECC computation and the ECC code stored at the end of the
NAND Flash or SmartMedia page is equal to zero. All bits in the SR1 and SR2 registers will
be cleared.
Recoverable error: Only the Recoverable Error bits in the ECC Status registers
(SR1.RECERRn and/or SR2.RECERRn) are set. The corrupted word offset in the read page
is defined by the Word Address field (WORDADDR) in the PR0 to PR15 registers. The
corrupted bit position in the concerned word is defined in the Bit Address field (BITADDR) in
the PR0 to PR15 registers.
ECC error: The ECC Error bits in the ECC Status Registers (SR1.ECCERRn /
SR2.ECCERRn) are set. An error has been detected in the ECC code stored in the Flash
memory. The position of the corrupted bit can be found by the application performing an XOR
between the Parity and the NParity contained in the ECC code stored in the Flash memory.
For ECC-RS it is the responsibility of the software to determine where the error is located on
ECC code stored in the spare zone flash area and not on user data area.
Non correctable error: The Multiple Error bits (MULERRn) in the SR1 and SR2 registers are
set. Several unrecoverable errors have been detected in the Flash memory page.
ECC Status Registers, ECC Parity Registers are cleared when a read/write command is
detected or a software reset is performed.
For Single-bit Error Correction and Double-bit Error Detection (SEC-DED) Hsiao code is used.
24-bit ECC is generated in order to perform one bit correction per 256 or 512 bytes for pages of
512/2048/4096 8-bit words. 32-bit ECC is generated in order to perform one bit correction per
512/1024/2048/4096 8- or 16-bit words.They are generated according to the schemes shown in
FREEZE
Spare Zone
Nand Flash page 2048B
512B