Other Parts Discussed in Thread: C2000WARE, SYSCONFIG
Hi Ti,
I have a question on changing TBPRD for variable frequency in PWM module.
In spruiid, (section 26.4.5 Simultaneous Writes to TBPRD and CMPx Registers Between ePWM Modules) It is mentioned that EPWMXLINK can be used to change simultaneously the values of TBPRB and CMPx values.
I am trying to change the value of TBPRD inside ADCA1 ISR before computing the CMP values using some algorithm. ADC A1 ISR time is 25 microsec and the PWM module TBPRD range is 2500-5000.
My question is after how much time the updated value of TBPRD will be implemented?
Below piece of code i used to change the TBPRD value. Is it correct?
EPwm1Regs.TBPRD = 5000u ;
EPwm1Regs.EPWMXLINK.bit.TBPRDLINK = 0;
Thanks,
Saikumar.