Lines Matching +full:timeout +full:- +full:period
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
80 if ((next - now) > (uint32_t)0x80000000) { in setThreshold()
83 } else if ((now + COMPARE_MARGIN - next) < (uint32_t)0x80000000) { 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()
153 uint64_t period; in startDevice() local
164 * set the compare register to one period. in startDevice()
165 * For a very small period round up to interrupt upon 4th tick in in startDevice()
168 period = RTC_COUNTS_PER_TICK; in startDevice()
169 if (period < 0x40000) { in startDevice()
172 /* else, interrupt on first period expiration */ in startDevice()
173 compare = period >> 16; in startDevice()
197 ticks = CLAMP(ticks - 1, 0, (int32_t) MAX_TICKS); in sys_clock_set_timeout()
201 /* Compute number of RTC cycles until the next timeout. */ in sys_clock_set_timeout()
203 uint64_t timeout = ticks * RTC_COUNTS_PER_TICK + in sys_clock_set_timeout() local
204 (count - rtc_last); in sys_clock_set_timeout()
207 timeout = DIV_ROUND_UP(timeout, RTC_COUNTS_PER_TICK) * in sys_clock_set_timeout()
209 timeout = MIN(timeout, MAX_CYC); in sys_clock_set_timeout()
210 timeout += rtc_last; in sys_clock_set_timeout()
213 setThreshold(timeout >> 16); in sys_clock_set_timeout()
221 uint32_t ret = (AONRTCCurrent64BitValueGet() - rtc_last) / in sys_clock_elapsed()