Lines Matching +full:wakeup +full:- +full:and +full:- +full:sleep

4  * SPDX-License-Identifier: Apache-2.0
26 #define MAX_TICKS ((MAX_CYC - CYC_PER_TICK) / CYC_PER_TICK)
34 /* Total cycles of the timer compensated to include the time lost in "sleep/deep sleep" modes.
36 * certain deep sleep modes and the time elapsed when it is powered off.
54 uint32_t dticks = (uint32_t)((now - last_count) / CYC_PER_TICK); in mcux_lpc_ostick_isr()
57 base->OSEVENT_CTRL &= ~OSTIMER_OSEVENT_CTRL_OSTIMER_INTENA_MASK; in mcux_lpc_ostick_isr()
64 if ((int64_t)(next - now) < MIN_DELAY) { in mcux_lpc_ostick_isr()
76 /* The OS Timer is disabled in certain low power modes and cannot wakeup the system
78 * OS Timer to save off the count if needed and also start a wakeup counter
79 * that would wakeup the system from deep power down modes.
121 /* Counter is set to wakeup the system after the requested time */ in mcux_lpc_ostick_set_counter_timeout()
135 * was disabled. Also in certain cases, the OS Timer might lose its state and needs
151 slept_time_ticks = counter_get_top_value(counter_dev) - slept_time_ticks; in mcux_lpc_ostick_compensate_system_timer()
183 /* OS Timer may not be able to wakeup in certain low power modes. in sys_clock_set_timeout()
184 * For these cases, we start a counter that can wakeup in sys_clock_set_timeout()
187 if (pm_state_next_get(0)->state == PM_STATE_STANDBY) { in sys_clock_set_timeout()
199 ticks = CLAMP(ticks - 1, 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
206 adj = (uint32_t)(now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
207 if (cyc <= MAX_CYC - adj) { in sys_clock_set_timeout()
214 if ((int32_t)(cyc + last_count - now) < MIN_DELAY) { in sys_clock_set_timeout()
218 OSTIMER_SetMatchValue(base, cyc + last_count - cyc_sys_compensated, NULL); in sys_clock_set_timeout()
231 uint32_t ret = ((uint32_t)mcux_lpc_ostick_get_compensated_timer_value() - in sys_clock_elapsed()
254 if (pm_state_next_get(0)->state == PM_STATE_STANDBY) { in sys_clock_idle_exit()
282 /* On some SoC's, OS Timer cannot wakeup from low power mode in standby modes */ in sys_clock_driver_init()