Searched refs:top_val (Results 1 – 4 of 4) sorted by relevance
183 uint32_t top_val = counter_gecko_get_top_value(dev); in counter_gecko_set_alarm() local185 if ((top_val != 0) && (alarm_cfg->ticks > top_val)) { in counter_gecko_set_alarm()203 dev_data->alarm[chan_id].ticks = top_val + (alarm_cfg->ticks - now_ticks); in counter_gecko_set_alarm()206 (top_val - (now_ticks - alarm_cfg->ticks)) % top_val; in counter_gecko_set_alarm()
120 const uint32_t top_val = config->info.max_top_value; in stm_set_alarm() local127 __ASSERT_NO_MSG(data->guard_period < top_val); in stm_set_alarm()128 max_rel_val = top_val - data->guard_period; in stm_set_alarm()140 irq_on_late = ticks < (top_val / 2); in stm_set_alarm()142 max_rel_val = irq_on_late ? top_val / 2 : top_val; in stm_set_alarm()143 ticks = ticks_add(now, ticks, top_val); in stm_set_alarm()155 diff = ticks_sub(ticks - 1, REG_READ(STM_CNT), top_val); in stm_set_alarm()
360 uint32_t top_val = ifx_cat1_counter_get_top_value(dev); in ifx_cat1_counter_set_alarm() local367 if (alarm_cfg->ticks > top_val) { in ifx_cat1_counter_set_alarm()372 max_rel_val = top_val - data->guard_period; in ifx_cat1_counter_set_alarm()383 irq_on_late = val < (top_val / 2U); in ifx_cat1_counter_set_alarm()386 max_rel_val = irq_on_late ? (top_val / 2U) : top_val; in ifx_cat1_counter_set_alarm()388 top_val); in ifx_cat1_counter_set_alarm()395 uint32_t diff = ifx_cat1_counter_ticks_sub((val - 1), curr, top_val); in ifx_cat1_counter_set_alarm()
143 uint32_t top_val = 0; in counter_dw_timer_get_top_value() local147 top_val = sys_read32(reg_base + LOADCOUNT_OFST); in counter_dw_timer_get_top_value()149 return top_val; in counter_dw_timer_get_top_value()