How about using the watchdog timer (remember to kick the dog periodically)?