Home
last modified time | relevance | path

Searched full:timer (Results 1 – 25 of 1403) sorted by relevance

12345678910>>...57

/Zephyr-Core-3.7.0/drivers/timer/
DKconfig1 # Timer driver configuration options
10 menu "Timer drivers"
19 bool "Timer queries its hardware to find its frequency at runtime"
25 bool "Timer allowed to skew uptime clock during idle"
27 When true, the timer driver is not required to maintain a
46 Timer drivers should select this flag if they are capable of
66 source "drivers/timer/Kconfig.altera_avalon"
67 source "drivers/timer/Kconfig.ambiq"
68 source "drivers/timer/Kconfig.x86"
69 source "drivers/timer/Kconfig.arcv2"
[all …]
DKconfig.x867 prompt "Default System Timer"
12 Select Default System Timer.
15 bool "HPET timer"
23 This option selects High Precision Event Timer (HPET) as a
24 system timer.
27 bool "Local APIC timer"
39 bool "Local APIC timer using TSC deadline mode"
44 Extremely simple timer driver based the local APIC TSC
55 bool "Local APIC timer using TSC time source"
65 timer frequency.
[all …]
Dite_it8xxx2_timer.c9 #include <zephyr/drivers/timer/system_timer.h>
17 LOG_MODULE_REGISTER(timer, LOG_LEVEL_ERR);
22 "ITE RTOS timer HW frequency is fixed at 32768Hz");
24 /* Event timer configurations */
28 /* Event timer max count is 512 sec (base on clock source 32768Hz) */
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) */
44 const int32_t z_sys_timer_irq_for_test = DT_IRQ_BY_IDX(DT_NODELABEL(timer), 5, irq);
49 * One shot timer configurations
[all …]
DKconfig.xtensa7 bool "Xtensa timer support"
12 Enables a system timer driver for Xtensa based on the CCOUNT
16 int "System timer CCOMPAREn register index"
21 used for the system timer. Xtensa CPUs have hard-configured
22 interrupt priorities associated with each timer, and some of
24 need synchronization, like the timer subsystem!). In
25 general timer zero is guaranteed to be present and usable.
DKconfig.cortex_m_systick6 DT_CHOSEN_IDLE_TIMER := zephyr,cortex-m-idle-timer
9 bool "Cortex-M SYSTICK timer"
21 SYSTICK timer and provides the standard "system clock driver" interfaces.
31 bool "Cortex-M SYSTICK timer with sys_clock_cycle_get_64() support"
47 bool "Use an additional timer while entering IDLE"
53 There are chips e.g. STMFX family that use SysTick as a system timer,
55 another timer that is not stopped, but it has lower frequency e.g.
56 RTC, thus it can't be used as a main system timer.
58 Use the IDLE timer for timeout (wakeup) when the system is entering
61 The chosen IDLE timer node has to support setting alarm from the
Dnpcx_itim_timer.c18 * - A system timer based on an ITIM64 (Internal 64-bit timer) instance, clocked
26 * - A event timer based on an ITIM32 (Internal 32-bit timer) instance, clocked
31 * - Its prescaler is set to 1 and the formula between event timer's cycles and
39 #include <zephyr/drivers/timer/system_timer.h>
72 /* Announced cycles in system timer before executing sys_clock_announce() */
77 /* Current target cycles of time-out signal in event timer */
79 /* Total cycles of system timer stopped in "sleep/deep sleep" mode */
81 /* Current cycles in event timer when ec entered "sleep/deep sleep" mode */
99 /* Return current value of 64-bit counter value of system timer */ in npcx_itim_get_sys_cyc64()
112 /* Enable event timer and wait for it to take effect */ in npcx_itim_evt_enable()
[all …]
DKconfig.stm32_lptim6 DT_CHOSEN_STDBY_TIMER := st,lptim-stdby-timer
9 bool "STM32 Low Power Timer [EXPERIMENTAL]"
16 This module implements a kernel device driver for the LowPower Timer
68 Use an additional timer while entering Standby mode.
69 There are chips e.g. STM32WBAX family that use LPTIM as a system timer,
71 another timer that is not stopped, but it has lower frequency e.g.
72 RTC, thus it can't be used as a main system timer.
75 Use the Standby timer for timeout (wakeup) when the system is entering
78 The chosen Standby timer node has to support setting alarm from the
/Zephyr-Core-3.7.0/subsys/portability/cmsis_rtos_v2/
Dtimer.c14 static void zephyr_timer_wrapper(struct k_timer *timer);
26 static void zephyr_timer_wrapper(struct k_timer *timer) in zephyr_timer_wrapper() argument
30 cm_timer = CONTAINER_OF(timer, struct cv2_timer, z_timer); in zephyr_timer_wrapper()
35 * @brief Create a Timer
40 struct cv2_timer *timer; in osTimerNew() local
54 if (k_mem_slab_alloc(&cv2_timer_slab, (void **)&timer, K_MSEC(100)) == 0) { in osTimerNew()
55 (void)memset(timer, 0, sizeof(struct cv2_timer)); in osTimerNew()
60 timer->callback_function = func; in osTimerNew()
61 timer->arg = argument; in osTimerNew()
62 timer->type = type; in osTimerNew()
[all …]
/Zephyr-Core-3.7.0/kernel/
Dtimer.c23 * @brief Handle expiration of a kernel timer object.
25 * @param t Timeout used by the timer.
29 struct k_timer *timer = CONTAINER_OF(t, struct k_timer, timeout); in z_timer_expiration_handler() local
36 * this function. Usually, the timeout structure related to the timer in z_timer_expiration_handler()
39 * interrupts are locked again, a given timer gets restarted from an in z_timer_expiration_handler()
40 * interrupt context that has a priority higher than the system timer in z_timer_expiration_handler()
41 * interrupt. Then, the timeout structure for this timer will turn out in z_timer_expiration_handler()
42 * to be linked to the timeout list. And in such case, since the timer in z_timer_expiration_handler()
52 * if the timer is periodic, start it again; don't add _TICK_ALIGN in z_timer_expiration_handler()
55 if (!K_TIMEOUT_EQ(timer->period, K_NO_WAIT) && in z_timer_expiration_handler()
[all …]
/Zephyr-Core-3.7.0/subsys/portability/cmsis_rtos_v1/
Dcmsis_timer.c14 static void zephyr_timer_wrapper(struct k_timer *timer);
27 static void zephyr_timer_wrapper(struct k_timer *timer) in zephyr_timer_wrapper() argument
31 cm_timer = CONTAINER_OF(timer, struct timer_obj, ztimer); in zephyr_timer_wrapper()
36 * @brief Create a Timer
41 struct timer_obj *timer; in osTimerCreate() local
51 if (k_mem_slab_alloc(&cmsis_timer_slab, (void **)&timer, K_MSEC(100)) == 0) { in osTimerCreate()
52 (void)memset(timer, 0, sizeof(struct timer_obj)); in osTimerCreate()
57 timer->callback_function = timer_def->ptimer; in osTimerCreate()
58 timer->arg = argument; in osTimerCreate()
59 timer->type = type; in osTimerCreate()
[all …]
/Zephyr-Core-3.7.0/lib/posix/options/
Dtimer.c37 struct timer_obj *timer; in zephyr_timer_wrapper() local
39 timer = (struct timer_obj *)ztimer; in zephyr_timer_wrapper()
41 if (timer->reload == 0U) { in zephyr_timer_wrapper()
42 timer->status = NOT_ACTIVE; in zephyr_timer_wrapper()
43 LOG_DBG("timer %p not active", timer); in zephyr_timer_wrapper()
47 if (timer->evp.sigev_notify == SIGEV_NONE) { in zephyr_timer_wrapper()
52 if (timer->evp.sigev_notify_function == NULL) { in zephyr_timer_wrapper()
57 LOG_DBG("calling sigev_notify_function %p", timer->evp.sigev_notify_function); in zephyr_timer_wrapper()
58 (timer->evp.sigev_notify_function)(timer->evp.sigev_value); in zephyr_timer_wrapper()
64 struct timer_obj *timer = (struct timer_obj *)arg; in zephyr_thread_wrapper() local
[all …]
/Zephyr-Core-3.7.0/doc/kernel/services/timing/
Dtimers.rst6 A :dfn:`timer` is a kernel object that measures the passage of time
7 using the kernel's system clock. When a timer's specified time limit
19 Any number of timers can be defined (limited only by available RAM). Each timer
22 A timer has the following key properties:
24 * A **duration** specifying the time interval before the timer
28 * A **period** specifying the time interval between all timer
31 ``K_FOREVER`` means that the timer is a one-shot timer that stops
32 after a single expiration. (For example then, if a timer is started
36 * An **expiry function** that is executed each time the timer expires.
40 * A **stop function** that is executed if the timer is stopped prematurely
[all …]
/Zephyr-Core-3.7.0/subsys/usb/usb_c/
Dusbc_timer.h13 * @brief USB-C Timer Object
16 /** kernel timer */
17 struct k_timer timer; member
20 /** flags to track timer status */
25 * @brief Initialize a timer
27 * @param usbc_timer timer object
28 * @param timeout_ms timer timeout in ms
33 * @brief Start a timer
35 * @param usbc_timer timer object
40 * @brief Check if a timer has expired
[all …]
Dusbc_timer.c9 /** Timer flag to track if timer was started */
11 /** Timer flag to track if timer has expired */
15 * @brief The timer function that's executed when the timer expires
17 static void usbc_timer_handler(struct k_timer *timer) in usbc_timer_handler() argument
19 struct usbc_timer_t *usbc_timer = k_timer_user_data_get(timer); in usbc_timer_handler()
26 k_timer_init(&usbc_timer->timer, usbc_timer_handler, NULL); in usbc_timer_init()
27 k_timer_user_data_set(&usbc_timer->timer, usbc_timer); in usbc_timer_init()
35 k_timer_start(&usbc_timer->timer, K_MSEC(usbc_timer->timeout_ms), K_NO_WAIT); in usbc_timer_start()
59 k_timer_stop(&usbc_timer->timer); in usbc_timer_stop()
/Zephyr-Core-3.7.0/tests/subsys/portability/cmsis_rtos_v2/src/
Dtimer.c29 TC_PRINT("oneshot_callback (Timer %d) = %d\n", in Timer1_Callback()
38 TC_PRINT("periodic_callback (Timer %d) = %d\n", in Timer2_Callback()
52 /* Create one-shot timer */ in ZTEST()
55 zassert_true(id1 != NULL, "error creating one-shot timer"); in ZTEST()
58 zassert_str_equal(timer_attr.name, name, "Error getting Timer name"); in ZTEST()
60 /* Stop the timer before start */ in ZTEST()
63 "error while stopping non-active timer"); in ZTEST()
67 zassert_true(status == osOK, "error starting one-shot timer"); in ZTEST()
69 zassert_equal(osTimerIsRunning(id1), 1, "Error: Timer not running"); in ZTEST()
71 /* Timer should fire only once if setup in one shot in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/kernel/timer/timer_api/src/
Dmain.c43 * remaining time for a partially elapsed timer in ticks will be
52 static void duration_expire(struct k_timer *timer);
53 static void duration_stop(struct k_timer *timer);
55 /** TESTPOINT: init timer via K_TIMER_DEFINE */
113 static void duration_expire(struct k_timer *timer) in duration_expire() argument
120 TIMER_ASSERT(interval_check(interval, DURATION), timer); in duration_expire()
122 TIMER_ASSERT(interval_check(interval, PERIOD), timer); in duration_expire()
126 k_timer_stop(timer); in duration_expire()
130 static void duration_stop(struct k_timer *timer) in duration_stop() argument
135 static void period0_expire(struct k_timer *timer) in period0_expire() argument
[all …]
/Zephyr-Core-3.7.0/tests/subsys/portability/cmsis_rtos_v1/src/
Dtimer.c28 TC_PRINT("oneshot_callback (Timer %d) = %d\n", in Timer1_Callback()
37 TC_PRINT("periodic_callback (Timer %d) = %d\n", in Timer2_Callback()
50 /* Create one-shot timer */ in ZTEST()
53 zassert_true(id1 != NULL, "error creating one-shot timer"); in ZTEST()
55 /* Stop the timer before start */ in ZTEST()
57 zassert_true(status == osErrorResource, "error while stopping non-active timer"); in ZTEST()
61 zassert_true(status == osOK, "error starting one-shot timer"); in ZTEST()
63 /* Timer should fire only once if setup in one shot in ZTEST()
69 "error setting up one-shot timer"); in ZTEST()
72 zassert_true(status == osOK, "error stopping one-shot timer"); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/samples/drivers/counter/alarm/src/
Dmain.c19 #define TIMER DT_NODELABEL(tc4) macro
21 #define TIMER DT_NODELABEL(tc0) macro
23 #define TIMER DT_NODELABEL(extrtc0) macro
25 #define TIMER DT_NODELABEL(rtc0) macro
27 #define TIMER DT_INST(0, st_stm32_counter) macro
29 #define TIMER DT_INST(0, st_stm32_rtc) macro
31 #define TIMER DT_NODELABEL(timer3) macro
33 #define TIMER DT_NODELABEL(counter0) macro
35 #define TIMER DT_INST(0, xlnx_xps_timer_1_00_a) macro
37 #define TIMER DT_NODELABEL(timer0) macro
[all …]
/Zephyr-Core-3.7.0/drivers/counter/
Dcounter_smartbond_timer.c28 #define COUNTER_DT_DEVICE(_idx) DEVICE_DT_GET_OR_NULL(DT_NODELABEL(timer##_idx))
50 /* Register set for timer */
51 TIMER2_Type *timer; member
53 /* Timer driven by DIVn if 1 or lp_clk if 0 */
81 * a timer block will automatically be switched from DIVN to LP and vice versa.
96 switch ((uint32_t)config->timer) { in counter_smartbond_pdc_trigger_get()
97 case (uint32_t)TIMER: in counter_smartbond_pdc_trigger_get()
138 TIMER2_Type *timer = config->timer; in counter_smartbond_start() local
153 timer->TIMER2_CTRL_REG |= (TIMER2_TIMER2_CTRL_REG_TIM_CLK_EN_Msk | in counter_smartbond_start()
164 TIMER2_Type *timer = config->timer; in counter_smartbond_stop() local
[all …]
Dcounter_ll_stm32_timer.c26 /** Maximum number of timer channels. */
29 /** Number of channels for timer by index. */
105 TIM_TypeDef *timer; member
119 TIM_TypeDef *timer = config->timer; in counter_stm32_start() local
122 LL_TIM_EnableCounter(timer); in counter_stm32_start()
130 TIM_TypeDef *timer = config->timer; in counter_stm32_stop() local
133 LL_TIM_DisableCounter(timer); in counter_stm32_stop()
142 return LL_TIM_GetAutoReload(config->timer); in counter_stm32_get_top_value()
149 return LL_TIM_GetCounter(config->timer); in counter_stm32_read()
201 TIM_TypeDef *timer = config->timer; in counter_stm32_set_cc() local
[all …]
Ddualtimer_cmsdk_apb.h16 /* Offset: 0x000 (R/W) Timer 1 Load */
18 /* Offset: 0x004 (R/ ) Timer 1 Counter Current Value */
20 /* Offset: 0x008 (R/W) Timer 1 Control */
22 /* Offset: 0x00C ( /W) Timer 1 Interrupt Clear */
24 /* Offset: 0x010 (R/ ) Timer 1 Raw Interrupt Status */
26 /* Offset: 0x014 (R/ ) Timer 1 Masked Interrupt Status */
32 /* Offset: 0x020 (R/W) Timer 2 Load */
34 /* Offset: 0x024 (R/ ) Timer 2 Counter Current Value */
36 /* Offset: 0x028 (R/W) Timer 2 Control */
38 /* Offset: 0x02C ( /W) Timer 2 Interrupt Clear */
[all …]
/Zephyr-Core-3.7.0/drivers/pwm/
Dpwm_stm32.c79 /** Timer clock (Hz). */
90 TIM_TypeDef *timer; member
101 /** Maximum number of timer channels : some stm32 soc have 6 else only 4 */
131 /** Maximum number of complemented timer channels is ARRAY_SIZE(ch2ll_n)*/
213 * Obtain timer clock speed.
215 * @param pclken Timer clock control subsystem.
216 * @param tim_clk Where computed timer clock will be stored.
267 * Up to a certain threshold value of APB{1,2} prescaler, timer clock in get_tim_clk()
269 * (2 if TIMPRE=0, 4 if TIMPRE=1). Above threshold, timer clock is set in get_tim_clk()
297 * If the APB prescaler equals 1, the timer clock frequencies in get_tim_clk()
[all …]
Dpwm_gecko.c16 TIMER_TypeDef *timer; member
33 if (BUS_RegMaskedRead(&cfg->timer->CC[channel].CTRL, in pwm_gecko_set_cycles()
37 BUS_RegMaskedWrite(&cfg->timer->ROUTE, in pwm_gecko_set_cycles()
40 BUS_RegMaskedSet(&cfg->timer->ROUTE, 1 << channel); in pwm_gecko_set_cycles()
42 BUS_RegMaskedWrite(&cfg->timer->ROUTELOC0, in pwm_gecko_set_cycles()
46 BUS_RegMaskedSet(&cfg->timer->ROUTEPEN, 1 << channel); in pwm_gecko_set_cycles()
52 TIMER_InitCC(cfg->timer, channel, &compare_config); in pwm_gecko_set_cycles()
55 cfg->timer->CC[channel].CTRL |= (flags & PWM_POLARITY_INVERTED) ? in pwm_gecko_set_cycles()
58 TIMER_TopSet(cfg->timer, period_cycles); in pwm_gecko_set_cycles()
60 TIMER_CompareBufSet(cfg->timer, channel, pulse_cycles); in pwm_gecko_set_cycles()
[all …]
/Zephyr-Core-3.7.0/dts/bindings/pwm/
Despressif,esp32-mcpwm.yaml17 and asymmetric configuration. MCPWMxA and MCPWMxB will share the same timer, thus having the same
20 The driver currently always use the timer x for operator x. Timer 0 will use operator 0 for
22 Timer 1 will use operator 1 for PWM1A/B, and so on.
25 Channel 0 -> Timer 0, Operator 0, output PWM0A
26 Channel 1 -> Timer 0, Operator 0, output PWM0B
27 Channel 2 -> Timer 1, Operator 1, output PWM1A
28 Channel 3 -> Timer 1, Operator 1, output PWM1B
29 Channel 4 -> Timer 2, Operator 2, output PWM2A
30 Channel 5 -> Timer 2, Operator 2, output PWM2B
89 8 bit timer prescale for the global clock.
[all …]
/Zephyr-Core-3.7.0/tests/kernel/timer/timer_monotonic/
Dtestcase.yaml2 kernel.timer.monotonic:
5 - timer
9 kernel.timer.monotonic.apic.tsc:
12 - timer
18 kernel.timer.monotonic.icount_off:
22 - timer

12345678910>>...57