Part Number: LAUNCHXL-F28P65X
Hello,
The customer has configured PWM center point trigger ADC conversion
EPWM_setADCTriggerSource(CB_PWM_BASE_V, EPWM_SOC_A, EPWM_SOC_TBCTR_PERIOD);
EPWM_setADCTriggerEventPrescale(CB_PWM_BASE_V, EPWM_SOC_A, 1);
EPWM_enableADCTrigger(CB_PWM_BASE_V, EPWM_SOC_A);
EPWM_setInterruptSource(CB_PWM_BASE_V, EPWM_INT_TBCTR_PERIOD);
EPWM_enableInterrupt(CB_PWM_BASE_V);
EPWM_setInterruptEventCount(CB_PWM_BASE_V, 1);
Then enable the ADC conversion of the channel to complete interrupt INT4
ADC_setInterruptSource(ADCA_BASE, ADC_INT_NUMBER4, ADC_SOC_NUMBER3);
ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER4);
ADC_enableContinuousMode(ADCA_BASE, ADC_INT_NUMBER4);
ADC_enableInterrupt(ADCA_BASE, ADC_INT_NUMBER4);
And wait for the interrupt flag to set during the PWM cycle interrupt
while (!AdcaRegs.ADCINTFLG.bit.ADCINT4);
It was found that waiting for the flag to be set on the first attempt would freeze the entire interrupt. But if there is no problem skipping the first interrupt and starting from the second interrupt, what is the reason?
Thanks.