Skip to main content
vitthal muddapur
Associate III
May 8, 2018
Question

ADC Internal Temperature

  • May 8, 2018
  • 2 replies
  • 1031 views
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? 

    This topic has been closed for replies.

    2 replies

    Amel NASRI
    Technical Moderator
    May 10, 2018
    Posted on May 10, 2018 at 17:32

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

     
    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    T J
    Senior III
    May 10, 2018
    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

       
    vitthal muddapur
    Associate III
    May 11, 2018
    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

    T J
    Senior III
    May 11, 2018
    Posted on May 11, 2018 at 07:51

    what page in the reference manual are you on ?