Hi,
Follow the example in reference manual, all cpu core registers should be backup before run STC (page 237). I want to know if it is necessary to do it?
I know the STC will cause a CPU reset, the program will run from beginning. In STC module, I do
if(1U != (regStc.STCGSTAT & 0x1U))
{
run STC
}
else
{
reset state register and disable STC
}
is this ok?
I found the STC was run completely (by check STCGSTAT) and program was reset but I can't find the CPU reset bit in SYSESR register. So I am not sure if the function works properly.
Any help?
thanks