Skip to content

Commit 5cfd10f

Browse files
committed
[nrf fromlist] tests: drivers: hwinfo: Add test for reset cause on nrf54h20
Add test that checks reset cause reported by HWINFO. Check that hwinfo_get_supported_reset_cause() returns expected value. Check that hwinfo_get_reset_cause() correctly detects: - RESET_PIN, - RESET_SOFTWARE, - RESET_WATCHDOG. Check that reset cause can be cleared with hwinfo_clear_reset_cause(). Upstream PR #: 83126 Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 9edbdaf commit 5cfd10f

File tree

8 files changed

+440
-0
lines changed

8 files changed

+440
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(reset_reason)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Disable dcache
2+
CONFIG_DCACHE=n
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright 2024 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
watchdog0 = &wdt010;
9+
};
10+
};
11+
12+
&wdt010 {
13+
status = "okay";
14+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Disable dcache
2+
CONFIG_DCACHE=n
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright 2024 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
watchdog0 = &wdt010;
9+
};
10+
};
11+
12+
&wdt010 {
13+
status = "okay";
14+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_HWINFO=y
2+
3+
CONFIG_WATCHDOG=y
4+
5+
CONFIG_LOG=y
6+
CONFIG_LOG_MODE_MINIMAL=y

0 commit comments

Comments
 (0)