cancel
Showing results for 
Search instead for 
Did you mean: 

What is the temperature sensor calibration value if VREF is not 3.0V as datasheet refered

Yang Yang
Associate II

Hello, ST experts

 

The temperature sensor in STM32U595 is used for a mesurement. As datasheet said TS_CAL1 can be read at address 0x0BFA0710~0x0BFA0711. But this value is for 3.0V VREF, how is the situation if VREF and VDDA is 3.3V? How can I get the true temperature. E.g. for a chip I have the TS_CAL1 is 4130. What does that mean for 3.3V VREF?

 

BR

Yang

1 ACCEPTED SOLUTION

Accepted Solutions
RobK1
Associate II

You have to multiply your measurement by (3.3 / 3.0), then do the rest of the calculations.

This is the example ST gives for the 32L0x2:

/* Temperature sensor calibration value address */
 #define TEMP130_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FF8007E))
 #define TEMP30_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FF8007A))
 #define VDD_CALIB ((uint16_t) (300))
 #define VDD_APPLI ((uint16_t) (330))
 int32_t ComputeTemperature(uint32_t measure)
 {
  int32_t temperature;
  temperature = ((measure * VDD_APPLI / VDD_CALIB) - (int32_t) *TEMP30_CAL_ADDR );
  temperature = temperature * (int32_t)(130 - 30);
  temperature = temperature / (int32_t)(*TEMP130_CAL_ADDR - *TEMP30_CAL_ADDR);
  temperature = temperature + 30;
 return(temperature);
 }

 

View solution in original post

1 REPLY 1
RobK1
Associate II

You have to multiply your measurement by (3.3 / 3.0), then do the rest of the calculations.

This is the example ST gives for the 32L0x2:

/* Temperature sensor calibration value address */
 #define TEMP130_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FF8007E))
 #define TEMP30_CAL_ADDR ((uint16_t*) ((uint32_t) 0x1FF8007A))
 #define VDD_CALIB ((uint16_t) (300))
 #define VDD_APPLI ((uint16_t) (330))
 int32_t ComputeTemperature(uint32_t measure)
 {
  int32_t temperature;
  temperature = ((measure * VDD_APPLI / VDD_CALIB) - (int32_t) *TEMP30_CAL_ADDR );
  temperature = temperature * (int32_t)(130 - 30);
  temperature = temperature / (int32_t)(*TEMP130_CAL_ADDR - *TEMP30_CAL_ADDR);
  temperature = temperature + 30;
 return(temperature);
 }