====== Using the HAL with a Watchdog Timer ====== In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/hal/HalTest3.cpp|HalTest3.cpp]]. The system uses real hardware inputs and output with [[eeros_architecture:hal:hardware_libraries#flink|]]. You also need to install the necessary wrapper library for flink, see [[getting_started:install_wrapper|]]. Open a shell in the build directory of your EEROS library and run $ ./halTest3 -c HalTest3ConfigFlink.json // for flink This examples creates a small control system. The state of a peripheral input is mirrored to a peripheral output. The time domain of the control system is checked with a watchdog timer. Omit adding the watchdog block to the time domain (comment line 27 out), recompile the example and observe what is happening. The watchdog timeout is set in the configuration file to 4.5s. The periodic task will once per second printout the state of the watchdog. As soon as the watchdog times out, the safety system will switch to its off state due to the critical input being ''false''.