Hi,
I am wondering how to set up two ADC interrupts like ADCINT1 and ADCINT2, so each of them can control a group of SOCs independently. (especially when I need to use different sampling frequencies on different ADC inputs).
I haven't seen any examples using this kind of setting.
In the example (ControlSUITE--F28035), interrupt ADCINT1 is configured to control SOC0, as shown below:
EALLOW;
AdcRegs.INTSEL1N2.bit.INT1E = 1; //Enabled ADCINT1
AdcRegs.INTSEL1N2.bit.INT1CONT = 0; //Disable ADCINT1 Continuous mode
AdcRegs.ADCSOC0CTL.bit.CHSEL = 2;
AdcRegs.ADCSOC0CTL.bit.TRIGSEL = 5; //set SOC0 start trigger on EPWM1---> EPwm1 to SOCA
AdcRegs.ADCSOC0CTL.bit.ACQPS = 6; //set SOC0 S/H Window to 7 ADC Clock Cycles, (6 ACQPS plus 1)
EDIS;
How should I configure ADCINT2, so it can only control SOC1? just like the following?
EALLOW;
AdcRegs.INTSEL1N2.bit.INT2E = 1; //Enabled ADCINT2
...........
...........
EDIS;
I don't really think it is that simple.
Hope someone can help with this.
Thank you,
Frank