This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM57L843: Please provide the example test code for RM57Lx LBIST test

Part Number: RM57L843

Hi,

Now we need use SafeTI diagnostic library to executes CPU Logic Built-In Self Test using Self-Test Controller for RM57Lx MCU.

But I don't find related example code in Demo_app project, can you procide the example code for below test types with API SL_SelfTest_STC and SL_SelfTest_Status_STC?

Thanks so much!

  • Hi Shenruming,

    You can find the code for test types STC1_RUN and STC1_COMPARE_SELFCHECK in sl_selftest.c

    --

    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    I know where to find the API funtion, but I don't know how to call it and how to construct the stcSelfTestConfig struct as a input parameter?

    The below example is just a interface description and it's not for RM57Lx.

  • Hi Shenruming,

    I know where to find the API funtion, but I don't know how to call it and how to construct the stcSelfTestConfig struct as a input parameter?

    Please refer below two highlighted lines to understand the calling procedure. 

    --

    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Thanks for your great support!

    It's about STC selfcheck. How about CPU test using STC1_RUN/STC2_RUN?

  • Hi Shenruming,

    It's about STC selfcheck. How about CPU test using STC1_RUN/STC2_RUN?

    My first image shows for calling procedure for STC1_RUN right?

    And for STC2_RUN and STC2_COMPARE_SELFCHECK just change the corresponding macros and procedure was same.

    --

    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    I can't get the whole code about STC1_RUN/STC2_RUN test. Can you send me the HL_sys_startup.c or attach the complete code including parameter preparing, test result handling etc.?

    STC RUN test on startup is very important for us.

    Thanks so much!

  • Hi Shenruming,

    5488.HL_sys_startup.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /** @file HL_sys_startup.c
    * @brief Startup Source File
    * @date 02-Mar-2016
    * @version 04.05.02
    *
    * This file contains:
    * - Include Files
    * - Type Definitions
    * - External Functions
    * - VIM RAM Setup
    * - Startup Routine
    * .
    * which are relevant for the Startup.
    */
    /*
    * Copyright (C) 2009-2016 Texas Instruments Incorporated - www.ti.com
    *
    *
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Actually, after STC test the CPU will get reset and the below highlighted code is the test result handling

    --

    Thanks & regards.
    Jagadish.

  • Hi Jagadish,

    Thanks for your great help!

    1.As we know, the debug starts from main function, but you put the STC test before main function in _c_int00.

    How to debug the STC selftest funtion?

    2. After error forcing test by runnging "SL_SelfTest_STC" with parameter "STC1_COMPARE_SELFCHECK", where did you running "SL_SelfTest_Status_STC" to get the test result?

    3. STC1_COMPARE_SELFCHECK is a fault injection test, so it should be executed in case of need, but not be executed routinely.

    So when will the test be started in below code? What's the triggering condition?

    4. If we use your _c_int00 to replace the previous _c_int00 to do STC test, there's a big difference between them to be treated with caution:

    You use the safety library to get the reset reason and the previous code use HalGOGEN functions to get the reset source.

    Are they equivalent? Can we use your solution to replace the previous solution for business application? Thanks a lot!!

    5. What's the treatment for "STC2_RUN" and "STC2_COMPARE_SELFCHECK"? No test cases for them.

    I would greatly appreciate if you could reply to me one by one!!

  • Hi Shenruming,

    1.As we know, the debug starts from main function, but you put the STC test before main function in _c_int00.

    How to debug the STC selftest funtion?

    The debug starts at main because of the following setting,

    Here we gave Auto run to the main function right, that is why debug starts at main function. You can just give the required function where you want to start the debug.

  • Hi Jagadish,

    Could you please answer the other 4 questions as well? They also seriously confuse us. Thanks.

  • Hi Shenruming,

    Apologies for the delay, i am on vacation for few days.

    2. After error forcing test by runnging "SL_SelfTest_STC" with parameter "STC1_COMPARE_SELFCHECK", where did you running "SL_SelfTest_Status_STC" to get the test result?

    Actually, we can call the "SL_SelfTest_Status_STC" to get the test result if we are using SL_SelfTest_STC in our application but here in diagnostic they are directly verifying the result without calling the SL_SelfTest_Status_STC function as shown below

    3. STC1_COMPARE_SELFCHECK is a fault injection test, so it should be executed in case of need, but not be executed routinely.

    So when will the test be started in below code? What's the triggering condition?

    In diagnostic library it is not executing routinely, as the code highlighted is located in the "_c_int00" function, it is executing only after each reset and except that reset is due to debug.

    4. If we use your _c_int00 to replace the previous _c_int00 to do STC test, there's a big difference between them to be treated with caution:

    You use the safety library to get the reset reason and the previous code use HalGOGEN functions to get the reset source.

    Are they equivalent? Can we use your solution to replace the previous solution for business application? Thanks a lot!!

    We can't use both interchangeably because both have different return values.

    For example:

    The below are the return values for the "getResetSource"

    The below are the return values for the "SL_Init_ResetReason"

    --

    Thanks & regards,
    Jagadish.