pwm with one shot timer
Hi
I’m sucessfully running a timer in STM32F103xx as PWM generator on 4 CHs to drive 4 servos.
This generates pulses of variable length between 1ms and 2ms.
My Problem now is the update of the pulse length. I get a HAL_TIM_PeriodElapsedCallback and HAL_TIM_PWM_PulseFinishedCallback for each channel. There is no notification to do the writes to TIM2->CCRx, setting the pulse lenght, just in time. So there is a latency which I try to avoid.
I would like to start the timer with interrupt generation in one shot mode, then do my calculations after HAL_TIM_PeriodElapsedCallback und then start the timer again.
How to do this with CubeMX?
Is “output compare CHx” mode “inactive on match” “one pulse mode” the right way?
How to restart/trigger the thing?
timer “output compare CHx” mode “inactive on match” “one pulse mode” in CubeMX gives:
When used like this there are interrupts but no pulses:
Sorry for the noise, since this is not an AC6 question.
Dieter