Fix PPM in TIM1
This commit is contained in:
parent
3e8ce5833f
commit
a125228d1f
|
@ -383,6 +383,24 @@ void timerConfigure(const timerHardware_t *timerHardwarePtr, uint16_t period, ui
|
|||
configTimeBase(timerHardwarePtr->tim, period, mhz);
|
||||
TIM_Cmd(timerHardwarePtr->tim, ENABLE);
|
||||
timerNVICConfigure(timerHardwarePtr->irq);
|
||||
// HACK - enable second IRQ on timers that need it
|
||||
switch(timerHardwarePtr->irq) {
|
||||
#if defined(STM32F10X)
|
||||
case TIM1_CC_IRQn:
|
||||
timerNVICConfigure(TIM1_UP_IRQn);
|
||||
break;
|
||||
#endif
|
||||
#ifdef STM32F303xC
|
||||
case TIM1_CC_IRQn:
|
||||
timerNVICConfigure(TIM1_UP_TIM16_IRQn);
|
||||
break;
|
||||
#endif
|
||||
#if defined(STM32F10X_XL)
|
||||
case TIM8_CC_IRQn:
|
||||
timerNVICConfigure(TIM8_UP_IRQn);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// allocate and configure timer channel. Timer priority is set to highest priority of its channels
|
||||
|
|
Loading…
Reference in New Issue