Driver for the EFM32 internal temperature sensor. More...

Detailed Description

Driver for the EFM32 internal temperature sensor.

All EFM32 chips have an internal ADC input channel that reads the internal temperature sensor. This EFM32-specific driver provides an interface for reading this value, compensated using factory-calibrated values.

The board must define CORETEMP_ADC to point to the ADC line that connects to the right ADC input channel.

This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.

Files

file  coretemp.h
 Interface definition of the EFM32 internal temperature sensor driver.
 

Functions

int coretemp_init (void)
 Initialize the sensor. More...
 
int16_t coretemp_read (void)
 Read the current temperature from the sensor. More...
 

Function Documentation

◆ coretemp_init()

int coretemp_init ( void  )

Initialize the sensor.

Returns
0 on successful initialization
-EIO on ADC initialization error

This driver assumes that the CORETEMP_ADC is defined and points to the ADC input channel that is connected to the internal temperature sensor.

◆ coretemp_read()

int16_t coretemp_read ( void  )

Read the current temperature from the sensor.

Returns
current temperature in centi-degrees Celsius (times 100)

Temperature readings are compensated using the factory-calibration values.