Skip to content

Commit

Permalink
tests: benchmarks: Add sysoff with mem retention test.
Browse files Browse the repository at this point in the history
Add tests combining system off and  memory retention with current
consumption checking.

Signed-off-by: Bartlomiej Buczek <[email protected]>
  • Loading branch information
nordic-babu authored and nordicjm committed Oct 18, 2024
1 parent c731170 commit 500844c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
#

cmake_minimum_required(VERSION 3.20.0)
set(KCONFIG_ROOT $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/Kconfig)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(system_off)

target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/src/main.c)
if(CONFIG_APP_USE_RETAINED_MEM)
target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/src/retained.c)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/ {
cpuapp_sram@2002e000 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x2002e000 DT_SIZE_K(4)>;
zephyr,memory-region = "RetainedMem";
status = "okay";

retainedmem0: retainedmem {
compatible = "zephyr,retained-ram";
status = "okay";
};
};

aliases {
retainedmemdevice = &retainedmem0;
};
};

&cpuapp_sram {
/* Shrink SRAM size to avoid overlap with retained memory region */
reg = <0x20000000 DT_SIZE_K(184)>;
ranges = <0x0 0x20000000 0x2e000>;
};
18 changes: 18 additions & 0 deletions tests/benchmarks/current_consumption/system_off/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,21 @@ tests:
pytest_root:
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_with_wakeups"
timeout: 80
benchmarks.current_consumption.systemoff.gpio_wakeup_retained_mem:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
extra_args:
- "DTC_OVERLAY_FILE=
boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay;
boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay"
extra_configs:
- CONFIG_APP_USE_RETAINED_MEM=y
- CONFIG_RETAINED_MEM=y
harness: pytest
harness_config:
fixture: ppk_power_measure
pytest_root:
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_with_wakeups"
timeout: 80

0 comments on commit 500844c

Please sign in to comment.