Hello,
I have some strange behavior Software Watchdog Module.
I'm able to run the SWT module and it is working properly but only if SWT_CR[HLK] is set.
I do not want to use HLK because a flash operation needs more time and this bit is only cleared when RESET.
If I don't set the HLK bit, the module is not being enabled.
Following code is working properly: When im not in debug mode, I can see how processor restarts.
/* Prepare Local 32 Bit control register
SWT_CR |= (SWT_CR_MAP0
#if APP_DEBUG
| SWT_CR_FRZ
#endif
| SWT_CR_HLK
// | SWT_CR_SLK //Only SLK does not start the module
| SWT_CR_WEN
);
/* Set timeout value */
numberClkTicks= 0x186A00; // 100Ms timeout
SWT.TO.R = numberClkTicks;
SWT.CR.R = SWT_CR; // update SWT control register
In the other hand, if I comment the line SWT_CR_HLK and I uncomment the following SWT_CR_SLK.
What I'm missing here?
Thanks in advance for your help.