Skip to main content
Visitor II
November 15, 2019
Question

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

  • November 15, 2019
  • 3 replies
  • 2044 views

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?

    This topic has been closed for replies.

    3 replies

    Visitor II
    October 15, 2020

    Hello, do we have some ansverfor this? I have same error.

    Thanks, jiri

    Explorer
    September 11, 2023

    hi lxiju ,

     

    Flash.id file , you can add this line

    backup_buffer_section (NOLOAD): { *(backup_buffer_section) } >RAM

     

    now you got RAM_PARTIAL_PASSED

    thank you.

     

     

    ST Employee
    October 16, 2023

    Hello,

    please check the line commented out at your code description, too. Your subset size doesn't comply with the STL requirements (~multiply of two blocks, "-1" is a must there). Note by "#define TEST_RAM_SECTION_NB 1 /* 8 sections are tested */" and "RAM RamConfig.NumSectionsAtomic = TEST_RAM_SECTION_NB; /* 1 shot */" you will test 1 but not 8 RAM sections.

    Best regards,

    Petr