cancel
Showing results for 
Search instead for 
Did you mean: 

Why RAM test "STL_SCH_ConfigureRam()" give back "STL_ERROR"

lxiju
Associate II

hi, I use STM32_Safety_STL to test STM32L433RC RAM, but when configureRam, return "STL_ERROR",please help:

code :

#define RAM_SECTION_SIZE 128U //STL hard coded

#ifdef STL_DISABLE_RAM_BCKUP_BUF

#define RAM_BACKUP_BUFFER_SIZE 0

#else

#define RAM_BACKUP_BUFFER_SIZE 32U

#endif

#define TEST_RAM_START_ADDR (0x20000000U + RAM_BACKUP_BUFFER_SIZE)

//#define TEST_RAM_START_ADDR (0x20000000U)

#define TEST_RAM_SECTION_NB 1 /* 8 RAM sections are tested */

void stl_ram_test(void)

{

 STL_TmStatus_t StlRamStatus=STL_ERROR;

 STL_MemSubset_t RamSubset;

 STL_MemConfig_t RamConfig;

 RamSubset.StartAddr = TEST_RAM_START_ADDR;

// RamSubset.EndAddr = TEST_RAM_START_ADDR + (TEST_RAM_SECTION_NB * RAM_SECTION_SIZE) - 1;

 RamSubset.EndAddr = TEST_RAM_START_ADDR + (TEST_RAM_SECTION_NB * RAM_SECTION_SIZE); 

 RamSubset.pNext = NULL;

 RamConfig.pSubset = &RamSubset;

 RamConfig.NumSectionsAtomic = TEST_RAM_SECTION_NB; /* 1 shot */ 

 /* Init STL */

 if (STL_SCH_Init() != STL_OK)

 {

   /* STL Defense Programming if LED2 is slowly blinking (1 sec. period) */

   StlErrorHandler(1000);

 }

 /* Init RAM TM */

 if (STL_SCH_InitRam(&StlRamStatus) != STL_OK)

 {

   StlErrorHandler(1000);

 } 

 /* check RAM TM status is reset to STL_NOT_TESTED */

 if (StlRamStatus != STL_NOT_TESTED)

 {

   StlErrorHandler(1000);

 } 

 /* Configure RAM TM */

 if (STL_SCH_ConfigureRam(&StlRamStatus, &RamConfig) != STL_OK)

 {

   StlErrorHandler(1000);

 } 

 /* check RAM TM status is reset to STL_NOT_TESTED */

 if (StlRamStatus != STL_NOT_TESTED)

 {

   StlErrorHandler(1000);

 }

 /* RAM TM run */

 if (STL_SCH_RunRamTM(&StlRamStatus) != STL_OK)

 {

  StlErrorHandler(1000);

 } 

 if (StlRamStatus != STL_PARTIAL_PASSED)

 {

  StlErrorHandler(200);

 } 

}

AT :  /* check RAM TM status is reset to STL_NOT_TESTED */

 if (StlRamStatus != STL_NOT_TESTED)

 {

   StlErrorHandler(1000);

 }

always return STL_ERROR, why?

0 REPLIES 0