Skip to content

Commit f37baca

Browse files
nordic-pikrnordicjm
authored andcommitted
tests: benchmarks: idle_clock_control: Fix current measurement test
Use fixtures to differentiate regular and lfrc setup Signed-off-by: Piotr Krzyzanowski <[email protected]>
1 parent de9a5ac commit f37baca

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config AT_LFRC
8+
bool "BICR configured to use LFRC at LFCLK"
9+
help
10+
Use this option if custom BICR (LFRC at LFCLK) is programmed.
11+
12+
source "Kconfig.zephyr"

tests/benchmarks/multicore/idle_clock_control/src/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ const struct nrf_clock_spec test_clk_specs_lfclk[] = {
109109
.accuracy = 0,
110110
.precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT,
111111
},
112+
#if defined(CONFIG_AT_LFRC)
113+
{
114+
.frequency = 32768,
115+
.accuracy = 30,
116+
.precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT,
117+
},
118+
#else
112119
{
113120
.frequency = 32768,
114121
.accuracy = 20,
@@ -119,6 +126,7 @@ const struct nrf_clock_spec test_clk_specs_lfclk[] = {
119126
.accuracy = 20,
120127
.precision = NRF_CLOCK_CONTROL_PRECISION_HIGH,
121128
},
129+
#endif
122130
};
123131

124132
static const struct test_clk_ctx lfclk_test_clk_ctx[] = {

tests/benchmarks/multicore/idle_clock_control/testcase.yaml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tests:
1414
integration_platforms:
1515
- nrf54h20dk/nrf54h20/cpuapp
1616
harness_config:
17-
fixture: ppk_power_measure
17+
fixture: lfclk_at_lfxo
1818
pytest_root:
1919
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_clock_control"
2020
timeout: 90
@@ -41,7 +41,54 @@ tests:
4141
- remote_CONFIG_BOOT_BANNER=n
4242
- remote_CONFIG_CLOCK_CONTROL=n
4343
harness_config:
44-
fixture: ppk_power_measure
44+
fixture: lfclk_at_lfxo
45+
pytest_root:
46+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_clock_control"
47+
timeout: 90
48+
49+
benchmarks.multicore.idle_clock_control.app.lfrc:
50+
tags:
51+
- ci_build
52+
- ci_tests_benchmarks_multicore
53+
- ppk_power_measure
54+
filter: not CONFIG_COVERAGE
55+
harness: pytest
56+
platform_allow:
57+
- nrf54h20dk/nrf54h20/cpuapp
58+
integration_platforms:
59+
- nrf54h20dk/nrf54h20/cpuapp
60+
harness_config:
61+
fixture: lfclk_at_lfrc
62+
pytest_root:
63+
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_clock_control"
64+
timeout: 90
65+
extra_args:
66+
- CONFIG_AT_LFRC=y
67+
68+
# note: in this scenario cpuapp is the 'remote'
69+
benchmarks.multicore.idle_clock_control.rad.lfrc:
70+
tags:
71+
- ci_build
72+
- ci_tests_benchmarks_multicore
73+
- ppk_power_measure
74+
filter: not CONFIG_COVERAGE
75+
harness: pytest
76+
platform_allow:
77+
- nrf54h20dk/nrf54h20/cpurad
78+
integration_platforms:
79+
- nrf54h20dk/nrf54h20/cpurad
80+
extra_args:
81+
- CONFIG_PM_S2RAM=n
82+
- CONFIG_PM_S2RAM_CUSTOM_MARKING=n
83+
- CONFIG_AT_LFRC=y
84+
- remote_CONFIG_PM_S2RAM=y
85+
- remote_CONFIG_PM_S2RAM_CUSTOM_MARKING=y
86+
- remote_CONFIG_PM_DEVICE=y
87+
- remote_CONFIG_PM_DEVICE_RUNTIME=y
88+
- remote_CONFIG_BOOT_BANNER=n
89+
- remote_CONFIG_CLOCK_CONTROL=n
90+
harness_config:
91+
fixture: lfclk_at_lfrc
4592
pytest_root:
4693
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_power_consumption_clock_control"
4794
timeout: 90

0 commit comments

Comments
 (0)