AnsweredAssumed Answered

help - F103 window watchdog

Question asked by karakaya.mehmet on Aug 31, 2013
Latest reply on Sep 1, 2013 by Clive One
hello dear forum,

I am trying to setup window watchdog on F103

I want wwdg to be reset in a window of 8 - 12 milisecond

I set wwdg prescaler to 2 so wwdg timer is counting every 0.227 microsecond
the enable line sets the counter to 117 -> so 117-63 = 12.25 milisecond max timeout value
if I set
  WWDG_SetWindowValue(117);

the wwdg works fine

however if I set a lover value for example 95
  WWDG_SetWindowValue(95); 

so 117-95 = 22 * 0.227 = 5 ms minimum timeout value the processor never gets out of reset

I tried with 78 --> 8.8 ms still resetting the uC

what am I doing wrong ?
why doesnot it work according to the manual ?

thank you

  RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);
.....................
  TIM_Init()   // timer sets  to 10 ms period - its IRQ routine sets TIMERJOB variable
  WWDG_SetPrescaler(WWDG_Prescaler_2);
  WWDG_SetWindowValue(117);  // <---- the problem here
  WWDG_Enable(117);
  
while(1) {
  
    if (TIMERJOB) { TIMERJOB=0;
    WWDG_Enable(117);
  
.................other jobs ;
}

Outcomes