Hardware watchdog

  • Contest Winner

    Hello everyone 🙂
    I want to try to implement hardware watchdog in one of my boards (wall socket insertable nodes). I've received 10pcs of TPS3813K33 chips. I chose this IC as relatively inexpensive solution with large programmable window range. I need to generate heartbeat pulses on dedicated WDI pin. Pulses must be not so frequently but frequently enough to prevent watchdog reset (approximately 1 - 25sec). I use mysensors 2.0 library now but I don't know very well structure of library. May be library has some functionality I can use? So I don't want to invent my bike from scratch 🙂 Now I want to chose one of three (?) variants:

    1. Write separete library
    2. Add functionality to mysensors library
    3. Use existing functionality.

    Thanks for any help!

  • Hardware Contributor

    @Koresh : you can find some stuff about wdt, hardware, and 328p at MyHwATMega328 files. mysensorscore files too. There is also an heartbeat function but not done in this way i think.
    I'm not sure, i let others answer, if for something like this (a bit specific to an external chip) it wouldn't be better outside mysensors, in a specific lib for the application for instance. or use timers etc...
    it depends what you want to do, i'm not sure.

  • Hero Member

    @Koresh Intresting option: to generate a full reset if no sign of life for ... time limit. I would implement this without special library/ MySensors functionality. Just use gw.sleep( xx ms) ; and generate a pulse every xx ms in the main loop.

Log in to reply

Suggested Topics

  • 53
  • 10
  • 15
  • 182
  • 4
  • 1
  • 10
  • 7