boards/nucleo-c071rb: add watchdog support

boards/nucleo-c071rb: add watchdog support and enable IWDG for jumbo configuration

Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
raiden00pl 2025-04-07 11:29:59 +02:00 committed by Xiang Xiao
parent 5d66f2c973
commit b81c4d3aa6
2 changed files with 15 additions and 0 deletions

View file

@ -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

View file

@ -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 */