AnsweredAssumed Answered

STM32F407 Watch dog

Question asked by Nayani.Partha on May 25, 2016
Latest reply on Jun 1, 2016 by Nayani.Partha
Hi,
I enabled WDT in STM32F407 controller and I have a very tight loop which is resetting the flag. Here is the code

    RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);
    WWDG_SetPrescaler(WWDG_Prescaler_8);
    WWDG_SetWindowValue(0x41);
    WWDG_Enable(0x7F);
    WWDG_ClearFlag();

    while (1)
     {
      WWDG_SetCounter (127)
       WWDG_ClearFlag();
       }

However WDT is resetting my controller. What have I missed? Thank you for your time.

Partha


Outcomes