Updating Duty Cycle for PWM in STM32F407
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-06-17 5:46 AM
Posted on June 17, 2015 at 14:46
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 #compare
Labels:
- Labels:
-
TIM
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-06-18 12:22 AM
Posted on June 18, 2015 at 09:22
/* 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.
