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: Self-Test Run Timeout Counter Preload Register (STCTPR)

Part Number: TMS570LC4357
Can you elaborate a little bit what its main purpose of Self-Test Run Timeout Counter Preload Register (STCTPR)? 

1. Do I always have to write 0xFFFFFFFF to this register? What happens if I write a smaller value?
2.
Can waiting for the self-test to finish within the while loop cause any software crashes?
If yes, how to prevent software crashes during the waiting for the self-test to finish?

3. Does STCTPR register have anything to do with preventing software crashes?
If yes, counting to the value 0xFFFFFFFF, won't it take a long time to count up to this value?


Thanks.

King Regards,

Ktmn
  • Hi Ktmn,

    Can you elaborate a little bit what its main purpose of Self-Test Run Timeout Counter Preload Register (STCTPR)?

    The STCTPR register configures the timeout period to be a fallback in case the CPU self-test run does not complete.

    1. Do I always have to write 0xFFFFFFFF to this register? What happens if I write a smaller value?

    Example we are running STC1 Segment-0 test on TMS570LC4357 it takes 203625 cumulative STC clock cycles to run all 125 STC intervals. This is exactly 1.8511 mS at 110MHz STCCLK. You need to define the timeout period which is larger than this time required.

    So, depends on the test the timeout period should be greater than the time taken for to run the corresponding test.

    2. Can waiting for the self-test to finish within the while loop cause any software crashes?
    If yes, how to prevent software crashes during the waiting for the self-test to finish?

    As suggested in TRM it would be better to configure core in save mode (e.g. WFI mode).

    3. Does STCTPR register have anything to do with preventing software crashes?
    If yes, counting to the value 0xFFFFFFFF, won't it take a long time to count up to this value?

    Yes, STCTPR register will prevent the software crashes. If the processor taking too much time for execution of any tests, then this timeout will prevent from that crash.

    Yes, it is a long time. If we set 0xFFFFFFFF @ 110Mhz then the timeout is around 39Sec.

    But setting this register value is user requirement. You can adjust the value based on the application requirements.

    --

    Thanks & regards,
    Jagadish.