Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a watchdog timer to guard against fatal errors #17

Open
Wallacoloo opened this issue Sep 27, 2014 · 0 comments
Open

Use a watchdog timer to guard against fatal errors #17

Wallacoloo opened this issue Sep 27, 2014 · 0 comments

Comments

@Wallacoloo
Copy link
Owner

Printipi is fairly good at catching Unix signals and safely shutting down when it's asked too. However, in the case of the system freezing (or other extreme situations), the I/O might go a dangerously long time before being serviced. The primary source of concern is a runaway heater.

If the program exits crudely or freezes, then the heater pin might get stuck 'high'. One way to counter this issue is by using a Watchdog Timer - if the program goes so long without periodically clearing this timer, then the Raspberry Pi will automatically be reset. Upon reset, all the Pi's pins are floating, so the heater would default to low through its hardware pull-down resistor.

Watchdog timers run as cpu peripherals, so are resistant to freezes virtually everywhere. The bcm2708_wdog kernel module interfaces with the watchdog timer. It may even be possible to access it from userland the same way that DMA is. However, care must be taken to ensure that no other service is clearing our watchdog timer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant