cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L100RC temperature sensor

km
Associate

Does the STM32L100RC have a temperature sensor?

RM0038 refers to the temperature sensor in the STM32L1 line of processors. However, the STM32L100RC datasheet only mentions "tempsensor" in table 4 and nothing else anywhere. CubeIDE will allow the temperature sensor ADC channel to be selected but apparently no code is generated. There's a macro in stm32l1xx_ll_adc.h , __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS(), for converting the value to celsius but it requires parameters from the datasheet that don't exist: avg_slope and V110. These parameters exist in other datasheets, however. 

The comment near the macro sure seems to imply that the processor has the sensor, just not the cal constants:

 

/* Note: On device STM32L100, calibration parameters TS_CAL1 and TS_CAL2 are not available. */
/*       Therefore, helper macro __LL_ADC_CALC_TEMPERATURE() is not available.*/
/*       Use helper macro @ref __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS().        */


/*
*   __TEMPSENSOR_TYP_AVGSLOPE__   Device datasheet data: Temperature sensor slope typical value (unit: uV/DegCelsius).
  *                                       On STM32L1, refer to device datasheet parameter "Avg_Slope".
  *   __TEMPSENSOR_TYP_CALX_V__     Device datasheet data: Temperature sensor voltage typical value (at temperature and Vref+ defined in parameters below) (unit: mV).
  *                                       On STM32L1, refer to device datasheet parameter "V110" (corresponding to TS_CAL2).
  *   __TEMPSENSOR_CALX_TEMP__      Device datasheet data: Temperature at which temperature sensor voltage (see parameter above) is corresponding (unit: mV)
*/

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome @km, to the community!

First of all I would like to point out that the STM32L1 have already completely been set to NRND (Not Recommended for New Designs) and will therefore no longer be available in the long term.

As far as the temperature sensor is concerned, none is included in this cost-optimized, so-called ValueLine variant STM32L100. The firmware library may contain functions for it, but it is a library for all STM32L1, including those with a temperature sensor. In the end, the data sheet is always decisive for the guaranteed functionality - and it does not mention a temperature sensor, does it?

Hope that answers your question?

Regards, /Peter

 

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Peter BENSCH
ST Employee

Welcome @km, to the community!

First of all I would like to point out that the STM32L1 have already completely been set to NRND (Not Recommended for New Designs) and will therefore no longer be available in the long term.

As far as the temperature sensor is concerned, none is included in this cost-optimized, so-called ValueLine variant STM32L100. The firmware library may contain functions for it, but it is a library for all STM32L1, including those with a temperature sensor. In the end, the data sheet is always decisive for the guaranteed functionality - and it does not mention a temperature sensor, does it?

Hope that answers your question?

Regards, /Peter

 

 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @Peter BENSCH , I suspected this to be the case but was hopeful because the sensor is mentioned in table 4 of the data sheet. I'm going to guess that that row was left in the table inadvertently. Thank you. 

km_0-1687838266493.png

 

Correct, this is one of those copy'n'paste errors, because this table was taken over without change from a bigger brother variant. Presumably, however, this will no longer be fixed because, as mentioned, the family is already on NRND.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.