PWM off
Hi
I would like to know if the following code can be used to set the PWM to a constant 0.
TIM_OC_InitTypeDef sConfigOC = {0};
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 0;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
if ( HAL_TIM_PWM_ConfigChannel ( &htim12, &sConfigOC, TIM_CHANNEL_2 ) != HAL_OK )
If that is wrong, could someone let me know what is the right code? thanks
