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.

TMS320F280049: ADC interrupt

Part Number: TMS320F280049

If  2 SOCs are used in ADC A module, SOC1 is triggered by pwm, and EOC1 triggers ADC_INT_NUMBER1, and PIE INT_ADCA1 is enabled;   SOC2 triggered by software only, and EOC2 triggers ACD_INT_NUMBER2, no PIE interrupt is configured for this SOC.

In the program, before the PWM for SOC1 has been started. SOC2 is started by ADC_forceSOC(); and then wait using this until conversion finished to read results: while(ADC_getInterruptStatus(BUCK_VIN_ADC_MODULE, ADC_INT_NUMBER2) == 0U);

I found that program stuck at waiting. 

if PIE for SOC1 is not set to INT_ADCA1, it works correctly.

I don't understand why  SOC1 PIE vector setting would affect SOC2 ADC_INT_NUMBER2 flag?

  • Hi Shengan,

    If you enabled the PIE on INT_ADCA1, you need to service the ISR and clear the interrupt and acknowledge it as well, otherwise there will be an interrupt overflow and that would cause the ADC to halt conversions.  You also mentioned that SOC2 started before SOC1 by PWM.  Makes sure to clear all interrupt flags first before any conversions, maybe the interrupt flag for ADC INT1 has been active before the conversions even if SOC1 has not started yet.

    Regards,

    Joseph