[watchdog, stm32wb, tests] Implement watchdog abstraction. Implement IWDG/WWDG drivers for STM32WB. Implement generic watchdog test#28
Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom Apr 8, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a generic watchdog abstraction to wolfHAL, adds STM32WB implementations for both IWDG and WWDG, and wires up a hardware test intended to validate watchdog refresh/reset behavior across a reboot.
Changes:
- Add
whal_Watchdoggeneric API + driver vtable, and include it in the umbrellawolfHAL.h. - Implement STM32WB IWDG/WWDG drivers and add STM32WB board integration (device macros, clock/LSI enable).
- Add a multi-phase watchdog hardware test and hook it into the test runner.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
wolfHAL/wolfHAL.h |
Exposes watchdog API through the top-level include. |
wolfHAL/watchdog/watchdog.h |
Defines the generic watchdog abstraction + vtable API. |
wolfHAL/watchdog/stm32wb_iwdg.h |
Declares STM32WB IWDG config + driver entry points. |
wolfHAL/watchdog/stm32wb_wwdg.h |
Declares STM32WB WWDG config + driver entry points. |
wolfHAL/platform/st/stm32wb55xx.h |
Adds STM32WB55 watchdog device/clock macros. |
wolfHAL/clock/stm32wb_rcc.h |
Adds RCC API to enable/disable LSI (needed by IWDG). |
src/watchdog/watchdog.c |
Implements generic watchdog call-through wrappers. |
src/watchdog/stm32wb_iwdg.c |
Implements STM32WB IWDG driver. |
src/watchdog/stm32wb_wwdg.c |
Implements STM32WB WWDG driver. |
src/clock/stm32wb_rcc.c |
Implements LSI enable/ready wait logic. |
boards/stm32wb55xx_nucleo/Makefile.inc |
Adds watchdog build flags and sources. |
boards/stm32wb55xx_nucleo/board.h |
Exposes g_whalWatchdog for board/test usage. |
boards/stm32wb55xx_nucleo/board.c |
Instantiates watchdog + enables LSI for IWDG. |
tests/watchdog/test_watchdog.c |
Adds a multi-phase watchdog reset/refresh hardware test. |
tests/main.c |
Adds conditional execution of the watchdog test suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…IWDG/WWDG drivers for STM32WB. Implement generic watchdog test
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.
No description provided.