cancel
Showing results for 
Search instead for 
Did you mean: 

Complementary output is active high when disabled

Tejashree
Associate III

I want to control output of complementary PWM.I am doing it as follows:

while (1)

 {

  /* USER CODE END WHILE */

 TIM1->CCR2 = 30000;

 HAL_Delay(15000);

 TIM1->CCER &= (uint16_t) ~TIM_CCER_CC2E;

 HAL_Delay(15000);

 TIM1->CCER|=TIM_CCER_CC2E;

  /* USER CODE BEGIN 3 */

 }

But when i disable my CH2N(marked in bold),it is active high by default.and i want it to be active low when i disable output.

below is my configuration:

0693W00000GZSEZQA5.png0693W00000GZSEyQAP.png

1 REPLY 1
TDK
Guru

> Complementary output is active high when disabled

>  TIM1->CCER &= (uint16_t) ~TIM_CCER_CC2E;

> But when i disable my CH2N(marked in bold),it is active high by default.

It's not clear if you're talking about OC2N or OC2 output, but in either case, the output state is dependent on several parameters as described in the reference manual:

0693W00000GZYtdQAH.png

If you feel a post has answered your question, please click "Accept as Solution".