Hi,
I am performing the STC self-test in my application as below with the VCLK and HCLK at 90MHz and GCLK1 at 180MHz. The code is taken with reference to the SafeTI Library code.
After enabling the test and the assembly instructions are executed, the self-test status is still active where the ST_ACTIVE bit is seen as 0xA in the STCGSTAT register and the TEST_FAIL, TEST_DONE bits are read as 0.
Understood that the WFI instruction is executing as NOP instruction and hence not resetting the CPU. The assembly code is not given to branch to the address within the link register as we need to point to 0x0 after the CPU reset.
Going through the forums of the ARM processor, understood that the interrupts should be disabled before the WFI instruction to keep the CPU in sleep mode.
In the STC self-test, before the WFI instruction is executed the imprecise/asynchronous abort is held pending in the CPSR register due to the operations performed before the self-test. How could I make the interrupt not pending so that the STC self-test could run and then reset the processor using WFI instruction?
Please let us know the issue resolution why the STC self-test is not getting completed with the above code and how can it be done. Is it due to the imprecise/asynchronous abort? Also kindly confirm if there is anything missed in performing the STC self-test from the above code?
Thank you,
Tirumala.