cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 ADC with internale reference

Hector  Hector
Associate
Posted on August 09, 2017 at 09:34

Hello All ; 

I use STM32f407 ; I connect Vref to VDDA to VDD ; 

but VDD is connected to super cap that can be change from 2,9V to 3,5 volt ; so my ADC reading would be change ; 

Does STM32F407 has internal Refence ? I did not understand that from the manual it says it has 1,2V internal reference 

if yes how can ı use it ; ? 

Thank you in Advanced 

5 REPLIES 5
Posted on August 09, 2017 at 10:54

Unfortunately, the internal reference cannot be used as the ADC reference - it is simply connected to one of the ADC inputs so it can be used to indirectly calculate VREF.

The best thing you can do under changing VREF is to perform conversion with the internal reference simultaneously with the external input on two ADCs.

JW

sfavennec9
Associate
Posted on August 09, 2017 at 12:09

Hi Hector,

In my project I use Vref of my STM32F205 to have an idea about power supply voltage (Vref is not very precise in datasheet 1.18 Min -> 1.21 Typ -> 1.24Max).

I set Vref to be read in CubeMx on the ADC input and then calculate the equivalent power voltage of microcontroller by this calculation:

VREF_VALUE = 1210;

STVal.TensionAlimMicro = ((VREF_VALUE * 4095) / (STVal.ValeurVrefInt/10.0));

Then I use this value to calculate the 'correct' ADC measure.

Remember that Vref is not very precise (some reference have register for Vref calibration I think, check the datasheet for that point)

Best regards

sfavennec9
Associate
Posted on August 09, 2017 at 12:32

Hi

I'm sorry I would like to edit my previous post but I can't

Here you have somebody with the same problem

https://community.st.com/0D50X00009XkhWNSAZ

Best regards

S.Ma
Principal
Posted on August 09, 2017 at 14:00

With Vref measurement, as said by seb.fav can return the value needed to convert back the analog input LSB into mV.

If using at the same time the temperature chip measurement and calibration values, a more accurate number might be reached (two temperature trimmed points available) with some linear interpolation calcs to cook.

So it's worth the try experimenting it. Best to configure the ADC to run the input, Vref and Temp in a quick sequence to make sure they come from almost the same time. Make sure the ADC conversion speed and setting is compatible with the whole voltage supply range from the ultracap. Maybe on the STM32F4 you can also connect -if available- the ultracap to the VBat pin where supply voltage can be measured through an analog switchable 1/3rd divider.

Posted on August 09, 2017 at 13:33

To edit you need to be in the thread view, not the inbox view, click on the thread title, and then the action/edit option.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..