Watchdog
Watchdogs are used to monitor the DINGO device and the DINGO-Stack software that is running on it. If the system unexpectedly freezes the hardware or software will be rebooted or restarted.
The DINGO device has a hardware watchdog and a software watchdog. The difference is that the hardware watchdog resets the system automatically, if the shutdown is not periodically prevented by software. The software watchdog will restart the DINGO-Stack if not prevented. The software watchdog can only do something, when it is given CPU time. Thus it can fail to respond to a total system crash.
Linux watchdog: This affects the settings for the hardware watchdog .Here the option is to choose between Disabled, 10 sec., 15 sec. or 20 sec.. If Disabled is chosen, then the hardware watchdog gets disabled. If any of the time intervals are chosen, then the watchdog will be programmed to automatically reboot the system if it is not contacted within the specified interval. The system manager will ensure to contact it at least once in half the specified timeout interval. This setting only works if the device has a hardware watchdog installed.
The grid shows one record. The record has an identifier, states if the watchdog setup is active or not, the name of the watchdog setup and shows to what controller the setup is attached. If the controller name has a green triangle in front of it, it means that the watchdog setup is attached to the active controller. It is important that the watchdog setup is attached to the active controller.
Selecting the record in the grid and then clicking the Edit button brings up a window where the setup can be edited.
Peripheral setup: This is the name of the attached controller. To choose a controller click the ... button to the left of the field. A window with a list of controllers appears. Make sure to select the active controller (the controller with a green triangle in front of it).
Active: This check-box determines if the setup should be active or not.
Name: This is the name of the watchdog setup.
Frequency sec.: Is the frequency at which a request is sent to the threads that are subscribed to use the watchdog. The threads need to respond to this request within a specified time frame.
Thread timeout sec.:Is the maximum timeout that the subscribing threads are allowed to respond within, to the watchdogs request.
Description: Describes the purpose of the watchdog setup.
If there are threads that do not respond to the watchdogs request within a specific time frame, then some shutdown methods are executed in a specific order. These shutdown methods can be added, edited or deleted in the grid within the Shutdown methods expander.
Order: The order at which the shutdown method is executed.
Type. The options are Software, Hard reset, Cold boot or Daemon shutdown.
If Daemon shutdown is chosen then all other fields are disabled, and if this method is executed, it will terminate the DINGO-Stack service. The DINGO-Stack service will then be automatically restarted by the Linux service manager.
Heartbeat mS.: If the Type is Software, then this field specifies the time frame in milliseconds that the DINGO-Stack has to send a heartbeat to the watchdog, within the Linux service manager. If the service manager does not get this heartbeat within the time frame, then it will restart the service that runs the DINGO-Stack.If the milliseconds are set to zero then the watchdog in the Linux service manager is disabled.
If the Type is Hard reset or Cold boot, then this field specifies the max. timeout before the watchdog activates shutdown.
This field is disabled if the Type is Daemon shutdown.
Timeout shutdown fail mS.: This field specifies in milliseconds how long the watchdog will wait until it executes the next shutdown method. This field is disabled if the Type is Daemon shutdown.
GPIO heartbeat hard reset: States the GPIO number for the heartbeat. If it is set to -1, then it indicates that it is not used. This field is disabled if the Type is Softwareor Daemon shutdown.
GPIO enable hard reset: States the GPIO number for activating the watchdog. If it is set to -1, then it indicates that it is not used. This field is disabled if the Type is Softwareor Daemon shutdown.
GPIO active state: The value of the active state. 1 = Active, 0 = Inactive. This field is disabled if the Type is Softwareor Daemon shutdown.