hello,everyone:
I want to implement a function: timer triggers adc module to implement Repeat-Sequence-of-Channels Mode. However, the problem now is that the Sequence sampling interval is either the timer turnover cycle or adc sampling conversion interval.Below is my software configuration and function diagram
void ADC_init(void)
{
P1SEL1 |= (BIT2+BIT3);
P1SEL0 |= (BIT2+BIT3); //BIT1+
P3SEL1 |= (BIT0+BIT1+BIT2+BIT3);
P3SEL0 |= (BIT0+BIT1+BIT2+BIT3);
while(REFCTL0 & REFGENBUSY);
REFCTL0 |= REFVSEL_2 | REFON;
//while(REFCTL0 & REFGENRDY);//Reference voltage output is ready to be used
ADC12CTL0 &= ~ADC12ENC;
ADC12CTL0 |= ADC12ON|ADC12MSC;//
ADC12CTL1 = ADC12SHP| ADC12SHS_1 |ADC12CONSEQ_3; //
ADC12CTL2 |= ADC12PWRMD;//ADC12RES_2 |; // 12-bit conversion results
ADC12CTL3 &= ~ADC12TCMAP;
ADC12CTL0 |= ADC12SHT0_0;
ADC12MCTL0 = ADC12VRSEL_1+ADC12INCH_3;//电场
ADC12MCTL1 = ADC12VRSEL_1+ADC12INCH_13;//小通道电流
ADC12MCTL2 = ADC12VRSEL_1+ADC12INCH_14+ADC12EOS;//大通道电流
ADC12IER0 = 0x04; // Enable ADC12IFG.3
ADC12CTL0 |= ADC12ENC |ADC12SC;//; //启动采样和转换
// Configure Timer0_A3 to periodically trigger the ADC12
TA0CCR0 = TIME_1MS; // PWM Period
TA0CCTL1 = OUTMOD_3;//CCIE;// | // TACCR1 set/reset
TA0CCR1 = TIME_1MS; // TACCR1 PWM Duty Cycle
TA0CTL = TASSEL__ACLK | MC__UP;//|TAIE; // ACLK, up mode // ACLK, up mode
}