From d7a78479c283270c0cca45b24c62fa1b1576d582 Mon Sep 17 00:00:00 2001 From: Nordic Builder Date: Thu, 28 Nov 2024 14:40:58 +0000 Subject: [PATCH 1/3] manifest: Update sdk-zephyr revision (auto-manifest PR) Automatically created by Github Action Signed-off-by: Nordic Builder --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index 01874b1f675..e460437321f 100644 --- a/west.yml +++ b/west.yml @@ -69,7 +69,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 6baae0823c6953fd1c41e9249c83e3bf3a53fe09 + revision: pull/2313/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above From 51b87222336e760ef3ee72d3a158bf6936581f23 Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Thu, 28 Nov 2024 16:15:07 +0100 Subject: [PATCH 2/3] samples: nrf54l: remove direct RAM retention management RAM retention is now managed within sys_poweroff() call. Signed-off-by: Nikodem Kastelik --- .../bluetooth/peripheral_power_profiling/src/main.c | 11 ----------- samples/nfc/system_off/src/main.c | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/samples/bluetooth/peripheral_power_profiling/src/main.c b/samples/bluetooth/peripheral_power_profiling/src/main.c index 879f286fc13..7fc66c25b15 100644 --- a/samples/bluetooth/peripheral_power_profiling/src/main.c +++ b/samples/bluetooth/peripheral_power_profiling/src/main.c @@ -27,9 +27,6 @@ #include #include -#ifdef CONFIG_SOC_NRF54L15_CPUAPP -#include -#endif #include "pwr_service.h" @@ -682,14 +679,6 @@ static void system_off(void) } } -#ifdef CONFIG_SOC_NRF54L15_CPUAPP - /* Disable RAM retention in System OFF as it is not utilized by this sample. */ - uint32_t ram_sections = 8; - - nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false); - nrf_memconf_ramblock_ret2_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false); -#endif - sys_poweroff(); #endif /* !IS_ENABLED(CONFIG_SOC_SERIES_NRF54HX) */ } diff --git a/samples/nfc/system_off/src/main.c b/samples/nfc/system_off/src/main.c index 46202c340f5..be3619c3690 100644 --- a/samples/nfc/system_off/src/main.c +++ b/samples/nfc/system_off/src/main.c @@ -20,9 +20,6 @@ #include #include -#ifdef CONFIG_SOC_NRF54L15_CPUAPP -#include -#endif #define SYSTEM_OFF_DELAY_S 3 @@ -150,14 +147,6 @@ static void system_off(struct k_work *work) } } -#ifdef CONFIG_SOC_NRF54L15_CPUAPP - /* Disable RAM retention in System OFF as it is not utilized by this sample. */ - uint32_t ram_sections = 8; - - nrf_memconf_ramblock_ret_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false); - nrf_memconf_ramblock_ret2_mask_enable_set(NRF_MEMCONF, 0, BIT_MASK(ram_sections), false); -#endif - sys_poweroff(); } From c53676dfebfc5b053cb39b093582526a1be2d94b Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Fri, 29 Nov 2024 13:00:43 +0100 Subject: [PATCH 3/3] benchmarks: system_off: align to new RAM retention in system_off sample Zephyr system_off sample changed how RAM retention is handled. Signed-off-by: Nikodem Kastelik --- .../boards/nrf52840dk_nrf52840.overlay | 22 ++++++++++ .../boards/nrf52dk_nrf52832.overlay | 22 ++++++++++ .../boards/nrf54l15dk_nrf54l05_cpuapp.overlay | 25 +++++++++++ .../boards/nrf54l15dk_nrf54l10_cpuapp.overlay | 25 +++++++++++ ...lay => nrf54l15dk_nrf54l15_cpuapp.overlay} | 0 .../system_off/testcase.yaml | 43 ++++++++----------- 6 files changed, 111 insertions(+), 26 deletions(-) create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay create mode 100644 tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay rename tests/benchmarks/current_consumption/system_off/boards/{nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay => nrf54l15dk_nrf54l15_cpuapp.overlay} (100%) diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000..c203d90a0a1 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf52840dk_nrf52840.overlay @@ -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)>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay new file mode 100644 index 00000000000..13e2e99ddf2 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf52dk_nrf52832.overlay @@ -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)>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay new file mode 100644 index 00000000000..6f4a9be80f9 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l05_cpuapp.overlay @@ -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>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay new file mode 100644 index 00000000000..9705cf335a7 --- /dev/null +++ b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l10_cpuapp.overlay @@ -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>; +}; diff --git a/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay b/tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp.overlay similarity index 100% rename from tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp_ret_mem.overlay rename to tests/benchmarks/current_consumption/system_off/boards/nrf54l15dk_nrf54l15_cpuapp.overlay diff --git a/tests/benchmarks/current_consumption/system_off/testcase.yaml b/tests/benchmarks/current_consumption/system_off/testcase.yaml index 717052bf0d9..ad781fd87f3 100644 --- a/tests/benchmarks/current_consumption/system_off/testcase.yaml +++ b/tests/benchmarks/current_consumption/system_off/testcase.yaml @@ -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" @@ -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 @@ -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: @@ -48,15 +50,17 @@ 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: @@ -64,34 +68,21 @@ tests: 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: