From ea2994fb4458302e5c3bb8404eabad28c1def943 Mon Sep 17 00:00:00 2001 From: Bartosz Miller Date: Thu, 21 Nov 2024 15:03:05 +0100 Subject: [PATCH] tests: benchmarks: Verify wakeup for NFC from s2ram for nrf54h20 Verify the NFC with s2ram for nrf54h20 Signed-off-by: Bartosz Miller --- .../nfc_idle/Kconfig.sysbuild | 11 ++++++++++ .../current_consumption/nfc_idle/prj.conf | 11 ++++++---- .../nfc_idle/sysbuild.cmake | 19 ++++++++++++++++++ .../nfc_idle/testcase.yaml | 20 ++++++++++++++++++- 4 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 tests/benchmarks/current_consumption/nfc_idle/Kconfig.sysbuild create mode 100644 tests/benchmarks/current_consumption/nfc_idle/sysbuild.cmake diff --git a/tests/benchmarks/current_consumption/nfc_idle/Kconfig.sysbuild b/tests/benchmarks/current_consumption/nfc_idle/Kconfig.sysbuild new file mode 100644 index 000000000000..a5a29117d87a --- /dev/null +++ b/tests/benchmarks/current_consumption/nfc_idle/Kconfig.sysbuild @@ -0,0 +1,11 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" + +config REMOTE_BOARD + string + default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP diff --git a/tests/benchmarks/current_consumption/nfc_idle/prj.conf b/tests/benchmarks/current_consumption/nfc_idle/prj.conf index 4c3df91eafa1..0e95b404b775 100644 --- a/tests/benchmarks/current_consumption/nfc_idle/prj.conf +++ b/tests/benchmarks/current_consumption/nfc_idle/prj.conf @@ -1,7 +1,3 @@ -CONFIG_CONSOLE=n -CONFIG_UART_CONSOLE=n -CONFIG_SERIAL=n - CONFIG_POWEROFF=y CONFIG_NFC_T2T_NRFXLIB=y @@ -10,3 +6,10 @@ CONFIG_NFC_NDEF=y CONFIG_NFC_NDEF_MSG=y CONFIG_NFC_NDEF_RECORD=y CONFIG_NFC_NDEF_TEXT_RECORD=y + +# Enable for debugging purpose only +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_PRINTK=n +CONFIG_LOG=n diff --git a/tests/benchmarks/current_consumption/nfc_idle/sysbuild.cmake b/tests/benchmarks/current_consumption/nfc_idle/sysbuild.cmake new file mode 100644 index 000000000000..a073424f314f --- /dev/null +++ b/tests/benchmarks/current_consumption/nfc_idle/sysbuild.cmake @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +if(SB_CONFIG_SOC_NRF54H20) + # Add remote project + ExternalZephyrProject_Add( + APPLICATION remote + SOURCE_DIR ${SYSBUILD_NRF_MODULE_DIR}/tests/benchmarks/power_consumption/common/remote_sleep_forever + BOARD ${SB_CONFIG_REMOTE_BOARD} + BOARD_REVISION ${BOARD_REVISION} + ) + # Add a dependency so that the remote image will be built and flashed first + add_dependencies(nfc_idle remote) + # Add dependency so that the remote image is flashed first. + sysbuild_add_dependencies(FLASH nfc_idle remote) +endif() diff --git a/tests/benchmarks/current_consumption/nfc_idle/testcase.yaml b/tests/benchmarks/current_consumption/nfc_idle/testcase.yaml index 1c0fbca08c23..81d37c95fa68 100644 --- a/tests/benchmarks/current_consumption/nfc_idle/testcase.yaml +++ b/tests/benchmarks/current_consumption/nfc_idle/testcase.yaml @@ -12,5 +12,23 @@ tests: 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_rx_wakeup_54L_nfc_idle" + - "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_with_rx_wakeup_nfc_idle" + timeout: 80 + + benchmarks.current_consumption.nfc_idle_nrf54h: + platform_allow: + - nrf54h20dk/nrf54h20/cpuapp + integration_platforms: + - nrf54h20dk/nrf54h20/cpuapp + extra_args: + - CONFIG_PM=y + - CONFIG_PM_S2RAM=y + - CONFIG_PM_S2RAM_CUSTOM_MARKING=y + - CONFIG_BOOT_BANNER=n + - CONFIG_SOC_NRF54H20_NO_MRAM_LATENCY=n + 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_rx_wakeup_nfc_idle" timeout: 80