How to Reload LPC1225 WatchDog Timer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Reload LPC1225 WatchDog Timer

722 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ethan_kao on Fri Aug 22 03:22:31 MST 2014
Dear Nxp:

how to reset to 1 sec watdog timer in my loop?
please tell me step 2  how to set WDT register

i try fill vvvvvvvvvvvvvvvvvv     in setp 2  but,it is always reboot
    LPC_WWDT->FEED = 0xAA;
    LPC_WWDT->FEED = 0x55;


I have code :
void main(void)
{
   unsigned int test_loop=0;
   '1.set Watchdog Timer 1s
    WDT_StructInit(&WDT_InitStruct);
    WDT_InitStruct.Mode=  WDT_MODE_RESET;
    WDT_InitStruct.TimeOutOption= WDT_TIMEOUT_USVAL;
    WDT_InitStruct.TimeOutValue= WDT_TIMEOUT_1S;
    WDT_InitStruct.WarningCompareValue= 0x3FF;
    WDT_InitStruct.WindowValue= 0x2000;
    WDT_Init(&WDT_InitStruct);
   
    WDT_Start();
    /* config window value  */
    WDT_SetWindowValue(&WDT_InitStruct);
   
    while(1)
    {
         test_loop++;
         if (test_loop<1000000)
         {
             '2.Always reset watchdog timer to 1s
         }
         else
         {
              'do nothing
         }
    }
}
Labels (1)
0 Kudos
Reply
0 Replies