Skip to content

Commit d38939e

Browse files
committed
stmhal: Reset state of timer when deinit is called.
1 parent caf5c40 commit d38939e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stmhal/timer.c

+1
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ STATIC mp_obj_t pyb_timer_deinit(mp_obj_t self_in) {
686686
prev_chan->next = NULL;
687687
}
688688

689+
self->tim.State = HAL_TIM_STATE_RESET;
689690
self->tim.Instance->CCER = 0x0000; // disable all capture/compare outputs
690691
self->tim.Instance->CR1 = 0x0000; // disable the timer and reset its state
691692

0 commit comments

Comments
 (0)