5.4.6.2 Performing Fault Injection
The following sequence should be followed to inject Faults:
1. Load the data RAM target address into ECCFADDR register.
2. Select the first Fault bit determined by ECCFPTRbits.FLT1PTR[5:0]. The data RAM target bit is inverted to create the Fault.
3. If a double Fault is desired, select the second Fault bit determined by ECCFPTRbits.FLT2PTR[5:0], otherwise set ECCFPTR.FLT2PTR[5:0] = 6'h3F.
4. Perform a read of the data RAM target address.
The ECCSTAT is updated whenever a read occurs and the read address matches ECCFADDR. The read address is the relative address from the start address of the X or Y data spaces. The expected usage of 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.