User Tools

Site Tools


snippets:watchdog

This is an old revision of the document!


Watchdog timer

The watchdog timer is used to reset the processor, when the software gets blocked.
Once enabled, the 32bit watchdog timer register gets decremented every clock cycle. If the Toggle Watchdog C-Node is executed, the watchdog timer register is reloaded with the value given by the Enable Watchdog C-Node.
If the watchdog timer register reaches zero before it is toggled the processor is reseted and the flashed program is booted and executed from start.
Typically the “enable watchdog” is executed at program start and “toggle watchdog” is executed in the application main loop once on every iteration.



drag and drop this VI snippet into a LabVIEW block diagram.








notes:

  • This c-nodes work on any target, but only in compiled mode
  • Once the watchdog is enabled, debugging gets complicated. For this reason add the watchdog only at the very end of a development cycle
  • If you need to survey several parallel loops, insert the “watchdog_toggle” into one loop and survey the loop counters of the others
  • A reset during a file function can corrupt a file system
snippets/watchdog.1365516616.txt.gz · Last modified: 2017/11/07 22:26 (external edit)