Radarcape:Watchdog: Difference between revisions
imported>Beastadmin No edit summary |
imported>Beastadmin No edit summary |
||
Line 42: | Line 42: | ||
do | do | ||
echo 1 > /sys/class/gpio/gpio60/value | echo 1 > /sys/class/gpio/gpio60/value | ||
sleep | sleep 15 | ||
echo 0 > /sys/class/gpio/gpio60/value | echo 0 > /sys/class/gpio/gpio60/value | ||
sleep | sleep 15 | ||
done | done | ||
</source> | </source> | ||
The toggling loop can also be typed as one-liner: | The toggling loop can also be typed as one-liner: | ||
<source lang="bash">while :; do echo 1 > /sys/class/gpio/gpio60/value; sleep | <source lang="bash">while :; do echo 1 > /sys/class/gpio/gpio60/value; sleep 15; echo 0 > /sys/class/gpio/gpio60/value; echo 'Hit CTRL+C to exit'; sleep 15; done</source> | ||
Revision as of 18:15, 6 July 2016
The tasks described in this manual require advanced knowledge of Unix/Linux. |
Hardware Watchdog Overview
Starting with the 2nd production Batch, the Radarcape is equipped with a MAX6371 hardware watchdog. The hardware watchdog shall ensure that the Radarcape recovers if the system software hangs. This is especially important if the Radarcape is operated at remote locations.
The watchdog listens on GIPO_60 of the BeagleBone board for a toggling signal. If no toggling of the port happend, the BeagleBone board is being reset via the SYS_RESET pin. GIPO_60 must be toggled by software at least once every minute otherwise the Radarcape reboots. Toggling of GIPO_60 is usually being done by the Radarcape daemon (rcd).
Caution:
GIPO_60 must be toggled by software at least once every minute otherwise the Radarcape reboots! This can be problematic if you operate the Radarcape at a remote location without direct hardware access.
Manual Hardware Watchdog Toggling
In certain situations it becomes necessary to temporarily stop or de-install the Radarcape daemon. It becomes necessary to toggle GIPO_60 to hinder the hardware watchdog from rebooting the Radarcape. This can be achived using the following script:
#!/bin/bash
echo *** Configure Watchdog retrigger pin & toggle first time
# Setup GIPO multiplexer (old firmware releases only)
if [ -e "/sys/kernel/debug/omap_mux/gpmc_ben1" ]
then
echo 07 > /sys/kernel/debug/omap_mux/gpmc_ben1
fi
# Export GIPO_60 to /sys filesystem
echo 60 > /sys/class/gpio/export
# Set GIPO_60 direction to output
echo out > /sys/class/gpio/gpio60/direction
# Toggle the pin until the user presses CTRL+C
echo 'Hit CTRL+C to exit'
while 1;
do
echo 1 > /sys/class/gpio/gpio60/value
sleep 15
echo 0 > /sys/class/gpio/gpio60/value
sleep 15
done
The toggling loop can also be typed as one-liner:
while :; do echo 1 > /sys/class/gpio/gpio60/value; sleep 15; echo 0 > /sys/class/gpio/gpio60/value; echo 'Hit CTRL+C to exit'; sleep 15; done
FAQ
F: The file /sys/kernel/debug/omap_mux/gpmc_ben1 does not exist on my Radarcape?
A: This file exists only on old Radarcape firmware. If it does not exist, ignore it and continue with the next command.
F: The message write error: Device or resource busy appears when I execute echo 60 > /sys/class/gpio/export. What shall I do?
A: In this case GIPO_60 has already be exported to the /sys file system. You can unexport it by typing echo 60 > /sys/class/gpio/unexport?