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; } }