Section 3.7 (Advanced full-scale voltage configuration) is used if the internal reference (1.25V, 2.5V, AVDD...) can't meet your requirement.

In according to AN0021 section 3.7 point 3: Configure the VREFATTFIX and VREFATT bit fields in the ADCn_SINGLECTRLX or ADCn_SCANCTRLX register to ensure that the reference voltage at the ADC (= VREF x ATTVREF) is between 0.7 V and 1.05 V (column 3 on AN0021 Table 3.10).

In according to AN0021 section 3.7, it should select VBGRLOW (0.78V) as the voltage reference source for minimum VFS as below. VFS = 2 x 0.78 x 1 / (15/12) = 1.248V = +/-0.624V differential

It can't output the internal reference to a pin.

What are OP and V-Mess mean?

0

Thanks for your answer.

So do I understand right:

1. There are 1.25, 2.5, 5.0, AVDD ( the Analog power I think ) and Vref-ext unscaled as reference.

( REF = 0 ... 6 )

2. ( REF = 7 ) I can control the VRef from different sources.

ONLY 1, 2, 5 are with a attenuation factor.

Ref 0.83 and 0.78 are here WITHOUT a attenuation factor !?

VREFFATTFIX = 1 => Vref = VREFSEL ( 1,2 or 5 ) / ( 1/3 or 1/4 depending on VREFFATT )

So far I can understand.

1. BUT in the docu AN0021 is written, that 0.78 and 0.83 can be used with an factor too.

I can not read this from the EFR32xG1 - Datasheet.

2. In AN0021 is written something about ( VREF x ATTVREF ) between 0.7 ... 1.05V

IT IS NOT CLEAR, what exactly that mean.

3. Is VREFFATT member of N = { 0, 1, 2 ... } ?

4. IT IS NOT CLEAR from the datasheet if VREFFATT is also aktiv if VREFFATTFIX = 1 ?

5. I DON'T find any data about the Vref after the Scalling with VREFFATT and VREFFATTFIX.

There are ony max. values. Not minimum.

I have a analog value of 0.1 to 0.3 V can I scale down Vref to 0.3 V ?

What is the minimum ?

6. I find in the datasheet also an attenuation factor for Vin. What does this exacly mean ?

IS IT Vin / VINATT ? VINATT member of N = { 0, 1, 2 ... } ?

IS VREFFATTFIX olso in the result of Vin ? The exaple 24.2 in the datasheet is very unclear.

But the Vin must still be under VINmax I think ?

Is there any lose in result if I use VINATT ?

What is the use of this ? Makes only sence in scanning from a low Vref with different Vin.

But I can't adjust it for different chanels. So what for do I neet it ?

So VINATT = 1 for unchanged Vin ?

Sorry your documentation is often very difficult to understand.

So I have to bather somebody.

Thanks a lot and best regards

arnold

0

Sorry I forgot something:

can I use VREFSEL = VREFPNWATT also for single ended Vin ?

I have switch to GND and I want to eliminate the error over this switch.

So I want to put VrefN over this switch ( some mV over GND )

and VrefP on the other side of the sensor with ( 0.1 ... 0.3 V ).

0

#1 & #2 It is correct.

#3 For VREFATTFIX = 0 Vref = VREFSEL * ATTVREF (see AN0021 table 3.9 column 4-5 on how to calculate ATTVREF from VREFATT) For VREFATTFIX = 1 Vref = VREFSEL * ATTVREF (where ATTVREF = 1/3 or 1/4, see AN0021 table 3.9 column 2-3)

The main point here is the reference voltage (Vref) above must meet the condition below (point 3 in procedure of AN0021 section 3.7). Configure VREFATTFIX and VREFATT so that the reference voltage at the ADC is between 0.7 and 1.05V.

#1 Where you get such information in AN0021?

#2 See #3 above.

#3 VREFATT can be 0-15.

#4 If VREFATTFIX = 1, there is only two options for VREFATT, it is =0 or >0 (1-15). What do you mean aktiv?

#5 As metioned before the Vref = VREFSEL * ATTVREF must be 0.7 - 1.05V so 0.3V is an invalid value. The range (VFS) on scaling Vref is determined by the formula below in AN0021. VFS (full scale voltage) = (2 × VREFSEL × ATTVREF)/ATTVIN The VREFSEL x ATTVREF must be 0.7 - 1.05V and ATTVIN maximum is 15/12 so the VFS minimum is 2 x 0.7/(15/12) = 1.12V.

#6 The VIN attenuation factor (ATTVIN) is used to widen the available input range of the ADC beyond the reference source and determined by VINATT bit field (see formula in #5).

