cancel
Showing results for 
Search instead for 
Did you mean: 

How do you set a pin used for Timer Channel PWM generation to initial state of logic LOW?

JChan.0
Associate II

I am using a particular pin as a timer channel for a PWM Generation signal. For some reason, this pin is always set to logic HIGH before I have the PWM timer begin. Is there a way to set this PWM pin to logic LOW, before the PWM timer begins? I am currently using a L476RG board, and using Timer 2 Channel 1 if that information is relevant. Thanks.

1 REPLY 1

> For some reason, this pin is always set to logic HIGH before I have the PWM timer begin.

That of course depends on how do you set the timer before the PWM timer begins - whatever that means.

Try to use the other PWM mode (PWM2, if you currently use PWM1); of course you would then need to load the respective TIMx_CCRy by the value complement to the current value, with regard to TIMx_ARR.

JW