Title: How does the watchdog work? · feilipu/Arduino_FreeRTOS_Library · Discussion #117 · GitHub
Open Graph Title: How does the watchdog work? · feilipu/Arduino_FreeRTOS_Library · Discussion #117
X Title: How does the watchdog work? · feilipu/Arduino_FreeRTOS_Library · Discussion #117
Description: How does the watchdog work?
Open Graph Description: Hi! I am a bit confused by how the watchdog works in Arduino FreeRTOS. As I have to run my Unity tests in a task to use delay and stuff like that, it seems that I am triggering the watchdog. If I t...
X Description: Hi! I am a bit confused by how the watchdog works in Arduino FreeRTOS. As I have to run my Unity tests in a task to use delay and stuff like that, it seems that I am triggering the watchdog. If I t...
Opengraph URL: https://github.com/feilipu/Arduino_FreeRTOS_Library/discussions/117
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How does the watchdog work?","text":"\u003cp dir=\"auto\"\u003eHi!\u003cbr\u003e\nI am a bit confused by how the watchdog works in Arduino FreeRTOS.\u003cbr\u003e\nAs I have to run my Unity tests in a task to use delay and stuff like that, it seems that I am triggering the watchdog.\u003cbr\u003e\nIf I try to set the watchdog, changing portUSE_WDTO instead seems to cause other things to change that also may cause the watchdog to trigger.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTBH, it is very difficult to troubleshoot this, at least to me, so if anyone have an idea what to do, I'd be very happy. :-)\u003c/p\u003e","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eI'm not 100% sure how to answer your question, or perhaps to address your underlying concern.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe AVR ATmega Watchdog Timer (WDT) is a simple counter that can be configured on roll-over to a) reset the MCU, b) trigger an interrupt, c) trigger and interrupt and if the interrupt is unserviced reset the MCU on the next counter roll-over. The counter is incremented by an integrated oscillator, independent of any other oscillators in the MCU, which runs at nominally 128kHz.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIn Arduino FreeRTOS the WDT is configured to firstly interrupt at roll-over and then at the second roll-over then reset the MCU. If you keep the global interrupt disabled for extended times then you will find that your MCU is resetting, but really 15ms + 15ms at 16MHz is a very long time.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThere are \u003ca href=\"https://github.com/feilipu/Arduino_FreeRTOS_Library/issues/113\" data-hovercard-type=\"issue\" data-hovercard-url=\"/feilipu/Arduino_FreeRTOS_Library/issues/113/hovercard\"\u003eissue\u003c/a\u003e and \u003ca href=\"https://github.com/feilipu/Arduino_FreeRTOS_Library/issues/114\" data-hovercard-type=\"issue\" data-hovercard-url=\"/feilipu/Arduino_FreeRTOS_Library/issues/114/hovercard\"\u003eissue \u003c/a\u003ehere on the Arduino delay function, and the FreeRTOS delay function.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ePerhaps they will cast some light on the question for you too?\u003c/p\u003e","upvoteCount":2,"url":"https://github.com/feilipu/Arduino_FreeRTOS_Library/discussions/117#discussioncomment-5247500"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:e1e1aea6-7309-e254-b6cb-13d7201f51f6 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | DB28:10A7C3:28AB3B:3AA27C:6A61E2E7 |
| html-safe-nonce | 3d97d4637fd9b6bcd12d246aa81eff9d43c0d4744c7ea29d6020414d83b8d45b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjI4OjEwQTdDMzoyOEFCM0I6M0FBMjdDOjZBNjFFMkU3IiwidmlzaXRvcl9pZCI6IjUxNzQ5NTgxMDA0NzU2NjcxNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7b4746f1aaf3d4e2bd03ca0d8f9ca110ab90b2b7a304f496b87abeb1621741a0 |
| hovercard-subject-tag | discussion:4942835 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/feilipu/Arduino_FreeRTOS_Library/117/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/68fedbc51a82b287b03ca814a63b98eeb032ed68e047fc4a46b7386aaffe246b/feilipu/Arduino_FreeRTOS_Library/discussions/117 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/68fedbc51a82b287b03ca814a63b98eeb032ed68e047fc4a46b7386aaffe246b/feilipu/Arduino_FreeRTOS_Library/discussions/117 |
| og:image:alt | Hi! I am a bit confused by how the watchdog works in Arduino FreeRTOS. As I have to run my Unity tests in a task to use delay and stuff like that, it seems that I am triggering the watchdog. If I t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| turbo-cache-control | no-preview |
| go-import | github.com/feilipu/Arduino_FreeRTOS_Library git https://github.com/feilipu/Arduino_FreeRTOS_Library.git |
| octolytics-dimension-user_id | 3955592 |
| octolytics-dimension-user_login | feilipu |
| octolytics-dimension-repository_id | 46898167 |
| octolytics-dimension-repository_nwo | feilipu/Arduino_FreeRTOS_Library |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 46898167 |
| octolytics-dimension-repository_network_root_nwo | feilipu/Arduino_FreeRTOS_Library |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width