Lines Matching +full:enable +full:- +full:wait +full:- +full:mode

3  * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/dt-bindings/interrupt-controller/ite-intc.h>
19 #define COUNT_1US (EC_FREQ / USEC_PER_SEC - 1)
31 /* Busy wait low timer configurations */
36 /* Busy wait high timer configurations */
40 /* Busy wait high timer max count is 71.58min (base on clock source 1MHz) */
116 * This timer is used to wake up chip from sleep mode to complete
135 timer2_reg->ET2PSR = EXT_PSR_32P768K; in timer_5ms_one_shot()
142 timer2_reg->ET2CNTLH2R = (uint8_t)((hw_cnt >> 16) & 0xff); in timer_5ms_one_shot()
143 timer2_reg->ET2CNTLHR = (uint8_t)((hw_cnt >> 8) & 0xff); in timer_5ms_one_shot()
144 timer2_reg->ET2CNTLLR = (uint8_t)(hw_cnt & 0xff); in timer_5ms_one_shot()
160 usec_to_wait--; in arch_busy_wait()
163 if ((IT8XXX2_EXT_CNTOX(BUSY_WAIT_H_TIMER) - start) >= usec_to_wait) { in arch_busy_wait()
172 /* Enable and re-start event timer */ in evt_timer_enable()
191 uint32_t dticks = (~(IT8XXX2_EXT_CNTOX(FREE_RUN_TIMER)) - in evt_timer_isr()
199 /* enable event timer */ in evt_timer_isr()
214 * TODO: to increment 32-bit "top half" here for software 64-bit in free_run_timer_overflow_isr()
226 /* Always return for non-tickless kernel system */ in sys_clock_set_timeout()
265 dcycles = next_cycs - now; in sys_clock_set_timeout()
270 /* Set event timer 24-bit count */ in sys_clock_set_timeout()
276 /* enable event timer */ in sys_clock_set_timeout()
287 /* Always return 0 for non-tickless kernel system */ in sys_clock_elapsed()
297 uint32_t dticks = (~(IT8XXX2_EXT_CNTOX(FREE_RUN_TIMER)) - in sys_clock_elapsed()
312 * mode, the observer count value is the same as count, so after in sys_clock_cycle_get_32()
314 * combined mode, the observer count value is the same as NOT in sys_clock_cycle_get_32()
347 return -1; in timer_init()
353 return -1; in timer_init()
357 /* Enable and re-start external timer x */ in timer_init()
379 /* Enable and re-start external timer x */ in timer_init()
398 /* Enable 32-bit free run timer overflow interrupt */ in sys_clock_driver_init()
401 /* Set 32-bit timer4 for free run*/ in sys_clock_driver_init()
411 /* Set 24-bit timer3 for timeout event */ in sys_clock_driver_init()
432 /* Set timer5 and timer6 combinational mode for busy wait */ in sys_clock_driver_init()
435 /* Set 32-bit timer6 to count-- every 1us */ in sys_clock_driver_init()
441 LOG_ERR("Init busy wait high timer failed"); in sys_clock_driver_init()
446 * Set 24-bit timer5 to overflow every 1us in sys_clock_driver_init()
448 * mode, timer6 counter will automatically decrease one count in sys_clock_driver_init()
449 * and timer5 will automatically re-start counting down in sys_clock_driver_init()
459 LOG_ERR("Init busy wait low timer failed"); in sys_clock_driver_init()