Other Parts Discussed in Thread: CONTROLSUITE
Hi Everyone!
I have some peculiar behavior with regard to ADC sequencing. I'm attempting to operate the AdcA and AdcC in 16 bit mode simultaneously as described in the user manual. This is how:
AdcaRegs.ADCSOCPRICTL.bit.SOCPRIORITY = 3; // SOC0-2 are high priority
AdcaRegs.ADCSOC0CTL.bit.TRIGSEL = 7; // EPwm2 SOC A starts all 3 ADCA conversions (one after the other)
AdcaRegs.ADCSOC1CTL.bit.TRIGSEL = 7;
AdcaRegs.ADCSOC2CTL.bit.TRIGSEL = 7;
AdcaRegs.ADCSOC0CTL.bit.CHSEL = 0; // 0 is for adcina0/1 diff group, 2 is for adcina2/3 diff group,
AdcaRegs.ADCSOC1CTL.bit.CHSEL = 2; // 3 is for adcina4/5 group
AdcaRegs.ADCSOC2CTL.bit.CHSEL = 4;
AdccRegs.ADCSOC0CTL.bit.TRIGSEL = 7; // EPwm2 SOC A starts both ADCC conversions (one after the other)
AdccRegs.ADCSOC1CTL.bit.TRIGSEL = 7;
AdccRegs.ADCSOC0CTL.bit.CHSEL = 2; // 2 is for adcinc2/3 diff group, 4 is for adcina4/5 diff group,
AdccRegs.ADCSOC1CTL.bit.CHSEL = 4;
When I do this, I get results in AdcaResultRegs.ADCRESULT0 through ADCRESULT2 and AdccResultRegs.ADCRESULT0 and ADCRESULT1, but they're all of the wrong channels. Adca seems to cycle through all three on all three SOCs, and Adcc has results from channel 2/3 on both SOCs all the time. Burst Mode is disabled on both A and C.
AdcB and AdcD are both 12 bit, but they're not running at the time that A and C are running. B and D are run simultaneously and trigger an EOC that I start A and C with.
Does anybody have any idea why the SOCs won't stick to the channels that I give them?
Justin