Skip to content

Commit

Permalink
benchmarks: system_off: align to new RAM retention in system_off sample
Browse files Browse the repository at this point in the history
Zephyr system_off sample changed how RAM retention is handled.

Signed-off-by: Nikodem Kastelik <[email protected]>
  • Loading branch information
nika-nordic authored and carlescufi committed Dec 4, 2024
1 parent 6022463 commit 33ded99
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/ {
sram0@2003f000 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x2003f000 DT_SIZE_K(4)>;
zephyr,memory-region = "RetainedMem";
status = "okay";

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

aliases {
retainedmemdevice = &retainedmem0;
};
};

&sram0 {
/* Shrink SRAM size to avoid overlap with retained memory region */
reg = <0x20000000 DT_SIZE_K(252)>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/ {
sram0@20007000 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x20007000 DT_SIZE_K(4)>;
zephyr,memory-region = "RetainedMem";
status = "okay";

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

aliases {
retainedmemdevice = &retainedmem0;
};
};

&sram0 {
/* Shrink SRAM size to avoid overlap with retained memory region */
reg = <0x20000000 DT_SIZE_K(28)>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/ {
cpuapp_sram@20017000 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x20017000 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:
* 96 - 4 = 92KB = 0x17000
*/
reg = <0x20000000 0x17000>;
ranges = <0x0 0x20000000 0x17000>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/ {
cpuapp_sram@2002f000 {
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x2002f000 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:
* 192 - 4 = 188KB = 0x2f000
*/
reg = <0x20000000 0x2f000>;
ranges = <0x0 0x20000000 0x2f000>;
};
43 changes: 17 additions & 26 deletions tests/benchmarks/current_consumption/system_off/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ tests:
benchmarks.current_consumption.systemoff.gpio_wakeup:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
extra_args: DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay"
Expand All @@ -15,18 +17,16 @@ 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:
benchmarks.current_consumption.systemoff.gpio_wakeup.retained_mem:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/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_args: EXTRA_DTC_OVERLAY_FILE="boards/nrf54l15dk_nrf54l15_cpuapp_gpio_wakeup.overlay"
extra_configs:
- CONFIG_APP_USE_RETAINED_MEM=y
- CONFIG_RETAINED_MEM=y
harness: pytest
harness_config:
fixture: ppk_power_measure
Expand All @@ -36,6 +36,8 @@ tests:
benchmarks.current_consumption.systemoff.grtc_wakeup:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
extra_configs:
Expand All @@ -48,50 +50,39 @@ tests:
timeout: 80
benchmarks.current_consumption.sample.boards.nrf.system_off:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf52840dk/nrf52840
- nrf52dk/nrf52832
- nrf5340dk/nrf5340/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/cpuapp
integration_platforms:
- nrf52840dk/nrf52840
- nrf52dk/nrf52832
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
tags: ppk_power_measure
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_systemoff"
timeout: 90
benchmarks.current_consumption.sample.boards.nrf.system_off.nrf_retained:
benchmarks.current_consumption.sample.boards.nrf.system_off.retained_mem:
platform_allow:
- nrf52840dk/nrf52840
- nrf52dk/nrf52832
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l05/cpuapp
integration_platforms:
- nrf52840dk/nrf52840
- nrf52dk/nrf52832
- nrf5340dk/nrf5340/cpuapp
extra_configs:
- CONFIG_APP_USE_NRF_RETENTION=y
tags: ppk_power_measure
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_systemoff"
timeout: 90
benchmarks.current_consumption.sample.boards.nrf.system_off.retained_mem:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l15/cpuapp
extra_args:
- "DTC_OVERLAY_FILE=boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay"
- "-DBOARD_ROOT=${ZEPHYR_BASE}/samples/boards/nordic/system_off"
extra_configs:
- CONFIG_APP_USE_RETAINED_MEM=y
- CONFIG_RETAINED_MEM=y
tags: ppk_power_measure
harness: pytest
harness_config:
Expand Down

0 comments on commit 33ded99

Please sign in to comment.