Skip to content

{bp-17045} arch/arm/stm32h7: Fix and enhance WWDG (Window Watchdog) support#17094

Merged
xiaoxiang781216 merged 1 commit intoapache:releases/12.11from
jerpelea:bp-17045
Sep 27, 2025
Merged

{bp-17045} arch/arm/stm32h7: Fix and enhance WWDG (Window Watchdog) support#17094
xiaoxiang781216 merged 1 commit intoapache:releases/12.11from
jerpelea:bp-17045

Conversation

@jerpelea
Copy link
Contributor

Summary

This patch addresses several issues and adds enhancements to the WWDG (Window Watchdog) implementation for the STM32H7 platform. The changes include:

  • Extend the definitions of WWDG_CFR_PCLK1 macros to support dividers up to 128, and update the stm32_settimeout() function to consider this extended range.
  • Fix the "elapsed" calculations in the stm32_getstatus() function to ensure correct time remaining calculations.
  • Clear the EWIF (Early Wakeup Interrupt Flag) bit in the stm32_start() function, as this bit might be set by hardware before the watchdog is actually started.
  • Initialize the WWDG clock in the RCC_APB3ENR register and set the RCC_GCR_WW1RSC bit as per the STM32 reference manual to ensure proper behavior when enabling the WWDG1.

Impact

RELEASE

Testing

CI

This patch addresses several issues and adds enhancements to the WWDG
(Window Watchdog) implementation for the STM32H7 platform. The changes
include:

- Extend the definitions of WWDG_CFR_PCLK1 macros to support dividers
  up to 128, and update the stm32_settimeout() function to consider this
  extended range.
- Fix the "elapsed" calculations in the stm32_getstatus() function to
  ensure correct time remaining calculations.
- Clear the EWIF (Early Wakeup Interrupt Flag) bit in the stm32_start()
  function, as this bit might be set by hardware before the watchdog is
  actually started.
- Initialize the WWDG clock in the RCC_APB3ENR register and set the
  RCC_GCR_WW1RSC bit as per the STM32 reference manual to ensure proper
  behavior when enabling the WWDG1.

Signed-off-by: Szymon Magrian <szymon.magrian@hexagon.com>
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Size: S The size of the change in this PR is small labels Sep 26, 2025
@xiaoxiang781216 xiaoxiang781216 merged commit 94ad260 into apache:releases/12.11 Sep 27, 2025
25 checks passed
@jerpelea jerpelea deleted the bp-17045 branch September 28, 2025 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants