AM261x MCU+ SDK: ECC BUS SAFETY

| AM261x MCU+ SDK 26.00.00 |

ECC BUS SAFETY

# Features Supported

ECC BUS SAFETY module consists ECC Bus Safety Diagnostics.

- BUS Safety Errors : This includes SEC , DED and RED error injection on the specified node

  Note : SEC - Single Error Correction, DED - Double Error Correction, RED - Redundancy Error Correction

The module supports below API's for the application

- API to support and induce error on particular node bus.
- API to support interrupt configuration

Supported nodes

ECC Bus Safety

Note:

- CR5A_AXI_RD_SEC - Tested in r5fss0-0 core. Similarly CR5B, CR5C, CR5D can be tested in relevant core.
- L2_A, L2_B and L2_C - To be tested by disable cache memory.

## SysConfig Features

- None

## Features NOT Supported

- None

## Important Usage Guidelines

- None

## Example Usage

The following shows an example of SDL ECC BUS SAFETY API usage by the application for Error Injection Tests.

Include the below file to access the APIs

#include <sdl/sdl_ecc_bus_safety.h>

Induce the error SEC in Interrupt Method for MSS Nodes

ret_val = SDL_ECC_BUS_SAFETY_MSS_secExecute(busSftyNode,addr,writeData);
if(ret_val !=SDL_PASS )
{
ret_val = SDL_EFAIL;
}
else
{
if(((SDL_ECC_BUS_SAFETY_MSS_TPTC_A0_RD <= busSftyNode )&&(SDL_ECC_BUS_SAFETY_MSS_TPTC_B0_RD>=busSftyNode)) ||
(SDL_ECC_BUS_SAFETY_MSS_PCR == busSftyNode) || (SDL_ECC_BUS_SAFETY_MSS_PCR2 == busSftyNode ))
{
/* get EDMA parameter */
SDL_ECC_BUS_SAFETY_MSS_getEDMAParameters(busSftyNode,&dmaCh, &tcc, &param, &queNum, &edmaNum );
/* initiate the EDMA transfer */
test_edmaATransfer(busSftyNode,dmaCh,tcc,param,queNum,edmaNum );
}
else if (SDL_ECC_BUS_SAFETY_MSS_CPSW ==busSftyNode )
{
/* CPSW SetUP */
setup_CPSW();
/* CPSW Transfer */
cpsw_transfer();
}
else
{
/* do nothing */
}
/* wait for error notification from ESM, or for timeout */
/* fault injection gets deasserted in ISR */
while((mssSecFlag!=TRUE) && (timeout!=0U))
{
timeout--;
}
if(mssSecFlag==TRUE)
{
mssSecFlag=FALSE;
ret_val = SDL_PASS;
}
else
{
ret_val = SDL_EFAIL;
}
}

Induce the error DED in Interrupt Method for MSS Nodes

ret_val = SDL_ECC_BUS_SAFETY_MSS_dedExecute(busSftyNode,addr,writeData);
if(ret_val !=SDL_PASS )
{
ret_val = SDL_EFAIL;
}
else
{
if(((SDL_ECC_BUS_SAFETY_MSS_TPTC_A0_RD <= busSftyNode )&&(SDL_ECC_BUS_SAFETY_MSS_TPTC_B0_RD>=busSftyNode)) ||
(SDL_ECC_BUS_SAFETY_MSS_PCR == busSftyNode) || (SDL_ECC_BUS_SAFETY_MSS_PCR2 == busSftyNode ))
{
SDL_ECC_BUS_SAFETY_MSS_getEDMAParameters(busSftyNode,&dmaCh, &tcc, &param, &queNum, &edmaNum );
test_edmaATransfer(busSftyNode,dmaCh,tcc,param,queNum,edmaNum );
}
else if (SDL_ECC_BUS_SAFETY_MSS_CPSW ==busSftyNode )
{
/* CPSW SetUP */
setup_CPSW();
/* CPSW Transfer */
cpsw_transfer();
}
else
{
/* do nothing */
}
/* wait for error notification from ESM, or for timeout */
/* fault injection gets deasserted in ISR */
while((SDL_MSS_intrFlg[busSftyNode]!=TRUE) && (timeout!=0U))
{
timeout--;
}
if(SDL_MSS_intrFlg[busSftyNode]==TRUE)
{
SDL_MSS_intrFlg[busSftyNode]=FALSE;
ret_val = SDL_PASS;
}
else
{
ret_val = SDL_EFAIL;
}
}

Induce the error RED in Interrupt Method for MSS Nodes

