This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2640R2F: Internal temperature sensor output

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hi,

Are there any built-in functions in CCS for outputting the internal temperature of the launchpad?  I see in its datasheet that it has a built-in temperature sensor.  I have used other Microcontrollers before and there are built-in functions that simply output the internal temperature to a serial monitor such as putty, then I can write a loop that outputs the internal temperature every second.  I am trying to do this with this new launchpad which is a simple task but my answer is probably buried in many many training videos.  

Also,  is there any way I can edit project zero to output the internal temperature?  I know there is a data service within it that maybe I can make transfer temperature data.  

  • Hi Nicholas,

    What you are interested in is AON_BATMON, which measures battery voltage and temperature. The API is found as such:

    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(driverlib/aon_batmon.h)

    AON_BATMON is enabled by calling AONBatMonEnable(), and samples can be retrieved by calling AONBatMonTemperatureGetDegC(). Do note, however, you can call AONBatMonNewTempMeasureReady() before retrieving the sample in order to check if a new temperature value is available.

    You need to implement the periodic sampling yourself.