2017-08-09 12:34 AM
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
2017-08-09 01:54 AM
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
2017-08-09 03:09 AM
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
2017-08-09 03:32 AM
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
2017-08-09 05:00 AM
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.
2017-08-09 06:33 AM
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.