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.

SAFETI_DIAG_LIB: Periodic execution of CPU2B with SL_SelfTest_STC (which causes a reset?)

Part Number: SAFETI_DIAG_LIB

Hello there,

We would like to use the CPU2A and CPU2B diagnostics (Boot Time and Periodic Execution of LBIST STC respectively) on our RM48L952.
In the Software Safety Manual (SPNU592A–April 2015–Revised October 2016) p 17 it can be found that both of these tests have to be performed using the SL_SelfTest_STC function from the API.

The SL_SelfTest_STC function has the following definition:

boolean SL_SelfTest_STC ( register SL_SelfTestType  testType,
register boolean  bMode,
register SL_STC_Config *  config 
)

the API documentation shows that testType has 2 valid values (for R4 devices) : STC_RUN and STC_COMPARE_SELFCHECK. 
I assume one of these is for CPU2A and the other for CPU2B.

The API documentation also mentions the following:

Note: Function DOES NOT RETURN if STC was started

Note: At the end of the STC execution a CPU reset is issued by the STC controller. So the application startup must ensure that the STC is not-executed when reset type is RESET_TYPE_CPU & when the debugger is connected.

It seems strange that a periodic test causes a reset, is this the way it was intended or am I missing something?

  • Hello Coster,

    The CPU2A is STC test at startup, and CPU2B is periodic STC test. The test types in the SL_SelfTest_STC are STC_RUN and STC_COMPARE_SELFCHECK . This function can be called at startup or any time during normal operation.

    STC generates a CPU reset after completion of the test regardless of pass or fail.

    If STC is ran only at startup, the user software doesn't need to save the CPU contents since the reset caused will go through all startup configurations.

    If STC is ran during the normal operation, user software must save the CPU contents and reload them after the CPU reset caused by the completion of the STC test.