Emulation and SIL3 Diagnostic Modes
351
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
F021 Level 2 Flash Module Controller (L2FMC)
7.7.2.1
Address Tag Register Test Mode: DIAGMODE = 5
There are six sets of address tag registers, two for Port A and four for Port B. Each set consists of a
primary and a duplicate address tag registers. Normally, these registers store the recently issued CPU
addresses during prefetch mode. To detect errors in these registers, the primary and duplicate address
tag registers are continuously compared to each other if the buffer is valid. If they are different, then an
address tag register error event is generated.
These registers are memory-mapped. All primary address tag registers are memory-mapped to one
address and, likewise, all duplicate tag registers are mapped to another single address. During diagnostic
mode, each individual set can be selected by the DIAG_BUF_SEL (Diagnostic Buffer Select) bit in the
FDIAGCTRL register. User-supplied values can be written into the selected set during a diagnostic mode.
This diagnostic mode uses the FRAW_ADDR register to supply the alternate address. When the
DIAG_TRIG bit is set, the FRAW_ADDR register value is compared with the primary and the duplicate
address tag registers. If the results of the comparison are different, then the ADD_TAG_ERR (Address
Tag Error) flag in the FEDAC_PxSTATUS register will be set. Also, refer to the device data manual for the
specific error channel that will be asserted in this situation.
The sequence to do this test would be:
1. Branch to a non-Flash region for executing this sequence. Ensure no requests from any bus master
are arriving at the port (A or B) that is being diagnosed.
2. Set DIAGMODE to 5h and DIAG_EN_KEY to 5h in the FDIAGCTRL register.
3. Select the appropriate buffer to be diagnosed using the DIAG_BUF_SEL bits in the FDIAGCTRL
register using the table in
.
4. Set the FRAW_ADDR register to a certain arbitrary value 'A'. The lowest 5 bits should be cleared to 0.
5. Set the FPRIM_ADD_TAG register and the FDUP_ADD_TAG register in such a way that one of them
equals 'A' and the other one does not. The lowest 5 bits in both these writes should be cleared to 0.
6. Set the DIAG_TRIG bit in the FDIAGCTRL register.
7. Now check the appropriate ADD_TAG_ERR flag in the FEDAC_PxSTATUS register based on the port
being diagnosed. Ensure that it is 1, implying successful operation of the compare logic.
8. Write 1 to the ADD_TAG_ERR bit to clear it.
9. Repeat for the different buffers.
10. At the end of the test, clear DIAGMODE bit to 0 and set DIAG_EN_KEY bits to Ah in the FDIAGCTRL
register to completely disable the test.
All address tags and buffer valid bits will be cleared to 0 when leaving diag_mode 5.
NOTE:
You should pre-load the registers with the test values with DIAG_TRIG = 0. After all test
values are written, the DIAG_TRIG should then be set high to validate the diagnostic result.