Skip to content

Commit

Permalink
samples: drivers: watchdog stm32 wwdg decrease apb clock
Browse files Browse the repository at this point in the history
The most of the wwdg peripherals requires a reduced apb clock
to pass the sample.drivers.watchdog.stm32_wwdg testcase.
This apb1 prescaler is added to the overlay file
for that particular clock.
Specific overlay for the stm32h7 family because of the APB1
bus clock named d2ppre1.

Signed-off-by: Francois Ramu <[email protected]>
  • Loading branch information
FRASTM authored and fabiobaltieri committed Nov 11, 2022
1 parent 21c4bbe commit 838cd28
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
4 changes: 4 additions & 0 deletions samples/drivers/watchdog/boards/stm32_wwdg.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
};
};

&rcc {
apb1-prescaler = <16>;
};

&wwdg {
status = "okay";
};
Expand Down
10 changes: 10 additions & 0 deletions samples/drivers/watchdog/boards/stm32f3_disco.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2021 Thomas Stranger
* Copyright (c) 2022 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

&rcc {
apb1-prescaler = <8>;
};
24 changes: 24 additions & 0 deletions samples/drivers/watchdog/boards/stm32h7_wwdg.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021 Thomas Stranger
* Copyright (c) 2022 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
aliases {
watchdog0 = &wwdg;
};
};

&rcc {
d2ppre1 = <16>;
};

&wwdg {
status = "okay";
};

&iwdg {
status = "disabled";
};
6 changes: 5 additions & 1 deletion samples/drivers/watchdog/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ tests:
extra_args: DTC_OVERLAY_FILE=boards/stm32_wwdg.overlay
filter: dt_compat_enabled("st,stm32-window-watchdog")
platform_allow: b_u585i_iot02a nucleo_f091rc nucleo_f103rb nucleo_f207zg nucleo_f429zi
nucleo_f746zg nucleo_g071rb nucleo_g474re nucleo_h743zi nucleo_l073rz nucleo_l152re
nucleo_f746zg nucleo_g071rb nucleo_g474re nucleo_l073rz nucleo_l152re
nucleo_wb55rg nucleo_wl55jc stm32f3_disco stm32l562e_dk disco_l475_iot1
sample.drivers.watchdog.stm32h7_wwdg:
extra_args: DTC_OVERLAY_FILE=boards/stm32h7_wwdg.overlay
filter: dt_compat_enabled("st,stm32-window-watchdog")
platform_allow: nucleo_h743zi
sample.drivers.watchdog.stm32_iwdg:
extra_args: DTC_OVERLAY_FILE=boards/stm32_iwdg.overlay
filter: dt_compat_enabled("st,stm32-watchdog")
Expand Down

0 comments on commit 838cd28

Please sign in to comment.