Other Parts Discussed in Thread: HALCOGEN
hi, how the cpu comes back to where it left after stc executed?
in "C:\ti\Hercules\Hercules Safety MCU Demos\4.0.0\TMS570LS3x_target_sources\HALCoGen\source\sys_main.c"
//#######################################################################
_coreBackupStackPointer_();
/** - Enable the STC Self Test */
stcREG->STCGCR1 = 0xA;
/** - Enter ARM IDLE state to start the test */
asm(" WFI");
asm(" nop");
asm(" nop");
asm(" nop");
/** - When STC test completes a CPU reset occurs.
* - After checking whether the reset is caused by STC
* the code will brach here to continue the reset of the code */
asm("_Continue_after_STC: nop");
asm(" nop");
asm(" nop");
asm(" nop");
asm(" nop");
//###############################################################
all i see you created a global label "_Continue_after_STC"
and cpu was take to idle to run the stc by asm(" WFI");
but after stc finished how it will come back to this label ?
after stc completed, a cpu reset will occur and in there i dont see any jmp instruction to this jump to this lebel.
can you explain please
thanks