fix: Various mostly X10E soft serial issues (#3382)
* fix: pulse driver with 32bit timers * fix(mpm): clear RX buffer before signature * fix: add some debouncing on soft-serial start bit detection This helps coping with spurious impulses on S.PORT created by payload sent over PPM pin (X10E). * fix: whenever the RXNE bit is set, read the register ... regardless of errors. That allows for reducing the effect of detected errors.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user