Output Compare not set in HAL_TIM_PWM_PulseFinishedCallback
void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim)
{
if(htim->Instance == htim2.Instance && htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) {
HAL_TIM_PWM_Stop_DMA(&htim2, TIM_CHANNEL_1);
__HAL_TIM_SET_COUNTER(&htim2, 0);
__HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_2, 100);
HAL_TIM_OC_Start_IT(&htim2, TIM_CHANNEL_2);
}
}
The OC settings are all normal elsewhere. However, it is not set by the change of time set here. Very quickly it comes to HAL_TIM_OC_DelayElapsedCallback.
Even if the words are awkward, please understand. Google Translate.
