Skip to content

Commit a563b64

Browse files
adamkondraciuknordic-piks
authored andcommitted
tests: benchmarks: multicore: idle: Fix fails
Fix current consumption fails for tests: - idle_grtc - idle_clock_control - idle_ppr Signed-off-by: Adam Kondraciuk <[email protected]>
1 parent 2168093 commit a563b64

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

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

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,22 @@ static const struct test_clk_ctx lfclk_test_clk_ctx[] = {
138138
};
139139

140140
#if defined(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP)
141+
const struct nrf_clock_spec test_clk_specs_auxpll[] = {
142+
{
143+
.frequency = MHZ(80),
144+
.accuracy = 0,
145+
.precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT,
146+
},
147+
};
148+
149+
static const struct test_clk_ctx auxpll_test_clk_ctx[] = {
150+
{
151+
.clk_dev = DEVICE_DT_GET(DT_NODELABEL(canpll)),
152+
.clk_specs = test_clk_specs_auxpll,
153+
.clk_specs_size = ARRAY_SIZE(test_clk_specs_auxpll),
154+
},
155+
};
156+
141157
const struct nrf_clock_spec test_clk_specs_hfxo[] = {
142158
{
143159
.frequency = MHZ(32),
@@ -209,31 +225,11 @@ static void test_clock_control_request(const struct test_clk_ctx *clk_contexts,
209225
k_busy_wait(REQUEST_SERVING_WAIT_TIME_US);
210226
}
211227

212-
#if defined(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP)
213-
static void test_auxpll_control(const struct device *clk_dev)
214-
{
215-
int err;
216-
enum clock_control_status clk_status;
217-
218-
err = clock_control_on(clk_dev, NULL);
219-
LOG_INF("Auxpll: %s ON request, status: %d", clk_dev->name, err);
220-
k_msleep(10);
221-
clk_status = clock_control_get_status(clk_dev, NULL);
222-
__ASSERT_NO_MSG(clk_status == CLOCK_CONTROL_STATUS_ON);
223-
err = clock_control_off(clk_dev, NULL);
224-
LOG_INF("Auxpll: %s OFF request, status: %d", clk_dev->name, err);
225-
k_msleep(10);
226-
clk_status = clock_control_get_status(clk_dev, NULL);
227-
__ASSERT_NO_MSG(clk_status == CLOCK_CONTROL_STATUS_OFF);
228-
k_busy_wait(REQUEST_SERVING_WAIT_TIME_US);
229-
}
230-
#endif /* CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP */
231-
232228
void run_tests(void)
233229
{
234230
gpio_pin_set_dt(&led, 1);
235231
#if defined(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP)
236-
test_auxpll_control(DEVICE_DT_GET(DT_NODELABEL(canpll)));
232+
test_clock_control_request(auxpll_test_clk_ctx, ARRAY_SIZE(auxpll_test_clk_ctx));
237233
test_clock_control_request(hfxo_test_clk_ctx, ARRAY_SIZE(hfxo_test_clk_ctx));
238234
test_clock_control_request(hsfll_test_clk_ctx, ARRAY_SIZE(hsfll_test_clk_ctx));
239235
#endif /* CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP */

tests/benchmarks/multicore/idle_grtc/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ tests:
1313
integration_platforms:
1414
- nrf54h20dk/nrf54h20/cpuppr
1515
extra_args:
16+
- vpr_launcher_CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
1617
- vpr_launcher_EXTRA_CONF_FILE=${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/idle_grtc/vpr_launcher.conf
1718
- vpr_launcher_EXTRA_DTC_OVERLAY_FILE=${ZEPHYR_NRF_MODULE_DIR}/tests/benchmarks/multicore/idle_grtc/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
1819
harness: pytest

tests/benchmarks/multicore/idle_ppr/testcase.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tests:
2222
benchmarks.multicore.idle_ppr.idle:
2323
tags: ppk_power_measure
2424
extra_args:
25+
- CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
2526
- idle_ppr_CONF_FILE=prj_s2ram.conf
2627
- remote_rad_CONF_FILE=prj_s2ram.conf
2728
- remote_ppr_CONF_FILE=prj_s2ram.conf
@@ -38,6 +39,7 @@ tests:
3839
benchmarks.multicore.idle_ppr.s2ram:
3940
tags: ppk_power_measure
4041
extra_args:
42+
- CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
4143
- idle_ppr_CONF_FILE=prj_s2ram.conf
4244
- remote_rad_CONF_FILE=prj_s2ram.conf
4345
- remote_ppr_CONF_FILE=prj_s2ram.conf

0 commit comments

Comments
 (0)