Skip to content

Commit fb69c73

Browse files
committed
tests: benchmarks: multicore: Run idle_spim on PPR
Extend power consumption tests with configuration that uses SPI driver on PPR core. Signed-off-by: Sebastian Głąb <[email protected]>
1 parent af968a6 commit fb69c73

File tree

9 files changed

+151
-3
lines changed

9 files changed

+151
-3
lines changed

tests/benchmarks/multicore/idle_spim/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ endif()
1717
project(idle_spim)
1818

1919
target_sources(app PRIVATE src/main.c)
20+
21+
if(CONFIG_SOC_NRF54H20_CPUPPR)
22+
message(DEBUG "Power Mode handler for RISC V is included.")
23+
target_sources(app PRIVATE ${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/common/power_off.c)
24+
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/multicore/idle_spim/Kconfig.sysbuild

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,9 @@ config NETCORE_IMAGE_NAME
1919

2020
config NETCORE_IMAGE_PATH
2121
default "${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/power_consumption/common/remote_sleep_forever" if NETCORE_REMOTE_SLEEP_FOREVER
22+
23+
config SUPPORT_NETCORE
24+
default y if (SOC_NRF54H20_CPUPPR || SOC_NRF54H20_CPUAPP)
25+
26+
config NETCORE_REMOTE_BOARD_TARGET_CPUCLUSTER
27+
default "cpurad" if (SOC_NRF54H20_CPUPPR || SOC_NRF54H20_CPUAPP)

tests/benchmarks/multicore/idle_spim/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
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
aliases {
9+
led = &led0;
10+
};
11+
12+
leds {
13+
compatible = "gpio-leds";
14+
15+
led0: led_0 {
16+
gpios = < &gpio9 0x0 0x0 >;
17+
label = "Green LED 0";
18+
};
19+
};
20+
21+
cpus {
22+
power-states {
23+
wait: wait {
24+
compatible = "zephyr,power-state";
25+
power-state-name = "standby";
26+
substate-id = <0>;
27+
min-residency-us = <20000>;
28+
};
29+
30+
hibernate: hibernate {
31+
compatible = "zephyr,power-state";
32+
power-state-name = "suspend-to-ram";
33+
substate-id = <0>;
34+
min-residency-us = <400000>;
35+
};
36+
};
37+
};
38+
};
39+
40+
&cpu {
41+
cpu-power-states = <&wait &hibernate>;
42+
};
43+
44+
&gpio2 {
45+
status = "disabled";
46+
};
47+
48+
&gpio9 {
49+
status = "okay";
50+
};
51+
52+
&gpiote130 {
53+
status = "okay";
54+
};
55+
56+
&i2c130 {
57+
status = "disabled";
58+
};
59+
60+
&spi131 {
61+
zephyr,pm-device-runtime-auto;
62+
};

tests/benchmarks/multicore/idle_spim/prj.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ CONFIG_SPI=y
22
CONFIG_GPIO=y
33

44
CONFIG_PM=y
5-
CONFIG_PM_S2RAM=y
6-
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
75
CONFIG_PM_DEVICE=y
86
CONFIG_PM_DEVICE_RUNTIME=y
97
CONFIG_POWEROFF=y
10-
CONFIG_BOOT_BANNER=n
118

9+
CONFIG_BOOT_BANNER=n
1210
CONFIG_ASSERT=y
1311

1412
# Enable for debugging purposes only
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
aliases {
9+
/delete-property/ led0;
10+
/delete-property/ led1;
11+
/delete-property/ mcuboot-led0;
12+
};
13+
};
14+
15+
/delete-node/ &led0;
16+
/delete-node/ &led1;
17+
18+
&exmif {
19+
status = "disabled";
20+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CONFIG_PM=y
2+
CONFIG_PM_DEVICE=y
3+
CONFIG_PM_DEVICE_RUNTIME=y
4+
CONFIG_POWEROFF=y
5+
CONFIG_PM_S2RAM=y
6+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
7+
8+
CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
9+
10+
CONFIG_BOOT_BANNER=n
11+
CONFIG_PRINTK=n
12+
CONFIG_LOG=n
13+
CONFIG_CONSOLE=n
14+
CONFIG_UART_CONSOLE=n
15+
CONFIG_SERIAL=n

tests/benchmarks/multicore/idle_spim/testcase.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ common:
33
depends_on: spi
44

55
tests:
6+
# cpuapp - idle_spim test
7+
# cpurad - remote_sleep_forever
68
benchmarks.multicore.idle_spim.nrf54h20dk_cpuapp_cpurad.s2ram:
79
tags:
810
- ci_build
@@ -23,6 +25,30 @@ tests:
2325
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_spim"
2426
timeout: 90
2527

28+
# cpuapp - vpr_launcher
29+
# cpurad - remote_sleep_forever
30+
# cpuppr - idle_spim test
31+
benchmarks.multicore.idle_spim.nrf54h20dk_cpuppr.s2ram:
32+
tags:
33+
- ci_build
34+
- ci_tests_benchmarks_multicore
35+
- spim
36+
- ppk_power_measure
37+
filter: not CONFIG_COVERAGE
38+
harness: pytest
39+
platform_allow:
40+
- nrf54h20dk/nrf54h20/cpuppr
41+
integration_platforms:
42+
- nrf54h20dk/nrf54h20/cpuppr
43+
extra_args:
44+
- SHIELD=pca63566
45+
- vpr_launcher_SHIELD=pca63566_fwd
46+
harness_config:
47+
fixture: pca63566
48+
pytest_root:
49+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_spim"
50+
timeout: 90
51+
2652
benchmarks.multicore.idle_spim.nrf54h20dk_cpuapp_cpurad.s2ram.mcuboot:
2753
tags:
2854
- ci_build

0 commit comments

Comments
 (0)