cancel
Showing results for 
Search instead for 
Did you mean: 

Changing a PWM complementary pins to GPIO functionality and then back to PWM at runtime

Ricko
Senior II

Hi,

I am running TMR1 CH1 and CH1N in complementary mode (so they are the opposite of each other).

 

Using a HAL function, how do I change each (separately) from PWM to GPIO and back to PWM?

 

Just so to explain what I am trying to do... I am driving a H-bridge, I want to be able to:

- run the PWM in complementary mode (i.e. biphase/bipolar bridge)

- fix one half of the bridge to high or low while the other side still runs in PWM

- switch both to either high or low

- go back to full PWM complementary

 

Thank you

10 REPLIES 10

Thank you @TDK