cancel
Showing results for 
Search instead for 
Did you mean: 

Is ADC built-in calibration affected by the power supply noise?

Huang Yicheng
Associate
Posted on August 07, 2017 at 08:44

According to the datasheet, there will be a calibration code after the calibration. Is this calibration code the offset error? If it is, where does the zero input used by the offset error come from? Is it taken from the ground? I would like to know if this calibration code will be affected by power supply noise.

7 REPLIES 7
Posted on August 07, 2017 at 08:56

Hello!!

You mention a datasheet.

Which datasheet? which device?

Write more details, to be helped from community.

Posted on August 07, 2017 at 09:08

Thanks, it is in the STM32F10XXX RM0008

Reference manual 0690X00000607rlQAA.png
Posted on August 07, 2017 at 14:53

Hello Huang!!

'Is this calibration code the offset error?'

In case you mean that you must add this code to next adc calculated values. . No its not.

By reading

https://my.st.com/content/ccc/resource/technical/document/application_note/group0/3f/4c/a4/82/bd/63/4e/92/CD00211314/files/CD00211314.pdf/jcr:content/translations/en.CD00211314.pdf

it is  almost clear that is, an internal callibration procedure. 'calibration codes or parameters' are stored someway in the internal memory after calibration, and used in next conversions to correct ADC values.

Though it is not clearly written what to do with theese values (it is not written also that must do something)

You can dig to HAL,SPL  ADC functions . No any value added subtracted or with any other way

has been taken into account,

to calculate the final value.

The other question 'will be affected by power supply noise' is general.

Everything is affected from noise , we can only discuss  about of quantity of noise immunity.

Reading the above document , you will find that  the VDDA stability is fundamental for ADC accuracy.

Also VCC noice affects the ADC.

From Datasheet you will find that guaranteed accuracies are given  after this calibration take place..

STOne-32
ST Employee
Posted on August 07, 2017 at 18:57

Dears,

That is correct. Our automatic offset Calibration on STM32F1xx  is done versus VREF- ground pad.  on some packages that pin is bonded to VSSA/VSS,  so of course at that time ( an internal AIN is connected to VREF- and will be compensated  by HW in the DR Register)  you need to have a clean ground and avoid an activity on digital signals of your board .

Cheers,

STOne-32.

Posted on August 07, 2017 at 20:05

Is it possible to have in the datasheet (C/C++) function or code how to use every aspect of the ADC. Like in Calibration chapter a code how to do it. (There is a calibration chapter in the datasheets, isn't it?). Or in ADC channel chapter a code how to choose an ADC channel. And so on.

Posted on August 07, 2017 at 21:57

Hello mich!

Yes, there is enough code and data how to do it.

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.html

you can download the initialization code generator for every peripheral.. 

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef1.html

is the firmware pagage for it. 

also you can find the calibration function. HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc).

There are some axamples for ADC use.

If you prefer older lower level code , you can download this

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries/stsw-stm32054.html

packet to use it independently.
Posted on August 07, 2017 at 22:27

Aha. It is in Cube, that is very good to know especially because I'm already using it. Thank you.