subsys: task_wdt: Add suspend and resume#87590
Merged
kartben merged 2 commits intozephyrproject-rtos:mainfrom Apr 2, 2025
Merged
subsys: task_wdt: Add suspend and resume#87590kartben merged 2 commits intozephyrproject-rtos:mainfrom
kartben merged 2 commits intozephyrproject-rtos:mainfrom
Conversation
martinjaeger
reviewed
Apr 2, 2025
Member
martinjaeger
left a comment
There was a problem hiding this comment.
Thanks for the nice improvement. Looks good, only found a minor language nit-pick.
e9b05c5 to
c099de7
Compare
The hardware watchdog optionally used by the Task Watchdog can support being automatically paused when the system enters a sleep power state. Add a Kconfig flag to enable such feature. Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
The goal is to be able to use the Task Watchdog on a system that is also using power management to reach low-power modes. In some low-power modes, the watchdog channels can't be feed anymore. The task_wdt_suspend() function allows to prepare the Task Watchdog for a system low-power mode, in which the hardware watchdog (if enabled) is also suspended. The task_wdt_resume() function will reschedule the internal timer that manages the channels, feed all channels and also the hardware watchdog. Thus, the application is good to go and has enough time to feed the channels by itself. Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
c099de7 to
a30cc6c
Compare
martinjaeger
approved these changes
Apr 2, 2025
Member
|
I will ask for a second review on Discord. |
Contributor
Author
Thanks ! |
henrikbrixandersen
approved these changes
Apr 2, 2025
Member
henrikbrixandersen
left a comment
There was a problem hiding this comment.
Looks good. It would be nice to have test cases for the added functionality.
Member
Thanks for the quick review! Unfortunately, we don't currently have tests for the task watchdog at all... its on my ToDo list for "when I find some time". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
suspendandresumefunctions that allow to pause the Task Watchdog internal timer when the system needs to go to a suspend state.Also add a Kconfig option to enable pausing the fallback hardware watchdog.