You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
stmhal: Reset state of timer when deinit is called.
This commit is contained in:
@@ -686,6 +686,7 @@ STATIC mp_obj_t pyb_timer_deinit(mp_obj_t self_in) {
|
||||
prev_chan->next = NULL;
|
||||
}
|
||||
|
||||
self->tim.State = HAL_TIM_STATE_RESET;
|
||||
self->tim.Instance->CCER = 0x0000; // disable all capture/compare outputs
|
||||
self->tim.Instance->CR1 = 0x0000; // disable the timer and reset its state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user