BrewPi / firmware

Brewing temperature control firmware for the BrewPi Spark (Particle Photon inside)
http://www.brewpi.com
GNU Affero General Public License v3.0
98 stars 55 forks source link

Watchdog to reset device if it hangs #63

Closed elcojacobs closed 8 years ago

elcojacobs commented 8 years ago

When the device gets truly stuck (for example with read/write error in log), we need a hardware reset.

Particle offers an application watchdog implemented as a high priority FreeRTOS thread (ApplicationWatchdog).

From the particle docs: "The application watchdog requires interrupts to be active in order to function. Enabling the hardware watchdog in combination with this is recommended, so that the system resets in the event that interrupts are not firing."

I agree with the statement above, but the particle docs give no hints on how to implement this hardware watchdog.

elcojacobs commented 8 years ago

From our dev meeting: Particle will provide an API to enable a hardware watchdog later. We will stick with the application watchdog for now. This PR is ready for merging after @m-mcgowan has reviewed it.

m-mcgowan commented 8 years ago

Any reason this was based on command-buffer and not develop?

elcojacobs commented 8 years ago

As stated in the PR: "This PR should be changed to be merged into develop when the display optimizations have been merged into it."

I used display-command-buffer as the base branch so you would not get all the commits from the display buffer in the diff (which were not yet merged in develop)