Skip to main content
ESHEE.1
Visitor II
Jan 14, 2023 5:09 AM UTC
Question

How to adjust duty cycle of stm32 L151?

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

This topic has been closed for replies.

2 replies

S.Ma
Principal
Jan 14, 2023 5:43 AM UTC

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

waclawek.jan
Super User
Jan 14, 2023 8:06 AM UTC

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

​

JW​