kopia lustrzana https://github.com/micropython/micropython
esp32/esp32c6: Fix timer clock configuration.
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
rodzic
3e772f6a22
commit
53c3407408
|
@ -157,7 +157,7 @@ static void machine_timer_enable(machine_timer_obj_t *self) {
|
|||
// Initialise the timer.
|
||||
timer_hal_init(&self->hal_context, self->group, self->index);
|
||||
timer_ll_enable_counter(self->hal_context.dev, self->index, false);
|
||||
timer_ll_set_clock_source(self->hal_context.dev, self->index, GPTIMER_CLK_SRC_APB);
|
||||
timer_ll_set_clock_source(self->hal_context.dev, self->index, GPTIMER_CLK_SRC_DEFAULT);
|
||||
timer_ll_set_clock_prescale(self->hal_context.dev, self->index, TIMER_DIVIDER);
|
||||
timer_hal_set_counter_value(&self->hal_context, 0);
|
||||
timer_ll_set_count_direction(self->hal_context.dev, self->index, GPTIMER_COUNT_UP);
|
||||
|
|
Ładowanie…
Reference in New Issue