From 779a29fea55d6afbc8e0ee9bd4f288f3048a316e Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Fri, 12 Nov 2021 18:44:19 +0800 Subject: [PATCH] boards/Kconfig: set BOARD_ASSERT_RESET_VALUE default value to be 1 The board code should separate the reset reason, so it had better make "BOARD_ASSERT_RESET_VALUE" not be equal to "EXIT_SUCCESS". --- boards/Kconfig | 2 +- boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_reset.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/boards/Kconfig b/boards/Kconfig index d04a65b0fa..d4499294b8 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -3369,7 +3369,7 @@ config BOARD_RESET_ON_ASSERT config BOARD_ASSERT_RESET_VALUE int "Board reset argument" - default 0 + default 1 depends on BOARDCTL_RESET ---help--- Parameter that will be passed to board_reset() by when an diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_reset.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_reset.c index 5434b8acbb..ad7059cbfe 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_reset.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_reset.c @@ -30,6 +30,8 @@ #include #include +#include "esp32c3_systemreset.h" + #ifdef CONFIG_BOARDCTL_RESET /**************************************************************************** @@ -58,7 +60,6 @@ int board_reset(int status) { -#ifdef CONFIG_BOARD_ASSERT_RESET_VALUE syslog(LOG_INFO, "reboot status=%d\n", status); switch (status) @@ -71,9 +72,6 @@ int board_reset(int status) default: break; } -#else - up_shutdown_handler(); -#endif up_systemreset();