int32_t ret_val = SDL_EFAIL;
uint32_t timeout = SDL_ECC_BUS_SAFETY_TIMEOUT;
ret_val= SDL_ECC_BUS_SAFETY_MSS_redExecute(busSftyNode, fiType, redType);
if(ret_val !=SDL_PASS )
{
ret_val = SDL_EFAIL;
}
else
{
/* wait for error notification from ESM, or for timeout */
/* fault injection gets deasserted in ISR */
while((SDL_MSS_intrFlg[busSftyNode]!=TRUE) && (timeout!=0U))
{
timeout--;
}
if(SDL_MSS_intrFlg[busSftyNode]==TRUE)
{
SDL_MSS_intrFlg[busSftyNode]=FALSE;
ret_val = SDL_PASS;
}
else
{
ret_val = SDL_EFAIL;
}
}

Induce the error SEC in Polling Method for DSS Nodes

retval = SDL_ECC_BUS_SAFETY_DSS_secExecute(busSftyNode,addr,writeData);
if(retval !=SDL_PASS )
{
retval = SDL_EFAIL;
}
else
{
/* Wait for test to complete/timeout. */
while((status == 0U) && (timeout!=0U))
{
retval =SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus(busSftyNode,&status);
if(retval !=SDL_PASS )
{
timeout--;
}
else
{
break;
}
}
if(status!=0U)
{
retval = SDL_PASS;
SDL_ECC_BUS_SAFETY_DSS_secErrorClear(busSftyNode );
}
else
{
retval = SDL_EFAIL;
}
}

Induce the error DED in Polling Method for DSS Nodes

retval = SDL_ECC_BUS_SAFETY_DSS_dedExecute(busSftyNode,addr,writeData);
if(retval !=SDL_PASS )
{
retval = SDL_EFAIL;
}
else
{
/* Wait for test to complete/timeout. */
while((status == 0U) && (timeout!=0U))
{
retval =SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus(busSftyNode,&status);
if(retval !=SDL_PASS )
{
timeout--;
}
else
{
break;
}
}
if(status!=0U)
{
retval = SDL_PASS;
SDL_ECC_BUS_SAFETY_DSS_dedErrorClear(busSftyNode);
}
else
{
retval = SDL_EFAIL;
}
}

Induce the error RED in Polling Method for DSS Nodes

retval= SDL_ECC_BUS_SAFETY_DSS_redExecute(busSftyNode, fiType, redType);
if(retval !=SDL_PASS )
{
retval = SDL_EFAIL;
}
else
{
/* Wait for test to complete/timeout. */
while((status == 0U) && (timeout!=0U))
{
retval =SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus(busSftyNode,&status);
if(retval !=SDL_PASS )
{
timeout--;
}
else
{
break;
}
}
if(status!=0U)
{
retval = SDL_PASS;
SDL_ECC_BUS_SAFETY_DSS_redErrorClear(busSftyNode);
}
else
{
retval = SDL_EFAIL;
}
}

Induce the error SEC in Interrupt Method for DSS Nodes

ret_val = SDL_ECC_BUS_SAFETY_DSS_secExecute(busSftyNode,addr,writeData);
if(ret_val !=SDL_PASS )
{
ret_val = SDL_EFAIL;
}
else
{
if(((SDL_ECC_BUS_SAFETY_DSS_TPTC_A0_RD <= busSftyNode )&&(SDL_ECC_BUS_SAFETY_DSS_TPTC_C5_RD>=busSftyNode))||(SDL_ECC_BUS_SAFETY_DSS_PCR==busSftyNode))
{
SDL_ECC_BUS_SAFETY_DSS_getEDMAParameters(busSftyNode,&dmaCh, &tcc, &param, &queNum, &edmaNum );
test_edmaATransfer(busSftyNode, dmaCh,tcc,param,queNum,edmaNum );
}
else
{
/* Do Nothing */
}
/* wait for error notification from ESM, or for timeout */
/* fault injection gets deasserted in ISR */
while((dssSecFlag!=TRUE) && (timeout!=0U))
{
timeout--;
}
if(dssSecFlag==TRUE)
{
dssSecFlag=FALSE;
ret_val = SDL_PASS;
}
else
{
ret_val = SDL_EFAIL;
}
}

Induce the error DED in Interrupt Method for DSS Nodes

