Skip to main content
ESHEE.1
Visitor II
January 14, 2023
Question

How to adjust duty cycle of stm32 L151?

  • January 14, 2023
  • 2 replies
  • 754 views

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
January 14, 2023

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

waclawek.jan
Super User
January 14, 2023

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

JW​