7.3.3.1.1 Performing Fault Injection
The following sequence should be followed to inject Faults:
- Load Flash target address into ECCFADDR register.
- Select first Fault bit determined by ECCCON.FLT1PTR [7:0]. The target bit is inverted to create the Fault.
- If a double Fault is desired, select the second Fault bit determined by ECCCON.FLT2PTR [7:0], otherwise set ECCCON.FLT2PTR [7:0] = 8’hFF.
- Perform a read of the Flash target address.
The ECCSTAT is updated whenever a read occurs and the read address matches ECCFADDR. The expected usage of a data read Fault injection is to attempt to read a predefined data set with known good ECC and inject an error immediately prior to the ECC evaluation, thereby testing the response of the ECC block under different data stimuli.
Note: It is recommended to invalidate the data read buffer (clear the
DRBV bit) before an ECC Fault injection to clear the stale data and to force a new
read.