FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1
16
Freescale Semiconductor, Inc.
Firmware Functions
•
Power Management:
This function requires the core to be configured for STOP4 mode and
running at full bus speed.
•
Interrupt Management:
This function utilizes the ADC interrupt to wake-up from STOP mode.
•
Resources:
SMI, ADC, internal bond wires.
•
Input Parameters:
— UINT16 *u16UUMA: Pointer to Universal Uncompensated Measurement Array (as described
). Only the 10-bit uncompensated pressure result will be updated.
— UINT8 u8Avg: Number of measurements to average into one result. The value can be set to 1,
2, 4, 8, or 16.
•
Returns
: UINT8 u8Status: Valid error flags/outputs are described in
.
.
3.2.7
UINT8 TPMS_COMP_PRESSURE(UINT16 *u16CompPressure,
UINT16 *u16UUMA)
•
Description:
Performs an 9-bit compensated pressure measurement. It is the user’s responsibility
to ensure that updated and valid uncompensated voltage, temperature and pressure readings are
available in the UUMA for this routine to return a meaningful value.
— If either the temperature or supply voltage measurements inherent to this function result in a
fault, the pressure reading will be forced to 0 and the appropriate pressure, temperature and/or
voltage flags will be set in the status flag.
— If Pout < 100 kPa, the “over/underflow” status flag will be set, and u16CompPressure will be
forced to $001.
— If Pout
900 kPa, u16CompPressure will be $1FE and the “over/underflow” status flag will be
set.
— If the passed uncompensated voltage measurement is estimated to be under the guaranteed
operational region, the routine will set the “Voltage” status flag. The accuracy of the returned
value is not guaranteed.
— For repeatability data, refer to the FXTH87xxxx family of data sheets.
•
Stack size:
46 bytes
Table 12. Valid output conditions for TPMS_READ_PRESSURE
u8Status Value
Measurement Value
Condition
$04
$03FF
Uncompensated pressure reading outside of valid range (high).
$04
$0000
Uncompensated pressure reading outside of valid range (low).
$24
$03FF
Uncompensated pressure reading outside of valid range (high), and
LVWF set.
$24
$0000
Uncompensated pressure reading outside of valid range (low), and
LVWF set.
$80
$0000
Uncompensated pressure reading not acquired
$A0
$0000
Uncompensated pressure reading not acquired, and LVWF set.
$00
Between $0001 - $03FE
Valid uncompensated pressure reading.
$00
Between $0001 - $03FF
Valid uncompensated pressure reading, and LVWF set.