2017-12-04 02:33 PM
I need to update DAC in PWM.
I have STM32F103C8T6 and two free timers (TIM3, TIM4).But they only have one global interrupt. How do I get PWM?I'm only called HAL_TIM_PWM_PulseFinishedCallback() and I get the meander.// PWM Pulse finished
bool flag = true;
void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim){ if(htim->Instance == TIM3) { UpdateDAC(flag ? 1.125 : 0.5);flag = !flag;
} }#cube-hal #pwm