Skip to main content
przemek
Associate
December 24, 2012
Question

stm32 temperature sensor

  • December 24, 2012
  • 4 replies
  • 1076 views
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
    This topic has been closed for replies.

    4 replies

    raptorhal2
    Lead
    December 24, 2012
    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
    przemekAuthor
    Associate
    December 24, 2012
    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
    December 24, 2012
    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
    przemekAuthor
    Associate
    December 24, 2012
    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.