Hi Champs,
I would like to reset F28335 by using software force a watchdog reset, as it's the suggested workaround of 'Possible Incorrect Operation of XINTF Module After Power Up'. But I can not seem a watchdog reset using below code:
EALLOW;
if(!(SysCtrlRegs.WDCR & 0x0080)) // if there is a watchdog reset
{
SysCtrlRegs.WDCR = 0x00A8; // enable watchdog
SysCtrlRegs.WDCR = 0x0000; // reset
}
SysCtrlRegs.WDCR = 0x00E8; //disable watchdog
EDIS;
very interesting is that, when I insert some NOP before'disable' watchdog, I can see the watchdog reset. the code as below:
EALLOW;
if(!(SysCtrlRegs.WDCR & 0x0080)) // if there is a watchdog reset
{
SysCtrlRegs.WDCR = 0x00A8; // enable watchdog
SysCtrlRegs.WDCR = 0x0000; // reset
}
asm ("NOP");
asm ("NOP");
asm ("NOP");
SysCtrlRegs.WDCR = 0x00E8; //disable watchdog
EDIS;
I am not sure why watchdog NOT reset device while the reset watchdog statement followed by a disable watchdog statement. Could you please tell me why? thanks!