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

subsys: task_wdt: Add suspend and resume #87590

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RICCIARDI-Adrien
Copy link
Contributor

Add a suspend and resume functions 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.

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>
@zephyrbot zephyrbot added the area: Task Watchdog Task Watchdog subsystem label Mar 24, 2025
@zephyrbot zephyrbot requested a review from martinjaeger March 24, 2025 20:29
@RICCIARDI-Adrien RICCIARDI-Adrien changed the title Task Watchdog: Add suspend resume subsys: task_wdt: Add suspend and resume Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Task Watchdog Task Watchdog subsystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants