Skip to content

Commit a520592

Browse files
nordic-baminordic-piks
authored andcommitted
benchmarks: Run PM i2c tests on nrf54h20 PPR core
Run Power Management tests on nrf54h20/cpuppr core Signed-off-by: Bartosz Miller <[email protected]>
1 parent 39b81b8 commit a520592

37 files changed

+328
-63
lines changed

tests/benchmarks/current_consumption/twim_suspend/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
1111
project(twim_suspend)
1212

1313
target_sources(app PRIVATE src/main.c)
14+
15+
if(CONFIG_SOC_NRF54H20_CPUPPR)
16+
message(STATUS "Power Mode handler for RISC V is included.")
17+
target_sources(app PRIVATE ${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/common/power_off.c)
18+
endif()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config APP_PROVIDE_PM_HOOKS
8+
bool "Application provides PM hooks"
9+
default y if SOC_NRF54H20_CPUPPR
10+
select HAS_PM
11+
select HAS_POWEROFF
12+
13+
source "Kconfig.zephyr"

tests/benchmarks/current_consumption/twim_suspend/Kconfig.sysbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ source "share/sysbuild/Kconfig"
88

99
config REMOTE_BOARD
1010
string
11-
default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP
11+
default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20

tests/benchmarks/current_consumption/twim_suspend/boards/nrf54h20dk_nrf54h20_cpuapp.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7+
CONFIG_PM_S2RAM=y
8+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
9+
710
CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
File renamed without changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (C) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
/ {
7+
cpus {
8+
power-states {
9+
wait: wait {
10+
compatible = "zephyr,power-state";
11+
power-state-name = "standby";
12+
substate-id = <0>;
13+
min-residency-us = <20000>;
14+
};
15+
16+
hibernate: hibernate {
17+
compatible = "zephyr,power-state";
18+
power-state-name = "suspend-to-ram";
19+
substate-id = <0>;
20+
min-residency-us = <400000>;
21+
};
22+
};
23+
};
24+
};
25+
26+
&cpu {
27+
cpu-power-states = <&wait &hibernate>;
28+
};
29+
30+
&i2c130 {
31+
/delete-property/ zephyr,pm-device-runtime-auto;
32+
};
File renamed without changes.

tests/benchmarks/current_consumption/twim_suspend/prj.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ CONFIG_PM_DEVICE=y
55
CONFIG_PM_DEVICE_RUNTIME=y
66
CONFIG_POWEROFF=y
77

8-
CONFIG_GPIO=n
9-
CONFIG_BOOT_BANNER=n
10-
118
CONFIG_ASSERT=y
129

1310
# Enable for debugging purposes only
11+
CONFIG_BOOT_BANNER=n
1412
CONFIG_PRINTK=n
1513
CONFIG_LOG=n
1614
CONFIG_CONSOLE=n
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (C) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
&uart135 {
7+
status = "disabled";
8+
/delete-property/memory-regions;
9+
};

tests/benchmarks/current_consumption/twim_suspend/sysbuild.cmake

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@
55
#
66

77
if(SB_CONFIG_REMOTE_BOARD)
8-
# Add remote project
98
ExternalZephyrProject_Add(
10-
APPLICATION remote
11-
SOURCE_DIR ${APP_DIR}/remote
12-
BOARD ${SB_CONFIG_REMOTE_BOARD}
13-
BOARD_REVISION ${BOARD_REVISION}
14-
)
15-
# Add a dependency so that the remote image will be built and flashed first
16-
add_dependencies(twim_suspend remote)
17-
# Add dependency so that the remote image is flashed first.
18-
sysbuild_add_dependencies(FLASH twim_suspend remote)
9+
APPLICATION remote
10+
SOURCE_DIR ${APP_DIR}/remote
11+
BOARD ${SB_CONFIG_REMOTE_BOARD}
12+
BOARD_REVISION ${BOARD_REVISION}
13+
)
1914
endif()

0 commit comments

Comments
 (0)