RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures
Mecc

Data Structures

struct  _mecc_config
 MECC user configuration. More...
 
struct  _mecc_single_error_info
 MECC ocram single error information, including single error address, ECC code, error data and error bit position. More...
 
struct  _mecc_multi_error_info
 MECC ocram multiple error information, including multiple error address, ECC code, error data. More...
 

Driver version

enum  { kStatus_MECC_BankMiss = MAKE_STATUS(kStatusGroup_MECC, 0) }
 Error codes for the MECC driver. More...
 
enum  {
  kMECC_SingleError0InterruptEnable , kMECC_SingleError1InterruptEnable , kMECC_SingleError2InterruptEnable , kMECC_SingleError3InterruptEnable ,
  kMECC_MultiError0InterruptEnable , kMECC_MultiError1InterruptEnable , kMECC_MultiError2InterruptEnable , kMECC_MultiError3InterruptEnable ,
  kMECC_StrobeError0InterruptEnable , kMECC_StrobeError1InterruptEnable , kMECC_StrobeError2InterruptEnable , kMECC_StrobeError3InterruptEnable ,
  kMECC_AccessError0InterruptEnable , kMECC_AccessError1InterruptEnable , kMECC_AccessError2InterruptEnable , kMECC_AccessError3InterruptEnable ,
  kMECC_AllInterruptsEnable = 0xFFFF
}
 MECC interrupt configuration structure, default settings all disabled. More...
 
enum  {
  kMECC_SingleError0InterruptStatusEnable , kMECC_SingleError1InterruptStatusEnable , kMECC_SingleError2InterruptStatusEnable , kMECC_SingleError3InterruptStatusEnable ,
  kMECC_MultiError0InterruptStatusEnable , kMECC_MultiError1InterruptStatusEnable , kMECC_MultiError2InterruptStatusEnable , kMECC_MultiError3InterruptStatusEnable ,
  kMECC_StrobeError0InterruptStatusEnable , kMECC_StrobeError1InterruptStatusEnable , kMECC_StrobeError2InterruptStatusEnable , kMECC_StrobeError3InterruptStatusEnable ,
  kMECC_AccessError0InterruptStatusEnable , kMECC_AccessError1InterruptStatusEnable , kMECC_AccessError2InterruptStatusEnable , kMECC_AccessError3InterruptStatusEnable ,
  kMECC_AllInterruptsStatusEnable = 0xFFFF
}
 MECC interrupt status configuration structure, default settings all disabled. More...
 
enum  {
  kMECC_SingleError0InterruptFlag , kMECC_SingleError1InterruptFlag , kMECC_SingleError2InterruptFlag , kMECC_SingleError3InterruptFlag ,
  kMECC_MultiError0InterruptFlag , kMECC_MultiError1InterruptFlag , kMECC_MultiError2InterruptFlag , kMECC_MultiError3InterruptFlag ,
  kMECC_StrobeError0InterruptFlag , kMECC_StrobeError1InterruptFlag , kMECC_StrobeError2InterruptFlag , kMECC_StrobeError3InterruptFlag ,
  kMECC_AccessError0InterruptFlag = MECC_ERR_STATUS_ADDR_ERR0_MASK , kMECC_AccessError1InterruptFlag = MECC_ERR_STATUS_ADDR_ERR1_MASK , kMECC_AccessError2InterruptFlag = MECC_ERR_STATUS_ADDR_ERR2_MASK , kMECC_AccessError3InterruptFlag = MECC_ERR_STATUS_ADDR_ERR3_MASK ,
  kMECC_AllInterruptsFlag = 0xFFFF
}
 MECC status flags. More...
 
enum  { kMECC_OcramBank0 = 0U , kMECC_OcramBank1 = 1U , kMECC_OcramBank2 = 2U , kMECC_OcramBank3 = 3U }
 MECC ocram bank number. More...
 
enum  { kMECC_Instance0 = 0U , kMECC_Instance1 = 1U }
 MECC instance. More...
 
typedef struct _mecc_config mecc_config_t
 MECC user configuration.
 
typedef struct _mecc_single_error_info mecc_single_error_info_t
 MECC ocram single error information, including single error address, ECC code, error data and error bit position.
 
typedef struct _mecc_multi_error_info mecc_multi_error_info_t
 MECC ocram multiple error information, including multiple error address, ECC code, error data.
 
#define FSL_MECC_DRIVER_VERSION   (MAKE_VERSION(2U, 0U, 2U))
 Driver version 2.0.2.
 

Initialization and deinitialization

void MECC_Init (MECC_Type *base, mecc_config_t *config)
 MECC module initialization function.
 
void MECC_Deinit (MECC_Type *base)
 Deinitializes the MECC.
 
void MECC_GetDefaultConfig (mecc_config_t *config)
 Sets the MECC configuration structure to default values.
 

functional

status_t MECC_ErrorInjection (MECC_Type *base, uint32_t lowerrordata, uint32_t higherrordata, uint8_t eccdata, uint8_t banknumber)
 MECC module error injection.
 
