Change PWM duty cycle
Posted: Wed Mar 02, 2016 11:33 am
Hello,
I have a small module that uses two channels on the PWM5.
I would like to be able to modify the duty cycle of one of these two channels.
My problem is that when i modify the duty cycle of one channel, the second channel is resetted.
To modify the duty cycle, i use the function pwmEnableChannel.
I think it is the culprit that disable the second PWM.
Is there another function under Chibios to change the duty cycle without interfering with another channel ?
Or do i have to play with the TIM5_CCRx registers ?
Thank you in advance.
Stephane
I have a small module that uses two channels on the PWM5.
I would like to be able to modify the duty cycle of one of these two channels.
My problem is that when i modify the duty cycle of one channel, the second channel is resetted.
To modify the duty cycle, i use the function pwmEnableChannel.
I think it is the culprit that disable the second PWM.
Is there another function under Chibios to change the duty cycle without interfering with another channel ?
Or do i have to play with the TIM5_CCRx registers ?
Thank you in advance.
Stephane