There is no example in datasheet, what is 24.2? Do you mean example in EFR32 reference manual?

You need to calculate the VFS for the selected reference (VREFSEL) with attenuation factors and use it for ADC conversion. You can get some examples of VFS configuration on AN0021 table 3.10 and similar information can be found on EFR32 reference manual section 24.3.6.2.

0

#1: 3.7 Point 2. Select the .... ( no reference to only 1,2,5 )

Thanks I start to better understand the chip.

#4 IT IS NOT CLEAR from the datasheet if VREFFATT is also aktiv if VREFFATTFIX = 1 ?

===> if VREFFATTFIX = 1 is VREFFATT also aktiv as attenuation factor or not ( = 1/1 )?

#5 The VREFSEL x ATTVREF must be 0.7 - 1.05V and ATTVIN maximum is 15/12 so the VFS minimum

is 2 x 0.7/(15/12) = 1.12V. ===> 15 ist the VREFFAT I think, but were does the 12 come from ?

----

The same with the example:

ATTVref = (VREFFATT + 6) / 24 for VREFFATT < 13, and (VREFFATT-3)/12 for VREFFATT >= 13

Where das the +6, /24, -3 and /12 come from. There is nothing in the register description.

Is it just like this depenting on VREFFATT, or do I get this factors from somewhere else ?

VFS (full scale voltage) = (2 × VREFSEL × ATTVREF)/ATTVIN ( so ATTVIN is >= 3 ? )

OR IS ATTVIN allways: ATTVIN / 12 ?

#6 s. Attachment in EFR32 datasheet.

Verry very difficult to understand.

I have a external ref of 1.25 V and a signal < 0,3 V.

If you don't mind, just give me the best parameters for the registers before I get complet grazy about this stuff.

#4 Can you explain what is aktiv? For VREFATTFIX = 1, ATTVREF = 1/3 for VREFATT = 1-15 (>0), ATTVREF = 1/4 for VREFATT = 0.

#5 The 15 is the VINATT, not VREFATT. The 12 comes from the definition of ATTVIN, see column 6 of table 3.9. The +6, /24, -3 and /12 are hardcoded and they can't change. You can find the related description on EFR32 reference manual (Rev 0.6) section 24.3.6.2. ATTVIN = VINATT/12, where VINATT = 3 to 15.

#6 This is reference manual, not datasheet.

The advanced full-scale voltage configuration is used to tailor make your own VFS but the minimum VFS can't < 1V. So this is what you need if you want to scale down the VFS to ~0.3V to measure signal <0.3V.

0

thanks again.

I have a 1,25 ext. reference. A put on EXT_P and EXT_N but I only messure single chanel.

on adcPosSelAPORT4XCH7.

I use:

VINATT = 12

VREFATT = 13

VREFATTFIX = 0

VREFSEL = 5

does this make sense ?

Or is there a better for my messurment ?

0

I miss the NOT in my last post, it should be: So this is NOT what you need if you want to scale down the VFS to ~0.3V to measure signal <0.3V.

Why you don't use REF = 4 (EXTSINGLE) or 0 (internal 1V25) in SINGLECTRL register for your measurement?

Why you don't use VREFSEL = 2 (REF = 7) for single ended external reference? As I mentioned before, the Vref should be 0.7 - 1.05V regardless the VREFSEL is 1, 2, or 5. So the VFS in your case will be (Vref = 1.25 x 10/12 = 1.042V is within 0.7 - 1.05V): VFS = 2 x 1.25 x (10/12) / (12/12) = 2.08V = +/-1.04V differential

This VFS is higher than your original 1.25V reference. So I suggest you to use REF = 4 (EXTSINGLE) or 0 (internal 1V25) for your measurement.

0

Sorry took some time ,I had an business apointment in an other country.

I want to messure radiometric and I have to shut down the messument current because of limited baterie resources.

I use a fet down to GND and with Vext_N on top of the fet I will eliminate all errors across the fet.

So the Vext-P - Vext-N is just across the resistor and the Sensor ( Pt 100...1000 ) in line.

The 1,24 Volt Ref. ist a standart we use on many aplications.

0

I use the single 1,25V internal Ref. ( BGM113 on Gecko board )

I put both Analog Inputs ( pos, neg ) on VSS and I read 0....3

## ADC Example for BGM111/113

Hello,

I'm moving this post to the 32-bit MCU forum because I think the guys over there know better how to configure the ADC.

The latest AN0021 application note section 3.7 (with software example in section 5.13) has all the information you need.

The AN0021 can download from the link below.

http://www.silabs.com/support/resources.ct-application-notes.ct-example-code

That is exactly where my problems start with.

