MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ERM: error recording module

Overview

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

Enumerations

enum  {
  kERM_SingleCorrectionIntEnable = 0x08U,
  kERM_NonCorrectableIntEnable = 0x04U,
  kERM_AllInterruptsEnable = 0xFFFFFFFFUL
}
 ERM interrupt configuration structure, default settings all disabled, _erm_interrupt_enable. More...
 
enum  {
  kERM_SingleBitCorrectionIntFlag = 0x08U,
  kERM_NonCorrectableErrorIntFlag = 0x04U,
  kERM_AllIntsFlag = 0xFFFFFFFFUL
}
 ERM interrupt status, _erm_interrupt_flag. More...
 

Driver version

#define FSL_ERM_DRIVER_VERSION   (MAKE_VERSION(2U, 0U, 1U))
 Driver version. More...
 

Initialization and de-initialization

void ERM_Init (ERM_Type *base)
 ERM module initialization function. More...
 
void ERM_Deinit (ERM_Type *base)
 De-initializes the ERM.
 

Interrupt

static void ERM_EnableInterrupts (ERM_Type *base, erm_memory_channel_t channel, uint32_t mask)
 ERM enable interrupts. More...
 
static void ERM_DisableInterrupts (ERM_Type *base, erm_memory_channel_t channel, uint32_t mask)
 ERM module disable interrupts. More...
 
static uint32_t ERM_GetInterruptStatus (ERM_Type *base, erm_memory_channel_t channel)
 Gets ERM interrupt flags. More...
 
static void ERM_ClearInterruptStatus (ERM_Type *base, erm_memory_channel_t channel, uint32_t mask)
 ERM module clear interrupt status flag. More...
 

functional

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...
 

Macro Definition Documentation

#define FSL_ERM_DRIVER_VERSION   (MAKE_VERSION(2U, 0U, 1U))

Enumeration Type Documentation

anonymous enum

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.

anonymous enum

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.

Function Documentation

void ERM_Init ( ERM_Type *  base)
Parameters
baseERM base address.
static void ERM_EnableInterrupts ( ERM_Type *  base,
erm_memory_channel_t  channel,
uint32_t  mask 
)
inlinestatic
Parameters
baseERM peripheral base address.
channelmemory channel.
masksingle 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
baseERM base address.
channelmemory channel.
masksingle 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
baseERM peripheral base address.
Returns
ERM event flags.
static void ERM_ClearInterruptStatus ( ERM_Type *  base,
erm_memory_channel_t  channel,
uint32_t  mask 
)
inlinestatic
Parameters
baseERM base address.
maskevent flag to clear. Refer to "_erm_interrupt_flag" enumeration.
uint32_t ERM_GetMemoryErrorAddr ( ERM_Type *  base,
erm_memory_channel_t  channel 
)
Parameters
baseERM base address.
channelmemory channel.
Return values
memoryerror 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
baseERM base address.
channelmemory channel.
Return values
syndromevalue.
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
baseERM base address.
channelmemory channel.
Return values
errorcount.
void ERM_ResetErrorCount ( ERM_Type *  base,
erm_memory_channel_t  channel 
)
Parameters
baseERM base address.
channelmemory channel.