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.

MSP432P4011: ADC14 issue with MSP432P4011 running TI-RTOS

Part Number: MSP432P4011

P/N - MSP432P4011
IDE - CCS 9.2
TI-RTOS

Hello forum;

I'm having a difficulty with the ADC14 hardware and driver on MSP432P4011 running TI-RTOS.

I have a custom PCB designed with the MSP432 interfaced with a bunch of peripherals. I have a TI LMT84 temperature sensor output being measured on an ADC pin (P5.4 i.e. ADC14.A1). The LMT sensor outputs an analog voltage proportional to the ambient temperature and the voltage can be converted into *C temperature.

I have used the sysconfig tool to configure the ADC as seen below -

I'm using the ADC as a 14 bit, VDD (+3.3V) referenced and I'm invoking the "adc_convertToMicroVolts() fxn to get a real, uVolt value as follows - 

        // Open ADC channels for usage
        ADC_Handle adcHandle_TEMP_INT = ADC_open(TEMP_INT, &TEMP_INT_params);
        // Sample the analog output from the ADC
        resStatus = ADC_convert(adcHandle_TEMP_INT, &result);
        //Convert to microvolts
        adcValueUv = ADC_convertToMicroVolts(adcHandle_TEMP_INT, result);
        Display_printf(handle_disp, 0, 0, "ADC reads %d", adcValueUv);


        // Close ADC channel after usage
        ADC_close(adcHandle_TEMP_INT);

I'm even invoking the above function 10 times and averaging to cancel out any noise issues.

My problem -
I'm seeing significant offset voltage through the above approach.

I have 2 identical sets of hardware manufactured and assembled (factory assembled, no hand soldering etc.) and I'm running the exact code on both. I got the following results - 

Hardware 1 - Location office
Multi-meter (DMM) reads a voltage of 888 mV on the ADC pin, corresponding to a temperature of 26.7*C
ADC reads 960 mV with a variance of +/- 60 mV, corresponding to a temperature of 13.6*C

Hardware 2 - Location home
DMM reads voltage of 909 mV on the ADC pin, corresponding to a temperature of 23*C
ADC reads 950 mV with a variance of +/- 30 mV, corresponding to a temperature of 15.5*C

Clearly a small offset value is going to throw off the temperature sensing.



My question is - Is this within the spec for ADC14 peripheral? Is there some intermediate step I'm missing?
Any insights would be greatly appreciated!
 

  • Hi Shreyas,

    Table 5-29. Precision ADC Linearity Parameters of the datasheet (https://www.ti.com/lit/gpn/msp432p4011) has the typical offset values and dependent on the configuration setting of ADC14VRSEL. But in all cases, it only shows a max offset of ±2mV. But the Total unadjusted error has a max value of ±185 LSB depending on the configuration setting of ADC14VRSEL. I could not tell the reference voltage from your post, but with a 3V reference, that translates to around ±68 mV  ( = (185/2^13)*3V). That might explain what is happening?

    Srinivas

  • I'm using VDD as reference and I'm selecting it from sysconfig, so I dont deal with ADC14VRSEL. Any idea where I can access this configuration?

    Also, how can I modify sample/hold timing from sysconfig?

    I'm worried it might not be just an offset issue but something else all-together since there is a large variation in the measurements.

  • Hi Srinivas;

    I remember, before sysconfig, there used to be a "board" file through which we could modify ADC and other hardware attributes.

    For instance, for CC2640, I was able to configure the sampling time as - 

       {
        //Application Specific ADC
           .adcDIO = Board_DIO29_ANALOG,                                        /* This ADC is specific to Plug in Voltage Sensor Application board */
           .adcCompBInput = ADC_COMPB_IN_AUXIO2,
           .refSource = ADCCC26XX_FIXED_REFERENCE,
           .samplingDuration = ADCCC26XX_SAMPLING_DURATION_42P6_US,
           .inputScalingEnabled = true,
           .triggerSource = ADCCC26XX_TRIGGER_MANUAL
       }

    Is there an equivalent method for MSP432P4011 ? The sysconfig does not provide access to these low-level configurations so what is the work-around?

    The reason I'm bringing this up is that the same temperature sensor circuit has been working for us with CC2640 for a particular sampling duration and I want to replicate that exact setting on the MSP432.

    -Shreyas

  • Hello Srinivas, sorry to bother you, but if possible can you point me towards the right direction on this issue?

  • Hi Shreyas,

    The Sysconfig tool should have generated the .c & .h files that include the configuration for the ADC. The ADC14VRSEL should be configured in those files.

    Can you access those files generated by Sysconfig?

    Srinivas

  • Thanks Srinivas;

    I do see and can access those files.

    I can see the following on the ADC Configuration - 

        {
            .adcPin = ADCMSP432_P5_4_A1,
            .refVoltage = ADCMSP432_REF_VOLTAGE_VDD,
            .resolution = ADC_14BIT,
            .refExtValue = 3300000
        },
        /* TEMP_INT */
        {
            .fxnTablePtr = &ADCMSP432_fxnTable,
            .object = &adcMSP432Objects[TEMP_INT],
            .hwAttrs = &adcMSP432HWAttrs[TEMP_INT]
        },

    However I dont see ADC14VRSEL being defined anywhere. I also dont see where I can set a period for sample/hold configuration for the ADCs.
    Ay ideas what I'm missing?

  • Hi Shreyas,

    These configuration parameters in the ADC configuration will be set in one of the source files of the project . You can add the other settings like ADC14VRSEL in that source file. Is this a feasible option for you?

    The 12-bit ADC available on the  CC2640 is different from the 14-bit ADC available on the MSP432P devices. I do not think there is a 1-1 correspondence between the different parameters on the two devices.

    CC2640 User's guide (https://www.ti.com/lit/pdf/swcu117) (section 17.4.8 ADC) and MSP432P (https://www.ti.com/lit/pdf/slau356) (section 22 Precision ADC) have different register description of the ADC configuration registers.

    Srinivas

  • Hello Srinivas, thanks for all the inputs.

    I did some digging and found that I had an incorrect output capacitor configuration. The sensor's output cap (100 pF) wasnt large enough to charge the ADC's input stage without fluctuations. On swapping the 100 pF with a 4.7 nF, I'm getting much more accurate and stable readings.

    Thanks!

**Attention** This is a public forum