May be my English is not good enough.

That is where my post came from. May be it is written there ?

But may be not everybody understand it if he is not an expert with this chip yet !

Looks like the dilema with the egg and the chicken.

Section 3.7 (Advanced full-scale voltage configuration) is used if the internal reference (1.25V, 2.5V, AVDD...) can't meet your requirement.

In according to AN0021 section 3.7 point 3:

Configure the VREFATTFIX and VREFATT bit fields in the ADCn_SINGLECTRLX or ADCn_SCANCTRLX register to ensure that the reference voltage at the ADC (= VREF x ATTVREF) is between 0.7 V and 1.05 V (column 3 on AN0021 Table 3.10).

In according to AN0021 section 3.7, it should select VBGRLOW (0.78V) as the voltage reference source for minimum VFS as below.

VFS = 2 x 0.78 x 1 / (15/12) = 1.248V = +/-0.624V differential

It can't output the internal reference to a pin.

What are OP and V-Mess mean?

Thanks for your answer.

So do I understand right:

1. There are 1.25, 2.5, 5.0, AVDD ( the Analog power I think ) and Vref-ext unscaled as reference.

( REF = 0 ... 6 )

2. ( REF = 7 ) I can control the VRef from different sources.

ONLY 1, 2, 5 are with a attenuation factor.

Ref 0.83 and 0.78 are here WITHOUT a attenuation factor !?

3. VREFFATTFIX = 0 => Vref = VREFSEL ( 1,2 or 5 ) / VREFFATT.

VREFFATTFIX = 1 => Vref = VREFSEL ( 1,2 or 5 ) / ( 1/3 or 1/4 depending on VREFFATT )

So far I can understand.

1. BUT in the docu AN0021 is written, that 0.78 and 0.83 can be used with an factor too.

I can not read this from the EFR32xG1 - Datasheet.

2. In AN0021 is written something about ( VREF x ATTVREF ) between 0.7 ... 1.05V

IT IS NOT CLEAR, what exactly that mean.

3. Is VREFFATT member of N = { 0, 1, 2 ... } ?

4. IT IS NOT CLEAR from the datasheet if VREFFATT is also aktiv if VREFFATTFIX = 1 ?

5. I DON'T find any data about the Vref after the Scalling with VREFFATT and VREFFATTFIX.

There are ony max. values. Not minimum.

I have a analog value of 0.1 to 0.3 V can I scale down Vref to 0.3 V ?

What is the minimum ?

6. I find in the datasheet also an attenuation factor for Vin. What does this exacly mean ?

IS IT Vin / VINATT ? VINATT member of N = { 0, 1, 2 ... } ?

IS VREFFATTFIX olso in the result of Vin ? The exaple 24.2 in the datasheet is very unclear.

But the Vin must still be under VINmax I think ?

Is there any lose in result if I use VINATT ?

What is the use of this ? Makes only sence in scanning from a low Vref with different Vin.

But I can't adjust it for different chanels. So what for do I neet it ?

So VINATT = 1 for unchanged Vin ?

Sorry your documentation is often very difficult to understand.

So I have to bather somebody.

Thanks a lot and best regards

arnold

Sorry I forgot something:

can I use VREFSEL = VREFPNWATT also for single ended Vin ?

I have switch to GND and I want to eliminate the error over this switch.

So I want to put VrefN over this switch ( some mV over GND )

and VrefP on the other side of the sensor with ( 0.1 ... 0.3 V ).

#1 & #2

It is correct.

#3

For VREFATTFIX = 0

Vref = VREFSEL * ATTVREF (see AN0021 table 3.9 column 4-5 on how to calculate ATTVREF from VREFATT)

For VREFATTFIX = 1

Vref = VREFSEL * ATTVREF (where ATTVREF = 1/3 or 1/4, see AN0021 table 3.9 column 2-3)

The main point here is the reference voltage (Vref) above must meet the condition below (point 3 in procedure of AN0021 section 3.7).

Configure VREFATTFIX and VREFATT so that the reference voltage at the ADC is between 0.7 and 1.05V.

#1

Where you get such information in AN0021?

#2

See #3 above.

#3

VREFATT can be 0-15.

#4

If VREFATTFIX = 1, there is only two options for VREFATT, it is =0 or >0 (1-15).

What do you mean aktiv?

#5

As metioned before the Vref = VREFSEL * ATTVREF must be 0.7 - 1.05V so 0.3V is an invalid value.

The range (VFS) on scaling Vref is determined by the formula below in AN0021.

VFS (full scale voltage) = (2 × VREFSEL × ATTVREF)/ATTVIN

