stmhal: Reset state of timer when deinit is called.

pull/1133/head
Damien George 2015-02-23 13:18:14 +00:00
rodzic caf5c40c19
commit d38939e676
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -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