Page 1 of 1

WDG for stm32F0 - certified / tested?

Posted: Fri Sep 02, 2016 7:32 pm
by nullbert
Hello,

I'm attempting to get the watchdog timer working on an STM32F072. Here's what I see:

* The watchdog does reset periodically as expected.
* However, wdgReset() seems to hang the system, or cause an immediate reset - hard to immediately tell.

Has the wdgTimer() been tested / certified for the STM32F0 ? I did not see it listed in the testhal for this processor.

I've enabled it both in the mcuconf.h and halconf.h and implemented it simply in my main.c:

Code: Select all


#define MAIN_THREAD_SLEEP_MS 1000
#define WATCHDOG_TIMEOUT 1000

/* Watchdog configuration and initialization
 */
static void start_watchdog(void)
{
    const WDGConfig wdgcfg = {
            STM32_IWDG_PR_64,
          STM32_IWDG_RL(WATCHDOG_TIMEOUT)
        };
    wdgStart(&WDGD1, &wdgcfg);
}

int main(void) {
   halInit();
   chSysInit();

   start_watchdog();
   while (true) {
      chThdSleepMilliseconds(MAIN_THREAD_SLEEP_MS);
      wdgReset(&WDGD1);
   }
   return 0;


Thanks for any help.

Re: WDG for stm32F0 - certified / tested?

Posted: Fri Sep 02, 2016 8:49 pm
by Giovanni
Hi,

It has not yet been tested on F0 (or it would have a demo), moving the the bug report section.

Giovanni

Re: WDG for stm32F0 - certified / tested?

Posted: Mon Oct 03, 2016 11:19 am
by Giovanni
Bumped.

Re: WDG for stm32F0 - certified / tested?

Posted: Tue Oct 04, 2016 10:47 am
by Giovanni
Hi,

I added a WDG demo for the STM32F0, apparently it works as-is, there must be another cause for the behavior you observed.

The demo is in repository trunk but it should be portable to 16.1.

Giovanni

Re: WDG for stm32F0 - certified / tested?

Posted: Sat Nov 26, 2016 4:54 am
by nullbert
Thank you, we'll check it out.