duty cycle and frequency of EPWM

Im using the f28335, is it possible to change both the duty cycle and the period of the pwm? My schematic is attached, currently I either have to have the duty cycle constant (0.5) and vary the frequency via the timer period pin, or have a constant frequency and vary the duty cycle.

Hi akowal, The problem with

Hi akowal,

The problem with your diagram is that you are toggling the PWMA on the counter = zero condition. This then never considers the %Duty Cycle input on A and the duty cycle remains constant at 50%. You should do something (0, 1 or T) on the CMPA up or down (or both) to change the duty cycle. I have attached a simulation diagram using the digital power block set (you will need to download and install it first) with which you can clearly visulaize what you're doing in a simulation environment.

@akowal, Anthony is exactly

@akowal, Anthony is exactly right. And his attached simulation is spot on to show how the TI PWM unit works. I've modified your original diagram slightly to change the Action Qualifier as Anthony suggests. I use sliders to modify duty and period. If you put GPIO 0 on a scope you'll see it works as advertised.