Part Number: F28M36P63C2
Other Parts Discussed in Thread: CONTROLSUITE
I am having some problems when I try to use an external reference to the ADC.
I have the following voltages to the microcontroller (measured with a Keysight 34465A):
VDDIO = 3.353 V
VDDA = 3.296 V
VREFHI = 3.298 V
Note: It says in the datasheet (SPRS825E, revised december 2017) that VREFHI<=VDDA. The difference in my design is due to the voltage drop in a ferrite bead. The problem description below is however valid also for the case when I short circuited the bead so VDDA became 3.298 V, i.e. equal to VREFHI
On ADC channels ADCINA4 and ADCINB4 I have applied a voltage of 3.292 V.
Now if I measure with the internal or external reference (by changing the ADCREFSEL register bit) I read the following result when doing around 300 measurements in each case.
Measured with ADCREFSEL = 0 4069-4072
Measured with ADCREFSEL = 1 4059-4062
Note: The results did not change when I changed register bit VREFLOCONV between 0 and 1
Using the formulas in §10.3.10 in the reference manual (SPRUHE8D, revised November 2016) my interpretation is that I ideally should read:
Ideal theoretical result ADCREFSEL = 0 4086
Ideal theoretical result ADCREFSEL = 1 4087
According to the datasheet page 74 the figure there indicates a maximum error of around 12 LSB at 30 degrees. The microcontroller should be around this temperature when I do these tests.
Have I missed something more that needs to be changed in some register when using an external reference?
Best Regards
John