Lines Matching +full:track +full:- +full:count
4 * SPDX-License-Identifier: Apache-2.0
21 * - system clock based on an LPTMR instance, clocked by SIRC output
22 * SIRCDIV3, prescaler divide-by-1, SIRC at 8MHz
23 * - no tickless
56 SYSTEM_TIMER_INSTANCE->CSR |= LPTMR_CSR_TCF(1); /* Rearm timer. */ in lptmr_irq_handler()
57 cycle_count += CYCLES_PER_TICK; /* Track cycles. */ in lptmr_irq_handler()
63 return cycle_count + SYSTEM_TIMER_INSTANCE->CNR; in sys_clock_cycle_get_32()
81 if ((SCG->SIRCCSR & SCG_SIRCCSR_SIRCEN_MASK) == SCG_SIRCCSR_SIRCEN(0)) { in sys_clock_driver_init()
85 * This is incompatible with this driver, which is SIRC-based. in sys_clock_driver_init()
87 return -ENODEV; in sys_clock_driver_init()
91 csr = SYSTEM_TIMER_INSTANCE->CSR; in sys_clock_driver_init()
94 SYSTEM_TIMER_INSTANCE->CSR = csr; in sys_clock_driver_init()
104 sircdiv = SCG->SIRCDIV; in sys_clock_driver_init()
107 SCG->SIRCDIV = sircdiv; in sys_clock_driver_init()
118 SYSTEM_TIMER_INSTANCE->CSR = csr; in sys_clock_driver_init()
123 psr = SYSTEM_TIMER_INSTANCE->PSR; in sys_clock_driver_init()
126 SYSTEM_TIMER_INSTANCE->PSR = psr; in sys_clock_driver_init()
129 * Set compare register to the proper tick count. The check in sys_clock_driver_init()
135 if ((SCG->SIRCCFG & SCG_SIRCCFG_RANGE_MASK) != SIRC_RANGE_8MHZ) { in sys_clock_driver_init()
136 return -EINVAL; in sys_clock_driver_init()
138 SYSTEM_TIMER_INSTANCE->CMR = CYCLES_PER_TICK; in sys_clock_driver_init()
145 csr = SYSTEM_TIMER_INSTANCE->CSR; in sys_clock_driver_init()
147 SYSTEM_TIMER_INSTANCE->CSR = csr; in sys_clock_driver_init()