Fix STM32F1 motor shocks (stepper timer issue) (#14030)

This commit is contained in:
Tanguy Pruvot
2019-06-29 11:39:38 +02:00
committed by Scott Lahteine
parent 6550a222aa
commit 19aafb9050
3 changed files with 36 additions and 49 deletions

View File

@ -1262,7 +1262,7 @@ void Stepper::isr() {
// Program timer compare for the maximum period, so it does NOT
// flag an interrupt while this ISR is running - So changes from small
// periods to big periods are respected and the timer does not reset to 0
HAL_timer_set_compare(STEP_TIMER_NUM, HAL_TIMER_TYPE_MAX);
HAL_timer_set_compare(STEP_TIMER_NUM, hal_timer_t(HAL_TIMER_TYPE_MAX));
// Count of ticks for the next ISR
hal_timer_t next_isr_ticks = 0;