status_t MECC_GetSingleErrorInfo (MECC_Type *base, mecc_single_error_info_t *info, uint8_t banknumber)
 MECC module get single error information.
 
status_t MECC_GetMultiErrorInfo (MECC_Type *base, mecc_multi_error_info_t *info, uint8_t banknumber)
 MECC module get multiple error information.
 

Detailed Description

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Error codes for the MECC driver.

Enumerator
kStatus_MECC_BankMiss 

Ocram bank miss

◆ anonymous enum

anonymous enum

MECC interrupt configuration structure, default settings all disabled.

This structure contains the settings for all of the MECC interrupt configurations.

Enumerator
kMECC_SingleError0InterruptEnable 

Single Bit Error On Ocram Bank0 interrupt enable.

kMECC_SingleError1InterruptEnable 

Single Bit Error On Ocram Bank1 interrupt enable

kMECC_SingleError2InterruptEnable 

Single Bit Error On Ocram Bank2 interrupt enable

kMECC_SingleError3InterruptEnable 

Single Bit Error On Ocram Bank3 interrupt enable

kMECC_MultiError0InterruptEnable 

Multiple Bits Error On Ocram Bank0 interrupt enable

kMECC_MultiError1InterruptEnable 

Multiple Bits Error On Ocram Bank1 interrupt enable

kMECC_MultiError2InterruptEnable 

Multiple Bits Error On Ocram Bank2 interrupt enable

kMECC_MultiError3InterruptEnable 

Multiple Bits Error On Ocram Bank3 interrupt enable

kMECC_StrobeError0InterruptEnable 

AXI Strobe Error On Ocram Bank0 interrupt enable

kMECC_StrobeError1InterruptEnable 

AXI Strobe Error On Ocram Bank1 interrupt enable

kMECC_StrobeError2InterruptEnable 

AXI Strobe Error On Ocram Bank2 interrupt enable

kMECC_StrobeError3InterruptEnable 

AXI Strobe Error On Ocram Bank3 interrupt enable

kMECC_AccessError0InterruptEnable 

Ocram Access Error On Bank0 interrupt enable

kMECC_AccessError1InterruptEnable 

Ocram Access Error On Bank1 interrupt enable

kMECC_AccessError2InterruptEnable 

Ocram Access Error On Bank2 interrupt enable

kMECC_AccessError3InterruptEnable 

Ocram Access Error On Bank3 interrupt enable

kMECC_AllInterruptsEnable 

all interrupts enable

◆ anonymous enum

anonymous enum

MECC interrupt status configuration structure, default settings all disabled.

This structure contains the settings for all of the MECC interrupt status configurations.

Enumerator
kMECC_SingleError0InterruptStatusEnable 

Single Bit Error On Ocram Bank0 interrupt status enable.

kMECC_SingleError1InterruptStatusEnable 

Single Bit Error On Ocram Bank1 interrupt status enable

kMECC_SingleError2InterruptStatusEnable 

Single Bit Error On Ocram Bank2 interrupt status enable

kMECC_SingleError3InterruptStatusEnable 

Single Bit Error On Ocram Bank3 interrupt status enable

kMECC_MultiError0InterruptStatusEnable 

Multiple Bits Error On Ocram Bank0 interrupt status enable

kMECC_MultiError1InterruptStatusEnable 

Multiple Bits Error On Ocram Bank1 interrupt status enable

kMECC_MultiError2InterruptStatusEnable 

Multiple Bits Error On Ocram Bank2 interrupt status enable

kMECC_MultiError3InterruptStatusEnable 

Multiple Bits Error On Ocram Bank3 interrupt status enable

kMECC_StrobeError0InterruptStatusEnable 

AXI Strobe Error On Ocram Bank0 interrupt status enable

kMECC_StrobeError1InterruptStatusEnable 

AXI Strobe Error On Ocram Bank1 interrupt status enable

kMECC_StrobeError2InterruptStatusEnable 

AXI Strobe Error On Ocram Bank2 interrupt status enable

kMECC_StrobeError3InterruptStatusEnable 

AXI Strobe Error On Ocram Bank3 interrupt status enable

kMECC_AccessError0InterruptStatusEnable 

Ocram Access Error On Bank0 interrupt status enable

kMECC_AccessError1InterruptStatusEnable 

Ocram Access Error On Bank1 interrupt status enable

kMECC_AccessError2InterruptStatusEnable 

Ocram Access Error On Bank2 interrupt status enable

kMECC_AccessError3InterruptStatusEnable 

Ocram Access Error On Bank3 interrupt status enable

kMECC_AllInterruptsStatusEnable 

all interrupts enable

◆ anonymous enum

anonymous enum

MECC status flags.

This provides constants for the MECC status flags for use in the MECC functions.

Enumerator
kMECC_SingleError0InterruptFlag 

Single Bit Error On Ocram Bank0 interrupt flag

kMECC_SingleError1InterruptFlag 

