Skip to content

Commit cca170c

Browse files
committed
tests: benchmarks: multicore: idle_flpr: Update the test
Recently, there were improvements in the idle_ppr test. Apply similar changes to the idle_flpr test. Signed-off-by: Sebastian Głąb <[email protected]>
1 parent e7f2134 commit cca170c

File tree

6 files changed

+34
-29
lines changed

6 files changed

+34
-29
lines changed

tests/benchmarks/multicore/idle_flpr/remote/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ cmake_minimum_required(VERSION 3.20.0)
99
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
1010
project(remote)
1111

12-
target_sources(app PRIVATE src/main.c)
12+
target_sources(app PRIVATE ../src/main.c)
1313

14-
if(DEFINED CONFIG_SOC_NRF54H20_CPUFLPR)
15-
message(STATUS "Power Mode handler for RISC V is included.")
16-
target_sources(app PRIVATE ../../common/power_off.c)
14+
if(CONFIG_SOC_NRF54H20_CPUFLPR)
15+
message(STATUS "Power Mode handler for RISC V is included.")
16+
target_sources(app PRIVATE ../../common/power_off.c)
1717
endif()

tests/benchmarks/multicore/idle_flpr/remote/boards/nrf54h20dk_nrf54h20_cpuflpr.overlay

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
*/
66

77
/ {
8+
aliases {
9+
led0 = &led1;
10+
};
11+
12+
leds {
13+
compatible = "gpio-leds";
14+
led1: led_1 {
15+
gpios = < &gpio9 0x1 0x0 >;
16+
label = "Green LED 1";
17+
};
18+
};
19+
820
cpus {
921
power-states {
1022
wait: wait {
@@ -27,3 +39,12 @@
2739
&cpu {
2840
cpu-power-states = <&wait &hibernate>;
2941
};
42+
43+
&gpio9 {
44+
status = "okay";
45+
};
46+
47+
&gpiote130 {
48+
status = "okay";
49+
owned-channels = <2>;
50+
};
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CONFIG_LOG=y
1+
CONFIG_LOG=n
22
CONFIG_CONSOLE=n
33
CONFIG_UART_CONSOLE=n
44
CONFIG_SERIAL=n
@@ -7,5 +7,4 @@ CONFIG_NCS_BOOT_BANNER=n
77
CONFIG_PRINTK=n
88

99
CONFIG_ASSERT=y
10-
11-
CONFIG_NRF_REGTOOL_VERBOSITY=1
10+
CONFIG_GPIO=y

tests/benchmarks/multicore/idle_flpr/remote/prj_s2ram.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ CONFIG_BOOT_BANNER=n
1111
CONFIG_NCS_BOOT_BANNER=n
1212

1313
CONFIG_ASSERT=y
14+
CONFIG_GPIO=y

tests/benchmarks/multicore/idle_flpr/remote/src/main.c

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

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ int main(void)
4646
while (1) {
4747
timer_expired = false;
4848

49+
/* Turn ON LED */
50+
ret = gpio_pin_set_dt(&led, 1);
51+
4952
/* start a one-shot timer that expires after 1 second */
5053
k_timer_start(&my_timer, K_MSEC(1000), K_NO_WAIT);
5154

52-
/* Turn ON LED */
53-
ret = gpio_pin_set_dt(&led, 1);
5455
if (ret < 0) {
5556
LOG_ERR("Unable to turn on LED");
5657
}
@@ -62,16 +63,16 @@ int main(void)
6263
k_yield();
6364
}
6465

66+
LOG_INF("Run %d", counter);
67+
counter++;
68+
6569
/* Turn OFF LED */
6670
ret = gpio_pin_set_dt(&led, 0);
6771
if (ret < 0) {
6872
LOG_ERR("Unable to turn off LED");
6973
}
7074
__ASSERT(ret == 0, "Unable to turn off LED\n");
7175

72-
LOG_INF("Run %d", counter);
73-
counter++;
74-
7576
/* Sleep / enter low power state */
7677
k_msleep(CONFIG_TEST_SLEEP_DURATION_MS);
7778
}

0 commit comments

Comments
 (0)