Lines Matching +full:one +full:- +full:timer +full:- +full:only
8 * SPDX-License-Identifier: Apache-2.0
15 * @brief SiLabs Gecko BURTC-based sys_clock driver
22 #include <zephyr/drivers/timer/system_timer.h>
36 /* Maximum time interval between timer interrupts (in hw_cycles) */
55 * should write hw_cycles timer clock frequency upon init
71 /* Set to true when timer is initialized */
83 /* NOTE: this is the only place where g_last_count is modified, in burtc_isr()
84 * so we don't need to do make the whole read-and-modify atomic, just in burtc_isr()
90 uint32_t unannounced = (curr - prev) / g_cyc_per_tick; in burtc_isr()
99 * announce the very next tick - in that case we skip one and in burtc_isr()
100 * announce the one after it instead in burtc_isr()
102 if ((next - curr) < MIN_DELAY_CYC) { in burtc_isr()
122 * beginning from the closest upcoming one: in sys_clock_set_timeout()
123 * 0 - announce upcoming tick itself in sys_clock_set_timeout()
124 * 1 - skip upcoming one, but announce the one after it, etc. in sys_clock_set_timeout()
127 ticks = CLAMP(ticks - 1, 0, g_max_timeout_ticks); in sys_clock_set_timeout()
135 uint32_t unannounced = (curr - prev) / g_cyc_per_tick; in sys_clock_set_timeout()
137 /* Which tick to announce (counting from the last announced one) */ in sys_clock_set_timeout()
150 * the very next tick - in that case we skip one and announce the one in sys_clock_set_timeout()
153 if ((next - curr) < MIN_DELAY_CYC) { in sys_clock_set_timeout()
166 return (BURTC_CounterGet() - g_last_count) / g_cyc_per_tick; in sys_clock_elapsed()
173 * a value of some 32-bit hw_cycles counter which counts with in sys_clock_cycle_get_32()
200 "%u cycle-long tick is too short to be scheduled " in burtc_init()
202 "%d and timer frequency is %u", in burtc_init()
220 /* Start the timer and announce 1 kernel tick */ in burtc_init()
225 BURTC->CNT = 0; in burtc_init()