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: What STC Configurations exactly means?

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hi

i need to start a self test (STC) at the start phase on my Hercules MCU. I did all the instructions described in the HALCoGen example (example_SafetyLib.c), but why such settings on the SL_STC_Config instance should be made? for example:

SL_STC_Config stcSelfTestConfig; 

stcSelfTestConfig.stcClockDiv = 2;
stcSelfTestConfig.intervalCount = 1;
stcSelfTestConfig.restartInterval0 = TRUE;
stcSelfTestConfig.timeoutCounter = 0xFFFFFFFF;

could someone please describe, what these settings means? and what their values mean?

 

  • Hello Rabie,

    1. Maximum STC clock rate support at 330MHz is 110MHz. Divide GCLK by 3 to achieve this clock rate. Bits STCCLKDIV[26:24] and STCCLKDIV[18:16] need to be configured to be 0x2.

    2. Configure the test interval count in STC module, using STCGCR0[31:16] register.

    3. Specify to the self-test controller whether to continue the run from the next interval or to restart from interval 0 using bit STCGCR0[0].

    4. Configure self-test run time out counter preload register.STCTPR[31:0] = 0xFFFFFFFF. This register contains the total number of VBUS clock cycles it will take before a self-test timeout error (TO_ERR) will be triggered after the initiation of the self-test run.

    Regards,

    QJ

  • Hello QJ,

    Thank you for the Explanation. 

    Is it possible to inject an error when running STC test?

    Regards

    Rabie