Skip to content

Commit e409745

Browse files
bjarki-andreasencarlescufi
authored andcommitted
benchmarks: multicore: idle_spim_loopback: Remove GD freq changes
Global domain frequency (hsfll120) is no longer managed by drivers. Test shall not request global domain frequency lower than default. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 9e75865 commit e409745

File tree

5 files changed

+1
-195
lines changed

5 files changed

+1
-195
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,3 @@
6363
spi-max-frequency = <DT_FREQ_M(4)>;
6464
};
6565
};
66-
67-
&hsfll120 {
68-
status = "okay";
69-
};

tests/benchmarks/multicore/idle_spim_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,3 @@
7272
&dma_fast_region {
7373
status = "okay";
7474
};
75-
76-
&hsfll120 {
77-
status = "okay";
78-
};

tests/benchmarks/multicore/idle_spim_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast_slow_pins.overlay

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,3 @@
8080
&dma_fast_region {
8181
status = "okay";
8282
};
83-
84-
&hsfll120 {
85-
status = "okay";
86-
};

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

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ LOG_MODULE_REGISTER(idle_spim_loopback, LOG_LEVEL_INF);
1212
#include <zephyr/drivers/spi.h>
1313
#include <zephyr/linker/devicetree_regions.h>
1414
#include <zephyr/pm/device_runtime.h>
15-
#include <zephyr/devicetree/clocks.h>
16-
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
1715

1816
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(DT_ALIAS(led), gpios);
1917

@@ -73,33 +71,6 @@ static volatile uint32_t high, low;
7371
static struct k_timer my_timer;
7472
static volatile bool timer_expired;
7573

76-
#if defined(CONFIG_CLOCK_CONTROL)
77-
const uint32_t freq[] = {320, 256, 128, 64};
78-
79-
/*
80-
* Set Global Domain frequency (HSFLL120)
81-
*/
82-
void set_global_domain_frequency(uint32_t freq)
83-
{
84-
int err;
85-
int res;
86-
struct onoff_client cli;
87-
const struct device *hsfll_dev = DEVICE_DT_GET(DT_NODELABEL(hsfll120));
88-
const struct nrf_clock_spec clk_spec_global_hsfll = {.frequency = MHZ(freq)};
89-
90-
printk("Requested frequency [Hz]: %d\n", clk_spec_global_hsfll.frequency);
91-
sys_notify_init_spinwait(&cli.notify);
92-
err = nrf_clock_control_request(hsfll_dev, &clk_spec_global_hsfll, &cli);
93-
__ASSERT((err >= 0 && err < 3), "Wrong nrf_clock_control_request return code");
94-
do {
95-
err = sys_notify_fetch_result(&cli.notify, &res);
96-
k_yield();
97-
} while (err == -EAGAIN);
98-
__ASSERT(err == 0, "Wrong clock control request return code");
99-
__ASSERT(res == 0, "Wrong clock control request response");
100-
}
101-
#endif /* CONFIG_CLOCK_CONTROL */
102-
10374
void my_timer_handler(struct k_timer *dummy)
10475
{
10576
timer_expired = true;
@@ -145,10 +116,6 @@ int main(void)
145116
ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
146117
__ASSERT(ret == 0, "Could not configure led GPIO");
147118

148-
#if defined(CONFIG_CLOCK_CONTROL)
149-
set_global_domain_frequency(CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_MHZ);
150-
#endif
151-
152119
LOG_INF("Multicore idle_spi_loopback test on %s", CONFIG_BOARD_TARGET);
153120
LOG_INF("Core will sleep for %u ms", CONFIG_TEST_SLEEP_DURATION_MS);
154121
LOG_INF("Testing SPIM device %s", spim_spec.bus->name);
@@ -240,12 +207,7 @@ int main(void)
240207
} else {
241208
LOG_ERR("spi_transceive_dt, err: %d", ret);
242209
}
243-
#if defined(CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING)
244-
if (switch_flag) {
245-
set_global_domain_frequency(freq[loop_counter % ARRAY_SIZE(freq)]);
246-
switch_flag = 0;
247-
}
248-
#endif
210+
249211
__ASSERT(ret == 0, "Error: spi_transceive_dt, err: %d\n", ret);
250212

251213
/* Check if the received data is consistent with the data sent. */

tests/benchmarks/multicore/idle_spim_loopback/testcase.yaml

Lines changed: 0 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -136,76 +136,6 @@ tests:
136136
pytest_root:
137137
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
138138

