Lines Matching +full:threshold +full:- +full:count
4 * SPDX-License-Identifier: Apache-2.0
10 * TI SimpleLink CC13X2/CC26X2 RTC-based system timer
13 * RTC counts continually in 64-bit mode and timeouts are
54 * a safe threshold for the comparator.
58 /* RTC count of the last announce call, rounded down to tick boundary. */
75 /* get the current RTC count corresponding to compare window */ in setThreshold()
79 /* assume next never be more than half the maximum 32 bit count value */ in setThreshold()
80 if ((next - now) > (uint32_t)0x80000000) { in setThreshold()
83 } else if ((now + COMPARE_MARGIN - next) < (uint32_t)0x80000000) { in setThreshold()
89 /* set next compare threshold in RTC */ in setThreshold()
111 ticks = (currCount - rtc_last) / RTC_COUNTS_PER_TICK; in rtc_isr()
120 /* calculate new 64-bit RTC count for next interrupt */ in rtc_isr()
197 ticks = CLAMP(ticks - 1, 0, (int32_t) MAX_TICKS); in sys_clock_set_timeout()
202 uint64_t count = AONRTCCurrent64BitValueGet(); in sys_clock_set_timeout() local
204 (count - rtc_last); in sys_clock_set_timeout()
221 uint32_t ret = (AONRTCCurrent64BitValueGet() - rtc_last) / in sys_clock_elapsed()