X10 / X12S fixes (tested on X12S and X10 Express)

This commit is contained in:
Bertrand Songis
2019-08-18 16:23:28 +02:00
parent f1890bde27
commit 128cde891d
2 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ void extmoduleSerialStart(uint32_t /*baudrate*/, uint32_t period_half_us, bool i
EXTMODULE_TIMER->CCMR1 = TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0;
#endif
EXTMODULE_TIMER->ARR = period_half_us;
EXTMODULE_TIMER->ARR = 45000;
EXTMODULE_TIMER->CCR2 = 40000; // The first frame will be sent in 20ms
EXTMODULE_TIMER->SR &= ~TIM_SR_CC2IF; // Clear flag
EXTMODULE_TIMER->DIER |= TIM_DIER_UDE | TIM_DIER_CC2IE;