Skip to main content
MHerr.3
Associate
Jun 16, 2021 8:20 AM UTC
Question

Internal temperature sensor shows big offset at temperatures > 50°C (STM32G474VE). Is this common knowledge and if so is there some form of formula to correct this?

Setup:

  • Using ADC1 with an ADC frequency of 50MHz
  • Sampling time of internal temperature channel = 640.5 cycles = 12.81µs (> minimal sampling time of 5µs)
  • Conversion triggered every 1s by software
  • Using injected channel since regular channel conversion is used to measure external signals at a higher frequency (of 2kHz)
  • Injected channel sequence is two to perform two consecutive conversion(adding one dummy conversion) to avoid errate topic

More information:

  • The temperate is calculated from raw ADC value to °C using LL-Driver functions
  • The offset only occurs at higher temperatures (> 50°C)
  • The temperature of the chip is externally measured with a thermoelement glued to the STM32 using heat paste and Kapton tape
  • The maximum temperatue range of this particular STM32 is -40°C to 130°C
This topic has been closed for replies.

7 replies

TDK
Jun 16, 2021 1:11 PM UTC

What value are you getting vs what are you expecting?

Chips will generally becomes less efficient (more heat) as they heat up, so the delta will increase as temperature rises.

The junction temperature, which is measured by the sensor, is expected to be higher than the case temperature you're reading.

"If you feel a post has answered your question, please click ""Accept as Solution""."
MHerr.3
MHerr.3Author
Associate
Jun 16, 2021 1:14 PM UTC

Unfortunatelly, for me it is the other way around. The ambient temperature is higher than the temperature measured by the chip. (E. g. 90°C ambient and 77°C measured).

waclawek.jan
Super User
Jun 16, 2021 2:27 PM UTC

Give us some more info and numbers - VREF+ arrangement, proof that it's rock stable also at the elevated temperatures, ADC readout values/spread, calibration values from FLASH.

You don't switch off the temperature sensor between measurements, do you? If so, try not to.

Measure VREFINT in a similar manner. Is it stable?

For debugging purposes, try reading *only* the internal temperature. Meantime you can measure the external thermoelement using a multimeter, or use some other method of measuring the package temperature (e.g. contactless/infra thermometer). Still large deviation?

You've observed all other ADC errata and have read the 'G4-specific ADC appnote, I presume.

JW

JGosd.1
Visitor II
Apr 29, 2022 1:37 AM UTC

The datasheet for the STM32G474 has been recently (Nov 2021) updated to Rev 6 to show TS_CAL2_TEMP as 130°C, rather than the 110°C it shows in rev5.

This is likely your issue (as it was mine!)

Cheers,

JDG

waclawek.jan
Super User
Apr 29, 2022 9:29 PM UTC

Hi @JGosd.1​ ,

Very nice catch. Thank you for sharing it with us.

JW

MHerr.3
MHerr.3Author
Associate
Apr 30, 2022 7:04 AM UTC

Thanks for your answer.

Unfortunatelly for me, the product I was using the temperature measurement was discontinued so the whole firmware is obsolete now. But still thank you for your answer!

TDK
Apr 30, 2022 4:01 PM UTC

@MHerr.3​ The STM32G474VE? Temperature can still be measured per the datasheet.

"If you feel a post has answered your question, please click ""Accept as Solution""."