WDG for stm32F0 - certified / tested? Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
nullbert
Posts: 19
Joined: Tue Aug 30, 2016 7:12 pm
Been thanked: 1 time

WDG for stm32F0 - certified / tested?

Postby nullbert » Fri Sep 02, 2016 7:32 pm

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.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: WDG for stm32F0 - certified / tested?

Postby Giovanni » Fri Sep 02, 2016 8:49 pm

Hi,

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

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: WDG for stm32F0 - certified / tested?

Postby Giovanni » Mon Oct 03, 2016 11:19 am

Bumped.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: WDG for stm32F0 - certified / tested?  Topic is solved

Postby Giovanni » Tue Oct 04, 2016 10:47 am

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

nullbert
Posts: 19
Joined: Tue Aug 30, 2016 7:12 pm
Been thanked: 1 time

Re: WDG for stm32F0 - certified / tested?

Postby nullbert » Sat Nov 26, 2016 4:54 am

Thank you, we'll check it out.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests