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.
I'm testing Comparator's ramp generator by using an example project from TI.
This project can be download from the following URL. I use LAB3 project.
processors.wiki.ti.com/.../C2000_DPSWorkshop
This project works fine, but when I change EPwm2Regs.TZCTL.TZA from TZ_FORCE_LO to TZ_HIZ
at about line 422 in main() as the following, the PWM output A goes all high.
EPwm2Regs.TZCTL.bit.TZA = TZ_HIZ;// TZ_FORCE_LO; // EPWMxA - force low
Is this a hardware bug or something else?
Jiakai
Hi Bharathi,
Thank you very much!
I have another question to ask for your help. In the same project,
I changed the program to set the registers of PWM1/Comparator1 pair the same way
as the settings in PWM2/Comparator2 except the following changes:
EPwm1Regs.DCTRIPSEL.bit.DCAHCOMPSEL = 8; // comparator1
Comp1Regs.DACCTL.bit.RAMPSOURCE = 0; // 0 - PMW1
also in DSP_ISR1, I added the following line:
DACDRV_RAMP 1 ; PWM1A, use DACDRV_RAMP_In1(IrefTest1) to set Ramp maximum value, this is a constant, and set to _IQ24(0.5)
But PWM1 doesn't work like PWM2, do you have any suggestions?
I will send you the changed project if you have time to check it.
thank you very much.
Jiakai