Watchdog Timer Reset

The Watchdog Timer (WDT) Reset feature may not work properly outside of Sleep mode. Reliance on WDT Reset while executing a program is not recommended. Operation in Sleep is not impacted by this errata.

Work around

Use an independent timer to emulate a watchdog feature, outside of Sleep mode, using the following steps:
  1. 1.Configure the chosen timer for the desired timeout period
  2. 2.Enable the timer interrupt
  3. 3.Enable Peripheral and Global interrupts
  4. 4.Enable the timer, which starts the count
  5. 5.At the end of the Main loop, restore the timer values
  6. 6.If the timer interrupt occurs, issue a RESET command

A code example using Timer1 is shown below.

void __interrupt() isr(void)
{
    if( TMR1IF && TMR1IE )
    {
        asm("RESET");
    }
}

void main(void)
{
    configure_TMR1();
    GIE = 1;
    PEIE = 1;
    
    T1CONbits.ON = 1;
    
    while(1)
    {
        // user code here
        restore_TMR1();
    }
}

Affected Silicon Revisions

A3 A5 A6 A7 A8      
X X X