cancel
Showing results for 
Search instead for 
Did you mean: 

VREF+ in STM32L1xx

mmsya
Associate II
Posted on May 18, 2018 at 00:53

Dear all,

I have question regarding the VREF+ please.  My understanding is that in STM32L we only have one VREFINT which is about 1.2xx Volts and this is not a reference Voltage to the ADC.  It is directly connected to the ADC_IN17 input. 

. It enables accurate monitoring of the VDD value (when no external voltage, VREF+, is available for ADC).

I am not sure what does this statement '

when no external voltage, VREF+, is available for ADC' mean?  Does this mean the VREF+ pin should be floating?

If for other channels I need a reference Voltage let's say some where between 1.8 and 2.4V we have to supply it externally?  Basically is there any reference Voltage  (Not VREFINT) available internally?

My understanding is VREF+ should always be less than or equal VDDA.  I believe we can select internally VREF+ to VDDA but I am not sure how.Can we select the ADC_IN17  channel reference Voltage VDDA internally and other channel other VREF?

Thanks,

ALi.

11 REPLIES 11
T J
Lead
Posted on May 18, 2018 at 01:25

'

when no external voltage, VREF+

'

(Your VRef+ pin must be very close to Vdd, as per the Datasheet.)

I guess they are saying , when you don't have a accurate reference voltage, you can calcluate your VRef+ by using the on board VREFINT .

on the F091 processor, the ADC values are not accurate initially, you must run a calibrate function first, then all the values are within mVs of the measured pin voltage.

Only after a calibrate, you can calculate your VRef Voltage and Vdd voltage from the VREFINT.

Do you have a calibrate function on the L series ?

which reference manual are you looking at ?

Some smaller processors with less pins don't bring out the VRef+/- pins,

These are connected to VDD and VSS internally.

hence the need for VREFINT. to calculate the Vdd. ( but only accurate after calibrate on the F091)

mmsya
Associate II
Posted on May 18, 2018 at 01:35

Thank you TJ for your respond.  

I am not sure if STM32L152VET6  the one that I am using has any internal reference Voltage (not counting the VREFINT) please.  

High Regards, Ali.

mmsya
Associate II
Posted on May 18, 2018 at 02:06

Hi TJ,

Here is the link to the reference document that I look,

http://www.st.com/content/ccc/resource/technical/document/reference_manual/cc/f9/93/b2/f0/82/42/57/CD00240193.pdf/files/CD00240193.pdf/jcr:content/translations/en.CD00240193.pdf

 

and I look at the datasheet as well.

Thanks, ALi.

Posted on May 18, 2018 at 03:34

Aren't they different things? I mean VREFINT is a reference voltage of known value, not the max rail voltage for the entire range. Having a known VREFINT allows you to extrapolate a supply voltage (VDD/+VREF), one that might come from a battery, which will discharge over time.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on May 18, 2018 at 01:45

Which reference manual are you looking at ? what page ?

did you check the data sheet ?

Generally, there is always a VREFINT voltage available inside the chip.

Posted on May 18, 2018 at 02:19

on age 28 it shows your how to connect an external Reference voltage.

:

• VREF-, VREF+

VREF+ is the input reference voltage.

VREF- and VREF+ are only available as external pins on LQFP144, UFBGA132,

LQFP100, UFBGA100, and TFBGA64 packages, otherwise they are bonded to VSSA

and VDDA, respectively.

figure 8 shows these notes:

1. VDDA and VSSA must be connected to VDD and VSS, respectively.

2. When available (depending on packages), VREF- must be tied to VSSA.

3. Depending on the operating power supply range used, some peripherals may be used with limited

functionalities or performance. For more details, please refer to section 'General operating conditions' in

STM32L1xxxx datasheets.

on page 100:

On BGA 64-pin and all packages with 100 pins or more

To ensure a better accuracy on low-voltage inputs and outputs, the user can connect to VREF+ a separate external reference voltage lower than VDD. VREF+ is the highest voltage, represented by the full scale value, for an analog input (ADC) or output (DAC) signal.

• For ADC

– 2.4 V ≤ VREF+ = VDDA for full speed (ADCCLK = 16 MHz, 1 Msps)

– 1.8 V ≤ VREF+ = VDDA for medium speed (ADCCLK = 8 MHz, 500 Ksps)

– 2.4 V ≤ VREF+ ≠ VDDA for medium speed (ADCCLK = 8 MHz, 500 Ksps)

– 1.8 V ≤ VREF+ < VDDA for low speed (ADCCLK = 4 MHz, 250 Ksps)

– When Product voltage range 3 is selected (VCore = 1.2 V) the ADC is low speed

(ADCCLK = 4 MHz, 250 Ksps)

• For DAC

– 1.8 V ≤ VREF+ < VDDA

• When VDDA is higher than 2.4 V, the voltage on VREF+ may range from 2.4 V to VDDA.

• When VDDA is below 2.4 V, VREF+ must be equal to VDDA.

On packages with 64 pins or less (except BGA package)

VREF+ and VREF- pins are not available. They are internally connected to the ADC voltage supply (VDDA) and ground (VSSA).

Which package are you using ?

5.2.4 Internal voltage reference (VREFINT) has a good description of your question.

Section 8 describes the Routing of the VREFINT.

8.3.3 Reference voltage routing

page 271:

Temperature sensor, VREFINT internal channels

The temperature sensor is connected to channel ADC_IN16 and the internal reference voltage VREFINT is connected to ADC_IN17. These two internal channels can be selected and converted as injected or regular channels.

12.12 Temperature sensor and internal reference voltage <- this describes everything you need, I guess.

mmsya
Associate II
Posted on May 18, 2018 at 19:42

Hi TJ,

Here is my further question.  Base on my understanding the STM32L152 reference voltages applied to the ADC are,

 VDDA and VSS, VREFINT just for the ADC_IN16-17 or what ever voltage applied to the external VREF+ pin.

Am I correct?

Thanks, Ali.

Posted on May 18, 2018 at 18:29

Hi Clive,

This is my understanding as well.  My question is if there are other VREF internally that we could use for other channels?

Thanks, Ali.

mmsya
Associate II
Posted on May 18, 2018 at 19:36

Dear TJ,

Thank you for a nice explanation.  Here are my further comments and questions please,

If we follow your first paragraph statement

'

VREF+ is the input reference voltage.

VREF- and VREF+ are only available as external pins on LQFP144, UFBGA132, LQFP100, UFBGA100,

and TFBGA64 packages, otherwise they are bonded to VSSA

and VDDA, respectively.'

then I am confused what is the comments on figure 8 about?

'

figure 8 shows these notes:

1. VDDA and VSSA must be connected to VDD and VSS, respectively.

2. When available (depending on packages), VREF- must be tied to VSSA.

3. Depending on the operating power supply range used, some peripherals may be used with limited

functionalities or performance. For more details, please refer to section 'General operating conditions' in

STM32L1xxxx datasheets.'

Question, can we have external reference Voltage less than 1.8V (i.e. 1.5V) externally connected to the VREF+ pin?

I am using LQFP100 package.

Thanks, Ali.