cancel
Showing results for 
Search instead for 
Did you mean: 

TS_CAL2 in 'G0x0

In the STM32G030/070 datasheets, TS_CAL2 is missing.

However, as @Andreas Bolsch​ pointed out in this thread,

RM0454 for the G0x0 (!) explicitly refers to TS_CAL1 *AND* TS_CAL2 values from DS, and the formula given in the RM makes no sense at all without TS_CAL2.

Can ST please clarify?

Thanks,

JW

@Imen DAHMEN​ 

7 REPLIES 7
Imen.D
ST Employee

Hello Jan,

Thank you for pointing out this missing.

We will correct the RM in coming release.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Has there been any progress on this? The manual still appears to be incorrect.

The TS_CAL1 calibration value stored in one of my prototype units is close to the nominal value (TS_CAL1=1051 which at 3v0 = 769.8mV which is very close to the expected V30 value of 0v76 (datasheet page 71). However, when I read the ADC channel 12 in a cold room (clearly well below 30C), I get a slightly higher voltage than 770mV. I am using the STM32G030F6.

Any guidance on how to use the temperature sensor successfully would be much appreciated; it is an essential feature for my application. Thanks!

The temperature sensor does not indicate temperature of ambient, but temperature of the chip. It may quite well be higher than the ambient, depending on ratio between its power consumption and power dissipation. You may also want to verify the working of ADC by measuring a known external voltage, and check the sampling time of the temperature sensor channel against the specified one in DS.

Please start a new thread if you wish to discuss this further.

JW

Please tell us the memory address of TS_CAL2. I still didn't find it for STM32G030 and G070.

Have you read the thread linked above?

Should the mentioned change in RM happen, it will probebly removal of reference to temperature calibration altogether, see my post at November 4, 2019 at 8:38 AM. I am not ST so may be wrong.

Meantime, look into the DS of the non-zero-ending 'G0 datasheets.

JW

ECOM-Klaus
Associate II

Jan, thanks for your hint.

Attached is a function usind only CAL_TS1 and the typical slope (2.5mV/°C).

The function respects other VCC/VDDA voltages and works using decimal fixpoint arithmetic. Function returns temperature in 1/10°C.

Testing with 4 different devices:

When entering TS_CAL2 (adjusted to actual VDDA!) as ADC value (130°C) from g0x1 address resulted in differences of < 1°C only.

Remark:

It is not necessary to know CPU temperture in 1/10°C or better because it does not creally orrespond to the ambient temperature.

It seems that the typical TS slope and the linearity is rather accurate.

Thanks for the detailed description.

JW