cancel
Showing results for 
Search instead for 
Did you mean: 

How to adjust duty cycle of stm32 L151?

ESHEE.1
Associate

Is there is a function that controls PWM duty cycle for HAL_TIM?

This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
S.Ma
Principal

Duty cycle = PWM made with output channel compare, with fixed period. Check apis for this.

waclawek.jan
Super User

Or just read the TIM chapter in Reference Manual and proceed accordingly, by writing into respective TIMx_CCRx register.

JW​