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

Feature/app watchdog #860

Merged
merged 5 commits into from
Feb 5, 2016
Merged

Feature/app watchdog #860

merged 5 commits into from
Feb 5, 2016

Conversation

m-mcgowan
Copy link
Contributor

Provides a critical-priority thread that wakes up at a given timeout interval to see if the application has checked in.

API:

// declare a global instance
ApplicationWatchdog wd(timeout_milli_seconds, timeout_function_to_call, stack_size=512);
  • if the application has not exited loop, or called Particle.process() within the given timeout, the watchdog calls the given timeout function.
  • A default stack size of 512 is used for the thread. The stack can be made larger or smaller as needed.

Example:

ApplicationWatchdog wd(60000, System.reset);
// reset the system after 60 seconds if the application is unresponsive

The application watchdog requires interrupts to be active in order to function. Enabling the hardware watchdog in tandem with this is advised to detect when interrupts are not firing.

…s to `concurrent_hal_impl.h`. This mirrors the include path as it is for the Photon.
@m-mcgowan m-mcgowan added this to the 0.5.x milestone Feb 5, 2016
m-mcgowan added a commit that referenced this pull request Feb 5, 2016
@m-mcgowan m-mcgowan merged commit 35a7851 into develop Feb 5, 2016
@m-mcgowan m-mcgowan mentioned this pull request Mar 17, 2016
17 tasks
@m-mcgowan m-mcgowan deleted the feature/app_watchdog branch September 27, 2016 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants