S32 SDK

Detailed Description

Error Reporting Module Peripheral Driver.

This section describes the programming interface of the ERM driver.

Data Structures

struct  erm_interrupt_config_t
 ERM interrupt notification configuration structure Implements : erm_interrupt_config_t_Class. More...
 
struct  erm_user_config_t
 ERM user configuration structure Implements : erm_user_config_t_Class. More...
 

Variables

ERM_Type *const g_ermBase [ERM_INSTANCE_COUNT]
 Table of base addresses for ERM instances. More...
 

ERM DRIVER API

void ERM_DRV_Init (uint32_t instance, uint8_t channelCnt, const erm_user_config_t *userConfigArr)
 Initializes the ERM module. More...
 
void ERM_DRV_Deinit (uint32_t instance)
 Sets the default configuration. More...
 
void ERM_DRV_SetInterruptConfig (uint32_t instance, uint8_t channel, erm_interrupt_config_t interruptCfg)
 Sets interrupt notification. More...
 
void ERM_DRV_GetInterruptConfig (uint32_t instance, uint8_t channel, erm_interrupt_config_t *const interruptPtr)
 Gets interrupt notification. More...
 
void ERM_DRV_ClearEvent (uint32_t instance, uint8_t channel, erm_ecc_event_t eccEvent)
 Clears error event and the corresponding interrupt notification. More...
 
erm_ecc_event_t ERM_DRV_GetErrorDetail (uint32_t instance, uint8_t channel, uint32_t *addressPtr)
 Gets the address of the last ECC event in Memory n and ECC event. More...
 

Function Documentation

void ERM_DRV_ClearEvent ( uint32_t  instance,
uint8_t  channel,
erm_ecc_event_t  eccEvent 
)

Clears error event and the corresponding interrupt notification.

This function clears the record of an event. If the corresponding interrupt is enabled, the interrupt notification will be cleared

Parameters
[in]instanceThe ERM instance number
[in]channelThe configured memory channel
[in]eccEventThe types of ECC events

Definition at line 144 of file erm_driver.c.

void ERM_DRV_Deinit ( uint32_t  instance)

Sets the default configuration.

This function sets the default configuration

Parameters
[in]instanceThe ERM instance number

Definition at line 84 of file erm_driver.c.

erm_ecc_event_t ERM_DRV_GetErrorDetail ( uint32_t  instance,
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 the types of the event

Parameters
[in]instanceThe ERM instance number
[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 164 of file erm_driver.c.

void ERM_DRV_GetInterruptConfig ( uint32_t  instance,
uint8_t  channel,
erm_interrupt_config_t *const  interruptPtr 
)

Gets interrupt notification.

This function gets the current interrupt configuration of the available events (which interrupts are enabled/disabled)

Parameters
[in]instanceThe ERM instance number
[in]channelThe examined memory channel
[out]interruptPtrThe pointer to the ERM interrupt configuration structure

Definition at line 122 of file erm_driver.c.

void ERM_DRV_Init ( uint32_t  instance,
uint8_t  channelCnt,
const erm_user_config_t userConfigArr 
)

Initializes the ERM module.

This function initializes ERM driver based on user configuration input, channelCnt takes values between 1 and the maximum channel count supported by the hardware

Parameters
[in]instanceThe ERM instance number
[in]channelCntThe number of channels
[in]userConfigArrThe pointer to the array of ERM user configure structure

Definition at line 56 of file erm_driver.c.

void ERM_DRV_SetInterruptConfig ( uint32_t  instance,
uint8_t  channel,
erm_interrupt_config_t  interruptCfg 
)

Sets interrupt notification.

This function sets interrupt notification based on interrupt notification configuration input

Parameters
[in]instanceThe ERM instance number
[in]channelThe configured memory channel
[in]interruptCfgThe ERM interrupt configuration structure

Definition at line 101 of file erm_driver.c.

Variable Documentation

ERM_Type* const g_ermBase[ERM_INSTANCE_COUNT]

Table of base addresses for ERM instances.

Definition at line 43 of file erm_driver.c.