From 487bcefa51d11cc101924da22c31fa83c5a34353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20G=C5=82=C4=85b?= Date: Wed, 15 Oct 2025 08:15:02 +0200 Subject: [PATCH] [nrf fromtree] tests: boards: nrf: hwinfo: Add latest reset causes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reset cause API was expanded with two more reset causes. These are RESET_BOOTLOADER and RESET_FLASH. Add handling of RESET_BOOTLOADER and RESET_FLASH to reset_cause test. Signed-off-by: Sebastian Głąb (cherry picked from commit 9ff2c0ff9d48e1f91023fab3e1151955c7f85166) --- tests/boards/nrf/hwinfo/reset_cause/src/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/boards/nrf/hwinfo/reset_cause/src/main.c b/tests/boards/nrf/hwinfo/reset_cause/src/main.c index 7df98bce9bc..4e4e3a1c5d4 100644 --- a/tests/boards/nrf/hwinfo/reset_cause/src/main.c +++ b/tests/boards/nrf/hwinfo/reset_cause/src/main.c @@ -134,6 +134,16 @@ static void print_supported_reset_cause(void) } else { LOG_INF("14: no support for RESET_TEMPERATURE"); } + if (supported & RESET_BOOTLOADER) { + LOG_INF("15: RESET_BOOTLOADER is supported"); + } else { + LOG_INF("15: no support for RESET_BOOTLOADER"); + } + if (supported & RESET_FLASH) { + LOG_INF("16: RESET_FLASH is supported"); + } else { + LOG_INF("16: no support for RESET_FLASH"); + } } else if (ret == -ENOSYS) { LOG_INF("hwinfo_get_supported_reset_cause() is NOT supported"); supported = 0; @@ -197,6 +207,12 @@ static void print_current_reset_cause(uint32_t *cause) if (*cause & RESET_TEMPERATURE) { LOG_INF("14: reset due to RESET_TEMPERATURE"); } + if (*cause & RESET_BOOTLOADER) { + LOG_INF("15: reset due to RESET_BOOTLOADER"); + } + if (*cause & RESET_FLASH) { + LOG_INF("16: reset due to RESET_FLASH"); + } } else if (ret == -ENOSYS) { LOG_INF("hwinfo_get_reset_cause() is NOT supported"); *cause = 0;