The VREFSEL x ATTVREF must be 0.7 - 1.05V and ATTVIN maximum is 15/12 so the VFS minimum is 2 x 0.7/(15/12) = 1.12V.

#6

The VIN attenuation factor (ATTVIN) is used to widen the available input range of the ADC beyond the reference source and determined by VINATT bit field (see formula in #5).

There is no example in datasheet, what is 24.2? Do you mean example in EFR32 reference manual?

You need to calculate the VFS for the selected reference (VREFSEL) with attenuation factors and use it for ADC conversion.

You can get some examples of VFS configuration on AN0021 table 3.10 and similar information can be found on EFR32 reference manual section 24.3.6.2.

#1: 3.7 Point 2. Select the .... ( no reference to only 1,2,5 )

Thanks I start to better understand the chip.

#4 IT IS NOT CLEAR from the datasheet if VREFFATT is also aktiv if VREFFATTFIX = 1 ?

===> if VREFFATTFIX = 1 is VREFFATT also aktiv as attenuation factor or not ( = 1/1 )?

#5 The VREFSEL x ATTVREF must be 0.7 - 1.05V and ATTVIN maximum is 15/12 so the VFS minimum

is 2 x 0.7/(15/12) = 1.12V. ===> 15 ist the VREFFAT I think, but were does the 12 come from ?

----

The same with the example:

ATTVref = (VREFFATT + 6) / 24 for VREFFATT < 13, and (VREFFATT-3)/12 for VREFFATT >= 13

Where das the +6, /24, -3 and /12 come from. There is nothing in the register description.

Is it just like this depenting on VREFFATT, or do I get this factors from somewhere else ?

VFS (full scale voltage) = (2 × VREFSEL × ATTVREF)/ATTVIN ( so ATTVIN is >= 3 ? )

OR IS ATTVIN allways: ATTVIN / 12 ?

#6 s. Attachment in EFR32 datasheet.

Verry very difficult to understand.

I have a external ref of 1.25 V and a signal < 0,3 V.

If you don't mind, just give me the best parameters for the registers before I get complet grazy about this stuff.

#4

Can you explain what is aktiv?

For VREFATTFIX = 1, ATTVREF = 1/3 for VREFATT = 1-15 (>0), ATTVREF = 1/4 for VREFATT = 0.

#5

The 15 is the VINATT, not VREFATT.

The 12 comes from the definition of ATTVIN, see column 6 of table 3.9.

The +6, /24, -3 and /12 are hardcoded and they can't change.

You can find the related description on EFR32 reference manual (Rev 0.6) section 24.3.6.2.

ATTVIN = VINATT/12, where VINATT = 3 to 15.

#6

This is reference manual, not datasheet.

The advanced full-scale voltage configuration is used to tailor make your own VFS but the minimum VFS can't < 1V.

So this is what you need if you want to scale down the VFS to ~0.3V to measure signal <0.3V.

thanks again.

I have a 1,25 ext. reference. A put on EXT_P and EXT_N but I only messure single chanel.

on adcPosSelAPORT4XCH7.

I use:

VINATT = 12

VREFATT = 13

VREFATTFIX = 0

VREFSEL = 5

does this make sense ?

Or is there a better for my messurment ?

I miss the NOT in my last post, it should be:

So this is NOT what you need if you want to scale down the VFS to ~0.3V to measure signal <0.3V.

Why you don't use REF = 4 (EXTSINGLE) or 0 (internal 1V25) in SINGLECTRL register for your measurement?

Why you don't use VREFSEL = 2 (REF = 7) for single ended external reference?

As I mentioned before, the Vref should be 0.7 - 1.05V regardless the VREFSEL is 1, 2, or 5.

So the VFS in your case will be (Vref = 1.25 x 10/12 = 1.042V is within 0.7 - 1.05V):

VFS = 2 x 1.25 x (10/12) / (12/12) = 2.08V = +/-1.04V differential

This VFS is higher than your original 1.25V reference.

So I suggest you to use REF = 4 (EXTSINGLE) or 0 (internal 1V25) for your measurement.

Sorry took some time ,I had an business apointment in an other country.

I want to messure radiometric and I have to shut down the messument current because of limited baterie resources.

I use a fet down to GND and with Vext_N on top of the fet I will eliminate all errors across the fet.

So the Vext-P - Vext-N is just across the resistor and the Sensor ( Pt 100...1000 ) in line.

The 1,24 Volt Ref. ist a standart we use on many aplications.

I use the single 1,25V internal Ref. ( BGM113 on Gecko board )

I put both Analog Inputs ( pos, neg ) on VSS and I read 0....3

What could I do wrong ?

Thanks

arnold