Lines Matching +full:level +full:- +full:detect
2 * SPDX-License-Identifier: Apache-2.0
25 * which is a 13 MHz 64 bit up-counter. But timeout interrupts are
26 * delivered by ostimers[0], which is a 32 bit (!) down-counter (!!)
28 * slaved the same underlying clock -- they don't skew relative to
72 #define MAX_TICKS ((0xffffffffU - OST_PER_TICK) / OST_PER_TICK)
73 #define CYC64_MAX (0xffffffff - OST64_PER_TICK)
101 uint64_t end = now + CLAMP(ticks - 1, 0, MAX_TICKS) * OST64_PER_TICK; in sys_clock_set_timeout()
102 uint32_t dt = (uint32_t)MIN(end - last_announce, CYC64_MAX); in sys_clock_set_timeout()
105 dt = ((dt + OST64_PER_TICK - 1) / OST64_PER_TICK) * OST64_PER_TICK; in sys_clock_set_timeout()
108 uint32_t cyc = 2 * (dt - (uint32_t)(now - last_announce)); in sys_clock_set_timeout()
125 ret = (uint32_t)((sys_clock_cycle_get_64() - last_announce) in sys_clock_elapsed()
134 * Zephyr-usable interrupts are delivered at the same level. in timer_isr()
136 * take a spinlock here. But ideally we should verify/detect in timer_isr()
140 uint64_t dcyc = sys_clock_cycle_get_64() - last_announce; in timer_isr()
172 * a built-in divide by two (or it's configurable and I don't in mtk_adsp_timer_init()