Single Bit Error On Ocram Bank1 interrupt flag

kMECC_SingleError2InterruptFlag 

Single Bit Error On Ocram Bank2 interrupt flag

kMECC_SingleError3InterruptFlag 

Single Bit Error On Ocram Bank3 interrupt flag

kMECC_MultiError0InterruptFlag 

Multiple Bits Error On Ocram Bank0 interrupt flag

kMECC_MultiError1InterruptFlag 

Multiple Bits Error On Ocram Bank1 interrupt flag

kMECC_MultiError2InterruptFlag 

Multiple Bits Error On Ocram Bank2 interrupt flag

kMECC_MultiError3InterruptFlag 

Multiple Bits Error On Ocram Bank3 interrupt flag

kMECC_StrobeError0InterruptFlag 

AXI Strobe Error On Ocram Bank0 interrupt flag

kMECC_StrobeError1InterruptFlag 

AXI Strobe Error On Ocram Bank1 interrupt flag

kMECC_StrobeError2InterruptFlag 

AXI Strobe Error On Ocram Bank2 interrupt flag

kMECC_StrobeError3InterruptFlag 

AXI Strobe Error On Ocram Bank3 interrupt flag

kMECC_AccessError0InterruptFlag 

Ocram Access Error On Bank0 interrupt flag

kMECC_AccessError1InterruptFlag 

Ocram Access Error On Bank1 interrupt flag

kMECC_AccessError2InterruptFlag 

Ocram Access Error On Bank2 interrupt flag

kMECC_AccessError3InterruptFlag 

Ocram Access Error On Bank3 interrupt flag

kMECC_AllInterruptsFlag 

all interrupts interrupt flag

◆ anonymous enum

anonymous enum

MECC ocram bank number.

Enumerator
kMECC_OcramBank0 

ocram bank number 0: ocram_base_address+0x20*i

kMECC_OcramBank1 

ocram bank number 1: ocram_base_address+0x20*i+0x8

kMECC_OcramBank2 

ocram bank number 2: ocram_base_address+0x20*i+0x10

kMECC_OcramBank3 

ocram bank number 3: ocram_base_address+0x20*i+0x18

◆ anonymous enum

anonymous enum

MECC instance.

Enumerator
kMECC_Instance0 

Peripheral MECC1 base

kMECC_Instance1 

Peripheral MECC2 base

Function Documentation

◆ MECC_Deinit()

void MECC_Deinit ( MECC_Type base)

Deinitializes the MECC.

Parameters
baseMECC base address.

brief Deinitializes the MECC.

◆ MECC_ErrorInjection()

status_t MECC_ErrorInjection ( MECC_Type base,
uint32_t  lowerrordata,
uint32_t  higherrordata,
uint8_t  eccdata,
uint8_t  banknumber 
)

MECC module error injection.

Parameters
baseMECC base address.
lowerrordatalow 32 bits data.
higherrordatahigh 32 bits data.
eccdataecc code.
banknumberocram bank number.
Return values
kStatus_Success.

Bank0: ocram_base_address+0x20*i Bank1: ocram_base_address+0x20*i+0x8 Bank2: ocram_base_address+0x20*i+0x10 Bank3: ocram_base_address+0x20*i+0x18 i = 0,1,2,3,4.....

◆ MECC_GetDefaultConfig()

void MECC_GetDefaultConfig ( mecc_config_t config)

Sets the MECC configuration structure to default values.

Parameters
configpointer to the MECC configuration structure.

◆ MECC_GetMultiErrorInfo()

status_t MECC_GetMultiErrorInfo ( MECC_Type base,
mecc_multi_error_info_t info,
uint8_t  banknumber 
)

MECC module get multiple error information.

Parameters
baseMECC base address.
infomultiple error information.
banknumberocram bank number.
Return values
kStatus_Success.
kStatus_MECC_BankMiss.

Bank0: ocram_base_address+0x20*i Bank1: ocram_base_address+0x20*i+0x8 Bank2: ocram_base_address+0x20*i+0x10 Bank3: ocram_base_address+0x20*i+0x18 i = 0,1,2,3,4.....

◆ MECC_GetSingleErrorInfo()

status_t MECC_GetSingleErrorInfo ( MECC_Type base,
mecc_single_error_info_t info,
uint8_t  banknumber 
)

MECC module get single error information.

Parameters
baseMECC base address.
infosingle error information.
banknumberocram bank number.
Return values
kStatus_Success.
kStatus_MECC_BankMiss.

Bank0: ocram_base_address+0x20*i Bank1: ocram_base_address+0x20*i+0x8 Bank2: ocram_base_address+0x20*i+0x10 Bank3: ocram_base_address+0x20*i+0x18 i = 0,1,2,3,4.....

◆ MECC_Init()

void MECC_Init ( MECC_Type base,
mecc_config_t config 
)

MECC module initialization function.

Parameters
baseMECC base address.
configpointer to the MECC configuration structure.

brief MECC module initialization function.

param base MECC base address.