Skip to content

Commit 500844c

Browse files
nordic-babunordicjm
authored andcommitted
tests: benchmarks: Add sysoff with mem retention test.
Add tests combining system off and memory retention with current consumption checking. Signed-off-by: Bartlomiej Buczek <[email protected]>
1 parent c731170 commit 500844c

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

tests/benchmarks/current_consumption/system_off/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#
66

77
cmake_minimum_required(VERSION 3.20.0)
8+
set(KCONFIG_ROOT $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/Kconfig)
89
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
910
project(system_off)
1011

1112
target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/src/main.c)
13+
if(CONFIG_APP_USE_RETAINED_MEM)
14+
target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/src/retained.c)
15+
endif()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/ {
2+
cpuapp_sram@2002e000 {
3+
compatible = "zephyr,memory-region", "mmio-sram";
4+
reg = <0x2002e000 DT_SIZE_K(4)>;
5+
zephyr,memory-region = "RetainedMem";
6+
status = "okay";
7+
8+
retainedmem0: retainedmem {
9+
compatible = "zephyr,retained-ram";
10+
status = "okay";
11+
};
12+
};
13+
14+
aliases {
15+
retainedmemdevice = &retainedmem0;
16+
};
17+
};
18+
19+
&cpuapp_sram {
20+
/* Shrink SRAM size to avoid overlap with retained memory region */
21+
reg = <0x20000000 DT_SIZE_K(184)>;
22+
ranges = <0x0 0x20000000 0x2e000>;
23+
};

tests/benchmarks/current_consumption/system_off/testcase.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,21 @@ tests:
1515
pytest_root:
1616
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_with_wakeups"
1717
timeout: 80
18+
benchmarks.current_consumption.systemoff.gpio_wakeup_retained_mem:
19+
platform_allow:
20+
- nrf54l15dk/nrf54l15/cpuapp
21+
integration_platforms:
22+
- nrf54l15dk/nrf54l15/cpuapp
23+
extra_args:
24+
- "DTC_OVERLAY_FILE=
25+
boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay;
26+
boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay"
27+
extra_configs:
28+
- CONFIG_APP_USE_RETAINED_MEM=y
29+
- CONFIG_RETAINED_MEM=y
30+
harness: pytest
31+
harness_config:
32+
fixture: ppk_power_measure
33+
pytest_root:
34+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_with_wakeups"
35+
timeout: 80

0 commit comments

Comments
 (0)