cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 temperature sensor

przemek
Associate II
Posted on December 24, 2012 at 04:29

hi,

how can I use the STM32 built-in temperature sensor? the STLM20_ReadTemp() function stops the program and I really need to get this to work.

thanks

#stm32 #stlm20
4 REPLIES 4
raptorhal2
Lead
Posted on December 24, 2012 at 17:58

The Standard Peripheral Library has a temperature sensor example. What are you doing differently from that ?

The temperature sensor has a long initialization time (see the data sheet). Have you allowed for that ?

Cheers, Hal

przemek
Associate II
Posted on December 24, 2012 at 20:08

When I use the eaxmple from stendard peripheral library, it works, The problem appears when I try to insert the code into the ZigBee example which also uses the HAL driver. Then STLM20_ReadTemp() function stops the program and doesn't allow to start again. 

About the initialization time - can you point me to that document? i couldn't see that in the STLM20 document from ST.com

raptorhal2
Lead
Posted on December 24, 2012 at 21:05

Reset everything I said.

The STLM20 is not the STM32Fxxx built-in temperature sensor. I presume you are using some evaluation or Discovery board with this sensor on the board. It has a simple analog input to the processor ADC, which provides the sensor data in the ReadTemp function.

My guess is that the combined code has a conflict in interrupt priorities. Without knowledge of the board part number, and without seeing the combined code, guessing is all that can be expected.

Cheers, Hal

przemek
Associate II
Posted on December 24, 2012 at 22:14

I'm using mb950 board from stm32w-rfckit.

I guess I have to face it myself and join the code in a different way. Thank for your help.