Radarcape:Watchdog: Difference between revisions
imported>Beastadmin Created page with "=Hardware Watchdog Retriggering= Starting with the 2nd production batch of the Radarcape, there is an external hardware watchdog foreseen. Due to the nature of the device, ru..." |
imported>Beastadmin No edit summary |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | |||
Starting with the 2nd production | {| | ||
|[[File:Expert.png|For Experts]] | |||
|''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 watchdogs shall reboot the Radarcape in the case that the software hangs. This is especially important if the Radarcape is operated at remote locations or without a human operator available for a manual reboot. The AM3335 internal watchdog is not sufficient for such cases as it can only become activated after Linux has booted, so early faults would not be covered then. | |||
The watchdog listens on GPIO_60 of the BeagleBone board for a toggling signal. If GIPO_60 has not been toggled within 1 minute, the BeagleBone board is being reset via the SYS_RESET pin. GPIO_60 must be toggled by software at least once every minute otherwise the Radarcape reboots. Toggling of GPIO_60 is usually being done by the Radarcape softawre (rcd). The very first timeout after power-on is 2 minutes, which leaves plenty of time for even reflashing the whole eMMC card. | |||
==Manual Hardware Watchdog Toggling== | |||
In certain situations it becomes necessary to temporarily stop or even de-install the Radarcape daemon. It then is necessary to toggle GPIO_60 by other ways to hinder the hardware watchdog from rebooting the Radarcape. This can be achived using the following script: | |||
<source lang="bash"> | <source lang="bash"> | ||
#!/bin/bash | |||
echo *** Configure Watchdog retrigger pin & toggle first time | echo *** Configure Watchdog retrigger pin & toggle first time | ||
echo 07 > /sys/kernel/debug/omap_mux/gpmc_ben1 | |||
# Setup GPIO 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 GPIO_60 to /sys filesystem | |||
echo 60 > /sys/class/gpio/export | echo 60 > /sys/class/gpio/export | ||
# Set GPIO_60 direction to output | |||
echo out > /sys/class/gpio/gpio60/direction | echo out > /sys/class/gpio/gpio60/direction | ||
echo 1 > /sys/class/gpio/gpio60/value | |||
echo 0 > /sys/class/gpio/gpio60/value | # 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 | |||
</source> | </source> | ||
The toggling loop can also be typed as one-liner: | |||
<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> | |||
==FAQ== | |||
'''F:''' The file /sys/kernel/debug/omap_mux/gpmc_ben1 does not exist on my Radarcape?<br> | |||
'''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?<br> | |||
'''A:''' In this case GPIO_60 has already be exported to the /sys file system. You can unexport it by typing ''echo 60 > /sys/class/gpio/unexport''? |
Latest revision as of 17:40, 22 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 watchdogs shall reboot the Radarcape in the case that the software hangs. This is especially important if the Radarcape is operated at remote locations or without a human operator available for a manual reboot. The AM3335 internal watchdog is not sufficient for such cases as it can only become activated after Linux has booted, so early faults would not be covered then.
The watchdog listens on GPIO_60 of the BeagleBone board for a toggling signal. If GIPO_60 has not been toggled within 1 minute, the BeagleBone board is being reset via the SYS_RESET pin. GPIO_60 must be toggled by software at least once every minute otherwise the Radarcape reboots. Toggling of GPIO_60 is usually being done by the Radarcape softawre (rcd). The very first timeout after power-on is 2 minutes, which leaves plenty of time for even reflashing the whole eMMC card.
Manual Hardware Watchdog Toggling
In certain situations it becomes necessary to temporarily stop or even de-install the Radarcape daemon. It then is necessary to toggle GPIO_60 by other ways 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 GPIO 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 GPIO_60 to /sys filesystem
echo 60 > /sys/class/gpio/export
# Set GPIO_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 GPIO_60 has already be exported to the /sys file system. You can unexport it by typing echo 60 > /sys/class/gpio/unexport?