Emulation and SIL3 Diagnostic Modes
261
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
F021 Flash Module Controller (FMC)
5.6.2.6
ECC Data Correction Diagnostic Test Mode: DIAG_MODE = 7
Testing the error correction and ECC logic in the CPU involves corrupting the ECC value returned to the
CPU. By inverting one or more bits of the ECC, the CPU will detect errors in a selected data or ECC bit, or
in any possible value returned by the ECC.
To set an error for a particular bit use the syndrome, see
. For example, if you want to
corrupt data bit 62 then put the value 70h into the test register.
The method uses the DATA_INV_PAR value in the FPAR_OVR register to alter the ECC during a slave
access cycle. The value in the DATA_INV_PAR register will be XORed with the current ECC to give a bad
ECC value to the CPU. This only will occur when the DIAG_MODE is 7, the PAR_OVR_KEY is 5, the
DIAG_EN_KEY in the FDIAGCTRL register is 5 and the access is a slave cycle.
This mode can set the FEDACSTATUS register status error bits B1_UNC_ERR or ERR_ZERO_FLG, but
it will not set the D_UNC_ERR nor D_COR_ERR bits. Also, the logic to support the ECCx_MAL_ERR and
COMx_MAL_GOOD bits is not implemented for the CPU path so these bits are not set.
The sequence to do this test is:
1. Make sure the true DMA module is off.
2. Put 5h in BUS_PAR_DIS and 5h in PAR_OVR_KEY fields (00005Axxh) of the FPAR_OVR register.
3. Put the desired value in DAT_INV_PAR field of the FPAR_OVR register.
4. Put 7h in DIAG_MODE and 5h in DIAG_EN_KEY fields of the FDIAGCTRL register.
5. Read desired address from the mirrored Flash location. Mirrored Flash starts at address 0x20000000.
6. Put 0 in DIAG_MODE or Ah in one of the key fields to turn off this test.
7. Check error registers (FCOR_ERR_ADD, FEDACSTATUS, and FUNC_ERR_ADD) for ECC errors.
8. Repeat as necessary to test out the ECC.
9. Put 0 in DIAG_MODE field of the FDIAGCTRL register and Ah in both of the key fields to completely
disable this test at the end of the test.
10. Put 2h in PAR_OVR_KEY field (00005400h) of the FPAR_OVR register to clear DAT_INV_PAR field.