cancel
Showing results for 
Search instead for 
Did you mean: 

Phase shift with swapping polarity

RLD
Associate

Hi
I am working on a STM32G484QET6 uC. On a timer I have configured two output channels with Output Compare Toggle Mode. So that I get a quadrature signal.
When configuring the first value, everything works perfectly. The duty cycle is 50% and the phase shift is 90 degrees to each other.
But in my application I have to change the frequency during the run, means also the CCR value to keep the 50% duty cycle. When I update the values, I stop the timer and then, after updating I restart it. Now I have the problem that the polarity is sometimes swapping after changing the values. For example, the channel 1 signal is behind channel 2 and I want it the other way around.
How do I change the values so that this doesn't happen?

Thank you!
RLD

0 REPLIES 0