If errors occur due to a fault injection or other reasons, an interrupt is generated. The OCM. APB_MISC_ISR register provides the interrupt status and the cause of the error. This is a sticky register that holds the value of the interrupt until cleared by a value of 1. Read bits 6 and 7 of the status register for information on whether the error is correctable or uncorrectable.
Read Correctable Error Registers
- Retrieve the address of the first occurrence of an access with a corrected error. Read the 18-bit [ADDR] bit field in the CE_FFA register.
- Retrieve ECC syndrome bits of corrected error. Read CE_FFE [SYNDROME] bit field.
- Retrieve corrected data. Read the four data words using the ocm_csr.OCM_CE_FFD0, 1, 2, and:3registers.
Read Uncorrectable Error Registers
- Retrieve the address of the first occurrence of an access with an uncorrected error. Read the 18-bit [ADDR] bit field in the UE_FFA register.
- Retrieve ECC syndrome bits of uncorrected error. Read UE_FFE [SYNDROME] bit field.
- Retrieve uncorrected data. Read the four data words using the UE_FFD0 , 1, 2 and 3 registers.
Errors can be injected into a RAM array.
- Enable error response by setting the third bit of the ERR_CTRL register.
- Enable ECC by setting the zeroth bit of the ECC_CTRL register.
- To only detect single bit errors, set the first bit of the ECC_CTRL register. By default this bit is zero and it indicates that single-bit errors are corrected.
- To inject an error on every write after fault injection count cycle, set the second bit of the ECC_CTRL register. If a zero is programmed for the same bit in the register, then only a single fault is injected.
- The fault injection count must be programmed by setting the required value in the first 24 bits of the FI_CNTR register.
- A fault can be injected into the syndrome bits using the FI_SY register. Faults in the data words can be injected using the FI_D0 , 1, 2, and 3 registers.
- Interrupts can be enabled for different errors by setting the required bits of the APB_MISC_IER register.
- Unwanted interrupts can be disabled by setting the required bits of the APB_MISC_IDR register.
- Reading the APB_MISC_IMR register gives information regarding the type of interrupts that are masked out. This is a read-only register and reflects the settings done on the IER and IDR registers.