
Firmware Functions
FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1
Freescale Semiconductor, Inc.
15
3.2.5
UINT8 TPMS_COMP_TEMPERATURE(UINT8 *u8Temp, UINT16
*u16UUMA)
•
Description:
Performs an 8-bit compensated temperature measurement. It is the user’s
responsibility to ensure that updated and valid uncompensated temperature reading is available in
the UUMA for this routine to return a meaningful value.
— If Tout < -40°C, u8Temp will be 1 and the “over/underflow” status flag will be set.
— If Tout
200°C, u8Temp will be $FE and the “over/underflow” status flag will be set.
•
Stack size:
30 bytes.
•
Approx. Duration:
231 usec.
•
Power Management:
This function executes entirely in RUN mode.
•
Interrupt Management:
This function does not await interrupts. It is not affected by interrupts
either.
•
Resources:
UUMA
•
Input Parameters:
— UINT8 *u8Temp: Updated 8-bit compensated temperature result.
— UINT16 *u16UUMA: Pointer to Universal Uncompensated Measurement Array (as described
). Uncompensated temperature will be utilized from this array.
•
Returns
:
— UINT8 u8Status: Valid error flags/outputs are described in
3.2.6
UINT8 TPMS_READ_PRESSURE(UINT16 *u16UUMA, UINT8 u8Avg)
•
Description:
Performs an 10-bit uncompensated pressure measurement and places it in the
UUMA. While waiting for the ADC to converge, this function goes into STOP4. If the ADC, for
an unexpected reason, fails to converge, this function has a built-in time-out: After five continuous
non-ADC interrupts, the function will assume a failed ADC reading, flag it accordingly, and exit.
If the LVWF (Low Voltage Warning Flag) hardware bit is set, it will flag it accordingly as well.
— If the ADC value is over or under the normal operating condition, the “pressure error” status
flag will be set. The expected pressure result will be forced to either “0” or “1023.” (rail high
or rail low).
— If the ADC times out with no result, the “ADC error” status flag will be set.
•
Stack size:
26 bytes
•
Approx. Duration:
2872 usec (avg of 1); 10670 usec (avg of 4).
Table 11. Valid output conditions for TPMS_COMP_TEMPERATURE
u8Status Value
Measurement Value
Condition
$01
$FE
Compensated temperature reading outside of valid range (high).
$01
$01
Compensated temperature reading outside of valid range (low).
$00
Between $01 - $FE
Valid compensated temperature reading.