cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Internal Temperature

vitthal muddapur
Associate II
Posted on May 08, 2018 at 13:18

Hi,

I am beginner in stm32 power supply 2.5v and Vdda 2.5

what is VDD_CALIB?

what is VDD_APPLI? 

6 REPLIES 6
Amel NASRI
ST Employee
Posted on May 10, 2018 at 17:32

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

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

T J
Lead
Posted on May 11, 2018 at 00:54

this is my code for the 'F091

#define TEMP110_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FFFF7C2))  // calibrated at 3.3V +-10mV   @110C +/- 5C

#define TEMP30_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FFFF7B8))   // calibrated at 3.3V +-10mV   @ 30C +/- 5C

#define VREFINT_CAL     ((uint16_t*) ((uint32_t) 0x1FFFF7BA))   // calibrated at 3.3V +-10mV   @ 30C +/- 5C

#define VDD_CALIB ((uint16_t) (3300))

#define VDD_APPLI ((uint16_t) (3295))

readtemp

    double processorTemp;                    // the temperature in degree Celsius

    int32_t AveTemperatureADC = ADC_Channel_AVE[VTemp_Ad16];     // 16x over sampled, needs /16

    processorTemp  =  (double) AveTemperatureADC / 16 - *TEMP30_CAL_ADDR;

    processorTemp *=  110 - 30;

    processorTemp /=  ((double)*TEMP110_CAL_ADDR) - *TEMP30_CAL_ADDR;

    processorTemp +=   30;

    processorTemperature =  (int32_t)(processorTemp * 100);

    //        sprintf(string,'AveTemperatureADC %04X, ADC_CalibrationFactor %04X, *TEMP30_CAL_ADDR %04X, processorTemperature %.2f, processorTemp %.3f \n\r',AveTemperatureADC,ADC_CalibrationFactor,(int32_t) *TEMP30_CAL_ADDR,((float)processorTemperature/100),processorTemp);

    //        puts (string);

    Vdda = (double)16 * 3.3 * *VREFINT_CAL;

    Vdda /= ADC_Channel_AVE[VRef_Ad17];

 

   this works much much better after a calibrate.  <- your next challenge.

I get approx 30C at start and 38-43C running endlessly.  usually 17C above ambient

   
Posted on May 11, 2018 at 07:48

hi,

thank you for your response

I need information about 

VDD_APPLI and 

VDD_CALIB if vdd 2.5v

Posted on May 11, 2018 at 07:51

what page in the reference manual are you on ?

Posted on May 11, 2018 at 08:03

hi,

http://www.st.com/content/ccc/resource/technical/document/reference_manual/21/bd/0f/bd/1c/88/40/f0/DM00108282.pdf/files/DM00108282.pdf/jcr:content/translations/en.DM00108282.pdf

 

referance manual stm32l071 RM0377 page no.847 and A.8.17 Temperature computation code example 

not mention anywhere about 

VDD_APPLI and 

VDD_CALIB.

Posted on May 11, 2018 at 08:44

You need to find the voltage applied when calibrated in the datasheet.

3.12.1 Internal voltage reference (VREFINT)

The internal voltage reference (VREFINT) provides a stable (bandgap) voltage output for the

ADC and Comparators. VREFINT is internally connected to the ADC_IN17 input channel. It

enables accurate monitoring of the VDD value (when no external voltage, VREF+, is available

for ADC). The precise voltage of VREFINT is individually measured for each part by ST during

production test and stored in the system memory area. It is accessible in read-only mode.

Table 8. Internal voltage reference measured values

Calibration value name         Description                       Memory address

VREFINT_CAL                      Raw data acquired at

                                              temperature of 25 °C        0x1FF8 0078 - 0x1FF8 0079

                                              VDDA = 3 V

 

that is 

VDD_CALIB

= 3V

your original question:

           

VDD_APPLI = 2.5V

.