Enabling hardware watchdog timer on the Raspberry Pi CM3

Hi all,

I found an article describing how to enable the Raspberry Pi hardware watchdog timer to have devices recover from any potential hardware or kernel lockups:

Other than a Balena post from 2016 at Keeping Your System Running with a Host OS Watchdog and a few mentions on the Balena forum I could not find any clear documentation.

My questions:

  • Is it possible to enable the hardware watchdog timer on recent versions of BalenaOS?
  • Is this in any way bad practice?

We are running a Compute Module 3 using the Raspberry Pi 3 32bit BalenaOS base image.

Thanks!

Bart

What is your use case? balenaOS already utilizes the hardware watchdog as part of a chain of health checks to ensure the device is always available and responsive. If you’re looking to restart your application when it becomes unresponsive, you might be better off looking into docker-compose file’s “healthcheck” directive that balenaOS also supports: Compose file version 2 reference | Docker Documentation

We are sporadically seeing issues with the camera module that we are using on the Pi which looks similar to the one posted here: Experiencing hung raspberry pi while using camera - Arducam. Sometimes this seems to lead to our devices losing connection.

I am already in contact with your colleagues in another support thread trying to get to the root cause, but I figured it would be good to see if there are any measures we can take to at least make the device recover if it gets into this state.

Good to know that balenaOS already utilizes the hardware watchdog. That answers my question. Thanks!