Page 1 of 1

Watchdog STM32F101

Posted: Tue Jul 19, 2016 2:27 pm
by Tabulous
Don't think the watchdog is working.

Code: Select all

  /* Unlock IWDG.*/
  wdgp->wdg->KR   = KR_KEY_WRITE;

  /* Write configuration.*/
  while (wdgp->wdg->SR != 0)
    ;
  wdgp->wdg->PR   = wdgp->config->pr;
  wdgp->wdg->RLR  = wdgp->config->rlr;

  /* Start operations.*/
  wdgp->wdg->KR   = KR_KEY_RELOAD;
  wdgp->wdg->KR   = KR_KEY_ENABLE;


PR and RLR registers dont seem to be written to....

Re: Watchdog STM32F101

Posted: Tue Jul 19, 2016 2:46 pm
by Tabulous
mmm forget this, it does, work. When on debugger the watchdog must be disabled by default.