This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi.team,
Iam using TMS570ls1227 pwm driver code for the first time, in these driver code i have to change the duty cycle during the run time
can u please give me the solution for this??
Thanks
Akhil
Hi Akhil,
TMS570LS12x platforms do have dedicated ePWM module, and the N2HET can also be used to generate PWM signals at N2HET pins. Which module do you use for PWM?
For using N2HET, you can use the API generated by HALCoGen to update the duty-cycle and period:
pwmSetDuty(hetRAMBASE_t * hetRAM, uint32 pwm, uint32 pwmDuty)
For ePWM, there is no API, but you can write to etpwmREGx->CMPA and etpwmREGx->CMPA to change the duty cycle of PWMA and PWMB.
Hi..QJ wang
iam using the AWR1642 module, in this we have a epwm module
we have downloaded the etpwm driver from hercules. In these driver how to change the dutycycle during run time??
Thanks
Akhil
Hi Akhil,
There is no API to modify the dutycycle of PWM signals. You need to program etpwmREGx->CMPA and etpwmREGx->CMPA to change the duty cycle of PWMA and PWMB manually.