2025-05-10 9:45 AM
I want to use Macro "__LL_ADC_CALC_TEMPERATURE" to calculate the chip's temperature. But there is a difference here.
As mentioned above, in datasheet, TS_CAL2 corresponds to 130 ℃.
But in STM32Cube FW_G4 V1.6.1, file "stm32g4xx_ll_adc.h", line 386, TEMPSENSOR_CAL2_TEMP corresponds to 110 ℃.
Which one is ture?
2025-05-10 9:52 AM
Please tell us what your exact MCU model you have, what datasheet version you used and what version STM32CubeMX and version of firmware pack you use(FW_G4 V1.6.1?).
2025-05-10 10:09 AM - edited 2025-05-10 10:11 AM
It is 130 and is correct in the GitHub version, but a library release has not yet been made which includes this fix.
Solved: Re: STM32G431 TS_CAL2 temperature - STMicroelectronics Community
This issue was fixed a few years ago, then broken, and now fixed but not yet released.
2025-05-10 12:18 PM - edited 2025-05-10 12:19 PM
@TDK wrote:This issue was fixed a few years ago, then broken, and now fixed but not yet released.
That's bad. How can something like that happen? Does nobody review pull requests at ST?
2025-05-10 1:17 PM
Do 99 things right and 1 thing wrong and people will always focus on the 1. People are human, mistakes happen. Nobody bats 100%.