-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: benchmarks: multicore: Add test for S2RAM and PPR
Add non-functional check (current consumption) for sample application that: - runs on cpuapp, cpurad and cpuppr; - enters low power state. Confirm that when PPR core is used: - SOC may enter low power states like IDLE or S2RAM. Signed-off-by: Sebastian Głąb <[email protected]>
- Loading branch information
1 parent
db0b80c
commit b2985bd
Showing
14 changed files
with
471 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
|
||
if(NOT SYSBUILD) | ||
message(FATAL_ERROR | ||
" This is a multi-image application that should be built using sysbuild.\n" | ||
" Add --sysbuild argument to west build command to prepare all the images.") | ||
endif() | ||
|
||
project(idle_ppr) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
config TEST_SLEEP_DURATION_MS | ||
int "Amount of time (in miliseconds) the core is sleeping" | ||
default 1000 | ||
help | ||
Set sleep duration to TEST_SLEEP_DURATION_MS miliseconds. | ||
Based on the value of 'min-residency-us' specified for each power state defined in the DTS, | ||
core enters the lowest possible power state. | ||
|
||
source "Kconfig.zephyr" |
27 changes: 27 additions & 0 deletions
27
tests/benchmarks/multicore/idle_ppr/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
&cpuppr_vpr { | ||
status = "okay"; | ||
}; | ||
|
||
&cpuppr_ram3x_region { | ||
status = "okay"; | ||
}; | ||
|
||
|
||
/ { | ||
aliases { | ||
/delete-property/ led1; | ||
}; | ||
}; | ||
|
||
/delete-node/ &led1; | ||
|
||
&gpiote130 { | ||
status = "okay"; | ||
owned-channels = <0>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
|
||
CONFIG_LOG=y | ||
CONFIG_ASSERT=y | ||
CONFIG_GPIO=y | ||
|
||
CONFIG_NRF_REGTOOL_VERBOSITY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CONFIG_PM=y | ||
CONFIG_PM_S2RAM=y | ||
CONFIG_PM_S2RAM_CUSTOM_MARKING=y | ||
CONFIG_POWEROFF=y | ||
CONFIG_SOC_NRF54H20_NO_MRAM_LATENCY=n | ||
|
||
CONFIG_PM_DEVICE=y | ||
CONFIG_PM_DEVICE_RUNTIME=y | ||
|
||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_PRINTK=n | ||
CONFIG_LOG=n | ||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_SERIAL=n | ||
|
||
CONFIG_ASSERT=y | ||
CONFIG_GPIO=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(remote) | ||
|
||
target_sources(app PRIVATE ../src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
config TEST_SLEEP_DURATION_MS | ||
int "Amount of time (in miliseconds) the core is sleeping" | ||
default 1000 | ||
help | ||
Set sleep duration to TEST_SLEEP_DURATION_MS miliseconds. | ||
Based on the value of 'min-residency-us' specified for each power state defined in the DTS, | ||
core enters the lowest possible power state. | ||
|
||
config APP_PROVIDE_PM_HOOKS | ||
bool "Application provides PM hooks" | ||
default y | ||
select HAS_PM | ||
select HAS_POWEROFF | ||
|
||
source "Kconfig.zephyr" |
50 changes: 50 additions & 0 deletions
50
tests/benchmarks/multicore/idle_ppr/remote/boards/nrf54h20dk_nrf54h20_cpuppr.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
led0 = &led3; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
led3: led_3 { | ||
gpios = < &gpio9 0x3 0x0 >; | ||
label = "Green LED 3"; | ||
}; | ||
}; | ||
|
||
cpus { | ||
power-states { | ||
wait: wait { | ||
compatible = "zephyr,power-state"; | ||
power-state-name = "standby"; | ||
substate-id = <0>; | ||
min-residency-us = <20000>; | ||
}; | ||
|
||
hibernate: hibernate { | ||
compatible = "zephyr,power-state"; | ||
power-state-name = "suspend-to-ram"; | ||
substate-id = <0>; | ||
min-residency-us = <400000>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&cpu { | ||
cpu-power-states = <&wait &hibernate>; | ||
}; | ||
|
||
&gpio9 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiote130 { | ||
status = "okay"; | ||
owned-channels = <2>; | ||
}; |
28 changes: 28 additions & 0 deletions
28
tests/benchmarks/multicore/idle_ppr/remote/boards/nrf54h20dk_nrf54h20_cpurad.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
led0 = &led1; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
led1: led_1 { | ||
gpios = < &gpio9 0x1 0x0 >; | ||
label = "Green LED 1"; | ||
}; | ||
}; | ||
}; | ||
|
||
&gpio9 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpiote130 { | ||
status = "okay"; | ||
owned-channels = <1>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CONFIG_LOG=n | ||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_SERIAL=n | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_PRINTK=n | ||
|
||
CONFIG_ASSERT=y | ||
CONFIG_GPIO=y | ||
|
||
CONFIG_NRF_REGTOOL_VERBOSITY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CONFIG_PM=y | ||
CONFIG_POWEROFF=y | ||
|
||
CONFIG_PM_DEVICE=y | ||
CONFIG_PM_DEVICE_RUNTIME=y | ||
|
||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_SERIAL=n | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_SOC_NRF54H20_NO_MRAM_LATENCY=n | ||
|
||
CONFIG_ASSERT=y | ||
CONFIG_GPIO=y |
Oops, something went wrong.