5.4 ECC Fault Injection

To test Fault handling, an EEC error can be generated. Both single and double-bit errors can be generated in both the read and write data paths. Read path Fault injection first reads the Flash data and then modifies them prior to entering the ECC logic. Write path Fault injection modifies the actual data prior to them being written into the target Flash and will cause an EEC error on a subsequent Flash read. The following procedure is used to inject a Fault:

  1. Load Flash target address into the ECCADDR register.
  2. Select the first Fault bit determined by FLT1PTRx (ECCCONH[7:0]). The target bit is inverted to create the Fault.
  3. If a double Fault is desired, select the second Fault bit determined by FLT2PTRx (ECCCONH[15:8]); otherwise, set to all ‘1’s.
  4. Write the NVMKEY unlock sequence.
  5. Enable the ECC Fault injection logic by setting the FLTINJ bit (ECCCONL[0]).
  6. Perform a read or write to the Flash target address.