Commit 5cbae7f2 authored by Krzysztof Chruściński's avatar Krzysztof Chruściński Committed by Benjamin Cabé
Browse files

tests: kernel: tickless: tickless_concept: Support more frequencies



Test was assuming that CONFIG_SYS_CLOCK_TICKS_PER_SEC=100 but such
frequency is not well supported on SoC which are based on 32768 Hz RTC
clock. Align test to be able to work with different sys_clock
frequency by converting previously 20 ticks to milliseconds.

Set CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768 when system clock is using
Nordic RTC timer driver.

Signed-off-by: default avatarKrzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
parent 589333e4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
# Copyright (c) 2025 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config SYS_CLOCK_TICKS_PER_SEC
	default 32768 if NRF_RTC_TIMER
	default 100

source "Kconfig.zephyr"
+0 −1
Original line number Diff line number Diff line
CONFIG_ZTEST=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_MP_MAX_NUM_CPUS=1
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
static K_THREAD_STACK_ARRAY_DEFINE(tstack, NUM_THREAD, STACK_SIZE);
static struct k_thread tdata[NUM_THREAD];

#define IDLE_THRESH 20
#define IDLE_THRESH k_ms_to_ticks_floor64(200)

/*sleep duration tickless*/
#define SLEEP_TICKLESS	 k_ticks_to_ms_floor64(IDLE_THRESH)