Other Parts Discussed in Thread: LAUNCHXL-F280025C, REF6025, OPA320, C2000WARE
Currently we are getting offset error in ADC results. Every time, we are getting different value in ADC results when constant input vtg is applied to ADC input.
We tried below things;
- We have made an forceful call to (*Device_cal) , as suggested in TRM.
Also called below APIs forcefully ;
- ADC_setOffsetTrim
- ADC_setINLTrim
- Also, tried to get the offset value , by applying 0v to ADC input channel (nothing is provided to Adc input.), and tried changing the OFFSET_TRIM register for particular ADC module. But what we observed is, we are always getting a different value of offset when nothing is applied.
- We checked with example code adc_ex10_multiple_soc_epwm, but we are observing same offset error with sample code as well.
We have below configurations in ADC;
- Internal reference vtg = 3.3 V
- ADC A and ADC C modules have been configured for 4 SOCs each.
- Trigger source = PWM trigger for 4 channels and software trigger for 4 channels (PWM with 20KHZ freq and 50% duty cycle)
- SYSCLOCK = 100 MHZ and ADCLK = 50 MHZ
I tried the procedure mentioned at below link for ADC calibration ; with internal reference voltage = 3V3,
Below are my observations;
- When I sample VREFLO with A13 channel, and follow the below mentioned procedure, I get the offset value at 4th step as, -40 (decimal.)
- If I set the same value in OFFSET_TRIM register, I get 1 (decimal) LSB, for VREFLO. But with same value in register when I apply ADCin as 1.4V, (1737 LSB) and I tired 512 conversions , average count I got is 1629. This average count value for applied voltage (1.4V) remains same even if I change the OFFSET_TRIM to any value.
- So, overall conclusion is , whatever value we set in OFFSET_TRIM register, we always get the approx. -100 to -110 offset error in the ADC result count.
Do you suggest, what can be the reason for this error?
Note: we have same observations when we apply external reference voltage 3V3 , by taking vtg from the eval board pins itself.
Do you think that , there might be issue in the hardware connections or issue in ADC configuration?