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.

TMS320F28379D: Complex ADC Interrupt Setup

Part Number: TMS320F28379D

All:

On ADCA, I have two inputs that I would like to set up trigger select for software (A14, A15), and several others that would be setup for PWM, such as PWM1 driving A0, PWM2, driving A1, and so on.

Can this be done?

If so, can I distinguish in the ISR the difference between software-generated (A14, A15) and PWM-generated interrupts?

Should I think about setting up the PWM-generated interrupts with DMA, so that a DMA interrupt would be generated?

(As far as I can tell, there are no examples that show a "mix" of interrupt triggers...)

  • Hi Todd,

    Yep, you can do this.

    Each SOC has an individual trigger select, so you can setup e.g. SOC0, SOC1 to sample ch 14 and 15 and have SW trigger only, SOC2, SOC3, and SOC4 to sample some other channels and have ePWM1 as the trigger source, and have SOC5 and SOC6 sample different channels based on ePWM2.

    The TRM section on ADC priority tells you what order the ADC will sample the channels in if multiple triggers are received at once and how to make some subset of SOCs "high priority" if desired.

    Then on the interrupt generation side each ADC has 4 individually configurable ADC interrupt flags. These can be configured to be triggered from the end-of-conversion from any SOC, so you might set e.g. ADCINT1 = triggered from EOC1 (SW trigger), ADCINT2 = triggered from SOC4 (ePWM1), and ADCINT3 = triggered from EOC6 (ePWM2).

    If you'd like to use the DMA, the ADCINTs are also DMA trigger sources. So you might e.g. not have ADCINT3 enabled in the PIE, but instead a DMA channel is setup to take ADCINT3 as its trigger source. That channel could then be configured to move ADCRESULT5 and ADCRESULT6 somewhere and then once that DMA is done it can generate a DMA interrupt.