mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 19:40:20 +03:00
start mixer scheduler once internal module is turned off
This commit is contained in:
parent
96dc07ad16
commit
a4ac99252b
2 changed files with 3 additions and 0 deletions
|
@ -352,6 +352,7 @@ static void enablePulsesInternalModule(uint8_t protocol)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
mixerSchedulerStart();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,8 @@ void mixerSchedulerSetPeriod(uint8_t moduleIdx, uint16_t periodUs)
|
||||||
// Start scheduler with default period
|
// Start scheduler with default period
|
||||||
void mixerSchedulerStart()
|
void mixerSchedulerStart()
|
||||||
{
|
{
|
||||||
|
MIXER_SCHEDULER_TIMER->CR1 &= ~TIM_CR1_CEN;
|
||||||
|
|
||||||
MIXER_SCHEDULER_TIMER->CR1 = TIM_CR1_URS; // do not generate interrupt on soft update
|
MIXER_SCHEDULER_TIMER->CR1 = TIM_CR1_URS; // do not generate interrupt on soft update
|
||||||
MIXER_SCHEDULER_TIMER->PSC = MIXER_SCHEDULER_TIMER_FREQ / 2000000 - 1; // 0.5uS (2Mhz)
|
MIXER_SCHEDULER_TIMER->PSC = MIXER_SCHEDULER_TIMER_FREQ / 2000000 - 1; // 0.5uS (2Mhz)
|
||||||
MIXER_SCHEDULER_TIMER->CCER = 0;
|
MIXER_SCHEDULER_TIMER->CCER = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue