#TMS570LC43x
I want to set a RTI watchdog for my program.
//////////////////////////
after initializing,
rtiStartCounter(rtiREG1, rtiCOUNTER_BLOCK1);
dwdInit(rtiREG1, RTICLK/10);
dwdCounterEnable(rtiREG1);
1, Do I need to test the status of watchdog? such as
while(1){
if(~IsdwdKeySequenceCorrect(rtiREG1))
dwdGenerateSysReset(rtiREG1);
}
or watchdog will automatically reset the program?
2, how should I reset the watchdog every time? I think this maybe ok, but I don't know how to set COMPARE2
void rtiNotification(rtiBASE_t *rtiREG, uint32 notification)
{
if(rtiREG == rtiREG1 && notification == rtiNOTIFICATION_COMPARE2)
dwdReset(rtiREG1);
}
thanks