Temperature sensor module implements functions to obtain the internal chip temperature of the SoC by reading the temperature sensor ADC channel.
#define TEMPERATURE_SENSOR_ADC_INSTANCE |
ADC module instance connected to the internal temperature sensor.
#define TEMPERATURE_SENSOR_V_BANDGAP_mV |
Bandgap ADC channel voltage (in mV)
#define TEMPERATURE_SENSOR_ADC_RESOLUTION |
Expanded resolution value 2^Resolution.
#define TEMPERATURE_SENSOR_VTEMP25_mV |
Temperature sensor voltage @25C defined by the datasheet.
#define TEMPERATURE_SENSOR_SLOPE_uV |
Temperature sensor slope (in uV) defined by the datasheet.
Temperature sensor status.
Enumerator |
---|
kTemperatureSensorOk |
No error.
|
kTemperatureInitError |
Initialization error.
|
kTemperatureSensorConversionStartError |
Error starting the channel conversion.
|
int16_t temperature_sensor_get_chip_temperature |
( |
void |
| ) |
|
Returns the current chip temperature with a 0.01 °C resolution.
- Parameters
-
- Returns
- Temperature measurement with a 0.01 °C resolution or 0xFFFF if an error occurred