Skip to content

Watchdog timer trait. #75

Open
Open
@xd009642

Description

@xd009642

Setting up a watchdog timer to reset a microcontroller if it isn't serviced at regular intervals is fairly common. Also, from my experience watchdogs tend to be fairly similar and minimalist making them a potentially easy inclusion for a trait. I haven't analysed a large number of controllers but the typical operation seems to be as follows:

  1. Once enabled watchdog cannot be disabled
  2. A bit must be set or cleared periodically or processor is reset
  3. Period length may be configurable
  4. May be able to see current timer value.

I think 1, 2 and 3 would be essential for a watchdog trait, via functions start, kick and set_period. Due to it on some microcontrollers only offering a subset of timer functionality I'm also not sure how much crossover there should be with the timer traits? Open to discussion this is just prompted by some work I've been doing recently with STM32 processors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions