S32 SDK

Detailed Description

Error Reporting Module Hardware Abstraction Layer.

This section describes the programming interface of the ERM HAL.

Macros

#define ERM_CHANNELS_OFFSET_SIZE   (4U)
 The distance between channels. More...
 
#define ERM_NCE_START   (30U)
 Start bit of non correctable error. More...
 
#define ERM_SBC_START   (31U)
 Start bit of single bit correction. More...
 

Enumerations

enum  erm_ecc_event_t { ERM_EVENT_NONE = 0U, ERM_EVENT_SINGLE_BIT = 1U, ERM_EVENT_NON_CORRECTABLE = 2U }
 ERM types of ECC events Implements : erm_ecc_event_t_Class. More...
 

ERM HAL API

void ERM_HAL_Init (ERM_Type *const base)
 Initializes the ERM module. More...
 
static void ERM_HAL_EnableEventInterrupt (ERM_Type *const base, uint8_t channel, erm_ecc_event_t eccEvent, bool enable)
 Enables Memory n interrupt event. More...
 
static bool ERM_HAL_IsEventInterruptEnabled (const ERM_Type *const base, uint8_t channel, erm_ecc_event_t eccEvent)
 Checks if the Memory n interrupt event is enabled. More...
 
static bool ERM_HAL_IsEventDetected (const ERM_Type *const base, uint8_t channel, erm_ecc_event_t eccEvent)
 Checks if the Memory n error event is detected. More...
 
static void ERM_HAL_ClearEvent (ERM_Type *const base, uint8_t channel, erm_ecc_event_t eccEvent)
 Clears error event and the corresponding interrupt notification. More...
 
static uint32_t ERM_HAL_GetLastErrorAddress (const ERM_Type *const base, uint8_t channel)
 Gets the address of the last ECC event in Memory n. More...
 
erm_ecc_event_t ERM_HAL_GetErrorDetail (const ERM_Type *const base, uint8_t channel, uint32_t *addressPtr)
 Gets the address of the last ECC event in Memory n and ECC event. More...
 

Macro Definition Documentation

#define ERM_CHANNELS_OFFSET_SIZE   (4U)

The distance between channels.

Definition at line 39 of file erm_hal.h.

#define ERM_NCE_START   (30U)

Start bit of non correctable error.

Definition at line 41 of file erm_hal.h.

#define ERM_SBC_START   (31U)

Start bit of single bit correction.

Definition at line 43 of file erm_hal.h.

Enumeration Type Documentation

ERM types of ECC events Implements : erm_ecc_event_t_Class.

Enumerator
ERM_EVENT_NONE 

None events

ERM_EVENT_SINGLE_BIT 

Single-bit correction ECC events

ERM_EVENT_NON_CORRECTABLE 

Non-correctable ECC events

Definition at line 49 of file erm_hal.h.

Function Documentation

static void ERM_HAL_ClearEvent ( ERM_Type *const  base,
uint8_t  channel,
erm_ecc_event_t  eccEvent 
)
inlinestatic

Clears error event and the corresponding interrupt notification.

This function clears error event and the corresponding interrupt notification

Parameters
[in]baseThe ERM peripheral base address
[in]channelThe configured memory channel
[in]eccEventThe examined event Implements : ERM_HAL_ClearEvent_Activity

Definition at line 217 of file erm_hal.h.

static void ERM_HAL_EnableEventInterrupt ( ERM_Type *const  base,
uint8_t  channel,
erm_ecc_event_t  eccEvent,
bool  enable 
)
inlinestatic

Enables Memory n interrupt event.

This function enables Memory n interrupt event

Parameters
[in]baseThe ERM peripheral base address
[in]channelThe configured memory channel
[in]eccEventThe configured event
[in]enableEnable interrupt event
  • true: Interrupt event is enabled
  • false: Interrupt event is disabled Implements : ERM_HAL_EnableEventInterrupt_Activity

Definition at line 93 of file erm_hal.h.

erm_ecc_event_t ERM_HAL_GetErrorDetail ( const ERM_Type *const  base,
uint8_t  channel,
uint32_t *  addressPtr 
)

Gets the address of the last ECC event in Memory n and ECC event.

This function gets the address of the last ECC event in Memory n and ECC event

Parameters
[in]baseThe ERM peripheral base address
[in]channelThe examined memory channel
[out]addressPtrThe pointer to address of the last ECC event in Memory n with ECC event
Returns
The last occurred ECC event

Definition at line 59 of file erm_hal.c.

static uint32_t ERM_HAL_GetLastErrorAddress ( const ERM_Type *const  base,
uint8_t  channel 
)
inlinestatic

Gets the address of the last ECC event in Memory n.

This function gets the address of the last ECC event in Memory n

Parameters
[in]baseThe ERM peripheral base address
[in]channelThe examined memory channel
Returns
Address of the last ECC event Implements : ERM_HAL_GetLastErrorAddress_Activity

Definition at line 253 of file erm_hal.h.

void ERM_HAL_Init ( ERM_Type *const  base)

Initializes the ERM module.

This function initializes the module to default configuration, the configuration register is initialized with interrupt notification disabled for all channels and the status register events are cleared

Parameters
[in]baseThe ERM peripheral base address

Definition at line 44 of file erm_hal.c.

static bool ERM_HAL_IsEventDetected ( const ERM_Type *const  base,
uint8_t  channel,
erm_ecc_event_t  eccEvent 
)
inlinestatic

Checks if the Memory n error event is detected.

This function checks if the Memory n error event is detected

Parameters
[in]baseThe ERM peripheral base address
[in]channelThe examined memory channel
[in]eccEventThe examined event
Returns
The status of Memory n error event
  • true: Error event on Memory n detected
  • false: No error event on Memory n detected Implements : ERM_HAL_IsEventDetected_Activity

Definition at line 183 of file erm_hal.h.

static bool ERM_HAL_IsEventInterruptEnabled ( const ERM_Type *const  base,
uint8_t  channel,
erm_ecc_event_t  eccEvent 
)
inlinestatic

Checks if the Memory n interrupt event is enabled.

This function checks if the Memory n interrupt event is enabled

Parameters
[in]baseThe ERM peripheral base address
[in]channelThe examined memory channel
[in]eccEventThe examined event
Returns
Interrupt event
  • true: Interrupt event is enabled
  • false: Interrupt event is disabled Implements : ERM_HAL_IsEventInterruptEnabled_Activity

Definition at line 146 of file erm_hal.h.