Complementary output is active high when disabled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-11-30 2:06 AM
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:
- Labels:
-
STM32 Motor Control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-11-30 1:47 PM
> 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:
