Skip to content

Add watchdog routines for Due. #2210

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

Closed
wants to merge 2 commits into from
Closed

Conversation

bobc
Copy link
Contributor

@bobc bobc commented Jul 27, 2014

I am not sure the wdt_* routines are in the right file, but this illustrates the functionality.

Perhaps it would be better to have a new module called "watchdog.c" to contain these routines, the implementation is specific to processor series.

@matthijskooijman matthijskooijman added Board: Arduino Due Applies only to the Due Component: Core Related to the code for the standard Arduino API Version: 1.5.x labels Sep 11, 2014
@l-mb
Copy link

l-mb commented Jan 15, 2015

Except for one stray newline, the patch looks quite good to me. I'd quite appreciate this functionality to be merged; having a µC detect hangs and recover from them would be extremely useful for long-running projects.

Anything one can do to help this along?

@bobc
Copy link
Contributor Author

bobc commented Jan 15, 2015

Aplogies for delay... :)

I have updated with feedback given by Cristian Maglie in https://groups.google.com/a/arduino.cc/d/msg/developers/_oDWeGC9st4/tIcQOW5L9EUJ

@facchinm
Copy link
Member

facchinm commented Mar 2, 2015

Hi @bobc ,
thanks for your work!
I found a flaw in the patchset regarding the configuration of WDT_MR register.
In fact, asserting WDRPROC bit did not issue a reset on my Due board.
By simply changing the line
timeout = WDT_MR_WDRSTEN | WDT_MR_WDRPROC | WDT_MR_WDV(timeout) | WDT_MR_WDD(timeout);
to
timeout = WDT_MR_WDRSTEN | WDT_MR_WDV(timeout) | WDT_MR_WDD(timeout);
it worked perfectly.
Did it work as committed in your setup? If so, can you try the version with that bit cleared and check if it resets as expected?

@facchinm facchinm self-assigned this Mar 6, 2015
@facchinm facchinm added the Waiting for feedback More information must be provided before we can proceed label Mar 6, 2015
@cmaglie cmaglie added the Architecture: SAM Applies only to the SAM microcontrollers (Due) label Apr 15, 2015
@facchinm
Copy link
Member

facchinm commented May 8, 2015

Merged in #3111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture: SAM Applies only to the SAM microcontrollers (Due) Board: Arduino Due Applies only to the Due Component: Core Related to the code for the standard Arduino API Waiting for feedback More information must be provided before we can proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants