2015-06-17 05:46 AM
Hi,
I am using STM32F407 uc with latest HAL lib. for PWM. In th elatest lib. there is no function provided to update the Duty cycle, reset the counter and auto reload like old driver TIM_SetCounter( TIM11, 0 ); TIM_SetAutoreload( TIM11, TIM11_COUNTER ); TIM_SetCompare1( TIM11, pulse_width );How am i suppose to do this with new HAL driver?pl. help me in this regard.Vinayak #pwm #tim #pwm-duty-cycle-update #reload #compare2015-06-18 12:22 AM
/* Set counter */
TIMx->CNT = counter_value;
/* Set autoreload */
TIMx->ARR = auto_reload_value;
/* Set compare 1 */
TIMx->CC1 = compare_value;
No need for any function calls. Just wasting time for nothing.