cancel
Showing results for 
Search instead for 
Did you mean: 

Need to know how to start PWM with slow increase in duty cycle(SOFT START LIKE RAMP FUCNTION) slowy increase from 0% to some set duty cycle

GH M
Associate II

code is attached below

3 REPLIES 3

You do this by changing the PWM duty cycle by changing the content of respective TIMx_CCRx register.

JW

it should change on its own..

Then use DMA, triggered from the timer's Update event, to reload TIMx_CRRx from a precalculated table upon each cycle.

JW