2014-05-29 07:56 AM
hi,
i am using stm32f103ret6 to test the voltage from the signal genarator(DG1022 from rigol). i found the adc of stm32 is nonlinearity. i found that,when the voltage from DG1022 is less than 1V,the voltage get from adc of stm32 is smaller the 1V,but the volmeter's result is acurrate. Next is the result: DG1022 (mv) adc of stm32 3000 3000.352 2000 2000.654 1000 996.415 500 495.2234 250 246.88 150 146.877 60 57.627 30 27.982 10 8.219 #stm32 #adc #stmf12014-05-29 09:56 AM
Is this a DC measurement, i.e. of a steady input voltage?
Do you switch the ADC's multiplexer during the measurement? Is the voltmeter connected directly at the ADC input pin and AVSS pin? Is AVDD/AVSS properly decoupled? Is the supply voltage (namely AVSS) rock stable? Can't this be some floating-point calculation/rounding issue? Isn't there any negative current flowing into some of the other pins (i.e. any pin connected to voltage below VSS)? Do you perform ADC calibration? JW2014-05-29 06:28 PM
thank you
yes ,it's a DC measurement, a steady input voltage no,i don't switch the mux,when measuring, yes,directly connected yes, no,not the floating point problem,we sample 1000 times,and get the average voltage no negative current, all is positive and gnd ADC calibration must be performed. so, i guess the ADC of stm32 is nonlinear.2014-05-30 01:00 AM
Hi
The datasheet does specify the 'non linearity' of the ADC. From memory it is not as bad as you have measured. My colleagues (electronic engineers) tell me that if the measurement time is increased (rate decreased) the linearity improves. It is because the ADC is a successive approximation type, it dump the charge from capacitor to capacitor. I guess this means it has problems with low input drive.2014-05-30 01:30 AM
my adc sample time is71.5,clock is 9M.i measured 1000 times,and get the average.
so,i don't know,,, ps:i modified the testing data(this time,it is true.last is from my memeory).2014-05-30 02:01 AM
''i am using stm32f103ret6 to test the voltage from the signal genarator(DG1022 from rigol).''
Can you try the test with a PSU instead (or a pot across the supply)?2014-06-02 06:26 PM