Hi there,
The internal ADC of this TM4C129X MCU is sampling a buffered voltage from a voltage divider (having a thermistor) as follows.
I have found that the 12 bit ADC is in error by about 2-3% (perhaps 80 counts?). I cannot tolerate more than 0.2% error or 8 counts of error. I have shown that simply by probing the ADC input pin with a DMM set to measure voltage that I get the correct ADC value, otherwise it is off by 2-3%. I presume the DMM is placing a capacitive load on the pin acting as Cs in the ADC Input Equivalency schematic below. It is not the 10MOhm input impedance of the DMM as I simulated that by inserting a 10MOhm resistor on the ADC pin to GND and that didn't eliminate the error.
The datasheet indicates that the highest value for the external source resistance to any ADC pin is Rs<=500 Ohms (@1MSPS). No minimum value for Rs was given so I thought I was a clever designer by putting in a very low source resistance in the form of an op-amp (LTC2054) configured with unity gain (voltage follower) - see circuit diagram above.
I think this input circuit has resulted in errors because the settling time (to 0.01% for 12 bit ADC) of the op-amp is much longer (in the order of many tens of us) than the ADC sampling time of 250ns (@1MSPS)
I have since read much literature on signal conditioning for SAR ADC inputs [1] and it advises an RC filter after the op-amp for BW limiting and to minimise instability as the sampling capacitor charges up. I put this RC filter before my op-amp ! OK for BW limiting, but no good on limiting instability as the op-amp charges up the SAR ADC sampling cap. I haven't yet tried inserting those external R and C components after the op-emp yet, and there are penalties if I do from a design change perspective.
Is there another way for me to solve this problem in firmware rather than in H/W by extending the sampling time of the ADC to be say 100us instead of 250ns ?? I couldn't see an option to do that in the datasheet, only something about adjusting the sample and hold window time "The ADC module provides the capability of programming the sample and hold window of each step in a sequence through the ADC Sample Sequence n Sample and Hold Time (ADCSSTSHn) register." (p.1058)
Here is the ADC input circuit from the datasheet. My Rs (output resistance of the op-amp) is very low (probably a few ohms), and my Cs is probably only a few pF from parasitic track capacitance.
[1] Optimise your SAR ADC Design by Bonnie Baker at TI, Input Drive Circuitry for SAR ADCs, An Overview of Designing Analog Interface With TMS320F28xx/28xxx DSCs