Using MBED Watchdog Timer API and managing the timer during sleep cycles.

Home Forums mDot/xDot Using MBED Watchdog Timer API and managing the timer during sleep cycles.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31419
    Ajay K
    Participant

    I was hoping to use the mbed api for watchdog timer on multitech’s mdot. I looked up the API implementation for the watchdog timer for stm32 boards and I noticed that the Stop method on the watchdog timer class throws an unsupported error. So I am trying to figure out how to manage the watchdog timer if the board goes to sleep for a minute or longer depending on the lora join backoff interval. Since the Stop method is unsupported for this platform, how do we prevent the watchdog timer from continuing to count down and cause the reset of the processor on wakeup?

    Thanks,
    Ajay

    #31423
    Ajay K
    Participant

    Any thoughts multitech team?

    #31426
    Jason Reiss
    Keymaster

    Once watchdog is enabled it cannot be turned off. That is why stop is not supported. The device must be reset and watchdog not enabled on startup.

    So sleeping longer than the ~30 second maximum watchdog window would require resetting the device, not enabling the watchdog and going to sleep for an extended time. Otherwise the application must wake-up every ~30 seconds to kick the watchdog.

    Make sense?

    #31430
    Ajay K
    Participant

    Thanks Jason for taking the time to respond. I was wondering if we set the watchdog timer to timeout at a larger timeout say several minutes or a longer interval, so that the mdot doesn’t get reset and during each wake cycle, the first thing we do is kick the watchdog? Is increasing the timeout of the watchdog timer to a larger interval, usually not the best practice?

    Thanks,
    Ajay

    #31431
    Jason Reiss
    Keymaster

    I believe the maximum IWDG watchdog window is around 30 seconds.

    The watchdog class has a get_max_timeout function.

    #31443
    Ajay K
    Participant

    Thanks Jason, I will try the API out and see what the max timeout is?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.