The MCUXpresso SDK provides a driver for the ERM module of MCUXpresso SDK devices.
The Error Reporting Module (ERM) provides information and optional interrupt notification on memory error events associated with ECC and parity. The ERM collects error events on memory accesses for memory arrays, such as flash memory, system RAM, or peripheral RAMs. ERM supports various channels for memory sources where each ERM channel is associated with a different memory module.
This example code shows how to show error events using the ERM driver.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/erm
|
void | ERM_Init (ERM_Type *base) |
| ERM module initialization function. More...
|
|
void | ERM_Deinit (ERM_Type *base) |
| De-initializes the ERM.
|
|
|
uint32_t | ERM_GetMemoryErrorAddr (ERM_Type *base, erm_memory_channel_t channel) |
| ERM get memory error absolute address, which capturing the address of the last ECC event in Memory n. More...
|
|
uint32_t | ERM_GetSyndrome (ERM_Type *base, erm_memory_channel_t channel) |
| ERM get syndrome, which identifies the pertinent bit position on a correctable, single-bit data inversion or a non-correctable, single-bit address inversion. More...
|
|
uint32_t | ERM_GetErrorCount (ERM_Type *base, erm_memory_channel_t channel) |
| ERM get error count, which records the count value of the number of correctable ECC error events for Memory n. More...
|
|
void | ERM_ResetErrorCount (ERM_Type *base, erm_memory_channel_t channel) |
| ERM reset error count. More...
|
|
This structure contains the settings for all of the ERM interrupt configurations.
Enumerator |
---|
kERM_SingleCorrectionIntEnable |
Single Correction Interrupt Notification enable.
|
kERM_NonCorrectableIntEnable |
Non-Correction Interrupt Notification enable.
|
kERM_AllInterruptsEnable |
All Interrupts enable.
|
This provides constants for the ERM event status for use in the ERM functions.
Enumerator |
---|
kERM_SingleBitCorrectionIntFlag |
Single-Bit Correction Event.
|
kERM_NonCorrectableErrorIntFlag |
Non-Correctable Error Event.
|
kERM_AllIntsFlag |
All Events.
|
void ERM_Init |
( |
ERM_Type * |
base | ) |
|
static void ERM_EnableInterrupts |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | ERM peripheral base address. |
channel | memory channel. |
mask | single correction interrupt or non-correction interrupt enable to disable for one specific memory region. Refer to "_erm_interrupt_enable" enumeration. |
static void ERM_DisableInterrupts |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | ERM base address. |
channel | memory channel. |
mask | single correction interrupt or non-correction interrupt enable to disable for one specific memory region. Refer to "_erm_interrupt_enable" enumeration. |
static uint32_t ERM_GetInterruptStatus |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | ERM peripheral base address. |
- Returns
- ERM event flags.
static void ERM_ClearInterruptStatus |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | ERM base address. |
mask | event flag to clear. Refer to "_erm_interrupt_flag" enumeration. |
uint32_t ERM_GetMemoryErrorAddr |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel |
|
) |
| |
- Parameters
-
base | ERM base address. |
channel | memory channel. |
- Return values
-
memory | error absolute address. |
uint32_t ERM_GetSyndrome |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel |
|
) |
| |
The syndrome value does not provide any additional diagnostic information on non-correctable, multi-bit inversions.
- Parameters
-
base | ERM base address. |
channel | memory channel. |
- Return values
-
uint32_t ERM_GetErrorCount |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel |
|
) |
| |
Non-correctable errors are considered a serious fault, so the ERM does not provide any mechanism to count non-correctable errors. Only correctable errors are counted.
- Parameters
-
base | ERM base address. |
channel | memory channel. |
- Return values
-
void ERM_ResetErrorCount |
( |
ERM_Type * |
base, |
|
|
erm_memory_channel_t |
channel |
|
) |
| |
- Parameters
-
base | ERM base address. |
channel | memory channel. |