Hi ,
my question is there any way that i can change the duty cycle of PWM Signal within the epwm Module or better to go for eCAP ?
we know that there is a fixed value of CMPA to particular Duty cycle (say 1125 for 60% duty cycle) am i right ? now my doubt is that is there any way to change the CMPA value such that it varies the duty cycle continuously
if I go for eCAP to assign the value of duty cycle variable finding fron caputure mode as below
e.g
Tst1= ECapRegs.CAP1; //for rising edge of first pulse
Tst2 = ECapRegs.CAP2; //for falling edge of first pulse
duty cycle = Tst2- Ts1;
EPwm1regs.CMPA = duty cycle;
is this correct approch (because CAP1 and CAP2 are 32-bit wide)?
please help me
Thanks & Regards
Naveen Rangu