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.

TMS570ls3137;stc in main;stcSelfCheck function

Other Parts Discussed in Thread: TMS570LS3137

About TMS570ls3137,I met some problem. I want to use stcSelfCheck function. And I read relevance context in TRM. I know make STC execute before main function or on stratup. And I can execute stcSelfCheck function on stratup successfully. But now I need to execute stcSelfCheck periodically, I have to put stcSelfCheck function in the main function. From TRM, I know I need to save some registers, back up before and restore after self-test.DO I have to save all the register in the TRM? BUT in the compiler I cannot see all the register during the running.And when the stcSelfCheck function finished in main, the chip will reset. Then it may reset again and again if the stcSelfCheck function in main?.How can I run stcSelfCheck whenever I want without reset again and again?

I can find registers which in 1. 2. and 3. but I cannot find registers in 4. IS the break point register and watch point registers in CP14?

  • Hi,

    Can you please help us understand what you really intend to with running these tests periodically without restarting the application.

    These tests directly meddle with the CPU, so the test needs to be carefully written to make sure you resume from where you left off especially based on what resources are being used by your application. Alternatively you can go for re-starting your application which will be a bit more simpler if you can afford to which is a slightly different path to take compared to power on reset.

    But even otherwise with the Lockstep architecture there is another CPU which executes the same code at delayed interval and there is continuous monitoring to make sure they both did the same job through CCM module.

    Answering your question #4, some of these registers are memory mapped under the section CortexR4 Debug. More details of these registers can be found inside ARM Cortex Specification.
  • Hi Karthik,
    Thank you very much.Reply so so fast.
    When I read technical reference manual again today, I find I may misunderstand something about STC module. And I will explain much clearer.

    First, we use 570 to control some devices, but we need a high level for the safety. So we want to do some test periodically, to ensure the hardware of CPU is healthy. And for STC module of 570, it can help us to deal with this task although it not a simple tool to use. We cannot power off and power on the devices usually, we just need 570 can help us to test itself periodically and automatically. This period can be once an hour or once a day or once a week. And to make the test run fast, we want to divide STC into 24 intervals. And we run 8 intervals which is forepart of 24 intervals in the first period, then to run other 8 intervals which is middle part of 24 intervals in the second period, to run the rest 8 interval in the third period. This is what we want to do by STC module of 570.

    Second, according to the design of what I mention above. I need to make CPU Self-Test in the main function, but it not a easy thing to do. I want it can restore the status of CPU after self-test. But I do not know what need to be back up. And by HCG, I find two function, the one is cpuSelfTest() and the other is stcSelfCheck().And I use cpuSelfTest() in main, it always run in endless loop which cannot jump out of errata_PBIST_4().I do not know why. And I use restore function and back up function which in Hercules Safety MCU Demos, it just back up user,svc,fiq,irq,abort,undef,r0,r1 and r2.I am not sure that only backup this several registers can help CPU restore status. Is there any demo program in detail?

    Third, I do not know if I want to run 24 intervals discontinuous can it achieve test coverage at 90.21? And how can I run 24 intervals discontinuous? I know I must set STCGCR0[0] at 0, to continue STC run from the previous interval.But how to interrupt the STC run to do some application?


    Best Regards,
    Cyrus