ret_val = SDL_ECC_BUS_SAFETY_DSS_dedExecute(busSftyNode,addr,writeData);
if(ret_val !=SDL_PASS )
{
ret_val = SDL_EFAIL;
}
else
{
if(((SDL_ECC_BUS_SAFETY_DSS_TPTC_A0_RD <= busSftyNode )&&(SDL_ECC_BUS_SAFETY_DSS_TPTC_C5_RD>=busSftyNode))||(SDL_ECC_BUS_SAFETY_DSS_PCR==busSftyNode))
{
SDL_ECC_BUS_SAFETY_DSS_getEDMAParameters(busSftyNode,&dmaCh, &tcc, &param, &queNum, &edmaNum );
test_edmaATransfer(busSftyNode,dmaCh,tcc,param,queNum,edmaNum );
}
else
{
/* Do Nothing */
}
/* wait for error notification from ESM, or for timeout */
/* fault injection gets deasserted in ISR */
while((SDL_DSS_intrFlg[busSftyNode]!=TRUE) && (timeout!=0U))
{
timeout--;
}
if(SDL_DSS_intrFlg[busSftyNode]==TRUE)
{
SDL_DSS_intrFlg[busSftyNode]=FALSE;
ret_val = SDL_PASS;
}
else
{
ret_val = SDL_EFAIL;
}
}

Induce the error RED in Interrupt Method for DSS Nodes

ret_val= SDL_ECC_BUS_SAFETY_DSS_redExecute(busSftyNode, fiType, redType);
if(ret_val !=SDL_PASS )
{
ret_val = SDL_EFAIL;
}
else
{
/* wait for error notification from ESM, or for timeout */
/* fault injection gets deasserted in ISR */
while((SDL_DSS_intrFlg[busSftyNode]!=TRUE) && (timeout!=0U))
{
timeout--;
}
if(SDL_DSS_intrFlg[busSftyNode]==TRUE)
{
SDL_DSS_intrFlg[busSftyNode]=FALSE;
ret_val = SDL_PASS;
}
else
{
ret_val = SDL_EFAIL;
}
}

## API

APIs for SDL ECC BUS SAFETY

SDL_ECC_BUS_SAFETY_MSS_secExecute
int32_t SDL_ECC_BUS_SAFETY_MSS_secExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for SEC test on MSS.
SDL_ECC_BUS_SAFETY_MSS_CPSW
#define SDL_ECC_BUS_SAFETY_MSS_CPSW
Definition: sdl_ecc_bus_safety_soc.h:214
FALSE
#define FALSE
Definition: os_defs.h:32
SDL_ECC_BUS_SAFETY_DSS_dedExecute
int32_t SDL_ECC_BUS_SAFETY_DSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for DED test on DSS.
SDL_ECC_BUS_SAFETY_DSS_secErrorClear
int32_t SDL_ECC_BUS_SAFETY_DSS_secErrorClear(uint32_t busSftyNode)
This API is used to clear SEC error on DSS.
SDL_ECC_BUS_SAFETY_MSS_dedExecute
int32_t SDL_ECC_BUS_SAFETY_MSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for DED test on MSS.
SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus
int32_t SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get DED error Status on DSS.
SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus
int32_t SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get SEC error Status on DSS.
SDL_ECC_BUS_SAFETY_MSS_redExecute
int32_t SDL_ECC_BUS_SAFETY_MSS_redExecute(uint32_t busSftyNode, SDL_ECC_BUS_SAFETY_busSftyFiType fiType, SDL_ECC_BUS_SAFETY_busSftyFiRedType redType)
This API is used for RED test on MSS.
sdl_ecc_bus_safety.h
SDL_ECC_BUS_SAFETY_DSS_secExecute
int32_t SDL_ECC_BUS_SAFETY_DSS_secExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for SEC test on DSS.
SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus
int32_t SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get RED error Status on DSS.
SDL_ECC_BUS_SAFETY_DSS_dedErrorClear
int32_t SDL_ECC_BUS_SAFETY_DSS_dedErrorClear(uint32_t busSftyNode)
This API is used to clear DED error on DSS.
SDL_ECC_BUS_SAFETY_MSS_TPTC_A0_RD
#define SDL_ECC_BUS_SAFETY_MSS_TPTC_A0_RD
Definition: sdl_ecc_bus_safety_soc.h:218
TRUE
#define TRUE
Definition: os_defs.h:29
SDL_ECC_BUS_SAFETY_DSS_redExecute
int32_t SDL_ECC_BUS_SAFETY_DSS_redExecute(uint32_t busSftyNode, SDL_ECC_BUS_SAFETY_busSftyFiType fiType, SDL_ECC_BUS_SAFETY_busSftyFiRedType redType)
This API is used for RED test on DSS.
SDL_ECC_BUS_SAFETY_DSS_redErrorClear
int32_t SDL_ECC_BUS_SAFETY_DSS_redErrorClear(uint32_t busSftyNode)
This API is used to clear RED error on DSS.