Internal Temperature Sensor of MKE02Z64

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Internal Temperature Sensor of MKE02Z64

897 Views
_daniel_
Contributor II

Please. How to measure internal temperature? The datasheet (Ref. Manual) show:

20190208_154323.png

However, what is the step/ºC? Sorry, I not found the data...

Thanks; Daniel.

Labels (1)
0 Kudos
Reply
1 Reply

775 Views
mjbcswitzerland
Specialist V

Daniel

Here is the temperature conversion code from the uTasker project for K/KV/KL parts:

#define VTEMP_25_16BIT               ((VTEMP_25_MV * 0xffff) / ADC_REFERENCE_VOLTAGE)
#define VTEMP_25_12BIT               (VTEMP_25_16BIT >> 4)
#define VTEMP_25_10BIT               (VTEMP_25_16BIT >> 6)
#define TEMP_SENSOR_SLOPE_100_16BIT  ((TEMP_SENSOR_SLOPE_UV * 0xffff)/(10 * ADC_REFERENCE_VOLTAGE))
#define TEMP_SENSOR_SLOPE_100_12BIT  (TEMP_SENSOR_SLOPE_100_16BIT >> 4)
#define TEMP_SENSOR_SLOPE_100_10BIT  (TEMP_SENSOR_SLOPE_100_16BIT >> 6)
if (ADC_TRIGGER == ucInputMessage[MSG_INTERRUPT_EVENT]) { // convert the ADC reading to a temperature
    signed short ssDifference = (results.sADC_value[0] - VTEMP_25_12BIT); // convert references to 12 bit values
    signed long slTemperature100 = (2550 - ((ssDifference * 10000) / TEMP_SENSOR_SLOPE_100_12BIT)); // {26} the approximate temperature *100, rounded up/down
    slTemperature100 /= 100;                         // the approximate temperature rounded up/down to 1°C
    fnDebugDec(slTemperature100, DISPLAY_NEGATIVE);
    fnDebugMsg(" degC\r\n");
}

The read value (this setup assumes 12 bit resolution) is in results.sADC_value[0].
You can get the VTEMP_25_MV and TEMP_SENSOR_SLOPE_UV values from the data sheet of the exact part being used and set them accordingly to get best accuracy.

I didn't check whether the band-gap voltage is a supplementary requirement for the KE02 yet but this may help in the meantime.

Regards

Mark

Complete Kinetis solutions, training and support: http://www.utasker.com/kinetis.html
Kinetis KE:
- http://www.utasker.com/kinetis/FRDM-KE02Z.html
- http://www.utasker.com/kinetis/FRDM-KE02Z40M.html
- http://www.utasker.com/kinetis/FRDM-KE04Z.html
- http://www.utasker.com/kinetis/FRDM-KE06Z.html
- http://www.utasker.com/kinetis/FRDM-KE15Z.html

0 Kudos
Reply