8000 esp32/machine_timer: Generalise timer clock configuration. · anight/micropython@958d20f · GitHub
[go: up one dir, main page]

Skip to content

Commit 958d20f

Browse files
IhorNehrutsadpgeorge
authored andcommitted
esp32/machine_timer: Generalise timer clock configuration.
Signed-off-by: IhorNehrutsa <Ihor.Nehrutsa@gmail.com>
1 parent 32a2c87 commit 958d20f

File tree

< 8000 button data-component="IconButton" type="button" data-testid="expand-file-tree-button" aria-expanded="false" aria-controls="diff_file_tree" class="prc-Button-ButtonBase-c50BI d-md-none position-relative fgColor-muted prc-Button-IconButton-szpyj" data-loading="false" data-no-visuals="true" data-size="medium" data-variant="invisible" aria-describedby=":Rqatdab:-loading-announcement" aria-labelledby=":R2atdab:">

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/esp32/machine_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void machine_timer_enable(machine_timer_obj_t *self, void (*timer_isr)) {
155155
// Initialise the timer.
156156
timer_hal_init(&self->hal_context, self->group, self->index);
157157
timer_ll_enable_counter(self->hal_context.dev, self->index, false);
158-
timer_ll_set_clock_source(self->hal_context.dev, self->index, GPTIMER_CLK_SRC_APB);
158+
timer_ll_set_clock_source(self->hal_context.dev, self->index, GPTIMER_CLK_SRC_DEFAULT);
159159
timer_ll_set_clock_prescale(self->hal_context.dev, self->index, TIMER_DIVIDER);
160160
timer_hal_set_counter_value(&self->hal_context, 0);
161161
timer_ll_set_count_direction(self->hal_context.dev, self->index, GPTIMER_COUNT_UP);

0 commit comments

Comments
 (0)
0