• Home
  • Raw
  • Download

Lines Matching refs:timer

31 void mcpwm_hal_timer_start(mcpwm_hal_context_t *hal, int timer)  in mcpwm_hal_timer_start()  argument
33 mcpwm_ll_timer_start(hal->dev, timer); in mcpwm_hal_timer_start()
36 void mcpwm_hal_timer_stop(mcpwm_hal_context_t *hal, int timer) in mcpwm_hal_timer_stop() argument
38 mcpwm_ll_timer_stop(hal->dev, timer); in mcpwm_hal_timer_stop()
41 void mcpwm_hal_timer_update_basic(mcpwm_hal_context_t *hal, int timer) in mcpwm_hal_timer_update_basic() argument
43 mcpwm_ll_timer_set_prescale(hal->dev, timer, hal->timer[timer].timer_prescale); in mcpwm_hal_timer_update_basic()
45 uint32_t period = MCPWM_BASE_CLK / (hal->timer[timer].freq * in mcpwm_hal_timer_update_basic()
46 (hal->prescale +1) * (hal->timer[timer].timer_prescale + 1)); in mcpwm_hal_timer_update_basic()
47 mcpwm_ll_timer_set_period(hal->dev, timer, period); in mcpwm_hal_timer_update_basic()
49 hal->timer[timer].freq = MCPWM_BASE_CLK / (period * in mcpwm_hal_timer_update_basic()
50 (hal->prescale +1) * (hal->timer[timer].timer_prescale + 1)); in mcpwm_hal_timer_update_basic()
52 mcpwm_ll_timer_set_count_mode(hal->dev, timer, hal->timer[timer].count_mode); in mcpwm_hal_timer_update_basic()
55 void mcpwm_hal_timer_enable_sync(mcpwm_hal_context_t *hal, int timer, const mcpwm_hal_sync_config_t… in mcpwm_hal_timer_enable_sync() argument
57 …uint32_t set_phase = mcpwm_ll_timer_get_period(hal->dev, timer) * sync_conf->reload_permillage / 1… in mcpwm_hal_timer_enable_sync()
58 mcpwm_ll_sync_set_phase(hal->dev, timer, set_phase); in mcpwm_hal_timer_enable_sync()
60 mcpwm_ll_sync_set_input(hal->dev, timer, sync_conf->sync_sig); in mcpwm_hal_timer_enable_sync()
61 mcpwm_ll_sync_enable(hal->dev, timer, 1); in mcpwm_hal_timer_enable_sync()
64 void mcpwm_hal_timer_disable_sync(mcpwm_hal_context_t *hal, int timer) in mcpwm_hal_timer_disable_sync() argument
66 mcpwm_ll_sync_enable(hal->dev, timer, 0); in mcpwm_hal_timer_disable_sync()
72 mcpwm_ll_operator_select_timer(hal->dev, op, op_conf->timer); in mcpwm_hal_operator_update_basic()
83 int timer = hal->op[op].timer; in mcpwm_hal_operator_update_comparator() local
84 uint32_t period = mcpwm_ll_timer_get_period(hal->dev, timer); in mcpwm_hal_operator_update_comparator()
86 mcpwm_ll_operator_set_compare_upmethod(hal->dev, timer); in mcpwm_hal_operator_update_comparator()
103 const int timer_used = hal->op[op].timer; in mcpwm_hal_operator_update_generator()
118 if (hal->timer[timer_used].count_mode == MCPWM_UP_COUNTER) { in mcpwm_hal_operator_update_generator()
122 } else if (hal->timer[timer_used].count_mode == MCPWM_DOWN_COUNTER) { in mcpwm_hal_operator_update_generator()