Part Number: MSP430FR5959
Hello, I would like to interrogate A0 to A2. The conversion should be started by a timer. I have used the following initialization:
ADC12CTL0 = ADC12SHT0_0 | ADC12ON;// | ADC12MSC; ADC12CTL1 = ADC12SHS_1 | ADC12CONSEQ_1; ADC12CTL2 |= ADC12RES_2; ADC12IER0 |= ADC12IE2; ADC12MCTL0 |= ADC12INCH_0 | ADC12VRSEL_0; ADC12MCTL1 |= ADC12INCH_1 | ADC12VRSEL_0; ADC12MCTL2 |= ADC12INCH_2 | ADC12VRSEL_0 | ADC12EOS; ADC12CTL0 |= ADC12ENC | ADC12SC; // Sampling and conversion start TA0CCR0 = 2048-1; // PWM Period TA0CCTL1 = OUTMOD_3; // TACCR1 set/reset TA0CCR1 = 2047; // TACCR1 PWM Duty Cycle TA0CTL = TASSEL__ACLK | MC__UP; // ACLK, up mode __bis_SR_register(LPM3_bits + GIE); // LPM0, ADC10_ISR will force exit
But unfortunately only the first conversion is performed. If you clear the interrupt flags in the interrupt routine of the ADC. If this is not done, the ADC converts constantly without retriggering by the timer. Can someone help there?
Best regards