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.

CCS/TMS320F28335: Sync ADC and interrupt by PWM

Part Number: TMS320F28335

Tool/software: Code Composer Studio

 

One of customers is using our C2000 devices. At the moment they are using TMS320F28335.

When they sync the ADC and interrupt to PWM, and both occur every two or more cycles of PWM, like the following: 

EPwm1Regs.ETPS.bit.INTPRD = ET_2ND;                               // Generate INT on 2nd event

EPwm2Regs.ETPS.bit.SOCAPRD = ET_2ND;           // Generate SOCA ADC on 2nd event

 It seem that sometimes they are not at the same cycle, of the PWM. They have PWM cycle delay between them.

 Is there a way to sync them to the same PWM cycle, even if we choose every two or more PWM cycles?

Regards,

Meir.