AnsweredAssumed Answered

SPC56EL60L3 - Software Watchdog Timer Reset

Question asked by alem_ on Feb 19, 2017
Latest reply on Feb 21, 2017 by alem_

Hello Everyone,

woking with SPC56EL60L3, I noticed that when the device gets reset by the software watchdog timer, the behaviour is different than I expected. I was expecting the application to be restarted, but I notice the application does not start running, until the next power-on reset.

Looking at the device documentation, I found the followong sentence (page 1292, RM0032):

 

"If a software watchdog timeout event occurs, then the chip will always enter SAFE mode immediately after reset exit."

 

So I Iooked at the startup code and I found this (file clock.c, row 131, function spc_clock_init() ):

 

/* The system must be in DRUN mode on entry, if this is not the case then
it is considered a serious anomaly.*/
if (ME.GS.B.S_CURRENT_MODE != (uint32_t)SPC5_RUNMODE_DRUN) {
SPC5_CLOCK_FAILURE_HOOK();
}

It looks like the current run mode is checked against the expected run mode (which is DRUN) and if
it's different, the SPC5_CLOCK_FAILURE_HOOK() is invoked, which is mapped to irqSysHalt() (basically an
endless loop). This could explain why my application isnot starting after the system being reset by the SWT.

The question is: what if I need my application to restart (without having to cycle the power), after a SWT reset?
Can I just change the above code to include SAFE_MODE as a valid initial state (so that the function goes ahead)?
Is there anything else I need to do?

Thank you.
Regards

Alessandro

Outcomes