This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SM320F2808-EP: SW watchdog design question

Part Number: SM320F2808-EP
Other Parts Discussed in Thread: C2000WARE

I currently am servicing the watchdog timer within a CPU interrupt timer. Is this a common way to handle the watchdog timer or is there a more generally accepted practice of how to setup the ServiceDog()?


ConfigCpuTimer(&CpuTimer0, 100, 5000); // 5mSec to service a 13.1mSec watchdog timer

StartCpuTimer0();
// Start watch-dogging
EnableDog();

__interrupt void cpu_timer0_isr(void)
{
// 5ms to service a 13.1mSec watchdog
CpuTimer0.InterruptCount++;
// kick the dog
ServiceDog();
// Acknowledge this interrupt to receive more interrupts from group 1
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
if(CpuTimer0.InterruptCount >= 200)
{
GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;
CpuTimer0.InterruptCount = 0;
}
}