Skip to content

Commit 8fea36c

Browse files
bjarki-andreasencarlescufi
authored andcommitted
benchmarks: multicore: idle_counter: Remove GD freq changes
Global domain frequency (hsfll120) is no longer managed by drivers. Test shall not request global domain frequency lower than default. Note that the test_measure_and_data_dump_fast_counter_and_s2ram_with_clock_control should be updated since there is now no clock control. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent f3c0f26 commit 8fea36c

File tree

5 files changed

+3
-67
lines changed

5 files changed

+3
-67
lines changed

tests/benchmarks/multicore/idle_counter/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,3 @@
1717
};
1818

1919
/delete-node/ &led1;
20-
21-
&hsfll120 {
22-
status = "okay";
23-
};

tests/benchmarks/multicore/idle_counter/boards/nrf54h20dk_nrf54h20_cpurad.overlay

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/benchmarks/multicore/idle_counter/remote/boards/nrf54h20dk_nrf54h20_cpurad.overlay

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,3 @@
3232
&timer130 {
3333
status = "okay";
3434
};
35-
36-
&hsfll120 {
37-
status = "okay";
38-
};

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

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#include <zephyr/drivers/gpio.h>
1010
#include <zephyr/drivers/counter.h>
1111
#include <zephyr/logging/log.h>
12-
#include <zephyr/devicetree/clocks.h>
13-
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
1412

1513
LOG_MODULE_REGISTER(idle_counter);
1614

@@ -26,33 +24,6 @@ const struct device *const counter_dev = DEVICE_DT_GET(DT_ALIAS(counter));
2624

2725
static K_SEM_DEFINE(my_sem, 0, 1);
2826

29-
const uint32_t freq[] = {320, 256, 128, 64};
30-
31-
#if defined(CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING)
32-
/*
33-
* Set Global Domain frequency (HSFLL120)
34-
*/
35-
void set_global_domain_frequency(uint32_t freq)
36-
{
37-
int err;
38-
int res;
39-
struct onoff_client cli;
40-
const struct device *hsfll_dev = DEVICE_DT_GET(DT_NODELABEL(hsfll120));
41-
const struct nrf_clock_spec clk_spec_global_hsfll = {.frequency = MHZ(freq)};
42-
43-
LOG_INF("Requested frequency [Hz]: %d", clk_spec_global_hsfll.frequency);
44-
sys_notify_init_spinwait(&cli.notify);
45-
err = nrf_clock_control_request(hsfll_dev, &clk_spec_global_hsfll, &cli);
46-
__ASSERT((err >= 0 && err < 3), "Wrong nrf_clock_control_request return code");
47-
do {
48-
err = sys_notify_fetch_result(&cli.notify, &res);
49-
k_yield();
50-
} while (err == -EAGAIN);
51-
__ASSERT(err == 0, "Wrong clock control request return code");
52-
__ASSERT(res == 0, "Wrong clock control request response");
53-
}
54-
#endif /* CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING */
55-
5627
void counter_handler(const struct device *counter_dev, uint8_t chan_id, uint32_t ticks,
5728
void *user_data)
5829
{
@@ -148,16 +119,9 @@ int main(void)
148119

149120
while (1) {
150121
sleep_with_state_indication(CONFIG_TEST_SLEEP_DURATION_MS);
151-
for (int i = 0; i < ARRAY_SIZE(freq); i++) {
152-
start_time = start_timer(counter_dev);
153-
k_msleep(100);
154-
#if defined(CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING)
155-
sleep_with_state_indication(CONFIG_TEST_SLEEP_DURATION_MS / 2 - 100);
156-
set_global_domain_frequency(freq[(i + 1) % ARRAY_SIZE(freq)]);
157-
k_msleep(10);
158-
#endif /* CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING */
159-
verify_timer(start_time);
160-
}
122+
start_time = start_timer(counter_dev);
123+
k_msleep(100);
124+
verify_timer(start_time);
161125
ret = gpio_pin_set_dt(&led, 1);
162126
__ASSERT(ret == 0, "Unable to turn on LED");
163127
k_msleep(100);

tests/benchmarks/multicore/idle_counter/testcase.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@ common:
99
- ci_tests_benchmarks_current_consumption
1010
tests:
1111
benchmarks.power_consumption.counter:
12-
extra_args:
13-
- idle_counter_CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING=y
14-
harness: pytest
15-
harness_config:
16-
fixture: ppk_power_measure
17-
pytest_root:
18-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_fast_counter_and_s2ram_with_clock_control"
19-
20-
benchmarks.power_consumption.counter.remote_gd_freq_switching:
21-
extra_args:
22-
- remote_CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING=y
2312
harness: pytest
2413
harness_config:
2514
fixture: ppk_power_measure

0 commit comments

Comments
 (0)