26.6.10 Temperature Calibration
Summary
With calibration, it is possible to achieve +/-5% performance from the onboard bandgap temperature sensor. This measurement can provide important information about the die temperature that may be critical in an operating environment with elevated ambient temperatures. Refer to the Electrical Characteristics section of the data sheet for maximum die temperature. Refer to the Power and Temperature Considerations section.
The following table of calibration fuses and mathematical representations are a summary of information provided in the MPLAB Harmony v3 application example located in <root>\csp_apps_pic32cz_ca\apps\temp_sense. The values provided in these fuses result from a calibration procedure that is included in the final test program for each individual part. Some of these values are unique for each individual part which necessitates the implementation of the mathematical routines described below and more comprehensively in the document mentioned above.
OTP Cal Fuse Name | Address | Bitfield Name | Bitmask | Default | Description |
---|---|---|---|---|---|
FUSES_FCCFG69_REG | 0x0A007194 | ROOM_ADC_VAL_PTAT | 0x00000fff | 992 | 12-bit ADC conversion at room temperature of PTAT in LSB |
- | - | ROOM_ADC_VAL_BUFF1V2 | 0x00fff000 | 1489 | 12-bit ADC conversion at room temperature of Buffered 1.2V in LSB |
- | - | ROOM_TEMP_VAL_INT | 0xff000000 | 25 | Integer part of room temperature in °C |
FUSES_FCCFG70_REG | 0x0A007198 | ROOM_TEMP_VAL_DEC | 0x0000000f | 0 | Decimal part of room temperature in 0.1°C |
- | - | ROOM_VREF_VAL | 0x0000fff0 | 3300 | voltage in mV of VREF = VDDANA |
- | - | HOT_TEMP_VAL_DEC | 0x000f0000 | 0 | Decimal part of hot temperature in 0.1°C |
- | - | Reserved | 0xfff00000 | - | - |
FUSES_FCCFG71_REG | 0x0A00719C | HOT_ADC_VAL_PTAT | 0x00000fff | 1325 | 12-bit ADC conversion at hot temperature in LSB of PTAT in LSB |
- | - | HOT_ADC_VAL_BUFF1V2 | 0x00fff000 | 1489 | 12-bit ADC conversion at hot temperature of Buffered 1.2V in LSB |
- | - | HOT_TEMP_VAL_INT | 0xff000000 | 125 | Integer part of hot temperature in °C |
Slope Calculation
Troom (°C): Floating point combination of calibrations values ROOM_TEMP_INT and ROOM_TEMP_DEC representing the ambient temperature calibration point.
Thot (°C): Floating point combination of calibrations values HOT_TEMP_INT and HOT_TEMP_DEC representing the hot temperature calibration point.
Δptat-cal (bit): Raw bit value difference of the calibration value HOT_ADC_VAL_PTAT - ROOM_ADC_VAL_PTAT.
Vref-cal (mV): Calibration reference voltage ROOM_VREF_VAL in mV.
: Change of voltage with respect to temperature.
Die Temperature Calculation
Nadc (bit): Raw bit value of current ADC read.
Δptat-app (bit): Raw bit value difference between HOT_ADC_VAL_PTAT (Vref ratio compensated) and NADC.
Δptat-app (bit) = HOT_ADC_VAL_PTAT – Nadc * ( Vref-app / Vref-cal)
Vht-cal (V): Voltage representation of hot temperature calibration value.
Vref-app (mV): Application reference voltage in mV
Vdiff-app (V): Voltage representation of the raw bit value difference between the hot temperature calibration reference and the current ADC read value (compensated for the Vref ratio already happened, hence Vref-cal is used).
Tj: Junction (die) temperature.