User's configure the NMI ISR which are
output from ESM to do the following checks for errors passed on from Error
Aggregator to the ESM:
- Check the ESM Raw Status Register
- Error Group N Event Raw Status/Set Register to check which events caused the
error interrupt to trigger from ESM using the ESM Event Map.
- If the error trigger is caused
due to an error aggregator event mapped to ESM (Group 0 Events), then check the
corresponding error aggregator Instance Type register.
- For example: If the Error
Event 0 (ErrorAggregator_CPU1_HPERR) is detected from ESM in Step 1,
user configures ISR to check error aggregator registers -
CPU1_PR_ERROR_TYPE, CPU1_DR1_ERROR_TYPE, CPU1_DR2_ERROR_TYPE and
CPU1_DW_ERROR_TYPE to determine what type of error was detected and in
which instance of the error aggregator.
- From Step 2, when user knows the
error type, to narrow down the location of error user reads the corresponding
error address register and program counter register.
- For example: If user
finds out that the ILLEGAL_INSTRUCTION (Bit 10) in CPU1_PR_ERROR_TYPE is
set, then user reads the corresponding CPU1_PR_HIGHPRIO_ERROR_ADDRESS
register to find out the address at which the first high-priority error
occurred on CPU1_PR access.
- Also user reads
CPU1_PR_PC register that contains the program counter value at the first
high-priority error event.
- While exiting the ISR, if user
wants to clear the error when the source of the error is cleared - From Step 2,
user stores the value of the error type register then copies the value to the
error type clear register. If the source of the error still persists after the
error clear, then the error aggregator generates another error pulse trigger to
ESM.
- For example: From Step 3,
user stores the value from the CPU1_PR_ERROR_TYPE register and copies
the same value to the CPU1_PR_ERROR_TYPE_CLR register to clear the
CPU1_PR_ERROR_TYPE register.
Note: If user does not do step 4, the error aggregator does not
generate another error event input to ESM until corresponding priority error type
register is cleared.
When the application is not able to
clear the error before a NMIWD (High Priority Watchdog) timeout, then a reset is
triggered from ESMCPU1 instance (refer to Figure 7-8). In this case, BootROM clears errors to avoid a back-to-back NMIWD rest loop and
stores the error information and status to M0 RAM (refer to Table 4-35) for further debug.
In above case, BootROM clears the
following status:
- ESM Group0 RAW Status for
ESMCPU1 and SYSESM instances of ESM-Subsystem
- All CPUx error aggregator
type registers
Also saves the following in M0 RAM for
user to debug the source of error:
- ESM RAW Status for Group0
only
- Error Aggregator CPU1 - PR,
DR1/2, DW, and INT instances error information including high-priority error
address, low-priority error address, error type, and program counter
registers