Skip to content

watchdog: cmsdk_apb: handle non-secure watchdog #89025

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

owuatmosic
Copy link

The original CMSDK Watchdog driver assumes that the watchdog triggers an NMI. However, when the TrustZone security extension is implemented, a non-secure variant of the watchdog timer is instantiated, which raises a separate interrupt instead.
Since the secure watchdog raises a combined NMI and does not require an interrupts property in the DTS, whereas the non-secure one does, it seems reasonable to use this distinction to determine which instance is being referenced.

This proposed pull request updates the driver to support such configurations, enabling successful execution of the following test cases:
Platform: Atmosic ATM34
Core: ARM Cortex-M33F
ZTEST passed:

tests/drivers/watchdog/wdt_basic_api
tests/drivers/watchdog/wdt_basic_reset_none

The CMSDK watchdog driver is currently not handling the non-secure
watchdog interrupt. This commit adds the necessary code to handle the
non-secure interrupt and ensure that the watchdog timer is properly
managed in both secure and non-secure modes.

Signed-off-by: Oscar Wu <[email protected]>
@github-actions github-actions bot added the area: Watchdog Watchdog label Apr 24, 2025
@owuatmosic
Copy link
Author

Closed the previous PR as it was messed up during the sync and rebase process, which unintentionally introduced hundreds of commits into the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant