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.

MSP430F5338: ADC12 Counts Stuck at 2048 in a Region of Varying Input Voltage

Part Number: MSP430F5338

Using the internal reference at 2.5V. When I select 

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

there is a region of varying input voltages that cause the output counts to stick at mid-range (2048 counts). The ADC12 works fine (and linearly) using AVCC as REF+ (i.e., ADC12SREF_1).

However, this is not an option in my application

For reference, the initialization code is:

//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;

  • Hi Thomas,

    What is the voltage range you are trying to measure?  Anything greater than 2.5V?  What is your AVCC?

  • The "dead region" (outputting a constant 2048 counts) seems to occur in an area around 1.25V (+/-0.2V band), using the internal 2.5V reference. Output moves linearly with input for voltages below and above this dead zone. But, inside the zone, adjusting voltage does not change the 2048 count output.  In this case, ADC12MCTL0 |= ADC12SREF_1;.

    If I switch to ADC12MCTL0 |= ADC12SREF_0;, using REF+ = AVCC at 3.30V, I get expected performance, with no dead zone near mid-range.

    An additional issue, maybe related or maybe not, is that with AVCC as REF+, channel A10, the temperature sensor, is putting out indicated voltages that are much higher than expected (say, 1.09V vs. an expected 735 mV at 20C). For reference A12 (VBAT/3) and A11 ([AVCC-AVSS}/2) are indicating properly[quote user="Dennis Lehman"]

    Hi Thomas,

    What is the voltage range you are trying to measure?  Anything greater than 2.5V?  What is your AVCC?

    Thanks.

**Attention** This is a public forum