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.
Tool/software: Code Composer Studio
Hello Team TI,
I am using following code for SOC of ADC channel 2,
void ConfigureEPWM(void) { EALLOW; // Assumes ePWM clock is already enabled EPwm2Regs.ETSEL.bit.SOCAEN = 1; // Enable SOC on A group EPwm2Regs.ETSEL.bit.SOCASEL = 3; // Select SOC on up-count EPwm2Regs.ETPS.bit.SOCAPRD = 1; // Generate pulse on 1st event EPwm2Regs.TBPRD = 19; // Set period to 2.5 MHz EPwm2Regs.TBCTL.bit.CTRMODE = 0 ; // freeze counter EDIS; }
and then
AdcaRegs.ADCSOC0CTL.bit.TRIGSEL = 7;
It is workin fine. However, when I use
{ EALLOW; // Assumes ePWM clock is already enabled EPwm3Regs.ETSEL.bit.SOCAEN = 1; // Enable SOC on A group EPwm3Regs.ETSEL.bit.SOCASEL = 3; // Select SOC on up-count EPwm3Regs.ETPS.bit.SOCAPRD = 1; // Generate pulse on 1st event EPwm3Regs.TBPRD = 19; // Set period to 2.5 MHz EPwm3Regs.TBCTL.bit.CTRMODE = 0 ; // freeze counter EDIS; }
and then,
AdcaRegs.ADCSOC0CTL.bit.TRIGSEL = 8;
and it is not working fine. Can anyone please suggest why is it so?
Hi Utsav,
Please configure the TRIGSEL bits to 9. 8 is for EPWM2B and 9 is for EPWM3 as given in the Table 11.32 (p. no. 1637) of the technical reference manual of the device. http://www.ti.com/lit/ug/spruhm8i/spruhm8i.pdf.
AdcaRegs.ADCSOC0CTL.bit.TRIGSEL = 9;
Please click on the "verify answer" button at the bottom of this post if this response resolves your query.
Thanks & Regards
Pramod