Dear C2000 expert,
Below code is copied from interleaved PFC sample project. In order to get average current in one cycle, the 8x oversampling was used, thus 7 different SOC trigger sources are used to sample current at spacial location in each PWM cycle.
From the comment in this post(https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/596421), if ADC will have idle cycles , then the first sample should be discarded. In this sample project, how to make sure there is no ADC idle cycle while using different SOC trigger sources?
//Oversampling of current, 8x OVS,
//New ILPFC board
ChSel[0] = ADC_PIN_IL_AVG; // Dummy read for first
ChSel[1] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[2] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[3] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[4] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[5] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[6] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[7] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[8] = ADC_PIN_IL_AVG; // A4 - IpfcA
ChSel[9] = ADC_PIN_VOUT; // A2 - Vbus
ChSel[10] = ADC_PIN_VIN_L; // B2 - VL_fb
ChSel[11] = ADC_PIN_VIN_N; // B0 - VN_fb
// ADC Trigger Selection, New ILPFC board
TrigSel[0] = ADCTRIG_EPWM3_SOCA; // ePWM3, ADCSOCA
TrigSel[1] = ADCTRIG_EPWM3_SOCA; // ePWM3, ADCSOCA
TrigSel[2] = ADCTRIG_EPWM4_SOCA; // ePWM4, ADCSOCA
TrigSel[3] = ADCTRIG_EPWM3_SOCB; // ePWM3, ADCSOCB
TrigSel[4] = ADCTRIG_EPWM4_SOCB; // ePWM4, ADCSOCB
TrigSel[5] = ADCTRIG_EPWM1_SOCA; // ePWM1, ADCSOCA
TrigSel[6] = ADCTRIG_EPWM2_SOCA; // ePWM2, ADCSOCA
TrigSel[7] = ADCTRIG_EPWM1_SOCB; // ePWM1, ADCSOCB
TrigSel[8] = ADCTRIG_EPWM2_SOCB; // ePWM2, ADCSOCB
TrigSel[9] = ADCTRIG_EPWM1_SOCA; // ePWM1, ADCSOCA
TrigSel[10] = ADCTRIG_EPWM1_SOCA; // ePWM1, ADCSOCA
TrigSel[11] = ADCTRIG_EPWM1_SOCA; // ePWM1, ADCSOCA
Regards,
Jack