Hi,
I'm trying to make a software reset using the watchdogs interrupt. First of all, I set up the registers as below (I tried to follow the TI example):
//PieVectTable.WAKEINT = &WAKEINT_ISR;
PieVectTable.WAKEINT = &wakeint_isr;
EDIS; // This is needed to disable write to EALLOW protected registers
EALLOW;
SysCtrlRegs.SCSR = BIT1;
EDIS;
// Reset the watchdog counter
ServiceDog();
WakeCount=0;
// Enable the watchdog
EALLOW;
SysCtrlRegs.WDCR = 0x0038;
EDIS;
Besides this, I define the interrupt function:
interrupt void wakeint_isr(void)
{
WakeCount++;
// Acknowledge this interrupt to get more from group 1
// PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
if(WakeCount>=1500)
{
EALLOW;
SysCtrlRegs.WDCR=0x0038;//reset
EDIS;
}
// Acknowledge this interrupt to get more from group 1
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
What is the problem? I see as WakeCount stops to increase, but SysCtrlRegs.WDCR=0x0038; doesn’t make a reset (at least I can’t see in my device).
Any idea? Thank you in advance.