Thanks for the response @ensar. So the watchdog signal is sent periodically by the
power_agent service to the Power HAT’s microcontroller (that is, when the watchdog timer is enabled)?
What I’m trying to achieve is this. I want to run a python program continuously in the field, and ensure that it will automatically restart in the event of an error. Occasionally, I’m encountering a bug in one of the libraries that causes a segmentation fault, which requires that I restart the Raspberry Pi to avoid further issues. I wanted my python script to be responsible for sending the watchdog signal so that if the program crashes (and cannot be restarted by systemctl for whatever reason) that the watchdog timer would expire and reboot the Pi.
I’ve used SixfabPower class in the
power_api to change the watchdog settings, per the API documentation, which appears to work. Can I just disable the
power_agent service and have my script handle sending the watchdog signal?
Also, reiterating my question in the OP, is there any way to have the watchdog timer perform a soft reboot, or is only a hard power reset?