A hardware watchdog for a Raspberry Pi using an AVR
C Assembly C++ Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.hgsigs
.hgtags
ATmegaBOOT_168_pihelp.hex
Makefile
README.md
aes.c
aes.h
buildid.h
byteordering.c
byteordering.h
cli.h
config.h
crc8.c
crc8.h
debug.h
ds18x20.h
fat.c
fat.h
fat_config.h
hmac-sha1.c
hmac-sha1.h
main.c
onewire.c
onewire.h
partition.c
partition.h
partition_config.h
pihelp.atsln
pihelp.atsuo
pihelp.cproj
pihelp.graffle
pihelp.png
sd-reader_config.h
sd_raw.c
sd_raw.h
sd_raw_config.h
sha1-asm.S
sha1.c
sha1.h
simple_ds18b20.c
simple_ds18b20.h
test.py

README.md

A hardware watchdog for a Raspberry Pi. It uses an atmega328 attached to the Raspberry Pi's serial port, with a simple command line interface.

It will reset the Raspberry Pi if either a long or short watchdog timer isn't reset within a time period. It will also toggle a pin to alternate between booting to kernel_emergency.img and the normal kernel - see http://elinux.org/RPI_safe_mode . This makes it less risky to upgrading the boot image remotely. There are a few other features such as a bodgy random number generator and hmac. The 'oneshot' watchdog lets you set a failsafe so that if you try something that doesn't work, it'l reboot after a set period of time.

A rough list of functionality is in the read handler.

I implemented this to use with PCextreme's Raspberry Colocation.

The system boots an initramfs as a bootloader with SSH - Dropbear of course. I then boot the real kernel with kexec - that allows low-risk upgrades over the network.

schematic