This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430F5338: Only Getting Linear Output from ADC12 With REF+=AVCC

Part Number: MSP430F5338

Tool/software: Code Composer Studio

MSP430F5338: I setup the ADC12 with the following code:

//Allow ADC12_A to control Reference (as opposed to control via REF section)
REFCTL0 &= ~REFMSTR;


//Turn ON ADC12
ADC12CTL0 |= ADC12ON;

ADC12CTL1 |= (ADC12SSEL0|ADC12SSEL1); //Select SMCLK for ADC12_A Clock Source; no division
ADC12CTL1 |= ADC12SHP; //SAMPCON sampling signal sourced from sampling timer

//1K source impedance requires about 1.43 usec for settling to 12 bits
//This is about 20 ADC12CLK cycles
//Set it to 32 clock cycles
ADC12CTL0 |= (ADC12SHT00|ADC12SHT01); //Set sample time at 32 clock cycles

//Turn ON Internal Reference, set it at 2.5 V
ADC12CTL0 |= (ADC12REFON|ADC12REF2_5V);

//Set ADC12MEM0 conversion to use internal VREF+ as reference
ADC12MCTL0 |= ADC12SREF_1;


//Reference Buffer always-ON
ADC12CTL2 &= ~ADC12REFBURST;

//Configure P6.0 for ADC A0 Input
P6SEL |= BIT0;

//Select ADC12 A0 for input
ADC12MCTL0 |= ADC12INCH_0;

//Reset Flag
ADC12DataReady=0;

//Enable ADC12 A0 Interrupt
ADC12IE |= ADC12IE0;

//Enable Conversions (START via ADC12SC bit)
ADC12CTL0 |= ADC12ENC;

When I sample A0, there is a "dead zone" in the middle of the input range that gives a constant 2048 count output.

If I use AVCC as the REF+:

ADC12MCTL0 |= ADC12SREF_1;

the output is linear (and correct) through this region.

Any thoughts on why the internal REF+ is not working as the ADC12 reference?