samples: drivers: watchdog application running on stm32 boards
Adding configuration to run the watchdog sample application on the stm32 boards through 2 common overlay files: one for running on the IWDG one for WWDG, if compatible. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
1679c650a7
commit
8ec02948c5
5 changed files with 43 additions and 53 deletions
|
@ -1,17 +1,3 @@
|
||||||
/ {
|
|
||||||
aliases {
|
|
||||||
watchdog0 = &wwdg;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&rcc {
|
&rcc {
|
||||||
apb1-prescaler = <16>;
|
apb1-prescaler = <16>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&wwdg {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&iwdg {
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
|
|
|
@ -4,20 +4,6 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/ {
|
|
||||||
aliases {
|
|
||||||
watchdog0 = &wwdg;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&rcc {
|
&rcc {
|
||||||
apb1-prescaler = <4>;
|
apb1-prescaler = <4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&wwdg {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&iwdg {
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
|
|
19
samples/drivers/watchdog/boards/stm32_iwdg.overlay
Normal file
19
samples/drivers/watchdog/boards/stm32_iwdg.overlay
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 Thomas Stranger
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
watchdog0 = &iwdg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&iwdg {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wwdg {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
|
@ -1,30 +1,29 @@
|
||||||
sample:
|
sample:
|
||||||
name: Watchdog Driver Sample
|
name: Watchdog Driver Sample
|
||||||
|
common:
|
||||||
|
tags: drivers watchdog
|
||||||
|
harness: console
|
||||||
|
harness_config:
|
||||||
|
type: multi_line
|
||||||
|
ordered: true
|
||||||
|
regex:
|
||||||
|
- "Watchdog sample application"
|
||||||
|
- "Feeding watchdog..."
|
||||||
|
- "Waiting for reset..."
|
||||||
|
- "Watchdog sample application"
|
||||||
|
depends_on: watchdog
|
||||||
tests:
|
tests:
|
||||||
sample.drivers.watchdog:
|
sample.drivers.watchdog:
|
||||||
tags: drivers
|
filter: not CONFIG_SOC_FAMILY_STM32
|
||||||
harness: console
|
sample.drivers.watchdog.stm32_wwdg:
|
||||||
harness_config:
|
extra_args: DTC_OVERLAY_FILE=boards/stm32_wwdg.overlay
|
||||||
type: multi_line
|
|
||||||
ordered: true
|
|
||||||
regex:
|
|
||||||
- "Watchdog sample application"
|
|
||||||
- "Feeding watchdog..."
|
|
||||||
- "Waiting for reset..."
|
|
||||||
- "Watchdog sample application"
|
|
||||||
depends_on: watchdog
|
|
||||||
filter: not dt_compat_enabled("st,stm32-window-watchdog")
|
|
||||||
sample.drivers.watchdog.stm32wwdg:
|
|
||||||
tags: drivers
|
|
||||||
harness: console
|
|
||||||
harness_config:
|
|
||||||
type: multi_line
|
|
||||||
ordered: true
|
|
||||||
regex:
|
|
||||||
- "Watchdog sample application"
|
|
||||||
- "Feeding watchdog..."
|
|
||||||
- "Waiting for reset..."
|
|
||||||
- "Watchdog sample application"
|
|
||||||
tags: drivers watchdog
|
|
||||||
filter: dt_compat_enabled("st,stm32-window-watchdog")
|
filter: dt_compat_enabled("st,stm32-window-watchdog")
|
||||||
depends_on: 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_wb55rg nucleo_wl55jc stm32f3_disco stm32l562e_dk disco_l475_iot1
|
||||||
|
sample.drivers.watchdog.stm32_iwdg:
|
||||||
|
extra_args: DTC_OVERLAY_FILE=boards/stm32_iwdg.overlay
|
||||||
|
filter: dt_compat_enabled("st,stm32-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_wb55rg nucleo_wl55jc stm32f3_disco stm32l562e_dk disco_l475_iot1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue