The watchdog is normally disabled. To enable it, set GPIO6 pin to high. While GPIO6 is
high, the Strato Pi CAN micro-controller will watch for state changes of the GPIO5
heartbeat pin. You should ensure that GPIO5 flips its state between high and low faster
than every 60 seconds.
If the Strato Pi CAN micro-controller doesn't see GPIO5 changing state for more than 60
seconds, it will initiate a shutdown procedure, rising the GPIO12 timeout pin to high, to
signal your code that a watchdog timeout has occurred.
If possible, you should immediately initiate a software shutdown on Raspberry Pi, and set
the GPIO16 shutdown pin to high. When GPIO16 is set to high or 60 seconds after the
timeout, Strato Pi CAN will wait 60 seconds more, then power cycle the Raspberry Pi.
Note that Strato Pi CAN will power cycle the Raspberry Pi even if GPIO16 is not set high.
In this case the power cycles occurs 120 seconds after the heartbeat timeout.
See "Advanced configuration" below for alternative configurations.
Enable the watchdog:
$ sudo strato watchdog enable
Disable the watchdog:
$ sudo strato watchdog disable
Send the heartbeat:
$ sudo strato watchdog heartbeat
Print "1" if the watchdog timeout is expired, "0" if not:
$ sudo strato watchdog timeout; echo $?
Power cycle
You can start a delayed power cycle by rising Raspberry Pi's GPIO16 pin for at least one
second.
When GPIO16 is set to high, Strato Pi CAN will wait 60 seconds and then power off the Pi
board for 5 seconds.
See "Advanced configuration" below for alternative configurations.
To initiate a delayed power off cycle:
$ sudo strato shutdown
Advanced configuration
The Strato Pi CAN logic controller can be configured from the Raspberry Pi to change the
default behavior and timing parameters of the hardware watchdog and the power cycle
functionalities.
The RX/TX switching mode (TX-Enable control) of the RS-485 serial port is also
configurable. Other than the default automatic switching, passive mode as well as fixed
serial parameters settings are available.
23
Strato Pi CAN User Guide
Need help?
Do you have a question about the Strato Pi CAN SPBC12X and is the answer not in the manual?