2021-06-16 01:20 AM
Setup:
More information:
2021-06-16 06:11 AM
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.
2021-06-16 06:14 AM
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).
2021-06-16 07:27 AM
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
2022-04-28 06:37 PM
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
2022-04-29 02:29 PM
Hi @JGosd.1 ,
Very nice catch. Thank you for sharing it with us.
JW
2022-04-30 12:04 AM
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!
2022-04-30 09:01 AM
@MHerr.3 The STM32G474VE? Temperature can still be measured per the datasheet.