Skip to content

Commit

Permalink
Added missing changes in PR EdgeTX#3382.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardclli committed Apr 17, 2023
1 parent 6624ade commit f09cd5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion radio/src/targets/common/arm/stm32/stm32_pulse_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ void stm32_pulse_init(const stm32_pulse_timer_t* tim, uint32_t freq)
}

timInit.Prescaler = __LL_TIM_CALC_PSC(tim->TIM_Freq, freq);
timInit.Autoreload = STM32_DEFAULT_TIMER_AUTORELOAD;
if (IS_TIM_32B_COUNTER_INSTANCE(tim->TIMx)) {
timInit.Autoreload = 0xFFFFFFFFUL;
} else {
timInit.Autoreload = STM32_DEFAULT_TIMER_AUTORELOAD;
}

enable_tim_clock(tim->TIMx);
LL_TIM_Init(tim->TIMx, &timInit);
Expand Down

0 comments on commit f09cd5b

Please sign in to comment.