139-
benchmarks.multicore.idle_spim_loopback.4_bytes.gd_freq_256MHz.s2ram_fast:
140-
filter: not CONFIG_COVERAGE
141-
tags: ppk_power_measure
142-
extra_args:
143-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
144-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
145-
- CONFIG_CLOCK_CONTROL=y
146-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_OPTION_256MHZ=y
147-
harness: pytest
148-
harness_config:
149-
fixture: spi_loopback
150-
pytest_root:
151-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
152-
153-
benchmarks.multicore.idle_spim_loopback.4_bytes.gd_freq_128MHz.s2ram_fast:
154-
filter: not CONFIG_COVERAGE
155-
tags: ppk_power_measure
156-
extra_args:
157-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
158-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
159-
- CONFIG_CLOCK_CONTROL=y
160-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_OPTION_128MHZ=y
161-
harness: pytest
162-
harness_config:
163-
fixture: spi_loopback
164-
pytest_root:
165-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
166-
167-
benchmarks.multicore.idle_spim_loopback.4_bytes.s2ram_fast.remote_gd_freq_switching:
168-
filter: not CONFIG_COVERAGE
169-
tags: ppk_power_measure
170-
extra_args:
171-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
172-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
173-
- idle_spim_loopback_CONFIG_DATA_FIELD=4
174-
- SB_CONFIG_REMOTE_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING=y
175-
harness: pytest
176-
harness_config:
177-
fixture: spi_loopback
178-
pytest_root:
179-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
180-
181-
benchmarks.multicore.idle_spim_loopback.4_bytes.gd_freq_64MHz.s2ram_fast:
182-
filter: not CONFIG_COVERAGE
183-
tags: ppk_power_measure
184-
extra_args:
185-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
186-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
187-
- CONFIG_CLOCK_CONTROL=y
188-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_OPTION_64MHZ=y
189-
harness: pytest
190-
harness_config:
191-
fixture: spi_loopback
192-
pytest_root:
193-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
194-
195-
benchmarks.multicore.idle_spim_loopback.4_bytes.gd_freq_switching.s2ram_fast:
196-
filter: not CONFIG_COVERAGE
197-
tags: ppk_power_measure
198-
extra_args:
199-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
200-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
201-
- CONFIG_CLOCK_CONTROL=y
202-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING=y
203-
harness: pytest
204-
harness_config:
205-
fixture: spi_loopback
206-
pytest_root:
207-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram_7s"
208-
209139
#
210140
# 16 Bytes of data
211141
#
@@ -323,80 +253,6 @@ tests:
323253
pytest_root:
324254
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
325255

326-
benchmarks.multicore.idle_spim_loopback.16_bytes.s2ram_fast.remote_gd_freq_switching:
327-
filter: not CONFIG_COVERAGE
328-
tags: ppk_power_measure
329-
extra_args:
330-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
331-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
332-
- idle_spim_loopback_CONFIG_DATA_FIELD=16
333-
- SB_CONFIG_REMOTE_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING=y
334-
harness: pytest
335-
harness_config:
336-
fixture: spi_loopback
337-
pytest_root:
338-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
339-
340-
benchmarks.multicore.idle_spim_loopback.16_bytes.gd_freq_256MHz.s2ram_fast:
341-
filter: not CONFIG_COVERAGE
342-
tags: ppk_power_measure
343-
extra_args:
344-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
345-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
346-
- idle_spim_loopback_CONFIG_DATA_FIELD=16
347-
- CONFIG_CLOCK_CONTROL=y
348-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_OPTION_256MHZ=y
349-
harness: pytest
350-
harness_config:
351-
fixture: spi_loopback
352-
pytest_root:
353-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
354-
355-
benchmarks.multicore.idle_spim_loopback.16_bytes.gd_freq_128MHz.s2ram_fast:
356-
filter: not CONFIG_COVERAGE
357-
tags: ppk_power_measure
358-
extra_args:
359-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
360-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
361-
- idle_spim_loopback_CONFIG_DATA_FIELD=16
362-
- CONFIG_CLOCK_CONTROL=y
363-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_OPTION_128MHZ=y
364-
harness: pytest
365-
harness_config:
366-
fixture: spi_loopback
367-
pytest_root:
368-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
369-
370-
benchmarks.multicore.idle_spim_loopback.16_bytes.gd_freq_64MHz.s2ram_fast:
371-
filter: not CONFIG_COVERAGE
372-
tags: ppk_power_measure
373-
extra_args:
374-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
375-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
376-
- idle_spim_loopback_CONFIG_DATA_FIELD=16
377-
- CONFIG_CLOCK_CONTROL=y
378-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_OPTION_64MHZ=y
379-
harness: pytest
380-
harness_config:
381-
fixture: spi_loopback
382-
pytest_root:
383-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram"
384-
385-
benchmarks.multicore.idle_spim_loopback.16_bytes.gd_freq_switching.s2ram_fast:
386-
filter: not CONFIG_COVERAGE
387-
tags: ppk_power_measure
388-
extra_args:
389-
- idle_spim_loopback_CONF_FILE=prj_s2ram.conf
390-
- idle_spim_loopback_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
391-
- idle_spim_loopback_CONFIG_DATA_FIELD=16
392-
- CONFIG_CLOCK_CONTROL=y
393-
- CONFIG_GLOBAL_DOMAIN_CLOCK_FREQUENCY_SWITCHING=y
394-
harness: pytest
395-
harness_config:
396-
fixture: spi_loopback
397-
pytest_root:
398-
- "${CUSTOM_ROOT_TEST_DIR}/test_measure_power_consumption.py::test_measure_and_data_dump_spim_and_s2ram_7s"
399-
400256
#
401257
# 4 Bytes of data with SPI Chip Select Lock enabled
402258
#

0 commit comments

Comments
 (0)