HI Peter,
By default SWT_0 watch dog is enabled as its default value is 0xFF00111B (WEN is set).
So in our bootloader we are servicing this watchdog by writing
FBL_SWT_SR = 0xA602u; /* SWT trigger sequence, step 1 */
FBL_SWT_SR = 0xB480u;
and then before jumping into application we are trying to disable the watchdog by writing
/* Disable watchdog */
FBL_SWT_SR = 0x0000C520ul; /* Key access 1st step */
FBL_SWT_SR = 0x0000D928ul; /* Key access 2nd step */
FBL_SWT_CR = 0x8000010Aul; /* Disable SWT */
but the above command doesn't seem to be working at all, as I see still the FCCU NCF[14] is set.
But if I disable the watchdog with following snippet at beginning in init before service/ petting it , then everything works good (NCF[14] is not set.)
/* Disable watchdog */
FBL_SWT_SR = 0x0000C520ul; /* Key access 1st step */
FBL_SWT_SR = 0x0000D928ul; /* Key access 2nd step */
FBL_SWT_CR = 0x8000010Aul; /* Disable SWT */
Now my question is it possible to disable the watchdog in runtime after its being serviced for timeout?
How do I ensure that watchdog is getting disabled without looking for no reset .(I meant is there a possibility to read CR register's WEN bit and confirm the same.)
All your examples show first watch dog being disabled and then enabled .
Can you please share an example with first watchdog being enabled and then serviced for sometime and then disabled.
Thanks for your help!!
Praveen