AnsweredAssumed Answered

K10 Watchdog resets MCU despite refresh

Question asked by Joe Kissell on May 23, 2012
Latest reply on Jun 12, 2013 by Kashyap Gada

I put the following code in an interrupt that triggers every 1ms (just as a test), but my watchdog still resets my MCU. Why?

I'm certain it's the watchdog resetting me because I check the SRS register at startup to know the reason for any reboot.

 

WDOG_REFRESH = 0xA602; WDOG_REFRESH = 0xB480;

 

Here's my function to initialize the Watchdog. Can anyone think of something I've missed?

 

/* =================================================================================================  FUNCTION DESCRIPTION:== Initialize the Watchdog (COP).====  OUTPUTS:==      N/A == =============================================================================================*/void WATCHDOG__initialize  (  void  )    {    /* Enable interrupts for Watchdog. */    ARM_CORTEX_M4__enable_interrupt( INT_Watchdog );             WDOG_TOVALH = WDOG_TOVALH_TOVALHIGH( MAX_U16 );    WDOG_TOVALL = WDOG_TOVALL_TOVALLOW( MAX_U16 );        /* Unlock and enable the Watchdog timer. */        WDOG_UNLOCK = 0xC520;  WDOG_UNLOCK = 0xD928;    WDOG_STCTRLH |= WDOG_STCTRLH_WDOGEN_MASK | WDOG_STCTRLH_IRQRSTEN_MASK;        WDOG_REFRESH = 0xA602; WDOG_REFRESH = 0xB480;        } /* WATCHDOG__initialize() */

 

 

Outcomes