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.

CPU reset triggered by STC test

Hallo,

I'm implementing the STC self-test according the SPNU499 document and also the demo application provided with the installation. I have one question regarding the CPU reset after the STC test is performed. According to the documentation and my implementation the system shall restore the stack pointer and continue with execution. However, in my case, I can observe the CPU reset, but the system is not continuing in execution at the place where I would expect, but it starts from the first instruction of my application. Is this expected behavior? 

Thank you

 Vaclav

  • Vaclav,

    thanks for your post.  One of our experts will get back to you soon.  Have you considered following the init app note for Hercules MCUs?  it has been recently updated:

    www.ti.com/lit/spna106

    Hope it helps...

  • Vaclav,

    Let us know the SYSESR Register value once you get through the reset.

    Refer sec. 2.4.1 Resets , Table 2-17  CPU resets in spnu 499 document .

    - Pratip

  • Hello Vaclav,

    The LBIST test results in the CPU being in a "scrambled" state at exit.  A CPU reset (generated by the LBIST STC upon completion) is needed to put the CPU back in an operable state.  The CPU will then start execution from the reset vector.  It is the responsibility of the software running on the CPU to check the reset cause (via SYSESR) and to perform any necessary context restore operations. Similarly software is needed to perform a context save before executing the LBIST STC.

    From your description it sounds like the context restore via software is not occuring properly.

    Regards,

    Karl

  • Dear Karl,

    Thanks you for the reply. I think that I got it. The CPU indeed start execution from the reset vector, its then my responsibility to check the SYSESR and do whatever has to be done. In fact, I did check the SYSESR, but the following execution flow was not correct.

    Thanks again

    Vaclav

  • Dear Brian,

    Thanks for the hint, also the new application note and the available source code helped to sort out the issue.

    Vaclav