Enhanced Queued Analog-to-Digital Converter (EQADC)
27-126
Freescale Semiconductor
PXR40 Microcontroller Reference Manual, Rev. 1
27.8.6
ADC Result Calibration
The ADC result calibration process consists of two steps: determining the gain and offset calibration
constants, and calibrating the raw results generated by the on-chip ADCs by solving the following equation
discussed in
Section 27.7.6.6, ADC Calibration Feature
CAL_RES = GCC * R OCC+2;
Eqn. 27-1
The calibration constants GCC and OCC can be calculated from equation
provided that two
pairs of expected (CAL_RES) and measured (RAW_RES) result values are available for two different
input voltages. Most likely calibration points to be used are 25% VREF
1
and 75% VREF since they are far
apart but not too close to the end points of the full input voltage range. This allows for calculations of more
representative calibration constants. The EQADC provides these voltages via channel numbers 43 and 44.
The raw, uncalibrated results for these input voltages are obtained by converting these channels with
conversion commands that have the CAL bit negated.
The transfer equations for when sampling these reference voltages are:
CAL_RES
75%VREF
= GCC * RAW_RES
75%VREF
+ OCC+2;
CAL_RES
25%VREF
= GCC * RAW_RES
25%VREF
+ OCC+2;
Thus;
GCC = (CAL_RES
75%VREF
– CAL_RES
25%VREF
) / (RAW_RES
75%VREF
– RAW_RES
25%VREF
);
Eqn. 27-2
OCC = CAL_RES
75%VREF
– GCC*RAW_RES
75%VREF
– 2;
Eqn. 27-3
or
OCC = CAL_RES
25%VREF
– GCC*RAW_RES
25%VREF
– 2;
Eqn. 27-4
After being calculated, the GCC and OCC values must be written to ADC registers:
ADC0/1 Gain Calibration Constant Registers (ADC0_GCCR and ADC1_GCCR)
, and
ADC0/1 Offset Calibration Constant Registers (ADC0_OCCR and ADC1_OCCR)
configuration commands.
The EQADC will automatically calibrate the results, according to equation
conversion command that has its CAL bit asserted using the GCC and OCC values stored in the ADC
calibration registers.
27.8.6.1
MAC Configuration Procedure
The following steps illustrate how to configure the calibration hardware, namely, determining the values
of the gain and offset calibration constants, and the writing of these constants to the calibration registers.
The procedure below should be performed for ADC0 and for ADC1.
1.
Convert channel 44 with a command that has its CAL bit negated and obtain the raw, uncalibrated
result for 25%VREF (RAW_RES
25%VREF
).
1.
VREF=VRH-VRL
Summary of Contents for PXR4030
Page 1: ...PXR40 Microcontroller Reference Manual Devices Supported PXR4030 PXR4040 PXR40RM Rev 1 06 2011...
Page 30: ...PXR40 Microcontroller Reference Manual Rev 1 Freescale Semiconductor xxx...
Page 40: ...PXR40 Microcontroller Reference Manual Rev 1 xl Freescale Semiconductor...
Page 66: ...Memory Map PXR40 Microcontroller Reference Manual Rev 1 2 4 Freescale Semiconductor...
Page 120: ...Signal Descriptions 3 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 860: ...FlexCAN Module 24 50 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 1167: ...Decimation Filter Freescale Semiconductor 28 53 PXR40 Microcontroller Reference Manual Rev 1...
Page 1168: ...Decimation Filter 28 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...