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.

TMS570LC4357: Question about SW Library STC1_COMPARE_SELFCHECK

Part Number: TMS570LC4357

Hello,

In SAFTEY Library 2.4.0., we want to use library SL_Seltest_STC function with testType= STC1_COMPARE_SELFCHECK.

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


When we check the SW library and the TMS Technical manual, We observe a difference between both:


Description of SW Library :

Configure the clock divider register STCCLKDIV with parameter
   
Configure the interval count INTCOUNT in register STCGCR0 with parameter
Configure restart/continue RS_CNT in register STCGCR0 to 1
    
Enable the SELF_CHECK_KEY and FAULT_INS bits in the STCSCSCR register
            
Configure self-test run time out counter STCTPR[31:0] with parameter

Select both cores for self-test in parallel by setting STCGCR1[11:8] to 0

Enable STC run (STCGCR1[3:0]=0xA)
    
Put the CPU in idle mode by executing the CPU idle instruction.
asm(“ WFI”)


Description technical Reference Manual (Chapter 10.10)

"Step 1: Configure the interval count to 1 in STCGCR0 register.

Segment 0
Step 2: Enable the SELF_CHECK_KEY and FAULT_INS bits in the STCSCSCR register and kick off the
self-test by enabling the first interval of segment 0. On the completion of self-test, TEST_FAIL bit will

be set in the STCGSTAT register. Check if the FSEGID bits in the STCFSTAT register are set to 00.
Depending on the segment 0 configuration (parallel or individual cores), the CORE1_FAIL or
CORE2_FAIL bits would be set.
Step 3: Disable one or both of the SELF_CHECK_KEY and FAULT_INS bits in the STCSCSCR register.
Then restart the self-test by programming bit 0 of the STCGCR0 register to 1. On the completion of the
test, the TEST_FAIL bit will be cleared in the STCGSTAT register"


This is my questions :
1- In the technical reference manual it isn't mentioned that a reset is occured in step2. is it normal?
2- In the technical reference manual, what is the signification of "On the completion of self-test" in step2 : by seting STCSEGPLR[1:0] = 0x0 or by setting STCGCR1[3:0] = 0xA or BOTH?
3-  In SW Library, step3 of technical manual is not done to clear registers at the end of the test? Is it normal?

Best regards,

François

  • Hello,
    According to TRM Figure 10-7 Self-Test Hardware Execution Flow Chart, CPU reset is generated when:
    - mismatch is found;
    - All intervals are done - STC is complete.
    When STC is complete, STC complete flag is set in STCGSTAT.

    Best regards,
    Miro
  • Hello Miro,

    Thank you for your answer. I therefore consider that when we use SELF_CHECK_KEY and FAULT_INS bits in the STCSCSCR register we will have a CPU Reset. is it correct?

    For my question 2 and 3, can you help me?

    Best regards,

    François
  • Hello Francois,

    See following comments from our STC expert:

    2- In the technical reference manual, what is the signification of "On the completion of self-test" in step2 : by seting STCSEGPLR[1:0] = 0x0 or by setting STCGCR1[3:0] = 0xA or BOTH?

    >> STCSEGPLR[0:1] is used to Preload the address of the segment for which the first interval will be run. Setting it to 0x0, preloads the address of 1st interval for segment 0.
    STCGCR1[3:0] is set to 0x0A to enable Self-test


    3- In SW Library, step3 of technical manual is not done to clear registers at the end of the test? Is it normal?

    >> When the STC_ENA key in STCGCR1 is written from a disabled state to an enabled state, the two status flags in STCGSTAT get cleared to their default values.
    Line 2135 : sl_stcREG1->STCGCR1 = STC_STCGCR1_STC_ENA;
    in sl_selftest.c - Hercules SafeTI Diagnostic Library Version 2.4.0


    Best regards,
    Miro