How to phase shift two complementary PWM signal based on some internal TIMER event?
I am using STM32F051R8T6. My application is to drive a full bridge configuration, for which I require two pair of complementary PWM signals with dead time insertion. So far I have been able to achieve this using two channles of a timer( CH1-CH1N and CH2-CH2N of TIM1). Now, I need to control the output by turning ON & OFF the full bridge configuration based on the ON time & OFF time respectively of another PWM signal generated by an independent timer (say, TIM2_CH2). To achieve this, I need to phase shift(by 180 degree) one set of complementary signals(CH1 & CH1N) during each ON time and OFF time of the independent PWM signal generated by Timer2. I s there any way by which the polarity of CH1 and CH1N of timer 1 can be configured, such that it changes in response to some internal timer events? Or are there any alternative techinques to achieve this?
Please refer the image for reference.

