Post by beepdog on May 11, 2019 18:28:46 GMT -8
I've got a board 100217-01-001 hooked up to a raspberry pi. I am powering it via the 3.3v interface,as described in the product brief. I've soldered on the run pin so I can use that to reset the thing.
It doesn't seem to matter if I run this, because the watchdog never resets the RPi. If I unplug it from the GPIO pin, leaving the input pin not connected, it happily resets the rpi on the timeout. What am I missing here?
That reset(RUN) pin does indeed work, so that's fantastic.
However, I'm having problems where the watchdog seems to be perpetually petted. The dog1 timer LED never blinks. dog2 will blink, but not dog1.
If I disconnect the jumper going from dog1 input to my GPIO18 port on the PI, it will blink. So I think somehow my GPIO pin isn't being set up correctly. I do read a value from it when I plug in the thing, so I know I'm hitting the correct pin.
root@pione:/sys/class/gpio/gpio18# cat direction
in
root@pione:/sys/class/gpio/gpio18# cat value
0
root@pione:/sys/class/gpio/gpio18# cat value
1
The gpio is set to input, and it reads 0, until I plug in the cable, at which point it reads 1.
my logic to pet the dog is:
#!/bin/bash
#$1 is the GPIO port
#$2 is the interval
PIN=$1
INTERVAL=$2
echo "Petting watchdog on GPIO $PIN every $INTERVAL seconds"
if [ ! -e /sys/class/gpio/gpio$PIN ]; then
echo "$PIN" > /sys/class/gpio/export
fi
while true; do
echo "out" > /sys/class/gpio/gpio$PIN/direction
echo "0" > /sys/class/gpio/gpio$PIN/value
sleep 0.2
echo "in" > /sys/class/gpio/gpio$PIN/direction
sleep $INTERVAL
done
It doesn't seem to matter if I run this, because the watchdog never resets the RPi. If I unplug it from the GPIO pin, leaving the input pin not connected, it happily resets the rpi on the timeout. What am I missing here?
Another question: What's the expected behavior of the LED? Only blinks when the watchdog triggers a reset? Blinks when it's patted?
Thanks in advance!