Hi,
My customer is using ADC of CC2640R2.
They are trying to measure the voltage with the ADC.
However, the actual calculated value and the calculation result of the ADC do not match.
input voltage: 3.09 V, VDDS: 3.31 V,
1. AD conversion value acquired from the ADC driver: 3713
2. Calculated value = input voltage / (VDDS / AD conversion maximum value (4096))
= 3.09 [V] / (3.31 [V] / 4096) = 3823
Difference between 1 and 2 : 110
The ADC settings are as follows.
- adcDIO : Board_DIO7_ANALOG
- adcCompBInput : ADC_COMPB_IN_AUXIO7
- inputScalingEnabled : true
- refSource : ADCCC26XX_VDDS_REFERENCE
- samplingDuration : ADCCC26XX_SAMPLING_DURATION_2P7_US
- triggerSource : ADCCC26XX_TRIGGER_MANUAL
Since my customer uses the function of "adcReadFifo()",
I advised the use of the function of AUXADCAdjustValueForGainAndOffset (),
but received the following question.
Could you give me advice?
1. In order to acquire the correct AD conversion value,
is it necessary to correct the value read from the AD conversion register (AUX_ANAIF: ADCFIFO) by using the manufacturing offset and gain error?
2. Does the Technical Reference Manual or other documents indicate that it is necessary to correct offset and gain error at the time of manufacture?
If there is a description, please tell me where it is.
3. The offset value and the gain error register value (FCFG1:SOC_ADC_ABS_GAIN, FCFG1:SOC_ADC_REL_GAIN, FCFG1:SOC_ADC_OFFSET_INT)
are set at the time of manufacture and are not changed afterwards, are they correct?
If the value is changed by some kind of hardware processing, please tell me the conditions to be changed.
4. Please tell me the reason for adding 16384 and the reason for dividing it by 32768
for the calculation formula of AUXADCAdjustValueForGainAndOffset () function.
AdcValue = (((adcValue + offset) * gain) + 16384) / 32768
5. Please tell me the AD conversion error including the error of offset and gain error.
I would be pleased if you could answer each of the above five questions.
Best Regards,
Miyashiro