25.6.12.2 ECC Error Detection

The NVM physical block fetches 128-bit quad-word and ECC checking is performed on a 64-bit basis independently on the low and high double-words. Therefore two ECC decoders operate in parallel. An ECC failure may be present in any of the four words from the NVM, not necessarily the word that is addressed on the bus. Any ECC error in a double-word will be reported the first time the quad-word access. The ECC logic in the read data path is capable of double error detection and single error correction on the fly per 64-bit double-word.

Upon detection:

  • INTFLAG ECC error flags are updated:
    • The ECC single error interrupt flag is raised (INTFLAG.ECCSE) in case of single error
    • The ECC dual error interrupt flag is raised (INTFLAG.ECCDE) in case of dual error
  • ECCERR.ADDR is updated with the faulty quad-word byte address in the main address space.
  • ECCERR.TYPEL is updated with the error type (NONE, SINGLE, DUAL) detected on the low 64-bit double word.
  • ECCERR.TYPEH is updated with the error type (NONE, SINGLE, DUAL) detected on the high 64-bit double word.

INTFLAG.ECCSE and INTFLAG.ECCDE are automatically cleared when ECCERR is read.

ECCERR.TYPEL and ECCERR.TYPEH are reset to the NONE value when ECCERR is read. If an error occurs while reading ECCERR, the previous error information is sent to the APB and ECCERR is updated with the next error information.

If a single-error has been detected and INTFLAG.ECCSE or INTFLAG.ECCDE is not clear:

  • Any incoming single-errors is ignored
  • First incoming dual-error overrides ECCERR.ADDR, ECCERR.TYPEL and ECCERR.TYPEH

If a dual-error has been detected and INTFLAG.ECCDE is not clear:

  • incoming single-errors are ignored
  • incoming dual-errors are ignored

ECCERR.ADDR is always quad-word aligned. If jumping to a word that is not quad-word aligned, e.g. jumping to address 0x100C, INTFLAG.ECCDE and INTFLAG.ECCSE are updated according to the types of detected errors, and ECCERR.ADDR will read 0x1000, irrespective of whether the ECC error was in address 0x1000, 0x1004, 0x1008, or 0x100C.