Tool/software: Code Composer Studio
Dear Sir / Madam ,
I am using MSP430FR5857 MICRO CONTROLLER for my application. I am sensing AC voltage sensing, AC current sensing and PWM signal which is generated by microcontroller itself on channel A1, A2,A3 respectively . I have used same PWM signal timer triggered for ADC sampling for all the three channel in sequence of channel mode and even tried in repeat sequence of channel mode but not getting all the three channels ADC value properly .Even example code i have seen for single repeat sequence of channel mode but nothing much helpful .
i have given below my ADC configuration and timer configuration also same timer is used for generating interrupt for reading all these values .
ADC12CTL0=ADC12SHT0_0 | ADC12ON | ADC12MSC ;
ADC12CTL1=ADC12SHS_1 | ADC12SHP | ADC12CONSEQ_1 |ADC12SSEL_3 ;
ADC12MCTL0 |= ADC12INCH_3;
ADC12MCTL1 |= ADC12INCH_2;
ADC12MCTL2 |= ADC12INCH_1 | ADC12EOS;
ADC12CTL0 |= ADC12SC | ADC12ENC ;
timer configuration
TA0CCR0 = 16000; // SET TIMER PERIOD
TA0CCTL1 = OUTMOD_3; // SET OUTPUT MODE RESET/SET
TA0CCR1 = 11734;
TA0CCTL0 =CCIE;
TA0CTL = TASSEL__SMCLK | MC__UP
Please reply as soon as possible . I will be awaiting for your kind response.