****************************************************************************************************
* Detailed Description:
* This code demonstrates how to inject an ECC (Error Correction Code) fault into either DTCM0
* (Data Tightly Coupled Memory) or SRAM0 using the EIM (ECC Injection Module).
*
* When the processor reads corrupted data from DTCM0 or SRAM0, an ECC error is detected, resulting in:
* - A Bus Fault exception raised by the core.
* - An error report generated by the ERM (Error Reporting Module), which can also trigger an interrupt.
*
* By default, the ERM interrupt has a lower priority than the Bus Fault exception. In this example,
* the Bus Fault exception priority is intentionally lowered so that the ERM interrupt is serviced first.
* This ensures the system can respond to the ERM interrupt before the core's Bus Fault handler executes.
*
* IMPORTANT: The interrupt vector table must not reside in SRAM0 or DTCM0 when injecting an
* uncorrectable ECC fault into these memories. Otherwise, the ECC fault would corrupt the vector
* table during a fetch, leading to unpredictable behavior.
* Always check the VTOR (Vector Table Offset Register)
* to confirm the vector table location before performing ECC fault injection.
*
* Memory Selection:
* You can select which memory to inject the ECC fault into using the following macros:
* #define SRAM0
* #define DTCM0
***************************************************************************************************
* ------------------------------------------------------------------------------------------------*
* Test HW: S32K3X4EVB_Q257
* MCU: S32K344, 0P55A
* SDK: NA
* Debugger: Lauterbach Trace32
* Target: internal_FLASH
****************************************************************************************************