AnsweredAssumed Answered

TIM1 PWM output lags [SOLVED]

Question asked by pavelm on Mar 27, 2014
Latest reply on Mar 28, 2014 by pavelm
Hello

My STM32F103RBT6 has problem with PWM output (TIM2 CH4) as servo control.
This problem only occuring while USART2 is processing interrupts because of received data.
Interestingly, there is also some parallel with SysTick.
Problem is, that PWM output is not updated in specified frequency, but only about 1Hz instead 100Hz.
Interestingly, when Systick is configured with SysTick_Config (SystemCoreClock / 10000), it is as I described. But when I change SysTick to be 10x slower (SystemCoreClock / 1000), then PWM output is updated cca 10x faster too (10Hz).

This problem only occur with USART2, USART1 and USART3 seems to be OK.
Sadly, I need USART2 because of own board.

Thanks for any help.

Outcomes