This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit b81c4d3aa6ab2ffe490bae498bfc74f056bf26d6 Author: raiden00pl <raide...@railab.me> AuthorDate: Mon Apr 7 11:29:59 2025 +0200 boards/nucleo-c071rb: add watchdog support boards/nucleo-c071rb: add watchdog support and enable IWDG for jumbo configuration Signed-off-by: raiden00pl <raide...@railab.me> --- boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig | 3 +++ boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_bringup.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig index 658c6d1628..d80216584f 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig @@ -38,6 +38,7 @@ CONFIG_EXAMPLES_ADC_GROUPSIZE=2 CONFIG_EXAMPLES_ADC_SWTRIG=y CONFIG_EXAMPLES_BUTTONS=y CONFIG_EXAMPLES_HELLO=y +CONFIG_EXAMPLES_WATCHDOG=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1536 CONFIG_INPUT=y @@ -65,7 +66,9 @@ CONFIG_START_YEAR=2013 CONFIG_STDIO_DISABLE_BUFFERING=y CONFIG_STM32F0L0G0_ADC1=y CONFIG_STM32F0L0G0_DMA1=y +CONFIG_STM32F0L0G0_IWDG=y CONFIG_STM32F0L0G0_USART2=y +CONFIG_STM32F0L0G0_WWDG=y CONFIG_SYSTEM_NSH=y CONFIG_TASK_NAME_SIZE=0 CONFIG_USART2_SERIAL_CONSOLE=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_bringup.c b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_bringup.c index 86873d539c..c33f922f73 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_bringup.c +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_bringup.c @@ -38,6 +38,12 @@ # include <nuttx/leds/userled.h> #endif +#ifdef CONFIG_STM32F0L0G0_IWDG +# include <stm32_wdg.h> +#endif + +#include <arch/board/board.h> + #include "nucleo-c071rb.h" /**************************************************************************** @@ -66,6 +72,12 @@ int stm32_bringup(void) { int ret; +#ifdef CONFIG_STM32F0L0G0_IWDG + /* Initialize the watchdog timer */ + + stm32_iwdginitialize("/dev/watchdog0", STM32_LSI_FREQUENCY); +#endif + #ifdef HAVE_LEDS /* Register the LED driver */