This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM Step Down

I am currently working on a project in which I will need to increment the pwm up to full cycle in 'x' number of steps and then be able to step down 'y' number of steps when an event triggers. Creating the function to allow stepping up is no issue and was figured out using demo 2 from the pwm_driver example in the SDK. I see there is a center aligned pwm duty cycle option but each direction needs to be able to have it's own independent step count. Is there a way to maintain the same duty cycle and then decrease 'y' steps or increase 'x' steps? 

Related