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.

MSP430F5342: how to get stable ADC setup? observed +/- 0.1V difference when waiting longer after enabling ADC and settling Vref

Part Number: MSP430F5342

Dear Sir/Madam,

my customer is seeing a +/- 0.1V difference when waiting longer after enabling ADC and settling Vref for MSP430F5342? Anyway to get a stable ADC setup?

  1. The code used to setup ADC:
  2. Initialization:

              i.      // Initialize the internal Reference voltage

//If ref generator busy, WAIT

while (REF_isRefGenBusy(__MSP430_BASEADDRESS_REF__)) ;

//Select internal ref = 2.5V

REF_setReferenceVoltage(__MSP430_BASEADDRESS_REF__,

REF_VREF2_5V);

//Initialize the ADC12 Module

ADC12_init(__MSP430_BASEADDRESS_ADC12_PLUS__,

ADC12_SAMPLEHOLDSOURCE_SC,

ADC12_CLOCKSOURCE_ADC12OSC,

ADC12_CLOCKDIVIDER_1);

ADC12_setupSamplingTimer(__MSP430_BASEADDRESS_ADC12_PLUS__,

        ADC12_CYCLEHOLD_64_CYCLES,

        ADC12_CYCLEHOLD_4_CYCLES,

        ADC12_MULTIPLESAMPLESDISABLE);

ADC12_memoryConfigure(__MSP430_BASEADDRESS_ADC12_PLUS__,

        ADC12_MEMORY_0,

        ADC12_INPUT_A5, //input for RFDP

        ADC12_VREFPOS_INT,

        ADC12_VREFNEG_AVSS,

        ADC12_NOTENDOFSEQUENCE);

 

3. Before a reading:

  i.      ADC12_enable(__MSP430_BASEADDRESS_ADC12_PLUS__);

// enable reference

while (REF_isRefGenBusy(__MSP430_BASEADDRESS_REF__)) ;

REF_enableReferenceVoltage(__MSP430_BASEADDRESS_REF__);

bBatteryIsLoaded = tx_api_loadForBattery(TRUE); //turns on transmit power to simulate load

4. Time delay (changing this changes the result +/- 0.1V

5., Trigger the reading:

       i.      ADC12_startConversion(__MSP430_BASEADDRESS_ADC12_PLUS__,

ADC12_MEMORY_0,

ADC12_SINGLECHANNEL);

sleepDelay(10);

battLevel = ADC12_getResults(__MSP430_BASEADDRESS_ADC12_PLUS__,

ADC12_MEMORY_0);

**Attention** This is a public forum